version	U12.1.00
uid	base64.u1-1786350106-0
impl	error
global	2
	0,000005,base64encode,1
	1,000005,base64decode,1

proc base64encode
	local	0,001000,s
	local	1,000020,pad
	local	2,000020,t
	local	3,000020,i
	local	4,000020,j
	local	5,000020,k
	local	6,000040,b64
	local	7,000000,repl
	local	8,000000,ord
	local	9,000000,move
	local	10,000000,ishift
	local	11,000000,ior
	local	12,000000,iand
	con	0,010000,2,053,057
	con	1,002000,1,3
	con	2,010000,1,000
	con	3,010000,1,075
	con	4,010000,0
	con	5,002000,1,1
	con	6,002000,1,2
	con	7,002000,1,4
	con	8,002000,2,15
	con	9,002000,1,6
	con	10,002000,2,63
	con	11,002000,1,0
	declend
	filen	base64.icn
	line	32
	colm	11
	synt	any
lab L1
	init	L3
	mark	L2
	pnull
	var	6
	pnull
	pnull
	pnull
	line	35
	colm	19
	synt	any
	keywd	ucase
	line	35
	colm	29
	synt	any
	keywd	lcase
	line	35
	colm	26
	synt	any
	cat
	line	35
	colm	39
	synt	any
	keywd	digits
	line	35
	colm	36
	synt	any
	cat
	str	0
	line	35
	colm	47
	synt	any
	cat
	line	35
	colm	16
	synt	any
	asgn
	unmark
lab L2
	einit	L1
lab L3
	mark	L4
	pnull
	var	3
	pnull
	pnull
	int	1
	pnull
	pnull
	var	0
	line	37
	colm	15
	synt	any
	size
	int	1
	line	37
	colm	18
	synt	any
	mod
	line	37
	colm	12
	synt	any
	minus
	int	1
	line	37
	colm	24
	synt	any
	mod
	line	37
	colm	6
	synt	any
	asgn
	unmark
lab L4
	mark	L5
	pnull
	var	0
	dup
	var	7
	str	2
	var	3
	line	38
	colm	15
	synt	any
	invoke	2
	line	38
	colm	6
	synt	any
	cat
	asgn
	unmark
lab L5
	mark	L6
	pnull
	var	1
	var	7
	str	3
	var	3
	line	39
	colm	15
	synt	any
	invoke	2
	line	39
	colm	8
	synt	any
	asgn
	unmark
lab L6
	mark	L7
	pnull
	var	2
	str	4
	line	41
	colm	6
	synt	any
	asgn
	unmark
lab L7
	mark	L8
	var	0
	line	42
	colm	6
	synt	any
	bscan
lab L9
	line	42
	colm	8
	synt	while
	mark0
	pushn1
	pnull
	var	3
	var	8
	var	9
	int	5
	line	42
	colm	29
	synt	any
	invoke	1
	line	42
	colm	24
	synt	any
	invoke	1
	line	42
	colm	18
	synt	any
	asgn
	pnull
	var	4
	var	8
	var	9
	int	5
	line	42
	colm	48
	synt	any
	invoke	1
	line	42
	colm	43
	synt	any
	invoke	1
	line	42
	colm	37
	synt	any
	asgn
	pnull
	var	5
	var	8
	var	9
	int	5
	line	42
	colm	67
	synt	any
	invoke	1
	line	42
	colm	62
	synt	any
	invoke	1
	line	42
	colm	56
	synt	any
	asgn
	line	42
	colm	14
	synt	any
	invoke	3
	unmark
	mark	L9
	mark	L12
	pnull
	var	2
	dup
	pnull
	var	6
	pnull
	int	5
	var	10
	var	3
	pnull
	int	6
	line	43
	colm	32
	synt	any
	neg
	line	43
	colm	29
	synt	any
	invoke	2
	line	43
	colm	21
	synt	any
	plus
	line	43
	colm	17
	synt	any
	subsc
	line	43
	colm	9
	synt	any
	cat
	asgn
	unmark
lab L12
	mark	L13
	pnull
	var	2
	dup
	pnull
	var	6
	pnull
	int	5
	var	11
	var	10
	var	12
	var	3
	int	1
	line	44
	colm	39
	synt	any
	invoke	2
	int	7
	line	44
	colm	34
	synt	any
	invoke	2
	var	10
	var	4
	pnull
	int	7
	line	44
	colm	58
	synt	any
	neg
	line	44
	colm	55
	synt	any
	invoke	2
	line	44
	colm	26
	synt	any
	invoke	2
	line	44
	colm	21
	synt	any
	plus
	line	44
	colm	17
	synt	any
	subsc
	line	44
	colm	9
	synt	any
	cat
	asgn
	unmark
lab L13
	mark	L14
	pnull
	var	2
	dup
	pnull
	var	6
	pnull
	int	5
	var	11
	var	10
	var	12
	var	4
	int	8
	line	45
	colm	39
	synt	any
	invoke	2
	int	6
	line	45
	colm	34
	synt	any
	invoke	2
	var	10
	var	5
	pnull
	int	9
	line	45
	colm	59
	synt	any
	neg
	line	45
	colm	56
	synt	any
	invoke	2
	line	45
	colm	26
	synt	any
	invoke	2
	line	45
	colm	21
	synt	any
	plus
	line	45
	colm	17
	synt	any
	subsc
	line	45
	colm	9
	synt	any
	cat
	asgn
	unmark
lab L14
	pnull
	var	2
	dup
	pnull
	var	6
	pnull
	int	5
	var	12
	var	5
	int	10
	line	46
	colm	27
	synt	any
	invoke	2
	line	46
	colm	21
	synt	any
	plus
	line	46
	colm	17
	synt	any
	subsc
	line	46
	colm	9
	synt	any
	cat
	asgn
lab L10
	unmark
	goto	L9
lab L11
	line	42
	colm	8
	synt	endwhile
	line	42
	colm	6
	synt	any
	escan
	unmark
lab L8
	mark	L15
	pnull
	pnull
	var	2
	int	11
	dup
	pnull
	var	1
	line	48
	colm	12
	synt	any
	size
	line	48
	colm	9
	synt	any
	minus
	synt	any
	sect
	var	1
	line	48
	colm	19
	synt	any
	asgn
	unmark
lab L15
	mark	L16
	mark	L17
	var	2
	line	50
	colm	4
	synt	any
	pret
lab L17
	synt	any
	pfail
	unmark
lab L16
	pnull
	line	51
	colm	1
	synt	any
	pfail
	end
proc base64decode
	local	0,001000,s
	local	1,000020,t
	local	2,000020,w
	local	3,000020,x
	local	4,000020,y
	local	5,000020,z
	local	6,000040,b64
	local	7,000040,c64
	local	8,000040,n64
	local	9,000040,padding
	local	10,000000,cset
	local	11,000000,string
	local	12,000000,tab
	local	13,000000,many
	local	14,000000,pos
	local	15,000000,map
	local	16,000000,ord
	local	17,000000,move
	local	18,000000,char
	local	19,000000,ior
	local	20,000000,ishift
	local	21,000000,iand
	con	0,010000,2,053,057
	con	1,002000,1,1
	con	2,002000,2,64
	con	3,002000,1,4
	con	4,002000,1,0
	con	5,020000,1,075
	con	6,002000,1,2
	con	7,010000,1,075
	con	8,010000,1,000
	con	9,010000,0
	con	10,002000,3,255
	con	11,002000,1,6
	declend
	line	53
	colm	11
	synt	any
lab L1
	init	L3
	mark	L2
	mark	L4
	pnull
	var	6
	pnull
	pnull
	pnull
	line	57
	colm	14
	synt	any
	keywd	ucase
	line	57
	colm	24
	synt	any
	keywd	lcase
	line	57
	colm	21
	synt	any
	cat
	line	57
	colm	34
	synt	any
	keywd	digits
	line	57
	colm	31
	synt	any
	cat
	str	0
	line	57
	colm	42
	synt	any
	cat
	line	57
	colm	11
	synt	any
	asgn
	unmark
lab L4
	mark	L5
	pnull
	var	7
	var	10
	var	6
	line	58
	colm	18
	synt	any
	invoke	1
	line	58
	colm	11
	synt	any
	asgn
	unmark
lab L5
	pnull
	var	8
	pnull
	var	11
	line	59
	colm	21
	synt	any
	keywd	cset
	line	59
	colm	20
	synt	any
	invoke	1
	int	1
	dup
	int	2
	line	59
	colm	29
	synt	any
	plus
	synt	any
	sect
	line	59
	colm	11
	synt	any
	asgn
	unmark
lab L2
	einit	L1
lab L3
	mark	L6
	line	62
	colm	4
	synt	if
	mark0
	pnull
	pnull
	pnull
	var	0
	line	62
	colm	9
	synt	any
	size
	int	3
	line	62
	colm	12
	synt	any
	mod
	int	4
	line	62
	colm	18
	synt	any
	numne
	unmark
	line	62
	colm	28
	synt	any
	pfail
	line	62
	colm	4
	synt	endif
	unmark
lab L6
	mark	L7
	var	0
	line	63
	colm	6
	synt	any
	bscan
	mark	L8
	var	12
	var	13
	var	7
	line	64
	colm	15
	synt	any
	invoke	1
	line	64
	colm	10
	synt	any
	invoke	1
	unmark
lab L8
	mark	L9
	pnull
	var	9
	mark	L10
	pnull
	var	12
	var	13
	cset	5
	line	65
	colm	27
	synt	any
	invoke	1
	line	65
	colm	22
	synt	any
	invoke	1
	line	65
	colm	18
	synt	any
	size
	line	65
	colm	34
	synt	any
	esusp
	goto	L11
lab L10
	int	4
lab L11
	line	65
	colm	15
	synt	any
	asgn
	unmark
lab L9
	line	66
	colm	7
	synt	if
	mark0
	mark	L12
	pnull
	var	9
	int	6
	line	66
	colm	19
	synt	any
	numgt
	line	66
	colm	24
	synt	any
	esusp
	goto	L13
lab L12
	mark	L14
	var	14
	int	4
	line	66
	colm	33
	synt	any
	invoke	1
	unmark
	efail
lab L14
	pnull
lab L13
	unmark
	line	66
	colm	42
	synt	any
	pfail
	line	66
	colm	7
	synt	endif
	line	63
	colm	6
	synt	any
	escan
	unmark
lab L7
	mark	L15
	pnull
	var	0
	var	15
	var	0
	str	7
	str	8
	line	69
	colm	12
	synt	any
	invoke	3
	line	69
	colm	6
	synt	any
	asgn
	unmark
lab L15
	mark	L16
	pnull
	var	0
	var	15
	var	0
	var	6
	var	8
	line	70
	colm	12
	synt	any
	invoke	3
	line	70
	colm	6
	synt	any
	asgn
	unmark
lab L16
	mark	L17
	pnull
	var	1
	str	9
	line	72
	colm	6
	synt	any
	asgn
	unmark
lab L17
	mark	L18
	var	0
	line	73
	colm	6
	synt	any
	bscan
lab L19
	line	73
	colm	8
	synt	while
	mark0
	pushn1
	pnull
	var	2
	var	16
	var	17
	int	1
	line	73
	colm	29
	synt	any
	invoke	1
	line	73
	colm	24
	synt	any
	invoke	1
	line	73
	colm	18
	synt	any
	asgn
	pnull
	var	3
	var	16
	var	17
	int	1
	line	73
	colm	48
	synt	any
	invoke	1
	line	73
	colm	43
	synt	any
	invoke	1
	line	73
	colm	37
	synt	any
	asgn
	pnull
	var	4
	var	16
	var	17
	int	1
	line	74
	colm	29
	synt	any
	invoke	1
	line	74
	colm	24
	synt	any
	invoke	1
	line	74
	colm	18
	synt	any
	asgn
	pnull
	var	5
	var	16
	var	17
	int	1
	line	74
	colm	48
	synt	any
	invoke	1
	line	74
	colm	43
	synt	any
	invoke	1
	line	74
	colm	37
	synt	any
	asgn
	line	73
	colm	14
	synt	any
	invoke	4
	unmark
	mark	L19
	mark	L22
	pnull
	var	1
	dup
	var	18
	var	19
	var	20
	var	2
	int	6
	line	75
	colm	31
	synt	any
	invoke	2
	var	20
	var	3
	pnull
	int	3
	line	75
	colm	47
	synt	any
	neg
	line	75
	colm	44
	synt	any
	invoke	2
	line	75
	colm	23
	synt	any
	invoke	2
	line	75
	colm	18
	synt	any
	invoke	1
	line	75
	colm	9
	synt	any
	cat
	asgn
	unmark
lab L22
	mark	L23
	pnull
	var	1
	dup
	var	18
	var	19
	var	21
	var	20
	var	3
	int	3
	line	76
	colm	36
	synt	any
	invoke	2
	int	10
	line	76
	colm	29
	synt	any
	invoke	2
	var	20
	var	4
	pnull
	int	6
	line	76
	colm	57
	synt	any
	neg
	line	76
	colm	54
	synt	any
	invoke	2
	line	76
	colm	23
	synt	any
	invoke	2
	line	76
	colm	18
	synt	any
	invoke	1
	line	76
	colm	9
	synt	any
	cat
	asgn
	unmark
lab L23
	pnull
	var	1
	dup
	var	18
	var	19
	var	21
	var	20
	var	4
	int	11
	line	77
	colm	36
	synt	any
	invoke	2
	int	10
	line	77
	colm	29
	synt	any
	invoke	2
	var	5
	line	77
	colm	23
	synt	any
	invoke	2
	line	77
	colm	18
	synt	any
	invoke	1
	line	77
	colm	9
	synt	any
	cat
	asgn
lab L20
	unmark
	goto	L19
lab L21
	line	73
	colm	8
	synt	endwhile
	line	73
	colm	6
	synt	any
	escan
	unmark
lab L18
	mark	L24
	mark	L25
	line	80
	colm	11
	synt	ifelse
	mark	L26
	pnull
	var	9
	int	4
	line	80
	colm	22
	synt	any
	numeq
	unmark
	var	1
	goto	L27
lab L26
	pnull
	var	1
	int	1
	dup
	pnull
	pnull
	var	1
	line	80
	colm	43
	synt	any
	size
	var	9
	line	80
	colm	45
	synt	any
	minus
	line	80
	colm	41
	synt	any
	plus
	synt	any
	sect
lab L27
	line	80
	colm	11
	synt	endifelse
	line	80
	colm	4
	synt	any
	pret
lab L25
	synt	any
	pfail
	unmark
lab L24
	pnull
	line	81
	colm	1
	synt	any
	pfail
	end
