	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath5k_hw_set_antenna_switch    ## -- Begin function ath5k_hw_set_antenna_switch
	.p2align	4, 0x90
_ath5k_hw_set_antenna_switch:           ## @ath5k_hw_set_antenna_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	_AR5K_ANTMODE_FIXED_A@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.1:
	movq	_AR5K_ANT_SWTABLE_A@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_3:
	movq	_AR5K_ANTMODE_FIXED_B@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.4:
	movq	_AR5K_ANT_SWTABLE_B@GOTPCREL(%rip), %rax
LBB0_2:
	movq	(%rax), %r12
	movq	%r12, %r15
	jmp	LBB0_6
LBB0_5:
	movq	_AR5K_ANT_SWTABLE_A@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	_AR5K_ANT_SWTABLE_B@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
LBB0_6:
	movq	_AR5K_PHY_ANT_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AR5K_PHY_ANT_CTL_SWTABLE_IDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	8(%rbx), %rax
	movq	(%rax,%r14,8), %rax
	movq	_AR5K_ANT_CTL@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	movq	_AR5K_PHY_ANT_CTL_TXRX_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax,%rdi,4), %ecx
	movq	%rbx, %rdi
	callq	_AR5K_REG_WRITE_BITS
	movq	8(%rbx), %rax
	movq	(%rax,%r14,8), %rax
	movl	(%rax,%r12,4), %esi
	movq	_AR5K_PHY_ANT_SWITCH_TABLE_0@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_ath5k_hw_reg_write
	movq	8(%rbx), %rax
	movq	(%rax,%r14,8), %rax
	movl	(%rax,%r15,4), %esi
	movq	_AR5K_PHY_ANT_SWITCH_TABLE_1@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ath5k_hw_reg_write             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AR5K_ANTMODE_FIXED_A,8,3       ## @AR5K_ANTMODE_FIXED_A
	.comm	_AR5K_ANT_SWTABLE_A,8,3         ## @AR5K_ANT_SWTABLE_A
	.comm	_AR5K_ANTMODE_FIXED_B,8,3       ## @AR5K_ANTMODE_FIXED_B
	.comm	_AR5K_ANT_SWTABLE_B,8,3         ## @AR5K_ANT_SWTABLE_B
	.comm	_AR5K_PHY_ANT_CTL,4,2           ## @AR5K_PHY_ANT_CTL
	.comm	_AR5K_PHY_ANT_CTL_SWTABLE_IDLE,4,2 ## @AR5K_PHY_ANT_CTL_SWTABLE_IDLE
	.comm	_AR5K_ANT_CTL,8,3               ## @AR5K_ANT_CTL
	.comm	_AR5K_PHY_ANT_CTL_TXRX_EN,4,2   ## @AR5K_PHY_ANT_CTL_TXRX_EN
	.comm	_AR5K_PHY_ANT_SWITCH_TABLE_0,4,2 ## @AR5K_PHY_ANT_SWITCH_TABLE_0
	.comm	_AR5K_PHY_ANT_SWITCH_TABLE_1,4,2 ## @AR5K_PHY_ANT_SWITCH_TABLE_1
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath5k_hw_set_antenna_switch    ; -- Begin function ath5k_hw_set_antenna_switch
	.p2align	2
_ath5k_hw_set_antenna_switch:           ; @ath5k_hw_set_antenna_switch
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _AR5K_ANTMODE_FIXED_A@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AR5K_ANTMODE_FIXED_A@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _AR5K_ANT_SWTABLE_A@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AR5K_ANT_SWTABLE_A@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
Lloh5:
	adrp	x9, _AR5K_ANTMODE_FIXED_B@GOTPAGE
Lloh6:
	ldr	x9, [x9, _AR5K_ANTMODE_FIXED_B@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.3:
Lloh8:
	adrp	x8, _AR5K_ANT_SWTABLE_B@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AR5K_ANT_SWTABLE_B@GOTPAGEOFF]
LBB0_4:
	ldr	x21, [x8]
	mov	x20, x21
	b	LBB0_6
LBB0_5:
Lloh10:
	adrp	x8, _AR5K_ANT_SWTABLE_A@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AR5K_ANT_SWTABLE_A@GOTPAGEOFF]
Lloh12:
	ldr	x21, [x8]
Lloh13:
	adrp	x8, _AR5K_ANT_SWTABLE_B@GOTPAGE
Lloh14:
	ldr	x8, [x8, _AR5K_ANT_SWTABLE_B@GOTPAGEOFF]
Lloh15:
	ldr	x20, [x8]
LBB0_6:
Lloh16:
	adrp	x8, _AR5K_PHY_ANT_CTL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _AR5K_PHY_ANT_CTL@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
Lloh19:
	adrp	x9, _AR5K_PHY_ANT_CTL_SWTABLE_IDLE@GOTPAGE
Lloh20:
	ldr	x9, [x9, _AR5K_PHY_ANT_CTL_SWTABLE_IDLE@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x9]
	ldr	x9, [x19, #8]
	lsl	x22, x1, #3
	ldr	x9, [x9, x22]
Lloh22:
	adrp	x10, _AR5K_ANT_CTL@GOTPAGE
Lloh23:
	ldr	x10, [x10, _AR5K_ANT_CTL@GOTPAGEOFF]
Lloh24:
	ldr	x10, [x10]
	ldr	w9, [x9, x10, lsl #2]
Lloh25:
	adrp	x10, _AR5K_PHY_ANT_CTL_TXRX_EN@GOTPAGE
Lloh26:
	ldr	x10, [x10, _AR5K_PHY_ANT_CTL_TXRX_EN@GOTPAGEOFF]
Lloh27:
	ldr	w10, [x10]
	orr	w3, w10, w9
	mov	x0, x19
	mov	x1, x8
	bl	_AR5K_REG_WRITE_BITS
	ldr	x8, [x19, #8]
	ldr	x8, [x8, x22]
	ldr	w1, [x8, x21, lsl #2]
Lloh28:
	adrp	x8, _AR5K_PHY_ANT_SWITCH_TABLE_0@GOTPAGE
Lloh29:
	ldr	x8, [x8, _AR5K_PHY_ANT_SWITCH_TABLE_0@GOTPAGEOFF]
Lloh30:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_ath5k_hw_reg_write
	ldr	x8, [x19, #8]
	ldr	x8, [x8, x22]
	ldr	w1, [x8, x20, lsl #2]
Lloh31:
	adrp	x8, _AR5K_PHY_ANT_SWITCH_TABLE_1@GOTPAGE
Lloh32:
	ldr	x8, [x8, _AR5K_PHY_ANT_SWITCH_TABLE_1@GOTPAGEOFF]
Lloh33:
	ldr	w2, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_ath5k_hw_reg_write
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_AR5K_ANTMODE_FIXED_A,8,3       ; @AR5K_ANTMODE_FIXED_A
	.comm	_AR5K_ANT_SWTABLE_A,8,3         ; @AR5K_ANT_SWTABLE_A
	.comm	_AR5K_ANTMODE_FIXED_B,8,3       ; @AR5K_ANTMODE_FIXED_B
	.comm	_AR5K_ANT_SWTABLE_B,8,3         ; @AR5K_ANT_SWTABLE_B
	.comm	_AR5K_PHY_ANT_CTL,4,2           ; @AR5K_PHY_ANT_CTL
	.comm	_AR5K_PHY_ANT_CTL_SWTABLE_IDLE,4,2 ; @AR5K_PHY_ANT_CTL_SWTABLE_IDLE
	.comm	_AR5K_ANT_CTL,8,3               ; @AR5K_ANT_CTL
	.comm	_AR5K_PHY_ANT_CTL_TXRX_EN,4,2   ; @AR5K_PHY_ANT_CTL_TXRX_EN
	.comm	_AR5K_PHY_ANT_SWITCH_TABLE_0,4,2 ; @AR5K_PHY_ANT_SWITCH_TABLE_0
	.comm	_AR5K_PHY_ANT_SWITCH_TABLE_1,4,2 ; @AR5K_PHY_ANT_SWITCH_TABLE_1
.subsections_via_symbols
