	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ar9003_aic_cal_done
_ar9003_aic_cal_done:                   ## @ar9003_aic_cal_done
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_ATH_AIC_BT_JUPITER_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	%r14d, %esi
	callq	_REG_READ
	movq	_ATH_AIC_BT_AIC_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_REG_WRITE
	movq	%rbx, %rdi
	callq	_ar9003_aic_cal_post_process
	testq	%rax, %rax
	jne	LBB0_1
## %bb.2:
	movq	_AIC_CAL_STATE_ERROR@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_AIC_CAL_STATE_DONE@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATH_AIC_BT_JUPITER_CTRL,4,2    ## @ATH_AIC_BT_JUPITER_CTRL
	.comm	_ATH_AIC_BT_AIC_ENABLE,4,2      ## @ATH_AIC_BT_AIC_ENABLE
	.comm	_AIC_CAL_STATE_DONE,4,2         ## @AIC_CAL_STATE_DONE
	.comm	_AIC_CAL_STATE_ERROR,4,2        ## @AIC_CAL_STATE_ERROR
	.no_dead_strip	_ar9003_aic_cal_done
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ar9003_aic_cal_done
_ar9003_aic_cal_done:                   ; @ar9003_aic_cal_done
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _ATH_AIC_BT_JUPITER_CTRL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ATH_AIC_BT_JUPITER_CTRL@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	mov	x1, x20
	bl	_REG_READ
Lloh3:
	adrp	x8, _ATH_AIC_BT_AIC_ENABLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ATH_AIC_BT_AIC_ENABLE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	bic	w2, w0, w8
	mov	x0, x19
	mov	x1, x20
	bl	_REG_WRITE
	mov	x0, x19
	bl	_ar9003_aic_cal_post_process
Lloh6:
	adrp	x8, _AIC_CAL_STATE_ERROR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AIC_CAL_STATE_ERROR@GOTPAGEOFF]
Lloh8:
	adrp	x9, _AIC_CAL_STATE_DONE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _AIC_CAL_STATE_DONE@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x8, x9, eq
	ldr	w8, [x8]
	str	w8, [x19]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ATH_AIC_BT_JUPITER_CTRL,4,2    ; @ATH_AIC_BT_JUPITER_CTRL
	.comm	_ATH_AIC_BT_AIC_ENABLE,4,2      ; @ATH_AIC_BT_AIC_ENABLE
	.comm	_AIC_CAL_STATE_DONE,4,2         ; @AIC_CAL_STATE_DONE
	.comm	_AIC_CAL_STATE_ERROR,4,2        ; @AIC_CAL_STATE_ERROR
	.no_dead_strip	_ar9003_aic_cal_done
.subsections_via_symbols
