	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath5k_hw_set_antenna_mode      ## -- Begin function ath5k_hw_set_antenna_mode
	.p2align	4, 0x90
_ath5k_hw_set_antenna_mode:             ## @ath5k_hw_set_antenna_mode
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r13d
	movq	%rdi, %r12
	movq	16(%rdi), %rsi
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.3:
	movl	4(%r12), %r14d
	movq	%r12, %rdi
	callq	_ath5k_eeprom_mode_from_channel
	leal	-128(%r13), %edx
	cmpl	$6, %edx
	ja	LBB0_2
## %bb.4:
	xorl	%edi, %edi
	movl	$1, %ebx
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rdx,4), %rdx
	addq	%rcx, %rdx
	xorl	%esi, %esi
	movl	$1, %ecx
	jmpq	*%rdx
LBB0_6:
	movl	%eax, %ebx
	movl	$0, 8(%r12)
	movabsq	$4294967424, %rax               ## imm = 0x100000080
	movq	%rax, (%r12)
	movq	_AR5K_STA_ID1_DEFAULT_ANTENNA@GOTPCREL(%rip), %rax
	movq	_AR5K_STA_ID1_DESC_ANTENNA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r13d
	orl	(%rax), %r13d
	movq	_AR5K_STA_ID1_RTS_DEF_ANTENNA@GOTPCREL(%rip), %rax
	orl	(%rax), %r13d
	movq	_AR5K_STA_ID1_SELFGEN_DEF_ANT@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	$1, -48(%rbp)                   ## 4-byte Folded Spill
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_15
LBB0_1:
	movl	%r13d, (%r12)
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movb	$1, %sil
	movl	$1, %edi
	movl	%r14d, %ebx
	movl	$1, %ecx
	jmp	LBB0_10
LBB0_13:
	movl	$1, 8(%r12)
	movl	$130, (%r12)
	movl	%r14d, 4(%r12)
	movq	_AR5K_STA_ID1_RTS_DEF_ANTENNA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r13d
	xorl	%edi, %edi
	jmp	LBB0_14
LBB0_9:
	movl	$2, %ebx
	xorl	%edi, %edi
	xorl	%esi, %esi
	movl	$2, %ecx
LBB0_10:
	movl	%ecx, 8(%r12)
	movl	%r13d, (%r12)
	movl	%ebx, 4(%r12)
	movq	_AR5K_STA_ID1_DEFAULT_ANTENNA@GOTPCREL(%rip), %rcx
	movq	_AR5K_STA_ID1_RTS_DEF_ANTENNA@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r13d
	orl	(%rcx), %r13d
	testb	%sil, %sil
	je	LBB0_12
## %bb.11:
	movl	%ebx, %r14d
	jmp	LBB0_14
LBB0_12:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%edi, -48(%rbp)                 ## 4-byte Spill
	movl	%eax, %ebx
	movq	_AR5K_STA_ID1_SELFGEN_DEF_ANT@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_15
LBB0_7:
	movl	$2, %edi
	movl	$1, %r14d
	xorl	%ebx, %ebx
LBB0_8:
	movl	%edi, 8(%r12)
	movl	%r13d, (%r12)
	movl	%r14d, 4(%r12)
	xorl	%r13d, %r13d
	movl	%ebx, %edi
LBB0_14:
	movl	%edi, -48(%rbp)                 ## 4-byte Spill
	movl	%eax, %ebx
	xorl	%r15d, %r15d
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
LBB0_15:
	movq	_AR5K_STA_ID1@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_AR5K_STA_ID1_ANTENNA_SETTINGS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_AR5K_REG_DISABLE_BITS
	orl	%r15d, %r13d
	je	LBB0_17
## %bb.16:
	movl	(%r14), %esi
	movq	%r12, %rdi
	movl	%r13d, %edx
	callq	_AR5K_REG_ENABLE_BITS
LBB0_17:
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_ath5k_hw_set_antenna_switch
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	callq	_ath5k_hw_set_fast_div
	movq	%r12, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ath5k_hw_set_def_antenna       ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
LJTI0_0:
	.long	L0_0_set_6
	.long	L0_0_set_5
	.long	L0_0_set_13
	.long	L0_0_set_9
	.long	L0_0_set_10
	.long	L0_0_set_8
	.long	L0_0_set_7
	.end_data_region
                                        ## -- End function
	.comm	_AR5K_STA_ID1_DEFAULT_ANTENNA,4,2 ## @AR5K_STA_ID1_DEFAULT_ANTENNA
	.comm	_AR5K_STA_ID1_DESC_ANTENNA,4,2  ## @AR5K_STA_ID1_DESC_ANTENNA
	.comm	_AR5K_STA_ID1_RTS_DEF_ANTENNA,4,2 ## @AR5K_STA_ID1_RTS_DEF_ANTENNA
	.comm	_AR5K_STA_ID1_SELFGEN_DEF_ANT,4,2 ## @AR5K_STA_ID1_SELFGEN_DEF_ANT
	.comm	_AR5K_STA_ID1,4,2               ## @AR5K_STA_ID1
	.comm	_AR5K_STA_ID1_ANTENNA_SETTINGS,4,2 ## @AR5K_STA_ID1_ANTENNA_SETTINGS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function ath5k_hw_set_antenna_mode
lCPI0_0:
	.long	1                               ; 0x1
	.long	2                               ; 0x2
lCPI0_1:
	.long	128                             ; 0x80
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_ath5k_hw_set_antenna_mode
	.p2align	2
_ath5k_hw_set_antenna_mode:             ; @ath5k_hw_set_antenna_mode
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x23, x1
	mov	x19, x0
	ldr	x1, [x0, #16]
	cbz	x1, LBB0_4
; %bb.1:
	ldr	w22, [x19, #4]
	mov	x0, x19
	bl	_ath5k_eeprom_mode_from_channel
	sub	w8, w23, #128
	cmp	w8, #6
	b.hi	LBB0_5
; %bb.2:
	mov	x20, x0
	mov	w21, #0
	movi	d1, #0000000000000000
	mov.s	v1[0], w22
	movi.2s	v0, #1
	mov	w9, #1
Lloh0:
	adrp	x10, lJTI0_0@PAGE
Lloh1:
	add	x10, x10, lJTI0_0@PAGEOFF
	adr	x11, LBB0_3
	ldrb	w12, [x10, x8]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_3:
	str	wzr, [x19, #8]
Lloh2:
	adrp	x8, lCPI0_1@PAGE
Lloh3:
	ldr	d0, [x8, lCPI0_1@PAGEOFF]
	str	d0, [x19]
Lloh4:
	adrp	x8, _AR5K_STA_ID1_DEFAULT_ANTENNA@GOTPAGE
Lloh5:
	ldr	x8, [x8, _AR5K_STA_ID1_DEFAULT_ANTENNA@GOTPAGEOFF]
Lloh6:
	adrp	x9, _AR5K_STA_ID1_DESC_ANTENNA@GOTPAGE
Lloh7:
	ldr	x9, [x9, _AR5K_STA_ID1_DESC_ANTENNA@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh10:
	adrp	x9, _AR5K_STA_ID1_RTS_DEF_ANTENNA@GOTPAGE
Lloh11:
	ldr	x9, [x9, _AR5K_STA_ID1_RTS_DEF_ANTENNA@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh13:
	adrp	x9, _AR5K_STA_ID1_SELFGEN_DEF_ANT@GOTPAGE
Lloh14:
	ldr	x9, [x9, _AR5K_STA_ID1_SELFGEN_DEF_ANT@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	mov	w21, #1
	mov	w22, #1
	b	LBB0_14
LBB0_4:
	str	w23, [x19]
LBB0_5:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_6:
	movi.2s	v0, #1
	mov.s	v0[0], w22
	mov	w21, #1
	b	LBB0_9
LBB0_7:
	mov	w21, #0
	mov	w8, #1
	stp	w22, w8, [x19, #4]
	mov	w8, #130
	str	w8, [x19]
Lloh16:
	adrp	x8, _AR5K_STA_ID1_RTS_DEF_ANTENNA@GOTPAGE
Lloh17:
	ldr	x8, [x8, _AR5K_STA_ID1_RTS_DEF_ANTENNA@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	b	LBB0_13
LBB0_8:
	mov	w21, #0
	movi.2s	v0, #2
LBB0_9:
	str	w23, [x19]
	stur	d0, [x19, #4]
Lloh19:
	adrp	x8, _AR5K_STA_ID1_DEFAULT_ANTENNA@GOTPAGE
Lloh20:
	ldr	x8, [x8, _AR5K_STA_ID1_DEFAULT_ANTENNA@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
Lloh22:
	adrp	x9, _AR5K_STA_ID1_RTS_DEF_ANTENNA@GOTPAGE
Lloh23:
	ldr	x9, [x9, _AR5K_STA_ID1_RTS_DEF_ANTENNA@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	orr	w8, w9, w8
	fmov	w22, s0
	cbnz	w21, LBB0_13
; %bb.10:
Lloh25:
	adrp	x9, _AR5K_STA_ID1_SELFGEN_DEF_ANT@GOTPAGE
Lloh26:
	ldr	x9, [x9, _AR5K_STA_ID1_SELFGEN_DEF_ANT@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	b	LBB0_14
LBB0_11:
	mov	w9, #0
Lloh28:
	adrp	x8, lCPI0_0@PAGE
Lloh29:
	ldr	d1, [x8, lCPI0_0@PAGEOFF]
LBB0_12:
	mov	w8, #0
	str	w23, [x19]
	stur	d1, [x19, #4]
	fmov	w22, s1
	mov	x21, x9
LBB0_13:
	mov	w9, #0
LBB0_14:
	orr	w23, w9, w8
Lloh30:
	adrp	x24, _AR5K_STA_ID1@GOTPAGE
Lloh31:
	ldr	x24, [x24, _AR5K_STA_ID1@GOTPAGEOFF]
	ldr	w1, [x24]
Lloh32:
	adrp	x8, _AR5K_STA_ID1_ANTENNA_SETTINGS@GOTPAGE
Lloh33:
	ldr	x8, [x8, _AR5K_STA_ID1_ANTENNA_SETTINGS@GOTPAGEOFF]
Lloh34:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_AR5K_REG_DISABLE_BITS
	cbz	w23, LBB0_16
; %bb.15:
	ldr	w1, [x24]
	mov	x0, x19
	mov	x2, x23
	bl	_AR5K_REG_ENABLE_BITS
LBB0_16:
	mov	x0, x19
	mov	x1, x20
	bl	_ath5k_hw_set_antenna_switch
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_ath5k_hw_set_fast_div
	mov	x0, x19
	mov	x1, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_ath5k_hw_set_def_antenna
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh8
	.loh AdrpAdrp	Lloh2, Lloh4
	.loh AdrpLdr	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdr	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh30, Lloh31
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_6-LBB0_3)>>2
	.byte	(LBB0_7-LBB0_3)>>2
	.byte	(LBB0_8-LBB0_3)>>2
	.byte	(LBB0_9-LBB0_3)>>2
	.byte	(LBB0_12-LBB0_3)>>2
	.byte	(LBB0_11-LBB0_3)>>2
                                        ; -- End function
	.comm	_AR5K_STA_ID1_DEFAULT_ANTENNA,4,2 ; @AR5K_STA_ID1_DEFAULT_ANTENNA
	.comm	_AR5K_STA_ID1_DESC_ANTENNA,4,2  ; @AR5K_STA_ID1_DESC_ANTENNA
	.comm	_AR5K_STA_ID1_RTS_DEF_ANTENNA,4,2 ; @AR5K_STA_ID1_RTS_DEF_ANTENNA
	.comm	_AR5K_STA_ID1_SELFGEN_DEF_ANT,4,2 ; @AR5K_STA_ID1_SELFGEN_DEF_ANT
	.comm	_AR5K_STA_ID1,4,2               ; @AR5K_STA_ID1
	.comm	_AR5K_STA_ID1_ANTENNA_SETTINGS,4,2 ; @AR5K_STA_ID1_ANTENNA_SETTINGS
.subsections_via_symbols
