	.file	"extr_resource_tracker.c_mlx4_QP_ATTACH_wrapper.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Fail to attach rule to qp 0x%x\n"
	.align 8
.LC1:
	.string	"Fail to detach rule from qp 0x%x reg_id = 0x%llx\n"
	.text
	.p2align 4
	.globl	mlx4_QP_ATTACH_wrapper
	.type	mlx4_QP_ATTACH_wrapper, @function
mlx4_QP_ATTACH_wrapper:
.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
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, esi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	r11d, DWORD PTR [rdx]
	mov	r15, QWORD PTR [rcx]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	mov	ecx, DWORD PTR RES_QP[rip]
	mov	eax, DWORD PTR 4[rdx]
	lea	r8, 32[rsp]
	mov	r14d, r11d
	mov	DWORD PTR 28[rsp], 0
	mov	ebx, DWORD PTR 28[r15]
	and	r14d, 16777215
	mov	DWORD PTR 4[rsp], eax
	mov	edx, r14d
	mov	DWORD PTR 8[rsp], r11d
	call	get_res@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L1
	mov	r11d, DWORD PTR 8[rsp]
	mov	r9d, DWORD PTR 4[rsp]
	sar	ebx
	mov	DWORD PTR 24[rsp], r14d
	and	ebx, 1
	mov	r10d, r11d
	sar	r10d, 28
	and	r10d, 7
	test	r9d, r9d
	je	.L3
	lea	rdx, 24[rsp]
	lea	rax, 28[rsp]
	mov	r8d, r11d
	mov	r9d, r10d
	mov	QWORD PTR 8[rsp], rdx
	sar	r8d, 31
	mov	rdi, rbp
	mov	rcx, r15
	push	rax
	.cfi_def_cfa_offset 120
	mov	esi, r13d
	push	rbx
	.cfi_def_cfa_offset 128
	mov	DWORD PTR 20[rsp], r10d
	call	qp_attach@PLT
	pop	rdi
	.cfi_def_cfa_offset 120
	pop	r8
	.cfi_def_cfa_offset 112
	test	eax, eax
	mov	r10d, DWORD PTR 4[rsp]
	mov	r12d, eax
	jne	.L16
	sub	rsp, 8
	.cfi_def_cfa_offset 120
	mov	r8d, r10d
	mov	rcx, r15
	mov	esi, r13d
	mov	eax, DWORD PTR 36[rsp]
	mov	r9d, ebx
	mov	rdi, rbp
	push	rax
	.cfi_def_cfa_offset 128
	mov	rdx, QWORD PTR 48[rsp]
	mov	DWORD PTR 20[rsp], r10d
	call	add_mcg_res@PLT
	pop	rcx
	.cfi_def_cfa_offset 120
	pop	rsi
	.cfi_def_cfa_offset 112
	test	eax, eax
	mov	r10d, DWORD PTR 4[rsp]
	mov	r12d, eax
	jne	.L17
.L5:
	mov	ecx, DWORD PTR RES_QP[rip]
	mov	edx, r14d
	mov	esi, r13d
	mov	rdi, rbp
	call	put_res@PLT
.L1:
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L18
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	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	ecx, r10d
	mov	rdx, r15
	mov	esi, r13d
	mov	rdi, rbp
	mov	DWORD PTR 4[rsp], r10d
	call	mlx4_adjust_port@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L5
	sub	rsp, 8
	.cfi_def_cfa_offset 120
	mov	r9d, ebx
	mov	rcx, r15
	mov	esi, r13d
	lea	rax, 36[rsp]
	mov	rdi, rbp
	push	rax
	.cfi_def_cfa_offset 128
	mov	r10d, DWORD PTR 20[rsp]
	mov	rdx, QWORD PTR 48[rsp]
	mov	r8d, r10d
	call	rem_mcg_res@PLT
	mov	r12d, eax
	pop	rax
	.cfi_def_cfa_offset 120
	pop	rdx
	.cfi_def_cfa_offset 112
	test	r12d, r12d
	jne	.L5
	mov	r10d, DWORD PTR 4[rsp]
	mov	r9d, DWORD PTR 28[rsp]
	mov	r8d, ebx
	mov	rdx, r15
	lea	rsi, 24[rsp]
	mov	rdi, rbp
	mov	ecx, r10d
	call	qp_detach@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L5
	mov	edx, DWORD PTR 28[rsp]
	mov	esi, r14d
	lea	rdi, .LC1[rip]
	xor	eax, eax
	call	pr_err@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L16:
	mov	esi, r14d
	lea	rdi, .LC0[rip]
	xor	eax, eax
	call	pr_err@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L17:
	mov	r9d, DWORD PTR 28[rsp]
	mov	rsi, QWORD PTR 8[rsp]
	mov	r8d, ebx
	mov	ecx, r10d
	mov	rdx, r15
	mov	rdi, rbp
	call	qp_detach@PLT
	jmp	.L5
.L18:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	mlx4_QP_ATTACH_wrapper, .-mlx4_QP_ATTACH_wrapper
	.comm	RES_QP,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_resource_tracker.c_mlx4_QP_ATTACH_wrapper.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Fail to attach rule to qp 0x%x\012\000"
	.align	2
.LC1:
	.ascii	"Fail to detach rule from qp 0x%x reg_id = 0x%llx\012"
	.ascii	"\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	mlx4_QP_ATTACH_wrapper
	.syntax unified
	.arm
	.fpu softvfp
	.type	mlx4_QP_ATTACH_wrapper, %function
mlx4_QP_ATTACH_wrapper:
	@ args = 8, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	ip, r2
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	lr, #0
	sub	sp, sp, #44
	ldr	r9, [r3]
	ldr	r7, [r2]
	add	r3, sp, #28
	ldr	r10, [r9, #28]
	ldr	fp, .L19
	str	r3, [sp]
	ldr	r4, .L19+4
	ldr	ip, [ip, #4]
	bic	r8, r7, #-16777216
	mov	r2, r8
	ldr	r3, [fp]
	ldr	r4, [r4]
	str	r4, [sp, #36]
	mov	r4,#0
	mov	r5, r0
	mov	r6, r1
	str	ip, [sp, #20]
	str	lr, [sp, #32]
	bl	get_res
	subs	r4, r0, #0
	bne	.L1
	ldr	ip, [sp, #20]
	asr	r3, r10, #1
	and	r2, r3, #1
	asr	r10, r7, #28
	cmp	ip, #0
	str	r2, [sp, #20]
	str	r8, [sp, #24]
	and	r10, r10, #7
	beq	.L3
	add	r3, sp, #32
	asr	r7, r7, #31
	str	r2, [sp, #8]
	str	r3, [sp, #12]
	mov	r1, r6
	mov	r3, r9
	mov	r0, r5
	str	r7, [sp]
	str	r10, [sp, #4]
	add	r2, sp, #24
	bl	qp_attach
	subs	r4, r0, #0
	bne	.L16
	ldr	r3, [sp, #32]
	ldr	r2, [sp, #20]
	str	r3, [sp, #8]
	str	r2, [sp, #4]
	mov	r3, r9
	mov	r1, r6
	mov	r0, r5
	ldr	r2, [sp, #28]
	str	r10, [sp]
	bl	add_mcg_res
	subs	r4, r0, #0
	bne	.L17
.L5:
	mov	r2, r8
	mov	r1, r6
	mov	r0, r5
	ldr	r3, [fp]
	bl	put_res
.L1:
	ldr	r3, .L19+4
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L18
	mov	r0, r4
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L3:
	mov	r3, r10
	mov	r2, r9
	mov	r1, r6
	mov	r0, r5
	bl	mlx4_adjust_port
	subs	r4, r0, #0
	bne	.L5
	ldr	r7, [sp, #20]
	add	r3, sp, #32
	str	r3, [sp, #8]
	mov	r1, r6
	mov	r3, r9
	mov	r0, r5
	ldr	r2, [sp, #28]
	str	r7, [sp, #4]
	str	r10, [sp]
	bl	rem_mcg_res
	subs	r4, r0, #0
	bne	.L5
	ldr	r1, [sp, #32]
	mov	r3, r10
	str	r1, [sp, #4]
	mov	r2, r9
	mov	r0, r5
	str	r7, [sp]
	add	r1, sp, #24
	bl	qp_detach
	subs	r4, r0, #0
	beq	.L5
	mov	r1, r8
	ldr	r2, [sp, #32]
	ldr	r0, .L19+8
	bl	pr_err
	b	.L5
.L16:
	mov	r1, r8
	ldr	r0, .L19+12
	bl	pr_err
	b	.L5
.L17:
	ldr	r0, [sp, #32]
	ldr	r3, [sp, #20]
	str	r0, [sp, #4]
	str	r3, [sp]
	mov	r2, r9
	mov	r3, r10
	mov	r0, r5
	add	r1, sp, #24
	bl	qp_detach
	b	.L5
.L18:
	bl	__stack_chk_fail
.L20:
	.align	2
.L19:
	.word	RES_QP
	.word	.LC2
	.word	.LC1
	.word	.LC0
	.size	mlx4_QP_ATTACH_wrapper, .-mlx4_QP_ATTACH_wrapper
	.comm	RES_QP,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
