	.file	"extr_isci.c_isci_allocate_pci_memory.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"unable to allocate pci resource\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"ISCI"
	.text
	.p2align 4
	.type	isci_allocate_pci_memory, @function
isci_allocate_pci_memory:
.LFB0:
	.cfi_startproc
	endbr64
	mov	eax, DWORD PTR ISCI_NUM_PCI_BARS[rip]
	test	eax, eax
	jle	.L8
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	lea	r13, .LC0[rip]
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	xor	ebx, ebx
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L3:
	call	rman_get_bustag@PLT
	mov	rdi, QWORD PTR 0[rbp]
	add	rbx, 1
	mov	DWORD PTR 12[rbp], eax
	call	rman_get_bushandle@PLT
	cmp	DWORD PTR ISCI_NUM_PCI_BARS[rip], ebx
	mov	DWORD PTR 8[rbp], eax
	jle	.L12
.L5:
	mov	rdx, QWORD PTR 8[r12]
	lea	rax, [rbx+rbx*2]
	lea	edi, [rbx+rbx]
	lea	rbp, [rdx+rax*8]
	call	PCIR_BAR@PLT
	mov	edi, DWORD PTR [r12]
	mov	ecx, DWORD PTR RF_ACTIVE[rip]
	lea	rdx, 16[rbp]
	mov	DWORD PTR 16[rbp], eax
	mov	esi, DWORD PTR SYS_RES_MEMORY[rip]
	call	bus_alloc_resource_any@PLT
	mov	QWORD PTR 0[rbp], rax
	mov	rdi, rax
	test	rax, rax
	jne	.L3
	mov	rdx, r13
	lea	rsi, .LC1[rip]
	add	rbx, 1
	call	isci_log_message@PLT
	cmp	DWORD PTR ISCI_NUM_PCI_BARS[rip], ebx
	jg	.L5
.L12:
	add	rsp, 8
	.cfi_def_cfa_offset 40
	xor	eax, eax
	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
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	xor	eax, eax
	ret
	.cfi_endproc
.LFE0:
	.size	isci_allocate_pci_memory, .-isci_allocate_pci_memory
	.comm	SYS_RES_MEMORY,4,4
	.comm	RF_ACTIVE,4,4
	.comm	ISCI_NUM_PCI_BARS,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_isci.c_isci_allocate_pci_memory.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"unable to allocate pci resource\012\000"
	.align	2
.LC1:
	.ascii	"ISCI\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	isci_allocate_pci_memory, %function
isci_allocate_pci_memory:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r8, .L9
	ldr	r3, [r8]
	cmp	r3, #0
	ble	.L2
	mov	r7, r0
	mov	r4, #0
	ldr	r10, .L9+4
	ldr	r9, .L9+8
	ldr	fp, .L9+12
	b	.L5
.L3:
	bl	rman_get_bustag
	mov	r3, r0
	ldr	r0, [r5, r4, lsl #4]
	str	r3, [r6, #8]
	bl	rman_get_bushandle
	ldr	r3, [r8]
	add	r4, r4, #1
	cmp	r3, r4
	str	r0, [r6, #4]
	ble	.L2
.L5:
	ldr	r5, [r7, #4]
	lsl	r0, r4, #1
	add	r6, r5, r4, lsl #4
	bl	PCIR_BAR
	mov	r2, r6
	ldr	r3, [r10]
	str	r0, [r2, #12]!
	ldr	r1, [r9]
	ldr	r0, [r7]
	bl	bus_alloc_resource_any
	cmp	r0, #0
	str	r0, [r5, r4, lsl #4]
	bne	.L3
	mov	r2, fp
	ldr	r1, .L9+16
	bl	isci_log_message
	ldr	r3, [r8]
	add	r4, r4, #1
	cmp	r3, r4
	bgt	.L5
.L2:
	mov	r0, #0
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L10:
	.align	2
.L9:
	.word	ISCI_NUM_PCI_BARS
	.word	RF_ACTIVE
	.word	SYS_RES_MEMORY
	.word	.LC0
	.word	.LC1
	.size	isci_allocate_pci_memory, .-isci_allocate_pci_memory
	.comm	SYS_RES_MEMORY,4,4
	.comm	RF_ACTIVE,4,4
	.comm	ISCI_NUM_PCI_BARS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
