	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_openvpn_base64_encode          ## -- Begin function openvpn_base64_encode
	.p2align	4, 0x90
_openvpn_base64_encode:                 ## @openvpn_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testl	%esi, %esi
	js	LBB0_13
## %bb.1:
	movq	%rdx, %r14
	movl	%esi, %r15d
	movq	%rdi, %r12
	leal	(,%r15,4), %eax
	cltq
	imulq	$1431655766, %rax, %rax         ## imm = 0x55555556
	movq	%rax, %rcx
	shrq	$32, %rcx
	shrq	$63, %rax
	leal	(%rcx,%rax), %edi
	addl	$4, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_13
## %bb.2:
	testl	%r15d, %r15d
	je	LBB0_3
## %bb.4:
	movl	%r15d, %r15d
	movl	$1, %edx
	movq	_base64_chars@GOTPCREL(%rip), %r9
	movl	$61, %r8d
	movq	%rax, %rsi
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	addq	$4, %rsi
	addq	$3, %rdx
	cmpq	%r15, %r11
	jae	LBB0_12
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	-1(%r12,%rdx), %ecx
	shll	$8, %ecx
	cmpq	%r15, %rdx
	jae	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movzbl	(%r12,%rdx), %edi
	orl	%edi, %ecx
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	leaq	1(%rdx), %r10
	shll	$8, %ecx
	cmpq	%r15, %r10
	jae	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movzbl	1(%r12,%rdx), %edi
	orl	%edi, %ecx
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	leaq	2(%rdx), %r11
	movq	(%r9), %rdi
	movl	%ecx, %ebx
	shrl	$18, %ebx
	movzbl	(%rdi,%rbx), %ebx
	movb	%bl, (%rsi)
	movq	(%r9), %rdi
	movl	%ecx, %ebx
	shrl	$12, %ebx
	andl	$63, %ebx
	movzbl	(%rdi,%rbx), %ebx
	movb	%bl, 1(%rsi)
	movq	(%r9), %rdi
	movl	%ecx, %ebx
	shrl	$6, %ebx
	andl	$63, %ebx
	movzbl	(%rdi,%rbx), %ebx
	movb	%bl, 2(%rsi)
	movq	(%r9), %rdi
	andl	$63, %ecx
	cmpq	%r15, %r11
	movzbl	(%rdi,%rcx), %ecx
	cmoval	%r8d, %ecx
	movb	%cl, 3(%rsi)
	cmpq	%r15, %r10
	jbe	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movb	$61, 2(%rsi)
	jmp	LBB0_11
LBB0_13:
	movl	$-1, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%rax, %rsi
LBB0_12:
	movb	$0, (%rsi)
	movq	%rax, (%r14)
	movq	%rax, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_strlen                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_base64_chars,8,3               ## @base64_chars
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_openvpn_base64_encode          ; -- Begin function openvpn_base64_encode
	.p2align	2
_openvpn_base64_encode:                 ; @openvpn_base64_encode
	.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
	tbnz	w1, #31, LBB0_11
; %bb.1:
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	lsl	w8, w1, #2
	mov	w9, #21846
	movk	w9, #21845, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	lsr	x8, x8, #32
	add	w8, w8, w9
	add	w0, w8, #4
	bl	_malloc
	cbz	x0, LBB0_11
; %bb.2:
	cbz	w21, LBB0_12
; %bb.3:
	mov	w8, #1
Lloh0:
	adrp	x10, _base64_chars@GOTPAGE
Lloh1:
	ldr	x10, [x10, _base64_chars@GOTPAGEOFF]
	mov	w11, #61
	mov	x9, x0
	mov	w12, w21
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x9, x9, #4
	add	x8, x8, #3
	cmp	x14, x12
	b.hs	LBB0_13
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	x13, x20, x8
	ldurb	w13, [x13, #-1]
	lsl	w14, w13, #8
	cmp	x8, x12
	b.hs	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldrb	w13, [x20, x8]
	orr	w14, w14, w13
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x13, x8, #1
	lsl	w15, w14, #8
	cmp	x13, x12
	b.hs	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x14, x20, x8
	ldrb	w14, [x14, #1]
	orr	w15, w15, w14
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x14, x8, #2
	ldr	x16, [x10]
	lsr	w17, w15, #18
	ldrb	w16, [x16, w17, uxtw]
	strb	w16, [x9]
	ldr	x16, [x10]
	ubfx	x17, x15, #12, #6
	ldrb	w16, [x16, x17]
	strb	w16, [x9, #1]
	ldr	x16, [x10]
	ubfx	x17, x15, #6, #6
	ldrb	w16, [x16, x17]
	strb	w16, [x9, #2]
	ldr	x16, [x10]
	and	x15, x15, #0x3f
	ldrb	w15, [x16, x15]
	cmp	x14, x12
	csel	w15, w11, w15, hi
	strb	w15, [x9, #3]
	cmp	x13, x12
	b.ls	LBB0_4
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	strb	w11, [x9, #2]
	b	LBB0_4
LBB0_11:
	mov	w0, #-1
	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
LBB0_12:
	mov	x9, x0
LBB0_13:
	strb	wzr, [x9]
	str	x0, [x19]
	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
	b	_strlen
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_base64_chars,8,3               ; @base64_chars
.subsections_via_symbols
