	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tap_open
_tap_open:                              ## @tap_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	%rdi, %rbx
	movq	_current@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	(%rax), %r12
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	xorl	%eax, %eax
	callq	_rtnl_lock
	movq	%rbx, %rdi
	callq	_imajor
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_iminor
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_dev_get_by_tap_file
	testq	%rax, %rax
	je	LBB0_11
## %bb.1:
	movq	%rax, %r15
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	movq	_AF_UNSPEC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	_tap_proto@GOTPCREL(%rip), %rcx
	movq	%r12, %rdi
	xorl	%r8d, %r8d
	callq	_sk_alloc
	testq	%rax, %rax
	je	LBB0_10
## %bb.2:
	movq	%rax, %r12
	leaq	48(%rax), %rdi
	movq	(%r15), %rax
	movl	4(%rax), %esi
	movl	(%rbx), %edx
	callq	_ptr_ring_init
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	addq	$8, %r12
	movq	%r12, %rdi
	callq	_sk_free
	jmp	LBB0_10
LBB0_4:
	leaq	16(%r12), %rbx
	leaq	40(%r12), %rdi
	callq	_init_waitqueue_head
	movq	_SOCK_RAW@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 36(%r12)
	movq	_SS_CONNECTED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r12)
	movq	%r13, %r14
	movq	%r13, 24(%r12)
	movq	_tap_socket_ops@GOTPCREL(%rip), %rax
	movq	%rax, 16(%r12)
	movq	%r12, %r13
	addq	$8, %r13
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_sock_init_data
	movq	_tap_sock_write_space@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r12)
	movq	_tap_sock_destruct@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r12)
	movq	_IFF_VNET_HDR@GOTPCREL(%rip), %rax
	movq	_IFF_NO_PI@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_IFF_TAP@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, (%r12)
	movl	$4, 4(%r12)
	movq	(%r15), %rax
	movl	(%rax), %eax
	movq	_NETIF_F_HIGHDMA@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_7
## %bb.5:
	movq	_NETIF_F_SG@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_7
## %bb.6:
	movq	_SOCK_ZEROCOPY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_sock_set_flag
LBB0_7:
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	callq	_tap_set_queue
	testl	%eax, %eax
	je	LBB0_8
## %bb.9:
	movl	%eax, %r14d
	movq	%r13, %rdi
	callq	_sock_put
	jmp	LBB0_10
LBB0_8:
	xorl	%r14d, %r14d
LBB0_10:
	movq	(%r15), %rdi
	callq	_dev_put
LBB0_11:
	xorl	%eax, %eax
	callq	_rtnl_unlock
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_current,8,3                    ## @current
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AF_UNSPEC,4,2                  ## @AF_UNSPEC
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_tap_proto,4,2                  ## @tap_proto
	.comm	_SOCK_RAW,4,2                   ## @SOCK_RAW
	.comm	_SS_CONNECTED,4,2               ## @SS_CONNECTED
	.comm	_tap_socket_ops,4,2             ## @tap_socket_ops
	.comm	_tap_sock_write_space,4,2       ## @tap_sock_write_space
	.comm	_tap_sock_destruct,4,2          ## @tap_sock_destruct
	.comm	_IFF_VNET_HDR,4,2               ## @IFF_VNET_HDR
	.comm	_IFF_NO_PI,4,2                  ## @IFF_NO_PI
	.comm	_IFF_TAP,4,2                    ## @IFF_TAP
	.comm	_NETIF_F_HIGHDMA,4,2            ## @NETIF_F_HIGHDMA
	.comm	_NETIF_F_SG,4,2                 ## @NETIF_F_SG
	.comm	_SOCK_ZEROCOPY,4,2              ## @SOCK_ZEROCOPY
	.no_dead_strip	_tap_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tap_open
_tap_open:                              ; @tap_open
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _current@GOTPAGE
Lloh1:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	x21, [x8]
Lloh3:
	adrp	x8, _ENODEV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh5:
	ldr	w23, [x8]
	bl	_rtnl_lock
	mov	x0, x19
	bl	_imajor
	mov	x22, x0
	mov	x0, x19
	bl	_iminor
	mov	x1, x0
	mov	x0, x22
	bl	_dev_get_by_tap_file
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w22, w8
Lloh9:
	adrp	x8, _AF_UNSPEC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AF_UNSPEC@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh13:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x23]
Lloh14:
	adrp	x3, _tap_proto@GOTPAGE
Lloh15:
	ldr	x3, [x3, _tap_proto@GOTPAGEOFF]
	mov	x0, x21
	mov	w4, #0
	bl	_sk_alloc
	cbz	x0, LBB0_10
; %bb.2:
	mov	x21, x0
	add	x0, x0, #48
	ldr	x8, [x19]
	ldr	w1, [x8, #4]
	ldr	w2, [x23]
	bl	_ptr_ring_init
	cbz	x0, LBB0_5
; %bb.3:
	add	x0, x21, #8
	bl	_sk_free
	b	LBB0_10
LBB0_4:
	neg	w22, w23
	b	LBB0_11
LBB0_5:
	add	x0, x21, #40
	bl	_init_waitqueue_head
Lloh16:
	adrp	x8, _SOCK_RAW@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SOCK_RAW@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
Lloh19:
	adrp	x9, _SS_CONNECTED@GOTPAGE
Lloh20:
	ldr	x9, [x9, _SS_CONNECTED@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	stp	w9, w8, [x21, #32]
	str	x20, [x21, #24]
Lloh22:
	adrp	x8, _tap_socket_ops@GOTPAGE
Lloh23:
	ldr	x8, [x8, _tap_socket_ops@GOTPAGEOFF]
	mov	x0, x21
	str	x8, [x0, #16]!
	add	x23, x21, #8
	mov	x1, x23
	bl	_sock_init_data
Lloh24:
	adrp	x8, _tap_sock_write_space@GOTPAGE
Lloh25:
	ldr	x8, [x8, _tap_sock_write_space@GOTPAGEOFF]
Lloh26:
	adrp	x9, _tap_sock_destruct@GOTPAGE
Lloh27:
	ldr	x9, [x9, _tap_sock_destruct@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
Lloh29:
	ldr	w9, [x9]
	stp	w9, w8, [x21, #8]
Lloh30:
	adrp	x8, _IFF_VNET_HDR@GOTPAGE
Lloh31:
	ldr	x8, [x8, _IFF_VNET_HDR@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
Lloh33:
	adrp	x9, _IFF_NO_PI@GOTPAGE
Lloh34:
	ldr	x9, [x9, _IFF_NO_PI@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
Lloh36:
	adrp	x10, _IFF_TAP@GOTPAGE
Lloh37:
	ldr	x10, [x10, _IFF_TAP@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh38:
	ldr	w9, [x10]
	orr	w8, w8, w9
	mov	w9, #4
	stp	w8, w9, [x21]
	ldr	x8, [x19]
	ldr	w8, [x8]
Lloh39:
	adrp	x9, _NETIF_F_HIGHDMA@GOTPAGE
Lloh40:
	ldr	x9, [x9, _NETIF_F_HIGHDMA@GOTPAGEOFF]
Lloh41:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.6:
Lloh42:
	adrp	x9, _NETIF_F_SG@GOTPAGE
Lloh43:
	ldr	x9, [x9, _NETIF_F_SG@GOTPAGEOFF]
Lloh44:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.7:
Lloh45:
	adrp	x8, _SOCK_ZEROCOPY@GOTPAGE
Lloh46:
	ldr	x8, [x8, _SOCK_ZEROCOPY@GOTPAGEOFF]
Lloh47:
	ldr	w1, [x8]
	mov	x0, x23
	bl	_sock_set_flag
LBB0_8:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_tap_set_queue
	mov	x22, x0
	cbz	w0, LBB0_10
; %bb.9:
	mov	x0, x23
	bl	_sock_put
LBB0_10:
	ldr	x0, [x19]
	bl	_dev_put
LBB0_11:
	bl	_rtnl_unlock
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh28
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.cfi_endproc
                                        ; -- End function
	.comm	_current,8,3                    ; @current
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AF_UNSPEC,4,2                  ; @AF_UNSPEC
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_tap_proto,4,2                  ; @tap_proto
	.comm	_SOCK_RAW,4,2                   ; @SOCK_RAW
	.comm	_SS_CONNECTED,4,2               ; @SS_CONNECTED
	.comm	_tap_socket_ops,4,2             ; @tap_socket_ops
	.comm	_tap_sock_write_space,4,2       ; @tap_sock_write_space
	.comm	_tap_sock_destruct,4,2          ; @tap_sock_destruct
	.comm	_IFF_VNET_HDR,4,2               ; @IFF_VNET_HDR
	.comm	_IFF_NO_PI,4,2                  ; @IFF_NO_PI
	.comm	_IFF_TAP,4,2                    ; @IFF_TAP
	.comm	_NETIF_F_HIGHDMA,4,2            ; @NETIF_F_HIGHDMA
	.comm	_NETIF_F_SG,4,2                 ; @NETIF_F_SG
	.comm	_SOCK_ZEROCOPY,4,2              ; @SOCK_ZEROCOPY
	.no_dead_strip	_tap_open
.subsections_via_symbols
