	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function encodeBase64A
_encodeBase64A:                         ## @encodeBase64A
	.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
                                        ## kill: def $esi killed $esi def $rsi
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	leal	5(,%rsi,8), %eax
	cltq
	imulq	$715827883, %rax, %r14          ## imm = 0x2AAAAAAB
	movq	%r14, %rax
	shrq	$63, %rax
	shrq	$32, %r14
	leal	(%r14,%rax), %esi
	addl	$3, %esi
                                        ## kill: def $r14d killed $r14d killed $r14 def $r14
	addl	%eax, %r14d
	cmovnsl	%r14d, %esi
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r15
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r13
	andl	$-4, %esi
	movl	%r14d, %eax
	subl	%esi, %eax
	movl	$4, %ebx
	subl	%eax, %ebx
	testl	%eax, %eax
	cmovel	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	callq	_TRACE
	movl	%ebx, %r12d
	addl	%r14d, %r12d
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	leal	63(%rbx,%r14), %ebx
	cmovnsl	%r12d, %ebx
	sarl	$6, %ebx
	movl	%r12d, %eax
	andl	$63, %eax
	cmpl	$1, %eax
	sbbl	$-1, %ebx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_strlen
                                        ## kill: def $eax killed $eax def $rax
	imull	%ebx, %eax
	leal	(%rax,%r12), %ecx
	incl	%ecx
                                        ## kill: def $eax killed $eax killed $rax
	addl	%r12d, %eax
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	cmpl	(%rdx), %eax
	movl	%ecx, (%rdx)
	jge	LBB0_1
## %bb.2:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	cmpl	$3, %eax
	jl	LBB0_8
## %bb.3:
	movl	%eax, %eax
	movl	$2863311531, %r14d              ## imm = 0xAAAAAAAB
	imulq	%rax, %r14
	shrq	$33, %r14
	incl	%r14d
	xorl	%ebx, %ebx
	movq	_b64@GOTPCREL(%rip), %rsi
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	(%rsi), %rax
	movl	(%r13), %ecx
	andl	$252, %ecx
	movzbl	(%rax,%rcx,2), %eax
	movb	%al, (%r15)
	movq	(%rsi), %rax
	movl	(%r13), %ecx
	movl	4(%r13), %edx
	shll	$4, %ecx
	andl	$48, %ecx
	shrl	$4, %edx
	andl	$15, %edx
	orq	%rcx, %rdx
	movzbl	(%rax,%rdx,8), %eax
	movb	%al, 1(%r15)
	movq	(%rsi), %rax
	movl	4(%r13), %ecx
	movl	8(%r13), %edx
	andl	$15, %ecx
	shrl	$6, %edx
	andl	$3, %edx
	leaq	(%rdx,%rcx,4), %rcx
	movzbl	(%rax,%rcx,8), %eax
	movb	%al, 2(%r15)
	movq	(%rsi), %rax
	movl	8(%r13), %ecx
	andl	$63, %ecx
	movzbl	(%rax,%rcx,8), %eax
	movb	%al, 3(%r15)
	addq	$4, %r15
	addl	$4, %ebx
	addq	$12, %r13
	decl	%r14d
	cmpl	$1, %r14d
	jle	LBB0_8
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	testl	%ebx, %ebx
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	%ebx, %eax
	andl	$60, %eax
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_strcpy
	movl	%r12d, %edi
	callq	_strlen
	movq	_b64@GOTPCREL(%rip), %rsi
	cltq
	addq	%rax, %r15
	jmp	LBB0_7
LBB0_1:
	movq	_ERROR_INSUFFICIENT_BUFFER@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_8:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpl	$2, %eax
	je	LBB0_11
## %bb.9:
	cmpl	$1, %eax
	jne	LBB0_13
## %bb.10:
	movq	_b64@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movl	(%r13), %edx
	andl	$252, %edx
	movb	(%rcx,%rdx,2), %cl
	movb	%cl, (%r15)
	movq	(%rax), %rcx
	movl	(%r13), %edx
	movl	4(%r13), %esi
	shll	$4, %edx
	andl	$48, %edx
	shrl	$4, %esi
	andl	$15, %esi
	orq	%rdx, %rsi
	movb	(%rcx,%rsi,8), %cl
	movb	%cl, 1(%r15)
	movq	(%rax), %rax
	movl	4(%r13), %ecx
	shll	$2, %ecx
	andl	$60, %ecx
	movb	(%rax,%rcx,8), %al
	movb	%al, 2(%r15)
	jmp	LBB0_12
LBB0_11:
	movq	_b64@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movl	(%r13), %edx
	andl	$252, %edx
	movb	(%rcx,%rdx,2), %cl
	movb	%cl, (%r15)
	movq	(%rax), %rax
	movl	(%r13), %ecx
	shll	$4, %ecx
	andl	$48, %ecx
	movb	(%rax,%rcx,8), %al
	movb	%al, 1(%r15)
	movb	$61, 2(%r15)
LBB0_12:
	movb	$61, 3(%r15)
	addq	$4, %r15
LBB0_13:
	movq	%r15, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_strcpy
	movq	_ERROR_SUCCESS@GOTPCREL(%rip), %rax
LBB0_14:
	movl	(%rax), %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bytes is %d, pad bytes is %d\n"

	.comm	_ERROR_INSUFFICIENT_BUFFER,4,2  ## @ERROR_INSUFFICIENT_BUFFER
	.comm	_b64,8,3                        ## @b64
	.comm	_ERROR_SUCCESS,4,2              ## @ERROR_SUCCESS
	.no_dead_strip	_encodeBase64A
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function encodeBase64A
_encodeBase64A:                         ; @encodeBase64A
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x24, x4
	mov	x21, x3
	mov	x19, x2
	mov	x23, x1
	mov	x20, x0
	mov	w8, #5
	bfi	w8, w1, #3, #29
	mov	w9, #43691
	movk	w9, #10922, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	lsr	x8, x8, #32
	add	w25, w8, w9
	negs	w8, w25
	and	w9, w25, #0x3
	and	w8, w8, #0x3
	csneg	w8, w9, w8, mi
	mov	w9, #4
	sub	w9, w9, w8
	cmp	w8, #0
	csel	w22, wzr, w9, eq
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x25
	mov	x2, x22
	bl	_TRACE
	add	w25, w22, w25
	add	w8, w25, #63
	cmp	w25, #0
	csel	w8, w8, w25, lt
	asr	w8, w8, #6
	tst	w25, #0x3f
	cinc	w26, w8, ne
	mov	x0, x19
	bl	_strlen
	madd	w8, w0, w26, w25
	add	w9, w8, #1
	ldr	w10, [x24]
	str	w9, [x24]
	cmp	w8, w10
	b.ge	LBB0_7
; %bb.1:
	cmp	w23, #3
	b.lt	LBB0_8
; %bb.2:
	mov	w24, #0
	mov	w8, #43691
	movk	w8, #43690, lsl #16
	umull	x8, w23, w8
	lsr	x8, x8, #33
	add	w23, w8, #1
Lloh2:
	adrp	x25, _b64@GOTPAGE
Lloh3:
	ldr	x25, [x25, _b64@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x25]
	ldr	w9, [x20]
	ubfx	x9, x9, #2, #6
	ldr	x8, [x8, x9, lsl #3]
	strb	w8, [x21]
	ldr	x8, [x25]
	ldp	w9, w10, [x20]
	lsl	w9, w9, #4
	and	x9, x9, #0x30
	bfxil	x9, x10, #4, #4
	ldr	x8, [x8, x9, lsl #3]
	strb	w8, [x21, #1]
	ldr	x8, [x25]
	ldp	w9, w10, [x20, #4]
	lsl	w9, w9, #2
	and	x9, x9, #0x3c
	bfxil	x9, x10, #6, #2
	ldr	x8, [x8, x9, lsl #3]
	strb	w8, [x21, #2]
	ldr	x8, [x25]
	ldr	w9, [x20, #8]
	and	x9, x9, #0x3f
	ldr	x8, [x8, x9, lsl #3]
	strb	w8, [x21, #3]
	add	x21, x21, #4
	add	w24, w24, #4
	add	x20, x20, #12
	sub	w23, w23, #1
	cmp	w23, #1
	b.le	LBB0_8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	cbz	w24, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	and	w8, w24, #0x3c
	cbnz	w8, LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	mov	x1, x19
	bl	_strcpy
	mov	x0, x19
	bl	_strlen
	add	x21, x21, w0, sxtw
	b	LBB0_3
LBB0_7:
Lloh4:
	adrp	x8, _ERROR_INSUFFICIENT_BUFFER@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ERROR_INSUFFICIENT_BUFFER@GOTPAGEOFF]
	b	LBB0_14
LBB0_8:
	cmp	w22, #2
	b.eq	LBB0_11
; %bb.9:
	cmp	w22, #1
	b.ne	LBB0_13
; %bb.10:
Lloh6:
	adrp	x8, _b64@GOTPAGE
Lloh7:
	ldr	x8, [x8, _b64@GOTPAGEOFF]
	ldr	x9, [x8]
	ldr	w10, [x20]
	ubfx	x10, x10, #2, #6
	ldr	x9, [x9, x10, lsl #3]
	strb	w9, [x21]
	ldr	x9, [x8]
	ldp	w10, w11, [x20]
	lsl	w10, w10, #4
	and	x10, x10, #0x30
	bfxil	x10, x11, #4, #4
	ldr	x9, [x9, x10, lsl #3]
	strb	w9, [x21, #1]
	ldr	x8, [x8]
	ldr	w9, [x20, #4]
	lsl	w9, w9, #2
	and	x9, x9, #0x3c
	ldr	x8, [x8, x9, lsl #3]
	strb	w8, [x21, #2]
	b	LBB0_12
LBB0_11:
Lloh8:
	adrp	x8, _b64@GOTPAGE
Lloh9:
	ldr	x8, [x8, _b64@GOTPAGEOFF]
	ldr	x9, [x8]
	ldr	w10, [x20]
	ubfx	x10, x10, #2, #6
	ldr	x9, [x9, x10, lsl #3]
	strb	w9, [x21]
	ldr	x8, [x8]
	ldr	w9, [x20]
	lsl	w9, w9, #4
	and	x9, x9, #0x30
	ldr	x8, [x8, x9, lsl #3]
	strb	w8, [x21, #1]
	mov	w8, #61
	strb	w8, [x21, #2]
LBB0_12:
	mov	w8, #61
	strb	w8, [x21, #3]
	add	x21, x21, #4
LBB0_13:
	mov	x0, x21
	mov	x1, x19
	bl	_strcpy
Lloh10:
	adrp	x8, _ERROR_SUCCESS@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ERROR_SUCCESS@GOTPAGEOFF]
LBB0_14:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bytes is %d, pad bytes is %d\n"

	.comm	_ERROR_INSUFFICIENT_BUFFER,4,2  ; @ERROR_INSUFFICIENT_BUFFER
	.comm	_b64,8,3                        ; @b64
	.comm	_ERROR_SUCCESS,4,2              ; @ERROR_SUCCESS
	.no_dead_strip	_encodeBase64A
.subsections_via_symbols
