	.file	"extr_pmcraid.c_pmcraid_reset_reload.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"reset_reload: proceeding with reset\n"
	.align 8
.LC1:
	.string	"reset_reload: reset is already in progress\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC2:
	.string	"reset_reload: IOA is dead\n"
	.section	.rodata.str1.8
	.align 8
.LC3:
	.string	"no free cmnd for reset_reload\n"
	.align 8
.LC4:
	.string	"reset_reload: initiating reset\n"
	.align 8
.LC5:
	.string	"reset_reload: waiting for reset to complete\n"
	.align 8
.LC6:
	.string	"reset_reload: reset is complete !!\n"
	.text
	.p2align 4
	.type	pmcraid_reset_reload, @function
pmcraid_reset_reload:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	xor	ebp, ebp
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	mov	rsi, rbp
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR 16[rdi]
	mov	edi, DWORD PTR [rax]
	call	spin_lock_irqsave@PLT
	cmp	QWORD PTR 24[rbx], 0
	je	.L7
	lea	rdi, .LC1[rip]
	xor	ebp, ebp
	call	pmcraid_info@PLT
	mov	rax, QWORD PTR 16[rbx]
	mov	rsi, rbp
	mov	edi, DWORD PTR [rax]
	call	spin_unlock_irqrestore@PLT
	mov	edi, DWORD PTR 32[rbx]
	xor	esi, esi
	cmp	QWORD PTR 24[rbx], 0
	sete	sil
	call	wait_event@PLT
	mov	rax, QWORD PTR 16[rbx]
	mov	rsi, rbp
	mov	edi, DWORD PTR [rax]
	call	spin_lock_irqsave@PLT
	mov	rax, QWORD PTR [rbx]
	cmp	rax, QWORD PTR IOA_STATE_DEAD[rip]
	je	.L14
	cmp	rax, r13
	je	.L15
.L7:
	lea	rdi, .LC0[rip]
	call	pmcraid_info@PLT
	mov	rdi, QWORD PTR 16[rbx]
	call	scsi_block_requests@PLT
	mov	rdi, rbx
	call	pmcraid_get_free_cmd@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L16
	cmp	QWORD PTR SHUTDOWN_NORMAL[rip], r12
	jne	.L8
	mov	DWORD PTR 8[rbx], 1
.L8:
	mov	QWORD PTR 48[rbx], r12
	lea	rdi, .LC4[rip]
	mov	QWORD PTR 40[rbx], rbp
	mov	DWORD PTR 12[rbx], 1
	call	pmcraid_info@PLT
	mov	rdi, rbp
	xor	ebp, ebp
	call	pmcraid_ioa_reset@PLT
	mov	rax, QWORD PTR 16[rbx]
	mov	rsi, rbp
	mov	edi, DWORD PTR [rax]
	call	spin_unlock_irqrestore@PLT
	lea	rdi, .LC5[rip]
	call	pmcraid_info@PLT
	mov	edi, DWORD PTR 32[rbx]
	xor	esi, esi
	cmp	QWORD PTR 24[rbx], 0
	sete	sil
	xor	r12d, r12d
	call	wait_event@PLT
	lea	rdi, .LC6[rip]
	call	pmcraid_info@PLT
	mov	rdi, QWORD PTR 16[rbx]
	call	scsi_unblock_requests@PLT
	cmp	QWORD PTR [rbx], r13
	setne	r12b
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	mov	eax, r12d
	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
.L15:
	.cfi_restore_state
	xor	r12d, r12d
.L6:
	mov	rax, QWORD PTR 16[rbx]
	xor	ebp, ebp
	mov	rsi, rbp
	mov	edi, DWORD PTR [rax]
	call	spin_unlock_irqrestore@PLT
	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
.L14:
	.cfi_restore_state
	lea	rdi, .LC2[rip]
	mov	r12d, 1
	call	pmcraid_info@PLT
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L16:
	lea	rdi, .LC3[rip]
	mov	r12d, 1
	call	pmcraid_err@PLT
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	pmcraid_reset_reload, .-pmcraid_reset_reload
	.comm	SHUTDOWN_NORMAL,8,8
	.comm	IOA_STATE_DEAD,8,8
	.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_pmcraid.c_pmcraid_reset_reload.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"reset_reload: proceeding with reset\012\000"
	.align	2
.LC1:
	.ascii	"reset_reload: reset is already in progress\012\000"
	.align	2
.LC2:
	.ascii	"reset_reload: IOA is dead\012\000"
	.align	2
.LC3:
	.ascii	"no free cmnd for reset_reload\012\000"
	.align	2
.LC4:
	.ascii	"reset_reload: initiating reset\012\000"
	.align	2
.LC5:
	.ascii	"reset_reload: waiting for reset to complete\012\000"
	.align	2
.LC6:
	.ascii	"reset_reload: reset is complete !!\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	pmcraid_reset_reload, %function
pmcraid_reset_reload:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	ldr	r3, [r0, #12]
	mov	r6, r1
	ldr	r0, [r3]
	mov	r1, #0
	mov	r7, r2
	bl	spin_lock_irqsave
	ldr	r3, [r4, #16]
	cmp	r3, #0
	beq	.L7
	mov	r5, #0
	ldr	r0, .L17
	bl	pmcraid_info
	ldr	r3, [r4, #12]
	mov	r1, r5
	ldr	r0, [r3]
	bl	spin_unlock_irqrestore
	ldr	r1, [r4, #16]
	ldr	r0, [r4, #20]
	clz	r1, r1
	lsr	r1, r1, #5
	bl	wait_event
	ldr	r3, [r4, #12]
	mov	r1, r5
	ldr	r0, [r3]
	bl	spin_lock_irqsave
	ldr	r2, .L17+4
	ldr	r3, [r4]
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L14
	cmp	r3, r7
	beq	.L15
.L7:
	ldr	r0, .L17+8
	bl	pmcraid_info
	ldr	r0, [r4, #12]
	bl	scsi_block_requests
	mov	r0, r4
	bl	pmcraid_get_free_cmd
	subs	r5, r0, #0
	beq	.L16
	ldr	r3, .L17+12
	str	r5, [r4, #24]
	ldr	r3, [r3]
	str	r6, [r4, #28]
	cmp	r3, r6
	moveq	r3, #1
	streq	r3, [r4, #4]
	mov	r3, #1
	ldr	r0, .L17+16
	str	r3, [r4, #8]
	bl	pmcraid_info
	mov	r0, r5
	bl	pmcraid_ioa_reset
	ldr	r3, [r4, #12]
	mov	r1, #0
	ldr	r0, [r3]
	bl	spin_unlock_irqrestore
	ldr	r0, .L17+20
	bl	pmcraid_info
	ldr	r1, [r4, #16]
	ldr	r0, [r4, #20]
	clz	r1, r1
	lsr	r1, r1, #5
	bl	wait_event
	ldr	r0, .L17+24
	bl	pmcraid_info
	ldr	r0, [r4, #12]
	bl	scsi_unblock_requests
	ldr	r5, [r4]
	subs	r5, r5, r7
	movne	r5, #1
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L15:
	mov	r5, #0
.L6:
	ldr	r3, [r4, #12]
	mov	r1, #0
	ldr	r0, [r3]
	bl	spin_unlock_irqrestore
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L14:
	ldr	r0, .L17+28
	bl	pmcraid_info
	mov	r5, #1
	b	.L6
.L16:
	ldr	r0, .L17+32
	bl	pmcraid_err
	mov	r5, #1
	b	.L6
.L18:
	.align	2
.L17:
	.word	.LC1
	.word	IOA_STATE_DEAD
	.word	.LC0
	.word	SHUTDOWN_NORMAL
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC2
	.word	.LC3
	.size	pmcraid_reset_reload, .-pmcraid_reset_reload
	.comm	SHUTDOWN_NORMAL,4,4
	.comm	IOA_STATE_DEAD,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
