	.file	"extr_ehca_mrmw.c_ehca_mr_chk_buf_and_calc_size.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"bad phys buf array len, num_phys_buf=0"
	.align 8
.LC1:
	.string	"iova_start/addr mismatch, iova_start=%p pbuf->addr=%llx pbuf->size=%llx"
	.align 8
.LC2:
	.string	"addr/size mismatch in 1st buf, pbuf->addr=%llx pbuf->size=%llx"
	.align 8
.LC3:
	.string	"bad address, i=%x pbuf->addr=%llx pbuf->size=%llx"
	.align 8
.LC4:
	.string	"bad size, i=%x pbuf->size=%llx"
	.text
	.p2align 4
	.globl	ehca_mr_chk_buf_and_calc_size
	.type	ehca_mr_chk_buf_and_calc_size, @function
ehca_mr_chk_buf_and_calc_size:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	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, 8
	.cfi_def_cfa_offset 48
	test	esi, esi
	je	.L23
	mov	r9d, DWORD PTR [rdi]
	mov	r12d, DWORD PTR PAGE_MASK[rip]
	mov	r13, rcx
	mov	r8, rdx
	mov	ecx, DWORD PTR 4[rdi]
	mov	eax, r9d
	not	r12d
	xor	eax, edx
	and	r12d, eax
	jne	.L24
	lea	eax, [r9+rcx]
	mov	r8d, DWORD PTR PAGE_SIZE[rip]
	cdq
	idiv	r8d
	test	edx, edx
	je	.L14
	cmp	esi, 1
	jg	.L5
.L14:
	test	esi, esi
	jle	.L13
	lea	ebp, -1[rsi]
	xor	r9d, r9d
	xor	esi, esi
	mov	rbx, rbp
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L12:
	add	r9d, ecx
	lea	rax, 1[rsi]
	cmp	rbp, rsi
	je	.L7
	mov	ecx, DWORD PTR 4[rdi+rax*8]
	mov	rsi, rax
.L8:
	mov	r11d, esi
	test	rsi, rsi
	je	.L9
	mov	r10d, DWORD PTR [rdi+rsi*8]
	mov	eax, r10d
	cdq
	idiv	r8d
	test	edx, edx
	jne	.L25
	cmp	ebx, esi
	jle	.L9
	mov	eax, ecx
	cdq
	idiv	r8d
	test	edx, edx
	jne	.L11
.L9:
	test	ecx, ecx
	jne	.L12
.L11:
	mov	edx, ecx
	mov	esi, r11d
	lea	rdi, .LC4[rip]
	xor	eax, eax
	call	ehca_gen_err@PLT
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	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
.L23:
	.cfi_restore_state
	lea	rdi, .LC0[rip]
	xor	eax, eax
	call	ehca_gen_err@PLT
	mov	r12d, DWORD PTR EINVAL[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	neg	r12d
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	mov	edx, ecx
	mov	esi, r9d
	lea	rdi, .LC2[rip]
	xor	eax, eax
	call	ehca_gen_err@PLT
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
	jmp	.L1
.L13:
	xor	r9d, r9d
.L7:
	mov	DWORD PTR 0[r13], r9d
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	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
.L24:
	.cfi_restore_state
	mov	edx, r9d
	mov	rsi, r8
	lea	rdi, .LC1[rip]
	xor	eax, eax
	call	ehca_gen_err@PLT
	mov	r12d, DWORD PTR EINVAL[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	neg	r12d
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L25:
	.cfi_restore_state
	mov	edx, r10d
	lea	rdi, .LC3[rip]
	xor	eax, eax
	call	ehca_gen_err@PLT
	mov	r12d, DWORD PTR EINVAL[rip]
	add	rsp, 8
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	neg	r12d
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	ehca_mr_chk_buf_and_calc_size, .-ehca_mr_chk_buf_and_calc_size
	.comm	PAGE_SIZE,4,4
	.comm	PAGE_MASK,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_ehca_mrmw.c_ehca_mr_chk_buf_and_calc_size.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"bad phys buf array len, num_phys_buf=0\000"
	.align	2
.LC1:
	.ascii	"iova_start/addr mismatch, iova_start=%p pbuf->addr="
	.ascii	"%llx pbuf->size=%llx\000"
	.global	__aeabi_idivmod
	.align	2
.LC2:
	.ascii	"addr/size mismatch in 1st buf, pbuf->addr=%llx pbuf"
	.ascii	"->size=%llx\000"
	.align	2
.LC3:
	.ascii	"bad address, i=%x pbuf->addr=%llx pbuf->size=%llx\000"
	.align	2
.LC4:
	.ascii	"bad size, i=%x pbuf->size=%llx\000"
	.text
	.align	2
	.global	ehca_mr_chk_buf_and_calc_size
	.syntax unified
	.arm
	.fpu softvfp
	.type	ehca_mr_chk_buf_and_calc_size, %function
ehca_mr_chk_buf_and_calc_size:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	subs	r6, r1, #0
	sub	sp, sp, #20
	str	r3, [sp, #12]
	beq	.L19
	ldr	r3, .L22
	ldr	r4, [r0]
	ldr	r3, [r3]
	eor	r9, r2, r4
	bics	r3, r9, r3
	mov	r7, r0
	mov	r1, r2
	ldr	fp, [r0, #4]
	str	r3, [sp, #8]
	bne	.L20
	ldr	r2, .L22+4
	add	r0, r4, fp
	ldr	r8, [r2]
	mov	r1, r8
	bl	__aeabi_idivmod
	cmp	r1, #0
	cmpne	r6, #1
	bgt	.L5
	cmp	r6, #0
	ldr	r5, [sp, #8]
	subgt	r3, r6, #1
	movgt	r4, r5
	addgt	r10, r7, #4
	strgt	r3, [sp, #4]
	ble	.L7
.L6:
	cmp	fp, #0
	beq	.L9
	add	r4, r4, #1
	cmp	r6, r4
	add	r5, r5, fp
	beq	.L7
	ldr	r9, [r7, r4, lsl #3]
	mov	r1, r8
	mov	r0, r9
	bl	__aeabi_idivmod
	cmp	r1, #0
	ldr	fp, [r10, r4, lsl #3]
	bne	.L21
	ldr	r3, [sp, #4]
	cmp	r3, r4
	ble	.L6
	mov	r1, r8
	mov	r0, fp
	bl	__aeabi_idivmod
	cmp	r1, #0
	beq	.L6
.L9:
	mov	r2, fp
	mov	r1, r4
	ldr	r0, .L22+8
.L17:
	bl	ehca_gen_err
	ldr	r3, .L22+12
	ldr	r9, [r3]
	rsb	r3, r9, #0
	str	r3, [sp, #8]
	ldr	r0, [sp, #8]
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L19:
	ldr	r0, .L22+16
	bl	ehca_gen_err
	ldr	r3, .L22+12
	ldr	r9, [r3]
	rsb	r3, r9, #0
	str	r3, [sp, #8]
	ldr	r0, [sp, #8]
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L7:
	ldr	r3, [sp, #12]
	ldr	r0, [sp, #8]
	str	r5, [r3]
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L20:
	mov	r3, fp
	mov	r2, r4
	ldr	r0, .L22+20
.L16:
	bl	ehca_gen_err
	ldr	r3, .L22+12
	ldr	r9, [r3]
	rsb	r3, r9, #0
	str	r3, [sp, #8]
	ldr	r0, [sp, #8]
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L21:
	mov	r3, fp
	mov	r2, r9
	mov	r1, r4
	ldr	r0, .L22+24
	b	.L16
.L5:
	mov	r2, fp
	mov	r1, r4
	ldr	r0, .L22+28
	b	.L17
.L23:
	.align	2
.L22:
	.word	PAGE_MASK
	.word	PAGE_SIZE
	.word	.LC4
	.word	EINVAL
	.word	.LC0
	.word	.LC1
	.word	.LC3
	.word	.LC2
	.size	ehca_mr_chk_buf_and_calc_size, .-ehca_mr_chk_buf_and_calc_size
	.comm	PAGE_SIZE,4,4
	.comm	PAGE_MASK,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
