	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ptls_base64_encode             ## -- Begin function ptls_base64_encode
	.p2align	4, 0x90
_ptls_base64_encode:                    ## @ptls_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r12
	xorl	%eax, %eax
	cmpq	$3, %rsi
	jb	LBB0_1
## %bb.2:
	xorl	%r15d, %r15d
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	leaq	(%r14,%r13), %rsi
	movq	%rbx, %rdi
	callq	_ptls_base64_cell
	addq	$4, %r13
	addq	$12, %rbx
	leaq	(%r12,%r15), %rax
	addq	$-3, %rax
	addq	$-3, %r15
	cmpq	$2, %rax
	ja	LBB0_3
## %bb.4:
	movl	%r15d, %eax
	negl	%eax
	addq	%r15, %r12
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_5
LBB0_1:
	xorl	%r13d, %r13d
LBB0_5:
	movl	%eax, %ecx
	movl	%r13d, %eax
	cmpq	$2, %r12
	je	LBB0_8
## %bb.6:
	cmpq	$1, %r12
	jne	LBB0_10
## %bb.7:
	movq	_ptls_base64_alphabet@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rsi
	movl	(%rdi,%rcx,4), %ebx
	sarl	$2, %ebx
	movslq	%ebx, %rbx
	movb	(%rsi,%rbx), %bl
	movb	%bl, (%r14,%rax)
	movq	%rax, %rsi
	orq	$1, %rsi
	movq	(%rdx), %rdx
	movl	(%rdi,%rcx,4), %ecx
	shll	$4, %ecx
	andl	$48, %ecx
	movb	(%rdx,%rcx), %cl
	movb	%cl, (%r14,%rsi)
	movb	$61, %cl
	jmp	LBB0_9
LBB0_8:
	movq	_ptls_base64_alphabet@GOTPCREL(%rip), %r8
	movq	(%r8), %rsi
	movl	(%rdi,%rcx,4), %edx
	sarl	$2, %edx
	movslq	%edx, %rdx
	movb	(%rsi,%rdx), %bl
	movb	%bl, (%r14,%rax)
	movq	%rax, %rsi
	orq	$1, %rsi
	movq	(%r8), %r9
	movl	(%rdi,%rcx,4), %ebx
	movl	4(%rdi,%rcx,4), %edx
	shll	$4, %ebx
	andl	$48, %ebx
	sarl	$4, %edx
	movslq	%edx, %rdx
	orq	%rbx, %rdx
	movb	(%r9,%rdx), %dl
	movb	%dl, (%r14,%rsi)
	movq	(%r8), %rdx
	movl	4(%rdi,%rcx,4), %ecx
	andl	$15, %ecx
	movb	(%rdx,%rcx,4), %cl
LBB0_9:
	movq	%rax, %rdx
	orq	$2, %rdx
	orq	$3, %rax
	movb	%cl, (%r14,%rdx)
	addl	$4, %r13d
	movb	$61, (%r14,%rax)
LBB0_10:
	movslq	%r13d, %rax
	incl	%r13d
	movb	$0, (%r14,%rax)
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ptls_base64_alphabet,8,3       ## @ptls_base64_alphabet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ptls_base64_encode             ; -- Begin function ptls_base64_encode
	.p2align	2
_ptls_base64_encode:                    ; @ptls_base64_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
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	cmp	x1, #3
	b.lo	LBB0_4
; %bb.1:
	mov	x24, #0
	mov	x23, #0
	mov	x22, x20
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, x19, x23
	mov	x0, x22
	bl	_ptls_base64_cell
	add	x23, x23, #4
	add	x22, x22, #12
	sub	x24, x24, #3
	add	x8, x21, x24
	cmp	x8, #2
	b.hi	LBB0_2
; %bb.3:
	neg	w9, w24
	mov	x21, x8
	b	LBB0_5
LBB0_4:
	mov	w9, #0
	mov	w23, #0
LBB0_5:
	mov	w8, w9
	cmp	x21, #2
	b.eq	LBB0_8
; %bb.6:
	cmp	x21, #1
	b.ne	LBB0_10
; %bb.7:
Lloh0:
	adrp	x9, _ptls_base64_alphabet@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ptls_base64_alphabet@GOTPAGEOFF]
	lsl	x8, x8, #2
	ldr	w10, [x20, x8]
	ldr	x11, [x9]
	asr	w10, w10, #2
	ldrb	w10, [x11, w10, sxtw]
	mov	w11, w23
	orr	x12, x11, #0x1
	strb	w10, [x19, x11]
	ldr	x9, [x9]
	ldr	w8, [x20, x8]
	lsl	w8, w8, #4
	and	x8, x8, #0x30
	ldrb	w8, [x9, x8]
	strb	w8, [x19, x12]
	mov	w8, #61
	b	LBB0_9
LBB0_8:
Lloh2:
	adrp	x9, _ptls_base64_alphabet@GOTPAGE
Lloh3:
	ldr	x9, [x9, _ptls_base64_alphabet@GOTPAGEOFF]
	lsl	x10, x8, #2
	ldr	w11, [x20, x10]
	ldr	x12, [x9]
	asr	w11, w11, #2
	ldrb	w11, [x12, w11, sxtw]
	mov	w12, w23
	orr	x13, x12, #0x1
	strb	w11, [x19, x12]
	ldr	x11, [x9]
	ldr	w10, [x20, x10]
	lsl	w10, w10, #4
	and	x10, x10, #0x30
	add	w8, w8, #1
	lsl	x8, x8, #2
	ldr	w12, [x20, x8]
	sbfx	x12, x12, #4, #28
	orr	x10, x10, x12
	ldrb	w10, [x11, x10]
	strb	w10, [x19, x13]
	ldr	x9, [x9]
	ldr	w8, [x20, x8]
	lsl	w8, w8, #2
	and	x8, x8, #0x3c
	ldrb	w8, [x9, x8]
LBB0_9:
	mov	w9, w23
	orr	x10, x9, #0x2
	orr	x9, x9, #0x3
	strb	w8, [x19, x10]
	add	w23, w23, #4
	mov	w8, #61
	strb	w8, [x19, x9]
LBB0_10:
	add	w0, w23, #1
	strb	wzr, [x19, w23, sxtw]
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_ptls_base64_alphabet,8,3       ; @ptls_base64_alphabet
.subsections_via_symbols
