	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_d2i_ECPrivateKey               ## -- Begin function d2i_ECPrivateKey
	.p2align	4, 0x90
_d2i_ECPrivateKey:                      ## @d2i_ECPrivateKey
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	(%rsi), %rax
	movq	%rax, -48(%rbp)
	leaq	-48(%rbp), %rsi
	xorl	%edi, %edi
	callq	_d2i_EC_PRIVATEKEY
	testq	%rax, %rax
	je	LBB0_13
## %bb.1:
	movq	%rax, %r15
	testq	%r14, %r14
	je	LBB0_3
## %bb.2:
	movq	(%r14), %r13
	testq	%r13, %r13
	jne	LBB0_4
LBB0_3:
	xorl	%eax, %eax
	callq	_EC_KEY_new
	movq	%rax, %r13
	testq	%rax, %rax
	je	LBB0_14
LBB0_4:
	cmpq	$0, 24(%r15)
	movq	8(%r13), %rax
	je	LBB0_6
## %bb.5:
	movq	%rax, %rdi
	callq	_EC_GROUP_free
	movq	24(%r15), %rdi
	callq	_EC_GROUP_new_from_ecpkparameters
	movq	%rax, 8(%r13)
LBB0_6:
	movq	_ERR_R_EC_LIB@GOTPCREL(%rip), %rcx
	testq	%rax, %rax
	je	LBB0_17
## %bb.7:
	movl	16(%r15), %eax
	movl	%eax, 24(%r13)
	movq	8(%r15), %rbx
	testq	%rbx, %rbx
	je	LBB0_15
## %bb.8:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_ASN1_STRING_get0_data
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_ASN1_STRING_length
	movq	%r13, %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	callq	_EC_KEY_oct2priv
	testq	%rax, %rax
	je	LBB0_18
## %bb.9:
	movq	16(%r13), %rdi
	callq	_EC_POINT_clear_free
	movq	8(%r13), %rdi
	callq	_EC_POINT_new
	movq	%rax, 16(%r13)
	testq	%rax, %rax
	je	LBB0_16
## %bb.10:
	movq	(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_24
## %bb.11:
	callq	_ASN1_STRING_get0_data
	movq	%rax, %rbx
	movq	(%r15), %rdi
	callq	_ASN1_STRING_length
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	callq	_EC_KEY_oct2key
	testl	%eax, %eax
	jne	LBB0_27
LBB0_16:
	movq	_ERR_R_EC_LIB@GOTPCREL(%rip), %rcx
	jmp	LBB0_17
LBB0_13:
	movq	_EC_F_D2I_ECPRIVATEKEY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ERR_R_EC_LIB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ECerr
	jmp	LBB0_22
LBB0_14:
	movq	_ERR_R_MALLOC_FAILURE@GOTPCREL(%rip), %rcx
	xorl	%r13d, %r13d
	jmp	LBB0_17
LBB0_15:
	movq	_EC_R_MISSING_PRIVATE_KEY@GOTPCREL(%rip), %rcx
LBB0_17:
	movq	_EC_F_D2I_ECPRIVATEKEY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rcx), %esi
	callq	_ECerr
LBB0_18:
	testq	%r14, %r14
	je	LBB0_20
## %bb.19:
	cmpq	%r13, (%r14)
	je	LBB0_21
LBB0_20:
	movq	%r13, %rdi
	callq	_EC_KEY_free
LBB0_21:
	movq	%r15, %rdi
	callq	_EC_PRIVATEKEY_free
LBB0_22:
	xorl	%r13d, %r13d
LBB0_23:
	movq	%r13, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_24:
	movq	8(%r13), %rax
	movq	(%rax), %rax
	movq	(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_18
## %bb.25:
	movq	%r13, %rdi
	callq	*%rcx
	testq	%rax, %rax
	je	LBB0_18
## %bb.26:
	movq	_EC_PKEY_NO_PUBKEY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r13)
LBB0_27:
	testq	%r14, %r14
	je	LBB0_29
## %bb.28:
	movq	%r13, (%r14)
LBB0_29:
	movq	%r15, %rdi
	callq	_EC_PRIVATEKEY_free
	movq	-48(%rbp), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_EC_F_D2I_ECPRIVATEKEY,4,2      ## @EC_F_D2I_ECPRIVATEKEY
	.comm	_ERR_R_EC_LIB,4,2               ## @ERR_R_EC_LIB
	.comm	_ERR_R_MALLOC_FAILURE,4,2       ## @ERR_R_MALLOC_FAILURE
	.comm	_EC_R_MISSING_PRIVATE_KEY,4,2   ## @EC_R_MISSING_PRIVATE_KEY
	.comm	_EC_PKEY_NO_PUBKEY,4,2          ## @EC_PKEY_NO_PUBKEY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_d2i_ECPrivateKey               ; -- Begin function d2i_ECPrivateKey
	.p2align	2
_d2i_ECPrivateKey:                      ; @d2i_ECPrivateKey
	.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	x22, x1
	mov	x20, x0
	ldr	x8, [x1]
	str	x8, [sp, #8]
	add	x1, sp, #8
	mov	x0, #0
	bl	_d2i_EC_PRIVATEKEY
	cbz	x0, LBB0_13
; %bb.1:
	mov	x19, x0
	cbz	x20, LBB0_3
; %bb.2:
	ldr	x21, [x20]
	cbnz	x21, LBB0_4
LBB0_3:
	bl	_EC_KEY_new
	mov	x21, x0
	cbz	x0, LBB0_14
LBB0_4:
	ldr	x8, [x19, #24]
	ldr	x0, [x21, #8]
	cbz	x8, LBB0_6
; %bb.5:
	bl	_EC_GROUP_free
	ldr	x0, [x19, #24]
	bl	_EC_GROUP_new_from_ecpkparameters
	str	x0, [x21, #8]
LBB0_6:
	cbz	x0, LBB0_12
; %bb.7:
	ldr	w8, [x19, #16]
	str	w8, [x21, #24]
	ldr	x23, [x19, #8]
	cbz	x23, LBB0_15
; %bb.8:
	mov	x0, x23
	bl	_ASN1_STRING_get0_data
	mov	x24, x0
	mov	x0, x23
	bl	_ASN1_STRING_length
	mov	x2, x0
	mov	x0, x21
	mov	x1, x24
	bl	_EC_KEY_oct2priv
	cbz	x0, LBB0_17
; %bb.9:
	ldr	x0, [x21, #16]
	bl	_EC_POINT_clear_free
	ldr	x0, [x21, #8]
	bl	_EC_POINT_new
	str	x0, [x21, #16]
	cbz	x0, LBB0_12
; %bb.10:
	ldr	x0, [x19]
	cbz	x0, LBB0_23
; %bb.11:
	bl	_ASN1_STRING_get0_data
	mov	x23, x0
	ldr	x0, [x19]
	bl	_ASN1_STRING_length
	mov	x2, x0
	mov	x0, x21
	mov	x1, x23
	mov	x3, #0
	bl	_EC_KEY_oct2key
	cbnz	w0, LBB0_26
LBB0_12:
Lloh0:
	adrp	x8, _ERR_R_EC_LIB@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ERR_R_EC_LIB@GOTPAGEOFF]
	b	LBB0_16
LBB0_13:
Lloh2:
	adrp	x8, _EC_F_D2I_ECPRIVATEKEY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EC_F_D2I_ECPRIVATEKEY@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x8, _ERR_R_EC_LIB@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ERR_R_EC_LIB@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_ECerr
	b	LBB0_21
LBB0_14:
Lloh8:
	adrp	x8, _ERR_R_MALLOC_FAILURE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ERR_R_MALLOC_FAILURE@GOTPAGEOFF]
	b	LBB0_16
LBB0_15:
Lloh10:
	adrp	x8, _EC_R_MISSING_PRIVATE_KEY@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EC_R_MISSING_PRIVATE_KEY@GOTPAGEOFF]
LBB0_16:
Lloh12:
	adrp	x9, _EC_F_D2I_ECPRIVATEKEY@GOTPAGE
Lloh13:
	ldr	x9, [x9, _EC_F_D2I_ECPRIVATEKEY@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x9]
	ldr	w1, [x8]
	bl	_ECerr
LBB0_17:
	cbz	x20, LBB0_19
; %bb.18:
	ldr	x8, [x20]
	cmp	x8, x21
	b.eq	LBB0_20
LBB0_19:
	mov	x0, x21
	bl	_EC_KEY_free
LBB0_20:
	mov	x0, x19
	bl	_EC_PRIVATEKEY_free
LBB0_21:
	mov	x21, #0
LBB0_22:
	mov	x0, x21
	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
LBB0_23:
	ldr	x8, [x21, #8]
	ldr	x8, [x8]
	ldr	x8, [x8]
	cbz	x8, LBB0_17
; %bb.24:
	mov	x0, x21
	blr	x8
	cbz	x0, LBB0_17
; %bb.25:
Lloh15:
	adrp	x8, _EC_PKEY_NO_PUBKEY@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EC_PKEY_NO_PUBKEY@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	ldr	w9, [x21]
	orr	w8, w9, w8
	str	w8, [x21]
LBB0_26:
	cbz	x20, LBB0_28
; %bb.27:
	str	x21, [x20]
LBB0_28:
	mov	x0, x19
	bl	_EC_PRIVATEKEY_free
	ldr	x8, [sp, #8]
	str	x8, [x22]
	b	LBB0_22
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_EC_F_D2I_ECPRIVATEKEY,4,2      ; @EC_F_D2I_ECPRIVATEKEY
	.comm	_ERR_R_EC_LIB,4,2               ; @ERR_R_EC_LIB
	.comm	_ERR_R_MALLOC_FAILURE,4,2       ; @ERR_R_MALLOC_FAILURE
	.comm	_EC_R_MISSING_PRIVATE_KEY,4,2   ; @EC_R_MISSING_PRIVATE_KEY
	.comm	_EC_PKEY_NO_PUBKEY,4,2          ; @EC_PKEY_NO_PUBKEY
.subsections_via_symbols
