	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function disc_setup
_disc_setup:                            ## @disc_setup
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	leaq	L_.str(%rip), %rdi
	callq	_kldload
	testq	%rax, %rax
	jns	LBB0_3
## %bb.1:
	movq	_errno@GOTPCREL(%rip), %rax
	cmpl	$128, (%rax)
	je	LBB0_3
## %bb.2:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_7
LBB0_3:
	movq	_PF_INET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SOCK_RAW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_socket
	testl	%eax, %eax
	js	LBB0_6
## %bb.4:
	movl	%eax, %ebx
	leaq	-24(%rbp), %r14
	movq	%r14, %rdi
	movl	$4, %esi
	callq	_bzero
	movl	-24(%rbp), %edi
	movq	_DISC_IFNAME@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	_DISC_IFUNIT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	L_.str.3(%rip), %rdx
	movl	$4, %esi
	callq	_snprintf
	movq	_SIOCIFCREATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	movq	%r14, %rdx
	callq	_ioctl
	testq	%rax, %rax
	js	LBB0_10
## %bb.5:
	movl	%ebx, %edi
	callq	_close
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_6:
	leaq	L_.str.2(%rip), %rdi
LBB0_7:
	xorl	%eax, %eax
	callq	_warn
LBB0_8:
	movl	$-1, %eax
LBB0_9:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_10:
	movl	-24(%rbp), %esi
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_warn
	movl	%ebx, %edi
	callq	_close
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"if_disc"

	.comm	_errno,4,2                      ## @errno
L_.str.1:                               ## @.str.1
	.asciz	"disc_setup: kldload(if_disc)"

	.comm	_PF_INET,4,2                    ## @PF_INET
	.comm	_SOCK_RAW,4,2                   ## @SOCK_RAW
L_.str.2:                               ## @.str.2
	.asciz	"disc_setup: socket(PF_INET, SOCK_RAW, 0)"

L_.str.3:                               ## @.str.3
	.asciz	"%s%d"

	.comm	_DISC_IFNAME,8,3                ## @DISC_IFNAME
	.comm	_DISC_IFUNIT,4,2                ## @DISC_IFUNIT
	.comm	_SIOCIFCREATE,4,2               ## @SIOCIFCREATE
L_.str.4:                               ## @.str.4
	.asciz	"disc_setup: ioctl(%s, SIOCIFCREATE)"

	.no_dead_strip	_disc_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function disc_setup
_disc_setup:                            ; @disc_setup
	.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
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_kldload
	tbz	x0, #63, LBB0_3
; %bb.1:
Lloh2:
	adrp	x8, _errno@GOTPAGE
Lloh3:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w8, #128
	b.eq	LBB0_3
; %bb.2:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_3:
Lloh7:
	adrp	x8, _PF_INET@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PF_INET@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x8, _SOCK_RAW@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SOCK_RAW@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_socket
	tbnz	w0, #31, LBB0_6
; %bb.4:
	mov	x19, x0
	add	x0, sp, #8
	mov	w1, #4
	bl	_bzero
	ldr	w0, [sp, #8]
Lloh13:
	adrp	x8, _DISC_IFNAME@GOTPAGE
Lloh14:
	ldr	x8, [x8, _DISC_IFNAME@GOTPAGEOFF]
Lloh15:
	ldr	x3, [x8]
Lloh16:
	adrp	x8, _DISC_IFUNIT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _DISC_IFUNIT@GOTPAGEOFF]
Lloh18:
	ldr	w4, [x8]
Lloh19:
	adrp	x2, l_.str.3@PAGE
Lloh20:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	w1, #4
	bl	_snprintf
Lloh21:
	adrp	x8, _SIOCIFCREATE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _SIOCIFCREATE@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x19
	bl	_ioctl
	tbnz	x0, #63, LBB0_10
; %bb.5:
	mov	x0, x19
	bl	_close
	mov	w0, #0
	b	LBB0_9
LBB0_6:
Lloh24:
	adrp	x0, l_.str.2@PAGE
Lloh25:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_7:
	bl	_warn
LBB0_8:
	mov	w0, #-1
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_10:
	ldr	w8, [sp, #8]
	str	x8, [sp]
Lloh26:
	adrp	x0, l_.str.4@PAGE
Lloh27:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_warn
	mov	x0, x19
	bl	_close
	b	LBB0_8
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"if_disc"

	.comm	_errno,4,2                      ; @errno
l_.str.1:                               ; @.str.1
	.asciz	"disc_setup: kldload(if_disc)"

	.comm	_PF_INET,4,2                    ; @PF_INET
	.comm	_SOCK_RAW,4,2                   ; @SOCK_RAW
l_.str.2:                               ; @.str.2
	.asciz	"disc_setup: socket(PF_INET, SOCK_RAW, 0)"

l_.str.3:                               ; @.str.3
	.asciz	"%s%d"

	.comm	_DISC_IFNAME,8,3                ; @DISC_IFNAME
	.comm	_DISC_IFUNIT,4,2                ; @DISC_IFUNIT
	.comm	_SIOCIFCREATE,4,2               ; @SIOCIFCREATE
l_.str.4:                               ; @.str.4
	.asciz	"disc_setup: ioctl(%s, SIOCIFCREATE)"

	.no_dead_strip	_disc_setup
.subsections_via_symbols
