	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_OPENSSL_utf82uni               ## -- Begin function OPENSSL_utf82uni
	.p2align	4, 0x90
_OPENSSL_utf82uni:                      ## @OPENSSL_utf82uni
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rdx, %r12
	movl	%esi, %r14d
	movq	%rdi, %r13
	movq	$0, -48(%rbp)
	cmpl	$-1, %esi
	je	LBB0_1
## %bb.2:
	testl	%r14d, %r14d
	jle	LBB0_12
LBB0_3:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	leaq	-48(%rbp), %r15
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movslq	%r12d, %rax
	leaq	(%rax,%r13), %rdi
	movl	%r14d, %esi
	subl	%eax, %esi
	movq	%r15, %rdx
	callq	_UTF8_getc
	testl	%eax, %eax
	js	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	-48(%rbp), %rcx
	cmpq	$1114111, %rcx                  ## imm = 0x10FFFF
	ja	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	xorl	%edx, %edx
	cmpq	$65536, %rcx                    ## imm = 0x10000
	setae	%dl
	leal	(%rbx,%rdx,2), %ebx
	addl	$2, %ebx
	addl	%eax, %r12d
	cmpl	%r12d, %r14d
	jg	LBB0_4
## %bb.9:
	addl	$2, %ebx
	movl	%ebx, %edi
	callq	_OPENSSL_malloc
	testq	%rax, %rax
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_13
## %bb.10:
	testl	%r14d, %r14d
	jle	LBB0_11
## %bb.14:
	xorl	%r15d, %r15d
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%rax, %r12
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_15 Depth=1
	movq	%r12, %rdi
	movb	%dh, (%rdi)
	movzbl	-48(%rbp), %ecx
	leaq	2(%r12), %rsi
LBB0_18:                                ##   in Loop: Header=BB0_15 Depth=1
	movb	%cl, 1(%rdi)
	addl	%eax, %r15d
	movq	%rsi, %r12
	cmpl	%r15d, %r14d
	jle	LBB0_19
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movslq	%r15d, %rax
	leaq	(%rax,%r13), %rdi
	movl	%r14d, %esi
	subl	%eax, %esi
	leaq	-48(%rbp), %rdx
	callq	_UTF8_getc
	movq	-48(%rbp), %rdx
	cmpq	$65536, %rdx                    ## imm = 0x10000
	jb	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	leaq	-65536(%rdx), %rcx
	movq	%rcx, -48(%rbp)
	shrq	$10, %rcx
	addl	$55296, %ecx                    ## imm = 0xD800
	movq	%r12, %rdi
	movb	%ch, (%rdi)
	movq	%rdx, %rsi
	shrq	$8, %rsi
	andb	$3, %sil
	orb	$-36, %sil
	movb	%sil, 2(%r12)
	leaq	4(%r12), %rsi
	movb	%dl, 3(%r12)
	jmp	LBB0_18
LBB0_1:
	movq	%r13, %rdi
	callq	_strlen
	movl	%eax, %r14d
	testl	%r14d, %r14d
	jg	LBB0_3
LBB0_12:
	movl	$2, %ebx
	movl	$2, %edi
	callq	_OPENSSL_malloc
	movq	%rax, %rsi
	testq	%rax, %rax
	jne	LBB0_20
LBB0_13:
	movq	_PKCS12_F_OPENSSL_UTF82UNI@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ERR_R_MALLOC_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_PKCS12err
	xorl	%eax, %eax
	jmp	LBB0_24
LBB0_5:
	movq	%r13, %rdi
	movl	%r14d, %esi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	callq	_OPENSSL_asc2uni
	jmp	LBB0_24
LBB0_7:
	xorl	%eax, %eax
	jmp	LBB0_24
LBB0_19:
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_20
LBB0_11:
	movq	%rax, %rsi
LBB0_20:
	movw	$0, (%rsi)
	testq	%r15, %r15
	je	LBB0_22
## %bb.21:
	movl	%ebx, (%r15)
LBB0_22:
	testq	%r12, %r12
	je	LBB0_24
## %bb.23:
	movq	%rax, (%r12)
LBB0_24:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PKCS12_F_OPENSSL_UTF82UNI,4,2  ## @PKCS12_F_OPENSSL_UTF82UNI
	.comm	_ERR_R_MALLOC_FAILURE,4,2       ## @ERR_R_MALLOC_FAILURE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_OPENSSL_utf82uni               ; -- Begin function OPENSSL_utf82uni
	.p2align	2
_OPENSSL_utf82uni:                      ; @OPENSSL_utf82uni
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x3
	mov	x19, x2
	mov	x22, x1
	mov	x21, x0
	str	xzr, [sp, #8]
	cmn	w1, #1
	b.eq	LBB0_13
; %bb.1:
	cmp	w22, #1
	b.lt	LBB0_14
LBB0_2:
	mov	w23, #0
	mov	w24, #0
	mov	w25, #2
	mov	w26, #4
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, x21, w24, sxtw
	sub	w1, w22, w24
	add	x2, sp, #8
	bl	_UTF8_getc
	tbnz	w0, #31, LBB0_20
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [sp, #8]
	lsr	x8, x8, #16
	cmp	x8, #16
	b.hi	LBB0_22
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	x8, #0
	csel	w8, w26, w25, ne
	add	w23, w8, w23
	add	w24, w0, w24
	cmp	w22, w24
	b.gt	LBB0_3
; %bb.6:
	add	w24, w23, #2
	mov	x0, x24
	bl	_OPENSSL_malloc
	cbz	x0, LBB0_21
; %bb.7:
	mov	x23, x0
	cmp	w22, #1
	b.lt	LBB0_24
; %bb.8:
	mov	w25, #0
	mov	w26, #55296
	mov	x27, x23
	b	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=1
	lsr	x9, x10, #8
	mov	x8, x27
	strb	w9, [x8], #2
	ldrb	w9, [sp, #8]
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	strb	w9, [x27, #1]
	add	w25, w0, w25
	cmp	w22, w25
	mov	x27, x8
	b.le	LBB0_16
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	add	x0, x21, w25, sxtw
	sub	w1, w22, w25
	add	x2, sp, #8
	bl	_UTF8_getc
	ldr	x10, [sp, #8]
	subs	x8, x10, #16, lsl #12           ; =65536
	b.lo	LBB0_9
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	str	x8, [sp, #8]
	lsr	x8, x8, #10
	add	w9, w8, w26
	lsr	w8, w9, #8
	strb	w8, [x27]
	mov	w8, #220
	bfxil	w8, w10, #8, #2
	strb	w8, [x27, #2]
	add	x8, x27, #4
	strb	w10, [x27, #3]
	b	LBB0_10
LBB0_13:
	mov	x0, x21
	bl	_strlen
	mov	x22, x0
	cmp	w22, #1
	b.ge	LBB0_2
LBB0_14:
	mov	w24, #2
	mov	w0, #2
	bl	_OPENSSL_malloc
	cbz	x0, LBB0_21
; %bb.15:
	mov	x23, x0
	mov	x8, x0
LBB0_16:
	strh	wzr, [x8]
	cbz	x20, LBB0_18
LBB0_17:
	str	w24, [x20]
LBB0_18:
	cbz	x19, LBB0_23
; %bb.19:
	str	x23, [x19]
	b	LBB0_23
LBB0_20:
	mov	x0, x21
	mov	x1, x22
	mov	x2, x19
	mov	x3, x20
	bl	_OPENSSL_asc2uni
	mov	x23, x0
	b	LBB0_23
LBB0_21:
Lloh0:
	adrp	x8, _PKCS12_F_OPENSSL_UTF82UNI@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PKCS12_F_OPENSSL_UTF82UNI@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _ERR_R_MALLOC_FAILURE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ERR_R_MALLOC_FAILURE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_PKCS12err
LBB0_22:
	mov	x23, #0
LBB0_23:
	mov	x0, x23
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_24:
	mov	x8, x23
	strh	wzr, [x8]
	cbnz	x20, LBB0_17
	b	LBB0_18
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PKCS12_F_OPENSSL_UTF82UNI,4,2  ; @PKCS12_F_OPENSSL_UTF82UNI
	.comm	_ERR_R_MALLOC_FAILURE,4,2       ; @ERR_R_MALLOC_FAILURE
.subsections_via_symbols
