	.file	"extr_ehca_mrmw.c_ehca_reg_mr.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"hipz_alloc_mr failed, h_ret=%lli hca_hndl=%llx"
	.align 8
.LC1:
	.string	"h_ret=%lli shca=%p e_mr=%p iova_start=%p size=%llx acl=%x e_pd=%p lkey=%x pginfo=%p num_kpages=%llx num_hwpages=%llx ret=%i"
	.align 8
.LC2:
	.string	"internal error in ehca_reg_mr, not recoverable"
	.align 8
.LC3:
	.string	"ret=%i shca=%p e_mr=%p iova_start=%p size=%llx acl=%x e_pd=%p pginfo=%p num_kpages=%llx num_hwpages=%llx"
	.text
	.p2align 4
	.globl	ehca_reg_mr
	.type	ehca_reg_mr, @function
ehca_reg_mr:
.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	r14d, r8d
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rcx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	mov	edi, r8d
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rsi
	sub	rsp, 72
	.cfi_def_cfa_offset 128
	mov	rax, QWORD PTR 136[rsp]
	mov	QWORD PTR [rsp], r9
	lea	rsi, 40[rsp]
	mov	r15, QWORD PTR 128[rsp]
	mov	QWORD PTR 16[rsp], rax
	mov	rax, QWORD PTR 144[rsp]
	mov	QWORD PTR 24[rsp], rax
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	mov	QWORD PTR 8[rsp], rsi
	call	ehca_mrmw_map_acl@PLT
	mov	edi, DWORD PTR 8[r15]
	mov	rsi, QWORD PTR 8[rsp]
	call	ehca_mrmw_set_pgsize_hipz_acl@PLT
	cmp	DWORD PTR ehca_use_hp_mr[rip], 1
	mov	r8d, DWORD PTR 40[rsp]
	jne	.L3
	or	r8d, 1
	mov	DWORD PTR 40[rsp], r8d
.L3:
	sub	rsp, 8
	.cfi_def_cfa_offset 136
	mov	edi, DWORD PTR 4[rbp]
	mov	rdx, r12
	mov	rcx, r13
	lea	rax, 52[rsp]
	mov	rsi, rbx
	push	rax
	.cfi_def_cfa_offset 144
	mov	rax, QWORD PTR 16[rsp]
	mov	r9d, DWORD PTR [rax]
	call	hipz_h_alloc_resource_mr@PLT
	mov	r8, rax
	cmp	QWORD PTR H_SUCCESS[rip], r8
	pop	rax
	.cfi_def_cfa_offset 136
	pop	rdx
	.cfi_def_cfa_offset 128
	jne	.L15
	mov	eax, DWORD PTR 52[rsp]
	mov	DWORD PTR 36[rbx], eax
	mov	eax, DWORD PTR 152[rsp]
	cmp	DWORD PTR EHCA_REG_BUSMAP_MR[rip], eax
	je	.L16
	mov	r10d, DWORD PTR EINVAL[rip]
	mov	eax, DWORD PTR 152[rsp]
	neg	r10d
	cmp	DWORD PTR EHCA_REG_MR[rip], eax
	je	.L17
.L8:
	test	r10d, r10d
	jne	.L18
.L10:
	mov	eax, DWORD PTR 4[r15]
	mov	rdx, QWORD PTR 16[rsp]
	mov	rcx, QWORD PTR 24[rsp]
	mov	DWORD PTR 32[rbx], eax
	mov	eax, DWORD PTR [r15]
	mov	DWORD PTR 28[rbx], eax
	mov	eax, DWORD PTR 8[r15]
	mov	QWORD PTR [rbx], r12
	mov	DWORD PTR 24[rbx], eax
	mov	eax, DWORD PTR 44[rsp]
	mov	QWORD PTR 16[rbx], r13
	mov	DWORD PTR 8[rbx], r14d
	mov	DWORD PTR [rdx], eax
	mov	eax, DWORD PTR 48[rsp]
	mov	DWORD PTR [rcx], eax
.L1:
	mov	rax, QWORD PTR 56[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L19
	add	rsp, 72
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r10d
	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	ecx, DWORD PTR 4[rbp]
	mov	rdx, r8
	lea	rsi, .LC0[rip]
	mov	rdi, rbp
	xor	eax, eax
	mov	QWORD PTR 8[rsp], r8
	call	ehca_err@PLT
	mov	r8, QWORD PTR 8[rsp]
	mov	rdi, r8
	call	ehca2ib_return_code@PLT
	mov	r10d, eax
	test	eax, eax
	je	.L1
	.p2align 4,,10
	.p2align 3
.L5:
	mov	eax, DWORD PTR [r15]
	mov	edx, r10d
	mov	r9, r12
	mov	r8, rbx
	mov	rcx, rbp
	lea	rsi, .LC3[rip]
	mov	rdi, rbp
	push	rax
	.cfi_def_cfa_offset 136
	mov	eax, DWORD PTR 4[r15]
	push	rax
	.cfi_def_cfa_offset 144
	xor	eax, eax
	push	r15
	.cfi_def_cfa_offset 152
	push	QWORD PTR 24[rsp]
	.cfi_def_cfa_offset 160
	push	r14
	.cfi_def_cfa_offset 168
	push	r13
	.cfi_def_cfa_offset 176
	mov	DWORD PTR 48[rsp], r10d
	call	ehca_err@PLT
	add	rsp, 48
	.cfi_def_cfa_offset 128
	mov	r10d, DWORD PTR [rsp]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L17:
	mov	rdx, r15
	mov	rsi, rbx
	mov	rdi, rbp
	call	ehca_reg_mr_rpages@PLT
	mov	r10d, eax
	test	r10d, r10d
	je	.L10
	.p2align 4,,10
	.p2align 3
.L18:
	mov	edi, DWORD PTR 4[rbp]
	mov	rsi, rbx
	mov	DWORD PTR 8[rsp], r10d
	call	hipz_h_free_resource_mr@PLT
	cmp	QWORD PTR H_SUCCESS[rip], rax
	mov	r10d, DWORD PTR 8[rsp]
	mov	rdx, rax
	je	.L5
	push	r10
	.cfi_def_cfa_offset 136
	mov	eax, DWORD PTR [r15]
	mov	r9, r12
	mov	r8, rbx
	mov	rcx, rbp
	lea	rsi, .LC1[rip]
	mov	rdi, rbp
	mov	DWORD PTR 16[rsp], r10d
	push	rax
	.cfi_def_cfa_offset 144
	mov	eax, DWORD PTR 4[r15]
	push	rax
	.cfi_def_cfa_offset 152
	push	r15
	.cfi_def_cfa_offset 160
	mov	eax, DWORD PTR 76[rsp]
	push	rax
	.cfi_def_cfa_offset 168
	xor	eax, eax
	push	QWORD PTR 40[rsp]
	.cfi_def_cfa_offset 176
	push	r14
	.cfi_def_cfa_offset 184
	push	r13
	.cfi_def_cfa_offset 192
	call	ehca_err@PLT
	add	rsp, 64
	.cfi_def_cfa_offset 128
	mov	rdi, rbp
	xor	eax, eax
	lea	rsi, .LC2[rip]
	call	ehca_err@PLT
	mov	r10d, DWORD PTR 8[rsp]
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L16:
	mov	rdx, r15
	mov	rsi, rbx
	mov	rdi, rbp
	call	ehca_reg_bmap_mr_rpages@PLT
	mov	r10d, eax
	jmp	.L8
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	ehca_reg_mr, .-ehca_reg_mr
	.comm	ehca_use_hp_mr,4,4
	.comm	H_SUCCESS,8,8
	.comm	EINVAL,4,4
	.comm	EHCA_REG_MR,4,4
	.comm	EHCA_REG_BUSMAP_MR,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_ehca_mrmw.c_ehca_reg_mr.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"hipz_alloc_mr failed, h_ret=%lli hca_hndl=%llx\000"
	.align	2
.LC1:
	.ascii	"h_ret=%lli shca=%p e_mr=%p iova_start=%p size=%llx "
	.ascii	"acl=%x e_pd=%p lkey=%x pginfo=%p num_kpages=%llx nu"
	.ascii	"m_hwpages=%llx ret=%i\000"
	.align	2
.LC2:
	.ascii	"internal error in ehca_reg_mr, not recoverable\000"
	.align	2
.LC3:
	.ascii	"ret=%i shca=%p e_mr=%p iova_start=%p size=%llx acl="
	.ascii	"%x e_pd=%p pginfo=%p num_kpages=%llx num_hwpages=%l"
	.ascii	"lx\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	ehca_reg_mr
	.syntax unified
	.arm
	.fpu softvfp
	.type	ehca_reg_mr, %function
ehca_reg_mr:
	@ args = 24, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r7, r2
	mov	r5, r0
	mov	r4, r1
	mov	r8, r3
	ldr	r3, .L20
	sub	sp, sp, #76
	ldr	r3, [r3]
	str	r3, [sp, #68]
	mov	r3,#0
	ldr	r3, [sp, #124]
	ldr	r10, [sp, #112]
	ldr	r9, [sp, #120]
	str	r3, [sp, #40]
	ldr	r3, [sp, #128]
	add	r1, sp, #52
	mov	r0, r10
	str	r3, [sp, #44]
	ldr	fp, [sp, #116]
	bl	ehca_mrmw_map_acl
	add	r1, sp, #52
	ldr	r0, [r9, #8]
	bl	ehca_mrmw_set_pgsize_hipz_acl
	ldr	r3, .L20+4
	ldr	r1, [fp]
	ldr	r3, [r3]
	add	r2, sp, #56
	cmp	r3, #1
	ldr	r3, [sp, #52]
	stmib	sp, {r1, r2}
	orreq	r3, r3, #1
	str	r3, [sp]
	streq	r3, [sp, #52]
	mov	r1, r4
	mov	r3, r8
	mov	r2, r7
	ldr	r0, [r5, #4]
	bl	hipz_h_alloc_resource_mr
	ldr	r3, .L20+8
	mov	r6, r0
	ldr	r1, [r3]
	cmp	r1, r0
	bne	.L15
	ldr	r1, [sp, #64]
	ldr	r2, .L20+12
	str	r1, [r4, #24]
	ldr	r2, [r2]
	ldr	r1, [sp, #132]
	cmp	r2, r1
	beq	.L16
	ldr	r2, .L20+16
	ldr	r1, [sp, #132]
	ldr	r2, [r2]
	cmp	r2, r1
	beq	.L17
	ldr	r2, .L20+20
	ldr	r6, [r2]
	rsb	r6, r6, #0
.L8:
	cmp	r6, #0
	bne	.L18
.L10:
	ldr	r2, [r9, #4]
	ldr	r1, [r9, #8]
	ldr	r3, [r9]
	str	r2, [r4, #20]
	str	r1, [r4, #12]
	ldr	r2, [sp, #56]
	ldr	r1, [sp, #40]
	str	r3, [r4, #16]
	str	r7, [r4]
	str	r8, [r4, #8]
	str	r10, [r4, #4]
	ldr	r3, [sp, #60]
	str	r2, [r1]
	ldr	r2, [sp, #44]
	str	r3, [r2]
.L1:
	ldr	r3, .L20
	ldr	r2, [r3]
	ldr	r3, [sp, #68]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L19
	mov	r0, r6
	add	sp, sp, #76
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L15:
	mov	r2, r0
	ldr	r3, [r5, #4]
	ldr	r1, .L20+24
	mov	r0, r5
	bl	ehca_err
	mov	r0, r6
	bl	ehca2ib_return_code
	subs	r6, r0, #0
	beq	.L1
.L5:
	ldr	r2, [r9]
	str	r9, [sp, #20]
	ldr	r3, [r9, #4]
	mov	r0, r5
	str	r2, [sp, #28]
	str	r3, [sp, #24]
	mov	r2, r6
	mov	r3, r5
	stmib	sp, {r7, r8, r10, fp}
	ldr	r1, .L20+28
	str	r4, [sp]
	bl	ehca_err
	b	.L1
.L17:
	mov	r2, r9
	mov	r1, r4
	mov	r0, r5
	bl	ehca_reg_mr_rpages
	mov	r6, r0
	cmp	r6, #0
	beq	.L10
.L18:
	mov	r1, r4
	ldr	r0, [r5, #4]
	bl	hipz_h_free_resource_mr
	ldr	r3, .L20+8
	mov	r2, r0
	ldr	r3, [r3]
	cmp	r3, r0
	beq	.L5
	ldm	r9, {r0, r1}
	ldr	r3, [sp, #56]
	str	r0, [sp, #32]
	str	r1, [sp, #28]
	str	r3, [sp, #20]
	mov	r0, r5
	mov	r3, r5
	stmib	sp, {r7, r8, r10, fp}
	ldr	r1, .L20+32
	str	r6, [sp, #36]
	str	r9, [sp, #24]
	str	r4, [sp]
	bl	ehca_err
	mov	r0, r5
	ldr	r1, .L20+36
	bl	ehca_err
	b	.L5
.L16:
	mov	r2, r9
	mov	r1, r4
	mov	r0, r5
	bl	ehca_reg_bmap_mr_rpages
	mov	r6, r0
	b	.L8
.L19:
	bl	__stack_chk_fail
.L21:
	.align	2
.L20:
	.word	.LC4
	.word	ehca_use_hp_mr
	.word	H_SUCCESS
	.word	EHCA_REG_BUSMAP_MR
	.word	EHCA_REG_MR
	.word	EINVAL
	.word	.LC0
	.word	.LC3
	.word	.LC1
	.word	.LC2
	.size	ehca_reg_mr, .-ehca_reg_mr
	.comm	ehca_use_hp_mr,4,4
	.comm	H_SUCCESS,4,4
	.comm	EINVAL,4,4
	.comm	EHCA_REG_MR,4,4
	.comm	EHCA_REG_BUSMAP_MR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
