	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtl8152_runtime_suspend
_rtl8152_runtime_suspend:               ## @rtl8152_runtime_suspend
	.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, %rbx
	movq	24(%rdi), %r15
	movq	_SELECTIVE_SUSPEND@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	20(%rbx), %r14
	movq	%r14, %rsi
	callq	_set_bit
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_smp_mb__after_atomic
	movq	%r15, %rdi
	callq	_netif_running
	testq	%rax, %rax
	je	LBB0_11
## %bb.1:
	movq	_WORK_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_11
## %bb.2:
	movq	%r15, %rdi
	callq	_netif_carrier_ok
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	_MCU_TYPE_PLA@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	_PLA_RCR@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	%rbx, %rdi
	callq	_ocp_read_dword
	movq	_RCR_ACPT_ALL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	andl	%eax, %ecx
	movl	(%r13), %esi
	movl	(%r12), %edx
	movq	%rbx, %rdi
	callq	_ocp_write_dword
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_rxdy_gated_en
	movl	(%r13), %esi
	movq	_PLA_OOB_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_ocp_read_byte
	movq	_RXFIFO_EMPTY@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_5
## %bb.12:
	xorl	%r13d, %r13d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_rxdy_gated_en
	movq	_MCU_TYPE_PLA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PLA_RCR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	_ocp_write_dword
	movq	_SELECTIVE_SUSPEND@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_clear_bit
	xorl	%eax, %eax
	callq	_smp_mb__after_atomic
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_3:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_5:
	movq	_WORK_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_clear_bit
	movl	16(%rbx), %edi
	callq	_usb_kill_urb
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	*8(%rbx)
	movq	%r15, %rdi
	callq	_netif_carrier_ok
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	callq	_napi_disable
	movq	%rbx, %rdi
	callq	_rtl_stop_rx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_rxdy_gated_en
	movq	_MCU_TYPE_PLA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PLA_RCR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	_ocp_write_dword
	movq	%rbx, %rdi
	callq	_napi_enable
LBB0_7:
	movq	%rbx, %rdi
	callq	_delay_autosuspend
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	%rbx, %rdi
	callq	_rtl8152_runtime_resume
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
LBB0_10:
	subl	(%rax), %r13d
	jmp	LBB0_11
LBB0_8:
	xorl	%r13d, %r13d
LBB0_11:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SELECTIVE_SUSPEND,4,2          ## @SELECTIVE_SUSPEND
	.comm	_WORK_ENABLE,4,2                ## @WORK_ENABLE
	.comm	_MCU_TYPE_PLA,4,2               ## @MCU_TYPE_PLA
	.comm	_PLA_RCR,4,2                    ## @PLA_RCR
	.comm	_RCR_ACPT_ALL,4,2               ## @RCR_ACPT_ALL
	.comm	_PLA_OOB_CTRL,4,2               ## @PLA_OOB_CTRL
	.comm	_RXFIFO_EMPTY,4,2               ## @RXFIFO_EMPTY
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_rtl8152_runtime_suspend
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtl8152_runtime_suspend
_rtl8152_runtime_suspend:               ; @rtl8152_runtime_suspend
	.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	x19, x0
	ldr	x21, [x0, #24]
Lloh0:
	adrp	x25, _SELECTIVE_SUSPEND@GOTPAGE
Lloh1:
	ldr	x25, [x25, _SELECTIVE_SUSPEND@GOTPAGEOFF]
	ldr	w0, [x25]
	add	x20, x19, #20
	mov	x1, x20
	bl	_set_bit
	bl	_smp_mb__after_atomic
	mov	x0, x21
	bl	_netif_running
	cbz	x0, LBB0_11
; %bb.1:
Lloh2:
	adrp	x26, _WORK_ENABLE@GOTPAGE
Lloh3:
	ldr	x26, [x26, _WORK_ENABLE@GOTPAGEOFF]
	ldr	w0, [x26]
	mov	x1, x20
	bl	_test_bit
	cbz	x0, LBB0_11
; %bb.2:
	mov	x0, x21
	bl	_netif_carrier_ok
Lloh4:
	adrp	x24, _MCU_TYPE_PLA@GOTPAGE
Lloh5:
	ldr	x24, [x24, _MCU_TYPE_PLA@GOTPAGEOFF]
Lloh6:
	adrp	x23, _PLA_RCR@GOTPAGE
Lloh7:
	ldr	x23, [x23, _PLA_RCR@GOTPAGEOFF]
	cbz	x0, LBB0_5
; %bb.3:
	ldr	w1, [x24]
	ldr	w2, [x23]
	mov	x0, x19
	bl	_ocp_read_dword
	mov	x22, x0
Lloh8:
	adrp	x8, _RCR_ACPT_ALL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _RCR_ACPT_ALL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	bic	w3, w0, w8
	ldr	w1, [x24]
	ldr	w2, [x23]
	mov	x0, x19
	bl	_ocp_write_dword
	mov	x0, x19
	mov	w1, #1
	bl	_rxdy_gated_en
	ldr	w1, [x24]
Lloh11:
	adrp	x8, _PLA_OOB_CTRL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PLA_OOB_CTRL@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_ocp_read_byte
Lloh14:
	adrp	x8, _RXFIFO_EMPTY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _RXFIFO_EMPTY@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	tst	w8, w0
	b.ne	LBB0_6
; %bb.4:
	mov	x0, x19
	mov	w1, #0
	bl	_rxdy_gated_en
	ldr	w1, [x24]
	ldr	w2, [x23]
	mov	x0, x19
	mov	x3, x22
	bl	_ocp_write_dword
	ldr	w0, [x25]
	mov	x1, x20
	bl	_clear_bit
	bl	_smp_mb__after_atomic
	b	LBB0_10
LBB0_5:
	mov	w22, #0
LBB0_6:
	ldr	w0, [x26]
	mov	x1, x20
	bl	_clear_bit
	ldr	w0, [x19, #16]
	bl	_usb_kill_urb
	ldr	x8, [x19, #8]
	mov	x0, x19
	mov	w1, #1
	blr	x8
	mov	x0, x21
	bl	_netif_carrier_ok
	cbz	x0, LBB0_8
; %bb.7:
	mov	x0, x19
	bl	_napi_disable
	mov	x0, x19
	bl	_rtl_stop_rx
	mov	x0, x19
	mov	w1, #0
	bl	_rxdy_gated_en
	ldr	w1, [x24]
	ldr	w2, [x23]
	mov	x0, x19
	mov	x3, x22
	bl	_ocp_write_dword
	mov	x0, x19
	bl	_napi_enable
LBB0_8:
	mov	x0, x19
	bl	_delay_autosuspend
	cbz	x0, LBB0_11
; %bb.9:
	mov	x0, x19
	bl	_rtl8152_runtime_resume
LBB0_10:
Lloh17:
	adrp	x8, _EBUSY@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_SELECTIVE_SUSPEND,4,2          ; @SELECTIVE_SUSPEND
	.comm	_WORK_ENABLE,4,2                ; @WORK_ENABLE
	.comm	_MCU_TYPE_PLA,4,2               ; @MCU_TYPE_PLA
	.comm	_PLA_RCR,4,2                    ; @PLA_RCR
	.comm	_RCR_ACPT_ALL,4,2               ; @RCR_ACPT_ALL
	.comm	_PLA_OOB_CTRL,4,2               ; @PLA_OOB_CTRL
	.comm	_RXFIFO_EMPTY,4,2               ; @RXFIFO_EMPTY
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_rtl8152_runtime_suspend
.subsections_via_symbols
