	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ar9003_mci_2g5g_switch         ## -- Begin function ar9003_mci_2g5g_switch
	.p2align	4, 0x90
_ar9003_mci_2g5g_switch:                ## @ar9003_mci_2g5g_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	orl	16(%rdi), %esi
	je	LBB0_7
## %bb.1:
	movq	%rdi, %rbx
	cmpq	$0, 8(%rdi)
	je	LBB0_6
## %bb.2:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_ar9003_mci_send_2g5g_status
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_ar9003_mci_send_lna_transfer
	movl	$5, %edi
	callq	_udelay
	movq	_AR_MCI_TX_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AR_MCI_TX_CTRL_DISABLE_LNA_UPDATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_REG_CLR_BIT
	movq	_AR_PHY_GLB_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AR_BTCOEX_CTRL_BT_OWN_SPDT_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_REG_CLR_BIT
	movq	_ATH_MCI_CONFIG_DISABLE_OSLA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	jne	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_ar9003_mci_osla_setup
LBB0_4:
	movq	%rbx, %rdi
	callq	_AR_SREV_9462
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movq	_AR_SELFGEN_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$2, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_REG_WRITE                      ## TAILCALL
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_6:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_ar9003_mci_send_lna_take
	movl	$5, %edi
	callq	_udelay
	movq	_AR_MCI_TX_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AR_MCI_TX_CTRL_DISABLE_LNA_UPDATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_REG_SET_BIT
	movq	_AR_PHY_GLB_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AR_BTCOEX_CTRL_BT_OWN_SPDT_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_REG_SET_BIT
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_ar9003_mci_osla_setup
	movq	%rbx, %rdi
	movl	$1, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_ar9003_mci_send_2g5g_status    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AR_MCI_TX_CTRL,4,2             ## @AR_MCI_TX_CTRL
	.comm	_AR_MCI_TX_CTRL_DISABLE_LNA_UPDATE,4,2 ## @AR_MCI_TX_CTRL_DISABLE_LNA_UPDATE
	.comm	_AR_PHY_GLB_CONTROL,4,2         ## @AR_PHY_GLB_CONTROL
	.comm	_AR_BTCOEX_CTRL_BT_OWN_SPDT_CTRL,4,2 ## @AR_BTCOEX_CTRL_BT_OWN_SPDT_CTRL
	.comm	_ATH_MCI_CONFIG_DISABLE_OSLA,4,2 ## @ATH_MCI_CONFIG_DISABLE_OSLA
	.comm	_AR_SELFGEN_MASK,4,2            ## @AR_SELFGEN_MASK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ar9003_mci_2g5g_switch         ; -- Begin function ar9003_mci_2g5g_switch
	.p2align	2
_ar9003_mci_2g5g_switch:                ; @ar9003_mci_2g5g_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
	ldr	w8, [x0, #16]
	orr	w8, w8, w1
	cbz	w8, LBB0_6
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_7
; %bb.2:
	mov	x0, x19
	mov	w1, #1
	bl	_ar9003_mci_send_2g5g_status
	mov	x0, x19
	mov	w1, #1
	bl	_ar9003_mci_send_lna_transfer
	mov	w0, #5
	bl	_udelay
Lloh0:
	adrp	x8, _AR_MCI_TX_CTRL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AR_MCI_TX_CTRL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _AR_MCI_TX_CTRL_DISABLE_LNA_UPDATE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AR_MCI_TX_CTRL_DISABLE_LNA_UPDATE@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_REG_CLR_BIT
Lloh6:
	adrp	x8, _AR_PHY_GLB_CONTROL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AR_PHY_GLB_CONTROL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _AR_BTCOEX_CTRL_BT_OWN_SPDT_CTRL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AR_BTCOEX_CTRL_BT_OWN_SPDT_CTRL@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_REG_CLR_BIT
	ldr	w8, [x19]
Lloh12:
	adrp	x9, _ATH_MCI_CONFIG_DISABLE_OSLA@GOTPAGE
Lloh13:
	ldr	x9, [x9, _ATH_MCI_CONFIG_DISABLE_OSLA@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_4
; %bb.3:
	mov	x0, x19
	mov	w1, #1
	bl	_ar9003_mci_osla_setup
LBB0_4:
	mov	x0, x19
	bl	_AR_SREV_9462
	cbz	x0, LBB0_6
; %bb.5:
Lloh15:
	adrp	x8, _AR_SELFGEN_MASK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AR_SELFGEN_MASK@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #2
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_REG_WRITE
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_7:
	mov	x0, x19
	mov	w1, #1
	bl	_ar9003_mci_send_lna_take
	mov	w0, #5
	bl	_udelay
Lloh18:
	adrp	x8, _AR_MCI_TX_CTRL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AR_MCI_TX_CTRL@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	adrp	x8, _AR_MCI_TX_CTRL_DISABLE_LNA_UPDATE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _AR_MCI_TX_CTRL_DISABLE_LNA_UPDATE@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_REG_SET_BIT
Lloh24:
	adrp	x8, _AR_PHY_GLB_CONTROL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _AR_PHY_GLB_CONTROL@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
Lloh27:
	adrp	x8, _AR_BTCOEX_CTRL_BT_OWN_SPDT_CTRL@GOTPAGE
Lloh28:
	ldr	x8, [x8, _AR_BTCOEX_CTRL_BT_OWN_SPDT_CTRL@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_REG_SET_BIT
	mov	x0, x19
	mov	w1, #0
	bl	_ar9003_mci_osla_setup
	mov	x0, x19
	mov	w1, #1
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ar9003_mci_send_2g5g_status
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_AR_MCI_TX_CTRL,4,2             ; @AR_MCI_TX_CTRL
	.comm	_AR_MCI_TX_CTRL_DISABLE_LNA_UPDATE,4,2 ; @AR_MCI_TX_CTRL_DISABLE_LNA_UPDATE
	.comm	_AR_PHY_GLB_CONTROL,4,2         ; @AR_PHY_GLB_CONTROL
	.comm	_AR_BTCOEX_CTRL_BT_OWN_SPDT_CTRL,4,2 ; @AR_BTCOEX_CTRL_BT_OWN_SPDT_CTRL
	.comm	_ATH_MCI_CONFIG_DISABLE_OSLA,4,2 ; @ATH_MCI_CONFIG_DISABLE_OSLA
	.comm	_AR_SELFGEN_MASK,4,2            ; @AR_SELFGEN_MASK
.subsections_via_symbols
