	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function test_encode_decode
_test_encode_decode:                    ## @test_encode_decode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAX_ENCODED_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%r14, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	movq	_MAX_DATA_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leaq	(,%rax,4), %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -64(%rbp)                 ## 8-byte Spill
	movq	%r13, %r12
	movq	%r13, %rdi
	movl	%r15d, %r13d
	movq	%rbx, %r15
	movl	%r14d, %esi
	movq	%r15, %rdx
	movl	%r13d, %ecx
	callq	_av_base64_encode
	testl	%eax, %eax
	je	LBB0_8
## %bb.1:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	testq	%rbx, %rbx
	je	LBB0_4
## %bb.2:
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	movq	%r12, %rsi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_printf
	jmp	LBB0_13
LBB0_4:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_av_base64_decode
	cmpl	%r13d, %eax
	jne	LBB0_10
## %bb.5:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movl	%r13d, %edx
	callq	_av_base64_decode
	cmpl	%r13d, %eax
	jne	LBB0_11
## %bb.6:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	%r13d, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_16
## %bb.7:
	leaq	L_str.11(%rip), %rdi
	jmp	LBB0_9
LBB0_8:
	leaq	L_str(%rip), %rdi
LBB0_9:
	callq	_puts
	jmp	LBB0_13
LBB0_10:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_12
LBB0_11:
	leaq	L_.str.3(%rip), %rdi
LBB0_12:
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_printf
LBB0_13:
	movl	$1, %eax
LBB0_14:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_24
## %bb.15:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	xorl	%edi, %edi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_av_base64_decode
	testl	%eax, %eax
	je	LBB0_18
## %bb.17:
	leaq	L_str.10(%rip), %rdi
	jmp	LBB0_9
LBB0_18:
	movq	%r12, %rdi
	callq	_strlen
	testl	%eax, %eax
	je	LBB0_23
## %bb.19:
	movq	%r12, %rdi
	movl	$61, %esi
	callq	_strchr
	testq	%rax, %rax
	jne	LBB0_21
## %bb.20:
	movq	%r12, %rdi
	callq	_strlen
	cltq
	addq	%r12, %rax
	decq	%rax
LBB0_21:
	movb	$37, (%rax)
	xorl	%edi, %edi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_av_base64_decode
	testl	%eax, %eax
	js	LBB0_23
## %bb.22:
	leaq	L_str.9(%rip), %rdi
	jmp	LBB0_9
LBB0_23:
	leaq	L_str.8(%rip), %rdi
	callq	_puts
	xorl	%eax, %eax
	jmp	LBB0_14
LBB0_24:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_ENCODED_SIZE,4,2           ## @MAX_ENCODED_SIZE
	.comm	_MAX_DATA_SIZE,4,2              ## @MAX_DATA_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"Failed: encoded string differs from reference\nEncoded:\n%s\nReference:\n%s\n"

L_.str.2:                               ## @.str.2
	.asciz	"Failed: cannot decode the encoded string\nEncoded:\n%s\n"

L_.str.3:                               ## @.str.3
	.asciz	"Failed: cannot decode with minimal buffer\nEncoded:\n%s\n"

L_str:                                  ## @str
	.asciz	"Failed: cannot encode the input data"

L_str.8:                                ## @str.8
	.asciz	"Passed!"

L_str.9:                                ## @str.9
	.asciz	"Failed: error detection"

L_str.10:                               ## @str.10
	.asciz	"Failed: decode to NULL buffer"

L_str.11:                               ## @str.11
	.asciz	"Failed: encoded/decoded data differs from original data"

	.no_dead_strip	_test_encode_decode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function test_encode_decode
_test_encode_decode:                    ; @test_encode_decode
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	sub	sp, sp, #16
	mov	x22, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x8, _MAX_ENCODED_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_ENCODED_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x9, x1
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x1, #15
	and	x9, x9, #0x1fffffff0
	sub	x19, x8, x9
	mov	sp, x19
Lloh8:
	adrp	x8, _MAX_DATA_SIZE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MAX_DATA_SIZE@GOTPAGEOFF]
Lloh10:
	ldr	w24, [x8]
	lsl	x8, x24, #2
	mov	x9, x8
Lloh11:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh12:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x23, x9, x8
	mov	sp, x23
	mov	x0, x19
                                        ; kill: def $w1 killed $w1 killed $x1
	mov	x2, x21
	mov	x3, x20
	bl	_av_base64_encode
	cbz	w0, LBB0_8
; %bb.1:
	cbz	x22, LBB0_4
; %bb.2:
	mov	x0, x19
	mov	x1, x22
	bl	_strcmp
	cbz	x0, LBB0_4
; %bb.3:
	stp	x19, x22, [sp, #-16]!
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_12
LBB0_4:
	mov	x0, x23
	mov	x1, x19
	mov	x2, x24
	bl	_av_base64_decode
	cmp	w0, w20
	b.ne	LBB0_10
; %bb.5:
	mov	x0, x23
	mov	x1, x19
	mov	x2, x20
	bl	_av_base64_decode
	cmp	w0, w20
	b.ne	LBB0_11
; %bb.6:
	mov	x0, x23
	mov	x1, x21
	mov	x2, x20
	bl	_memcmp
	cbz	x0, LBB0_16
; %bb.7:
Lloh15:
	adrp	x0, l_str.11@PAGE
Lloh16:
	add	x0, x0, l_str.11@PAGEOFF
	b	LBB0_9
LBB0_8:
Lloh17:
	adrp	x0, l_str@PAGE
Lloh18:
	add	x0, x0, l_str@PAGEOFF
LBB0_9:
	bl	_puts
	b	LBB0_13
LBB0_10:
	str	x19, [sp, #-16]!
Lloh19:
	adrp	x0, l_.str.2@PAGE
Lloh20:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_12
LBB0_11:
	str	x19, [sp, #-16]!
Lloh21:
	adrp	x0, l_.str.3@PAGE
Lloh22:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_12:
	bl	_printf
	add	sp, sp, #16
LBB0_13:
	mov	w0, #1
LBB0_14:
	ldur	x8, [x29, #-56]
Lloh23:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh24:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_24
; %bb.15:
	sub	sp, x29, #48
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_16:
	mov	x1, x19
	mov	w2, #0
	bl	_av_base64_decode
	cbz	w0, LBB0_18
; %bb.17:
Lloh26:
	adrp	x0, l_str.10@PAGE
Lloh27:
	add	x0, x0, l_str.10@PAGEOFF
	b	LBB0_9
LBB0_18:
	mov	x0, x19
	bl	_strlen
	cbz	w0, LBB0_23
; %bb.19:
	mov	x0, x19
	mov	w1, #61
	bl	_strchr
	cbnz	x0, LBB0_21
; %bb.20:
	mov	x0, x19
	bl	_strlen
	add	x8, x19, w0, sxtw
	sub	x0, x8, #1
LBB0_21:
	mov	w8, #37
	strb	w8, [x0]
	mov	x0, #0
	mov	x1, x19
	mov	w2, #0
	bl	_av_base64_decode
	tbnz	w0, #31, LBB0_23
; %bb.22:
Lloh28:
	adrp	x0, l_str.9@PAGE
Lloh29:
	add	x0, x0, l_str.9@PAGEOFF
	b	LBB0_9
LBB0_23:
Lloh30:
	adrp	x0, l_str.8@PAGE
Lloh31:
	add	x0, x0, l_str.8@PAGEOFF
	bl	_puts
	mov	w0, #0
	b	LBB0_14
LBB0_24:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_ENCODED_SIZE,4,2           ; @MAX_ENCODED_SIZE
	.comm	_MAX_DATA_SIZE,4,2              ; @MAX_DATA_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"Failed: encoded string differs from reference\nEncoded:\n%s\nReference:\n%s\n"

l_.str.2:                               ; @.str.2
	.asciz	"Failed: cannot decode the encoded string\nEncoded:\n%s\n"

l_.str.3:                               ; @.str.3
	.asciz	"Failed: cannot decode with minimal buffer\nEncoded:\n%s\n"

l_str:                                  ; @str
	.asciz	"Failed: cannot encode the input data"

l_str.8:                                ; @str.8
	.asciz	"Passed!"

l_str.9:                                ; @str.9
	.asciz	"Failed: error detection"

l_str.10:                               ; @str.10
	.asciz	"Failed: decode to NULL buffer"

l_str.11:                               ; @str.11
	.asciz	"Failed: encoded/decoded data differs from original data"

	.no_dead_strip	_test_encode_decode
.subsections_via_symbols
