	.file	"extr_ahci_pci.c_ahci_pci_read_msix_bars.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ahci_pci_read_msix_bars, @function
ahci_pci_read_msix_bars:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 24
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	DWORD PTR 4[rsp], 0
	test	rsi, rsi
	je	.L9
	mov	rbp, rdx
	test	rdx, rdx
	je	.L9
	mov	rbx, rsi
	mov	esi, DWORD PTR PCIY_MSIX[rip]
	lea	rdx, 4[rsp]
	mov	r13d, edi
	call	pci_find_cap@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L9
	mov	edx, 4
	movsx	rsi, DWORD PTR 4[rsp]
	mov	edi, r13d
	add	rsi, QWORD PTR PCIR_MSIX_TABLE[rip]
	call	pci_read_config@PLT
	and	eax, DWORD PTR PCIM_MSIX_BIR_MASK[rip]
	mov	edi, eax
	call	PCIR_BAR@PLT
	movsx	rsi, DWORD PTR 4[rsp]
	mov	edx, 4
	mov	edi, r13d
	mov	DWORD PTR [rbx], eax
	add	rsi, QWORD PTR PCIR_MSIX_PBA[rip]
	call	pci_read_config@PLT
	and	eax, DWORD PTR PCIM_MSIX_BIR_MASK[rip]
	mov	edi, eax
	call	PCIR_BAR@PLT
	mov	DWORD PTR 0[rbp], eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L9:
	mov	r12d, DWORD PTR EINVAL[rip]
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L11
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
.L11:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ahci_pci_read_msix_bars, .-ahci_pci_read_msix_bars
	.comm	PCIY_MSIX,4,4
	.comm	PCIR_MSIX_TABLE,8,8
	.comm	PCIR_MSIX_PBA,8,8
	.comm	PCIM_MSIX_BIR_MASK,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_ahci_pci.c_ahci_pci_read_msix_bars.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ahci_pci_read_msix_bars, %function
ahci_pci_read_msix_bars:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	cmp	r2, #0
	cmpne	r1, #0
	mov	r3, #0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r2
	ldr	r2, .L10
	sub	sp, sp, #8
	ldr	r2, [r2]
	str	r2, [sp, #4]
	mov	r2,#0
	str	r3, [sp]
	bne	.L2
.L7:
	ldr	r3, .L10+4
	ldr	r4, [r3]
.L1:
	ldr	r3, .L10
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L9
	mov	r0, r4
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	ldr	r3, .L10+8
	mov	r6, r1
	mov	r2, sp
	ldr	r1, [r3]
	mov	r7, r0
	bl	pci_find_cap
	subs	r4, r0, #0
	bne	.L7
	ldr	r3, .L10+12
	ldr	r1, [sp]
	ldr	r3, [r3]
	mov	r2, #4
	add	r1, r1, r3
	mov	r0, r7
	bl	pci_read_config
	ldr	r8, .L10+16
	ldr	r3, [r8]
	and	r0, r0, r3
	bl	PCIR_BAR
	ldr	r3, .L10+20
	ldr	r1, [sp]
	ldr	r3, [r3]
	mov	r2, #4
	add	r1, r1, r3
	str	r0, [r6]
	mov	r0, r7
	bl	pci_read_config
	ldr	r3, [r8]
	and	r0, r0, r3
	bl	PCIR_BAR
	str	r0, [r5]
	b	.L1
.L9:
	bl	__stack_chk_fail
.L11:
	.align	2
.L10:
	.word	.LC0
	.word	EINVAL
	.word	PCIY_MSIX
	.word	PCIR_MSIX_TABLE
	.word	PCIM_MSIX_BIR_MASK
	.word	PCIR_MSIX_PBA
	.size	ahci_pci_read_msix_bars, .-ahci_pci_read_msix_bars
	.comm	PCIY_MSIX,4,4
	.comm	PCIR_MSIX_TABLE,4,4
	.comm	PCIR_MSIX_PBA,4,4
	.comm	PCIM_MSIX_BIR_MASK,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
