	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wlan_config_state              ## -- Begin function wlan_config_state
	.p2align	4, 0x90
_wlan_config_state:                     ## @wlan_config_state
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	leaq	-56(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$12, %edx
	callq	_memset
	movl	-48(%rbp), %edi
	movl	8(%rbx), %esi
	callq	_strcpy
	movq	_sock@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	_SIOCGIFFLAGS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edx
	callq	_ioctl
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	movl	-56(%rbp), %eax
	testq	%r15, %r15
	je	LBB0_3
## %bb.7:
	movzwl	%ax, %eax
	movl	-52(%rbp), %ecx
	shll	$16, %ecx
	orl	%eax, %ecx
	movq	(%rbx), %rax
	movq	_wlanIfaceState_up@GOTPCREL(%rip), %r13
	movq	_IFF_UP@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, %esi
	orl	%ecx, %esi
	notl	%edx
	andl	%ecx, %edx
	cmpq	(%r13), %rax
	cmovel	%esi, %edx
	movzwl	%dx, %eax
	movl	%eax, -56(%rbp)
	sarl	$16, %edx
	movl	%edx, -52(%rbp)
	movl	(%r12), %edi
	movq	_SIOCSIFFLAGS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edx
	callq	_ioctl
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jns	LBB0_10
## %bb.8:
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	8(%rbx), %r15d
	movq	(%rbx), %rax
	cmpq	(%r13), %rax
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.3(%rip), %rbx
	cmoveq	%rax, %rbx
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edi
	movl	%r15d, %edx
	movq	%rbx, %rcx
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_syslog
	jmp	LBB0_9
LBB0_1:
	movq	_LOG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	8(%rbx), %ebx
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	movslq	%eax, %rcx
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_syslog
LBB0_9:
	movl	$-1, %eax
	jmp	LBB0_10
LBB0_3:
	movq	_IFF_UP@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_6
## %bb.4:
	movq	_wlanIfaceState_up@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_6:
	movq	_wlanIfaceState_down@GOTPCREL(%rip), %rax
LBB0_5:
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	xorl	%eax, %eax
LBB0_10:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_sock,4,2                       ## @sock
	.comm	_SIOCGIFFLAGS,4,2               ## @SIOCGIFFLAGS
	.comm	_LOG_ERR,4,2                    ## @LOG_ERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"set %s status: ioctl(SIOCGIFFLAGS) failed: %s"

	.comm	_errno,4,2                      ## @errno
	.comm	_IFF_UP,4,2                     ## @IFF_UP
	.comm	_wlanIfaceState_up,8,3          ## @wlanIfaceState_up
	.comm	_wlanIfaceState_down,8,3        ## @wlanIfaceState_down
	.comm	_SIOCSIFFLAGS,4,2               ## @SIOCSIFFLAGS
L_.str.1:                               ## @.str.1
	.asciz	"set %s %s: ioctl(SIOCSIFFLAGS) failed: %s"

L_.str.2:                               ## @.str.2
	.asciz	"up"

L_.str.3:                               ## @.str.3
	.asciz	"down"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wlan_config_state              ; -- Begin function wlan_config_state
	.p2align	2
_wlan_config_state:                     ; @wlan_config_state
	.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
	add	x0, sp, #16
	mov	w1, #0
	mov	w2, #12
	bl	_memset
	ldr	w0, [sp, #24]
	ldr	w1, [x19, #8]
	bl	_strcpy
Lloh0:
	adrp	x21, _sock@GOTPAGE
Lloh1:
	ldr	x21, [x21, _sock@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh2:
	adrp	x8, _SIOCGIFFLAGS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SIOCGIFFLAGS@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	add	x2, sp, #16
	bl	_ioctl
	tbnz	x0, #63, LBB0_4
; %bb.1:
	ldr	w8, [sp, #16]
	cbz	x20, LBB0_5
; %bb.2:
	ldr	w9, [sp, #20]
	bfi	w8, w9, #16, #16
	ldr	x9, [x19]
Lloh5:
	adrp	x22, _wlanIfaceState_up@GOTPAGE
Lloh6:
	ldr	x22, [x22, _wlanIfaceState_up@GOTPAGEOFF]
	ldr	x10, [x22]
Lloh7:
	adrp	x11, _IFF_UP@GOTPAGE
Lloh8:
	ldr	x11, [x11, _IFF_UP@GOTPAGEOFF]
Lloh9:
	ldr	w11, [x11]
	orr	w12, w11, w8
	bic	w8, w8, w11
	cmp	x9, x10
	csel	w8, w12, w8, eq
	and	w9, w8, #0xffff
	asr	w8, w8, #16
	stp	w9, w8, [sp, #16]
	ldr	w0, [x21]
Lloh10:
	adrp	x8, _SIOCSIFFLAGS@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SIOCSIFFLAGS@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	add	x2, sp, #16
	bl	_ioctl
	tbnz	x0, #63, LBB0_7
; %bb.3:
	mov	w0, #0
	b	LBB0_11
LBB0_4:
Lloh13:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh15:
	ldr	w20, [x8]
	ldr	w19, [x19, #8]
Lloh16:
	adrp	x8, _errno@GOTPAGE
Lloh17:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x3, w0
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	b	LBB0_8
LBB0_5:
Lloh21:
	adrp	x9, _IFF_UP@GOTPAGE
Lloh22:
	ldr	x9, [x9, _IFF_UP@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.6:
	mov	w0, #0
Lloh24:
	adrp	x8, _wlanIfaceState_up@GOTPAGE
Lloh25:
	ldr	x8, [x8, _wlanIfaceState_up@GOTPAGEOFF]
	b	LBB0_10
LBB0_7:
Lloh26:
	adrp	x8, _LOG_ERR@GOTPAGE
Lloh27:
	ldr	x8, [x8, _LOG_ERR@GOTPAGEOFF]
Lloh28:
	ldr	w20, [x8]
	ldr	w21, [x19, #8]
	ldr	x8, [x19]
Lloh29:
	adrp	x9, l_.str.3@PAGE
Lloh30:
	add	x9, x9, l_.str.3@PAGEOFF
Lloh31:
	adrp	x10, l_.str.2@PAGE
Lloh32:
	add	x10, x10, l_.str.2@PAGEOFF
	ldr	x11, [x22]
	cmp	x8, x11
	csel	x19, x10, x9, eq
Lloh33:
	adrp	x8, _errno@GOTPAGE
Lloh34:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh35:
	ldr	w0, [x8]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh36:
	adrp	x1, l_.str.1@PAGE
Lloh37:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	mov	x3, x19
LBB0_8:
	bl	_syslog
	mov	w0, #-1
	b	LBB0_11
LBB0_9:
	mov	w0, #0
Lloh38:
	adrp	x8, _wlanIfaceState_down@GOTPAGE
Lloh39:
	ldr	x8, [x8, _wlanIfaceState_down@GOTPAGEOFF]
LBB0_10:
	ldr	x8, [x8]
	str	x8, [x19]
LBB0_11:
	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	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_sock,4,2                       ; @sock
	.comm	_SIOCGIFFLAGS,4,2               ; @SIOCGIFFLAGS
	.comm	_LOG_ERR,4,2                    ; @LOG_ERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"set %s status: ioctl(SIOCGIFFLAGS) failed: %s"

	.comm	_errno,4,2                      ; @errno
	.comm	_IFF_UP,4,2                     ; @IFF_UP
	.comm	_wlanIfaceState_up,8,3          ; @wlanIfaceState_up
	.comm	_wlanIfaceState_down,8,3        ; @wlanIfaceState_down
	.comm	_SIOCSIFFLAGS,4,2               ; @SIOCSIFFLAGS
l_.str.1:                               ; @.str.1
	.asciz	"set %s %s: ioctl(SIOCSIFFLAGS) failed: %s"

l_.str.2:                               ; @.str.2
	.asciz	"up"

l_.str.3:                               ; @.str.3
	.asciz	"down"

.subsections_via_symbols
