	.file	"extr_ehea_qmr.c_ehea_qp_alloc_register.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"hw_qpageit_get_inc failed\n"
.LC1:
	.string	"register_rpage_qp failed\n"
	.text
	.p2align 4
	.type	ehea_qp_alloc_register, @function
ehea_qp_alloc_register:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, r9
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, edx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rsi
	mov	esi, r12d
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rdi, rbp
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	edx, DWORD PTR EHEA_PAGESIZE[rip]
	mov	r15d, DWORD PTR 80[rsp]
	call	hw_queue_ctor@PLT
	mov	DWORD PTR 12[rsp], eax
	test	eax, eax
	jne	.L1
	test	r12d, r12d
	jle	.L3
	xor	ebx, ebx
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L4:
	call	__pa@PLT
	mov	ecx, DWORD PTR 0[r13]
	mov	edi, DWORD PTR [r14]
	xor	esi, esi
	mov	r8, rax
	mov	r9d, 1
	mov	edx, r15d
	call	ehea_h_register_rpage@PLT
	cmp	QWORD PTR H_SUCCESS[rip], rax
	jg	.L11
	add	ebx, 1
	cmp	r12d, ebx
	je	.L3
.L7:
	mov	rdi, rbp
	call	hw_qpageit_get_inc@PLT
	mov	rdi, rax
	test	rax, rax
	jne	.L4
	lea	rdi, .LC0[rip]
	call	pr_err@PLT
.L5:
	mov	rdi, rbp
	call	hw_queue_dtor@PLT
	mov	eax, DWORD PTR EIO[rip]
	neg	eax
	mov	DWORD PTR 12[rsp], eax
.L1:
	mov	eax, DWORD PTR 12[rsp]
	add	rsp, 24
	.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
.L3:
	.cfi_restore_state
	mov	rdi, rbp
	call	hw_qeit_reset@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L11:
	lea	rdi, .LC1[rip]
	call	pr_err@PLT
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	ehea_qp_alloc_register, .-ehea_qp_alloc_register
	.comm	H_SUCCESS,8,8
	.comm	EIO,4,4
	.comm	EHEA_PAGESIZE,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_ehea_qmr.c_ehea_qp_alloc_register.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"hw_qpageit_get_inc failed\012\000"
	.align	2
.LC1:
	.ascii	"register_rpage_qp failed\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ehea_qp_alloc_register, %function
ehea_qp_alloc_register:
	@ args = 12, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r1
	mov	r6, r2
	ldr	r2, .L12
	sub	sp, sp, #20
	mov	r7, r0
	mov	r1, r6
	mov	r0, r5
	ldr	r2, [r2]
	ldr	r8, [sp, #60]
	ldr	r9, [sp, #64]
	bl	hw_queue_ctor
	subs	r3, r0, #0
	str	r3, [sp, #12]
	bne	.L1
	cmp	r6, #0
	ble	.L3
	mov	r4, r3
	mov	fp, #1
	ldr	r10, .L12+4
	b	.L7
.L4:
	bl	__pa
	stm	sp, {r0, fp}
	mov	r2, r9
	ldr	r3, [r7]
	mov	r1, #0
	ldr	r0, [r8]
	bl	ehea_h_register_rpage
	ldr	r3, [r10]
	cmp	r3, r0
	bgt	.L11
	cmp	r6, r4
	beq	.L3
.L7:
	mov	r0, r5
	bl	hw_qpageit_get_inc
	cmp	r0, #0
	add	r4, r4, #1
	bne	.L4
	ldr	r0, .L12+8
	bl	pr_err
.L5:
	mov	r0, r5
	bl	hw_queue_dtor
	ldr	r3, .L12+12
	ldr	r0, [r3]
	rsb	r3, r0, #0
	str	r3, [sp, #12]
.L1:
	ldr	r0, [sp, #12]
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L3:
	mov	r0, r5
	bl	hw_qeit_reset
	ldr	r0, [sp, #12]
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L11:
	ldr	r0, .L12+16
	bl	pr_err
	b	.L5
.L13:
	.align	2
.L12:
	.word	EHEA_PAGESIZE
	.word	H_SUCCESS
	.word	.LC0
	.word	EIO
	.word	.LC1
	.size	ehea_qp_alloc_register, .-ehea_qp_alloc_register
	.comm	H_SUCCESS,4,4
	.comm	EIO,4,4
	.comm	EHEA_PAGESIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
