	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath10k_pci_read_eeprom
_ath10k_pci_read_eeprom:                ## @ath10k_pci_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
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	%esi, %r14d
	movq	%rdi, %r12
	movq	_QCA9887_EEPROM_SELECT_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_QCA9887_EEPROM_ADDR_LO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_SM
	orl	%eax, %ebx
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	sarl	$8, %r14d
	movq	_QCA9887_EEPROM_ADDR_HI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_SM
	orl	%eax, %ebx
	movq	_SI_BASE_ADDRESS@GOTPCREL(%rip), %r14
	movq	_SI_TX_DATA0_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_ath10k_pci_write32
	movq	_SI_CS_OFFSET@GOTPCREL(%rip), %r15
	movq	(%r15), %r13
	addq	(%r14), %r13
	movq	_SI_CS_START@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, %edi
	callq	_SM
	movl	%eax, %ebx
	movq	_SI_CS_RX_CNT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, %edi
	callq	_SM
	orl	%eax, %ebx
	movq	_SI_CS_TX_CNT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4, %edi
	callq	_SM
	orl	%eax, %ebx
	movq	%r12, %rdi
	movq	%r13, %rsi
	movl	%ebx, %edx
	callq	_ath10k_pci_write32
	movl	$100001, %r14d                  ## imm = 0x186A1
	movq	_SI_CS_DONE_INT@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rsi
	movq	_SI_BASE_ADDRESS@GOTPCREL(%rip), %rax
	addq	(%rax), %rsi
	movq	%r12, %rdi
	callq	_ath10k_pci_read32
	movl	%eax, %ebx
	movl	(%r13), %esi
	movl	%eax, %edi
	callq	_MS
	testq	%rax, %rax
	jne	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$10, %edi
	callq	_udelay
	decl	%r14d
	cmpl	$1, %r14d
	ja	LBB0_1
LBB0_3:
	movl	(%r13), %esi
	movl	%ebx, %edi
	callq	_MS
	testq	%rax, %rax
	je	LBB0_4
## %bb.6:
	movq	(%r15), %rsi
	movq	_SI_BASE_ADDRESS@GOTPCREL(%rip), %r14
	addq	(%r14), %rsi
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_ath10k_pci_write32
	movq	_SI_CS_DONE_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_MS
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_ath10k_err
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
LBB0_4:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_ath10k_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
LBB0_5:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_9
LBB0_8:
	movq	_SI_RX_DATA0_OFFSET@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	movq	%r12, %rdi
	callq	_ath10k_pci_read32
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	xorl	%eax, %eax
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_QCA9887_EEPROM_SELECT_READ,4,2 ## @QCA9887_EEPROM_SELECT_READ
	.comm	_QCA9887_EEPROM_ADDR_LO,4,2     ## @QCA9887_EEPROM_ADDR_LO
	.comm	_QCA9887_EEPROM_ADDR_HI,4,2     ## @QCA9887_EEPROM_ADDR_HI
	.comm	_SI_BASE_ADDRESS,8,3            ## @SI_BASE_ADDRESS
	.comm	_SI_TX_DATA0_OFFSET,8,3         ## @SI_TX_DATA0_OFFSET
	.comm	_SI_CS_OFFSET,8,3               ## @SI_CS_OFFSET
	.comm	_SI_CS_START,4,2                ## @SI_CS_START
	.comm	_SI_CS_RX_CNT,4,2               ## @SI_CS_RX_CNT
	.comm	_SI_CS_TX_CNT,4,2               ## @SI_CS_TX_CNT
	.comm	_SI_CS_DONE_INT,4,2             ## @SI_CS_DONE_INT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"timeout while reading device EEPROM at %04x\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_SI_CS_DONE_ERR,4,2             ## @SI_CS_DONE_ERR
L_.str.1:                               ## @.str.1
	.asciz	"failed to read device EEPROM at %04x\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_SI_RX_DATA0_OFFSET,8,3         ## @SI_RX_DATA0_OFFSET
	.no_dead_strip	_ath10k_pci_read_eeprom
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath10k_pci_read_eeprom
_ath10k_pci_read_eeprom:                ; @ath10k_pci_read_eeprom
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _QCA9887_EEPROM_SELECT_READ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _QCA9887_EEPROM_SELECT_READ@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
Lloh3:
	adrp	x8, _QCA9887_EEPROM_ADDR_LO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _QCA9887_EEPROM_ADDR_LO@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_SM
	orr	w22, w0, w22
	asr	w0, w21, #8
Lloh6:
	adrp	x8, _QCA9887_EEPROM_ADDR_HI@GOTPAGE
Lloh7:
	ldr	x8, [x8, _QCA9887_EEPROM_ADDR_HI@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_SM
Lloh9:
	adrp	x24, _SI_BASE_ADDRESS@GOTPAGE
Lloh10:
	ldr	x24, [x24, _SI_BASE_ADDRESS@GOTPAGEOFF]
	orr	w2, w22, w0
	ldr	x8, [x24]
Lloh11:
	adrp	x9, _SI_TX_DATA0_OFFSET@GOTPAGE
Lloh12:
	ldr	x9, [x9, _SI_TX_DATA0_OFFSET@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x20
	bl	_ath10k_pci_write32
Lloh14:
	adrp	x25, _SI_CS_OFFSET@GOTPAGE
Lloh15:
	ldr	x25, [x25, _SI_CS_OFFSET@GOTPAGEOFF]
	ldr	x8, [x24]
	ldr	x9, [x25]
	add	x22, x9, x8
Lloh16:
	adrp	x8, _SI_CS_START@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SI_CS_START@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	w0, #1
	bl	_SM
	mov	x23, x0
Lloh19:
	adrp	x8, _SI_CS_RX_CNT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _SI_CS_RX_CNT@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	w0, #1
	bl	_SM
	orr	w23, w0, w23
Lloh22:
	adrp	x8, _SI_CS_TX_CNT@GOTPAGE
Lloh23:
	ldr	x8, [x8, _SI_CS_TX_CNT@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	w0, #4
	bl	_SM
	orr	w2, w23, w0
	mov	x0, x20
	mov	x1, x22
	bl	_ath10k_pci_write32
	mov	w26, #34465
	movk	w26, #1, lsl #16
Lloh25:
	adrp	x23, _SI_CS_DONE_INT@GOTPAGE
Lloh26:
	ldr	x23, [x23, _SI_CS_DONE_INT@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	ldr	x9, [x25]
	add	x1, x9, x8
	mov	x0, x20
	bl	_ath10k_pci_read32
	mov	x22, x0
	ldr	w1, [x23]
	bl	_MS
	cbnz	x0, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #10
	bl	_udelay
	sub	w26, w26, #1
	cmp	w26, #1
	b.hi	LBB0_1
LBB0_3:
	ldr	w1, [x23]
	mov	x0, x22
	bl	_MS
	cbz	x0, LBB0_6
; %bb.4:
	ldr	x8, [x24]
	ldr	x9, [x25]
	add	x1, x9, x8
	mov	x0, x20
	mov	x2, x22
	bl	_ath10k_pci_write32
Lloh27:
	adrp	x8, _SI_CS_DONE_ERR@GOTPAGE
Lloh28:
	ldr	x8, [x8, _SI_CS_DONE_ERR@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_MS
	cbz	x0, LBB0_8
; %bb.5:
Lloh30:
	adrp	x1, l_.str.1@PAGE
Lloh31:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_ath10k_err
Lloh32:
	adrp	x8, _EIO@GOTPAGE
Lloh33:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh34:
	adrp	x1, l_.str@PAGE
Lloh35:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_ath10k_err
Lloh36:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh37:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_8:
	ldr	x8, [x24]
Lloh38:
	adrp	x9, _SI_RX_DATA0_OFFSET@GOTPAGE
Lloh39:
	ldr	x9, [x9, _SI_RX_DATA0_OFFSET@GOTPAGEOFF]
Lloh40:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x20
	bl	_ath10k_pci_read32
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19]
LBB0_9:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_QCA9887_EEPROM_SELECT_READ,4,2 ; @QCA9887_EEPROM_SELECT_READ
	.comm	_QCA9887_EEPROM_ADDR_LO,4,2     ; @QCA9887_EEPROM_ADDR_LO
	.comm	_QCA9887_EEPROM_ADDR_HI,4,2     ; @QCA9887_EEPROM_ADDR_HI
	.comm	_SI_BASE_ADDRESS,8,3            ; @SI_BASE_ADDRESS
	.comm	_SI_TX_DATA0_OFFSET,8,3         ; @SI_TX_DATA0_OFFSET
	.comm	_SI_CS_OFFSET,8,3               ; @SI_CS_OFFSET
	.comm	_SI_CS_START,4,2                ; @SI_CS_START
	.comm	_SI_CS_RX_CNT,4,2               ; @SI_CS_RX_CNT
	.comm	_SI_CS_TX_CNT,4,2               ; @SI_CS_TX_CNT
	.comm	_SI_CS_DONE_INT,4,2             ; @SI_CS_DONE_INT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"timeout while reading device EEPROM at %04x\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_SI_CS_DONE_ERR,4,2             ; @SI_CS_DONE_ERR
l_.str.1:                               ; @.str.1
	.asciz	"failed to read device EEPROM at %04x\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_SI_RX_DATA0_OFFSET,8,3         ; @SI_RX_DATA0_OFFSET
	.no_dead_strip	_ath10k_pci_read_eeprom
.subsections_via_symbols
