	.file	"extr_resource_tracker.c_mlx4_do_mirror_rule.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"rule mirroring mailbox is null\n"
	.text
	.p2align 4
	.type	mlx4_do_mirror_rule, @function
mlx4_do_mirror_rule:
.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
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rsi
	sub	rsp, 40
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	call	mlx4_alloc_cmd_mailbox@PLT
	mov	rdi, rax
	mov	r13, rax
	call	IS_ERR@PLT
	test	rax, rax
	jne	.L10
	mov	rsi, QWORD PTR 8[rbx]
	test	rsi, rsi
	je	.L11
	mov	edi, DWORD PTR 4[r13]
	mov	edx, DWORD PTR [rbx]
	call	memcpy@PLT
	mov	eax, DWORD PTR MLX4_CMD_NATIVE[rip]
	mov	ecx, DWORD PTR [rbx]
	xor	r8d, r8d
	lea	rdx, 16[rsp]
	mov	r9d, DWORD PTR MLX4_QP_FLOW_STEERING_ATTACH[rip]
	mov	rdi, rbp
	push	rax
	.cfi_def_cfa_offset 88
	mov	eax, DWORD PTR MLX4_CMD_TIME_CLASS_A[rip]
	sar	ecx, 2
	push	rax
	.cfi_def_cfa_offset 96
	mov	esi, DWORD PTR 0[r13]
	call	mlx4_cmd_imm@PLT
	mov	rsi, r13
	mov	rdi, rbp
	mov	r12d, eax
	call	mlx4_free_cmd_mailbox@PLT
	pop	rcx
	.cfi_def_cfa_offset 88
	pop	rsi
	.cfi_def_cfa_offset 80
	test	r12d, r12d
	je	.L12
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L13
	add	rsp, 40
	.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
.L12:
	.cfi_restore_state
	mov	esi, DWORD PTR 4[rbx]
	mov	r9d, DWORD PTR 24[rbx]
	mov	ecx, 1
	mov	rdi, rbp
	mov	r8d, DWORD PTR RES_FS_RULE[rip]
	mov	rdx, QWORD PTR 16[rsp]
	call	add_res_range@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L14
.L5:
	mov	eax, DWORD PTR MLX4_CMD_NATIVE[rip]
	sub	rsp, 8
	.cfi_def_cfa_offset 88
	xor	edx, edx
	xor	ecx, ecx
	mov	r9d, DWORD PTR MLX4_CMD_TIME_CLASS_A[rip]
	mov	r8d, DWORD PTR MLX4_QP_FLOW_STEERING_DETACH[rip]
	mov	rdi, rbp
	push	rax
	.cfi_def_cfa_offset 96
	mov	rsi, QWORD PTR 32[rsp]
	call	mlx4_cmd@PLT
	pop	rax
	.cfi_def_cfa_offset 88
	pop	rdx
	.cfi_def_cfa_offset 80
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rdi, r13
	call	PTR_ERR@PLT
	mov	r12d, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L14:
	mov	esi, DWORD PTR 4[rbx]
	mov	rdx, QWORD PTR 16[rsp]
	lea	r8, 8[rsp]
	mov	rdi, rbp
	mov	ecx, DWORD PTR RES_FS_RULE[rip]
	call	get_res@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L15
	mov	rax, QWORD PTR 8[rsp]
	mov	rdx, QWORD PTR 16[rsp]
	mov	rdi, rbp
	mov	esi, DWORD PTR 4[rbx]
	mov	ecx, DWORD PTR RES_FS_RULE[rip]
	mov	QWORD PTR 16[rbx], rdx
	mov	QWORD PTR 16[rax], 0
	mov	DWORD PTR [rax], 0
	mov	QWORD PTR 8[rax], 0
	call	put_res@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L11:
	lea	rsi, .LC0[rip]
	mov	rdi, rbp
	call	mlx4_err@PLT
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L15:
	mov	esi, DWORD PTR 4[rbx]
	mov	r8d, DWORD PTR RES_FS_RULE[rip]
	xor	r9d, r9d
	mov	rdi, rbp
	mov	rdx, QWORD PTR 16[rsp]
	mov	ecx, 1
	call	rem_res_range@PLT
	jmp	.L5
.L13:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	mlx4_do_mirror_rule, .-mlx4_do_mirror_rule
	.comm	RES_FS_RULE,4,4
	.comm	MLX4_QP_FLOW_STEERING_DETACH,4,4
	.comm	MLX4_QP_FLOW_STEERING_ATTACH,4,4
	.comm	MLX4_CMD_TIME_CLASS_A,4,4
	.comm	MLX4_CMD_NATIVE,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_resource_tracker.c_mlx4_do_mirror_rule.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"rule mirroring mailbox is null\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mlx4_do_mirror_rule, %function
mlx4_do_mirror_rule:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r3, .L16
	sub	sp, sp, #32
	mov	r5, r1
	ldr	r3, [r3]
	str	r3, [sp, #28]
	mov	r3,#0
	mov	r6, r0
	bl	mlx4_alloc_cmd_mailbox
	mov	r7, r0
	bl	IS_ERR
	subs	r8, r0, #0
	bne	.L10
	ldr	r1, [r5, #8]
	cmp	r1, #0
	beq	.L11
	ldr	r2, [r5]
	ldr	r0, [r7, #4]
	bl	memcpy
	ldr	r10, .L16+4
	ldr	r3, .L16+8
	ldr	r9, .L16+12
	ldr	r2, [r3]
	ldr	ip, [r10]
	ldr	r3, [r5]
	ldr	r0, [r9]
	ldr	r1, [r7]
	asr	r3, r3, #2
	str	ip, [sp, #12]
	str	r0, [sp, #8]
	str	r2, [sp, #4]
	mov	r0, r6
	add	r2, sp, #24
	str	r8, [sp]
	bl	mlx4_cmd_imm
	mov	r4, r0
	mov	r1, r7
	mov	r0, r6
	bl	mlx4_free_cmd_mailbox
	cmp	r4, #0
	beq	.L12
.L1:
	ldr	r3, .L16
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L13
	mov	r0, r4
	add	sp, sp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L12:
	ldr	r7, .L16+16
	ldr	r2, [r5, #16]
	ldr	r3, [r7]
	str	r2, [sp, #4]
	str	r3, [sp]
	mov	r0, r6
	mov	r3, #1
	ldr	r2, [sp, #24]
	ldr	r1, [r5, #4]
	bl	add_res_range
	subs	r4, r0, #0
	beq	.L14
.L5:
	mov	r3, #0
	ldr	r2, .L16+20
	ldr	r0, [r10]
	ldr	r2, [r2]
	ldr	r1, [r9]
	str	r0, [sp, #8]
	str	r1, [sp, #4]
	str	r2, [sp]
	mov	r0, r6
	mov	r2, r3
	ldr	r1, [sp, #24]
	bl	mlx4_cmd
	b	.L1
.L10:
	mov	r0, r7
	bl	PTR_ERR
	mov	r4, r0
	b	.L1
.L14:
	add	r3, sp, #20
	str	r3, [sp]
	mov	r0, r6
	ldr	r3, [r7]
	ldr	r2, [sp, #24]
	ldr	r1, [r5, #4]
	bl	get_res
	subs	r4, r0, #0
	bne	.L15
	ldr	ip, [sp, #20]
	ldr	r2, [sp, #24]
	ldr	r1, [r5, #4]
	str	r2, [r5, #12]
	ldr	r3, [r7]
	mov	r0, r6
	str	r4, [ip, #12]
	str	r4, [ip]
	str	r4, [ip, #8]
	bl	put_res
	b	.L1
.L11:
	mov	r0, r6
	ldr	r1, .L16+24
	bl	mlx4_err
	ldr	r3, .L16+28
	ldr	r0, [r3]
	rsb	r4, r0, #0
	b	.L1
.L15:
	ldr	r3, [r7]
	mov	r0, r6
	stm	sp, {r3, r8}
	ldr	r2, [sp, #24]
	mov	r3, #1
	ldr	r1, [r5, #4]
	bl	rem_res_range
	b	.L5
.L13:
	bl	__stack_chk_fail
.L17:
	.align	2
.L16:
	.word	.LC1
	.word	MLX4_CMD_NATIVE
	.word	MLX4_QP_FLOW_STEERING_ATTACH
	.word	MLX4_CMD_TIME_CLASS_A
	.word	RES_FS_RULE
	.word	MLX4_QP_FLOW_STEERING_DETACH
	.word	.LC0
	.word	EINVAL
	.size	mlx4_do_mirror_rule, .-mlx4_do_mirror_rule
	.comm	RES_FS_RULE,4,4
	.comm	MLX4_QP_FLOW_STEERING_DETACH,4,4
	.comm	MLX4_QP_FLOW_STEERING_ATTACH,4,4
	.comm	MLX4_CMD_TIME_CLASS_A,4,4
	.comm	MLX4_CMD_NATIVE,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
