	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ar9003_mci_end_reset           ## -- Begin function ar9003_mci_end_reset
	.p2align	4, 0x90
_ar9003_mci_end_reset:                  ## @ar9003_mci_end_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	%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
	xorl	%r14d, %r14d
	cmpl	$0, 8(%rdi)
	je	LBB0_13
## %bb.1:
	movq	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	callq	_IS_CHAN_2GHZ
	testq	%rax, %rax
	je	LBB0_12
## %bb.2:
	movq	(%rbx), %rax
	movq	_MCI_BT_SLEEP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.3:
	movq	_AR_MCI_INTERRUPT_RX_MSG_REMOTE_RESET@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_ar9003_mci_check_int
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	movq	_AR_MCI_INTERRUPT_RX_MSG_REQ_WAKE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ar9003_mci_check_int
	testl	%eax, %eax
	je	LBB0_12
LBB0_5:
	movq	_AR_MCI_INTERRUPT_RX_MSG_RAW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AR_MCI_INTERRUPT_RX_MSG_REQ_WAKE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	(%r13), %edx
	movq	%rbx, %rdi
	callq	_REG_WRITE
	movl	$1, %r13d
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_ar9003_mci_remote_reset
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_ar9003_mci_send_sys_waking
	movl	$1, %edi
	callq	_udelay
	movq	%r15, %rdi
	callq	_IS_CHAN_2GHZ
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_ar9003_mci_send_lna_transfer
LBB0_7:
	movq	_MCI_BT_AWAKE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	movq	_AR_PHY_TIMING4@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AR_PHY_TIMING_CONTROL4_DO_GAIN_DC_IQ_CAL_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r13d
	movq	%rbx, %rdi
	movl	%r13d, %edx
	callq	_REG_CLR_BIT
	testq	%r12, %r12
	je	LBB0_9
## %bb.8:
	movq	_TXIQCAL_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_clear_bit
	movq	_TXCLCAL_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_clear_bit
	movq	_RTT_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_clear_bit
LBB0_9:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_ath9k_hw_init_cal
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:
	movq	_AR_PHY_TIMING4@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AR_PHY_TIMING_CONTROL4_DO_GAIN_DC_IQ_CAL_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$1, %edx
	shll	%cl, %edx
	movq	%rbx, %rdi
	callq	_REG_SET_BIT
LBB0_12:
	movq	%rbx, %rdi
	callq	_ar9003_mci_enable_interrupt
LBB0_13:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_MCI_BT_SLEEP,8,3               ## @MCI_BT_SLEEP
	.comm	_AR_MCI_INTERRUPT_RX_MSG_REMOTE_RESET,4,2 ## @AR_MCI_INTERRUPT_RX_MSG_REMOTE_RESET
	.comm	_AR_MCI_INTERRUPT_RX_MSG_REQ_WAKE,4,2 ## @AR_MCI_INTERRUPT_RX_MSG_REQ_WAKE
	.comm	_AR_MCI_INTERRUPT_RX_MSG_RAW,4,2 ## @AR_MCI_INTERRUPT_RX_MSG_RAW
	.comm	_MCI_BT_AWAKE,8,3               ## @MCI_BT_AWAKE
	.comm	_AR_PHY_TIMING4,4,2             ## @AR_PHY_TIMING4
	.comm	_AR_PHY_TIMING_CONTROL4_DO_GAIN_DC_IQ_CAL_SHIFT,4,2 ## @AR_PHY_TIMING_CONTROL4_DO_GAIN_DC_IQ_CAL_SHIFT
	.comm	_TXIQCAL_DONE,4,2               ## @TXIQCAL_DONE
	.comm	_TXCLCAL_DONE,4,2               ## @TXCLCAL_DONE
	.comm	_RTT_DONE,4,2                   ## @RTT_DONE
	.comm	_EIO,4,2                        ## @EIO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ar9003_mci_end_reset           ; -- Begin function ar9003_mci_end_reset
	.p2align	2
_ar9003_mci_end_reset:                  ; @ar9003_mci_end_reset
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	ldr	w8, [x0, #8]
	cbz	w8, LBB0_12
; %bb.1:
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	mov	x0, x1
	bl	_IS_CHAN_2GHZ
	cbz	x0, LBB0_11
; %bb.2:
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _MCI_BT_SLEEP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MCI_BT_SLEEP@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.3:
Lloh3:
	adrp	x22, _AR_MCI_INTERRUPT_RX_MSG_REMOTE_RESET@GOTPAGE
Lloh4:
	ldr	x22, [x22, _AR_MCI_INTERRUPT_RX_MSG_REMOTE_RESET@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_ar9003_mci_check_int
Lloh5:
	adrp	x23, _AR_MCI_INTERRUPT_RX_MSG_REQ_WAKE@GOTPAGE
Lloh6:
	ldr	x23, [x23, _AR_MCI_INTERRUPT_RX_MSG_REQ_WAKE@GOTPAGEOFF]
	cbnz	w0, LBB0_5
; %bb.4:
	ldr	w1, [x23]
	mov	x0, x19
	bl	_ar9003_mci_check_int
	cbz	w0, LBB0_11
LBB0_5:
Lloh7:
	adrp	x8, _AR_MCI_INTERRUPT_RX_MSG_RAW@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AR_MCI_INTERRUPT_RX_MSG_RAW@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	ldr	w8, [x22]
	ldr	w9, [x23]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_REG_WRITE
	mov	w24, #1
	mov	x0, x19
	mov	w1, #1
	bl	_ar9003_mci_remote_reset
	mov	x0, x19
	mov	w1, #1
	bl	_ar9003_mci_send_sys_waking
	mov	w0, #1
	bl	_udelay
	mov	x0, x20
	bl	_IS_CHAN_2GHZ
	cbz	x0, LBB0_7
; %bb.6:
	mov	x0, x19
	mov	w1, #1
	bl	_ar9003_mci_send_lna_transfer
LBB0_7:
Lloh10:
	adrp	x8, _MCI_BT_AWAKE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MCI_BT_AWAKE@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
Lloh13:
	adrp	x22, _AR_PHY_TIMING4@GOTPAGE
Lloh14:
	ldr	x22, [x22, _AR_PHY_TIMING4@GOTPAGEOFF]
	str	x8, [x19]
	ldr	w1, [x22]
Lloh15:
	adrp	x23, _AR_PHY_TIMING_CONTROL4_DO_GAIN_DC_IQ_CAL_SHIFT@GOTPAGE
Lloh16:
	ldr	x23, [x23, _AR_PHY_TIMING_CONTROL4_DO_GAIN_DC_IQ_CAL_SHIFT@GOTPAGEOFF]
	ldr	w8, [x23]
	lsl	w2, w24, w8
	mov	x0, x19
	bl	_REG_CLR_BIT
	cbz	x21, LBB0_9
; %bb.8:
Lloh17:
	adrp	x8, _TXIQCAL_DONE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _TXIQCAL_DONE@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_clear_bit
Lloh20:
	adrp	x8, _TXCLCAL_DONE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _TXCLCAL_DONE@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_clear_bit
Lloh23:
	adrp	x8, _RTT_DONE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _RTT_DONE@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_clear_bit
LBB0_9:
	mov	x0, x19
	mov	x1, x20
	bl	_ath9k_hw_init_cal
	cbz	w0, LBB0_14
; %bb.10:
	ldr	w1, [x22]
	ldr	w8, [x23]
	mov	w9, #1
	lsl	w2, w9, w8
	mov	x0, x19
	bl	_REG_SET_BIT
LBB0_11:
	mov	x0, x19
	bl	_ar9003_mci_enable_interrupt
LBB0_12:
	mov	w0, #0
LBB0_13:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_14:
Lloh26:
	adrp	x8, _EIO@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_MCI_BT_SLEEP,8,3               ; @MCI_BT_SLEEP
	.comm	_AR_MCI_INTERRUPT_RX_MSG_REMOTE_RESET,4,2 ; @AR_MCI_INTERRUPT_RX_MSG_REMOTE_RESET
	.comm	_AR_MCI_INTERRUPT_RX_MSG_REQ_WAKE,4,2 ; @AR_MCI_INTERRUPT_RX_MSG_REQ_WAKE
	.comm	_AR_MCI_INTERRUPT_RX_MSG_RAW,4,2 ; @AR_MCI_INTERRUPT_RX_MSG_RAW
	.comm	_MCI_BT_AWAKE,8,3               ; @MCI_BT_AWAKE
	.comm	_AR_PHY_TIMING4,4,2             ; @AR_PHY_TIMING4
	.comm	_AR_PHY_TIMING_CONTROL4_DO_GAIN_DC_IQ_CAL_SHIFT,4,2 ; @AR_PHY_TIMING_CONTROL4_DO_GAIN_DC_IQ_CAL_SHIFT
	.comm	_TXIQCAL_DONE,4,2               ; @TXIQCAL_DONE
	.comm	_TXCLCAL_DONE,4,2               ; @TXCLCAL_DONE
	.comm	_RTT_DONE,4,2                   ; @RTT_DONE
	.comm	_EIO,4,2                        ; @EIO
.subsections_via_symbols
