	.file	"extr_resource.c_find_next_system_ram.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	find_next_system_ram, @function
find_next_system_ram:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	test	rdi, rdi
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	sete	dil
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	movzx	edi, dil
	call	BUG_ON@PLT
	mov	r14, QWORD PTR 0[rbp]
	mov	r13, QWORD PTR 8[rbp]
	xor	edi, edi
	cmp	r14, r13
	setge	dil
	call	BUG_ON@PLT
	lea	rdi, resource_lock[rip]
	call	read_lock@PLT
	mov	rbx, QWORD PTR iomem_resource[rip]
	test	rbx, rbx
	je	.L2
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rax, QWORD PTR 16[rbp]
	cmp	QWORD PTR 16[rbx], rax
	jne	.L7
	test	r12, r12
	je	.L8
	mov	edi, DWORD PTR 24[rbx]
	mov	rsi, r12
	call	strcmp@PLT
	test	rax, rax
	jne	.L7
.L8:
	mov	rax, QWORD PTR [rbx]
	cmp	rax, r13
	jg	.L2
	cmp	QWORD PTR 8[rbx], r14
	jl	.L7
	cmp	rax, r13
	jl	.L25
.L7:
	mov	rbx, QWORD PTR 32[rbx]
	test	rbx, rbx
	jne	.L4
.L2:
	lea	rdi, resource_lock[rip]
	call	read_unlock@PLT
	mov	eax, -1
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
.L25:
	.cfi_restore_state
	lea	rdi, resource_lock[rip]
	call	read_unlock@PLT
	mov	rax, QWORD PTR [rbx]
	cmp	QWORD PTR 0[rbp], rax
	jge	.L13
	mov	QWORD PTR 0[rbp], rax
.L13:
	mov	rdx, QWORD PTR 8[rbx]
	xor	eax, eax
	cmp	QWORD PTR 8[rbp], rdx
	jle	.L1
	pop	rbx
	.cfi_def_cfa_offset 40
	mov	QWORD PTR 8[rbp], rdx
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	find_next_system_ram, .-find_next_system_ram
	.comm	resource_lock,4,4
	.comm	iomem_resource,8,8
	.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_resource.c_find_next_system_ram.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	find_next_system_ram, %function
find_next_system_ram:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r0
	clz	r0, r0
	lsr	r0, r0, #5
	mov	r7, r1
	bl	BUG_ON
	ldm	r5, {r6, r8}
	cmp	r6, r8
	movlt	r0, #0
	movge	r0, #1
	bl	BUG_ON
	ldr	r0, .L22
	bl	read_lock
	ldr	r3, .L22+4
	ldr	r4, [r3]
	cmp	r4, #0
	beq	.L2
.L4:
	ldr	r2, [r4, #8]
	ldr	r3, [r5, #8]
	cmp	r2, r3
	bne	.L7
	cmp	r7, #0
	beq	.L8
	mov	r1, r7
	ldr	r0, [r4, #12]
	bl	strcmp
	cmp	r0, #0
	bne	.L7
.L8:
	ldr	r2, [r4]
	cmp	r2, r8
	bgt	.L2
	ldr	r3, [r4, #4]
	cmp	r3, r6
	movge	r3, #1
	movlt	r3, #0
	cmp	r2, r8
	movge	r3, #0
	cmp	r3, #0
	bne	.L21
.L7:
	ldr	r4, [r4, #16]
	cmp	r4, #0
	bne	.L4
.L2:
	ldr	r0, .L22
	bl	read_unlock
	mvn	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L21:
	ldr	r0, .L22
	bl	read_unlock
	ldr	r3, [r4]
	ldr	r2, [r5]
	mov	r0, #0
	cmp	r2, r3
	strlt	r3, [r5]
	ldr	r2, [r5, #4]
	ldr	r3, [r4, #4]
	cmp	r2, r3
	strgt	r3, [r5, #4]
	pop	{r4, r5, r6, r7, r8, pc}
.L23:
	.align	2
.L22:
	.word	resource_lock
	.word	iomem_resource
	.size	find_next_system_ram, .-find_next_system_ram
	.comm	resource_lock,4,4
	.comm	iomem_resource,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
