	.file	"extr_pmcraid.c_pmcraid_ioa_reset.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"reset is called with different command block\n"
	.align 8
.LC1:
	.string	"reset_engine: state = %d, command = %p\n"
	.align 8
.LC2:
	.string	"IOA is offline no reset is possible\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC3:
	.string	"sticky bit set, bring-up\n"
	.section	.rodata.str1.8
	.align 8
.LC4:
	.string	"IOA didn't respond marking it as dead\n"
	.section	.rodata.str1.1
.LC5:
	.string	"unit check is active\n"
.LC6:
	.string	"bringing down the adapter\n"
.LC7:
	.string	"bringing up the adapter\n"
	.section	.rodata.str1.8
	.align 8
.LC8:
	.string	"In softreset proceeding with bring-up\n"
	.text
	.p2align 4
	.type	pmcraid_ioa_reset, @function
pmcraid_ioa_reset:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	rbx, QWORD PTR [rdi]
	mov	DWORD PTR [rbx], 1
	cmp	QWORD PTR 32[rbx], rdi
	je	.L2
	lea	rdi, .LC0[rip]
	call	pmcraid_err@PLT
	mov	QWORD PTR 32[rbx], rbp
.L2:
	mov	esi, DWORD PTR 4[rbx]
	mov	rdx, rbp
	lea	rdi, .LC1[rip]
	xor	eax, eax
	call	pmcraid_info@PLT
	mov	eax, DWORD PTR 4[rbx]
	add	eax, -128
	cmp	eax, 7
	ja	.L3
	lea	rdx, .L5[rip]
	movsx	rax, DWORD PTR [rdx+rax*4]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L5:
	.long	.L11-.L5
	.long	.L3-.L5
	.long	.L10-.L5
	.long	.L9-.L5
	.long	.L8-.L5
	.long	.L7-.L5
	.long	.L6-.L5
	.long	.L4-.L5
	.text
	.p2align 4,,10
	.p2align 3
.L4:
	lea	rdi, .LC2[rip]
	call	pmcraid_err@PLT
.L12:
	mov	rax, QWORD PTR SHUTDOWN_NONE[rip]
	mov	DWORD PTR [rbx], 0
	mov	rdi, rbp
	mov	QWORD PTR 40[rbx], 0
	mov	QWORD PTR 32[rbx], 0
	mov	QWORD PTR 8[rbx], rax
	mov	QWORD PTR 24[rbx], 0
	call	pmcraid_return_cmd@PLT
	cmp	DWORD PTR 4[rbx], 129
	je	.L28
.L22:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	lea	rdi, 16[rbx]
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	jmp	wake_up_all@PLT
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	edi, DWORD PTR 68[rbx]
	call	scsi_block_requests@PLT
	mov	ecx, DWORD PTR 64[rbx]
	test	ecx, ecx
	jne	.L26
	mov	edi, DWORD PTR 60[rbx]
	call	ioread32@PLT
	test	DWORD PTR INTRS_TRANSITION_TO_OPERATIONAL[rip], eax
	je	.L19
	lea	rdi, .LC3[rip]
	xor	eax, eax
	call	pmcraid_info@PLT
	mov	DWORD PTR 4[rbx], 133
.L24:
	mov	rdi, rbp
	call	pmcraid_reinit_cmdblk@PLT
	jmp	.L25
	.p2align 4,,10
	.p2align 3
.L10:
	lea	rdi, .LC8[rip]
	xor	eax, eax
	call	pmcraid_info@PLT
	mov	DWORD PTR 4[rbx], 133
.L25:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rdi, rbp
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	jmp	pmcraid_identify_hrrq@PLT
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	mov	DWORD PTR 4[rbx], 132
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rdi, rbp
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	jmp	pmcraid_start_bist@PLT
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	mov	rax, QWORD PTR 40[rbx]
	add	rax, 1
	cmp	rax, QWORD PTR PMCRAID_RESET_ATTEMPTS[rip]
	mov	QWORD PTR 40[rbx], rax
	jle	.L15
	mov	QWORD PTR 40[rbx], 0
	lea	rdi, .LC4[rip]
	call	pmcraid_err@PLT
	cmp	QWORD PTR 24[rbx], 0
	mov	DWORD PTR 4[rbx], 135
	je	.L16
	mov	esi, DWORD PTR PMC_DEVICE_EVENT_SHUTDOWN_FAILED[rip]
	mov	rdi, rbx
	call	pmcraid_notify_ioastate@PLT
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L7:
	mov	DWORD PTR 4[rbx], 129
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L6:
	mov	esi, -1
	mov	rdi, rbx
	call	pmcraid_disable_interrupts@PLT
.L26:
	mov	DWORD PTR 4[rbx], 131
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rdi, rbp
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	jmp	pmcraid_reset_alert@PLT
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	mov	rax, QWORD PTR SHUTDOWN_NONE[rip]
	cmp	QWORD PTR 8[rbx], rax
	je	.L29
	mov	DWORD PTR 4[rbx], 134
.L21:
	mov	rdi, rbp
	call	pmcraid_reinit_cmdblk@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rdi, rbp
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	jmp	pmcraid_unregister_hcams@PLT
	.p2align 4,,10
	.p2align 3
.L28:
	.cfi_restore_state
	mov	rdi, rbx
	call	pmcraid_register_hcams@PLT
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L15:
	mov	edi, DWORD PTR 56[rbx]
	call	pci_restore_state@PLT
	mov	rdi, rbx
	call	pmcraid_fail_outstanding_cmds@PLT
	mov	edx, DWORD PTR 52[rbx]
	test	edx, edx
	jne	.L30
	cmp	QWORD PTR 24[rbx], 0
	je	.L18
	lea	rdi, .LC6[rip]
	xor	eax, eax
	call	pmcraid_info@PLT
	mov	rax, QWORD PTR SHUTDOWN_NONE[rip]
	mov	QWORD PTR 24[rbx], 0
	mov	rdi, rbx
	mov	DWORD PTR 4[rbx], 128
	mov	esi, DWORD PTR PMC_DEVICE_EVENT_SHUTDOWN_SUCCESS[rip]
	mov	QWORD PTR 8[rbx], rax
	call	pmcraid_notify_ioastate@PLT
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L19:
	mov	DWORD PTR 4[rbx], 130
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rdi, rbp
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	jmp	pmcraid_soft_reset@PLT
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	mov	esi, DWORD PTR PMC_DEVICE_EVENT_RESET_FAILED[rip]
	mov	rdi, rbx
	call	pmcraid_notify_ioastate@PLT
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L30:
	lea	rdi, .LC5[rip]
	xor	eax, eax
	call	pmcraid_info@PLT
	mov	DWORD PTR 52[rbx], 0
	mov	rdi, rbx
	call	pmcraid_get_dump@PLT
	sub	QWORD PTR 40[rbx], 1
	jmp	.L26
	.p2align 4,,10
	.p2align 3
.L29:
	mov	eax, DWORD PTR 48[rbx]
	test	eax, eax
	jne	.L21
	mov	esi, DWORD PTR PMC_DEVICE_EVENT_RESET_SUCCESS[rip]
	mov	rdi, rbx
	call	pmcraid_notify_ioastate@PLT
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L18:
	mov	rdi, rbx
	call	pmcraid_reset_enable_ioa@PLT
	test	eax, eax
	je	.L19
	mov	DWORD PTR 4[rbx], 133
	lea	rdi, .LC7[rip]
	xor	eax, eax
	call	pmcraid_info@PLT
	jmp	.L24
	.cfi_endproc
.LFE0:
	.size	pmcraid_ioa_reset, .-pmcraid_ioa_reset
	.comm	SHUTDOWN_NONE,8,8
	.comm	PMC_DEVICE_EVENT_SHUTDOWN_SUCCESS,4,4
	.comm	PMC_DEVICE_EVENT_SHUTDOWN_FAILED,4,4
	.comm	PMC_DEVICE_EVENT_RESET_SUCCESS,4,4
	.comm	PMC_DEVICE_EVENT_RESET_FAILED,4,4
	.comm	PMCRAID_RESET_ATTEMPTS,8,8
	.comm	INTRS_TRANSITION_TO_OPERATIONAL,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_pmcraid.c_pmcraid_ioa_reset.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"reset is called with different command block\012\000"
	.align	2
.LC1:
	.ascii	"reset_engine: state = %d, command = %p\012\000"
	.align	2
.LC2:
	.ascii	"IOA is offline no reset is possible\012\000"
	.align	2
.LC3:
	.ascii	"sticky bit set, bring-up\012\000"
	.align	2
.LC4:
	.ascii	"IOA didn't respond marking it as dead\012\000"
	.align	2
.LC5:
	.ascii	"unit check is active\012\000"
	.align	2
.LC6:
	.ascii	"bringing down the adapter\012\000"
	.align	2
.LC7:
	.ascii	"bringing up the adapter\012\000"
	.align	2
.LC8:
	.ascii	"In softreset proceeding with bring-up\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	pmcraid_ioa_reset, %function
pmcraid_ioa_reset:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r2, #1
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r4, [r0]
	mov	r5, r0
	ldr	r3, [r4, #20]
	str	r2, [r4]
	cmp	r3, r0
	beq	.L2
	ldr	r0, .L28
	bl	pmcraid_err
	str	r5, [r4, #20]
.L2:
	mov	r2, r5
	ldr	r1, [r4, #4]
	ldr	r0, .L28+4
	bl	pmcraid_info
	ldr	r3, [r4, #4]
	sub	r3, r3, #128
	cmp	r3, #7
	ldrls	pc, [pc, r3, asl #2]
	b	.L3
.L5:
	.word	.L11
	.word	.L3
	.word	.L10
	.word	.L9
	.word	.L8
	.word	.L7
	.word	.L6
	.word	.L4
.L4:
	ldr	r0, .L28+8
	bl	pmcraid_err
	ldr	r6, .L28+12
.L12:
	mov	r3, #0
	ldr	r2, [r6]
	str	r3, [r4, #24]
	str	r3, [r4]
	str	r3, [r4, #20]
	str	r3, [r4, #16]
	mov	r0, r5
	str	r2, [r4, #8]
	bl	pmcraid_return_cmd
	ldr	r3, [r4, #4]
	cmp	r3, #129
	beq	.L25
.L22:
	add	r0, r4, #12
	pop	{r4, r5, r6, r7, r8, lr}
	b	wake_up_all
.L11:
	ldr	r0, [r4, #48]
	bl	scsi_block_requests
	ldr	r3, [r4, #44]
	cmp	r3, #0
	bne	.L13
	ldr	r0, [r4, #40]
	bl	ioread32
	ldr	r3, .L28+16
	ldr	r3, [r3]
	tst	r0, r3
	beq	.L19
	ldr	r0, .L28+20
	bl	pmcraid_info
	mov	r3, #133
	mov	r0, r5
	str	r3, [r4, #4]
	bl	pmcraid_reinit_cmdblk
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, lr}
	b	pmcraid_identify_hrrq
.L10:
	ldr	r0, .L28+24
	bl	pmcraid_info
	mov	r3, #133
	mov	r0, r5
	str	r3, [r4, #4]
	pop	{r4, r5, r6, r7, r8, lr}
	b	pmcraid_identify_hrrq
.L9:
	mov	r3, #132
	mov	r0, r5
	str	r3, [r4, #4]
	pop	{r4, r5, r6, r7, r8, lr}
	b	pmcraid_start_bist
.L8:
	ldr	r2, .L28+28
	ldr	r3, [r4, #24]
	ldr	r2, [r2]
	add	r3, r3, #1
	cmp	r3, r2
	str	r3, [r4, #24]
	ble	.L15
	mov	r3, #0
	ldr	r0, .L28+32
	str	r3, [r4, #24]
	bl	pmcraid_err
	mov	r2, #135
	ldr	r3, [r4, #16]
	str	r2, [r4, #4]
	cmp	r3, #0
	ldrne	r3, .L28+36
	ldreq	r3, .L28+40
	mov	r0, r4
	ldr	r1, [r3]
	bl	pmcraid_notify_ioastate
	ldr	r6, .L28+12
	b	.L12
.L7:
	mov	r3, #129
	ldr	r6, .L28+12
	str	r3, [r4, #4]
	b	.L12
.L6:
	mvn	r1, #0
	mov	r0, r4
	bl	pmcraid_disable_interrupts
.L13:
	mov	r3, #131
	mov	r0, r5
	str	r3, [r4, #4]
	pop	{r4, r5, r6, r7, r8, lr}
	b	pmcraid_reset_alert
.L3:
	ldr	r6, .L28+12
	ldr	r2, [r4, #8]
	ldr	r3, [r6]
	cmp	r2, r3
	movne	r3, #134
	strne	r3, [r4, #4]
	beq	.L26
.L21:
	mov	r0, r5
	bl	pmcraid_reinit_cmdblk
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, lr}
	b	pmcraid_unregister_hcams
.L25:
	mov	r0, r4
	bl	pmcraid_register_hcams
	b	.L22
.L15:
	ldr	r0, [r4, #36]
	bl	pci_restore_state
	mov	r0, r4
	bl	pmcraid_fail_outstanding_cmds
	ldr	r7, [r4, #32]
	cmp	r7, #0
	bne	.L27
	ldr	r3, [r4, #16]
	cmp	r3, #0
	beq	.L18
	ldr	r0, .L28+44
	bl	pmcraid_info
	mov	r1, #128
	ldr	r6, .L28+12
	ldr	r3, .L28+48
	ldr	r2, [r6]
	mov	r0, r4
	stmib	r4, {r1, r2}
	str	r7, [r4, #16]
	ldr	r1, [r3]
	bl	pmcraid_notify_ioastate
	b	.L12
.L19:
	mov	r3, #130
	mov	r0, r5
	str	r3, [r4, #4]
	pop	{r4, r5, r6, r7, r8, lr}
	b	pmcraid_soft_reset
.L27:
	ldr	r0, .L28+52
	bl	pmcraid_info
	mov	r3, #0
	mov	r0, r4
	str	r3, [r4, #32]
	bl	pmcraid_get_dump
	mov	r2, #131
	ldr	r3, [r4, #24]
	mov	r0, r5
	sub	r3, r3, #1
	str	r3, [r4, #24]
	str	r2, [r4, #4]
	pop	{r4, r5, r6, r7, r8, lr}
	b	pmcraid_reset_alert
.L26:
	ldr	r3, [r4, #28]
	cmp	r3, #0
	bne	.L21
	ldr	r3, .L28+56
	mov	r0, r4
	ldr	r1, [r3]
	bl	pmcraid_notify_ioastate
	b	.L12
.L18:
	mov	r0, r4
	bl	pmcraid_reset_enable_ioa
	cmp	r0, #0
	beq	.L19
	mov	r3, #133
	ldr	r0, .L28+60
	str	r3, [r4, #4]
	bl	pmcraid_info
	mov	r0, r5
	bl	pmcraid_reinit_cmdblk
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, lr}
	b	pmcraid_identify_hrrq
.L29:
	.align	2
.L28:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	SHUTDOWN_NONE
	.word	INTRS_TRANSITION_TO_OPERATIONAL
	.word	.LC3
	.word	.LC8
	.word	PMCRAID_RESET_ATTEMPTS
	.word	.LC4
	.word	PMC_DEVICE_EVENT_SHUTDOWN_FAILED
	.word	PMC_DEVICE_EVENT_RESET_FAILED
	.word	.LC6
	.word	PMC_DEVICE_EVENT_SHUTDOWN_SUCCESS
	.word	.LC5
	.word	PMC_DEVICE_EVENT_RESET_SUCCESS
	.word	.LC7
	.size	pmcraid_ioa_reset, .-pmcraid_ioa_reset
	.comm	SHUTDOWN_NONE,4,4
	.comm	PMC_DEVICE_EVENT_SHUTDOWN_SUCCESS,4,4
	.comm	PMC_DEVICE_EVENT_SHUTDOWN_FAILED,4,4
	.comm	PMC_DEVICE_EVENT_RESET_SUCCESS,4,4
	.comm	PMC_DEVICE_EVENT_RESET_FAILED,4,4
	.comm	PMCRAID_RESET_ATTEMPTS,4,4
	.comm	INTRS_TRANSITION_TO_OPERATIONAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
