	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dpp_pkex_build_exchange_req
_dpp_pkex_build_exchange_req:           ## @dpp_pkex_build_exchange_req
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	$0, -72(%rbp)
	movq	24(%rdi), %rax
	movq	(%rax), %r14
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_wpa_printf
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_BN_CTX_new
	testq	%rax, %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movl	20(%r15), %esi
	movl	4(%r15), %ecx
	movl	16(%r15), %edx
	leaq	-72(%rbp), %r9
	movq	%r14, %rdi
	movq	%rax, %r8
	callq	_dpp_pkex_derive_Qi
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r12
	movq	%r14, %rdi
	callq	_dpp_gen_keypair
	movq	%rax, 8(%r15)
	testq	%rax, %rax
	je	LBB0_1
## %bb.5:
	movq	%rax, %rdi
	callq	_EVP_PKEY_get1_EC_KEY
	testq	%rax, %rax
	je	LBB0_1
## %bb.6:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	callq	_EC_KEY_get0_public_key
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	movq	-72(%rbp), %rsi
	leaq	L_.str.1(%rip), %rdi
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdx
	callq	_dpp_debug_print_point
	movq	-72(%rbp), %rdi
	callq	_EC_POINT_new
	movq	%rax, %rbx
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_BN_new
	movq	%rax, %r14
	xorl	%eax, %eax
	callq	_BN_new
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	testq	%rbx, %rbx
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	je	LBB0_9
## %bb.10:
	testq	%r14, %r14
	je	LBB0_9
## %bb.11:
	testq	%rax, %rax
	je	LBB0_9
## %bb.12:
	movq	-72(%rbp), %rdi
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rsi
	movq	-96(%rbp), %rdx                 ## 8-byte Reload
	movq	%r12, %rcx
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %r8
	callq	_EC_POINT_add
	cmpl	$1, %eax
	jne	LBB0_13
## %bb.15:
	movq	-72(%rbp), %rdi
	movq	%r13, %rsi
	movq	%r14, %rdx
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%rbx, %r8
	callq	_EC_POINT_get_affine_coordinates_GFp
	cmpl	$1, %eax
	jne	LBB0_13
## %bb.16:
	movq	-72(%rbp), %rsi
	leaq	L_.str.2(%rip), %rdi
	movq	%r13, %rdx
	callq	_dpp_debug_print_point
	movl	4(%r15), %edi
	testl	%edi, %edi
	je	LBB0_17
## %bb.18:
	callq	_os_strlen
	cltq
	addq	$10, %rax
	jmp	LBB0_19
LBB0_3:
	xorl	%r12d, %r12d
LBB0_1:
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
LBB0_26:
	movq	_MSG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_wpa_printf
	movq	%r13, %rdi
	callq	_wpabuf_free
	xorl	%r13d, %r13d
LBB0_27:
	xorl	%edi, %edi
	callq	_wpabuf_free
	movq	%rbx, %rdi
	callq	_EC_KEY_free
	movq	%r15, %rdi
	callq	_EC_POINT_free
	movq	%r12, %rdi
	callq	_EC_POINT_free
	movq	%r14, %rdi
	callq	_BN_clear_free
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_BN_clear_free
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	callq	_BN_CTX_free
	movq	-72(%rbp), %rdi
	callq	_EC_GROUP_free
	movq	%r13, %rax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_14
LBB0_13:
	movq	%r13, %r15
LBB0_14:
	xorl	%r13d, %r13d
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_26
LBB0_17:
	movl	$6, %eax
LBB0_19:
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movslq	(%rbx), %rcx
	leaq	(%rax,%rcx,2), %rsi
	addq	$4, %rsi
	movq	_DPP_PA_PKEX_EXCHANGE_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_dpp_alloc_msg
	testq	%rax, %rax
	je	LBB0_20
## %bb.21:
	movq	%rax, %r13
	movq	_DPP_ATTR_FINITE_CYCLIC_GROUP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_wpabuf_put_le16
	movq	%r13, %rdi
	movl	$2, %esi
	callq	_wpabuf_put_le16
	movl	4(%rbx), %esi
	movq	%r13, %rdi
	callq	_wpabuf_put_le16
	cmpl	$0, 4(%r15)
	je	LBB0_23
## %bb.22:
	movq	_DPP_ATTR_CODE_IDENTIFIER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_wpabuf_put_le16
	movl	4(%r15), %edi
	callq	_os_strlen
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_wpabuf_put_le16
	movl	4(%r15), %esi
	movq	%r13, %rdi
	callq	_wpabuf_put_str
LBB0_23:
	movq	_DPP_ATTR_ENCRYPTED_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_wpabuf_put_le16
	movl	(%rbx), %esi
	addl	%esi, %esi
	movq	%r13, %rdi
	callq	_wpabuf_put_le16
	movl	(%rbx), %esi
	movq	%r13, %rdi
	callq	_wpabuf_put
	movl	(%rbx), %edx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_dpp_bn2bin_pad
	testq	%rax, %rax
	js	LBB0_9
## %bb.24:
	movl	(%r15), %esi
	movl	(%rbx), %edx
	movq	%r14, %rdi
	callq	_dpp_bn2bin_pad
	testq	%rax, %rax
	js	LBB0_9
## %bb.25:
	movl	(%rbx), %esi
	movq	%r13, %rdi
	callq	_wpabuf_put
	movl	(%rbx), %edx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %esi
	callq	_dpp_bn2bin_pad
	testq	%rax, %rax
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	jns	LBB0_27
	jmp	LBB0_26
LBB0_20:
	xorl	%r13d, %r13d
LBB0_9:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_26
	.cfi_endproc
                                        ## -- End function
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DPP: Build PKEX Exchange Request"

L_.str.1:                               ## @.str.1
	.asciz	"DPP: X"

L_.str.2:                               ## @.str.2
	.asciz	"DPP: M"

	.comm	_DPP_PA_PKEX_EXCHANGE_REQ,4,2   ## @DPP_PA_PKEX_EXCHANGE_REQ
	.comm	_DPP_ATTR_FINITE_CYCLIC_GROUP,4,2 ## @DPP_ATTR_FINITE_CYCLIC_GROUP
	.comm	_DPP_ATTR_CODE_IDENTIFIER,4,2   ## @DPP_ATTR_CODE_IDENTIFIER
	.comm	_DPP_ATTR_ENCRYPTED_KEY,4,2     ## @DPP_ATTR_ENCRYPTED_KEY
	.comm	_MSG_INFO,4,2                   ## @MSG_INFO
L_.str.3:                               ## @.str.3
	.asciz	"DPP: Failed to build PKEX Exchange Request"

	.comm	_DPP_TEST_INVALID_ENCRYPTED_KEY_PKEX_EXCHANGE_REQ,8,3 ## @DPP_TEST_INVALID_ENCRYPTED_KEY_PKEX_EXCHANGE_REQ
	.comm	_DPP_TEST_NO_ENCRYPTED_KEY_PKEX_EXCHANGE_REQ,8,3 ## @DPP_TEST_NO_ENCRYPTED_KEY_PKEX_EXCHANGE_REQ
	.comm	_DPP_TEST_NO_FINITE_CYCLIC_GROUP_PKEX_EXCHANGE_REQ,8,3 ## @DPP_TEST_NO_FINITE_CYCLIC_GROUP_PKEX_EXCHANGE_REQ
	.comm	_dpp_pkex_ephemeral_key_override,4,2 ## @dpp_pkex_ephemeral_key_override
	.comm	_dpp_pkex_ephemeral_key_override_len,8,3 ## @dpp_pkex_ephemeral_key_override_len
	.comm	_dpp_test,8,3                   ## @dpp_test
	.no_dead_strip	_dpp_pkex_build_exchange_req
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dpp_pkex_build_exchange_req
_dpp_pkex_build_exchange_req:           ; @dpp_pkex_build_exchange_req
	.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	x27, x0
	str	xzr, [sp, #8]
	ldr	x8, [x0, #24]
	ldr	x25, [x8]
Lloh0:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
	bl	_BN_CTX_new
	mov	x19, x0
	cbz	x0, LBB0_12
; %bb.1:
	ldp	w2, w1, [x27, #16]
	ldr	w3, [x27, #4]
	add	x5, sp, #8
	mov	x0, x25
	mov	x4, x19
	bl	_dpp_pkex_derive_Qi
	mov	x20, x0
	cbz	x0, LBB0_13
; %bb.2:
	mov	x0, x25
	bl	_dpp_gen_keypair
	str	x0, [x27, #8]
	cbz	x0, LBB0_13
; %bb.3:
	bl	_EVP_PKEY_get1_EC_KEY
	mov	x21, x0
	cbz	x0, LBB0_16
; %bb.4:
	mov	x0, x21
	bl	_EC_KEY_get0_public_key
	cbz	x0, LBB0_16
; %bb.5:
	mov	x28, x0
	ldr	x1, [sp, #8]
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x2, x28
	bl	_dpp_debug_print_point
	ldr	x0, [sp, #8]
	bl	_EC_POINT_new
	mov	x22, x0
	bl	_BN_new
	mov	x23, x0
	bl	_BN_new
	mov	x24, x0
	mov	x26, #0
	cbz	x22, LBB0_14
; %bb.6:
	cbz	x23, LBB0_14
; %bb.7:
	cbz	x24, LBB0_14
; %bb.8:
	ldr	x0, [sp, #8]
	mov	x1, x22
	mov	x2, x28
	mov	x3, x20
	mov	x4, x19
	bl	_EC_POINT_add
	cmp	w0, #1
	b.ne	LBB0_17
; %bb.9:
	ldr	x0, [sp, #8]
	mov	x1, x22
	mov	x2, x23
	mov	x3, x24
	mov	x4, x19
	bl	_EC_POINT_get_affine_coordinates_GFp
	cmp	w0, #1
	b.ne	LBB0_17
; %bb.10:
	ldr	x1, [sp, #8]
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x2, x22
	bl	_dpp_debug_print_point
	ldr	w0, [x27, #4]
	cbz	w0, LBB0_18
; %bb.11:
	bl	_os_strlen
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	add	x8, x8, #10
	b	LBB0_19
LBB0_12:
	mov	x20, #0
LBB0_13:
	mov	x22, #0
	mov	x23, #0
	mov	x24, #0
	mov	x26, #0
	mov	x21, #0
LBB0_14:
Lloh9:
	adrp	x8, _MSG_INFO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MSG_INFO@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
Lloh12:
	adrp	x1, l_.str.3@PAGE
Lloh13:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_wpa_printf
	mov	x0, x26
	bl	_wpabuf_free
	mov	x26, #0
LBB0_15:
	mov	x0, #0
	bl	_wpabuf_free
	mov	x0, x21
	bl	_EC_KEY_free
	mov	x0, x22
	bl	_EC_POINT_free
	mov	x0, x20
	bl	_EC_POINT_free
	mov	x0, x23
	bl	_BN_clear_free
	mov	x0, x24
	bl	_BN_clear_free
	mov	x0, x19
	bl	_BN_CTX_free
	ldr	x0, [sp, #8]
	bl	_EC_GROUP_free
	mov	x0, x26
	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_16:
	mov	x22, #0
	mov	x23, #0
	mov	x24, #0
LBB0_17:
	mov	x26, #0
	b	LBB0_14
LBB0_18:
	mov	w8, #6
LBB0_19:
	ldrsw	x9, [x25]
	add	x8, x8, x9, lsl #1
	add	x1, x8, #4
Lloh14:
	adrp	x8, _DPP_PA_PKEX_EXCHANGE_REQ@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DPP_PA_PKEX_EXCHANGE_REQ@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_dpp_alloc_msg
	mov	x26, x0
	cbz	x0, LBB0_14
; %bb.20:
Lloh17:
	adrp	x8, _DPP_ATTR_FINITE_CYCLIC_GROUP@GOTPAGE
Lloh18:
	ldr	x8, [x8, _DPP_ATTR_FINITE_CYCLIC_GROUP@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x26
	bl	_wpabuf_put_le16
	mov	x0, x26
	mov	w1, #2
	bl	_wpabuf_put_le16
	ldr	w1, [x25, #4]
	mov	x0, x26
	bl	_wpabuf_put_le16
	ldr	w8, [x27, #4]
	cbz	w8, LBB0_22
; %bb.21:
Lloh20:
	adrp	x8, _DPP_ATTR_CODE_IDENTIFIER@GOTPAGE
Lloh21:
	ldr	x8, [x8, _DPP_ATTR_CODE_IDENTIFIER@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x26
	bl	_wpabuf_put_le16
	ldr	w0, [x27, #4]
	bl	_os_strlen
	mov	x1, x0
	mov	x0, x26
	bl	_wpabuf_put_le16
	ldr	w1, [x27, #4]
	mov	x0, x26
	bl	_wpabuf_put_str
LBB0_22:
Lloh23:
	adrp	x8, _DPP_ATTR_ENCRYPTED_KEY@GOTPAGE
Lloh24:
	ldr	x8, [x8, _DPP_ATTR_ENCRYPTED_KEY@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x26
	bl	_wpabuf_put_le16
	ldr	w8, [x25]
	lsl	w1, w8, #1
	mov	x0, x26
	bl	_wpabuf_put_le16
	ldr	w1, [x25]
	mov	x0, x26
	bl	_wpabuf_put
	mov	x1, x0
	ldr	w2, [x25]
	mov	x0, x23
	bl	_dpp_bn2bin_pad
	tbnz	x0, #63, LBB0_14
; %bb.23:
	ldr	w1, [x27]
	ldr	w2, [x25]
	mov	x0, x23
	bl	_dpp_bn2bin_pad
	tbnz	x0, #63, LBB0_14
; %bb.24:
	ldr	w1, [x25]
	mov	x0, x26
	bl	_wpabuf_put
	mov	x1, x0
	ldr	w2, [x25]
	mov	x0, x24
	bl	_dpp_bn2bin_pad
	tbz	x0, #63, LBB0_15
	b	LBB0_14
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DPP: Build PKEX Exchange Request"

l_.str.1:                               ; @.str.1
	.asciz	"DPP: X"

l_.str.2:                               ; @.str.2
	.asciz	"DPP: M"

	.comm	_DPP_PA_PKEX_EXCHANGE_REQ,4,2   ; @DPP_PA_PKEX_EXCHANGE_REQ
	.comm	_DPP_ATTR_FINITE_CYCLIC_GROUP,4,2 ; @DPP_ATTR_FINITE_CYCLIC_GROUP
	.comm	_DPP_ATTR_CODE_IDENTIFIER,4,2   ; @DPP_ATTR_CODE_IDENTIFIER
	.comm	_DPP_ATTR_ENCRYPTED_KEY,4,2     ; @DPP_ATTR_ENCRYPTED_KEY
	.comm	_MSG_INFO,4,2                   ; @MSG_INFO
l_.str.3:                               ; @.str.3
	.asciz	"DPP: Failed to build PKEX Exchange Request"

	.comm	_DPP_TEST_INVALID_ENCRYPTED_KEY_PKEX_EXCHANGE_REQ,8,3 ; @DPP_TEST_INVALID_ENCRYPTED_KEY_PKEX_EXCHANGE_REQ
	.comm	_DPP_TEST_NO_ENCRYPTED_KEY_PKEX_EXCHANGE_REQ,8,3 ; @DPP_TEST_NO_ENCRYPTED_KEY_PKEX_EXCHANGE_REQ
	.comm	_DPP_TEST_NO_FINITE_CYCLIC_GROUP_PKEX_EXCHANGE_REQ,8,3 ; @DPP_TEST_NO_FINITE_CYCLIC_GROUP_PKEX_EXCHANGE_REQ
	.comm	_dpp_pkex_ephemeral_key_override,4,2 ; @dpp_pkex_ephemeral_key_override
	.comm	_dpp_pkex_ephemeral_key_override_len,8,3 ; @dpp_pkex_ephemeral_key_override_len
	.comm	_dpp_test,8,3                   ; @dpp_test
	.no_dead_strip	_dpp_pkex_build_exchange_req
.subsections_via_symbols
