	.file	"extr_megaraid_sas_fusion.c_megasas_refire_mgmt_cmd.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	megasas_refire_mgmt_cmd, @function
megasas_refire_mgmt_cmd:
.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
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	r12, QWORD PTR 24[rdi]
	mov	ebx, DWORD PTR [rdi]
	cmp	ebx, DWORD PTR 4[rdi]
	jge	.L1
	movsx	rbp, ebx
	mov	r13, rdi
	sal	rbp, 3
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L21:
	cmp	eax, 130
	je	.L20
.L7:
	mov	rsi, r15
	mov	rdi, r13
	call	megasas_fire_cmd_fusion@PLT
.L3:
	add	ebx, 1
	add	rbp, 8
	cmp	DWORD PTR 4[r13], ebx
	jle	.L1
.L12:
	mov	rax, QWORD PTR [r12]
	mov	rax, QWORD PTR [rax+rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR 16[r13]
	mov	r14, QWORD PTR [rax+rdx*8]
	mov	edi, DWORD PTR 16[r14]
	call	le16_to_cpu@PLT
	test	rax, rax
	je	.L3
	lea	rsi, -1[rax]
	mov	rdi, r13
	call	megasas_get_request_descriptor@PLT
	mov	rdx, QWORD PTR 8[r14]
	mov	r15, rax
	mov	eax, DWORD PTR [rdx]
	cmp	eax, 131
	je	.L4
	cmp	eax, 132
	jne	.L21
	mov	edi, DWORD PTR 20[rdx]
	call	le32_to_cpu@PLT
	cmp	DWORD PTR MR_DCMD_CTRL_SHUTDOWN[rip], eax
	je	.L22
	cmp	DWORD PTR MR_DCMD_LD_MAP_GET_INFO[rip], eax
	je	.L10
	cmp	DWORD PTR MR_DCMD_SYSTEM_PD_MAP_GET_INFO[rip], eax
	je	.L10
	mov	eax, DWORD PTR [r14]
	test	DWORD PTR DRV_DCMD_SKIP_REFIRE[rip], eax
	je	.L7
.L10:
	mov	rsi, r14
	mov	rdi, r13
	add	ebx, 1
	add	rbp, 8
	call	megasas_return_cmd@PLT
	cmp	DWORD PTR 4[r13], ebx
	jg	.L12
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L4:
	.cfi_restore_state
	mov	ecx, DWORD PTR 12[r13]
	test	ecx, ecx
	jne	.L7
.L18:
	mov	rax, QWORD PTR MFI_STAT_INVALID_CMD[rip]
	mov	QWORD PTR 8[rdx], rax
.L9:
	mov	edx, DWORD PTR DID_OK[rip]
	mov	rsi, r14
	mov	rdi, r13
	call	megasas_complete_cmd@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L20:
	mov	eax, DWORD PTR 8[r13]
	test	eax, eax
	jne	.L7
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L22:
	mov	rax, QWORD PTR 8[r14]
	mov	edx, DWORD PTR MFI_STAT_OK[rip]
	mov	DWORD PTR 16[rax], edx
	jmp	.L9
	.cfi_endproc
.LFE0:
	.size	megasas_refire_mgmt_cmd, .-megasas_refire_mgmt_cmd
	.comm	MR_DCMD_SYSTEM_PD_MAP_GET_INFO,4,4
	.comm	MR_DCMD_LD_MAP_GET_INFO,4,4
	.comm	MR_DCMD_CTRL_SHUTDOWN,4,4
	.comm	MFI_STAT_OK,4,4
	.comm	MFI_STAT_INVALID_CMD,8,8
	.comm	DRV_DCMD_SKIP_REFIRE,4,4
	.comm	DID_OK,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_megaraid_sas_fusion.c_megasas_refire_mgmt_cmd.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	megasas_refire_mgmt_cmd, %function
megasas_refire_mgmt_cmd:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r2, [r0, #4]
	ldr	r4, [r0]
	ldr	r6, [r0, #20]
	cmp	r4, r2
	sub	sp, sp, #12
	bge	.L1
	mov	fp, r0
	ldr	r7, .L23
	ldr	r9, .L23+4
	ldr	r8, .L23+8
	ldr	r10, .L23+12
	b	.L12
.L21:
	cmp	r2, #130
	beq	.L20
.L7:
	mov	r0, fp
	bl	megasas_fire_cmd_fusion
.L3:
	ldr	r2, [fp, #4]
	add	r4, r4, #1
	cmp	r2, r4
	ble	.L1
.L12:
	ldr	r1, [r6]
	ldr	r2, [fp, #16]
	ldr	r1, [r1, r4, lsl #2]
	ldr	r1, [r1]
	ldr	r5, [r2, r1, lsl #2]
	ldr	r0, [r5, #8]
	bl	le16_to_cpu
	cmp	r0, #0
	beq	.L3
	sub	r1, r0, #1
	mov	r0, fp
	bl	megasas_get_request_descriptor
	ldr	ip, [r5, #4]
	mov	r1, r0
	ldr	r2, [ip]
	cmp	r2, #131
	beq	.L4
	cmp	r2, #132
	bne	.L21
	str	r0, [sp, #4]
	ldr	r0, [ip, #12]
	bl	le32_to_cpu
	ldr	r2, [r8]
	ldr	r1, [sp, #4]
	cmp	r2, r0
	beq	.L22
	ldr	r2, [r10]
	cmp	r2, r0
	beq	.L10
	ldr	r3, .L23+16
	ldr	r2, [r3]
	cmp	r2, r0
	beq	.L10
	ldr	r3, .L23+20
	ldr	r0, [r5]
	ldr	r2, [r3]
	tst	r0, r2
	beq	.L7
.L10:
	mov	r1, r5
	mov	r0, fp
	bl	megasas_return_cmd
	ldr	r2, [fp, #4]
	add	r4, r4, #1
	cmp	r2, r4
	bgt	.L12
.L1:
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L4:
	ldr	r2, [fp, #12]
	cmp	r2, #0
	bne	.L7
.L18:
	ldr	r2, [r9]
	str	r2, [ip, #4]
.L9:
	mov	r1, r5
	mov	r0, fp
	ldr	r2, [r7]
	bl	megasas_complete_cmd
	b	.L3
.L20:
	ldr	r2, [fp, #8]
	cmp	r2, #0
	bne	.L7
	b	.L18
.L22:
	ldr	r1, .L23+24
	ldr	r2, [r5, #4]
	ldr	r1, [r1]
	str	r1, [r2, #8]
	b	.L9
.L24:
	.align	2
.L23:
	.word	DID_OK
	.word	MFI_STAT_INVALID_CMD
	.word	MR_DCMD_CTRL_SHUTDOWN
	.word	MR_DCMD_LD_MAP_GET_INFO
	.word	MR_DCMD_SYSTEM_PD_MAP_GET_INFO
	.word	DRV_DCMD_SKIP_REFIRE
	.word	MFI_STAT_OK
	.size	megasas_refire_mgmt_cmd, .-megasas_refire_mgmt_cmd
	.comm	MR_DCMD_SYSTEM_PD_MAP_GET_INFO,4,4
	.comm	MR_DCMD_LD_MAP_GET_INFO,4,4
	.comm	MR_DCMD_CTRL_SHUTDOWN,4,4
	.comm	MFI_STAT_OK,4,4
	.comm	MFI_STAT_INVALID_CMD,4,4
	.comm	DRV_DCMD_SKIP_REFIRE,4,4
	.comm	DID_OK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
