	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath9k_hw_nvram_swap_data       ## -- Begin function ath9k_hw_nvram_swap_data
	.p2align	4, 0x90
_ath9k_hw_nvram_swap_data:              ## @ath9k_hw_nvram_swap_data
	.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	%edx, %r12d
	movq	%rsi, %r14
	movq	%rdi, %r13
	callq	_ath9k_hw_common
	movq	%rax, %r15
	movq	_AR5416_EEPROM_MAGIC_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	movq	%r13, %rdi
	callq	_ath9k_hw_nvram_read
	testl	%eax, %eax
	je	LBB0_4
## %bb.1:
	movq	-48(%rbp), %rdi
	callq	_swab16
	movq	_AR5416_EEPROM_MAGIC@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rcx, %rax
	jne	LBB0_5
## %bb.2:
	movq	_EEPROM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_ath_dbg
	movq	_AH_NO_EEP_SWAP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r13)
	je	LBB0_8
## %bb.3:
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	callq	_ath_info
	jmp	LBB0_11
LBB0_4:
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_ath_err
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_15:
	subl	(%rax), %ebx
	jmp	LBB0_16
LBB0_5:
	cmpq	%rcx, -48(%rbp)
	je	LBB0_11
## %bb.6:
	movq	%r13, %rdi
	callq	_ath9k_hw_use_flash
	testq	%rax, %rax
	je	LBB0_14
## %bb.7:
	movq	_EEPROM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-48(%rbp), %rcx
	leaq	L_.str.2(%rip), %rdx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_ath_dbg
	jmp	LBB0_11
LBB0_8:
	testl	%r12d, %r12d
	jle	LBB0_11
## %bb.9:
	movl	%r12d, %r12d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r13,%rbx,8), %rdi
	callq	_swab16
	movq	%rax, 16(%r13,%rbx,8)
	incq	%rbx
	cmpq	%rbx, %r12
	jne	LBB0_10
LBB0_11:
	movq	8(%r13), %rax
	movq	%r13, %rdi
	callq	*(%rax)
	movq	_AR5416_EEPMISC_BIG_ENDIAN@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_13
## %bb.12:
	movl	$1, (%r14)
	movq	_EEPROM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.5(%rip), %rdx
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_ath_dbg
	jmp	LBB0_16
LBB0_13:
	movl	$0, (%r14)
	xorl	%ebx, %ebx
LBB0_16:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	-48(%rbp), %rdx
	leaq	L_.str.3(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_ath_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_AR5416_EEPROM_MAGIC_OFFSET,4,2 ## @AR5416_EEPROM_MAGIC_OFFSET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Reading Magic # failed\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_AR5416_EEPROM_MAGIC,8,3        ## @AR5416_EEPROM_MAGIC
	.comm	_EEPROM,4,2                     ## @EEPROM
L_.str.1:                               ## @.str.1
	.asciz	"EEPROM needs byte-swapping to correct endianness.\n"

L_.str.2:                               ## @.str.2
	.asciz	"Ignoring invalid EEPROM magic (0x%04x).\n"

L_.str.3:                               ## @.str.3
	.asciz	"Invalid EEPROM magic (0x%04x).\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_AH_NO_EEP_SWAP,4,2             ## @AH_NO_EEP_SWAP
L_.str.4:                               ## @.str.4
	.asciz	"Ignoring endianness difference in EEPROM magic bytes.\n"

	.comm	_AR5416_EEPMISC_BIG_ENDIAN,4,2  ## @AR5416_EEPMISC_BIG_ENDIAN
L_.str.5:                               ## @.str.5
	.asciz	"Big Endian EEPROM detected according to EEPMISC register.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ath9k_hw_nvram_swap_data       ; -- Begin function ath9k_hw_nvram_swap_data
	.p2align	2
_ath9k_hw_nvram_swap_data:              ; @ath9k_hw_nvram_swap_data
	.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, x2
	mov	x20, x1
	mov	x21, x0
	bl	_ath9k_hw_common
	mov	x19, x0
Lloh0:
	adrp	x8, _AR5416_EEPROM_MAGIC_OFFSET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AR5416_EEPROM_MAGIC_OFFSET@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x21
	bl	_ath9k_hw_nvram_read
	cbz	w0, LBB0_4
; %bb.1:
	ldr	x0, [sp, #8]
	bl	_swab16
Lloh3:
	adrp	x8, _AR5416_EEPROM_MAGIC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AR5416_EEPROM_MAGIC@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_6
; %bb.2:
Lloh6:
	adrp	x8, _EEPROM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EEPROM@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x2, l_.str.1@PAGE
Lloh10:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_ath_dbg
	ldr	w8, [x21]
Lloh11:
	adrp	x9, _AH_NO_EEP_SWAP@GOTPAGE
Lloh12:
	ldr	x9, [x9, _AH_NO_EEP_SWAP@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.3:
Lloh14:
	adrp	x1, l_.str.4@PAGE
Lloh15:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_ath_info
	b	LBB0_12
LBB0_4:
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_ath_err
Lloh18:
	adrp	x8, _EIO@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_15
LBB0_6:
	ldr	x9, [sp, #8]
	cmp	x9, x8
	b.eq	LBB0_12
; %bb.7:
	mov	x0, x21
	bl	_ath9k_hw_use_flash
	cbz	x0, LBB0_16
; %bb.8:
Lloh20:
	adrp	x8, _EEPROM@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EEPROM@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	ldr	x8, [sp, #8]
	str	x8, [sp]
Lloh23:
	adrp	x2, l_.str.2@PAGE
Lloh24:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_ath_dbg
	b	LBB0_12
LBB0_9:
	cmp	w22, #1
	b.lt	LBB0_12
; %bb.10:
	mov	w22, w22
	add	x23, x21, #16
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x23]
	bl	_swab16
	str	x0, [x23], #8
	subs	x22, x22, #1
	b.ne	LBB0_11
LBB0_12:
	ldr	x8, [x21, #8]
	ldr	x8, [x8]
	mov	x0, x21
	blr	x8
Lloh25:
	adrp	x8, _AR5416_EEPMISC_BIG_ENDIAN@GOTPAGE
Lloh26:
	ldr	x8, [x8, _AR5416_EEPMISC_BIG_ENDIAN@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_14
; %bb.13:
	mov	w8, #1
	str	w8, [x20]
Lloh28:
	adrp	x8, _EEPROM@GOTPAGE
Lloh29:
	ldr	x8, [x8, _EEPROM@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
Lloh31:
	adrp	x2, l_.str.5@PAGE
Lloh32:
	add	x2, x2, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_ath_dbg
	mov	w0, #0
	b	LBB0_15
LBB0_14:
	mov	w0, #0
	str	wzr, [x20]
LBB0_15:
	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_16:
	ldr	x8, [sp, #8]
	str	x8, [sp]
Lloh33:
	adrp	x1, l_.str.3@PAGE
Lloh34:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_ath_err
Lloh35:
	adrp	x8, _EINVAL@GOTPAGE
Lloh36:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpAdd	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_AR5416_EEPROM_MAGIC_OFFSET,4,2 ; @AR5416_EEPROM_MAGIC_OFFSET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Reading Magic # failed\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_AR5416_EEPROM_MAGIC,8,3        ; @AR5416_EEPROM_MAGIC
	.comm	_EEPROM,4,2                     ; @EEPROM
l_.str.1:                               ; @.str.1
	.asciz	"EEPROM needs byte-swapping to correct endianness.\n"

l_.str.2:                               ; @.str.2
	.asciz	"Ignoring invalid EEPROM magic (0x%04x).\n"

l_.str.3:                               ; @.str.3
	.asciz	"Invalid EEPROM magic (0x%04x).\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_AH_NO_EEP_SWAP,4,2             ; @AH_NO_EEP_SWAP
l_.str.4:                               ; @.str.4
	.asciz	"Ignoring endianness difference in EEPROM magic bytes.\n"

	.comm	_AR5416_EEPMISC_BIG_ENDIAN,4,2  ; @AR5416_EEPMISC_BIG_ENDIAN
l_.str.5:                               ; @.str.5
	.asciz	"Big Endian EEPROM detected according to EEPMISC register.\n"

.subsections_via_symbols
