	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_setup_if                       ## -- Begin function setup_if
	.p2align	4, 0x90
_setup_if:                              ## @setup_if
	.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
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_chaninfo@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$20, %edx
	callq	_memset
	movl	16(%rbx), %edi
	movq	%r14, %rsi
	callq	_strcpy
	movq	_IEEE80211_IOC_CHANNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
	movl	$1, %edi
	callq	_set_chan
	leaq	-56(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$20, %edx
	callq	_memset
	movl	-48(%rbp), %edi
	movq	%r14, %rsi
	callq	_strcpy
	movq	_ioctl_s@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	_SIOCGIFFLAGS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdx
	callq	_ioctl
	cmpl	$-1, %eax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_die
LBB0_2:
	movzwl	-56(%rbp), %eax
	movl	-52(%rbp), %ecx
	shll	$16, %ecx
	orl	%eax, %ecx
	movq	_IFF_UP@GOTPCREL(%rip), %rax
	movq	_IFF_PPROMISC@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ebx
	orl	(%rax), %ebx
	orl	%ecx, %ebx
	leaq	-56(%rbp), %r12
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$20, %edx
	callq	_memset
	movl	-48(%rbp), %edi
	movq	%r14, %rsi
	callq	_strcpy
	movzwl	%bx, %eax
	movl	%eax, -56(%rbp)
	shrl	$16, %ebx
	movl	%ebx, -52(%rbp)
	movl	(%r15), %edi
	movq	_SIOCSIFFLAGS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdx
	callq	_ioctl
	cmpl	$-1, %eax
	jne	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	callq	_die
LBB0_4:
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_chaninfo,20,2                  ## @chaninfo
	.comm	_IEEE80211_IOC_CHANNEL,4,2      ## @IEEE80211_IOC_CHANNEL
	.comm	_ioctl_s,4,2                    ## @ioctl_s
	.comm	_SIOCGIFFLAGS,4,2               ## @SIOCGIFFLAGS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ioctl(SIOCGIFFLAGS)"

	.comm	_IFF_UP,4,2                     ## @IFF_UP
	.comm	_IFF_PPROMISC,4,2               ## @IFF_PPROMISC
	.comm	_SIOCSIFFLAGS,4,2               ## @SIOCSIFFLAGS
L_.str.1:                               ## @.str.1
	.asciz	"ioctl(SIOCSIFFLAGS)"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_setup_if                       ; -- Begin function setup_if
	.p2align	2
_setup_if:                              ; @setup_if
	.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	x19, x0
Lloh0:
	adrp	x20, _chaninfo@GOTPAGE
Lloh1:
	ldr	x20, [x20, _chaninfo@GOTPAGEOFF]
	mov	x0, x20
	mov	w1, #0
	mov	w2, #20
	bl	_memset
	ldr	w0, [x20, #16]
	mov	x1, x19
	bl	_strcpy
Lloh2:
	adrp	x8, _IEEE80211_IOC_CHANNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IEEE80211_IOC_CHANNEL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [x20, #12]
	mov	w0, #1
	bl	_set_chan
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #20
	bl	_memset
	ldr	w0, [sp, #16]
	mov	x1, x19
	bl	_strcpy
Lloh5:
	adrp	x20, _ioctl_s@GOTPAGE
Lloh6:
	ldr	x20, [x20, _ioctl_s@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh7:
	adrp	x8, _SIOCGIFFLAGS@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SIOCGIFFLAGS@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_ioctl
	cmn	w0, #1
	b.ne	LBB0_2
; %bb.1:
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_die
LBB0_2:
	ldrh	w8, [sp, #8]
	ldr	w9, [sp, #12]
	bfi	w8, w9, #16, #16
Lloh12:
	adrp	x9, _IFF_UP@GOTPAGE
Lloh13:
	ldr	x9, [x9, _IFF_UP@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
Lloh15:
	adrp	x10, _IFF_PPROMISC@GOTPAGE
Lloh16:
	ldr	x10, [x10, _IFF_PPROMISC@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	orr	w9, w10, w9
	orr	w21, w9, w8
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #20
	bl	_memset
	ldr	w0, [sp, #16]
	mov	x1, x19
	bl	_strcpy
	and	w8, w21, #0xffff
	lsr	w9, w21, #16
	stp	w8, w9, [sp, #8]
	ldr	w0, [x20]
Lloh18:
	adrp	x8, _SIOCSIFFLAGS@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SIOCSIFFLAGS@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_ioctl
	cmn	w0, #1
	b.ne	LBB0_4
; %bb.3:
Lloh21:
	adrp	x1, l_.str.1@PAGE
Lloh22:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_die
LBB0_4:
	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	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_chaninfo,20,2                  ; @chaninfo
	.comm	_IEEE80211_IOC_CHANNEL,4,2      ; @IEEE80211_IOC_CHANNEL
	.comm	_ioctl_s,4,2                    ; @ioctl_s
	.comm	_SIOCGIFFLAGS,4,2               ; @SIOCGIFFLAGS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ioctl(SIOCGIFFLAGS)"

	.comm	_IFF_UP,4,2                     ; @IFF_UP
	.comm	_IFF_PPROMISC,4,2               ; @IFF_PPROMISC
	.comm	_SIOCSIFFLAGS,4,2               ; @SIOCSIFFLAGS
l_.str.1:                               ; @.str.1
	.asciz	"ioctl(SIOCSIFFLAGS)"

.subsections_via_symbols
