	.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, %r12
	callq	_strlen
	movq	_IFNAMSIZ@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_9
## %bb.1:
	leaq	L_.str.1(%rip), %rdi
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_time_print
	movq	_stdout@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_fflush
	movq	_mymac@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_set_if_mac
	movq	_PF_INET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SOCK_DGRAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_socket
	cmpl	$-1, %eax
	je	LBB0_2
## %bb.4:
	movl	%eax, %r14d
	movq	_chaninfo@GOTPCREL(%rip), %rbx
	leaq	16(%rbx), %rdi
	xorl	%esi, %esi
	movl	$20, %edx
	callq	_memset
	movl	32(%rbx), %edi
	movq	%r12, %rsi
	callq	_strcpy
	movq	_IEEE80211_IOC_CHANNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
	movq	$0, 8(%rbx)
	movl	%r14d, (%rbx)
	movl	$1, %edi
	callq	_set_chan
	leaq	-56(%rbp), %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$20, %edx
	callq	_memset
	movl	-48(%rbp), %edi
	movq	%r12, %rsi
	callq	_strcpy
	movq	_SIOCGIFFLAGS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	movq	%r15, %rdx
	callq	_ioctl
	cmpl	$-1, %eax
	je	LBB0_5
## %bb.6:
	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), %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$20, %edx
	callq	_memset
	movl	-48(%rbp), %edi
	movq	%r12, %rsi
	callq	_strcpy
	movzwl	%bx, %eax
	movl	%eax, -56(%rbp)
	shrl	$16, %ebx
	movl	%ebx, -52(%rbp)
	movq	_SIOCSIFFLAGS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	movq	%r15, %rdx
	callq	_ioctl
	cmpl	$-1, %eax
	je	LBB0_7
## %bb.8:
	leaq	L_str(%rip), %rdi
	callq	_puts
LBB0_3:
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	callq	_setup_if.cold.1
	jmp	LBB0_3
LBB0_5:
	callq	_setup_if.cold.2
	jmp	LBB0_3
LBB0_7:
	callq	_setup_if.cold.3
	jmp	LBB0_3
LBB0_9:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_time_print
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function setup_if.cold.1
_setup_if.cold.1:                       ## @setup_if.cold.1
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	leaq	L_.str.2(%rip), %rdi
	callq	_perror
	pushq	$1
	popq	%rdi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function setup_if.cold.2
_setup_if.cold.2:                       ## @setup_if.cold.2
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	leaq	L_.str.3(%rip), %rdi
	callq	_perror
	pushq	$1
	popq	%rdi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function setup_if.cold.3
_setup_if.cold.3:                       ## @setup_if.cold.3
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	leaq	L_.str.4(%rip), %rdi
	callq	_perror
	pushq	$1
	popq	%rdi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_IFNAMSIZ,8,3                   ## @IFNAMSIZ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Interface name too long...\n"

L_.str.1:                               ## @.str.1
	.asciz	"Setting up %s... "

	.comm	_stdout,4,2                     ## @stdout
	.comm	_mymac,4,2                      ## @mymac
	.comm	_PF_INET,4,2                    ## @PF_INET
	.comm	_SOCK_DGRAM,4,2                 ## @SOCK_DGRAM
L_.str.2:                               ## @.str.2
	.asciz	"socket()"

	.comm	_chaninfo,40,3                  ## @chaninfo
	.comm	_IEEE80211_IOC_CHANNEL,4,2      ## @IEEE80211_IOC_CHANNEL
	.comm	_SIOCGIFFLAGS,4,2               ## @SIOCGIFFLAGS
L_.str.3:                               ## @.str.3
	.asciz	"ioctl(SIOCGIFFLAGS)"

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

L_str:                                  ## @str
	.asciz	"done"

.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
	bl	_strlen
Lloh0:
	adrp	x8, _IFNAMSIZ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IFNAMSIZ@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ge	LBB0_5
; %bb.1:
	str	x19, [sp]
Lloh3:
	adrp	x0, l_.str.1@PAGE
Lloh4:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_time_print
Lloh5:
	adrp	x8, _stdout@GOTPAGE
Lloh6:
	ldr	x8, [x8, _stdout@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_fflush
Lloh8:
	adrp	x8, _mymac@GOTPAGE
Lloh9:
	ldr	x8, [x8, _mymac@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_set_if_mac
Lloh11:
	adrp	x8, _PF_INET@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PF_INET@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x8, _SOCK_DGRAM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SOCK_DGRAM@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_socket
	cmn	w0, #1
	b.eq	LBB0_6
; %bb.2:
	mov	x20, x0
Lloh17:
	adrp	x21, _chaninfo@GOTPAGE
Lloh18:
	ldr	x21, [x21, _chaninfo@GOTPAGEOFF]
	add	x0, x21, #16
	mov	w1, #0
	mov	w2, #20
	bl	_memset
	ldr	w0, [x21, #32]
	mov	x1, x19
	bl	_strcpy
Lloh19:
	adrp	x8, _IEEE80211_IOC_CHANNEL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _IEEE80211_IOC_CHANNEL@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	str	w8, [x21, #28]
	str	xzr, [x21, #8]
	str	w20, [x21]
	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
Lloh22:
	adrp	x8, _SIOCGIFFLAGS@GOTPAGE
Lloh23:
	ldr	x8, [x8, _SIOCGIFFLAGS@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x20
	bl	_ioctl
	cmn	w0, #1
	b.eq	LBB0_7
; %bb.3:
	ldrh	w8, [sp, #8]
	ldr	w9, [sp, #12]
	bfi	w8, w9, #16, #16
Lloh25:
	adrp	x9, _IFF_UP@GOTPAGE
Lloh26:
	ldr	x9, [x9, _IFF_UP@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
Lloh28:
	adrp	x10, _IFF_PPROMISC@GOTPAGE
Lloh29:
	ldr	x10, [x10, _IFF_PPROMISC@GOTPAGEOFF]
Lloh30:
	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]
Lloh31:
	adrp	x8, _SIOCSIFFLAGS@GOTPAGE
Lloh32:
	ldr	x8, [x8, _SIOCSIFFLAGS@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x20
	bl	_ioctl
	cmn	w0, #1
	b.eq	LBB0_8
; %bb.4:
Lloh34:
	adrp	x0, l_str@PAGE
Lloh35:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
	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
LBB0_5:
Lloh36:
	adrp	x0, l_.str@PAGE
Lloh37:
	add	x0, x0, l_.str@PAGEOFF
	bl	_time_print
	mov	w0, #1
	bl	_exit
LBB0_6:
	bl	_setup_if.cold.1
LBB0_7:
	bl	_setup_if.cold.2
LBB0_8:
	bl	_setup_if.cold.3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function setup_if.cold.1
_setup_if.cold.1:                       ; @setup_if.cold.1
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh38:
	adrp	x0, l_.str.2@PAGE
Lloh39:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_perror
	bl	_OUTLINED_FUNCTION_0
	.loh AdrpAdd	Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function setup_if.cold.2
_setup_if.cold.2:                       ; @setup_if.cold.2
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh40:
	adrp	x0, l_.str.3@PAGE
Lloh41:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_perror
	bl	_OUTLINED_FUNCTION_0
	.loh AdrpAdd	Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function setup_if.cold.3
_setup_if.cold.3:                       ; @setup_if.cold.3
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh42:
	adrp	x0, l_.str.4@PAGE
Lloh43:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_perror
	bl	_OUTLINED_FUNCTION_0
	.loh AdrpAdd	Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function OUTLINED_FUNCTION_0
_OUTLINED_FUNCTION_0:                   ; @OUTLINED_FUNCTION_0 Thunk
	.cfi_startproc
; %bb.0:
	mov	w0, #1
	b	_exit
	.cfi_endproc
                                        ; -- End function
	.comm	_IFNAMSIZ,8,3                   ; @IFNAMSIZ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Interface name too long...\n"

l_.str.1:                               ; @.str.1
	.asciz	"Setting up %s... "

	.comm	_stdout,4,2                     ; @stdout
	.comm	_mymac,4,2                      ; @mymac
	.comm	_PF_INET,4,2                    ; @PF_INET
	.comm	_SOCK_DGRAM,4,2                 ; @SOCK_DGRAM
l_.str.2:                               ; @.str.2
	.asciz	"socket()"

	.comm	_chaninfo,40,3                  ; @chaninfo
	.comm	_IEEE80211_IOC_CHANNEL,4,2      ; @IEEE80211_IOC_CHANNEL
	.comm	_SIOCGIFFLAGS,4,2               ; @SIOCGIFFLAGS
l_.str.3:                               ; @.str.3
	.asciz	"ioctl(SIOCGIFFLAGS)"

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

l_str:                                  ; @str
	.asciz	"done"

.subsections_via_symbols
