	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function open_lobpf
_open_lobpf:                            ## @open_lobpf
	.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	%rdi, %r14
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	callq	_open
	movl	%eax, %r15d
	testl	%eax, %eax
	jns	LBB0_3
## %bb.1:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	leaq	L_.str.1(%rip), %rdi
	callq	_atf_tc_skip
LBB0_3:
	movl	%r15d, %ebx
	notl	%ebx
	shrl	$31, %ebx
	movq	_errno@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_strerror
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	callq	_ATF_REQUIRE_MSG
	leaq	-56(%rbp), %rdi
	callq	_getifaddrs
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_ATF_REQUIRE
	movq	-56(%rbp), %rbx
	testq	%rbx, %rbx
	je	LBB0_8
## %bb.4:
	movq	_IFF_LOOPBACK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_AF_INET@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	24(%rbx), %rbx
	testq	%rbx, %rbx
	je	LBB0_8
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	testl	%eax, (%rbx)
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%rbx), %rdx
	cmpq	%rcx, (%rdx)
	jne	LBB0_7
	jmp	LBB0_9
LBB0_8:
	leaq	L_.str.3(%rip), %rdi
	callq	_atf_tc_skip
	xorl	%ebx, %ebx
LBB0_9:
	leaq	-48(%rbp), %r13
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movl	-48(%rbp), %edi
	movl	16(%rbx), %esi
	movq	_IFNAMSIZ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_strlcpy
	movq	_BIOCSETIF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	movq	%r13, %rdx
	callq	_ioctl
	xorl	%r13d, %r13d
	testl	%eax, %eax
	sete	%r13b
	movq	(%r12), %rdi
	callq	_strerror
	leaq	L_.str.4(%rip), %rsi
	movl	%r13d, %edi
	movl	%eax, %edx
	callq	_ATF_REQUIRE_MSG
	movq	8(%rbx), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	movq	-56(%rbp), %rdi
	callq	_freeifaddrs
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/dev/bpf0"

	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_errno,8,3                      ## @errno
	.comm	_ENOENT,8,3                     ## @ENOENT
L_.str.1:                               ## @.str.1
	.asciz	"no BPF device available"

L_.str.2:                               ## @.str.2
	.asciz	"open(/dev/bpf0): %s"

	.comm	_IFF_LOOPBACK,4,2               ## @IFF_LOOPBACK
	.comm	_AF_INET,8,3                    ## @AF_INET
L_.str.3:                               ## @.str.3
	.asciz	"no loopback address found"

	.comm	_IFNAMSIZ,4,2                   ## @IFNAMSIZ
	.comm	_BIOCSETIF,4,2                  ## @BIOCSETIF
L_.str.4:                               ## @.str.4
	.asciz	"ioctl(BIOCSETIF): %s"

	.no_dead_strip	_open_lobpf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function open_lobpf
_open_lobpf:                            ; @open_lobpf
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
Lloh0:
	adrp	x8, _O_RDWR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_open
	mov	x20, x0
Lloh5:
	adrp	x22, _errno@GOTPAGE
Lloh6:
	ldr	x22, [x22, _errno@GOTPAGEOFF]
	tbz	w0, #31, LBB0_3
; %bb.1:
	ldr	x8, [x22]
Lloh7:
	adrp	x9, _ENOENT@GOTPAGE
Lloh8:
	ldr	x9, [x9, _ENOENT@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_atf_tc_skip
LBB0_3:
	mvn	w8, w20
	lsr	w21, w8, #31
	ldr	x0, [x22]
	bl	_strerror
	mov	x2, x0
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_ATF_REQUIRE_MSG
	mov	x0, sp
	bl	_getifaddrs
	cmp	w0, #0
	cset	w0, eq
	bl	_ATF_REQUIRE
	ldr	x23, [sp]
	cbz	x23, LBB0_8
; %bb.4:
Lloh14:
	adrp	x8, _IFF_LOOPBACK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _IFF_LOOPBACK@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x9, _AF_INET@GOTPAGE
Lloh18:
	ldr	x9, [x9, _AF_INET@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x23, [x23, #24]
	cbz	x23, LBB0_8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x23]
	tst	w8, w10
	b.eq	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x10, [x23, #8]
	ldr	x10, [x10]
	cmp	x10, x9
	b.ne	LBB0_5
	b	LBB0_9
LBB0_8:
Lloh20:
	adrp	x0, l_.str.3@PAGE
Lloh21:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_atf_tc_skip
	mov	x23, #0
LBB0_9:
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	ldr	w0, [sp, #8]
	ldr	w1, [x23, #16]
Lloh22:
	adrp	x8, _IFNAMSIZ@GOTPAGE
Lloh23:
	ldr	x8, [x8, _IFNAMSIZ@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
	bl	_strlcpy
Lloh25:
	adrp	x8, _BIOCSETIF@GOTPAGE
Lloh26:
	ldr	x8, [x8, _BIOCSETIF@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x20
	bl	_ioctl
	cmp	w0, #0
	cset	w21, eq
	ldr	x0, [x22]
	bl	_strerror
	mov	x2, x0
Lloh28:
	adrp	x1, l_.str.4@PAGE
Lloh29:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x21
	bl	_ATF_REQUIRE_MSG
	ldr	x8, [x23, #8]
	ldr	w8, [x8]
	str	w8, [x19]
	ldr	x0, [sp]
	bl	_freeifaddrs
	mov	x0, x20
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/dev/bpf0"

	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_errno,8,3                      ; @errno
	.comm	_ENOENT,8,3                     ; @ENOENT
l_.str.1:                               ; @.str.1
	.asciz	"no BPF device available"

l_.str.2:                               ; @.str.2
	.asciz	"open(/dev/bpf0): %s"

	.comm	_IFF_LOOPBACK,4,2               ; @IFF_LOOPBACK
	.comm	_AF_INET,8,3                    ; @AF_INET
l_.str.3:                               ; @.str.3
	.asciz	"no loopback address found"

	.comm	_IFNAMSIZ,4,2                   ; @IFNAMSIZ
	.comm	_BIOCSETIF,4,2                  ; @BIOCSETIF
l_.str.4:                               ; @.str.4
	.asciz	"ioctl(BIOCSETIF): %s"

	.no_dead_strip	_open_lobpf
.subsections_via_symbols
