	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wps_build_cred_network_key
_wps_build_cred_network_key:            ## @wps_build_cred_network_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$216, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_WPS_AUTH_WPAPSK@GOTPCREL(%rip), %rax
	movq	_WPS_AUTH_WPA2PSK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	(%rdi), %rax
	movl	4(%rax), %edx
	testl	%ecx, (%rax)
	je	LBB0_7
## %bb.1:
	testl	%edx, %edx
	jne	LBB0_7
## %bb.2:
	xorl	%eax, %eax
	callq	_random_pool_ready
	cmpl	$1, %eax
	jne	LBB0_4
## %bb.3:
	leaq	-256(%rbp), %rdi
	movl	$128, %esi
	callq	_random_get_bytes
	testq	%rax, %rax
	js	LBB0_4
## %bb.5:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	leaq	-256(%rbp), %r12
	movq	%r12, %rdx
	movl	$128, %ecx
	callq	_wpa_hexdump_key
	movl	(%r15), %edi
	movl	16(%rbx), %edx
	addl	%edx, %edx
	leaq	L_.str.2(%rip), %rsi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_wpa_printf
	leaq	-128(%rbp), %r13
	movq	%r13, %rdi
	movl	$65, %esi
	movq	%r12, %rdx
	movl	$128, %ecx
	callq	_wpa_snprintf_hex
	movq	_ATTR_NETWORK_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_wpabuf_put_be16
	movq	%r14, %rdi
	movl	$256, %esi                      ## imm = 0x100
	callq	_wpabuf_put_be16
	movq	%r14, %rdi
	movq	%r13, %rsi
	movl	$256, %edx                      ## imm = 0x100
	callq	_wpabuf_put_data
	movq	(%rbx), %rax
	movq	16(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.6:
	movl	8(%rbx), %edx
	movl	12(%rbx), %esi
	leaq	-256(%rbp), %rcx
	movl	$128, %r8d
	callq	_wps_cb_new_psk
	jmp	LBB0_8
LBB0_7:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_wpa_printf
	movq	_ATTR_NETWORK_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_wpabuf_put_be16
	movq	(%rbx), %rax
	movl	4(%rax), %esi
	movq	%r14, %rdi
	callq	_wpabuf_put_be16
	movq	(%rbx), %rax
	movq	8(%rax), %rsi
	movl	4(%rax), %edx
	movq	%r14, %rdi
	callq	_wpabuf_put_data
	jmp	LBB0_8
LBB0_4:
	movq	_MSG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_wpa_printf
	movl	$-1, %r15d
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_10
## %bb.9:
	movl	%r15d, %eax
	addq	$216, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_WPS_AUTH_WPAPSK,4,2            ## @WPS_AUTH_WPAPSK
	.comm	_WPS_AUTH_WPA2PSK,4,2           ## @WPS_AUTH_WPA2PSK
	.comm	_MSG_INFO,4,2                   ## @MSG_INFO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"WPS: Could not generate random PSK"

	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
L_.str.1:                               ## @.str.1
	.asciz	"WPS: Generated per-device PSK"

L_.str.2:                               ## @.str.2
	.asciz	"WPS:  * Network Key (len=%u)"

	.comm	_ATTR_NETWORK_KEY,4,2           ## @ATTR_NETWORK_KEY
	.no_dead_strip	_wps_build_cred_network_key
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wps_build_cred_network_key
_wps_build_cred_network_key:            ; @wps_build_cred_network_key
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #272
	.cfi_def_cfa_offset 272
	stp	x22, x21, [sp, #224]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #240]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #256]            ; 16-byte Folded Spill
	add	x29, sp, #256
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	ldr	x8, [x0]
Lloh3:
	adrp	x9, _WPS_AUTH_WPAPSK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _WPS_AUTH_WPAPSK@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _WPS_AUTH_WPA2PSK@GOTPAGE
Lloh7:
	ldr	x10, [x10, _WPS_AUTH_WPA2PSK@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	orr	w9, w10, w9
	ldp	w10, w8, [x8]
	and	w9, w9, w10
	cmp	w9, #0
	ccmp	w8, #0, #0, ne
	b.eq	LBB0_3
; %bb.1:
Lloh9:
	adrp	x9, _MSG_DEBUG@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MSG_DEBUG@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x9]
	str	x8, [sp]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_wpa_printf
Lloh14:
	adrp	x8, _ATTR_NETWORK_KEY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ATTR_NETWORK_KEY@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_wpabuf_put_be16
	ldr	x8, [x19]
	ldr	w1, [x8, #4]
	mov	x0, x20
	bl	_wpabuf_put_be16
	ldr	x8, [x19]
	ldr	x1, [x8, #8]
	ldr	w2, [x8, #4]
	mov	x0, x20
	bl	_wpabuf_put_data
LBB0_2:
	mov	w0, #0
	b	LBB0_8
LBB0_3:
	bl	_random_pool_ready
	cmp	w0, #1
	b.ne	LBB0_7
; %bb.4:
	add	x0, sp, #20
	mov	w1, #128
	bl	_random_get_bytes
	tbnz	x0, #63, LBB0_7
; %bb.5:
Lloh17:
	adrp	x21, _MSG_DEBUG@GOTPAGE
Lloh18:
	ldr	x21, [x21, _MSG_DEBUG@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x2, sp, #20
	mov	w3, #128
	bl	_wpa_hexdump_key
	ldr	w0, [x21]
	ldr	w8, [x19, #16]
	lsl	w8, w8, #1
	str	x8, [sp]
Lloh21:
	adrp	x1, l_.str.2@PAGE
Lloh22:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_wpa_printf
	sub	x0, x29, #105
	add	x2, sp, #20
	mov	w1, #65
	mov	w3, #128
	bl	_wpa_snprintf_hex
Lloh23:
	adrp	x8, _ATTR_NETWORK_KEY@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ATTR_NETWORK_KEY@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_wpabuf_put_be16
	mov	x0, x20
	mov	w1, #256
	bl	_wpabuf_put_be16
	sub	x1, x29, #105
	mov	x0, x20
	mov	w2, #256
	bl	_wpabuf_put_data
	ldr	x8, [x19]
	ldr	x0, [x8, #16]
	cbz	x0, LBB0_8
; %bb.6:
	ldp	w2, w1, [x19, #8]
	add	x3, sp, #20
	mov	w4, #128
	bl	_wps_cb_new_psk
	b	LBB0_2
LBB0_7:
Lloh26:
	adrp	x8, _MSG_INFO@GOTPAGE
Lloh27:
	ldr	x8, [x8, _MSG_INFO@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
Lloh29:
	adrp	x1, l_.str@PAGE
Lloh30:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
	mov	w0, #-1
LBB0_8:
	ldur	x8, [x29, #-40]
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_10
; %bb.9:
	ldp	x29, x30, [sp, #256]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #240]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #224]            ; 16-byte Folded Reload
	add	sp, sp, #272
	ret
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_WPS_AUTH_WPAPSK,4,2            ; @WPS_AUTH_WPAPSK
	.comm	_WPS_AUTH_WPA2PSK,4,2           ; @WPS_AUTH_WPA2PSK
	.comm	_MSG_INFO,4,2                   ; @MSG_INFO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"WPS: Could not generate random PSK"

	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
l_.str.1:                               ; @.str.1
	.asciz	"WPS: Generated per-device PSK"

l_.str.2:                               ; @.str.2
	.asciz	"WPS:  * Network Key (len=%u)"

	.comm	_ATTR_NETWORK_KEY,4,2           ; @ATTR_NETWORK_KEY
	.no_dead_strip	_wps_build_cred_network_key
.subsections_via_symbols
