	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dpp_pkex_build_exchange_resp
_dpp_pkex_build_exchange_resp:          ## @dpp_pkex_build_exchange_resp
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movl	%esi, %r14d
	movq	%rdi, %r13
	movq	8(%rdi), %rax
	movq	(%rax), %r15
	movl	4(%rdi), %edi
	testl	%edi, %edi
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	je	LBB0_1
## %bb.2:
	callq	_os_strlen
	cltq
	addq	$9, %rax
	jmp	LBB0_3
LBB0_1:
	movl	$5, %eax
LBB0_3:
	movslq	(%r15), %rcx
	leaq	(%rax,%rcx,2), %rsi
	addq	$4, %rsi
	movq	_DPP_PA_PKEX_EXCHANGE_RESP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_dpp_alloc_msg
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_12
## %bb.4:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_dpp_build_attr_status
	cmpl	$0, 4(%r13)
	je	LBB0_6
## %bb.5:
	movq	_DPP_ATTR_CODE_IDENTIFIER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_wpabuf_put_le16
	movl	4(%r13), %edi
	callq	_os_strlen
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_wpabuf_put_le16
	movl	4(%r13), %esi
	movq	%rbx, %rdi
	callq	_wpabuf_put_str
LBB0_6:
	movq	_DPP_STATUS_OK@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jne	LBB0_10
## %bb.7:
	movq	_DPP_ATTR_ENCRYPTED_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_wpabuf_put_le16
	movl	(%r15), %esi
	addl	%esi, %esi
	movq	%rbx, %rdi
	callq	_wpabuf_put_le16
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_wpabuf_put
	movl	(%r15), %edx
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_dpp_bn2bin_pad
	testq	%rax, %rax
	js	LBB0_12
## %bb.8:
	movl	(%r13), %esi
	movl	(%r15), %edx
	movq	%r12, %rdi
	callq	_dpp_bn2bin_pad
	testq	%rax, %rax
	js	LBB0_12
## %bb.9:
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_wpabuf_put
	movl	(%r15), %edx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %esi
	callq	_dpp_bn2bin_pad
	testq	%rax, %rax
	js	LBB0_12
LBB0_10:
	movq	_DPP_STATUS_BAD_GROUP@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jne	LBB0_13
## %bb.11:
	movq	_DPP_ATTR_FINITE_CYCLIC_GROUP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_wpabuf_put_le16
	movq	%rbx, %rdi
	movl	$2, %esi
	callq	_wpabuf_put_le16
	movl	4(%r15), %esi
	movq	%rbx, %rdi
	callq	_wpabuf_put_le16
	jmp	LBB0_13
LBB0_12:
	movq	%rbx, %rdi
	callq	_wpabuf_free
	xorl	%ebx, %ebx
LBB0_13:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DPP_PA_PKEX_EXCHANGE_RESP,4,2  ## @DPP_PA_PKEX_EXCHANGE_RESP
	.comm	_DPP_ATTR_CODE_IDENTIFIER,4,2   ## @DPP_ATTR_CODE_IDENTIFIER
	.comm	_DPP_STATUS_OK,4,2              ## @DPP_STATUS_OK
	.comm	_DPP_ATTR_ENCRYPTED_KEY,4,2     ## @DPP_ATTR_ENCRYPTED_KEY
	.comm	_DPP_STATUS_BAD_GROUP,4,2       ## @DPP_STATUS_BAD_GROUP
	.comm	_DPP_ATTR_FINITE_CYCLIC_GROUP,4,2 ## @DPP_ATTR_FINITE_CYCLIC_GROUP
	.comm	_DPP_TEST_INVALID_ENCRYPTED_KEY_PKEX_EXCHANGE_RESP,8,3 ## @DPP_TEST_INVALID_ENCRYPTED_KEY_PKEX_EXCHANGE_RESP
	.comm	_DPP_TEST_INVALID_STATUS_PKEX_EXCHANGE_RESP,8,3 ## @DPP_TEST_INVALID_STATUS_PKEX_EXCHANGE_RESP
	.comm	_DPP_TEST_NO_ENCRYPTED_KEY_PKEX_EXCHANGE_RESP,8,3 ## @DPP_TEST_NO_ENCRYPTED_KEY_PKEX_EXCHANGE_RESP
	.comm	_DPP_TEST_NO_STATUS_PKEX_EXCHANGE_RESP,8,3 ## @DPP_TEST_NO_STATUS_PKEX_EXCHANGE_RESP
	.comm	_MSG_INFO,4,2                   ## @MSG_INFO
	.comm	_dpp_test,8,3                   ## @dpp_test
	.no_dead_strip	_dpp_pkex_build_exchange_resp
.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_resp
_dpp_pkex_build_exchange_resp:          ; @dpp_pkex_build_exchange_resp
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x3
	mov	x22, x2
	mov	x19, x1
	mov	x23, x0
	ldr	x8, [x0, #8]
	ldr	x24, [x8]
	ldr	w0, [x0, #4]
	cbz	w0, LBB0_2
; %bb.1:
	bl	_os_strlen
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	add	x8, x8, #9
	b	LBB0_3
LBB0_2:
	mov	w8, #5
LBB0_3:
	ldrsw	x9, [x24]
	add	x8, x8, x9, lsl #1
	add	x1, x8, #4
Lloh0:
	adrp	x8, _DPP_PA_PKEX_EXCHANGE_RESP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DPP_PA_PKEX_EXCHANGE_RESP@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_dpp_alloc_msg
	mov	x20, x0
	cbz	x0, LBB0_12
; %bb.4:
	mov	x0, x20
	mov	x1, x19
	bl	_dpp_build_attr_status
	ldr	w8, [x23, #4]
	cbz	w8, LBB0_6
; %bb.5:
Lloh3:
	adrp	x8, _DPP_ATTR_CODE_IDENTIFIER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DPP_ATTR_CODE_IDENTIFIER@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_wpabuf_put_le16
	ldr	w0, [x23, #4]
	bl	_os_strlen
	mov	x1, x0
	mov	x0, x20
	bl	_wpabuf_put_le16
	ldr	w1, [x23, #4]
	mov	x0, x20
	bl	_wpabuf_put_str
LBB0_6:
Lloh6:
	adrp	x8, _DPP_STATUS_OK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DPP_STATUS_OK@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w8, w19
	b.ne	LBB0_10
; %bb.7:
Lloh9:
	adrp	x8, _DPP_ATTR_ENCRYPTED_KEY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DPP_ATTR_ENCRYPTED_KEY@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_wpabuf_put_le16
	ldr	w8, [x24]
	lsl	w1, w8, #1
	mov	x0, x20
	bl	_wpabuf_put_le16
	ldr	w1, [x24]
	mov	x0, x20
	bl	_wpabuf_put
	mov	x1, x0
	ldr	w2, [x24]
	mov	x0, x22
	bl	_dpp_bn2bin_pad
	tbnz	x0, #63, LBB0_12
; %bb.8:
	ldr	w1, [x23]
	ldr	w2, [x24]
	mov	x0, x22
	bl	_dpp_bn2bin_pad
	tbnz	x0, #63, LBB0_12
; %bb.9:
	ldr	w1, [x24]
	mov	x0, x20
	bl	_wpabuf_put
	mov	x1, x0
	ldr	w2, [x24]
	mov	x0, x21
	bl	_dpp_bn2bin_pad
	tbnz	x0, #63, LBB0_12
LBB0_10:
Lloh12:
	adrp	x8, _DPP_STATUS_BAD_GROUP@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DPP_STATUS_BAD_GROUP@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w8, w19
	b.ne	LBB0_13
; %bb.11:
Lloh15:
	adrp	x8, _DPP_ATTR_FINITE_CYCLIC_GROUP@GOTPAGE
Lloh16:
	ldr	x8, [x8, _DPP_ATTR_FINITE_CYCLIC_GROUP@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_wpabuf_put_le16
	mov	x0, x20
	mov	w1, #2
	bl	_wpabuf_put_le16
	ldr	w1, [x24, #4]
	mov	x0, x20
	bl	_wpabuf_put_le16
	b	LBB0_13
LBB0_12:
	mov	x0, x20
	bl	_wpabuf_free
	mov	x20, #0
LBB0_13:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_DPP_PA_PKEX_EXCHANGE_RESP,4,2  ; @DPP_PA_PKEX_EXCHANGE_RESP
	.comm	_DPP_ATTR_CODE_IDENTIFIER,4,2   ; @DPP_ATTR_CODE_IDENTIFIER
	.comm	_DPP_STATUS_OK,4,2              ; @DPP_STATUS_OK
	.comm	_DPP_ATTR_ENCRYPTED_KEY,4,2     ; @DPP_ATTR_ENCRYPTED_KEY
	.comm	_DPP_STATUS_BAD_GROUP,4,2       ; @DPP_STATUS_BAD_GROUP
	.comm	_DPP_ATTR_FINITE_CYCLIC_GROUP,4,2 ; @DPP_ATTR_FINITE_CYCLIC_GROUP
	.comm	_DPP_TEST_INVALID_ENCRYPTED_KEY_PKEX_EXCHANGE_RESP,8,3 ; @DPP_TEST_INVALID_ENCRYPTED_KEY_PKEX_EXCHANGE_RESP
	.comm	_DPP_TEST_INVALID_STATUS_PKEX_EXCHANGE_RESP,8,3 ; @DPP_TEST_INVALID_STATUS_PKEX_EXCHANGE_RESP
	.comm	_DPP_TEST_NO_ENCRYPTED_KEY_PKEX_EXCHANGE_RESP,8,3 ; @DPP_TEST_NO_ENCRYPTED_KEY_PKEX_EXCHANGE_RESP
	.comm	_DPP_TEST_NO_STATUS_PKEX_EXCHANGE_RESP,8,3 ; @DPP_TEST_NO_STATUS_PKEX_EXCHANGE_RESP
	.comm	_MSG_INFO,4,2                   ; @MSG_INFO
	.comm	_dpp_test,8,3                   ; @dpp_test
	.no_dead_strip	_dpp_pkex_build_exchange_resp
.subsections_via_symbols
