	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function btc8821a2ant_action_a2dp_pan_hs
_btc8821a2ant_action_a2dp_pan_hs:       ## @btc8821a2ant_action_a2dp_pan_hs
	.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, %r14
	xorl	%esi, %esi
	movl	$2, %edx
	movl	$15, %ecx
	xorl	%r8d, %r8d
	callq	_btc8821a2ant_wifi_rssi_state
	movq	%rax, %rbx
	movq	_BT_8821A_2ANT_WIFI_RSSI_COEXSWITCH_THRES@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movl	$1, %esi
	movl	$2, %edx
	xorl	%r8d, %r8d
	callq	_btc8821a2ant_wifi_rssi_state
	movq	%rax, %r12
	movq	_BT_8821A_2ANT_BT_RSSI_COEXSWITCH_THRES@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$2, %esi
	xorl	%ecx, %ecx
	callq	_btc8821a2ant_bt_rssi_state
	movq	%rax, %r15
	movq	_BTC_RF_A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$1, %edx
	movl	$1048575, %ecx                  ## imm = 0xFFFFF
	xorl	%r8d, %r8d
	callq	*8(%r14)
	movq	_NORMAL_EXEC@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movl	$8, %r8d
	callq	_btc8821a2ant_limited_rx
	movl	(%r13), %esi
	movq	%r14, %rdi
	movl	$6, %edx
	callq	_btc8821a2ant_fw_dac_swing_lvl
	movq	%r15, %rdi
	callq	_BTC_RSSI_HIGH
	xorl	%edx, %edx
	testq	%rax, %rax
	setne	%dl
	movl	(%r13), %esi
	addl	%edx, %edx
	movq	%r14, %rdi
	callq	_btc8821a2ant_dec_bt_pwr
	movq	%r12, %rdi
	callq	_BTC_RSSI_HIGH
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%r15, %rdi
	callq	_BTC_RSSI_HIGH
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movl	(%r13), %esi
	movq	%r14, %rdi
	movl	$7, %edx
	callq	_btc8821a2ant_coex_table_with_type
	movq	_BTC_PS_WIFI_NATIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	jmp	LBB0_4
LBB0_3:
	movl	(%r13), %esi
	movq	%r14, %rdi
	movl	$13, %edx
	callq	_btc8821a2ant_coex_table_with_type
	movq	_BTC_PS_LPS_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$80, %edx
	movl	$4, %ecx
LBB0_4:
	callq	_btc8821a2ant_power_save_state
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$1, %edx
	movl	$2, %ecx
	callq	_btc8821a2ant_tdma_duration_adjust
	movq	_BTC_GET_U4_WIFI_BW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	callq	*(%r14)
	movq	-48(%rbp), %rax
	movq	_BTC_WIFI_BW_HT40@GOTPCREL(%rip), %rcx
	xorl	%esi, %esi
	cmpq	(%rcx), %rax
	sete	%sil
	movq	_BTC_RSSI_STATE_HIGH@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	sete	%al
	movq	_BTC_RSSI_STATE_STAY_HIGH@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rbx
	sete	%bl
	orb	%al, %bl
	movq	%r14, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_btc8821a2ant_sw_mechanism1
	movzbl	%bl, %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movl	$24, %r8d
	callq	_btc8821a2ant_sw_mechanism2
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BT_8821A_2ANT_WIFI_RSSI_COEXSWITCH_THRES,4,2 ## @BT_8821A_2ANT_WIFI_RSSI_COEXSWITCH_THRES
	.comm	_BT_8821A_2ANT_BT_RSSI_COEXSWITCH_THRES,4,2 ## @BT_8821A_2ANT_BT_RSSI_COEXSWITCH_THRES
	.comm	_BTC_RF_A,4,2                   ## @BTC_RF_A
	.comm	_NORMAL_EXEC,4,2                ## @NORMAL_EXEC
	.comm	_BTC_PS_WIFI_NATIVE,4,2         ## @BTC_PS_WIFI_NATIVE
	.comm	_BTC_PS_LPS_ON,4,2              ## @BTC_PS_LPS_ON
	.comm	_BTC_GET_U4_WIFI_BW,4,2         ## @BTC_GET_U4_WIFI_BW
	.comm	_BTC_WIFI_BW_HT40,8,3           ## @BTC_WIFI_BW_HT40
	.comm	_BTC_RSSI_STATE_HIGH,8,3        ## @BTC_RSSI_STATE_HIGH
	.comm	_BTC_RSSI_STATE_STAY_HIGH,8,3   ## @BTC_RSSI_STATE_STAY_HIGH
	.no_dead_strip	_btc8821a2ant_action_a2dp_pan_hs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function btc8821a2ant_action_a2dp_pan_hs
_btc8821a2ant_action_a2dp_pan_hs:       ; @btc8821a2ant_action_a2dp_pan_hs
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x0
	mov	w1, #0
	mov	w2, #2
	mov	w3, #15
	mov	w4, #0
	bl	_btc8821a2ant_wifi_rssi_state
	mov	x20, x0
Lloh0:
	adrp	x8, _BT_8821A_2ANT_WIFI_RSSI_COEXSWITCH_THRES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BT_8821A_2ANT_WIFI_RSSI_COEXSWITCH_THRES@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	mov	x0, x19
	mov	w1, #1
	mov	w2, #2
	mov	w4, #0
	bl	_btc8821a2ant_wifi_rssi_state
	mov	x22, x0
Lloh3:
	adrp	x8, _BT_8821A_2ANT_BT_RSSI_COEXSWITCH_THRES@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BT_8821A_2ANT_BT_RSSI_COEXSWITCH_THRES@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #2
	mov	w3, #0
	bl	_btc8821a2ant_bt_rssi_state
	mov	x21, x0
	ldr	x8, [x19, #8]
Lloh6:
	adrp	x9, _BTC_RF_A@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BTC_RF_A@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x9]
	mov	x0, x19
	mov	w2, #1
	mov	w3, #1048575
	mov	w4, #0
	blr	x8
Lloh9:
	adrp	x23, _NORMAL_EXEC@GOTPAGE
Lloh10:
	ldr	x23, [x23, _NORMAL_EXEC@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #0
	mov	w4, #8
	bl	_btc8821a2ant_limited_rx
	ldr	w1, [x23]
	mov	x0, x19
	mov	w2, #6
	bl	_btc8821a2ant_fw_dac_swing_lvl
	mov	x0, x21
	bl	_BTC_RSSI_HIGH
	cmp	x0, #0
	cset	w8, ne
	ldr	w1, [x23]
	lsl	w2, w8, #1
	mov	x0, x19
	bl	_btc8821a2ant_dec_bt_pwr
	mov	x0, x22
	bl	_BTC_RSSI_HIGH
	cbz	x0, LBB0_3
; %bb.1:
	mov	x0, x21
	bl	_BTC_RSSI_HIGH
	cbz	x0, LBB0_3
; %bb.2:
	ldr	w1, [x23]
	mov	x0, x19
	mov	w2, #7
	bl	_btc8821a2ant_coex_table_with_type
Lloh11:
	adrp	x8, _BTC_PS_WIFI_NATIVE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _BTC_PS_WIFI_NATIVE@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #0
	b	LBB0_4
LBB0_3:
	ldr	w1, [x23]
	mov	x0, x19
	mov	w2, #13
	bl	_btc8821a2ant_coex_table_with_type
Lloh14:
	adrp	x8, _BTC_PS_LPS_ON@GOTPAGE
Lloh15:
	ldr	x8, [x8, _BTC_PS_LPS_ON@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #80
	mov	w3, #4
LBB0_4:
	bl	_btc8821a2ant_power_save_state
	mov	x0, x19
	mov	w1, #0
	mov	w2, #1
	mov	w3, #2
	bl	_btc8821a2ant_tdma_duration_adjust
	ldr	x8, [x19]
Lloh17:
	adrp	x9, _BTC_GET_U4_WIFI_BW@GOTPAGE
Lloh18:
	ldr	x9, [x9, _BTC_GET_U4_WIFI_BW@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x9]
	add	x2, sp, #8
	mov	x0, x19
	blr	x8
	ldr	x8, [sp, #8]
Lloh20:
	adrp	x9, _BTC_WIFI_BW_HT40@GOTPAGE
Lloh21:
	ldr	x9, [x9, _BTC_WIFI_BW_HT40@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w1, eq
Lloh23:
	adrp	x8, _BTC_RSSI_STATE_HIGH@GOTPAGE
Lloh24:
	ldr	x8, [x8, _BTC_RSSI_STATE_HIGH@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
	cmp	x20, x8
Lloh26:
	adrp	x8, _BTC_RSSI_STATE_STAY_HIGH@GOTPAGE
Lloh27:
	ldr	x8, [x8, _BTC_RSSI_STATE_STAY_HIGH@GOTPAGEOFF]
Lloh28:
	ldr	x8, [x8]
	ccmp	x20, x8, #4, ne
	cset	w20, eq
	mov	x0, x19
	mov	w2, #0
	mov	w3, #0
	mov	w4, #0
	bl	_btc8821a2ant_sw_mechanism1
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	mov	w3, #0
	mov	w4, #24
	bl	_btc8821a2ant_sw_mechanism2
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_BT_8821A_2ANT_WIFI_RSSI_COEXSWITCH_THRES,4,2 ; @BT_8821A_2ANT_WIFI_RSSI_COEXSWITCH_THRES
	.comm	_BT_8821A_2ANT_BT_RSSI_COEXSWITCH_THRES,4,2 ; @BT_8821A_2ANT_BT_RSSI_COEXSWITCH_THRES
	.comm	_BTC_RF_A,4,2                   ; @BTC_RF_A
	.comm	_NORMAL_EXEC,4,2                ; @NORMAL_EXEC
	.comm	_BTC_PS_WIFI_NATIVE,4,2         ; @BTC_PS_WIFI_NATIVE
	.comm	_BTC_PS_LPS_ON,4,2              ; @BTC_PS_LPS_ON
	.comm	_BTC_GET_U4_WIFI_BW,4,2         ; @BTC_GET_U4_WIFI_BW
	.comm	_BTC_WIFI_BW_HT40,8,3           ; @BTC_WIFI_BW_HT40
	.comm	_BTC_RSSI_STATE_HIGH,8,3        ; @BTC_RSSI_STATE_HIGH
	.comm	_BTC_RSSI_STATE_STAY_HIGH,8,3   ; @BTC_RSSI_STATE_STAY_HIGH
	.no_dead_strip	_btc8821a2ant_action_a2dp_pan_hs
.subsections_via_symbols
