	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath5k_eeprom_init_modes
_ath5k_eeprom_init_modes:               ## @ath5k_eeprom_init_modes
	.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, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %rdi
	callq	_AR5K_EEPROM_MODES_11A
	movq	_AR5K_EEPROM_MODE_11A@GOTPCREL(%rip), %r12
	movq	(%r12), %rcx
	movl	%eax, -60(%rbp,%rcx,4)
	movq	(%r14), %rdi
	callq	_AR5K_EEPROM_MODES_11B
	movq	_AR5K_EEPROM_MODE_11B@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, -60(%rbp,%rcx,4)
	movq	(%r14), %rdi
	callq	_AR5K_EEPROM_MODES_11G
	movq	_AR5K_EEPROM_MODE_11G@GOTPCREL(%rip), %r13
	movq	(%r13), %rcx
	movl	%eax, -60(%rbp,%rcx,4)
	movl	16(%r14), %edi
	callq	_AR5K_EEPROM_HDR_T_5GHZ_DBM
	movq	24(%r14), %rcx
	movq	(%r12), %rdx
	movl	%eax, (%rcx,%rdx,4)
	movl	%edx, %ebx
	movq	(%r13), %rcx
	cmpq	%rbx, %rcx
	jb	LBB0_5
## %bb.1:
	leaq	-64(%rbp), %r15
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	-60(%rbp,%rbx,4), %eax
	movl	%eax, -64(%rbp)
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	%ebx, %edx
	callq	_ath5k_eeprom_read_ants
	testl	%eax, %eax
	jne	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	%ebx, %edx
	callq	_ath5k_eeprom_read_modes
	testl	%eax, %eax
	jne	LBB0_7
## %bb.2:                               ##   in Loop: Header=BB0_3 Depth=1
	incl	%ebx
	movq	(%r13), %rcx
	cmpq	%rbx, %rcx
	jae	LBB0_3
LBB0_5:
	movq	(%r14), %rdx
	movq	_AR5K_EEPROM_VERSION_3_2@GOTPCREL(%rip), %rsi
	xorl	%eax, %eax
	cmpq	(%rsi), %rdx
	jg	LBB0_7
## %bb.6:
	movq	8(%r14), %rdx
	movq	(%r12), %rsi
	movl	$15, (%rdx,%rsi,4)
	movq	_AR5K_EEPROM_MODE_11B@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	movl	$28, (%rdx,%rsi,4)
	movl	$28, (%rdx,%rcx,4)
LBB0_7:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_9
## %bb.8:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_AR5K_EEPROM_MODE_11A,8,3       ## @AR5K_EEPROM_MODE_11A
	.comm	_AR5K_EEPROM_MODE_11B,8,3       ## @AR5K_EEPROM_MODE_11B
	.comm	_AR5K_EEPROM_MODE_11G,8,3       ## @AR5K_EEPROM_MODE_11G
	.comm	_AR5K_EEPROM_VERSION_3_2,8,3    ## @AR5K_EEPROM_VERSION_3_2
	.no_dead_strip	_ath5k_eeprom_init_modes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath5k_eeprom_init_modes
_ath5k_eeprom_init_modes:               ; @ath5k_eeprom_init_modes
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	ldr	x0, [x0]
	bl	_AR5K_EEPROM_MODES_11A
Lloh3:
	adrp	x21, _AR5K_EEPROM_MODE_11A@GOTPAGE
Lloh4:
	ldr	x21, [x21, _AR5K_EEPROM_MODE_11A@GOTPAGEOFF]
	ldr	x8, [x21]
	add	x23, sp, #12
	str	w0, [x23, x8, lsl #2]
	ldr	x0, [x19]
	bl	_AR5K_EEPROM_MODES_11B
Lloh5:
	adrp	x22, _AR5K_EEPROM_MODE_11B@GOTPAGE
Lloh6:
	ldr	x22, [x22, _AR5K_EEPROM_MODE_11B@GOTPAGEOFF]
	ldr	x8, [x22]
	str	w0, [x23, x8, lsl #2]
	ldr	x0, [x19]
	bl	_AR5K_EEPROM_MODES_11G
Lloh7:
	adrp	x24, _AR5K_EEPROM_MODE_11G@GOTPAGE
Lloh8:
	ldr	x24, [x24, _AR5K_EEPROM_MODE_11G@GOTPAGEOFF]
	ldr	x8, [x24]
	str	w0, [x23, x8, lsl #2]
	ldr	w0, [x19, #16]
	bl	_AR5K_EEPROM_HDR_T_5GHZ_DBM
	ldr	x8, [x19, #24]
	ldr	x9, [x21]
	str	w0, [x8, x9, lsl #2]
	and	x20, x9, #0xffffffff
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	cmp	x8, x20
	b.lo	LBB0_5
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x23, x20, lsl #2]
	str	w8, [sp, #8]
	add	x1, sp, #8
	mov	x0, x19
	mov	x2, x20
	bl	_ath5k_eeprom_read_ants
	cbnz	w0, LBB0_8
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	add	x1, sp, #8
	mov	x0, x19
	mov	x2, x20
	bl	_ath5k_eeprom_read_modes
	cbnz	w0, LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
	add	w20, w20, #1
	b	LBB0_1
LBB0_5:
	ldr	x9, [x19]
Lloh9:
	adrp	x10, _AR5K_EEPROM_VERSION_3_2@GOTPAGE
Lloh10:
	ldr	x10, [x10, _AR5K_EEPROM_VERSION_3_2@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
	cmp	x9, x10
	b.le	LBB0_7
; %bb.6:
	mov	w0, #0
	b	LBB0_8
LBB0_7:
	mov	w0, #0
	ldr	x9, [x19, #8]
	ldr	x10, [x21]
	mov	w11, #15
	str	w11, [x9, x10, lsl #2]
	ldr	x10, [x22]
	mov	w11, #28
	str	w11, [x9, x10, lsl #2]
	str	w11, [x9, x8, lsl #2]
LBB0_8:
	ldr	x8, [sp, #24]
Lloh12:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.9:
	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
	add	sp, sp, #96
	ret
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_AR5K_EEPROM_MODE_11A,8,3       ; @AR5K_EEPROM_MODE_11A
	.comm	_AR5K_EEPROM_MODE_11B,8,3       ; @AR5K_EEPROM_MODE_11B
	.comm	_AR5K_EEPROM_MODE_11G,8,3       ; @AR5K_EEPROM_MODE_11G
	.comm	_AR5K_EEPROM_VERSION_3_2,8,3    ; @AR5K_EEPROM_VERSION_3_2
	.no_dead_strip	_ath5k_eeprom_init_modes
.subsections_via_symbols
