	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wps_er_ap_process
_wps_er_ap_process:                     ## @wps_er_ap_process
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	_WSC_MSG@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, -28(%rbp)
	leaq	-40(%rbp), %rsi
	movq	%r15, %rdi
	callq	_wps_parse_msg
	testq	%rax, %rax
	jne	LBB0_9
## %bb.1:
	movq	-40(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_9
## %bb.2:
	movl	(%rax), %eax
	cmpl	$128, %eax
	je	LBB0_6
## %bb.3:
	cmpl	$129, %eax
	je	LBB0_7
## %bb.4:
	cmpl	$130, %eax
	jne	LBB0_9
## %bb.5:
	movq	_WSC_ACK@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_6:
	movq	_WSC_NACK@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_7:
	movq	_WSC_Done@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %ebx
	movl	%ebx, -28(%rbp)
LBB0_9:
	movq	(%r14), %rdi
	movl	%ebx, %esi
	movq	%r15, %rdx
	callq	_wps_process_msg
	movq	_WPS_CONTINUE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_13
## %bb.10:
	movq	(%r14), %rdi
	leaq	-28(%rbp), %rsi
	callq	_wps_get_msg
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	%rax, %rbx
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_wps_er_ap_put_message
	movq	%rbx, %rdi
	callq	_wpabuf_free
	jmp	LBB0_18
LBB0_13:
	movq	_WPS_DONE@GOTPCREL(%rip), %rcx
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edi
	cmpl	(%rcx), %eax
	jne	LBB0_16
## %bb.14:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_15
LBB0_16:
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_wpa_printf
	jmp	LBB0_17
LBB0_12:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
LBB0_15:
	xorl	%eax, %eax
	callq	_wpa_printf
LBB0_17:
	movq	(%r14), %rdi
	callq	_wps_deinit
	movq	$0, (%r14)
LBB0_18:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WSC_MSG,4,2                    ## @WSC_MSG
	.comm	_WSC_ACK,4,2                    ## @WSC_ACK
	.comm	_WSC_NACK,4,2                   ## @WSC_NACK
	.comm	_WSC_Done,4,2                   ## @WSC_Done
	.comm	_WPS_CONTINUE,4,2               ## @WPS_CONTINUE
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"WPS ER: Failed to build message"

	.comm	_WPS_DONE,4,2                   ## @WPS_DONE
L_.str.1:                               ## @.str.1
	.asciz	"WPS ER: Protocol run done"

L_.str.2:                               ## @.str.2
	.asciz	"WPS ER: Failed to process message from AP (res=%d)"

	.no_dead_strip	_wps_er_ap_process
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wps_er_ap_process
_wps_er_ap_process:                     ; @wps_er_ap_process
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, _WSC_MSG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WSC_MSG@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	str	w21, [sp, #20]
	add	x1, sp, #24
	mov	x0, x20
	bl	_wps_parse_msg
	cbnz	x0, LBB0_9
; %bb.1:
	ldr	x8, [sp, #24]
	cbz	x8, LBB0_9
; %bb.2:
	ldr	w8, [x8]
	cmp	w8, #128
	b.eq	LBB0_6
; %bb.3:
	cmp	w8, #129
	b.eq	LBB0_7
; %bb.4:
	cmp	w8, #130
	b.ne	LBB0_9
; %bb.5:
Lloh3:
	adrp	x8, _WSC_ACK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WSC_ACK@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
Lloh5:
	adrp	x8, _WSC_NACK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _WSC_NACK@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh7:
	adrp	x8, _WSC_Done@GOTPAGE
Lloh8:
	ldr	x8, [x8, _WSC_Done@GOTPAGEOFF]
LBB0_8:
	ldr	w21, [x8]
	str	w21, [sp, #20]
LBB0_9:
	ldr	x0, [x19]
	mov	x1, x21
	mov	x2, x20
	bl	_wps_process_msg
                                        ; kill: def $w0 killed $w0 def $x0
Lloh9:
	adrp	x8, _WPS_CONTINUE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _WPS_CONTINUE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_12
; %bb.10:
	ldr	x0, [x19]
	add	x1, sp, #20
	bl	_wps_get_msg
	cbz	x0, LBB0_16
; %bb.11:
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	bl	_wps_er_ap_put_message
	mov	x0, x20
	bl	_wpabuf_free
	b	LBB0_18
LBB0_12:
Lloh12:
	adrp	x8, _WPS_DONE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _WPS_DONE@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x8]
Lloh15:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmp	w0, w9
	b.ne	LBB0_14
; %bb.13:
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_15
LBB0_14:
	str	x0, [sp]
Lloh20:
	adrp	x1, l_.str.2@PAGE
Lloh21:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_15:
	mov	x0, x8
	b	LBB0_17
LBB0_16:
Lloh22:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh23:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
Lloh25:
	adrp	x1, l_.str@PAGE
Lloh26:
	add	x1, x1, l_.str@PAGEOFF
LBB0_17:
	bl	_wpa_printf
	ldr	x0, [x19]
	bl	_wps_deinit
	str	xzr, [x19]
LBB0_18:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_WSC_MSG,4,2                    ; @WSC_MSG
	.comm	_WSC_ACK,4,2                    ; @WSC_ACK
	.comm	_WSC_NACK,4,2                   ; @WSC_NACK
	.comm	_WSC_Done,4,2                   ; @WSC_Done
	.comm	_WPS_CONTINUE,4,2               ; @WPS_CONTINUE
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"WPS ER: Failed to build message"

	.comm	_WPS_DONE,4,2                   ; @WPS_DONE
l_.str.1:                               ; @.str.1
	.asciz	"WPS ER: Protocol run done"

l_.str.2:                               ; @.str.2
	.asciz	"WPS ER: Failed to process message from AP (res=%d)"

	.no_dead_strip	_wps_er_ap_process
.subsections_via_symbols
