	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wps_build_m2
_wps_build_m2:                          ## @wps_build_m2
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	32(%rdi), %edi
	movq	_WPS_NONCE_LEN@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	callq	_random_get_bytes
	testq	%rax, %rax
	js	LBB0_23
## %bb.1:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movl	32(%r14), %edx
	movl	(%rbx), %ecx
	leaq	L_.str(%rip), %rsi
	callq	_wpa_hexdump
	movl	(%r15), %edi
	movl	28(%r14), %edx
	movq	_WPS_UUID_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str.1(%rip), %rsi
	callq	_wpa_hexdump
	movl	(%r15), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_wpa_printf
	movl	$1000, %edi                     ## imm = 0x3E8
	callq	_wpabuf_alloc
	testq	%rax, %rax
	je	LBB0_23
## %bb.2:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_wps_build_version
	testq	%rax, %rax
	jne	LBB0_21
## %bb.3:
	movq	_WPS_M2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_wps_build_msg_type
	testq	%rax, %rax
	jne	LBB0_21
## %bb.4:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_wps_build_enrollee_nonce
	testq	%rax, %rax
	jne	LBB0_21
## %bb.5:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_wps_build_registrar_nonce
	testq	%rax, %rax
	jne	LBB0_21
## %bb.6:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_wps_build_uuid_r
	testq	%rax, %rax
	jne	LBB0_21
## %bb.7:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_wps_build_public_key
	testq	%rax, %rax
	jne	LBB0_21
## %bb.8:
	movq	%r14, %rdi
	callq	_wps_derive_keys
	testq	%rax, %rax
	jne	LBB0_21
## %bb.9:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_wps_build_auth_type_flags
	testq	%rax, %rax
	jne	LBB0_21
## %bb.10:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_wps_build_encr_type_flags
	testq	%rax, %rax
	jne	LBB0_21
## %bb.11:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_wps_build_conn_type_flags
	testq	%rax, %rax
	jne	LBB0_21
## %bb.12:
	movq	16(%r14), %rax
	movl	16(%rax), %edi
	movq	%rbx, %rsi
	callq	_wps_build_config_methods_r
	testq	%rax, %rax
	jne	LBB0_21
## %bb.13:
	movq	16(%r14), %rdi
	movq	%rbx, %rsi
	callq	_wps_build_device_attrs
	testq	%rax, %rax
	jne	LBB0_21
## %bb.14:
	movq	16(%r14), %r15
	movl	4(%r15), %edi
	callq	*8(%r15)
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_wps_build_rf_bands
	testq	%rax, %rax
	jne	LBB0_21
## %bb.15:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_wps_build_assoc_state
	testq	%rax, %rax
	jne	LBB0_21
## %bb.16:
	movq	_WPS_CFG_NO_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_wps_build_config_error
	testq	%rax, %rax
	jne	LBB0_21
## %bb.17:
	movl	24(%r14), %esi
	movq	%rbx, %rdi
	callq	_wps_build_dev_password_id
	testq	%rax, %rax
	jne	LBB0_21
## %bb.18:
	movq	16(%r14), %rdi
	movq	%rbx, %rsi
	callq	_wps_build_os_version
	testq	%rax, %rax
	jne	LBB0_21
## %bb.19:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_wps_build_wfa_ext
	testq	%rax, %rax
	jne	LBB0_21
## %bb.20:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_wps_build_authenticator
	testq	%rax, %rax
	je	LBB0_25
LBB0_21:
	movq	%rbx, %rdi
	callq	_wpabuf_free
LBB0_23:
	xorl	%ebx, %ebx
LBB0_24:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_25:
	movl	$1, (%r14)
	movq	_RECV_M3@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r14)
	jmp	LBB0_24
	.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: Registrar Nonce"

L_.str.1:                               ## @.str.1
	.asciz	"WPS: UUID-R"

	.comm	_WPS_UUID_LEN,4,2               ## @WPS_UUID_LEN
L_.str.2:                               ## @.str.2
	.asciz	"WPS: Building Message M2"

	.comm	_WPS_M2,4,2                     ## @WPS_M2
	.comm	_WPS_CFG_NO_ERROR,4,2           ## @WPS_CFG_NO_ERROR
	.comm	_RECV_DONE,4,2                  ## @RECV_DONE
	.comm	_RECV_M3,4,2                    ## @RECV_M3
	.comm	_DEV_PW_NFC_CONNECTION_HANDOVER,8,3 ## @DEV_PW_NFC_CONNECTION_HANDOVER
	.no_dead_strip	_wps_build_m2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wps_build_m2
_wps_build_m2:                          ; @wps_build_m2
	.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, #32]
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_22
; %bb.1:
Lloh2:
	adrp	x21, _MSG_DEBUG@GOTPAGE
Lloh3:
	ldr	x21, [x21, _MSG_DEBUG@GOTPAGEOFF]
	ldr	w0, [x21]
	ldr	w2, [x19, #32]
	ldr	w3, [x20]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_hexdump
	ldr	w0, [x21]
	ldr	w2, [x19, #28]
Lloh6:
	adrp	x8, _WPS_UUID_LEN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _WPS_UUID_LEN@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_wpa_hexdump
	ldr	w0, [x21]
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_wpa_printf
	mov	w0, #1000
	bl	_wpabuf_alloc
	mov	x20, x0
	cbz	x0, LBB0_23
; %bb.2:
	mov	x0, x20
	bl	_wps_build_version
	cbnz	x0, LBB0_21
; %bb.3:
Lloh13:
	adrp	x8, _WPS_M2@GOTPAGE
Lloh14:
	ldr	x8, [x8, _WPS_M2@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_wps_build_msg_type
	cbnz	x0, LBB0_21
; %bb.4:
	mov	x0, x19
	mov	x1, x20
	bl	_wps_build_enrollee_nonce
	cbnz	x0, LBB0_21
; %bb.5:
	mov	x0, x19
	mov	x1, x20
	bl	_wps_build_registrar_nonce
	cbnz	x0, LBB0_21
; %bb.6:
	mov	x0, x19
	mov	x1, x20
	bl	_wps_build_uuid_r
	cbnz	x0, LBB0_21
; %bb.7:
	mov	x0, x19
	mov	x1, x20
	bl	_wps_build_public_key
	cbnz	x0, LBB0_21
; %bb.8:
	mov	x0, x19
	bl	_wps_derive_keys
	cbnz	x0, LBB0_21
; %bb.9:
	mov	x0, x19
	mov	x1, x20
	bl	_wps_build_auth_type_flags
	cbnz	x0, LBB0_21
; %bb.10:
	mov	x0, x19
	mov	x1, x20
	bl	_wps_build_encr_type_flags
	cbnz	x0, LBB0_21
; %bb.11:
	mov	x0, x19
	mov	x1, x20
	bl	_wps_build_conn_type_flags
	cbnz	x0, LBB0_21
; %bb.12:
	ldr	x8, [x19, #16]
	ldr	w0, [x8, #16]
	mov	x1, x20
	bl	_wps_build_config_methods_r
	cbnz	x0, LBB0_21
; %bb.13:
	ldr	x0, [x19, #16]
	mov	x1, x20
	bl	_wps_build_device_attrs
	cbnz	x0, LBB0_21
; %bb.14:
	ldr	x21, [x19, #16]
	ldr	x8, [x21, #8]
	ldr	w0, [x21, #4]
	blr	x8
	mov	x2, x0
	mov	x0, x21
	mov	x1, x20
	bl	_wps_build_rf_bands
	cbnz	x0, LBB0_21
; %bb.15:
	mov	x0, x19
	mov	x1, x20
	bl	_wps_build_assoc_state
	cbnz	x0, LBB0_21
; %bb.16:
Lloh16:
	adrp	x8, _WPS_CFG_NO_ERROR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _WPS_CFG_NO_ERROR@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_wps_build_config_error
	cbnz	x0, LBB0_21
; %bb.17:
	ldr	w1, [x19, #24]
	mov	x0, x20
	bl	_wps_build_dev_password_id
	cbnz	x0, LBB0_21
; %bb.18:
	ldr	x0, [x19, #16]
	mov	x1, x20
	bl	_wps_build_os_version
	cbnz	x0, LBB0_21
; %bb.19:
	mov	x0, x20
	mov	w1, #0
	mov	x2, #0
	mov	w3, #0
	mov	w4, #0
	bl	_wps_build_wfa_ext
	cbnz	x0, LBB0_21
; %bb.20:
	mov	x0, x19
	mov	x1, x20
	bl	_wps_build_authenticator
	cbz	x0, LBB0_24
LBB0_21:
	mov	x0, x20
	bl	_wpabuf_free
LBB0_22:
	mov	x20, #0
LBB0_23:
	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_24:
	mov	w8, #1
	str	w8, [x19]
Lloh19:
	adrp	x8, _RECV_M3@GOTPAGE
Lloh20:
	ldr	x8, [x8, _RECV_M3@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	str	w8, [x19, #4]
	b	LBB0_23
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.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: Registrar Nonce"

l_.str.1:                               ; @.str.1
	.asciz	"WPS: UUID-R"

	.comm	_WPS_UUID_LEN,4,2               ; @WPS_UUID_LEN
l_.str.2:                               ; @.str.2
	.asciz	"WPS: Building Message M2"

	.comm	_WPS_M2,4,2                     ; @WPS_M2
	.comm	_WPS_CFG_NO_ERROR,4,2           ; @WPS_CFG_NO_ERROR
	.comm	_RECV_DONE,4,2                  ; @RECV_DONE
	.comm	_RECV_M3,4,2                    ; @RECV_M3
	.comm	_DEV_PW_NFC_CONNECTION_HANDOVER,8,3 ; @DEV_PW_NFC_CONNECTION_HANDOVER
	.no_dead_strip	_wps_build_m2
.subsections_via_symbols
