	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wps_process_pubkey
_wps_process_pubkey:                    ## @wps_process_pubkey
	.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	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rsi, -64(%rbp)
	movq	%rdx, -56(%rbp)
	testq	%rsi, %rsi
	je	LBB0_5
## %bb.1:
	testq	%rdx, %rdx
	je	LBB0_5
## %bb.2:
	movq	%rdi, %rbx
	cmpq	$0, 24(%rdi)
	je	LBB0_7
## %bb.3:
	movq	%rsp, %r15
	movq	_WPS_HASH_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	leaq	-64(%rbp), %rsi
	leaq	-56(%rbp), %rdx
	movl	$1, %edi
	movq	%r14, %rcx
	callq	_sha256_vector
	movq	16(%rbx), %rsi
	movq	_WPS_OOB_PUBKEY_HASH_LEN@GOTPCREL(%rip), %r12
	movq	(%r12), %rdx
	movq	%r14, %rdi
	callq	_os_memcmp_const
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	_MSG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_wpa_printf
	movq	_MSG_DEBUG@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movq	-64(%rbp), %rdx
	movq	-56(%rbp), %rcx
	leaq	L_.str.2(%rip), %rsi
	callq	_wpa_hexdump
	movl	(%r13), %edi
	movq	(%r12), %rcx
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdx
	callq	_wpa_hexdump
	movl	(%r13), %edi
	movq	16(%rbx), %rdx
	movq	(%r12), %rcx
	leaq	L_.str.4(%rip), %rsi
	callq	_wpa_hexdump
	movq	_WPS_CFG_PUBLIC_KEY_HASH_MISMATCH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movl	$-1, %eax
	movq	%r15, %rsp
	jmp	LBB0_10
LBB0_5:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_wpa_printf
LBB0_9:
	movl	$-1, %eax
	jmp	LBB0_10
LBB0_6:
	movq	%r15, %rsp
LBB0_7:
	movq	(%rbx), %rdi
	callq	_wpabuf_free
	movq	-64(%rbp), %rdi
	movq	-56(%rbp), %rsi
	callq	_wpabuf_alloc_copy
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	%rbx, %rdi
	callq	_wps_derive_keys
	sarq	$63, %rax
LBB0_10:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_12
## %bb.11:
                                        ## kill: def $eax killed $eax killed $rax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"WPS: No Public Key received"

	.comm	_WPS_HASH_LEN,4,2               ## @WPS_HASH_LEN
	.comm	_WPS_OOB_PUBKEY_HASH_LEN,8,3    ## @WPS_OOB_PUBKEY_HASH_LEN
	.comm	_MSG_ERROR,4,2                  ## @MSG_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"WPS: Public Key hash mismatch"

L_.str.2:                               ## @.str.2
	.asciz	"WPS: Received public key"

L_.str.3:                               ## @.str.3
	.asciz	"WPS: Calculated public key hash"

L_.str.4:                               ## @.str.4
	.asciz	"WPS: Expected public key hash"

	.comm	_WPS_CFG_PUBLIC_KEY_HASH_MISMATCH,4,2 ## @WPS_CFG_PUBLIC_KEY_HASH_MISMATCH
	.no_dead_strip	_wps_process_pubkey
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wps_process_pubkey
_wps_process_pubkey:                    ; @wps_process_pubkey
	.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
	sub	sp, sp, #32
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	stp	x2, x1, [x29, #-72]
	cbz	x1, LBB0_5
; %bb.1:
	cbz	x2, LBB0_5
; %bb.2:
	mov	x19, x0
	ldr	x8, [x0, #24]
	cbz	x8, LBB0_8
; %bb.3:
	mov	x21, sp
Lloh3:
	adrp	x8, _WPS_HASH_LEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WPS_HASH_LEN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x20, x9, x8
	mov	sp, x20
	sub	x1, x29, #64
	sub	x2, x29, #72
	mov	w0, #1
	mov	x3, x20
	bl	_sha256_vector
	ldr	x1, [x19, #16]
Lloh8:
	adrp	x22, _WPS_OOB_PUBKEY_HASH_LEN@GOTPAGE
Lloh9:
	ldr	x22, [x22, _WPS_OOB_PUBKEY_HASH_LEN@GOTPAGEOFF]
	ldr	x2, [x22]
	mov	x0, x20
	bl	_os_memcmp_const
	cbz	x0, LBB0_7
; %bb.4:
Lloh10:
	adrp	x8, _MSG_ERROR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MSG_ERROR@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_wpa_printf
Lloh15:
	adrp	x23, _MSG_DEBUG@GOTPAGE
Lloh16:
	ldr	x23, [x23, _MSG_DEBUG@GOTPAGEOFF]
	ldr	w0, [x23]
	ldp	x3, x2, [x29, #-72]
Lloh17:
	adrp	x1, l_.str.2@PAGE
Lloh18:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_wpa_hexdump
	ldr	w0, [x23]
	ldr	x3, [x22]
Lloh19:
	adrp	x1, l_.str.3@PAGE
Lloh20:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x2, x20
	bl	_wpa_hexdump
	ldr	w0, [x23]
	ldr	x2, [x19, #16]
	ldr	x3, [x22]
Lloh21:
	adrp	x1, l_.str.4@PAGE
Lloh22:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_wpa_hexdump
Lloh23:
	adrp	x8, _WPS_CFG_PUBLIC_KEY_HASH_MISMATCH@GOTPAGE
Lloh24:
	ldr	x8, [x8, _WPS_CFG_PUBLIC_KEY_HASH_MISMATCH@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	str	w8, [x19, #8]
	mov	w0, #-1
	mov	sp, x21
	b	LBB0_10
LBB0_5:
Lloh26:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh27:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
Lloh29:
	adrp	x1, l_.str@PAGE
Lloh30:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
LBB0_6:
	mov	w0, #-1
	b	LBB0_10
LBB0_7:
	mov	sp, x21
LBB0_8:
	ldr	x0, [x19]
	bl	_wpabuf_free
	ldp	x1, x0, [x29, #-72]
	bl	_wpabuf_alloc_copy
	str	x0, [x19]
	cbz	x0, LBB0_6
; %bb.9:
	mov	x0, x19
	bl	_wps_derive_keys
	asr	x0, x0, #63
LBB0_10:
	ldur	x8, [x29, #-56]
Lloh31:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh32:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh33:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
                                        ; kill: def $w0 killed $w0 killed $x0
	sub	sp, x29, #48
	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
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"WPS: No Public Key received"

	.comm	_WPS_HASH_LEN,4,2               ; @WPS_HASH_LEN
	.comm	_WPS_OOB_PUBKEY_HASH_LEN,8,3    ; @WPS_OOB_PUBKEY_HASH_LEN
	.comm	_MSG_ERROR,4,2                  ; @MSG_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"WPS: Public Key hash mismatch"

l_.str.2:                               ; @.str.2
	.asciz	"WPS: Received public key"

l_.str.3:                               ; @.str.3
	.asciz	"WPS: Calculated public key hash"

l_.str.4:                               ; @.str.4
	.asciz	"WPS: Expected public key hash"

	.comm	_WPS_CFG_PUBLIC_KEY_HASH_MISMATCH,4,2 ; @WPS_CFG_PUBLIC_KEY_HASH_MISMATCH
	.no_dead_strip	_wps_process_pubkey
.subsections_via_symbols
