	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dpp_bootstrap_key_der
_dpp_bootstrap_key_der:                 ## @dpp_bootstrap_key_der
	.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	%rdi, %rbx
	movq	$0, -56(%rbp)
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_BN_CTX_new
	movq	%rbx, %rdi
	movq	%rax, %rbx
	callq	_EVP_PKEY_get1_EC_KEY
	movq	%rax, %r15
	movl	$0, %r12d
	testq	%rbx, %rbx
	je	LBB0_14
## %bb.1:
	testq	%r15, %r15
	je	LBB0_14
## %bb.2:
	movq	%r15, %rdi
	callq	_EC_KEY_get0_group
	movq	%rax, %r13
	movq	%r15, %rdi
	callq	_EC_KEY_get0_public_key
	xorl	%r12d, %r12d
	testq	%r13, %r13
	je	LBB0_10
## %bb.3:
	movl	$0, %r14d
	testq	%rax, %rax
	je	LBB0_14
## %bb.4:
	leaq	L_.str(%rip), %rdi
	movq	%r13, %rsi
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdx
	callq	_dpp_debug_print_point
	movq	%r13, %rdi
	callq	_EC_GROUP_get_curve_name
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_DPP_BOOTSTRAPPING_KEY_new
	testq	%rax, %rax
	je	LBB0_13
## %bb.5:
	movq	%rax, %r12
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movl	8(%rax), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movq	_EVP_PKEY_EC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_OBJ_nid2obj
	movq	%rax, %rbx
	movq	_V_ASN1_OBJECT@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	-64(%rbp), %edi                 ## 4-byte Reload
	callq	_OBJ_nid2obj
	movl	-60(%rbp), %edi                 ## 4-byte Reload
	movq	%rbx, %rsi
	movl	%r14d, %edx
	movq	%rax, %rcx
	callq	_X509_ALGOR_set0
	cmpl	$1, %eax
	jne	LBB0_11
## %bb.6:
	movq	_POINT_CONVERSION_COMPRESSED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%r14d, %r14d
	movq	%r13, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %r9
	callq	_EC_POINT_point2oct
	testq	%rax, %rax
	je	LBB0_14
## %bb.7:
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_OPENSSL_malloc
	movq	%rax, -56(%rbp)
	testq	%rax, %rax
	je	LBB0_11
## %bb.8:
	movq	%rax, %rbx
	movq	_POINT_CONVERSION_COMPRESSED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movq	%rbx, %rcx
	movq	%r14, %r8
	movq	-48(%rbp), %r9                  ## 8-byte Reload
	callq	_EC_POINT_point2oct
	movq	%rax, %r14
	movq	(%r12), %rax
	movq	(%rax), %rdi
	callq	_OPENSSL_free
	movq	(%r12), %rax
	movq	%rbx, (%rax)
	movq	$0, -56(%rbp)
	movq	(%r12), %rax
	movq	%r14, 8(%rax)
	movq	_ASN1_STRING_FLAG_BITS_LEFT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, %edx
	notl	%edx
	andl	16(%rax), %edx
	andl	$-8, %edx
	orl	%ecx, %edx
	movl	%edx, 16(%rax)
	leaq	-56(%rbp), %rsi
	movq	%r12, %rdi
	callq	_i2d_DPP_BOOTSTRAPPING_KEY
	testl	%eax, %eax
	jle	LBB0_15
## %bb.9:
	movq	-56(%rbp), %rdi
	movl	%eax, %esi
	callq	_wpabuf_alloc_copy
	movq	%rax, %r14
	jmp	LBB0_12
LBB0_10:
	xorl	%r14d, %r14d
	jmp	LBB0_14
LBB0_13:
	xorl	%r12d, %r12d
	jmp	LBB0_14
LBB0_15:
	movq	_MSG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_wpa_printf
LBB0_11:
	xorl	%r14d, %r14d
LBB0_12:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
LBB0_14:
	movq	%r12, %rdi
	callq	_DPP_BOOTSTRAPPING_KEY_free
	movq	-56(%rbp), %rdi
	callq	_OPENSSL_free
	movq	%r15, %rdi
	callq	_EC_KEY_free
	movq	%rbx, %rdi
	callq	_BN_CTX_free
	movq	%r14, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DPP: bootstrap public key"

	.comm	_EVP_PKEY_EC,4,2                ## @EVP_PKEY_EC
	.comm	_V_ASN1_OBJECT,4,2              ## @V_ASN1_OBJECT
	.comm	_POINT_CONVERSION_COMPRESSED,4,2 ## @POINT_CONVERSION_COMPRESSED
	.comm	_ASN1_STRING_FLAG_BITS_LEFT,4,2 ## @ASN1_STRING_FLAG_BITS_LEFT
	.comm	_MSG_ERROR,4,2                  ## @MSG_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"DDP: Failed to build DER encoded public key"

	.no_dead_strip	_dpp_bootstrap_key_der
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dpp_bootstrap_key_der
_dpp_bootstrap_key_der:                 ; @dpp_bootstrap_key_der
	.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, x0
	str	xzr, [sp, #8]
	bl	_BN_CTX_new
	mov	x19, x0
	mov	x0, x20
	bl	_EVP_PKEY_get1_EC_KEY
	mov	x20, x0
	mov	x21, #0
	mov	x24, #0
	cbz	x19, LBB0_13
; %bb.1:
	cbz	x20, LBB0_13
; %bb.2:
	mov	x0, x20
	bl	_EC_KEY_get0_group
	mov	x22, x0
	mov	x0, x20
	bl	_EC_KEY_get0_public_key
	mov	x21, #0
	cbz	x22, LBB0_10
; %bb.3:
	mov	x23, x0
	mov	x24, x21
	cbz	x0, LBB0_13
; %bb.4:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x22
	mov	x2, x23
	bl	_dpp_debug_print_point
	mov	x0, x22
	bl	_EC_GROUP_get_curve_name
	mov	x24, x0
	bl	_DPP_BOOTSTRAPPING_KEY_new
	mov	x21, x0
	cbz	x0, LBB0_12
; %bb.5:
	ldr	w25, [x21, #8]
Lloh2:
	adrp	x8, _EVP_PKEY_EC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EVP_PKEY_EC@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_OBJ_nid2obj
	mov	x26, x0
Lloh5:
	adrp	x8, _V_ASN1_OBJECT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _V_ASN1_OBJECT@GOTPAGEOFF]
Lloh7:
	ldr	w27, [x8]
	mov	x0, x24
	bl	_OBJ_nid2obj
	mov	x3, x0
	mov	x0, x25
	mov	x1, x26
	mov	x2, x27
	bl	_X509_ALGOR_set0
	cmp	w0, #1
	b.ne	LBB0_12
; %bb.6:
Lloh8:
	adrp	x26, _POINT_CONVERSION_COMPRESSED@GOTPAGE
Lloh9:
	ldr	x26, [x26, _POINT_CONVERSION_COMPRESSED@GOTPAGEOFF]
	ldr	w2, [x26]
	mov	x0, x22
	mov	x1, x23
	mov	x3, #0
	mov	x4, #0
	mov	x5, x19
	bl	_EC_POINT_point2oct
	cbz	x0, LBB0_12
; %bb.7:
	mov	x25, x0
	bl	_OPENSSL_malloc
	mov	x24, x0
	str	x0, [sp, #8]
	cbz	x0, LBB0_13
; %bb.8:
	ldr	w2, [x26]
	mov	x0, x22
	mov	x1, x23
	mov	x3, x24
	mov	x4, x25
	mov	x5, x19
	bl	_EC_POINT_point2oct
	mov	x22, x0
	ldr	x8, [x21]
	ldr	x0, [x8]
	bl	_OPENSSL_free
	ldr	x8, [x21]
	str	x24, [x8]
	str	xzr, [sp, #8]
	ldr	x8, [x21]
	str	x22, [x8, #8]
Lloh10:
	adrp	x9, _ASN1_STRING_FLAG_BITS_LEFT@GOTPAGE
Lloh11:
	ldr	x9, [x9, _ASN1_STRING_FLAG_BITS_LEFT@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	ldr	w10, [x8, #16]
	bic	w10, w10, w9
	and	w10, w10, #0xfffffff8
	orr	w9, w10, w9
	str	w9, [x8, #16]
	add	x1, sp, #8
	mov	x0, x21
	bl	_i2d_DPP_BOOTSTRAPPING_KEY
	cmp	w0, #0
	b.le	LBB0_11
; %bb.9:
	mov	x1, x0
	ldr	x0, [sp, #8]
	bl	_wpabuf_alloc_copy
	mov	x24, x0
	b	LBB0_13
LBB0_10:
	mov	x24, x21
	b	LBB0_13
LBB0_11:
Lloh13:
	adrp	x8, _MSG_ERROR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MSG_ERROR@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_wpa_printf
LBB0_12:
	mov	x24, #0
LBB0_13:
	mov	x0, x21
	bl	_DPP_BOOTSTRAPPING_KEY_free
	ldr	x0, [sp, #8]
	bl	_OPENSSL_free
	mov	x0, x20
	bl	_EC_KEY_free
	mov	x0, x19
	bl	_BN_CTX_free
	mov	x0, x24
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DPP: bootstrap public key"

	.comm	_EVP_PKEY_EC,4,2                ; @EVP_PKEY_EC
	.comm	_V_ASN1_OBJECT,4,2              ; @V_ASN1_OBJECT
	.comm	_POINT_CONVERSION_COMPRESSED,4,2 ; @POINT_CONVERSION_COMPRESSED
	.comm	_ASN1_STRING_FLAG_BITS_LEFT,4,2 ; @ASN1_STRING_FLAG_BITS_LEFT
	.comm	_MSG_ERROR,4,2                  ; @MSG_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"DDP: Failed to build DER encoded public key"

	.no_dead_strip	_dpp_bootstrap_key_der
.subsections_via_symbols
