	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function btc8723b2ant_action_hid_a2dp
_btc8723b2ant_action_hid_a2dp:          ## @btc8723b2ant_action_hid_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	_BT_8723B_2ANT_WIFI_RSSI_COEXSWITCH_THRES@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_coex_dm@GOTPCREL(%rip), %r14
	movq	(%r14), %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	%ebx, %ecx
	xorl	%r8d, %r8d
	callq	_btc8723b2ant_wifi_rssi_state
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_BT_8723B_2ANT_BT_RSSI_COEXSWITCH_THRES@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	(%r14), %rax
	subl	(%rax), %edx
	movq	%r12, %rdi
	movl	$3, %esi
	movl	$37, %ecx
	callq	_btc8723b2ant_bt_rssi_state
	movl	%eax, %r14d
	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	*32(%r12)
	movq	_NORMAL_EXEC@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	movl	$1, %ecx
	movl	$5, %r8d
	callq	_btc8723b2ant_limited_rx
	movl	(%r13), %esi
	movq	%r12, %rdi
	movl	$6, %edx
	callq	_btc8723b2ant_fw_dac_swing_lvl
	movq	_BTC_GET_U4_WIFI_BW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-56(%rbp), %rdx
	movq	%r12, %rdi
	callq	*24(%r12)
	movq	-56(%rbp), %rbx
	movq	_BTC_WIFI_BW_LEGACY@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movl	%r14d, %edi
	callq	_BTC_RSSI_HIGH
	cmpq	%r15, %rbx
	jne	LBB0_5
## %bb.1:
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movl	(%r13), %esi
	jmp	LBB0_4
LBB0_5:
	testq	%rax, %rax
	je	LBB0_3
## %bb.6:
	movl	(%r13), %esi
	movq	%r12, %rdi
	movl	$4, %edx
	jmp	LBB0_8
LBB0_3:
	movl	%r14d, %edi
	callq	_BTC_RSSI_MEDIUM
	movl	(%r13), %esi
	testq	%rax, %rax
	je	LBB0_7
LBB0_4:
	movq	%r12, %rdi
	movl	$2, %edx
	jmp	LBB0_8
LBB0_7:
	movq	%r12, %rdi
	xorl	%edx, %edx
LBB0_8:
	callq	_btc8723b2ant_dec_bt_pwr
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_BTC_RSSI_HIGH
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:
	movl	%r14d, %edi
	callq	_BTC_RSSI_HIGH
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movl	(%r13), %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_12
LBB0_11:
	movl	(%r13), %esi
	movq	%r12, %rdi
	movl	$14, %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_12:
	callq	_btc8723b2ant_power_save_state
	movl	%r14d, %edi
	callq	_BTC_RSSI_HIGH
	xorl	%edx, %edx
	testq	%rax, %rax
	jne	LBB0_14
## %bb.13:
	movl	(%r13), %esi
	movq	%r12, %rdi
	movl	$18, %edx
	callq	_btc8723b2ant_fw_dac_swing_lvl
	movq	%r12, %rdi
	movl	$1110, %esi                     ## imm = 0x456
	movl	$56, %edx
	callq	*16(%r12)
	movq	%r12, %rdi
	movl	$1066, %esi                     ## imm = 0x42A
	movl	$2056, %edx                     ## imm = 0x808
	callq	*8(%r12)
	movq	%r12, %rdi
	movl	$1072, %esi                     ## imm = 0x430
	xorl	%edx, %edx
	callq	*(%r12)
	movq	%r12, %rdi
	movl	$1076, %esi                     ## imm = 0x434
	movl	$16842752, %edx                 ## imm = 0x1010000
	callq	*(%r12)
	movl	$1, %edx
LBB0_14:
	movq	%r12, %rdi
	movl	$1, %esi
	movl	$1, %ecx
	callq	_btc8723b2ant_tdma_duration_adjust
	movq	_BTC_WIFI_BW_HT40@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	xorl	%esi, %esi
	cmpq	-56(%rbp), %rax
	sete	%sil
	movq	%r12, %rdi
	movl	$1, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_btc8723b2ant_sw_mechanism
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BT_8723B_2ANT_WIFI_RSSI_COEXSWITCH_THRES,4,2 ## @BT_8723B_2ANT_WIFI_RSSI_COEXSWITCH_THRES
	.comm	_coex_dm,8,3                    ## @coex_dm
	.comm	_BT_8723B_2ANT_BT_RSSI_COEXSWITCH_THRES,4,2 ## @BT_8723B_2ANT_BT_RSSI_COEXSWITCH_THRES
	.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_LEGACY,8,3         ## @BTC_WIFI_BW_LEGACY
	.comm	_BTC_PS_WIFI_NATIVE,4,2         ## @BTC_PS_WIFI_NATIVE
	.comm	_BTC_PS_LPS_ON,4,2              ## @BTC_PS_LPS_ON
	.comm	_BTC_WIFI_BW_HT40,8,3           ## @BTC_WIFI_BW_HT40
	.no_dead_strip	_btc8723b2ant_action_hid_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_hid_a2dp
_btc8723b2ant_action_hid_a2dp:          ; @btc8723b2ant_action_hid_a2dp
	.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
Lloh0:
	adrp	x8, _BT_8723B_2ANT_WIFI_RSSI_COEXSWITCH_THRES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BT_8723B_2ANT_WIFI_RSSI_COEXSWITCH_THRES@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x22, _coex_dm@GOTPAGE
Lloh4:
	ldr	x22, [x22, _coex_dm@GOTPAGEOFF]
	ldr	x9, [x22]
	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	x3, x20
	mov	w4, #0
	bl	_btc8723b2ant_wifi_rssi_state
	mov	x21, x0
Lloh5:
	adrp	x8, _BT_8723B_2ANT_BT_RSSI_COEXSWITCH_THRES@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BT_8723B_2ANT_BT_RSSI_COEXSWITCH_THRES@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	ldr	x9, [x22]
	ldr	w9, [x9]
	sub	w2, w8, w9
	mov	x0, x19
	mov	w1, #3
	mov	w3, #37
	bl	_btc8723b2ant_bt_rssi_state
	mov	x20, x0
	ldr	x8, [x19, #32]
Lloh8:
	adrp	x9, _BTC_RF_A@GOTPAGE
Lloh9:
	ldr	x9, [x9, _BTC_RF_A@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x9]
	mov	x0, x19
	mov	w2, #1
	mov	w3, #1048575
	mov	w4, #0
	blr	x8
Lloh11:
	adrp	x22, _NORMAL_EXEC@GOTPAGE
Lloh12:
	ldr	x22, [x22, _NORMAL_EXEC@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #1
	mov	w4, #5
	bl	_btc8723b2ant_limited_rx
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #6
	bl	_btc8723b2ant_fw_dac_swing_lvl
	ldr	x8, [x19, #24]
Lloh13:
	adrp	x9, _BTC_GET_U4_WIFI_BW@GOTPAGE
Lloh14:
	ldr	x9, [x9, _BTC_GET_U4_WIFI_BW@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x9]
	add	x2, sp, #8
	mov	x0, x19
	blr	x8
	ldr	x23, [sp, #8]
Lloh16:
	adrp	x8, _BTC_WIFI_BW_LEGACY@GOTPAGE
Lloh17:
	ldr	x8, [x8, _BTC_WIFI_BW_LEGACY@GOTPAGEOFF]
Lloh18:
	ldr	x24, [x8]
	mov	x0, x20
	bl	_BTC_RSSI_HIGH
	cmp	x23, x24
	b.ne	LBB0_3
; %bb.1:
	cbz	x0, LBB0_5
; %bb.2:
	ldr	w1, [x22]
	b	LBB0_6
LBB0_3:
	cbz	x0, LBB0_5
; %bb.4:
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #4
	b	LBB0_8
LBB0_5:
	mov	x0, x20
	bl	_BTC_RSSI_MEDIUM
	ldr	w1, [x22]
	cbz	x0, LBB0_7
LBB0_6:
	mov	x0, x19
	mov	w2, #2
	b	LBB0_8
LBB0_7:
	mov	x0, x19
	mov	w2, #0
LBB0_8:
	bl	_btc8723b2ant_dec_bt_pwr
	mov	x0, x21
	bl	_BTC_RSSI_HIGH
	cbz	x0, LBB0_11
; %bb.9:
	mov	x0, x20
	bl	_BTC_RSSI_HIGH
	cbz	x0, LBB0_11
; %bb.10:
	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_12
LBB0_11:
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #14
	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_12:
	bl	_btc8723b2ant_power_save_state
	mov	x0, x20
	bl	_BTC_RSSI_HIGH
	cbz	x0, LBB0_14
; %bb.13:
	mov	w2, #0
	b	LBB0_15
LBB0_14:
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #18
	bl	_btc8723b2ant_fw_dac_swing_lvl
	ldr	x8, [x19, #16]
	mov	x0, x19
	mov	w1, #1110
	mov	w2, #56
	blr	x8
	ldr	x8, [x19, #8]
	mov	x0, x19
	mov	w1, #1066
	mov	w2, #2056
	blr	x8
	ldr	x8, [x19]
	mov	x0, x19
	mov	w1, #1072
	mov	w2, #0
	blr	x8
	ldr	x8, [x19]
	mov	x0, x19
	mov	w1, #1076
	mov	w2, #16842752
	blr	x8
	mov	w2, #1
LBB0_15:
	mov	x0, x19
	mov	w1, #1
	mov	w3, #1
	bl	_btc8723b2ant_tdma_duration_adjust
Lloh25:
	adrp	x8, _BTC_WIFI_BW_HT40@GOTPAGE
Lloh26:
	ldr	x8, [x8, _BTC_WIFI_BW_HT40@GOTPAGEOFF]
Lloh27:
	ldr	x8, [x8]
	ldr	x9, [sp, #8]
	cmp	x8, x9
	cset	w1, eq
	mov	x0, x19
	mov	w2, #1
	mov	w3, #0
	mov	w4, #0
	bl	_btc8723b2ant_sw_mechanism
	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 AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_BT_8723B_2ANT_WIFI_RSSI_COEXSWITCH_THRES,4,2 ; @BT_8723B_2ANT_WIFI_RSSI_COEXSWITCH_THRES
	.comm	_coex_dm,8,3                    ; @coex_dm
	.comm	_BT_8723B_2ANT_BT_RSSI_COEXSWITCH_THRES,4,2 ; @BT_8723B_2ANT_BT_RSSI_COEXSWITCH_THRES
	.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_LEGACY,8,3         ; @BTC_WIFI_BW_LEGACY
	.comm	_BTC_PS_WIFI_NATIVE,4,2         ; @BTC_PS_WIFI_NATIVE
	.comm	_BTC_PS_LPS_ON,4,2              ; @BTC_PS_LPS_ON
	.comm	_BTC_WIFI_BW_HT40,8,3           ; @BTC_WIFI_BW_HT40
	.no_dead_strip	_btc8723b2ant_action_hid_a2dp
.subsections_via_symbols
