	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wps_build_m1
_wps_build_m1:                          ## @wps_build_m1
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	52(%rdi), %edi
	movq	_WPS_NONCE_LEN@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	callq	_random_get_bytes
	testq	%rax, %rax
	js	LBB0_30
## %bb.1:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movl	52(%r14), %edx
	movl	(%rbx), %ecx
	leaq	L_.str(%rip), %rsi
	callq	_wpa_hexdump
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_wpa_printf
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_wpabuf_alloc
	testq	%rax, %rax
	je	LBB0_30
## %bb.2:
	movq	%rax, %rbx
	movq	16(%r14), %rax
	movl	(%rax), %r12d
	cmpq	$0, 24(%rax)
	je	LBB0_7
## %bb.3:
	cmpl	$0, 48(%r14)
	jne	LBB0_7
## %bb.4:
	cmpq	$0, (%r14)
	jne	LBB0_6
## %bb.5:
	movq	_WPS_CONFIG_DISPLAY@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_7
LBB0_6:
	movq	_WPS_CONFIG_PUSHBUTTON@GOTPCREL(%rip), %rax
	movq	_WPS_CONFIG_VIRT_PUSHBUTTON@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_WPS_CONFIG_PHY_PUSHBUTTON@GOTPCREL(%rip), %rdx
	orl	(%rax), %ecx
	orl	(%rdx), %ecx
	notl	%ecx
	andl	%ecx, %r12d
LBB0_7:
	xorl	%r15d, %r15d
	cmpq	$0, 40(%r14)
	je	LBB0_9
## %bb.8:
	movq	_MULTI_AP_BACKHAUL_STA@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_9:
	movq	%rbx, %rdi
	callq	_wps_build_version
	testq	%rax, %rax
	jne	LBB0_28
## %bb.10:
	movq	_WPS_M1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_wps_build_msg_type
	testq	%rax, %rax
	jne	LBB0_28
## %bb.11:
	movl	32(%r14), %esi
	movq	%rbx, %rdi
	callq	_wps_build_uuid_e
	testq	%rax, %rax
	jne	LBB0_28
## %bb.12:
	movl	28(%r14), %esi
	movq	%rbx, %rdi
	callq	_wps_build_mac_addr
	testq	%rax, %rax
	jne	LBB0_28
## %bb.13:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_wps_build_enrollee_nonce
	testq	%rax, %rax
	jne	LBB0_28
## %bb.14:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_wps_build_public_key
	testq	%rax, %rax
	jne	LBB0_28
## %bb.15:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_wps_build_auth_type_flags
	testq	%rax, %rax
	jne	LBB0_28
## %bb.16:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_wps_build_encr_type_flags
	testq	%rax, %rax
	jne	LBB0_28
## %bb.17:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_wps_build_conn_type_flags
	testq	%rax, %rax
	jne	LBB0_28
## %bb.18:
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_wps_build_config_methods
	testq	%rax, %rax
	jne	LBB0_28
## %bb.19:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_wps_build_wps_state
	testq	%rax, %rax
	jne	LBB0_28
## %bb.20:
	movq	16(%r14), %rdi
	addq	$4, %rdi
	movq	%rbx, %rsi
	callq	_wps_build_device_attrs
	testq	%rax, %rax
	jne	LBB0_28
## %bb.21:
	movq	16(%r14), %rax
	leaq	4(%rax), %r12
	movl	8(%rax), %edi
	callq	*16(%rax)
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_wps_build_rf_bands
	testq	%rax, %rax
	jne	LBB0_28
## %bb.22:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_wps_build_assoc_state
	testq	%rax, %rax
	jne	LBB0_28
## %bb.23:
	movl	24(%r14), %esi
	movq	%rbx, %rdi
	callq	_wps_build_dev_password_id
	testq	%rax, %rax
	jne	LBB0_28
## %bb.24:
	movq	_WPS_CFG_NO_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_wps_build_config_error
	testq	%rax, %rax
	jne	LBB0_28
## %bb.25:
	movq	16(%r14), %rdi
	addq	$4, %rdi
	movq	%rbx, %rsi
	callq	_wps_build_os_version
	testq	%rax, %rax
	jne	LBB0_28
## %bb.26:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movl	%r15d, %r8d
	callq	_wps_build_wfa_ext
	testq	%rax, %rax
	jne	LBB0_28
## %bb.27:
	movq	16(%r14), %rdi
	addq	$4, %rdi
	movq	%rbx, %rsi
	callq	_wps_build_vendor_ext_m1
	testq	%rax, %rax
	je	LBB0_32
LBB0_28:
	movq	%rbx, %rdi
	callq	_wpabuf_free
LBB0_30:
	xorl	%ebx, %ebx
LBB0_31:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_32:
	movq	_RECV_M2@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r14)
	jmp	LBB0_31
	.cfi_endproc
                                        ## -- End function
	.comm	_WPS_NONCE_LEN,4,2              ## @WPS_NONCE_LEN
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"WPS: Enrollee Nonce"

L_.str.1:                               ## @.str.1
	.asciz	"WPS: Building Message M1"

	.comm	_WPS_CONFIG_DISPLAY,4,2         ## @WPS_CONFIG_DISPLAY
	.comm	_WPS_CONFIG_PUSHBUTTON,4,2      ## @WPS_CONFIG_PUSHBUTTON
	.comm	_WPS_CONFIG_VIRT_PUSHBUTTON,4,2 ## @WPS_CONFIG_VIRT_PUSHBUTTON
	.comm	_WPS_CONFIG_PHY_PUSHBUTTON,4,2  ## @WPS_CONFIG_PHY_PUSHBUTTON
	.comm	_MULTI_AP_BACKHAUL_STA,4,2      ## @MULTI_AP_BACKHAUL_STA
	.comm	_WPS_M1,4,2                     ## @WPS_M1
	.comm	_WPS_CFG_NO_ERROR,4,2           ## @WPS_CFG_NO_ERROR
	.comm	_RECV_M2,4,2                    ## @RECV_M2
	.no_dead_strip	_wps_build_m1
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wps_build_m1
_wps_build_m1:                          ; @wps_build_m1
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x19, x0
	ldr	w0, [x0, #52]
Lloh0:
	adrp	x20, _WPS_NONCE_LEN@GOTPAGE
Lloh1:
	ldr	x20, [x20, _WPS_NONCE_LEN@GOTPAGEOFF]
	ldr	w1, [x20]
	bl	_random_get_bytes
	tbnz	x0, #63, LBB0_27
; %bb.1:
Lloh2:
	adrp	x21, _MSG_DEBUG@GOTPAGE
Lloh3:
	ldr	x21, [x21, _MSG_DEBUG@GOTPAGEOFF]
	ldr	w0, [x21]
	ldr	w2, [x19, #52]
	ldr	w3, [x20]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_hexdump
	ldr	w0, [x21]
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_wpa_printf
	mov	w0, #1000
	bl	_wpabuf_alloc
	mov	x20, x0
	cbz	x0, LBB0_28
; %bb.2:
	ldr	x8, [x19, #16]
	ldr	w22, [x8]
	ldr	x8, [x8, #24]
	cbz	x8, LBB0_7
; %bb.3:
	ldr	w8, [x19, #48]
	cbnz	w8, LBB0_7
; %bb.4:
	ldr	x8, [x19]
	cbnz	x8, LBB0_6
; %bb.5:
Lloh8:
	adrp	x8, _WPS_CONFIG_DISPLAY@GOTPAGE
Lloh9:
	ldr	x8, [x8, _WPS_CONFIG_DISPLAY@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_7
LBB0_6:
Lloh11:
	adrp	x8, _WPS_CONFIG_PUSHBUTTON@GOTPAGE
Lloh12:
	ldr	x8, [x8, _WPS_CONFIG_PUSHBUTTON@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _WPS_CONFIG_VIRT_PUSHBUTTON@GOTPAGE
Lloh15:
	ldr	x9, [x9, _WPS_CONFIG_VIRT_PUSHBUTTON@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
Lloh17:
	adrp	x10, _WPS_CONFIG_PHY_PUSHBUTTON@GOTPAGE
Lloh18:
	ldr	x10, [x10, _WPS_CONFIG_PHY_PUSHBUTTON@GOTPAGEOFF]
Lloh19:
	ldr	w10, [x10]
	orr	w8, w9, w8
	orr	w8, w8, w10
	bic	w22, w22, w8
LBB0_7:
	ldr	x8, [x19, #40]
Lloh20:
	adrp	x9, _MULTI_AP_BACKHAUL_STA@GOTPAGE
Lloh21:
	ldr	x9, [x9, _MULTI_AP_BACKHAUL_STA@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	cmp	x8, #0
	csel	w21, wzr, w9, eq
	mov	x0, x20
	bl	_wps_build_version
	cbnz	x0, LBB0_26
; %bb.8:
Lloh23:
	adrp	x8, _WPS_M1@GOTPAGE
Lloh24:
	ldr	x8, [x8, _WPS_M1@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_wps_build_msg_type
	cbnz	x0, LBB0_26
; %bb.9:
	ldr	w1, [x19, #32]
	mov	x0, x20
	bl	_wps_build_uuid_e
	cbnz	x0, LBB0_26
; %bb.10:
	ldr	w1, [x19, #28]
	mov	x0, x20
	bl	_wps_build_mac_addr
	cbnz	x0, LBB0_26
; %bb.11:
	mov	x0, x19
	mov	x1, x20
	bl	_wps_build_enrollee_nonce
	cbnz	x0, LBB0_26
; %bb.12:
	mov	x0, x19
	mov	x1, x20
	bl	_wps_build_public_key
	cbnz	x0, LBB0_26
; %bb.13:
	mov	x0, x19
	mov	x1, x20
	bl	_wps_build_auth_type_flags
	cbnz	x0, LBB0_26
; %bb.14:
	mov	x0, x19
	mov	x1, x20
	bl	_wps_build_encr_type_flags
	cbnz	x0, LBB0_26
; %bb.15:
	mov	x0, x19
	mov	x1, x20
	bl	_wps_build_conn_type_flags
	cbnz	x0, LBB0_26
; %bb.16:
	mov	x0, x20
	mov	x1, x22
	bl	_wps_build_config_methods
	cbnz	x0, LBB0_26
; %bb.17:
	mov	x0, x19
	mov	x1, x20
	bl	_wps_build_wps_state
	cbnz	x0, LBB0_26
; %bb.18:
	ldr	x8, [x19, #16]
	add	x0, x8, #4
	mov	x1, x20
	bl	_wps_build_device_attrs
	cbnz	x0, LBB0_26
; %bb.19:
	ldr	x8, [x19, #16]
	add	x22, x8, #4
	ldr	x9, [x8, #16]
	ldr	w0, [x8, #8]
	blr	x9
	mov	x2, x0
	mov	x0, x22
	mov	x1, x20
	bl	_wps_build_rf_bands
	cbnz	x0, LBB0_26
; %bb.20:
	mov	x0, x19
	mov	x1, x20
	bl	_wps_build_assoc_state
	cbnz	x0, LBB0_26
; %bb.21:
	ldr	w1, [x19, #24]
	mov	x0, x20
	bl	_wps_build_dev_password_id
	cbnz	x0, LBB0_26
; %bb.22:
Lloh26:
	adrp	x8, _WPS_CFG_NO_ERROR@GOTPAGE
Lloh27:
	ldr	x8, [x8, _WPS_CFG_NO_ERROR@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_wps_build_config_error
	cbnz	x0, LBB0_26
; %bb.23:
	ldr	x8, [x19, #16]
	add	x0, x8, #4
	mov	x1, x20
	bl	_wps_build_os_version
	cbnz	x0, LBB0_26
; %bb.24:
	mov	x0, x20
	mov	w1, #0
	mov	x2, #0
	mov	w3, #0
	mov	x4, x21
	bl	_wps_build_wfa_ext
	cbnz	x0, LBB0_26
; %bb.25:
	ldr	x8, [x19, #16]
	add	x0, x8, #4
	mov	x1, x20
	bl	_wps_build_vendor_ext_m1
	cbz	x0, LBB0_29
LBB0_26:
	mov	x0, x20
	bl	_wpabuf_free
LBB0_27:
	mov	x20, #0
LBB0_28:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_29:
Lloh29:
	adrp	x8, _RECV_M2@GOTPAGE
Lloh30:
	ldr	x8, [x8, _RECV_M2@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	str	w8, [x19, #8]
	b	LBB0_28
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_WPS_NONCE_LEN,4,2              ; @WPS_NONCE_LEN
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"WPS: Enrollee Nonce"

l_.str.1:                               ; @.str.1
	.asciz	"WPS: Building Message M1"

	.comm	_WPS_CONFIG_DISPLAY,4,2         ; @WPS_CONFIG_DISPLAY
	.comm	_WPS_CONFIG_PUSHBUTTON,4,2      ; @WPS_CONFIG_PUSHBUTTON
	.comm	_WPS_CONFIG_VIRT_PUSHBUTTON,4,2 ; @WPS_CONFIG_VIRT_PUSHBUTTON
	.comm	_WPS_CONFIG_PHY_PUSHBUTTON,4,2  ; @WPS_CONFIG_PHY_PUSHBUTTON
	.comm	_MULTI_AP_BACKHAUL_STA,4,2      ; @MULTI_AP_BACKHAUL_STA
	.comm	_WPS_M1,4,2                     ; @WPS_M1
	.comm	_WPS_CFG_NO_ERROR,4,2           ; @WPS_CFG_NO_ERROR
	.comm	_RECV_M2,4,2                    ; @RECV_M2
	.no_dead_strip	_wps_build_m1
.subsections_via_symbols
