	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtl8187_cmd_reset
_rtl8187_cmd_reset:                     ## @rtl8187_cmd_reset
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	8(%rdi), %rbx
	movq	(%rbx), %rsi
	addq	$4, %rsi
	movq	%rbx, %rdi
	callq	_rtl818x_ioread8
	andl	$2, %eax
	movq	_RTL818X_CMD_RESET@GOTPCREL(%rip), %r15
	orl	(%r15), %eax
	movq	(%rbx), %rsi
	addq	$4, %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_rtl818x_iowrite8
	movl	$2, %edi
	callq	_msleep
	movq	(%rbx), %rsi
	addq	$4, %rsi
	movq	%rbx, %rdi
	callq	_rtl818x_ioread8
	testl	%eax, (%r15)
	je	LBB0_11
## %bb.1:
	movl	$2, %edi
	callq	_msleep
	movq	(%rbx), %rsi
	addq	$4, %rsi
	movq	%rbx, %rdi
	callq	_rtl818x_ioread8
	testl	%eax, (%r15)
	je	LBB0_11
## %bb.2:
	movl	$2, %edi
	callq	_msleep
	movq	(%rbx), %rsi
	addq	$4, %rsi
	movq	%rbx, %rdi
	callq	_rtl818x_ioread8
	testl	%eax, (%r15)
	je	LBB0_11
## %bb.3:
	movl	$2, %edi
	callq	_msleep
	movq	(%rbx), %rsi
	addq	$4, %rsi
	movq	%rbx, %rdi
	callq	_rtl818x_ioread8
	testl	%eax, (%r15)
	je	LBB0_11
## %bb.4:
	movl	$2, %edi
	callq	_msleep
	movq	(%rbx), %rsi
	addq	$4, %rsi
	movq	%rbx, %rdi
	callq	_rtl818x_ioread8
	testl	%eax, (%r15)
	je	LBB0_11
## %bb.5:
	movl	$2, %edi
	callq	_msleep
	movq	(%rbx), %rsi
	addq	$4, %rsi
	movq	%rbx, %rdi
	callq	_rtl818x_ioread8
	testl	%eax, (%r15)
	je	LBB0_11
## %bb.6:
	movl	$2, %edi
	callq	_msleep
	movq	(%rbx), %rsi
	addq	$4, %rsi
	movq	%rbx, %rdi
	callq	_rtl818x_ioread8
	testl	%eax, (%r15)
	je	LBB0_11
## %bb.7:
	movl	$2, %edi
	callq	_msleep
	movq	(%rbx), %rsi
	addq	$4, %rsi
	movq	%rbx, %rdi
	callq	_rtl818x_ioread8
	testl	%eax, (%r15)
	je	LBB0_11
## %bb.8:
	movl	$2, %edi
	callq	_msleep
	movq	(%rbx), %rsi
	addq	$4, %rsi
	movq	%rbx, %rdi
	callq	_rtl818x_ioread8
	testl	%eax, (%r15)
	je	LBB0_11
## %bb.9:
	movl	$2, %edi
	callq	_msleep
	movq	(%rbx), %rsi
	addq	$4, %rsi
	movq	%rbx, %rdi
	callq	_rtl818x_ioread8
	testl	%eax, (%r15)
	je	LBB0_11
## %bb.10:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_22
LBB0_11:
	movq	(%rbx), %rsi
	movq	_RTL818X_EEPROM_CMD_LOAD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_rtl818x_iowrite8
	movl	$4, %edi
	callq	_msleep
	movq	(%rbx), %rsi
	movq	%rbx, %rdi
	callq	_rtl818x_ioread8
	movq	_RTL818X_EEPROM_CMD_CONFIG@GOTPCREL(%rip), %r12
	xorl	%r15d, %r15d
	testl	%eax, (%r12)
	je	LBB0_23
## %bb.12:
	movl	$4, %edi
	callq	_msleep
	movq	(%rbx), %rsi
	movq	%rbx, %rdi
	callq	_rtl818x_ioread8
	testl	%eax, (%r12)
	je	LBB0_23
## %bb.13:
	movl	$4, %edi
	callq	_msleep
	movq	(%rbx), %rsi
	movq	%rbx, %rdi
	callq	_rtl818x_ioread8
	testl	%eax, (%r12)
	je	LBB0_23
## %bb.14:
	movl	$4, %edi
	callq	_msleep
	movq	(%rbx), %rsi
	movq	%rbx, %rdi
	callq	_rtl818x_ioread8
	testl	%eax, (%r12)
	je	LBB0_23
## %bb.15:
	movl	$4, %edi
	callq	_msleep
	movq	(%rbx), %rsi
	movq	%rbx, %rdi
	callq	_rtl818x_ioread8
	testl	%eax, (%r12)
	je	LBB0_23
## %bb.16:
	movl	$4, %edi
	callq	_msleep
	movq	(%rbx), %rsi
	movq	%rbx, %rdi
	callq	_rtl818x_ioread8
	testl	%eax, (%r12)
	je	LBB0_23
## %bb.17:
	movl	$4, %edi
	callq	_msleep
	movq	(%rbx), %rsi
	movq	%rbx, %rdi
	callq	_rtl818x_ioread8
	testl	%eax, (%r12)
	je	LBB0_23
## %bb.18:
	movl	$4, %edi
	callq	_msleep
	movq	(%rbx), %rsi
	movq	%rbx, %rdi
	callq	_rtl818x_ioread8
	testl	%eax, (%r12)
	je	LBB0_23
## %bb.19:
	movl	$4, %edi
	callq	_msleep
	movq	(%rbx), %rsi
	movq	%rbx, %rdi
	callq	_rtl818x_ioread8
	testl	%eax, (%r12)
	je	LBB0_23
## %bb.20:
	movl	$4, %edi
	callq	_msleep
	movq	(%rbx), %rsi
	movq	%rbx, %rdi
	callq	_rtl818x_ioread8
	testl	%eax, (%r12)
	je	LBB0_23
## %bb.21:
	leaq	L_.str.1(%rip), %rsi
LBB0_22:
	movl	(%r14), %edi
	callq	_wiphy_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_23:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RTL818X_CMD_RESET,4,2          ## @RTL818X_CMD_RESET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Reset timeout!\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_RTL818X_EEPROM_CMD_LOAD,4,2    ## @RTL818X_EEPROM_CMD_LOAD
	.comm	_RTL818X_EEPROM_CMD_CONFIG,4,2  ## @RTL818X_EEPROM_CMD_CONFIG
L_.str.1:                               ## @.str.1
	.asciz	"eeprom reset timeout!\n"

	.no_dead_strip	_rtl8187_cmd_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtl8187_cmd_reset
_rtl8187_cmd_reset:                     ; @rtl8187_cmd_reset
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x20, [x0, #8]
	ldr	x8, [x20]
	add	x1, x8, #4
	mov	x0, x20
	bl	_rtl818x_ioread8
	and	w8, w0, #0x2
Lloh0:
	adrp	x21, _RTL818X_CMD_RESET@GOTPAGE
Lloh1:
	ldr	x21, [x21, _RTL818X_CMD_RESET@GOTPAGEOFF]
	ldr	w9, [x21]
	orr	w2, w8, w9
	ldr	x8, [x20]
	add	x1, x8, #4
	mov	x0, x20
	bl	_rtl818x_iowrite8
	mov	w0, #2
	bl	_msleep
	ldr	x8, [x20]
	add	x1, x8, #4
	mov	x0, x20
	bl	_rtl818x_ioread8
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_11
; %bb.1:
	mov	w0, #2
	bl	_msleep
	ldr	x8, [x20]
	add	x1, x8, #4
	mov	x0, x20
	bl	_rtl818x_ioread8
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_11
; %bb.2:
	mov	w0, #2
	bl	_msleep
	ldr	x8, [x20]
	add	x1, x8, #4
	mov	x0, x20
	bl	_rtl818x_ioread8
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_11
; %bb.3:
	mov	w0, #2
	bl	_msleep
	ldr	x8, [x20]
	add	x1, x8, #4
	mov	x0, x20
	bl	_rtl818x_ioread8
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_11
; %bb.4:
	mov	w0, #2
	bl	_msleep
	ldr	x8, [x20]
	add	x1, x8, #4
	mov	x0, x20
	bl	_rtl818x_ioread8
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_11
; %bb.5:
	mov	w0, #2
	bl	_msleep
	ldr	x8, [x20]
	add	x1, x8, #4
	mov	x0, x20
	bl	_rtl818x_ioread8
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_11
; %bb.6:
	mov	w0, #2
	bl	_msleep
	ldr	x8, [x20]
	add	x1, x8, #4
	mov	x0, x20
	bl	_rtl818x_ioread8
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_11
; %bb.7:
	mov	w0, #2
	bl	_msleep
	ldr	x8, [x20]
	add	x1, x8, #4
	mov	x0, x20
	bl	_rtl818x_ioread8
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_11
; %bb.8:
	mov	w0, #2
	bl	_msleep
	ldr	x8, [x20]
	add	x1, x8, #4
	mov	x0, x20
	bl	_rtl818x_ioread8
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_11
; %bb.9:
	mov	w0, #2
	bl	_msleep
	ldr	x8, [x20]
	add	x1, x8, #4
	mov	x0, x20
	bl	_rtl818x_ioread8
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_11
; %bb.10:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_22
LBB0_11:
	ldr	x1, [x20]
Lloh4:
	adrp	x8, _RTL818X_EEPROM_CMD_LOAD@GOTPAGE
Lloh5:
	ldr	x8, [x8, _RTL818X_EEPROM_CMD_LOAD@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_rtl818x_iowrite8
	mov	w0, #4
	bl	_msleep
	ldr	x1, [x20]
	mov	x0, x20
	bl	_rtl818x_ioread8
Lloh7:
	adrp	x21, _RTL818X_EEPROM_CMD_CONFIG@GOTPAGE
Lloh8:
	ldr	x21, [x21, _RTL818X_EEPROM_CMD_CONFIG@GOTPAGEOFF]
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_23
; %bb.12:
	mov	w0, #4
	bl	_msleep
	ldr	x1, [x20]
	mov	x0, x20
	bl	_rtl818x_ioread8
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_23
; %bb.13:
	mov	w0, #4
	bl	_msleep
	ldr	x1, [x20]
	mov	x0, x20
	bl	_rtl818x_ioread8
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_23
; %bb.14:
	mov	w0, #4
	bl	_msleep
	ldr	x1, [x20]
	mov	x0, x20
	bl	_rtl818x_ioread8
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_23
; %bb.15:
	mov	w0, #4
	bl	_msleep
	ldr	x1, [x20]
	mov	x0, x20
	bl	_rtl818x_ioread8
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_23
; %bb.16:
	mov	w0, #4
	bl	_msleep
	ldr	x1, [x20]
	mov	x0, x20
	bl	_rtl818x_ioread8
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_23
; %bb.17:
	mov	w0, #4
	bl	_msleep
	ldr	x1, [x20]
	mov	x0, x20
	bl	_rtl818x_ioread8
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_23
; %bb.18:
	mov	w0, #4
	bl	_msleep
	ldr	x1, [x20]
	mov	x0, x20
	bl	_rtl818x_ioread8
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_23
; %bb.19:
	mov	w0, #4
	bl	_msleep
	ldr	x1, [x20]
	mov	x0, x20
	bl	_rtl818x_ioread8
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_23
; %bb.20:
	mov	w0, #4
	bl	_msleep
	ldr	x1, [x20]
	mov	x0, x20
	bl	_rtl818x_ioread8
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_23
; %bb.21:
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_22:
	ldr	w0, [x19]
	bl	_wiphy_err
Lloh11:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_24
LBB0_23:
	mov	w0, #0
LBB0_24:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_RTL818X_CMD_RESET,4,2          ; @RTL818X_CMD_RESET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Reset timeout!\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_RTL818X_EEPROM_CMD_LOAD,4,2    ; @RTL818X_EEPROM_CMD_LOAD
	.comm	_RTL818X_EEPROM_CMD_CONFIG,4,2  ; @RTL818X_EEPROM_CMD_CONFIG
l_.str.1:                               ; @.str.1
	.asciz	"eeprom reset timeout!\n"

	.no_dead_strip	_rtl8187_cmd_reset
.subsections_via_symbols
