	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function if_setflags
_if_setflags:                           ## @if_setflags
	.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
	movl	%esi, %r14d
	movq	%rdi, %r15
	leaq	-40(%rbp), %rdi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	movl	$12, %edx
	callq	_memset
	movl	-32(%rbp), %edi
	movq	%r15, %rsi
	movl	$4, %edx
	callq	_strlcpy
	movq	_AF_INET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SOCK_DGRAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_socket
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	%eax, %r15d
	movq	_SIOCGIFFLAGS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-40(%rbp), %rdx
	movl	%r15d, %edi
	callq	_ioctl
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movzwl	-40(%rbp), %eax
	movl	-36(%rbp), %ebx
	shll	$16, %ebx
	orl	%eax, %ebx
LBB0_4:
	leal	-1(%r14), %eax
	andl	%ebx, %eax
	orl	%r14d, %ebx
	testl	%r14d, %r14d
	cmovsl	%eax, %ebx
	movzwl	%bx, %eax
	movl	%eax, -40(%rbp)
	shrl	$16, %ebx
	movl	%ebx, -36(%rbp)
	movq	_SIOCSIFFLAGS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-40(%rbp), %rdx
	movl	%r15d, %edi
	callq	_ioctl
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	leaq	L_.str(%rip), %rdi
	callq	_warn
LBB0_6:
	movl	%r15d, %edi
	callq	_close
	jmp	LBB0_7
LBB0_1:
	movl	$-1, %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AF_INET,4,2                    ## @AF_INET
	.comm	_SOCK_DGRAM,4,2                 ## @SOCK_DGRAM
	.comm	_SIOCGIFFLAGS,4,2               ## @SIOCGIFFLAGS
	.comm	_SIOCSIFFLAGS,4,2               ## @SIOCSIFFLAGS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ioctl SIOCSIFFLAGS"

	.no_dead_strip	_if_setflags
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function if_setflags
_if_setflags:                           ; @if_setflags
	.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
	mov	x19, x1
	mov	x20, x0
	mov	x0, sp
	mov	w1, #0
	mov	w2, #12
	bl	_memset
	ldr	w0, [sp, #8]
	mov	x1, x20
	mov	w2, #4
	bl	_strlcpy
Lloh0:
	adrp	x8, _AF_INET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AF_INET@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _SOCK_DGRAM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SOCK_DGRAM@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_socket
	tbnz	w0, #31, LBB0_3
; %bb.1:
	mov	x20, x0
Lloh6:
	adrp	x8, _SIOCGIFFLAGS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SIOCGIFFLAGS@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x2, sp
	bl	_ioctl
	cbz	w0, LBB0_4
; %bb.2:
	mov	w8, #0
	b	LBB0_5
LBB0_3:
	mov	w19, #-1
	b	LBB0_8
LBB0_4:
	ldrh	w8, [sp]
	ldr	w9, [sp, #4]
	bfi	w8, w9, #16, #16
LBB0_5:
	sub	w9, w19, #1
	and	w9, w8, w9
	orr	w8, w8, w19
	cmp	w19, #0
	csel	w8, w9, w8, lt
	and	w9, w8, #0xffff
	lsr	w8, w8, #16
	stp	w9, w8, [sp]
Lloh9:
	adrp	x8, _SIOCSIFFLAGS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SIOCSIFFLAGS@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x2, sp
	mov	x0, x20
	bl	_ioctl
	mov	x19, x0
	cbz	w0, LBB0_7
; %bb.6:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_warn
LBB0_7:
	mov	x0, x20
	bl	_close
LBB0_8:
	mov	x0, x19
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_AF_INET,4,2                    ; @AF_INET
	.comm	_SOCK_DGRAM,4,2                 ; @SOCK_DGRAM
	.comm	_SIOCGIFFLAGS,4,2               ; @SIOCGIFFLAGS
	.comm	_SIOCSIFFLAGS,4,2               ; @SIOCSIFFLAGS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ioctl SIOCSIFFLAGS"

	.no_dead_strip	_if_setflags
.subsections_via_symbols
