	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_netif_open                     ## -- Begin function netif_open
	.p2align	4, 0x90
_netif_open:                            ## @netif_open
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_SOPEN_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_4
## %bb.1:
	movq	%rdi, %r14
	movq	_sockets@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rbx
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rbx)
	je	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incl	%r15d
	addq	$8, %rbx
	cmpl	%r15d, %eax
	jne	LBB0_2
LBB0_4:
	movq	_EMFILE@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_6:
	movq	%rbx, %rdi
	movl	$8, %esi
	callq	_bzero
	xorl	%eax, %eax
	callq	_netif_init
	movq	%r14, %rdi
	callq	_netif_select
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	leaq	L_.str(%rip), %rdi
	callq	_panic
LBB0_8:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_netif_probe
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	(%r12), %rax
	movq	(%rax), %rsi
	movl	8(%r12), %edx
	leaq	L_.str.1(%rip), %rdi
	callq	_printf
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	$-1, %r15d
LBB0_11:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	callq	_netif_attach
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_sockets,8,3                    ## @sockets
	.comm	_SOPEN_MAX,4,2                  ## @SOPEN_MAX
	.comm	_EMFILE,4,2                     ## @EMFILE
	.comm	_errno,4,2                      ## @errno
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"netboot: no interfaces left untried"

L_.str.1:                               ## @.str.1
	.asciz	"netboot: couldn't probe %s%d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_netif_open                     ; -- Begin function netif_open
	.p2align	2
_netif_open:                            ; @netif_open
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
Lloh0:
	adrp	x8, _SOPEN_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SOPEN_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x20, x0
	mov	w19, #0
Lloh3:
	adrp	x9, _sockets@GOTPAGE
Lloh4:
	ldr	x9, [x9, _sockets@GOTPAGEOFF]
Lloh5:
	ldr	x21, [x9]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x21]
	cbz	x9, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w19, w19, #1
	add	x21, x21, #8
	cmp	w8, w19
	b.ne	LBB0_2
LBB0_4:
Lloh6:
	adrp	x8, _EMFILE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EMFILE@GOTPAGEOFF]
	b	LBB0_9
LBB0_5:
	mov	x0, x21
	mov	w1, #8
	bl	_bzero
	bl	_netif_init
	mov	x0, x20
	bl	_netif_select
	mov	x22, x0
	cbnz	x0, LBB0_7
; %bb.6:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_panic
LBB0_7:
	mov	x0, x22
	mov	x1, x20
	bl	_netif_probe
	cbz	x0, LBB0_11
; %bb.8:
	ldr	x8, [x22]
	ldr	x1, [x8]
	ldr	w2, [x22, #8]
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_printf
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _errno@GOTPAGE
Lloh15:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh16:
	str	w8, [x9]
	mov	w19, #-1
LBB0_10:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_11:
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	bl	_netif_attach
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotStr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_sockets,8,3                    ; @sockets
	.comm	_SOPEN_MAX,4,2                  ; @SOPEN_MAX
	.comm	_EMFILE,4,2                     ; @EMFILE
	.comm	_errno,4,2                      ; @errno
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"netboot: no interfaces left untried"

l_.str.1:                               ; @.str.1
	.asciz	"netboot: couldn't probe %s%d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
