	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function base64_gen_encode
_base64_gen_encode:                     ## @base64_gen_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_SIZE_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	3(%rax), %ebx
	testl	%eax, %eax
	cmovnsl	%eax, %ebx
	sarl	$2, %ebx
	movslq	%ebx, %rax
	cmpq	%rsi, %rax
	jbe	LBB0_5
## %bb.1:
	movl	%r8d, %r15d
	movq	%rcx, %r12
	movq	%rdx, %rcx
	movq	%rsi, %r14
	movq	%rdi, %r13
	leaq	(,%rsi,4), %rax
	movabsq	$-6148914691236517205, %rdx     ## imm = 0xAAAAAAAAAAAAAAAB
	mulq	%rdx
	movq	%rdx, %rdi
	shrq	%rdi
	addq	$4, %rdi
	testl	%r8d, %r8d
	je	LBB0_3
## %bb.2:
	movabsq	$-2049638230412172401, %rdx     ## imm = 0xE38E38E38E38E38F
	movq	%rdi, %rax
	mulq	%rdx
	shrq	$6, %rdx
	addq	%rdx, %rdi
LBB0_3:
	incq	%rdi
	cmpq	%r14, %rdi
	jb	LBB0_5
## %bb.7:
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	callq	_os_malloc
	xorl	%r9d, %r9d
	testq	%rax, %rax
	je	LBB0_5
## %bb.8:
	leaq	(%r14,%r13), %r8
	cmpq	$3, %r14
	jl	LBB0_16
## %bb.9:
	xorl	%r9d, %r9d
	movq	%rax, %rsi
	jmp	LBB0_12
LBB0_5:
	xorl	%eax, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_12 Depth=1
	movl	%ecx, %r9d
LBB0_11:                                ##   in Loop: Header=BB0_12 Depth=1
	addq	$-3, %r14
	leaq	3(%rdi), %r13
	cmpq	$2, %r14
	jle	LBB0_20
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	%rsi, %rdx
	movq	%r13, %rdi
	movzbl	(%r13), %ecx
	shrq	$2, %rcx
	movzbl	(%r12,%rcx), %ecx
	movb	%cl, (%rsi)
	movzbl	(%r13), %ecx
	movzbl	1(%r13), %ebx
	shrb	$4, %bl
	shlb	$4, %cl
	orb	%bl, %cl
	movzbl	%cl, %ecx
	andl	$63, %ecx
	movzbl	(%r12,%rcx), %ecx
	movb	%cl, 1(%rsi)
	movzbl	1(%r13), %ecx
	movzbl	2(%r13), %ebx
	shrb	$6, %bl
	shlb	$2, %cl
	orb	%bl, %cl
	movzbl	%cl, %ecx
	andl	$63, %ecx
	movzbl	(%r12,%rcx), %ecx
	movb	%cl, 2(%rsi)
	movzbl	2(%r13), %ebx
	andl	$63, %ebx
	addq	$4, %rsi
	leal	4(%r9), %ecx
	movzbl	(%r12,%rbx), %ebx
	movb	%bl, 3(%rdx)
	testl	%r15d, %r15d
	je	LBB0_10
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	cmpl	$68, %r9d
	movl	%ecx, %r9d
	jl	LBB0_11
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=1
	movb	$10, 4(%rdx)
	addq	$5, %rdx
	xorl	%r9d, %r9d
	movq	%rdx, %rsi
	jmp	LBB0_11
LBB0_16:
	movq	%rax, %rsi
	cmpq	%r13, %r8
	je	LBB0_21
LBB0_17:
	movzbl	(%r13), %ecx
	shrq	$2, %rcx
	movb	(%r12,%rcx), %cl
	movb	%cl, (%rsi)
	movzbl	(%r13), %edx
	cmpq	$1, %r14
	jne	LBB0_22
## %bb.18:
	shll	$4, %edx
	andl	$48, %edx
	movb	(%r12,%rdx), %cl
	movb	%cl, 1(%rsi)
	testl	%r15d, %r15d
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	je	LBB0_24
## %bb.19:
	movb	$61, 2(%rsi)
	jmp	LBB0_23
LBB0_20:
	addq	$3, %rdi
	movq	%rdi, %r13
	cmpq	%r13, %r8
	jne	LBB0_17
LBB0_21:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	jmp	LBB0_27
LBB0_22:
	movb	1(%r13), %cl
	shrb	$4, %cl
	shlb	$4, %dl
	orb	%cl, %dl
	movzbl	%dl, %ecx
	andl	$63, %ecx
	movb	(%r12,%rcx), %cl
	movb	%cl, 1(%rsi)
	movzbl	1(%r13), %ecx
	andl	$15, %ecx
	movb	(%r12,%rcx,4), %cl
	movb	%cl, 2(%rsi)
	testl	%r15d, %r15d
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	je	LBB0_25
LBB0_23:
	movb	$61, 3(%rsi)
	addq	$4, %rsi
	jmp	LBB0_26
LBB0_24:
	addq	$2, %rsi
	jmp	LBB0_26
LBB0_25:
	addq	$3, %rsi
LBB0_26:
	addl	$4, %r9d
LBB0_27:
	testl	%r15d, %r15d
	je	LBB0_30
## %bb.28:
	testl	%r9d, %r9d
	je	LBB0_30
## %bb.29:
	movb	$10, (%rsi)
	incq	%rsi
LBB0_30:
	movb	$0, (%rsi)
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.31:
	subq	%rax, %rsi
	movq	%rsi, (%rcx)
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_SIZE_MAX,4,2                   ## @SIZE_MAX
	.no_dead_strip	_base64_gen_encode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function base64_gen_encode
_base64_gen_encode:                     ; @base64_gen_encode
	.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
Lloh0:
	adrp	x8, _SIZE_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SIZE_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	sbfx	x8, x8, #2, #30
	cmp	x8, x1
	b.ls	LBB0_2
; %bb.1:
	mov	x20, x4
	mov	x23, x1
	mov	x22, x0
	lsl	x8, x1, #2
	mov	x9, #-6148914691236517206
	movk	x9, #43691
	umulh	x8, x8, x9
	lsr	x8, x8, #1
	add	x8, x8, #4
	mov	x9, #58255
	movk	x9, #36408, lsl #16
	movk	x9, #14563, lsl #32
	movk	x9, #58254, lsl #48
	umulh	x9, x8, x9
	add	x9, x8, x9, lsr #6
	cmp	w4, #0
	csel	x8, x8, x9, eq
	add	x0, x8, #1
	cmp	x0, x1
	b.hs	LBB0_4
LBB0_2:
	mov	x0, #0
LBB0_3:
	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_4:
	mov	x21, x3
	mov	x19, x2
	bl	_os_malloc
	cbz	x0, LBB0_3
; %bb.5:
	add	x10, x22, x23
	cmp	x23, #3
	b.lt	LBB0_12
; %bb.6:
	mov	w8, #0
	mov	w11, #10
	mov	x9, x0
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=1
	mov	x8, x13
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x22, x22, #3
	sub	x23, x23, #3
	cmp	x23, #2
	b.le	LBB0_13
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	x12, x9
	ldrb	w9, [x22]
	lsr	x9, x9, #2
	ldrb	w9, [x21, x9]
	strb	w9, [x12]
	ldrb	w9, [x22]
	ldrb	w13, [x22, #1]
	lsl	w13, w13, #24
	extr	w9, w9, w13, #28
	and	x9, x9, #0x3f
	ldrb	w9, [x21, x9]
	strb	w9, [x12, #1]
	ldrb	w9, [x22, #1]
	ldrb	w13, [x22, #2]
	lsl	w13, w13, #24
	extr	w9, w9, w13, #30
	and	x9, x9, #0x3f
	ldrb	w9, [x21, x9]
	strb	w9, [x12, #2]
	ldrb	w9, [x22, #2]
	and	x9, x9, #0x3f
	ldrb	w13, [x21, x9]
	add	x9, x12, #4
	strb	w13, [x12, #3]
	add	w13, w8, #4
	cbz	w20, LBB0_7
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	cmp	w8, #68
	mov	x8, x13
	b.lt	LBB0_8
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	w8, #0
	add	x9, x12, #5
	strb	w11, [x12, #4]
	b	LBB0_8
LBB0_12:
	mov	w8, #0
	mov	x9, x0
LBB0_13:
	cmp	x10, x22
	b.eq	LBB0_22
; %bb.14:
	ldrb	w10, [x22]
	lsr	x10, x10, #2
	ldrb	w10, [x21, x10]
	strb	w10, [x9]
	ldrb	w10, [x22]
	cmp	x23, #1
	b.ne	LBB0_17
; %bb.15:
	lsl	w10, w10, #4
	and	x10, x10, #0x30
	ldrb	w10, [x21, x10]
	strb	w10, [x9, #1]
	cbz	w20, LBB0_19
; %bb.16:
	mov	w10, #61
	strb	w10, [x9, #2]
	b	LBB0_18
LBB0_17:
	ldrb	w11, [x22, #1]
	lsl	w11, w11, #24
	extr	w10, w10, w11, #28
	and	x10, x10, #0x3f
	ldrb	w10, [x21, x10]
	strb	w10, [x9, #1]
	ldrb	w10, [x22, #1]
	lsl	w10, w10, #2
	and	x10, x10, #0x3c
	ldrb	w10, [x21, x10]
	strb	w10, [x9, #2]
	cbz	w20, LBB0_20
LBB0_18:
	mov	w10, #61
	strb	w10, [x9, #3]
	add	x9, x9, #4
	b	LBB0_21
LBB0_19:
	add	x9, x9, #2
	b	LBB0_21
LBB0_20:
	add	x9, x9, #3
LBB0_21:
	add	w8, w8, #4
LBB0_22:
	cbz	w20, LBB0_25
; %bb.23:
	cbz	w8, LBB0_25
; %bb.24:
	mov	w8, #10
	strb	w8, [x9], #1
LBB0_25:
	strb	wzr, [x9]
	cbz	x19, LBB0_3
; %bb.26:
	sub	x8, x9, x0
	str	x8, [x19]
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SIZE_MAX,4,2                   ; @SIZE_MAX
	.no_dead_strip	_base64_gen_encode
.subsections_via_symbols
