	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function btc8723b2ant_action_a2dp
_btc8723b2ant_action_a2dp:              ## @btc8723b2ant_action_a2dp
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movl	$0, -36(%rbp)
	movq	_BT_8723B_2ANT_BT_RSSI_COEXSWITCH_THRES@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_coex_dm@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	subl	(%rax), %ebx
	xorl	%esi, %esi
	movl	$2, %edx
	movl	$15, %ecx
	xorl	%r8d, %r8d
	callq	_btc8723b2ant_wifi_rssi_state
	movq	%r12, %rdi
	movl	$1, %esi
	movl	$2, %edx
	movl	$40, %ecx
	xorl	%r8d, %r8d
	callq	_btc8723b2ant_wifi_rssi_state
	movl	%eax, %r15d
	movq	%r12, %rdi
	movl	$2, %esi
	movl	%ebx, %edx
	xorl	%ecx, %ecx
	callq	_btc8723b2ant_bt_rssi_state
	movl	%eax, %r14d
	movq	_BTC_GET_U1_AP_NUM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-36(%rbp), %rdx
	movq	%r12, %rdi
	callq	*(%r12)
	cmpl	$10, -36(%rbp)
	jl	LBB0_3
## %bb.1:
	movl	%r15d, %edi
	callq	_BTC_RSSI_HIGH
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	_BTC_RF_A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$1, %edx
	movl	$1048575, %ecx                  ## imm = 0xFFFFF
	xorl	%r8d, %r8d
	callq	*8(%r12)
	movq	_NORMAL_EXEC@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	movl	$6, %edx
	callq	_btc8723b2ant_fw_dac_swing_lvl
	movl	(%rbx), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_btc8723b2ant_dec_bt_pwr
	movl	(%rbx), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_btc8723b2ant_coex_table_with_type
	movl	(%rbx), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	movl	$1, %ecx
	callq	_btc8723b2ant_ps_tdma
	jmp	LBB0_8
LBB0_3:
	movq	_BTC_RF_A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$1, %edx
	movl	$1048575, %ecx                  ## imm = 0xFFFFF
	xorl	%r8d, %r8d
	callq	*8(%r12)
	movq	_NORMAL_EXEC@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movl	$8, %r8d
	callq	_btc8723b2ant_limited_rx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	movl	$6, %edx
	callq	_btc8723b2ant_fw_dac_swing_lvl
	movl	%r14d, %edi
	callq	_BTC_RSSI_HIGH
	xorl	%edx, %edx
	testq	%rax, %rax
	setne	%dl
	movl	(%rbx), %esi
	addl	%edx, %edx
	movq	%r12, %rdi
	callq	_btc8723b2ant_dec_bt_pwr
	movl	%r15d, %edi
	callq	_BTC_RSSI_HIGH
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movl	%r14d, %edi
	callq	_BTC_RSSI_HIGH
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movl	(%rbx), %esi
	movq	%r12, %rdi
	movl	$7, %edx
	callq	_btc8723b2ant_coex_table_with_type
	movq	_BTC_PS_WIFI_NATIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	jmp	LBB0_7
LBB0_6:
	movl	(%rbx), %esi
	movq	%r12, %rdi
	movl	$13, %edx
	callq	_btc8723b2ant_coex_table_with_type
	movq	_BTC_PS_LPS_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$80, %edx
	movl	$4, %ecx
LBB0_7:
	callq	_btc8723b2ant_power_save_state
	movq	_BTC_RSSI_STATE_HIGH@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	setne	%al
	movq	_BTC_RSSI_STATE_STAY_HIGH@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r14d
	setne	%cl
	andb	%al, %cl
	movzbl	%cl, %edx
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$1, %ecx
	callq	_btc8723b2ant_tdma_duration_adjust
LBB0_8:
	movq	_BTC_GET_U4_WIFI_BW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	movq	%r12, %rdi
	callq	*(%r12)
	movq	_BTC_WIFI_BW_HT40@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	sete	%al
	movzbl	%al, %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_btc8723b2ant_sw_mechanism
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BT_8723B_2ANT_BT_RSSI_COEXSWITCH_THRES,4,2 ## @BT_8723B_2ANT_BT_RSSI_COEXSWITCH_THRES
	.comm	_coex_dm,8,3                    ## @coex_dm
	.comm	_BTC_GET_U1_AP_NUM,4,2          ## @BTC_GET_U1_AP_NUM
	.comm	_BTC_RF_A,4,2                   ## @BTC_RF_A
	.comm	_NORMAL_EXEC,4,2                ## @NORMAL_EXEC
	.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_PS_WIFI_NATIVE,4,2         ## @BTC_PS_WIFI_NATIVE
	.comm	_BTC_PS_LPS_ON,4,2              ## @BTC_PS_LPS_ON
	.comm	_BTC_RSSI_STATE_HIGH,4,2        ## @BTC_RSSI_STATE_HIGH
	.comm	_BTC_RSSI_STATE_STAY_HIGH,4,2   ## @BTC_RSSI_STATE_STAY_HIGH
	.no_dead_strip	_btc8723b2ant_action_a2dp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function btc8723b2ant_action_a2dp
_btc8723b2ant_action_a2dp:              ; @btc8723b2ant_action_a2dp
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	str	wzr, [sp, #4]
Lloh0:
	adrp	x8, _BT_8723B_2ANT_BT_RSSI_COEXSWITCH_THRES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BT_8723B_2ANT_BT_RSSI_COEXSWITCH_THRES@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _coex_dm@GOTPAGE
Lloh4:
	ldr	x9, [x9, _coex_dm@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ldr	w9, [x9]
	sub	w20, w8, w9
	mov	w1, #0
	mov	w2, #2
	mov	w3, #15
	mov	w4, #0
	bl	_btc8723b2ant_wifi_rssi_state
	mov	x0, x19
	mov	w1, #1
	mov	w2, #2
	mov	w3, #40
	mov	w4, #0
	bl	_btc8723b2ant_wifi_rssi_state
	mov	x21, x0
	mov	x0, x19
	mov	w1, #2
	mov	x2, x20
	mov	w3, #0
	bl	_btc8723b2ant_bt_rssi_state
	mov	x20, x0
	ldr	x8, [x19]
Lloh6:
	adrp	x9, _BTC_GET_U1_AP_NUM@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BTC_GET_U1_AP_NUM@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x9]
	add	x2, sp, #4
	mov	x0, x19
	blr	x8
	ldr	w8, [sp, #4]
	cmp	w8, #10
	b.lt	LBB0_3
; %bb.1:
	mov	x0, x21
	bl	_BTC_RSSI_HIGH
	cbz	x0, LBB0_3
; %bb.2:
	ldr	x8, [x19, #8]
Lloh9:
	adrp	x9, _BTC_RF_A@GOTPAGE
Lloh10:
	ldr	x9, [x9, _BTC_RF_A@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x9]
	mov	x0, x19
	mov	w2, #1
	mov	w3, #1048575
	mov	w4, #0
	blr	x8
Lloh12:
	adrp	x20, _NORMAL_EXEC@GOTPAGE
Lloh13:
	ldr	x20, [x20, _NORMAL_EXEC@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #6
	bl	_btc8723b2ant_fw_dac_swing_lvl
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #0
	bl	_btc8723b2ant_dec_bt_pwr
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #0
	bl	_btc8723b2ant_coex_table_with_type
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #1
	bl	_btc8723b2ant_ps_tdma
	b	LBB0_8
LBB0_3:
	ldr	x8, [x19, #8]
Lloh14:
	adrp	x9, _BTC_RF_A@GOTPAGE
Lloh15:
	ldr	x9, [x9, _BTC_RF_A@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x9]
	mov	x0, x19
	mov	w2, #1
	mov	w3, #1048575
	mov	w4, #0
	blr	x8
Lloh17:
	adrp	x22, _NORMAL_EXEC@GOTPAGE
Lloh18:
	ldr	x22, [x22, _NORMAL_EXEC@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #0
	mov	w4, #8
	bl	_btc8723b2ant_limited_rx
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #6
	bl	_btc8723b2ant_fw_dac_swing_lvl
	mov	x0, x20
	bl	_BTC_RSSI_HIGH
	cmp	x0, #0
	cset	w8, ne
	ldr	w1, [x22]
	lsl	w2, w8, #1
	mov	x0, x19
	bl	_btc8723b2ant_dec_bt_pwr
	mov	x0, x21
	bl	_BTC_RSSI_HIGH
	cbz	x0, LBB0_6
; %bb.4:
	mov	x0, x20
	bl	_BTC_RSSI_HIGH
	cbz	x0, LBB0_6
; %bb.5:
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #7
	bl	_btc8723b2ant_coex_table_with_type
Lloh19:
	adrp	x8, _BTC_PS_WIFI_NATIVE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _BTC_PS_WIFI_NATIVE@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #0
	b	LBB0_7
LBB0_6:
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #13
	bl	_btc8723b2ant_coex_table_with_type
Lloh22:
	adrp	x8, _BTC_PS_LPS_ON@GOTPAGE
Lloh23:
	ldr	x8, [x8, _BTC_PS_LPS_ON@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #80
	mov	w3, #4
LBB0_7:
	bl	_btc8723b2ant_power_save_state
Lloh25:
	adrp	x8, _BTC_RSSI_STATE_HIGH@GOTPAGE
Lloh26:
	ldr	x8, [x8, _BTC_RSSI_STATE_HIGH@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	cmp	w20, w8
Lloh28:
	adrp	x8, _BTC_RSSI_STATE_STAY_HIGH@GOTPAGE
Lloh29:
	ldr	x8, [x8, _BTC_RSSI_STATE_STAY_HIGH@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	ccmp	w20, w8, #4, ne
	cset	w2, ne
	mov	x0, x19
	mov	w1, #0
	mov	w3, #1
	bl	_btc8723b2ant_tdma_duration_adjust
LBB0_8:
	ldr	x8, [x19]
Lloh31:
	adrp	x9, _BTC_GET_U4_WIFI_BW@GOTPAGE
Lloh32:
	ldr	x9, [x9, _BTC_GET_U4_WIFI_BW@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x9]
	add	x2, sp, #8
	mov	x0, x19
	blr	x8
Lloh34:
	adrp	x8, _BTC_WIFI_BW_HT40@GOTPAGE
Lloh35:
	ldr	x8, [x8, _BTC_WIFI_BW_HT40@GOTPAGEOFF]
Lloh36:
	ldr	x8, [x8]
	ldr	x9, [sp, #8]
	cmp	x8, x9
	cset	w1, eq
	mov	x0, x19
	mov	w2, #0
	mov	w3, #0
	mov	w4, #0
	bl	_btc8723b2ant_sw_mechanism
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_BT_8723B_2ANT_BT_RSSI_COEXSWITCH_THRES,4,2 ; @BT_8723B_2ANT_BT_RSSI_COEXSWITCH_THRES
	.comm	_coex_dm,8,3                    ; @coex_dm
	.comm	_BTC_GET_U1_AP_NUM,4,2          ; @BTC_GET_U1_AP_NUM
	.comm	_BTC_RF_A,4,2                   ; @BTC_RF_A
	.comm	_NORMAL_EXEC,4,2                ; @NORMAL_EXEC
	.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_PS_WIFI_NATIVE,4,2         ; @BTC_PS_WIFI_NATIVE
	.comm	_BTC_PS_LPS_ON,4,2              ; @BTC_PS_LPS_ON
	.comm	_BTC_RSSI_STATE_HIGH,4,2        ; @BTC_RSSI_STATE_HIGH
	.comm	_BTC_RSSI_STATE_STAY_HIGH,4,2   ; @BTC_RSSI_STATE_STAY_HIGH
	.no_dead_strip	_btc8723b2ant_action_a2dp
.subsections_via_symbols
