	.file	"extr_qp.c_set_reg_mkey_seg.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	set_reg_mkey_seg, @function
set_reg_mkey_seg:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14d, ecx
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12d, edx
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rdi
	movsx	rdi, DWORD PTR 24[rsi]
	add	rdi, QWORD PTR 16[rsi]
	mov	esi, 8
	call	ALIGN@PLT
	xor	esi, esi
	mov	edx, 56
	mov	rdi, rbx
	sar	eax
	mov	r13d, eax
	call	memset@PLT
	mov	eax, DWORD PTR 0[rbp]
	cmp	eax, DWORD PTR MLX5_MKC_ACCESS_MODE_MTT[rip]
	je	.L6
	cmp	eax, DWORD PTR MLX5_MKC_ACCESS_MODE_KLMS[rip]
	jne	.L3
	add	r13d, r13d
.L3:
	mov	edi, r14d
	call	get_umr_flags@PLT
	or	eax, DWORD PTR 0[rbp]
	mov	edi, r12d
	mov	DWORD PTR [rbx], eax
	or	edi, -256
	call	cpu_to_be32@PLT
	mov	edi, DWORD PTR MLX5_MKEY_REMOTE_INVAL[rip]
	mov	QWORD PTR 40[rbx], rax
	call	cpu_to_be32@PLT
	mov	edi, DWORD PTR 8[rbp]
	mov	QWORD PTR 32[rbx], rax
	call	cpu_to_be64@PLT
	mov	edi, DWORD PTR 4[rbp]
	mov	QWORD PTR 24[rbx], rax
	call	cpu_to_be64@PLT
	mov	edi, r13d
	mov	QWORD PTR 16[rbx], rax
	call	cpu_to_be32@PLT
	mov	QWORD PTR 8[rbx], rax
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	mov	edi, DWORD PTR 12[rbp]
	call	ilog2@PLT
	mov	DWORD PTR 48[rbx], eax
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	set_reg_mkey_seg, .-set_reg_mkey_seg
	.comm	MLX5_MKEY_REMOTE_INVAL,4,4
	.comm	MLX5_MKC_ACCESS_MODE_MTT,4,4
	.comm	MLX5_MKC_ACCESS_MODE_KLMS,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_qp.c_set_reg_mkey_seg.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	set_reg_mkey_seg, %function
set_reg_mkey_seg:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	ip, [r1, #20]
	mov	r5, r1
	ldr	r1, [r1, #16]
	mov	r4, r0
	add	r0, ip, r1
	mov	r1, #8
	mov	r8, r3
	mov	r7, r2
	bl	ALIGN
	mov	r6, r0
	mov	r2, #28
	mov	r0, r4
	mov	r1, #0
	bl	memset
	ldr	r2, .L7
	ldr	r3, [r5]
	ldr	r2, [r2]
	asr	r6, r6, #1
	cmp	r3, r2
	beq	.L6
	ldr	r2, .L7+4
	ldr	r2, [r2]
	cmp	r3, r2
	lsleq	r6, r6, #1
.L3:
	mov	r0, r8
	bl	get_umr_flags
	mov	r2, r0
	mvn	r0, r7, lsl #24
	ldr	r3, [r5]
	mvn	r0, r0, lsr #24
	orr	r3, r3, r2
	str	r3, [r4]
	bl	cpu_to_be32
	ldr	r3, .L7+8
	str	r0, [r4, #20]
	ldr	r0, [r3]
	bl	cpu_to_be32
	mov	r3, r0
	ldr	r0, [r5, #8]
	str	r3, [r4, #16]
	bl	cpu_to_be64
	mov	r3, r0
	ldr	r0, [r5, #4]
	str	r3, [r4, #12]
	bl	cpu_to_be64
	mov	r3, r0
	mov	r0, r6
	str	r3, [r4, #8]
	bl	cpu_to_be32
	str	r0, [r4, #4]
	pop	{r4, r5, r6, r7, r8, pc}
.L6:
	ldr	r0, [r5, #12]
	bl	ilog2
	str	r0, [r4, #24]
	b	.L3
.L8:
	.align	2
.L7:
	.word	MLX5_MKC_ACCESS_MODE_MTT
	.word	MLX5_MKC_ACCESS_MODE_KLMS
	.word	MLX5_MKEY_REMOTE_INVAL
	.size	set_reg_mkey_seg, .-set_reg_mkey_seg
	.comm	MLX5_MKEY_REMOTE_INVAL,4,4
	.comm	MLX5_MKC_ACCESS_MODE_MTT,4,4
	.comm	MLX5_MKC_ACCESS_MODE_KLMS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
