	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wps_build_public_key           ## -- Begin function wps_build_public_key
	.p2align	4, 0x90
_wps_build_public_key:                  ## @wps_build_public_key
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	$0, -40(%rbp)
	movq	_MSG_DEBUG@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	leaq	L_.str(%rip), %rsi
	callq	_wpa_printf
	leaq	32(%rbx), %r15
	movq	32(%rbx), %rdi
	callq	_wpabuf_clear_free
	movq	$0, 32(%rbx)
	movl	(%rbx), %eax
	movq	_DEV_PW_DEFAULT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_5
## %bb.1:
	movq	48(%rbx), %rax
	cmpq	$0, 48(%rax)
	je	LBB0_5
## %bb.2:
	cmpq	$0, 40(%rax)
	je	LBB0_5
## %bb.3:
	movl	(%r12), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_wpa_printf
	movq	48(%rbx), %rax
	cmpq	$0, 32(%rax)
	je	LBB0_14
## %bb.4:
	movq	48(%rax), %rdi
	callq	_wpabuf_dup
	movq	%rax, 32(%rbx)
	movq	48(%rbx), %rax
	movq	40(%rax), %rcx
	movq	%rcx, 40(%rbx)
	movq	$0, 40(%rax)
	movq	32(%rax), %rdi
	callq	_wpabuf_dup
	jmp	LBB0_6
LBB0_5:
	movl	(%r12), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_wpa_printf
	movq	40(%rbx), %rdi
	callq	_dh5_free
	leaq	-40(%rbp), %rsi
	movq	%r15, %rdi
	callq	_dh5_init
	movq	%rax, 40(%rbx)
	movq	-40(%rbp), %rdi
	movl	$192, %esi
	callq	_wpabuf_zeropad
LBB0_6:
	movq	%rax, -40(%rbp)
	cmpq	$0, 40(%rbx)
	je	LBB0_11
## %bb.7:
	movq	(%r15), %rdx
	testq	%rdx, %rdx
	je	LBB0_11
## %bb.8:
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:
	movl	(%r12), %edi
	leaq	L_.str.5(%rip), %rsi
	callq	_wpa_hexdump_buf_key
	movl	(%r12), %edi
	movq	-40(%rbp), %rdx
	leaq	L_.str.6(%rip), %rsi
	callq	_wpa_hexdump_buf
	movq	_ATTR_PUBLIC_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_wpabuf_put_be16
	movq	-40(%rbp), %rdi
	callq	_wpabuf_len
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_wpabuf_put_be16
	movq	-40(%rbp), %rsi
	movq	%r14, %rdi
	callq	_wpabuf_put_buf
	cmpq	$0, 24(%rbx)
	je	LBB0_12
## %bb.10:
	movq	16(%rbx), %rdi
	callq	_wpabuf_free
	movq	-40(%rbp), %rax
	movq	%rax, 16(%rbx)
	jmp	LBB0_13
LBB0_11:
	movl	(%r12), %edi
	leaq	L_.str.4(%rip), %rsi
	callq	_wpa_printf
	movq	-40(%rbp), %rdi
	callq	_wpabuf_free
LBB0_15:
	movl	$-1, %eax
	jmp	LBB0_16
LBB0_12:
	movq	8(%rbx), %rdi
	callq	_wpabuf_free
	movq	-40(%rbp), %rax
	movq	%rax, 8(%rbx)
LBB0_13:
	xorl	%eax, %eax
LBB0_16:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movl	(%r12), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_wpa_printf
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"WPS:  * Public Key"

	.comm	_DEV_PW_DEFAULT,4,2             ## @DEV_PW_DEFAULT
L_.str.1:                               ## @.str.1
	.asciz	"WPS: Using pre-configured DH keys"

L_.str.2:                               ## @.str.2
	.asciz	"WPS: wps->wps->dh_pubkey == NULL"

L_.str.3:                               ## @.str.3
	.asciz	"WPS: Generate new DH keys"

L_.str.4:                               ## @.str.4
	.asciz	"WPS: Failed to initialize Diffie-Hellman handshake"

L_.str.5:                               ## @.str.5
	.asciz	"WPS: DH Private Key"

L_.str.6:                               ## @.str.6
	.asciz	"WPS: DH own Public Key"

	.comm	_ATTR_PUBLIC_KEY,4,2            ## @ATTR_PUBLIC_KEY
	.comm	_DEV_PW_NFC_CONNECTION_HANDOVER,4,2 ## @DEV_PW_NFC_CONNECTION_HANDOVER
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wps_build_public_key           ; -- Begin function wps_build_public_key
	.p2align	2
_wps_build_public_key:                  ; @wps_build_public_key
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x1
	mov	x19, x0
	str	xzr, [sp, #8]
Lloh0:
	adrp	x22, _MSG_DEBUG@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MSG_DEBUG@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
	mov	x21, x19
	ldr	x0, [x21, #32]!
	bl	_wpabuf_clear_free
	str	xzr, [x21]
	ldr	w8, [x19]
Lloh4:
	adrp	x9, _DEV_PW_DEFAULT@GOTPAGE
Lloh5:
	ldr	x9, [x9, _DEV_PW_DEFAULT@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_5
; %bb.1:
	ldr	x8, [x19, #48]
	ldr	x9, [x8, #48]
	cbz	x9, LBB0_5
; %bb.2:
	ldr	x8, [x8, #40]
	cbz	x8, LBB0_5
; %bb.3:
	ldr	w0, [x22]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_wpa_printf
	ldr	x8, [x19, #48]
	ldr	x9, [x8, #32]
	cbz	x9, LBB0_15
; %bb.4:
	ldr	x0, [x8, #48]
	bl	_wpabuf_dup
	ldr	x9, [x19, #48]
	ldp	x8, x10, [x9, #32]
	stp	x0, x10, [x19, #32]
	str	xzr, [x9, #40]
	mov	x0, x8
	bl	_wpabuf_dup
	b	LBB0_6
LBB0_5:
	ldr	w0, [x22]
Lloh9:
	adrp	x1, l_.str.3@PAGE
Lloh10:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_wpa_printf
	ldr	x0, [x19, #40]
	bl	_dh5_free
	add	x1, sp, #8
	mov	x0, x21
	bl	_dh5_init
	str	x0, [x19, #40]
	ldr	x0, [sp, #8]
	mov	w1, #192
	bl	_wpabuf_zeropad
LBB0_6:
	str	x0, [sp, #8]
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_11
; %bb.7:
	ldr	x2, [x21]
	cbz	x2, LBB0_11
; %bb.8:
	cbz	x0, LBB0_11
; %bb.9:
	ldr	w0, [x22]
Lloh11:
	adrp	x1, l_.str.5@PAGE
Lloh12:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_wpa_hexdump_buf_key
	ldr	w0, [x22]
	ldr	x2, [sp, #8]
Lloh13:
	adrp	x1, l_.str.6@PAGE
Lloh14:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_wpa_hexdump_buf
Lloh15:
	adrp	x8, _ATTR_PUBLIC_KEY@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ATTR_PUBLIC_KEY@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_wpabuf_put_be16
	ldr	x0, [sp, #8]
	bl	_wpabuf_len
	mov	x1, x0
	mov	x0, x20
	bl	_wpabuf_put_be16
	ldr	x1, [sp, #8]
	mov	x0, x20
	bl	_wpabuf_put_buf
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_14
; %bb.10:
	ldr	x0, [x19, #16]
	bl	_wpabuf_free
	mov	w0, #0
	ldr	x8, [sp, #8]
	str	x8, [x19, #16]
	b	LBB0_13
LBB0_11:
	ldr	w0, [x22]
Lloh18:
	adrp	x1, l_.str.4@PAGE
Lloh19:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_wpa_printf
	ldr	x0, [sp, #8]
	bl	_wpabuf_free
LBB0_12:
	mov	w0, #-1
LBB0_13:
	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
	add	sp, sp, #64
	ret
LBB0_14:
	ldr	x0, [x19, #8]
	bl	_wpabuf_free
	mov	w0, #0
	ldr	x8, [sp, #8]
	str	x8, [x19, #8]
	b	LBB0_13
LBB0_15:
	ldr	w0, [x22]
Lloh20:
	adrp	x1, l_.str.2@PAGE
Lloh21:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_wpa_printf
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"WPS:  * Public Key"

	.comm	_DEV_PW_DEFAULT,4,2             ; @DEV_PW_DEFAULT
l_.str.1:                               ; @.str.1
	.asciz	"WPS: Using pre-configured DH keys"

l_.str.2:                               ; @.str.2
	.asciz	"WPS: wps->wps->dh_pubkey == NULL"

l_.str.3:                               ; @.str.3
	.asciz	"WPS: Generate new DH keys"

l_.str.4:                               ; @.str.4
	.asciz	"WPS: Failed to initialize Diffie-Hellman handshake"

l_.str.5:                               ; @.str.5
	.asciz	"WPS: DH Private Key"

l_.str.6:                               ; @.str.6
	.asciz	"WPS: DH own Public Key"

	.comm	_ATTR_PUBLIC_KEY,4,2            ; @ATTR_PUBLIC_KEY
	.comm	_DEV_PW_NFC_CONNECTION_HANDOVER,4,2 ; @DEV_PW_NFC_CONNECTION_HANDOVER
.subsections_via_symbols
