	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_base64_encode                  ## -- Begin function base64_encode
	.p2align	4, 0x90
_base64_encode:                         ## @base64_encode
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	movl	$0, -48(%rbp)
	testl	%esi, %esi
	jle	LBB0_1
## %bb.2:
	movl	%esi, %ebx
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movslq	%ecx, %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	xorl	%r13d, %r13d
	movl	%esi, -56(%rbp)                 ## 4-byte Spill
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, -88(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	movl	%ebx, %esi
	leaq	-48(%rbp), %r14
	movq	%r14, %rdx
	callq	_next_input_uchar
	movl	%eax, %r15d
	movq	%r12, %rdi
	movl	%ebx, %esi
	movq	%r14, %rdx
	callq	_next_input_uchar
	movl	%eax, %r14d
	shll	$16, %r15d
	shll	$8, %r14d
	orl	%r15d, %r14d
	movq	%r12, %rdi
	movl	%ebx, %esi
	leaq	-48(%rbp), %rdx
	callq	_next_input_uchar
	movl	%eax, %ebx
	orl	%eax, %r14d
	movl	-48(%rbp), %r15d
	subl	%r13d, %r15d
	leal	-1(%r15), %eax
	xorl	%edi, %edi
	cmpl	$3, %eax
	setb	%dil
	callq	_assert
	movq	_symbols64@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	andl	$63, %ebx
	movzbl	(%rax,%rbx), %ecx
	movb	%cl, -41(%rbp)
	movl	%r14d, %ecx
	shrl	$6, %ecx
	andl	$63, %ecx
	movzbl	(%rax,%rcx), %ecx
	movb	%cl, -42(%rbp)
	movl	%r14d, %ecx
	shrl	$12, %ecx
	andl	$63, %ecx
	movzbl	(%rax,%rcx), %ecx
	movb	%cl, -43(%rbp)
	shrl	$18, %r14d
	andl	$63, %r14d
	movzbl	(%rax,%r14), %eax
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	movb	%al, -44(%rbp)
	leaq	-41(%rbp), %rax
	cmpl	$2, %r15d
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$1, %r15d
	jne	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movb	$61, -41(%rbp)
	leaq	-42(%rbp), %rax
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movb	$61, (%rax)
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	leaq	3(%r14), %rax
	cmpq	-72(%rbp), %rax                 ## 8-byte Folded Reload
	jge	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r14), %rdi
	leaq	-44(%rbp), %rsi
	movl	$4, %edx
	callq	_memcpy
	addq	$4, %r14
	movl	-48(%rbp), %r13d
	movl	-56(%rbp), %ebx                 ## 4-byte Reload
	cmpl	%ebx, %r13d
	jl	LBB0_3
## %bb.10:
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	jmp	LBB0_11
LBB0_1:
	xorl	%r14d, %r14d
LBB0_11:
	movl	$-1, %eax
	cmpl	%ecx, %r14d
	jge	LBB0_13
## %bb.12:
	movl	%r14d, %eax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movb	$0, (%rcx,%rax)
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_8:
	movl	$-1, %eax
LBB0_13:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_symbols64,8,3                  ## @symbols64
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_base64_encode                  ; -- Begin function base64_encode
	.p2align	2
_base64_encode:                         ; @base64_encode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
                                        ; kill: def $w3 killed $w3 def $x3
	mov	x19, x2
	str	wzr, [sp, #28]
	cmp	w1, #1
	b.lt	LBB0_10
; %bb.1:
	mov	x21, x1
	mov	x22, x0
	mov	x24, #0
	mov	w26, #0
	add	x8, sp, #24
	add	x25, x8, #3
	add	x8, x8, #2
	stp	x3, x8, [sp, #8]                ; 16-byte Folded Spill
	sxtw	x27, w3
	mov	w20, #61
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	x2, sp, #28
	mov	x0, x22
	mov	x1, x21
	bl	_next_input_uchar
	mov	x23, x0
	add	x2, sp, #28
	mov	x0, x22
	mov	x1, x21
	bl	_next_input_uchar
	lsl	w8, w0, #8
	orr	w28, w8, w23, lsl #16
	add	x2, sp, #28
	mov	x0, x22
	mov	x1, x21
	bl	_next_input_uchar
	mov	x23, x0
	orr	w28, w28, w0
	ldr	w8, [sp, #28]
	sub	w26, w8, w26
	sub	w8, w26, #1
	cmp	w8, #3
	cset	w0, lo
	bl	_assert
Lloh0:
	adrp	x8, _symbols64@GOTPAGE
Lloh1:
	ldr	x8, [x8, _symbols64@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	and	x9, x23, #0x3f
	ldrb	w9, [x8, x9]
	strb	w9, [sp, #27]
	ubfx	x9, x28, #6, #6
	ldrb	w9, [x8, x9]
	strb	w9, [sp, #26]
	ubfx	x9, x28, #12, #6
	ldrb	w9, [x8, x9]
	strb	w9, [sp, #25]
	ubfx	x9, x28, #18, #6
	ldrb	w8, [x8, x9]
	strb	w8, [sp, #24]
	mov	x8, x25
	cmp	w26, #2
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w26, #1
	b.ne	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	strb	w20, [sp, #27]
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	strb	w20, [x8]
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	add	x8, x24, #3
	cmp	x8, x27
	b.ge	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x0, x19, x24
	add	x1, sp, #24
	mov	w2, #4
	bl	_memcpy
	add	x24, x24, #4
	ldr	w26, [sp, #28]
	cmp	w26, w21
	b.lt	LBB0_2
; %bb.8:
	ldr	x3, [sp, #8]                    ; 8-byte Folded Reload
	cmp	w24, w3
	b.lt	LBB0_11
LBB0_9:
	mov	w0, #-1
	b	LBB0_12
LBB0_10:
	mov	w24, #0
	cmp	w24, w3
	b.ge	LBB0_9
LBB0_11:
	mov	w0, #0
	strb	wzr, [x19, w24, uxtw]
LBB0_12:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_symbols64,8,3                  ; @symbols64
.subsections_via_symbols
