	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tun_create_device
_tun_create_device:                     ## @tun_create_device
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -48(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r14
	movq	%rdx, %r13
	movl	%esi, %r12d
	movq	%rdi, %r15
	movq	_M_TUN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_M_WAITOK@GOTPCREL(%rip), %rax
	movq	_M_ZERO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movl	$32, %edi
	callq	_malloc
	movq	%rax, %rbx
	movq	_MTX_DEF@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_mtx_init
	leaq	28(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_cv_init
	movl	4(%r15), %eax
	movl	%eax, 24(%rbx)
	movq	%r15, 16(%rbx)
	leaq	-96(%rbp), %rdi
	callq	_make_dev_args_init
	testq	%r13, %r13
	je	LBB0_2
## %bb.1:
	movq	_MAKEDEV_REF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
LBB0_2:
	movq	%r15, -64(%rbp)
	movq	%r13, -72(%rbp)
	movq	_UID_UUCP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -76(%rbp)
	movq	_GID_DIALER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -80(%rbp)
	movl	$384, -96(%rbp)                 ## imm = 0x180
	movl	%r12d, -92(%rbp)
	movq	%rbx, -88(%rbp)
	leaq	L_.str.2(%rip), %rdx
	leaq	-96(%rbp), %rdi
	movq	%r14, %rsi
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rcx
	callq	_make_dev_s
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movq	_M_TUN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_free
	jmp	LBB0_5
LBB0_4:
	movq	(%r14), %rax
	xorl	%edi, %edi
	cmpq	$0, (%rax)
	setne	%dil
	movq	%r15, %rsi
	callq	_KASSERT
	movq	(%r14), %rax
	movq	%rax, 8(%rbx)
	movq	%rbx, %rdi
	addq	$4, %rdi
	movq	%rbx, %rsi
	callq	_knlist_init_mtx
	movq	_tunmtx@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_mtx_lock
	movq	_tun_list@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_tunhead@GOTPCREL(%rip), %rdi
	movq	%rbx, %rsi
	callq	_TAILQ_INSERT_TAIL
	movq	%r14, %rdi
	callq	_mtx_unlock
LBB0_5:
	movl	%r12d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_M_TUN,4,2                      ## @M_TUN
	.comm	_M_WAITOK,4,2                   ## @M_WAITOK
	.comm	_M_ZERO,4,2                     ## @M_ZERO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tun_mtx"

	.comm	_MTX_DEF,4,2                    ## @MTX_DEF
L_.str.1:                               ## @.str.1
	.asciz	"tun_condvar"

	.comm	_MAKEDEV_REF,4,2                ## @MAKEDEV_REF
	.comm	_UID_UUCP,4,2                   ## @UID_UUCP
	.comm	_GID_DIALER,4,2                 ## @GID_DIALER
L_.str.2:                               ## @.str.2
	.asciz	"%s"

	.comm	_tunmtx,4,2                     ## @tunmtx
	.comm	_tunhead,4,2                    ## @tunhead
	.comm	_tun_list,4,2                   ## @tun_list
	.no_dead_strip	_tun_create_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tun_create_device
_tun_create_device:                     ; @tun_create_device
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x4
	mov	x20, x3
	mov	x23, x2
	mov	x22, x1
	mov	x24, x0
Lloh0:
	adrp	x25, _M_TUN@GOTPAGE
Lloh1:
	ldr	x25, [x25, _M_TUN@GOTPAGEOFF]
Lloh2:
	adrp	x8, _M_WAITOK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _M_WAITOK@GOTPAGEOFF]
	ldr	w1, [x25]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _M_ZERO@GOTPAGE
Lloh6:
	ldr	x9, [x9, _M_ZERO@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	w0, #32
	bl	_malloc
	mov	x19, x0
Lloh8:
	adrp	x8, _MTX_DEF@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MTX_DEF@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, #0
	bl	_mtx_init
	add	x0, x19, #28
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_cv_init
	ldr	w8, [x24, #4]
	str	w8, [x19, #24]
	str	x24, [x19, #16]
	mov	x0, sp
	bl	_make_dev_args_init
	cbz	x23, LBB0_2
; %bb.1:
Lloh15:
	adrp	x8, _MAKEDEV_REF@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MAKEDEV_REF@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	str	w8, [sp, #40]
LBB0_2:
	stp	x23, x24, [sp, #24]
Lloh18:
	adrp	x8, _UID_UUCP@GOTPAGE
Lloh19:
	ldr	x8, [x8, _UID_UUCP@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	adrp	x9, _GID_DIALER@GOTPAGE
Lloh22:
	ldr	x9, [x9, _GID_DIALER@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #16]
	mov	w8, #384
	stp	w8, w22, [sp]
	str	x19, [sp, #8]
Lloh24:
	adrp	x2, l_.str.2@PAGE
Lloh25:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, sp
	mov	x1, x20
	mov	x3, x21
	bl	_make_dev_s
	mov	x22, x0
	cbz	w0, LBB0_4
; %bb.3:
	ldr	w1, [x25]
	mov	x0, x19
	bl	_free
	b	LBB0_5
LBB0_4:
	ldr	x8, [x20]
	ldr	x8, [x8]
	cmp	x8, #0
	cset	w0, ne
	mov	x1, x21
	bl	_KASSERT
	ldr	x8, [x20]
	str	x8, [x19, #8]
	add	x0, x19, #4
	mov	x1, x19
	bl	_knlist_init_mtx
Lloh26:
	adrp	x20, _tunmtx@GOTPAGE
Lloh27:
	ldr	x20, [x20, _tunmtx@GOTPAGEOFF]
	mov	x0, x20
	bl	_mtx_lock
Lloh28:
	adrp	x8, _tun_list@GOTPAGE
Lloh29:
	ldr	x8, [x8, _tun_list@GOTPAGEOFF]
Lloh30:
	ldr	w2, [x8]
Lloh31:
	adrp	x0, _tunhead@GOTPAGE
Lloh32:
	ldr	x0, [x0, _tunhead@GOTPAGEOFF]
	mov	x1, x19
	bl	_TAILQ_INSERT_TAIL
	mov	x0, x20
	bl	_mtx_unlock
LBB0_5:
	mov	x0, x22
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_M_TUN,4,2                      ; @M_TUN
	.comm	_M_WAITOK,4,2                   ; @M_WAITOK
	.comm	_M_ZERO,4,2                     ; @M_ZERO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tun_mtx"

	.comm	_MTX_DEF,4,2                    ; @MTX_DEF
l_.str.1:                               ; @.str.1
	.asciz	"tun_condvar"

	.comm	_MAKEDEV_REF,4,2                ; @MAKEDEV_REF
	.comm	_UID_UUCP,4,2                   ; @UID_UUCP
	.comm	_GID_DIALER,4,2                 ; @GID_DIALER
l_.str.2:                               ; @.str.2
	.asciz	"%s"

	.comm	_tunmtx,4,2                     ; @tunmtx
	.comm	_tunhead,4,2                    ; @tunhead
	.comm	_tun_list,4,2                   ; @tun_list
	.no_dead_strip	_tun_create_device
.subsections_via_symbols
