	.file	"extr_visorhba_main.c_visorhba_device_reset_handler.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	visorhba_device_reset_handler, @function
visorhba_device_reset_handler:
.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
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	r12, QWORD PTR 16[rdi]
	mov	rbp, QWORD PTR [r12]
	lea	r13, 4[rbp]
	mov	rdi, r13
	call	atomic_read@PLT
	cmp	rax, QWORD PTR VISORHBA_ERROR_COUNT[rip]
	jge	.L2
	mov	rdi, r13
	call	atomic_inc@PLT
.L3:
	mov	edi, DWORD PTR TASK_MGMT_LUN_RESET[rip]
	mov	rsi, r12
	call	forward_taskmgmt_command@PLT
	cmp	DWORD PTR SUCCESS[rip], eax
	mov	r12d, eax
	jne	.L1
	mov	eax, DWORD PTR DID_RESET[rip]
	mov	rdi, rbx
	sal	eax, 16
	mov	DWORD PTR [rbx], eax
	call	[QWORD PTR 8[rbx]]
.L1:
	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
.L2:
	.cfi_restore_state
	mov	esi, DWORD PTR IOS_ERROR_THRESHOLD[rip]
	mov	rdi, rbp
	call	atomic_set@PLT
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	visorhba_device_reset_handler, .-visorhba_device_reset_handler
	.comm	VISORHBA_ERROR_COUNT,8,8
	.comm	TASK_MGMT_LUN_RESET,4,4
	.comm	SUCCESS,4,4
	.comm	IOS_ERROR_THRESHOLD,4,4
	.comm	DID_RESET,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_visorhba_main.c_visorhba_device_reset_handler.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	visorhba_device_reset_handler, %function
visorhba_device_reset_handler:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r5, [r0, #8]
	mov	r4, r0
	ldr	r6, [r5]
	add	r7, r6, #4
	mov	r0, r7
	bl	atomic_read
	ldr	r3, .L7
	ldr	r3, [r3]
	cmp	r0, r3
	bge	.L2
	mov	r0, r7
	bl	atomic_inc
.L3:
	ldr	r3, .L7+4
	mov	r1, r5
	ldr	r0, [r3]
	bl	forward_taskmgmt_command
	ldr	r3, .L7+8
	mov	r5, r0
	ldr	r3, [r3]
	cmp	r3, r0
	bne	.L1
	ldr	r3, .L7+12
	mov	r0, r4
	ldr	r3, [r3]
	ldr	r2, [r4, #4]
	lsl	r3, r3, #16
	str	r3, [r4]
	blx	r2
.L1:
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	ldr	r3, .L7+16
	mov	r0, r6
	ldr	r1, [r3]
	bl	atomic_set
	b	.L3
.L8:
	.align	2
.L7:
	.word	VISORHBA_ERROR_COUNT
	.word	TASK_MGMT_LUN_RESET
	.word	SUCCESS
	.word	DID_RESET
	.word	IOS_ERROR_THRESHOLD
	.size	visorhba_device_reset_handler, .-visorhba_device_reset_handler
	.comm	VISORHBA_ERROR_COUNT,4,4
	.comm	TASK_MGMT_LUN_RESET,4,4
	.comm	SUCCESS,4,4
	.comm	IOS_ERROR_THRESHOLD,4,4
	.comm	DID_RESET,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
