	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i2d_ECPrivateKey               ## -- Begin function i2d_ECPrivateKey
	.p2align	4, 0x90
_i2d_ECPrivateKey:                      ## @i2d_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	$0, -56(%rbp)
	movq	$0, -48(%rbp)
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.1:
	movq	%rdi, %rbx
	cmpq	$0, 8(%rdi)
	je	LBB0_4
## %bb.2:
	movq	%rsi, %r15
	movq	_EC_PKEY_NO_PUBKEY@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	testl	%eax, (%rbx)
	jne	LBB0_5
## %bb.3:
	cmpq	$0, 24(%rbx)
	je	LBB0_4
LBB0_5:
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_EC_PRIVATEKEY_new
	testq	%rax, %rax
	je	LBB0_6
## %bb.8:
	movq	%rax, %r12
	movq	%r14, %r13
	movl	16(%rbx), %eax
	movl	%eax, 24(%r12)
	leaq	-56(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_EC_KEY_priv2buf
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	movq	%rax, %r14
	movq	16(%r12), %rdi
	movq	-56(%rbp), %rsi
	movq	%rax, %rdx
	callq	_ASN1_STRING_set0
	movq	$0, -56(%rbp)
	movl	(%rbx), %eax
	movq	_EC_PKEY_NO_PARAMETERS@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_11
## %bb.13:
	testl	%eax, (%r13)
	jne	LBB0_20
	jmp	LBB0_14
LBB0_4:
	movq	_EC_F_I2D_ECPRIVATEKEY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ERR_R_PASSED_NULL_PARAMETER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ECerr
	xorl	%r13d, %r13d
LBB0_7:
	xorl	%r14d, %r14d
	xorl	%r12d, %r12d
LBB0_23:
	movq	-56(%rbp), %rdi
	movq	%r14, %rsi
	callq	_OPENSSL_clear_free
	movq	-48(%rbp), %rdi
	callq	_OPENSSL_free
	movq	%r12, %rdi
	callq	_EC_PRIVATEKEY_free
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_EC_F_I2D_ECPRIVATEKEY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ERR_R_MALLOC_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ECerr
	jmp	LBB0_7
LBB0_9:
	movq	_EC_F_I2D_ECPRIVATEKEY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ERR_R_EC_LIB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ECerr
	xorl	%r13d, %r13d
	xorl	%r14d, %r14d
	jmp	LBB0_23
LBB0_11:
	movq	8(%rbx), %rdi
	movq	8(%r12), %rsi
	callq	_EC_GROUP_get_ecpkparameters
	movq	%rax, 8(%r12)
	testq	%rax, %rax
	je	LBB0_22
## %bb.12:
	movl	(%rbx), %eax
	testl	%eax, (%r13)
	jne	LBB0_20
LBB0_14:
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_ASN1_BIT_STRING_new
	movq	%rax, (%r12)
	testq	%rax, %rax
	je	LBB0_15
## %bb.17:
	movl	4(%rbx), %esi
	xorl	%r13d, %r13d
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	callq	_EC_KEY_key2buf
	testq	%rax, %rax
	je	LBB0_18
## %bb.19:
	movq	_ASN1_STRING_FLAG_BITS_LEFT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	movq	(%r12), %rdi
	andl	(%rdi), %edx
	andl	$-8, %edx
	movl	%edx, (%rdi)
	orl	(%rcx), %edx
	movl	%edx, (%rdi)
	movq	-48(%rbp), %rsi
	movq	%rax, %rdx
	callq	_ASN1_STRING_set0
	movq	$0, -48(%rbp)
LBB0_20:
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_i2d_EC_PRIVATEKEY
	testl	%eax, %eax
	je	LBB0_22
## %bb.21:
	movl	%eax, %r13d
	jmp	LBB0_23
LBB0_22:
	movq	_EC_F_I2D_ECPRIVATEKEY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ERR_R_EC_LIB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ECerr
	xorl	%r13d, %r13d
	jmp	LBB0_23
LBB0_15:
	movq	_EC_F_I2D_ECPRIVATEKEY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ERR_R_MALLOC_FAILURE@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_18:
	movq	_EC_F_I2D_ECPRIVATEKEY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ERR_R_EC_LIB@GOTPCREL(%rip), %rax
LBB0_16:
	movl	(%rax), %esi
	callq	_ECerr
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_EC_PKEY_NO_PUBKEY,4,2          ## @EC_PKEY_NO_PUBKEY
	.comm	_EC_F_I2D_ECPRIVATEKEY,4,2      ## @EC_F_I2D_ECPRIVATEKEY
	.comm	_ERR_R_PASSED_NULL_PARAMETER,4,2 ## @ERR_R_PASSED_NULL_PARAMETER
	.comm	_ERR_R_MALLOC_FAILURE,4,2       ## @ERR_R_MALLOC_FAILURE
	.comm	_ERR_R_EC_LIB,4,2               ## @ERR_R_EC_LIB
	.comm	_EC_PKEY_NO_PARAMETERS,4,2      ## @EC_PKEY_NO_PARAMETERS
	.comm	_ASN1_STRING_FLAG_BITS_LEFT,4,2 ## @ASN1_STRING_FLAG_BITS_LEFT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i2d_ECPrivateKey               ; -- Begin function i2d_ECPrivateKey
	.p2align	2
_i2d_ECPrivateKey:                      ; @i2d_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
	stp	xzr, xzr, [sp]
	cbz	x0, LBB0_12
; %bb.1:
	mov	x22, x0
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_12
; %bb.2:
	mov	x21, x1
	ldr	w8, [x22]
Lloh0:
	adrp	x23, _EC_PKEY_NO_PUBKEY@GOTPAGE
Lloh1:
	ldr	x23, [x23, _EC_PKEY_NO_PUBKEY@GOTPAGEOFF]
	ldr	w9, [x23]
	tst	w9, w8
	b.ne	LBB0_4
; %bb.3:
	ldr	x8, [x22, #24]
	cbz	x8, LBB0_12
LBB0_4:
	bl	_EC_PRIVATEKEY_new
	mov	x19, x0
	cbz	x0, LBB0_14
; %bb.5:
	ldr	w8, [x22, #16]
	str	w8, [x19, #24]
	add	x1, sp, #8
	mov	x0, x22
	bl	_EC_KEY_priv2buf
	mov	x20, x0
	cbz	x0, LBB0_18
; %bb.6:
	ldr	x0, [x19, #16]
	ldr	x1, [sp, #8]
	mov	x2, x20
	bl	_ASN1_STRING_set0
	str	xzr, [sp, #8]
	ldr	w8, [x22]
Lloh2:
	adrp	x9, _EC_PKEY_NO_PARAMETERS@GOTPAGE
Lloh3:
	ldr	x9, [x9, _EC_PKEY_NO_PARAMETERS@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_9
; %bb.7:
	ldr	x0, [x22, #8]
	ldr	x1, [x19, #8]
	bl	_EC_GROUP_get_ecpkparameters
	str	x0, [x19, #8]
	cbz	x0, LBB0_18
; %bb.8:
	ldr	w8, [x22]
LBB0_9:
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_15
LBB0_10:
	mov	x0, x19
	mov	x1, x21
	bl	_i2d_EC_PRIVATEKEY
	mov	x21, x0
	cbnz	w0, LBB0_13
; %bb.11:
Lloh5:
	adrp	x8, _EC_F_I2D_ECPRIVATEKEY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EC_F_I2D_ECPRIVATEKEY@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x8, _ERR_R_EC_LIB@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ERR_R_EC_LIB@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	bl	_ECerr
	b	LBB0_13
LBB0_12:
Lloh11:
	adrp	x8, _EC_F_I2D_ECPRIVATEKEY@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EC_F_I2D_ECPRIVATEKEY@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x8, _ERR_R_PASSED_NULL_PARAMETER@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ERR_R_PASSED_NULL_PARAMETER@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	bl	_ECerr
	mov	w21, #0
	mov	x20, #0
	mov	x19, #0
LBB0_13:
	ldr	x0, [sp, #8]
	mov	x1, x20
	bl	_OPENSSL_clear_free
	ldr	x0, [sp]
	bl	_OPENSSL_free
	mov	x0, x19
	bl	_EC_PRIVATEKEY_free
	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_14:
Lloh17:
	adrp	x8, _EC_F_I2D_ECPRIVATEKEY@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EC_F_I2D_ECPRIVATEKEY@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
Lloh20:
	adrp	x8, _ERR_R_MALLOC_FAILURE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ERR_R_MALLOC_FAILURE@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	bl	_ECerr
	mov	w21, #0
	mov	x20, #0
	b	LBB0_13
LBB0_15:
	bl	_ASN1_BIT_STRING_new
	str	x0, [x19]
	cbz	x0, LBB0_20
; %bb.16:
	ldr	w1, [x22, #4]
	mov	x2, sp
	mov	x0, x22
	mov	x3, #0
	bl	_EC_KEY_key2buf
	cbz	x0, LBB0_18
; %bb.17:
	mov	x2, x0
Lloh23:
	adrp	x8, _ASN1_STRING_FLAG_BITS_LEFT@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ASN1_STRING_FLAG_BITS_LEFT@GOTPAGEOFF]
	ldr	w9, [x8]
	ldr	x0, [x19]
	ldr	w10, [x0]
	bic	w9, w10, w9
	and	w9, w9, #0xfffffff8
	str	w9, [x0]
	ldr	w8, [x8]
	orr	w8, w8, w9
	str	w8, [x0]
	ldr	x1, [sp]
	bl	_ASN1_STRING_set0
	str	xzr, [sp]
	b	LBB0_10
LBB0_18:
Lloh25:
	adrp	x8, _EC_F_I2D_ECPRIVATEKEY@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EC_F_I2D_ECPRIVATEKEY@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
Lloh28:
	adrp	x8, _ERR_R_EC_LIB@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ERR_R_EC_LIB@GOTPAGEOFF]
LBB0_19:
	ldr	w1, [x8]
	bl	_ECerr
	mov	w21, #0
	b	LBB0_13
LBB0_20:
Lloh30:
	adrp	x8, _EC_F_I2D_ECPRIVATEKEY@GOTPAGE
Lloh31:
	ldr	x8, [x8, _EC_F_I2D_ECPRIVATEKEY@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
Lloh33:
	adrp	x8, _ERR_R_MALLOC_FAILURE@GOTPAGE
Lloh34:
	ldr	x8, [x8, _ERR_R_MALLOC_FAILURE@GOTPAGEOFF]
	b	LBB0_19
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_EC_PKEY_NO_PUBKEY,4,2          ; @EC_PKEY_NO_PUBKEY
	.comm	_EC_F_I2D_ECPRIVATEKEY,4,2      ; @EC_F_I2D_ECPRIVATEKEY
	.comm	_ERR_R_PASSED_NULL_PARAMETER,4,2 ; @ERR_R_PASSED_NULL_PARAMETER
	.comm	_ERR_R_MALLOC_FAILURE,4,2       ; @ERR_R_MALLOC_FAILURE
	.comm	_ERR_R_EC_LIB,4,2               ; @ERR_R_EC_LIB
	.comm	_EC_PKEY_NO_PARAMETERS,4,2      ; @EC_PKEY_NO_PARAMETERS
	.comm	_ASN1_STRING_FLAG_BITS_LEFT,4,2 ; @ASN1_STRING_FLAG_BITS_LEFT
.subsections_via_symbols
