	.file	"extr_setup-bus.c_assign_requested_resources_sorted.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	assign_requested_resources_sorted, @function
assign_requested_resources_sorted:
.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, 8
	.cfi_def_cfa_offset 48
	mov	rbx, QWORD PTR 16[rdi]
	test	rbx, rbx
	je	.L1
	mov	r13, rsi
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rbx, QWORD PTR 16[rbx]
	test	rbx, rbx
	je	.L1
.L10:
	mov	rbp, QWORD PTR 8[rbx]
	mov	rax, QWORD PTR [rbx]
	mov	rdi, rbp
	mov	r12, QWORD PTR 8[rax]
	call	resource_size@PLT
	test	rax, rax
	je	.L4
	mov	rax, rbp
	mov	rdi, QWORD PTR [rbx]
	sub	rax, r12
	mov	r12, rax
	sar	r12, 2
	mov	esi, r12d
	call	pci_assign_resource@PLT
	test	rax, rax
	je	.L4
	test	r13, r13
	je	.L7
	mov	rax, QWORD PTR [rbx]
	mov	edi, DWORD PTR [rax]
	call	pci_is_root_bus@PLT
	test	eax, eax
	jne	.L7
	cmp	DWORD PTR PCI_ROM_RESOURCE[rip], r12d
	jne	.L9
	mov	eax, DWORD PTR 0[rbp]
	test	DWORD PTR IORESOURCE_ROM_ENABLE[rip], eax
	je	.L7
.L9:
	mov	rsi, QWORD PTR [rbx]
	mov	rdx, rbp
	mov	rdi, r13
	call	add_to_failed_list@PLT
	.p2align 4,,10
	.p2align 3
.L7:
	mov	rdi, rbp
	call	reset_resource@PLT
	mov	rbx, QWORD PTR 16[rbx]
	test	rbx, rbx
	jne	.L10
.L1:
	add	rsp, 8
	.cfi_def_cfa_offset 40
	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
	.cfi_endproc
.LFE0:
	.size	assign_requested_resources_sorted, .-assign_requested_resources_sorted
	.comm	PCI_ROM_RESOURCE,4,4
	.comm	IORESOURCE_ROM_ENABLE,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_setup-bus.c_assign_requested_resources_sorted.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	assign_requested_resources_sorted, %function
assign_requested_resources_sorted:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r4, [r0, #8]
	cmp	r4, #0
	popeq	{r4, r5, r6, r7, r8, r9, r10, pc}
	mov	r7, r1
	ldr	r8, .L23
	ldr	r9, .L23+4
	b	.L10
.L4:
	ldr	r4, [r4, #8]
	cmp	r4, #0
	popeq	{r4, r5, r6, r7, r8, r9, r10, pc}
.L10:
	ldm	r4, {r3, r6}
	mov	r0, r6
	ldr	r5, [r3, #4]
	bl	resource_size
	cmp	r0, #0
	beq	.L4
	sub	r5, r6, r5
	asr	r5, r5, #2
	mov	r1, r5
	ldr	r0, [r4]
	bl	pci_assign_resource
	cmp	r0, #0
	beq	.L4
	cmp	r7, #0
	beq	.L7
	ldr	r3, [r4]
	ldr	r0, [r3]
	bl	pci_is_root_bus
	cmp	r0, #0
	bne	.L7
	ldr	r3, [r8]
	cmp	r3, r5
	bne	.L9
	ldr	r2, [r6]
	ldr	r3, [r9]
	tst	r2, r3
	beq	.L7
.L9:
	mov	r2, r6
	mov	r0, r7
	ldr	r1, [r4]
	bl	add_to_failed_list
.L7:
	mov	r0, r6
	bl	reset_resource
	b	.L4
.L24:
	.align	2
.L23:
	.word	PCI_ROM_RESOURCE
	.word	IORESOURCE_ROM_ENABLE
	.size	assign_requested_resources_sorted, .-assign_requested_resources_sorted
	.comm	PCI_ROM_RESOURCE,4,4
	.comm	IORESOURCE_ROM_ENABLE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
