	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function btc8821a2ant_action_pan_edr_hid
_btc8821a2ant_action_pan_edr_hid:       ## @btc8821a2ant_action_pan_edr_hid
	.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, %rbx
	xorl	%esi, %esi
	movl	$2, %edx
	movl	$15, %ecx
	xorl	%r8d, %r8d
	callq	_btc8821a2ant_wifi_rssi_state
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_BT_8821A_2ANT_BT_RSSI_COEXSWITCH_THRES@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$2, %esi
	xorl	%ecx, %ecx
	callq	_btc8821a2ant_bt_rssi_state
	movq	%rax, %r15
	movq	_NORMAL_EXEC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rax, %r14
	movq	%rbx, %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	(%r14), %esi
	movq	%rbx, %rdi
	callq	_btc8821a2ant_dec_bt_pwr
	movq	_BTC_GET_U4_WIFI_BW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-56(%rbp), %rdx
	movq	%rbx, %rdi
	callq	*(%rbx)
	movl	(%r14), %esi
	movq	%rbx, %rdi
	movl	$1442797055, %edx               ## imm = 0x55FF55FF
	movl	$1516198495, %ecx               ## imm = 0x5A5F5A5F
	movl	$65535, %r8d                    ## imm = 0xFFFF
	movl	$3, %r9d
	callq	_btc8821a2ant_coex_table
	movq	-56(%rbp), %rax
	movq	_BTC_WIFI_BW_HT40@GOTPCREL(%rip), %rcx
	xorl	%r12d, %r12d
	xorl	%edx, %edx
	cmpq	(%rcx), %rax
	sete	%r12b
	setne	%dl
	movl	(%r14), %esi
	leal	(%rdx,%rdx,2), %edx
	addl	$3, %edx
	movq	%rbx, %rdi
	callq	_btc8821a2ant_fw_dac_swing_lvl
	movq	_BTC_RSSI_STATE_HIGH@GOTPCREL(%rip), %r14
	cmpq	(%r14), %r15
	setne	%al
	movq	_BTC_RSSI_STATE_STAY_HIGH@GOTPCREL(%rip), %r13
	cmpq	(%r13), %r15
	setne	%cl
	movq	_NORMAL_EXEC@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	andb	%al, %cl
	movzbl	%cl, %eax
	leal	10(,%rax,4), %ecx
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_btc8821a2ant_ps_tdma
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	cmpq	(%r14), %rcx
	sete	%al
	cmpq	(%r13), %rcx
	sete	%cl
	orb	%al, %cl
	movzbl	%cl, %r14d
	movq	%rbx, %rdi
	movl	%r12d, %esi
	movl	$1, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_btc8821a2ant_sw_mechanism1
	movq	%rbx, %rdi
	movl	%r14d, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movl	$24, %r8d
	callq	_btc8821a2ant_sw_mechanism2
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BT_8821A_2ANT_BT_RSSI_COEXSWITCH_THRES,4,2 ## @BT_8821A_2ANT_BT_RSSI_COEXSWITCH_THRES
	.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_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_pan_edr_hid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function btc8821a2ant_action_pan_edr_hid
_btc8821a2ant_action_pan_edr_hid:       ; @btc8821a2ant_action_pan_edr_hid
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	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_BT_RSSI_COEXSWITCH_THRES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BT_8821A_2ANT_BT_RSSI_COEXSWITCH_THRES@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #2
	mov	w3, #0
	bl	_btc8821a2ant_bt_rssi_state
	mov	x21, x0
Lloh3:
	adrp	x23, _NORMAL_EXEC@GOTPAGE
Lloh4:
	ldr	x23, [x23, _NORMAL_EXEC@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	w24, #6
	mov	x0, x19
	mov	w2, #6
	bl	_btc8821a2ant_fw_dac_swing_lvl
	mov	x0, x21
	bl	_BTC_RSSI_HIGH
	cmp	x0, #0
	cset	w2, ne
	ldr	w1, [x23]
	mov	x0, x19
	bl	_btc8821a2ant_dec_bt_pwr
	ldr	x8, [x19]
Lloh5:
	adrp	x9, _BTC_GET_U4_WIFI_BW@GOTPAGE
Lloh6:
	ldr	x9, [x9, _BTC_GET_U4_WIFI_BW@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x9]
	add	x2, sp, #8
	mov	x0, x19
	blr	x8
	ldr	w1, [x23]
	mov	w25, #3
	mov	x0, x19
	mov	w2, #22015
	movk	w2, #22015, lsl #16
	mov	w3, #23135
	movk	w3, #23135, lsl #16
	mov	w4, #65535
	mov	w5, #3
	bl	_btc8821a2ant_coex_table
Lloh8:
	adrp	x8, _BTC_WIFI_BW_HT40@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BTC_WIFI_BW_HT40@GOTPAGEOFF]
	ldr	x9, [sp, #8]
Lloh10:
	ldr	x8, [x8]
	cmp	x9, x8
	cset	w22, eq
	ldr	w1, [x23]
	csel	w2, w25, w24, eq
	mov	x0, x19
	bl	_btc8821a2ant_fw_dac_swing_lvl
Lloh11:
	adrp	x24, _BTC_RSSI_STATE_HIGH@GOTPAGE
Lloh12:
	ldr	x24, [x24, _BTC_RSSI_STATE_HIGH@GOTPAGEOFF]
	ldr	x8, [x24]
Lloh13:
	adrp	x25, _BTC_RSSI_STATE_STAY_HIGH@GOTPAGE
Lloh14:
	ldr	x25, [x25, _BTC_RSSI_STATE_STAY_HIGH@GOTPAGEOFF]
	ldr	x9, [x25]
	cmp	x21, x9
	ccmp	x21, x8, #4, ne
	ldr	w1, [x23]
	mov	w8, #14
	mov	w9, #10
	csel	w3, w9, w8, eq
	mov	x0, x19
	mov	w2, #1
	bl	_btc8821a2ant_ps_tdma
	ldr	x8, [x24]
	cmp	x20, x8
	ldr	x8, [x25]
	ccmp	x20, x8, #4, ne
	cset	w20, eq
	mov	x0, x19
	mov	x1, x22
	mov	w2, #1
	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, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_BT_8821A_2ANT_BT_RSSI_COEXSWITCH_THRES,4,2 ; @BT_8821A_2ANT_BT_RSSI_COEXSWITCH_THRES
	.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_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_pan_edr_hid
.subsections_via_symbols
