	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function php_conv_base64_encode_flush
_php_conv_base64_encode_flush:          ## @php_conv_base64_encode_flush
	.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	%r8, %r14
	movq	%rcx, %r15
	movq	%rdi, %rbx
	movq	_PHP_CONV_ERR_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
	movq	(%rcx), %r12
	movq	(%r8), %r13
	movl	(%rdi), %eax
	movl	4(%rdi), %ecx
	testl	%ecx, %ecx
	je	LBB0_21
## %bb.1:
	cmpl	$2, %ecx
	je	LBB0_7
## %bb.2:
	cmpl	$1, %ecx
	jne	LBB0_11
## %bb.3:
	cmpl	$3, %eax
	ja	LBB0_13
## %bb.4:
	movq	32(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_13
## %bb.5:
	movq	8(%rbx), %rdx
	cmpq	%rdx, %r13
	jb	LBB0_6
## %bb.12:
	movq	%r12, %rdi
	callq	_memcpy
	movq	8(%rbx), %rax
	addq	%rax, %r12
	subq	%rax, %r13
	movl	16(%rbx), %eax
LBB0_13:
	cmpq	$3, %r13
	jbe	LBB0_17
## %bb.14:
	movq	_b64_tbl_enc@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movq	24(%rbx), %rsi
	movl	(%rsi), %esi
	sarl	$2, %esi
	movslq	%esi, %rsi
	movb	(%rdx,%rsi,8), %dl
	movb	%dl, (%r12)
	movq	(%rcx), %rcx
	movq	24(%rbx), %rdx
	movl	(%rdx), %edx
	shll	$4, %edx
	movzbl	%dl, %edx
	movb	(%rcx,%rdx,8), %cl
	movb	%cl, 1(%r12)
	movw	$15677, 2(%r12)                 ## imm = 0x3D3D
	jmp	LBB0_20
LBB0_7:
	cmpl	$3, %eax
	ja	LBB0_16
## %bb.8:
	movq	32(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_16
## %bb.9:
	movq	8(%rbx), %rdx
	cmpq	%rdx, %r13
	jae	LBB0_15
LBB0_6:
	movq	_PHP_CONV_ERR_TOO_BIG@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_11:
	movq	_PHP_CONV_ERR_UNKNOWN@GOTPCREL(%rip), %rcx
	jmp	LBB0_18
LBB0_15:
	movq	%r12, %rdi
	callq	_memcpy
	movq	8(%rbx), %rax
	addq	%rax, %r12
	subq	%rax, %r13
	movl	16(%rbx), %eax
LBB0_16:
	cmpq	$3, %r13
	ja	LBB0_19
LBB0_17:
	movq	_PHP_CONV_ERR_TOO_BIG@GOTPCREL(%rip), %rcx
LBB0_18:
	movl	(%rcx), %ecx
	movl	%ecx, -44(%rbp)
	jmp	LBB0_21
LBB0_19:
	movq	_b64_tbl_enc@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movq	24(%rbx), %rsi
	movl	(%rsi), %esi
	sarl	$2, %esi
	movslq	%esi, %rsi
	movb	(%rdx,%rsi,8), %dl
	movb	%dl, (%r12)
	movq	(%rcx), %rdx
	movq	24(%rbx), %rsi
	movl	(%rsi), %edi
	movl	4(%rsi), %esi
	shll	$4, %edi
	movzbl	%dil, %edi
	sarl	$4, %esi
	movslq	%esi, %rsi
	orq	%rdi, %rsi
	movb	(%rdx,%rsi,8), %dl
	movb	%dl, 1(%r12)
	movq	(%rcx), %rcx
	movq	24(%rbx), %rdx
	movl	4(%rdx), %edx
	shll	$2, %edx
	movzbl	%dl, %edx
	movb	(%rcx,%rdx,8), %cl
	movb	%cl, 2(%r12)
	movb	$61, 3(%r12)
LBB0_20:
	addq	$4, %r12
	movl	$0, 4(%rbx)
	addq	$-4, %r13
	addl	$-4, %eax
LBB0_21:
	movq	%r12, (%r15)
	movq	%r13, (%r14)
	movl	%eax, (%rbx)
	leaq	-44(%rbp), %rax
LBB0_22:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PHP_CONV_ERR_SUCCESS,4,2       ## @PHP_CONV_ERR_SUCCESS
	.comm	_PHP_CONV_ERR_TOO_BIG,4,2       ## @PHP_CONV_ERR_TOO_BIG
	.comm	_b64_tbl_enc,8,3                ## @b64_tbl_enc
	.comm	_PHP_CONV_ERR_UNKNOWN,4,2       ## @PHP_CONV_ERR_UNKNOWN
	.no_dead_strip	_php_conv_base64_encode_flush
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function php_conv_base64_encode_flush
_php_conv_base64_encode_flush:          ; @php_conv_base64_encode_flush
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x20, x4
	mov	x21, x3
	mov	x19, x0
Lloh0:
	adrp	x8, _PHP_CONV_ERR_SUCCESS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PHP_CONV_ERR_SUCCESS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #12]
	ldr	x22, [x3]
	ldr	x23, [x4]
	ldp	w8, w9, [x0]
	cbz	w9, LBB0_20
; %bb.1:
	cmp	w9, #2
	b.eq	LBB0_9
; %bb.2:
	cmp	w9, #1
	b.ne	LBB0_13
; %bb.3:
	cmp	w8, #3
	b.hi	LBB0_7
; %bb.4:
	ldr	x1, [x19, #32]
	cbz	x1, LBB0_7
; %bb.5:
	ldr	x2, [x19, #8]
	cmp	x23, x2
	b.lo	LBB0_12
; %bb.6:
	mov	x0, x22
	bl	_memcpy
	ldr	x8, [x19, #8]
	add	x22, x22, x8
	sub	x23, x23, x8
	ldr	w8, [x19, #16]
LBB0_7:
	cmp	x23, #3
	b.ls	LBB0_16
; %bb.8:
Lloh3:
	adrp	x9, _b64_tbl_enc@GOTPAGE
Lloh4:
	ldr	x9, [x9, _b64_tbl_enc@GOTPAGEOFF]
	ldr	x10, [x9]
	ldr	x11, [x19, #24]
	ldr	w11, [x11]
	asr	w11, w11, #2
	ldr	x10, [x10, w11, sxtw #3]
	strb	w10, [x22]
	ldr	x9, [x9]
	ldr	x10, [x19, #24]
	ldr	w10, [x10]
	lsl	w10, w10, #4
	and	x10, x10, #0xf0
	ldr	x9, [x9, x10, lsl #3]
	strb	w9, [x22, #1]
	mov	w9, #15677
	strh	w9, [x22, #2]
	b	LBB0_19
LBB0_9:
	cmp	w8, #3
	b.hi	LBB0_15
; %bb.10:
	ldr	x1, [x19, #32]
	cbz	x1, LBB0_15
; %bb.11:
	ldr	x2, [x19, #8]
	cmp	x23, x2
	b.hs	LBB0_14
LBB0_12:
Lloh5:
	adrp	x9, _PHP_CONV_ERR_TOO_BIG@GOTPAGE
Lloh6:
	ldr	x9, [x9, _PHP_CONV_ERR_TOO_BIG@GOTPAGEOFF]
	b	LBB0_21
LBB0_13:
Lloh7:
	adrp	x9, _PHP_CONV_ERR_UNKNOWN@GOTPAGE
Lloh8:
	ldr	x9, [x9, _PHP_CONV_ERR_UNKNOWN@GOTPAGEOFF]
	b	LBB0_17
LBB0_14:
	mov	x0, x22
	bl	_memcpy
	ldr	x8, [x19, #8]
	add	x22, x22, x8
	sub	x23, x23, x8
	ldr	w8, [x19, #16]
LBB0_15:
	cmp	x23, #3
	b.hi	LBB0_18
LBB0_16:
Lloh9:
	adrp	x9, _PHP_CONV_ERR_TOO_BIG@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PHP_CONV_ERR_TOO_BIG@GOTPAGEOFF]
LBB0_17:
	ldr	w9, [x9]
	str	w9, [sp, #12]
	b	LBB0_20
LBB0_18:
Lloh11:
	adrp	x9, _b64_tbl_enc@GOTPAGE
Lloh12:
	ldr	x9, [x9, _b64_tbl_enc@GOTPAGEOFF]
	ldr	x10, [x9]
	ldr	x11, [x19, #24]
	ldr	w11, [x11]
	asr	w11, w11, #2
	ldr	x10, [x10, w11, sxtw #3]
	strb	w10, [x22]
	ldr	x10, [x9]
	ldr	x11, [x19, #24]
	ldp	w12, w11, [x11]
	ubfiz	w12, w12, #4, #4
	orr	w11, w12, w11, asr #4
	ldr	x10, [x10, w11, sxtw #3]
	strb	w10, [x22, #1]
	ldr	x9, [x9]
	ldr	x10, [x19, #24]
	ldr	w10, [x10, #4]
	lsl	w10, w10, #2
	and	x10, x10, #0xfc
	ldr	x9, [x9, x10, lsl #3]
	strb	w9, [x22, #2]
	mov	w9, #61
	strb	w9, [x22, #3]
LBB0_19:
	add	x22, x22, #4
	str	wzr, [x19, #4]
	sub	x23, x23, #4
	sub	w8, w8, #4
LBB0_20:
	str	x22, [x21]
	str	x23, [x20]
	add	x9, sp, #12
	str	w8, [x19]
LBB0_21:
	ldr	w0, [x9]
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_PHP_CONV_ERR_SUCCESS,4,2       ; @PHP_CONV_ERR_SUCCESS
	.comm	_PHP_CONV_ERR_TOO_BIG,4,2       ; @PHP_CONV_ERR_TOO_BIG
	.comm	_b64_tbl_enc,8,3                ; @b64_tbl_enc
	.comm	_PHP_CONV_ERR_UNKNOWN,4,2       ; @PHP_CONV_ERR_UNKNOWN
	.no_dead_strip	_php_conv_base64_encode_flush
.subsections_via_symbols
