	.file	"extr_vmci.c_vmci_allocate_interrupt_resources.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	vmci_allocate_interrupt_resources, @function
vmci_allocate_interrupt_resources:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	xor	edx, edx
	mov	r13, rdi
	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	rcx, QWORD PTR 8[rdi]
	mov	ebx, DWORD PTR RF_ACTIVE[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR [rdi]
	cmp	QWORD PTR VMCI_INTR_TYPE_INTX[rip], rcx
	setne	dl
	cmp	eax, 1
	je	.L12
	mov	DWORD PTR 4[rsp], edx
	test	eax, eax
	jle	.L7
.L3:
	xor	r12d, r12d
	lea	rbp, 4[rsp]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rdx, r12
	add	r12, 1
	sal	rdx, 4
	add	rdx, QWORD PTR 16[r13]
	mov	QWORD PTR 8[rdx], rax
	mov	eax, DWORD PTR 4[rsp]
	mov	DWORD PTR [rdx], eax
	add	eax, 1
	mov	DWORD PTR 4[rsp], eax
	cmp	DWORD PTR 0[r13], r12d
	jle	.L7
.L6:
	mov	edi, DWORD PTR 24[r13]
	mov	esi, DWORD PTR SYS_RES_IRQ[rip]
	mov	ecx, ebx
	mov	rdx, rbp
	call	bus_alloc_resource_any@PLT
	test	rax, rax
	jne	.L5
	mov	eax, DWORD PTR ENXIO[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L7:
	xor	eax, eax
.L1:
	mov	rsi, QWORD PTR 8[rsp]
	xor	rsi, QWORD PTR fs:40
	jne	.L13
	add	rsp, 24
	.cfi_remember_state
	.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
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	mov	DWORD PTR 4[rsp], edx
	or	ebx, DWORD PTR RF_SHAREABLE[rip]
	jmp	.L3
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	vmci_allocate_interrupt_resources, .-vmci_allocate_interrupt_resources
	.comm	VMCI_INTR_TYPE_INTX,8,8
	.comm	SYS_RES_IRQ,4,4
	.comm	RF_SHAREABLE,4,4
	.comm	RF_ACTIVE,4,4
	.comm	ENXIO,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_vmci.c_vmci_allocate_interrupt_resources.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	vmci_allocate_interrupt_resources, %function
vmci_allocate_interrupt_resources:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	mov	r5, r0
	ldr	r3, .L14
	ldr	r0, [r0, #4]
	ldr	r3, [r3]
	ldr	r2, [r5]
	subs	r3, r3, r0
	ldr	r1, .L14+4
	ldr	r0, .L14+8
	movne	r3, #1
	sub	sp, sp, #12
	cmp	r2, #1
	ldr	r0, [r0]
	str	r0, [sp, #4]
	mov	r0,#0
	ldr	r7, [r1]
	beq	.L12
	cmp	r2, #0
	str	r3, [sp]
	ble	.L7
.L3:
	mov	r4, #0
	ldr	r6, .L14+12
	b	.L6
.L5:
	ldr	r1, [r5, #8]
	ldr	r2, [sp]
	ldr	r3, [r5]
	add	ip, r1, r4, lsl #3
	str	r0, [ip, #4]
	str	r2, [r1, r4, lsl #3]
	add	r4, r4, #1
	add	r2, r2, #1
	cmp	r3, r4
	str	r2, [sp]
	ble	.L7
.L6:
	mov	r3, r7
	mov	r2, sp
	ldr	r1, [r6]
	ldr	r0, [r5, #12]
	bl	bus_alloc_resource_any
	cmp	r0, #0
	bne	.L5
	ldr	r3, .L14+16
	ldr	r0, [r3]
	b	.L1
.L7:
	mov	r0, #0
.L1:
	ldr	r3, .L14+8
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L13
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L12:
	ldr	r2, .L14+20
	str	r3, [sp]
	ldr	r3, [r2]
	orr	r7, r7, r3
	b	.L3
.L13:
	bl	__stack_chk_fail
.L15:
	.align	2
.L14:
	.word	VMCI_INTR_TYPE_INTX
	.word	RF_ACTIVE
	.word	.LC0
	.word	SYS_RES_IRQ
	.word	ENXIO
	.word	RF_SHAREABLE
	.size	vmci_allocate_interrupt_resources, .-vmci_allocate_interrupt_resources
	.comm	VMCI_INTR_TYPE_INTX,4,4
	.comm	SYS_RES_IRQ,4,4
	.comm	RF_SHAREABLE,4,4
	.comm	RF_ACTIVE,4,4
	.comm	ENXIO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
