	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wps_cb_set_sel_reg
_wps_cb_set_sel_reg:                    ## @wps_cb_set_sel_reg
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	$0, -12(%rbp)
	cmpq	$0, 24(%rdi)
	je	LBB0_9
## %bb.1:
	movq	%rdi, %rbx
	movq	8(%rdi), %rdx
	testq	%rdx, %rdx
	je	LBB0_2
## %bb.3:
	movq	_WPS_CONFIG_PUSHBUTTON@GOTPCREL(%rip), %rax
	movq	_WPS_CONFIG_VIRT_PUSHBUTTON@GOTPCREL(%rip), %rcx
	movq	_WPS_CONFIG_PHY_PUSHBUTTON@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r9d
	orl	(%rcx), %r9d
	orl	(%rax), %r9d
	movq	32(%rbx), %rax
	notl	%r9d
	andl	(%rax), %r9d
	movl	%r9d, -12(%rbp)
	cmpq	$0, (%rbx)
	je	LBB0_5
## %bb.4:
	movl	(%rax), %esi
	leaq	-12(%rbp), %rdi
	callq	_wps_set_pushbutton
	movq	8(%rbx), %rdx
	movl	-12(%rbp), %r9d
	jmp	LBB0_5
LBB0_2:
	xorl	%r9d, %r9d
	xorl	%edx, %edx
LBB0_5:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%rbx), %r8
	movq	32(%rbx), %rax
	movl	(%rax), %ecx
	leaq	L_.str(%rip), %rsi
                                        ## kill: def $r9d killed $r9d killed $r9
	callq	_wpa_printf
	movl	16(%rbx), %edi
	movq	8(%rbx), %rsi
	cmpq	$0, (%rbx)
	jne	LBB0_6
## %bb.7:
	movq	_DEV_PW_DEFAULT@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_6:
	movq	_DEV_PW_PUSHBUTTON@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %edx
	movl	-12(%rbp), %ecx
	callq	*24(%rbx)
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.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	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"WPS: wps_cb_set_sel_reg: sel_reg=%d config_methods=0x%x pbc=%d methods=0x%x"

	.comm	_DEV_PW_PUSHBUTTON,4,2          ## @DEV_PW_PUSHBUTTON
	.comm	_DEV_PW_DEFAULT,4,2             ## @DEV_PW_DEFAULT
	.no_dead_strip	_wps_cb_set_sel_reg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wps_cb_set_sel_reg
_wps_cb_set_sel_reg:                    ; @wps_cb_set_sel_reg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	str	wzr, [sp, #12]
	ldr	x8, [x0, #24]
	cbz	x8, LBB0_6
; %bb.1:
	mov	x19, x0
	ldr	x2, [x0, #8]
	cbz	x2, LBB0_4
; %bb.2:
	ldr	x8, [x19, #32]
	ldr	w9, [x8]
Lloh0:
	adrp	x10, _WPS_CONFIG_PUSHBUTTON@GOTPAGE
Lloh1:
	ldr	x10, [x10, _WPS_CONFIG_PUSHBUTTON@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
Lloh3:
	adrp	x11, _WPS_CONFIG_VIRT_PUSHBUTTON@GOTPAGE
Lloh4:
	ldr	x11, [x11, _WPS_CONFIG_VIRT_PUSHBUTTON@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x11]
Lloh6:
	adrp	x12, _WPS_CONFIG_PHY_PUSHBUTTON@GOTPAGE
Lloh7:
	ldr	x12, [x12, _WPS_CONFIG_PHY_PUSHBUTTON@GOTPAGEOFF]
Lloh8:
	ldr	w12, [x12]
	orr	w11, w12, w11
	orr	w10, w10, w11
	bic	w5, w9, w10
	str	w5, [sp, #12]
	ldr	x9, [x19]
	cbz	x9, LBB0_5
; %bb.3:
	ldr	w1, [x8]
	add	x0, sp, #12
	bl	_wps_set_pushbutton
	ldr	x2, [x19, #8]
	ldr	w5, [sp, #12]
	b	LBB0_5
LBB0_4:
	mov	w5, #0
LBB0_5:
Lloh9:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	ldr	x8, [x19, #32]
	ldr	w3, [x8]
	ldr	x4, [x19]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
	ldr	x8, [x19, #24]
	ldr	w0, [x19, #16]
	ldp	x9, x1, [x19]
Lloh14:
	adrp	x10, _DEV_PW_PUSHBUTTON@GOTPAGE
Lloh15:
	ldr	x10, [x10, _DEV_PW_PUSHBUTTON@GOTPAGEOFF]
Lloh16:
	adrp	x11, _DEV_PW_DEFAULT@GOTPAGE
Lloh17:
	ldr	x11, [x11, _DEV_PW_DEFAULT@GOTPAGEOFF]
	cmp	x9, #0
	csel	x9, x11, x10, eq
	ldr	w2, [x9]
	ldr	w3, [sp, #12]
	blr	x8
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.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	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"WPS: wps_cb_set_sel_reg: sel_reg=%d config_methods=0x%x pbc=%d methods=0x%x"

	.comm	_DEV_PW_PUSHBUTTON,4,2          ; @DEV_PW_PUSHBUTTON
	.comm	_DEV_PW_DEFAULT,4,2             ; @DEV_PW_DEFAULT
	.no_dead_strip	_wps_cb_set_sel_reg
.subsections_via_symbols
