	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ar9003_mci_set_power_awake     ## -- Begin function ar9003_mci_set_power_awake
	.p2align	4, 0x90
_ar9003_mci_set_power_awake:            ## @ar9003_mci_set_power_awake
	.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
	movq	_AH_WAIT_TIMEOUT@GOTPCREL(%rip), %rax
	movl	$-559038737, -44(%rbp)          ## 4-byte Folded Spill
                                        ## imm = 0xDEADBEEF
	cmpl	$0, (%rax)
	movl	$-559038737, %r12d              ## imm = 0xDEADBEEF
	jle	LBB0_6
## %bb.1:
	xorl	%ebx, %ebx
	movq	_AR_BTCOEX_CTRL2@GOTPCREL(%rip), %r13
	movq	_AH_TIME_QUANTUM@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_REG_READ
	cmpl	$-559038737, %eax               ## imm = 0xDEADBEEF
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r14), %edi
	callq	_udelay
	incl	%ebx
	movq	_AH_WAIT_TIMEOUT@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jl	LBB0_2
## %bb.5:
	movl	$-559038737, %r12d              ## imm = 0xDEADBEEF
	jmp	LBB0_6
LBB0_3:
	movl	%eax, %r12d
LBB0_6:
	movq	_AR_BTCOEX_CTRL2@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	$23, %edi
	callq	_BIT
	orl	%r12d, %eax
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_REG_WRITE
	movq	_AH_WAIT_TIMEOUT@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_11
## %bb.7:
	xorl	%ebx, %ebx
	movq	_AR_DIAG_SW@GOTPCREL(%rip), %r13
	movq	_AH_TIME_QUANTUM@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_REG_READ
	cmpl	$-559038737, %eax               ## imm = 0xDEADBEEF
	jne	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	(%r14), %edi
	callq	_udelay
	incl	%ebx
	movq	_AH_WAIT_TIMEOUT@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jl	LBB0_8
	jmp	LBB0_11
LBB0_9:
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
LBB0_11:
	movq	_AR_DIAG_SW@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	$27, %edi
	callq	_BIT
	movl	%eax, %r13d
	movl	$19, %edi
	callq	_BIT
	movl	%eax, %r14d
	orl	-44(%rbp), %r14d                ## 4-byte Folded Reload
	movl	$18, %edi
	callq	_BIT
	orl	%eax, %r13d
	orl	%r14d, %r13d
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%r13d, %edx
	callq	_REG_WRITE
	movq	_AR_OBS_BUS_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_REG_READ
	movl	%eax, %ebx
	movq	_AR_MCI_RX_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_REG_READ
	movq	_AR_MCI_RX_REMOTE_SLEEP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_MS
	movl	%eax, %r14d
	movq	_AR_BTCOEX_CTRL2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%r12d, %edx
	callq	_REG_WRITE
	movq	_AR_DIAG_SW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_REG_WRITE
	testl	%r14d, %r14d
	je	LBB0_13
## %bb.12:
	andl	$3, %ebx
	cmpl	$2, %ebx
	jne	LBB0_13
## %bb.14:
	movq	_AR_BTCOEX_RC@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_REG_SET_BIT
	movl	(%rbx), %esi
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_REG_CLR_BIT
	movl	$50, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_udelay                         ## TAILCALL
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AH_WAIT_TIMEOUT,4,2            ## @AH_WAIT_TIMEOUT
	.comm	_AR_BTCOEX_CTRL2,4,2            ## @AR_BTCOEX_CTRL2
	.comm	_AH_TIME_QUANTUM,4,2            ## @AH_TIME_QUANTUM
	.comm	_AR_DIAG_SW,4,2                 ## @AR_DIAG_SW
	.comm	_AR_OBS_BUS_CTRL,4,2            ## @AR_OBS_BUS_CTRL
	.comm	_AR_MCI_RX_STATUS,4,2           ## @AR_MCI_RX_STATUS
	.comm	_AR_MCI_RX_REMOTE_SLEEP,4,2     ## @AR_MCI_RX_REMOTE_SLEEP
	.comm	_AR_BTCOEX_RC,4,2               ## @AR_BTCOEX_RC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ar9003_mci_set_power_awake     ; -- Begin function ar9003_mci_set_power_awake
	.p2align	2
_ar9003_mci_set_power_awake:            ; @ar9003_mci_set_power_awake
	.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
	mov	w20, #48879
	movk	w20, #57005, lsl #16
Lloh0:
	adrp	x25, _AH_WAIT_TIMEOUT@GOTPAGE
Lloh1:
	ldr	x25, [x25, _AH_WAIT_TIMEOUT@GOTPAGEOFF]
	ldr	w8, [x25]
Lloh2:
	adrp	x23, _AR_BTCOEX_CTRL2@GOTPAGE
Lloh3:
	ldr	x23, [x23, _AR_BTCOEX_CTRL2@GOTPAGEOFF]
Lloh4:
	adrp	x26, _AH_TIME_QUANTUM@GOTPAGE
Lloh5:
	ldr	x26, [x26, _AH_TIME_QUANTUM@GOTPAGEOFF]
	mov	w21, #48879
	movk	w21, #57005, lsl #16
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.1:
	mov	w22, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x23]
	mov	x0, x19
	bl	_REG_READ
	cmp	w0, w20
	b.ne	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x26]
	bl	_udelay
	add	w22, w22, #1
	ldr	w8, [x25]
	cmp	w22, w8
	b.lt	LBB0_2
; %bb.4:
	mov	w21, #48879
	movk	w21, #57005, lsl #16
	b	LBB0_6
LBB0_5:
	mov	x21, x0
LBB0_6:
	ldr	w22, [x23]
	mov	w0, #23
	bl	_BIT
	orr	w2, w0, w21
	mov	x0, x19
	mov	x1, x22
	bl	_REG_WRITE
	ldr	w8, [x25]
Lloh6:
	adrp	x24, _AR_DIAG_SW@GOTPAGE
Lloh7:
	ldr	x24, [x24, _AR_DIAG_SW@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.7:
	mov	w22, #0
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x24]
	mov	x0, x19
	bl	_REG_READ
	cmp	w0, w20
	b.ne	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w0, [x26]
	bl	_udelay
	add	w22, w22, #1
	ldr	w8, [x25]
	cmp	w22, w8
	b.lt	LBB0_8
	b	LBB0_11
LBB0_10:
	mov	x20, x0
LBB0_11:
	ldr	w22, [x24]
	mov	w0, #27
	bl	_BIT
	orr	w25, w0, w20
	mov	w0, #19
	bl	_BIT
	orr	w25, w25, w0
	mov	w0, #18
	bl	_BIT
	orr	w2, w25, w0
	mov	x0, x19
	mov	x1, x22
	bl	_REG_WRITE
Lloh8:
	adrp	x8, _AR_OBS_BUS_CTRL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AR_OBS_BUS_CTRL@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_REG_READ
	and	w25, w0, #0x3
Lloh11:
	adrp	x8, _AR_MCI_RX_STATUS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AR_MCI_RX_STATUS@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_REG_READ
Lloh14:
	adrp	x8, _AR_MCI_RX_REMOTE_SLEEP@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AR_MCI_RX_REMOTE_SLEEP@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	bl	_MS
	mov	x22, x0
	ldr	w1, [x23]
	mov	x0, x19
	mov	x2, x21
	bl	_REG_WRITE
	ldr	w1, [x24]
	mov	x0, x19
	mov	x2, x20
	bl	_REG_WRITE
	cmp	w22, #0
	ccmp	w25, #2, #0, ne
	b.eq	LBB0_13
; %bb.12:
	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:
Lloh17:
	adrp	x20, _AR_BTCOEX_RC@GOTPAGE
Lloh18:
	ldr	x20, [x20, _AR_BTCOEX_RC@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #1
	bl	_REG_SET_BIT
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #1
	bl	_REG_CLR_BIT
	mov	w0, #50
	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
	b	_udelay
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_AH_WAIT_TIMEOUT,4,2            ; @AH_WAIT_TIMEOUT
	.comm	_AR_BTCOEX_CTRL2,4,2            ; @AR_BTCOEX_CTRL2
	.comm	_AH_TIME_QUANTUM,4,2            ; @AH_TIME_QUANTUM
	.comm	_AR_DIAG_SW,4,2                 ; @AR_DIAG_SW
	.comm	_AR_OBS_BUS_CTRL,4,2            ; @AR_OBS_BUS_CTRL
	.comm	_AR_MCI_RX_STATUS,4,2           ; @AR_MCI_RX_STATUS
	.comm	_AR_MCI_RX_REMOTE_SLEEP,4,2     ; @AR_MCI_RX_REMOTE_SLEEP
	.comm	_AR_BTCOEX_RC,4,2               ; @AR_BTCOEX_RC
.subsections_via_symbols
