	.file	"extr_subr_bus.c_resource_list_release.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"resource_list_release: can't find resource"
	.align 8
.LC1:
	.string	"resource_list_release: resource entry is not busy"
	.text
	.p2align 4
	.globl	resource_list_release
	.type	resource_list_release, @function
resource_list_release:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, r9
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14d, r8d
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, ecx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	mov	rdi, rdx
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	call	device_get_parent@PLT
	cmp	rax, r12
	je	.L2
	mov	rdi, r12
	call	device_get_parent@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	r8, r15
	mov	ecx, r14d
	pop	rbx
	.cfi_def_cfa_offset 48
	mov	edx, r13d
	mov	rsi, rbp
	mov	rdi, rax
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	jmp	BUS_RELEASE_RESOURCE@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rdi, rbx
	mov	edx, r14d
	mov	esi, r13d
	call	resource_list_find@PLT
	mov	rbx, rax
	test	rax, rax
	je	.L13
.L3:
	cmp	QWORD PTR 8[rbx], 0
	je	.L14
.L4:
	mov	edx, DWORD PTR [rbx]
	test	DWORD PTR RLE_RESERVED[rip], edx
	je	.L5
	mov	eax, DWORD PTR EINVAL[rip]
	test	DWORD PTR RLE_ALLOCATED[rip], edx
	jne	.L15
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	mov	rdi, r12
	call	device_get_parent@PLT
	mov	r8, r15
	mov	ecx, r14d
	mov	edx, r13d
	mov	rdi, rax
	mov	rsi, rbp
	call	BUS_RELEASE_RESOURCE@PLT
	test	eax, eax
	jne	.L1
	mov	QWORD PTR 8[rbx], 0
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	mov	rdi, r15
	call	rman_get_flags@PLT
	test	DWORD PTR RF_ACTIVE[rip], eax
	je	.L9
	mov	rcx, r15
	mov	edx, r14d
	mov	esi, r13d
	mov	rdi, rbp
	call	bus_deactivate_resource@PLT
	test	eax, eax
	jne	.L1
.L9:
	mov	eax, DWORD PTR RLE_ALLOCATED[rip]
	not	eax
	and	DWORD PTR [rbx], eax
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	lea	rdi, .LC0[rip]
	call	panic@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L14:
	lea	rdi, .LC1[rip]
	call	panic@PLT
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	resource_list_release, .-resource_list_release
	.comm	RLE_RESERVED,4,4
	.comm	RLE_ALLOCATED,4,4
	.comm	RF_ACTIVE,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_subr_bus.c_resource_list_release.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"resource_list_release: can't find resource\000"
	.align	2
.LC1:
	.ascii	"resource_list_release: resource entry is not busy\000"
	.text
	.align	2
	.global	resource_list_release
	.syntax unified
	.arm
	.fpu softvfp
	.type	resource_list_release, %function
resource_list_release:
	@ args = 8, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r7, r0
	sub	sp, sp, #12
	mov	r0, r2
	mov	r5, r1
	mov	r4, r2
	mov	r6, r3
	ldr	r8, [sp, #40]
	ldr	r9, [sp, #44]
	bl	device_get_parent
	cmp	r0, r5
	beq	.L2
	mov	r0, r5
	bl	device_get_parent
	mov	r3, r8
	mov	r2, r6
	mov	r1, r4
	str	r9, [sp, #40]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, lr}
	b	BUS_RELEASE_RESOURCE
.L2:
	mov	r0, r7
	mov	r2, r8
	mov	r1, r6
	bl	resource_list_find
	subs	r7, r0, #0
	beq	.L12
.L3:
	ldr	r3, [r7, #4]
	cmp	r3, #0
	beq	.L13
.L4:
	ldr	r2, .L15
	ldr	r3, [r7]
	ldr	r2, [r2]
	tst	r3, r2
	beq	.L5
	ldr	r5, .L15+4
	ldr	r2, [r5]
	tst	r3, r2
	bne	.L14
	ldr	r3, .L15+8
	ldr	r0, [r3]
.L1:
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L5:
	mov	r0, r5
	bl	device_get_parent
	mov	r3, r8
	mov	r2, r6
	mov	r1, r4
	str	r9, [sp]
	bl	BUS_RELEASE_RESOURCE
	cmp	r0, #0
	streq	r0, [r7, #4]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L14:
	mov	r0, r9
	bl	rman_get_flags
	ldr	r3, .L15+12
	ldr	r3, [r3]
	tst	r0, r3
	beq	.L9
	mov	r3, r9
	mov	r2, r8
	mov	r1, r6
	mov	r0, r4
	bl	bus_deactivate_resource
	cmp	r0, #0
	bne	.L1
.L9:
	mov	r0, #0
	ldr	r2, [r5]
	ldr	r3, [r7]
	bic	r3, r3, r2
	str	r3, [r7]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L13:
	ldr	r0, .L15+16
	bl	panic
	b	.L4
.L12:
	ldr	r0, .L15+20
	bl	panic
	b	.L3
.L16:
	.align	2
.L15:
	.word	RLE_RESERVED
	.word	RLE_ALLOCATED
	.word	EINVAL
	.word	RF_ACTIVE
	.word	.LC1
	.word	.LC0
	.size	resource_list_release, .-resource_list_release
	.comm	RLE_RESERVED,4,4
	.comm	RLE_ALLOCATED,4,4
	.comm	RF_ACTIVE,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
