	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtl8367_reset_chip
_rtl8367_reset_chip:                    ## @rtl8367_reset_chip
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_RTL8367_CHIP_RESET_REG@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_RTL8367_CHIP_RESET_HW@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	callq	_REG_WR
	movq	_RTL8367_RESET_DELAY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msleep
	movl	(%r12), %esi
	leaq	-36(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_REG_RD
	movl	(%r15), %eax
	xorl	%r14d, %r14d
	testl	%eax, -36(%rbp)
	je	LBB0_11
## %bb.1:
	movl	$1, %edi
	callq	_msleep
	movl	(%r12), %esi
	leaq	-36(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_REG_RD
	movl	(%r15), %eax
	testl	%eax, -36(%rbp)
	je	LBB0_11
## %bb.2:
	movl	$1, %edi
	callq	_msleep
	movl	(%r12), %esi
	leaq	-36(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_REG_RD
	movl	(%r15), %eax
	testl	%eax, -36(%rbp)
	je	LBB0_11
## %bb.3:
	movl	$1, %edi
	callq	_msleep
	movl	(%r12), %esi
	leaq	-36(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_REG_RD
	movl	(%r15), %eax
	testl	%eax, -36(%rbp)
	je	LBB0_11
## %bb.4:
	movl	$1, %edi
	callq	_msleep
	movl	(%r12), %esi
	leaq	-36(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_REG_RD
	movl	(%r15), %eax
	testl	%eax, -36(%rbp)
	je	LBB0_11
## %bb.5:
	movl	$1, %edi
	callq	_msleep
	movl	(%r12), %esi
	leaq	-36(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_REG_RD
	movl	(%r15), %eax
	testl	%eax, -36(%rbp)
	je	LBB0_11
## %bb.6:
	movl	$1, %edi
	callq	_msleep
	movl	(%r12), %esi
	leaq	-36(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_REG_RD
	movl	(%r15), %eax
	testl	%eax, -36(%rbp)
	je	LBB0_11
## %bb.7:
	movl	$1, %edi
	callq	_msleep
	movl	(%r12), %esi
	leaq	-36(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_REG_RD
	movl	(%r15), %eax
	testl	%eax, -36(%rbp)
	je	LBB0_11
## %bb.8:
	movl	$1, %edi
	callq	_msleep
	movl	(%r12), %esi
	leaq	-36(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_REG_RD
	movl	(%r15), %eax
	testl	%eax, -36(%rbp)
	je	LBB0_11
## %bb.9:
	movl	$1, %edi
	callq	_msleep
	movl	(%r12), %esi
	leaq	-36(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_REG_RD
	movl	(%r15), %eax
	testl	%eax, -36(%rbp)
	je	LBB0_11
## %bb.10:
	movl	$1, %edi
	callq	_msleep
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_11:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RTL8367_CHIP_RESET_REG,4,2     ## @RTL8367_CHIP_RESET_REG
	.comm	_RTL8367_CHIP_RESET_HW,4,2      ## @RTL8367_CHIP_RESET_HW
	.comm	_RTL8367_RESET_DELAY,4,2        ## @RTL8367_RESET_DELAY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"chip reset timed out\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_rtl8367_reset_chip
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtl8367_reset_chip
_rtl8367_reset_chip:                    ; @rtl8367_reset_chip
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
Lloh0:
	adrp	x21, _RTL8367_CHIP_RESET_REG@GOTPAGE
Lloh1:
	ldr	x21, [x21, _RTL8367_CHIP_RESET_REG@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh2:
	adrp	x20, _RTL8367_CHIP_RESET_HW@GOTPAGE
Lloh3:
	ldr	x20, [x20, _RTL8367_CHIP_RESET_HW@GOTPAGEOFF]
	ldr	w2, [x20]
	bl	_REG_WR
Lloh4:
	adrp	x8, _RTL8367_RESET_DELAY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _RTL8367_RESET_DELAY@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	bl	_msleep
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x19
	bl	_REG_RD
	ldr	w8, [sp, #12]
	ldr	w9, [x20]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.1:
	mov	w0, #1
	bl	_msleep
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x19
	bl	_REG_RD
	ldr	w8, [sp, #12]
	ldr	w9, [x20]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.2:
	mov	w0, #1
	bl	_msleep
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x19
	bl	_REG_RD
	ldr	w8, [sp, #12]
	ldr	w9, [x20]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.3:
	mov	w0, #1
	bl	_msleep
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x19
	bl	_REG_RD
	ldr	w8, [sp, #12]
	ldr	w9, [x20]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.4:
	mov	w0, #1
	bl	_msleep
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x19
	bl	_REG_RD
	ldr	w8, [sp, #12]
	ldr	w9, [x20]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.5:
	mov	w0, #1
	bl	_msleep
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x19
	bl	_REG_RD
	ldr	w8, [sp, #12]
	ldr	w9, [x20]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.6:
	mov	w0, #1
	bl	_msleep
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x19
	bl	_REG_RD
	ldr	w8, [sp, #12]
	ldr	w9, [x20]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.7:
	mov	w0, #1
	bl	_msleep
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x19
	bl	_REG_RD
	ldr	w8, [sp, #12]
	ldr	w9, [x20]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.8:
	mov	w0, #1
	bl	_msleep
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x19
	bl	_REG_RD
	ldr	w8, [sp, #12]
	ldr	w9, [x20]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.9:
	mov	w0, #1
	bl	_msleep
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x19
	bl	_REG_RD
	ldr	w8, [sp, #12]
	ldr	w9, [x20]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.10:
	mov	w0, #1
	bl	_msleep
	ldr	w0, [x19]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh9:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_11:
	mov	w0, #0
LBB0_12:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_RTL8367_CHIP_RESET_REG,4,2     ; @RTL8367_CHIP_RESET_REG
	.comm	_RTL8367_CHIP_RESET_HW,4,2      ; @RTL8367_CHIP_RESET_HW
	.comm	_RTL8367_RESET_DELAY,4,2        ; @RTL8367_RESET_DELAY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"chip reset timed out\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_rtl8367_reset_chip
.subsections_via_symbols
