	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function b64enc
_b64enc:                                ## @b64enc
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_strlen
	movq	%rax, %rbx
	movq	_SIZE_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	-1(%rax), %ecx
	addl	$2, %eax
	testl	%ecx, %ecx
	cmovnsl	%ecx, %eax
	sarl	$2, %eax
	leal	(%rax,%rax,2), %eax
	addl	$-2, %eax
	cltq
	cmpq	%rax, %rbx
	ja	LBB0_16
## %bb.2:
	leaq	2(%rbx), %rax
	movabsq	$-6148914691236517205, %rcx     ## imm = 0xAAAAAAAAAAAAAAAB
	mulq	%rcx
	movq	%rdx, %r15
	addq	%rdx, %r15
	andq	$-4, %r15
	leaq	1(%r15), %rdi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_16
## %bb.3:
	movb	$0, (%rax,%r15)
	testq	%rbx, %rbx
	je	LBB0_17
## %bb.4:
	movq	%rax, %rcx
	addq	$3, %rcx
	leaq	_b64enc.base64(%rip), %r8
	jmp	LBB0_7
LBB0_16:
	xorl	%eax, %eax
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:                                 ##   in Loop: Header=BB0_7 Depth=1
	movw	$15677, -2(%rcx)                ## imm = 0x3D3D
	movb	$61, %dl
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_7 Depth=1
	movb	%dl, (%rcx)
	leaq	-3(%rbx), %rdx
	addq	$4, %rcx
	cmpq	$3, %rbx
	movq	%rdx, %rbx
	jbe	LBB0_17
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%r14), %edx
	cmpq	$1, %rbx
	jbe	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	shll	$8, %edx
	movsbl	1(%r14), %esi
	addl	%edx, %esi
	shll	$8, %esi
	cmpq	$2, %rbx
	jne	LBB0_14
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	addq	$2, %r14
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	incq	%r14
	shll	$16, %edx
	movl	%edx, %esi
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=1
	leaq	1(%rbx), %rdi
	movl	%esi, %edx
	shrl	$18, %edx
	andl	$63, %edx
	movzbl	(%rdx,%r8), %edx
	movb	%dl, -3(%rcx)
LBB0_12:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	%esi, %edx
	shrl	$12, %edx
	andl	$63, %edx
	movzbl	(%rdx,%r8), %edx
	movb	%dl, -2(%rcx)
	movl	%esi, %edx
	shrl	$6, %edx
	andl	$63, %edx
	movzbl	(%rdx,%r8), %edx
	movb	%dl, -1(%rcx)
	movb	$61, %dl
	cmpq	$3, %rdi
	jb	LBB0_6
## %bb.13:                              ##   in Loop: Header=BB0_7 Depth=1
	andl	$63, %esi
	movzbl	(%rsi,%r8), %edx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_7 Depth=1
	movsbl	2(%r14), %edx
	addq	$3, %r14
	addl	%edx, %esi
	movl	%esi, %edx
	shrl	$18, %edx
	andl	$63, %edx
	movzbl	(%rdx,%r8), %edx
	movb	%dl, -3(%rcx)
	cmpq	$-1, %rbx
	je	LBB0_5
## %bb.15:                              ##   in Loop: Header=BB0_7 Depth=1
	leaq	1(%rbx), %rdi
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
	.p2align	4                               ## @b64enc.base64
_b64enc.base64:
	.asciz	"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"

	.comm	_SIZE_MAX,4,2                   ## @SIZE_MAX
	.no_dead_strip	_b64enc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function b64enc
_b64enc:                                ; @b64enc
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x0
	bl	_strlen
Lloh0:
	adrp	x8, _SIZE_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SIZE_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	sub	w9, w8, #1
	add	w8, w8, #2
	cmp	w9, #0
	csel	w8, w8, w9, lt
	asr	w8, w8, #2
	add	w8, w8, w8, lsl #1
	sub	w8, w8, #2
	cmp	x0, w8, sxtw
	b.ls	LBB0_2
; %bb.1:
	mov	x0, #0
	b	LBB0_16
LBB0_2:
	mov	x19, x0
	add	x8, x0, #2
	mov	x9, #-6148914691236517206
	movk	x9, #43691
	umulh	x21, x8, x9
	lsr	x8, x21, #1
	mov	w0, #1
	bfi	x0, x8, #2, #62
	bl	_malloc
	cbz	x0, LBB0_16
; %bb.3:
	lsl	x8, x21, #1
	and	x8, x8, #0xfffffffffffffffc
	strb	wzr, [x0, x8]
	cbz	x19, LBB0_16
; %bb.4:
	add	x8, x0, #2
Lloh3:
	adrp	x9, _b64enc.base64@PAGE
Lloh4:
	add	x9, x9, _b64enc.base64@PAGEOFF
	mov	w10, #15677
	b	LBB0_8
LBB0_5:                                 ;   in Loop: Header=BB0_8 Depth=1
	sturh	w10, [x8, #-1]
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	mov	w11, #61
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	strb	w11, [x8, #1]
	add	x8, x8, #4
	subs	x19, x19, #3
	b.ls	LBB0_16
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	mov	x12, x20
	ldrb	w11, [x12], #1
	cmp	x19, #1
	b.ls	LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldrsb	w12, [x20, #1]
	add	w11, w12, w11, lsl #8
	lsl	w11, w11, #8
	cmp	x19, #2
	b.ne	LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	add	x20, x20, #2
	b	LBB0_13
LBB0_11:                                ;   in Loop: Header=BB0_8 Depth=1
	lsl	w11, w11, #16
	mov	x20, x12
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_8 Depth=1
	ldrsb	w12, [x20, #2]
	add	x20, x20, #3
	add	w11, w11, w12
LBB0_13:                                ;   in Loop: Header=BB0_8 Depth=1
	ubfx	x12, x11, #18, #6
	ldrb	w12, [x9, x12]
	sturb	w12, [x8, #-2]
	adds	x12, x19, #1
	b.hs	LBB0_5
; %bb.14:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	x13, x11
	ubfx	x14, x13, #12, #6
	ldrb	w14, [x9, x14]
	sturb	w14, [x8, #-1]
	ubfx	x13, x13, #6, #6
	ldrb	w13, [x9, x13]
	strb	w13, [x8]
	cmp	x12, #3
	b.lo	LBB0_6
; %bb.15:                               ;   in Loop: Header=BB0_8 Depth=1
                                        ; kill: def $w11 killed $w11 killed $x11 def $x11
	and	x11, x11, #0x3f
	ldrb	w11, [x9, x11]
	b	LBB0_7
LBB0_16:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
_b64enc.base64:                         ; @b64enc.base64
	.asciz	"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"

	.comm	_SIZE_MAX,4,2                   ; @SIZE_MAX
	.no_dead_strip	_b64enc
.subsections_via_symbols
