	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ar9300_read_eeprom
_ar9300_read_eeprom:                    ## @ar9300_read_eeprom
	.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
	movl	%ecx, %ebx
	movq	%rdx, %r12
	movl	%esi, %r14d
	movq	%rdi, %r15
	callq	_ath9k_hw_common
	movq	%rax, %rdi
	testl	%r14d, %r14d
	js	LBB0_2
## %bb.1:
	leal	(%rbx,%r14), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	movq	_AR9300_EEPROM_SIZE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jge	LBB0_2
## %bb.3:
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	testb	$1, %r14b
	jne	LBB0_4
## %bb.5:
	leal	-1(%r14), %r13d
	movq	%r15, %rdi
	movl	%r14d, %esi
	movq	%r12, %rdx
	callq	_ar9300_eeprom_read_byte
	testl	%eax, %eax
	je	LBB0_13
## %bb.6:
	addq	$4, %r12
	decl	%ebx
	jmp	LBB0_7
LBB0_2:
	movq	_EEPROM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_ath_dbg
LBB0_14:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	%r14d, %r13d
LBB0_7:
	cmpl	$2, %ebx
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	jl	LBB0_11
## %bb.8:
	movq	%rbx, %rax
	shrl	$31, %ebx
	addl	%eax, %ebx
	sarl	%ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%r13d, %esi
	movq	%r12, %rdx
	callq	_ar9300_eeprom_read_word
	testl	%eax, %eax
	je	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	addl	$-2, %r13d
	addq	$8, %r12
	decl	%ebx
	jne	LBB0_9
LBB0_11:
	movl	$1, %r14d
	testb	$1, -48(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_14
## %bb.12:
	movq	%r15, %rdi
	movl	%r13d, %esi
	movq	%r12, %rdx
	callq	_ar9300_eeprom_read_byte
	testl	%eax, %eax
	jne	LBB0_14
LBB0_13:
	movq	_EEPROM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	xorl	%r14d, %r14d
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %ecx
	xorl	%eax, %eax
	callq	_ath_dbg
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_AR9300_EEPROM_SIZE,4,2         ## @AR9300_EEPROM_SIZE
	.comm	_EEPROM,4,2                     ## @EEPROM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"eeprom address not in range\n"

L_.str.1:                               ## @.str.1
	.asciz	"unable to read eeprom region at offset %d\n"

	.no_dead_strip	_ar9300_read_eeprom
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ar9300_read_eeprom
_ar9300_read_eeprom:                    ; @ar9300_read_eeprom
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x22, x3
	mov	x20, x2
	mov	x24, x1
	mov	x21, x0
	bl	_ath9k_hw_common
	mov	x19, x0
	tbnz	w24, #31, LBB0_5
; %bb.1:
	add	w8, w22, w24
	cmp	w8, #0
	cinc	w8, w8, lt
Lloh0:
	adrp	x9, _AR9300_EEPROM_SIZE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AR9300_EEPROM_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w9, w8, asr #1
	b.le	LBB0_5
; %bb.2:
	tbnz	w24, #0, LBB0_8
; %bb.3:
	sub	w23, w24, #1
	mov	x0, x21
	mov	x1, x24
	mov	x2, x20
	bl	_ar9300_eeprom_read_byte
	cbz	w0, LBB0_16
; %bb.4:
	add	x20, x20, #4
	sub	w22, w22, #1
	b	LBB0_9
LBB0_5:
Lloh3:
	adrp	x8, _EEPROM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EEPROM@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
LBB0_6:
	mov	x0, x19
	bl	_ath_dbg
	mov	w0, #0
LBB0_7:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_8:
	mov	x23, x24
LBB0_9:
	cmp	w22, #0
	cinc	w8, w22, lt
	cmp	w22, #2
	b.lt	LBB0_13
; %bb.10:
	asr	w24, w8, #1
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x23
	mov	x2, x20
	bl	_ar9300_eeprom_read_word
	cbz	w0, LBB0_16
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	sub	w23, w23, #2
	add	x20, x20, #8
	subs	w24, w24, #1
	b.ne	LBB0_11
LBB0_13:
	tbz	w22, #0, LBB0_15
; %bb.14:
	mov	x0, x21
	mov	x1, x23
	mov	x2, x20
	bl	_ar9300_eeprom_read_byte
	cbz	w0, LBB0_16
LBB0_15:
	mov	w0, #1
	b	LBB0_7
LBB0_16:
Lloh8:
	adrp	x8, _EEPROM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EEPROM@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	str	x23, [sp]
Lloh11:
	adrp	x2, l_.str.1@PAGE
Lloh12:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_AR9300_EEPROM_SIZE,4,2         ; @AR9300_EEPROM_SIZE
	.comm	_EEPROM,4,2                     ; @EEPROM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"eeprom address not in range\n"

l_.str.1:                               ; @.str.1
	.asciz	"unable to read eeprom region at offset %d\n"

	.no_dead_strip	_ar9300_read_eeprom
.subsections_via_symbols
