	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_exhalbtc_coex_dm_switch        ## -- Begin function exhalbtc_coex_dm_switch
	.p2align	4, 0x90
_exhalbtc_coex_dm_switch:               ## @exhalbtc_coex_dm_switch
	.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	8(%rdi), %r14
	callq	_halbtc_is_bt_coexist_available
	testl	%eax, %eax
	je	LBB0_5
## %bb.1:
	incl	16(%rbx)
	movq	%rbx, %rdi
	callq	_halbtc_leave_low_power
	movq	8(%rbx), %rdi
	callq	_IS_HARDWARE_TYPE_8723B
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	cmpl	$1, 4(%rbx)
	jne	LBB0_4
## %bb.3:
	movl	$1, (%rbx)
	movq	%rbx, %rdi
	callq	_ex_btc8723b1ant_coex_dm_reset
	movq	_BT_COEX_ANT_TYPE_DETECTED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$2, %edx
	callq	_exhalbtc_set_ant_num
	movq	%rbx, %rdi
	callq	_ex_btc8723b2ant_init_hwconfig
	movq	%rbx, %rdi
	callq	_ex_btc8723b2ant_init_coex_dm
	movl	$0, (%rbx)
LBB0_4:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_halbtc_normal_low_power        ## TAILCALL
LBB0_5:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BT_COEX_ANT_TYPE_DETECTED,4,2  ## @BT_COEX_ANT_TYPE_DETECTED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_exhalbtc_coex_dm_switch        ; -- Begin function exhalbtc_coex_dm_switch
	.p2align	2
_exhalbtc_coex_dm_switch:               ; @exhalbtc_coex_dm_switch
	.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
	ldr	x20, [x0, #8]
	bl	_halbtc_is_bt_coexist_available
	cbz	w0, LBB0_5
; %bb.1:
	ldr	w8, [x19, #16]
	add	w8, w8, #1
	str	w8, [x19, #16]
	mov	x0, x19
	bl	_halbtc_leave_low_power
	ldr	x0, [x19, #8]
	bl	_IS_HARDWARE_TYPE_8723B
	cbz	x0, LBB0_4
; %bb.2:
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.ne	LBB0_4
; %bb.3:
	str	w8, [x19]
	mov	x0, x19
	bl	_ex_btc8723b1ant_coex_dm_reset
Lloh0:
	adrp	x8, _BT_COEX_ANT_TYPE_DETECTED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BT_COEX_ANT_TYPE_DETECTED@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #2
	bl	_exhalbtc_set_ant_num
	mov	x0, x19
	bl	_ex_btc8723b2ant_init_hwconfig
	mov	x0, x19
	bl	_ex_btc8723b2ant_init_coex_dm
	str	wzr, [x19]
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_halbtc_normal_low_power
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_BT_COEX_ANT_TYPE_DETECTED,4,2  ; @BT_COEX_ANT_TYPE_DETECTED
.subsections_via_symbols
