	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtl_open
_rtl_open:                              ## @rtl_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	%rdi, %r15
	callq	_netdev_priv
	movq	%rax, %rbx
	movq	40(%rax), %r14
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	movq	%r14, %rdi
	callq	_pm_runtime_get_sync
	movq	_R8169_TX_RING_BYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	8(%rbx), %rdx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	movq	%r14, %rdi
	callq	_dma_alloc_coherent
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_15
## %bb.1:
	movq	_R8169_RX_RING_BYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	24(%rbx), %rdx
	movl	(%r13), %ecx
	movq	%r14, %rdi
	callq	_dma_alloc_coherent
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	je	LBB0_14
## %bb.2:
	movq	%rbx, %rdi
	callq	_rtl8169_init_ring
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movq	%rbx, %rdi
	callq	_rtl_request_firmware
	movq	_rtl8169_interrupt@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r15), %r9d
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	movq	%rbx, %r8
	callq	_pci_request_irq
	testl	%eax, %eax
	js	LBB0_5
## %bb.6:
	movq	%rbx, %rdi
	callq	_r8169_phy_connect
	testl	%eax, %eax
	je	LBB0_7
## %bb.11:
	movl	%eax, %r12d
	movq	%r14, %rdi
	xorl	%esi, %esi
	movq	%rbx, %rdx
	callq	_pci_free_irq
	jmp	LBB0_12
LBB0_3:
	movl	%eax, %r12d
	jmp	LBB0_13
LBB0_5:
	movl	%eax, %r12d
LBB0_12:
	movq	%rbx, %rdi
	callq	_rtl_release_firmware
	movq	%rbx, %rdi
	callq	_rtl8169_rx_clear
LBB0_13:
	movq	_R8169_RX_RING_BYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	16(%rbx), %rdx
	movl	24(%rbx), %ecx
	movq	%r14, %rdi
	callq	_dma_free_coherent
	movq	$0, 16(%rbx)
LBB0_14:
	movq	_R8169_TX_RING_BYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%rbx), %rdx
	movl	8(%rbx), %ecx
	movq	%r14, %rdi
	callq	_dma_free_coherent
	movq	$0, (%rbx)
LBB0_15:
	movq	%r14, %rdi
	callq	_pm_runtime_put_noidle
LBB0_10:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	%rbx, %rdi
	callq	_rtl_lock_work
	movq	_RTL_FLAG_TASK_ENABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	36(%rbx), %esi
	callq	_set_bit
	movq	%rbx, %rdi
	addq	$32, %rdi
	callq	_napi_enable
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_rtl8169_init_phy
	movq	%rbx, %rdi
	callq	_rtl_pll_power_up
	movq	%rbx, %rdi
	callq	_rtl_hw_start
	movq	%rbx, %rdi
	callq	_rtl8169_init_counter_offsets
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:
	movq	_hw@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rcx
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_netif_warn
LBB0_9:
	movl	28(%rbx), %edi
	callq	_phy_start
	movq	%r15, %rdi
	callq	_netif_start_queue
	movq	%rbx, %rdi
	callq	_rtl_unlock_work
	movq	%r14, %rdi
	callq	_pm_runtime_put_sync
	xorl	%r12d, %r12d
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_R8169_TX_RING_BYTES,4,2        ## @R8169_TX_RING_BYTES
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_R8169_RX_RING_BYTES,4,2        ## @R8169_RX_RING_BYTES
	.comm	_rtl8169_interrupt,4,2          ## @rtl8169_interrupt
	.comm	_RTL_FLAG_TASK_ENABLED,4,2      ## @RTL_FLAG_TASK_ENABLED
	.comm	_hw,4,2                         ## @hw
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"counter reset/update failed\n"

	.no_dead_strip	_rtl_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtl_open
_rtl_open:                              ; @rtl_open
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x0
	bl	_netdev_priv
	mov	x20, x0
	ldr	x19, [x0, #40]
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w22, w8
	mov	x0, x19
	bl	_pm_runtime_get_sync
Lloh3:
	adrp	x23, _R8169_TX_RING_BYTES@GOTPAGE
Lloh4:
	ldr	x23, [x23, _R8169_TX_RING_BYTES@GOTPAGEOFF]
	ldr	w1, [x23]
	add	x2, x20, #8
Lloh5:
	adrp	x25, _GFP_KERNEL@GOTPAGE
Lloh6:
	ldr	x25, [x25, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w3, [x25]
	mov	x0, x19
	bl	_dma_alloc_coherent
	str	x0, [x20]
	cbz	x0, LBB0_11
; %bb.1:
Lloh7:
	adrp	x24, _R8169_RX_RING_BYTES@GOTPAGE
Lloh8:
	ldr	x24, [x24, _R8169_RX_RING_BYTES@GOTPAGEOFF]
	ldr	w1, [x24]
	add	x2, x20, #24
	ldr	w3, [x25]
	mov	x0, x19
	bl	_dma_alloc_coherent
	str	x0, [x20, #16]
	cbz	x0, LBB0_10
; %bb.2:
	mov	x0, x20
	bl	_rtl8169_init_ring
	tbnz	w0, #31, LBB0_6
; %bb.3:
	mov	x0, x20
	bl	_rtl_request_firmware
Lloh9:
	adrp	x8, _rtl8169_interrupt@GOTPAGE
Lloh10:
	ldr	x8, [x8, _rtl8169_interrupt@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	ldr	w5, [x21]
	mov	x0, x19
	mov	w1, #0
	mov	x3, #0
	mov	x4, x20
	bl	_pci_request_irq
	tbnz	w0, #31, LBB0_7
; %bb.4:
	mov	x0, x20
	bl	_r8169_phy_connect
	cbz	w0, LBB0_13
; %bb.5:
	mov	x22, x0
	mov	x0, x19
	mov	w1, #0
	mov	x2, x20
	bl	_pci_free_irq
	b	LBB0_8
LBB0_6:
	mov	x22, x0
	b	LBB0_9
LBB0_7:
	mov	x22, x0
LBB0_8:
	mov	x0, x20
	bl	_rtl_release_firmware
	mov	x0, x20
	bl	_rtl8169_rx_clear
LBB0_9:
	ldr	w1, [x24]
	ldr	x2, [x20, #16]
	ldr	w3, [x20, #24]
	mov	x0, x19
	bl	_dma_free_coherent
	str	xzr, [x20, #16]
LBB0_10:
	ldr	w1, [x23]
	ldr	x2, [x20]
	ldr	w3, [x20, #8]
	mov	x0, x19
	bl	_dma_free_coherent
	str	xzr, [x20]
LBB0_11:
	mov	x0, x19
	bl	_pm_runtime_put_noidle
LBB0_12:
	mov	x0, x22
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_13:
	mov	x0, x20
	bl	_rtl_lock_work
Lloh12:
	adrp	x8, _RTL_FLAG_TASK_ENABLED@GOTPAGE
Lloh13:
	ldr	x8, [x8, _RTL_FLAG_TASK_ENABLED@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	ldr	w1, [x20, #36]
	bl	_set_bit
	add	x0, x20, #32
	bl	_napi_enable
	mov	x0, x21
	mov	x1, x20
	bl	_rtl8169_init_phy
	mov	x0, x20
	bl	_rtl_pll_power_up
	mov	x0, x20
	bl	_rtl_hw_start
	mov	x0, x20
	bl	_rtl8169_init_counter_offsets
	cbnz	w0, LBB0_15
; %bb.14:
Lloh15:
	adrp	x8, _hw@GOTPAGE
Lloh16:
	ldr	x8, [x8, _hw@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x3, l_.str@PAGE
Lloh19:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_netif_warn
LBB0_15:
	ldr	w0, [x20, #28]
	bl	_phy_start
	mov	x0, x21
	bl	_netif_start_queue
	mov	x0, x20
	bl	_rtl_unlock_work
	mov	x0, x19
	bl	_pm_runtime_put_sync
	mov	w22, #0
	b	LBB0_12
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_R8169_TX_RING_BYTES,4,2        ; @R8169_TX_RING_BYTES
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_R8169_RX_RING_BYTES,4,2        ; @R8169_RX_RING_BYTES
	.comm	_rtl8169_interrupt,4,2          ; @rtl8169_interrupt
	.comm	_RTL_FLAG_TASK_ENABLED,4,2      ; @RTL_FLAG_TASK_ENABLED
	.comm	_hw,4,2                         ; @hw
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"counter reset/update failed\n"

	.no_dead_strip	_rtl_open
.subsections_via_symbols
