	.file	"extr_sym_glue.c_sym_set_cam_result_error.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"COMMAND FAILED (%x %x %x).\n"
	.text
	.p2align 4
	.globl	sym_set_cam_result_error
	.type	sym_set_cam_result_error, @function
sym_set_cam_result_error:
.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
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	r15, QWORD PTR 40[rsi]
	mov	eax, DWORD PTR 4[rsi]
	and	eax, DWORD PTR HF_SENSE[rip]
	je	.L2
	cmp	QWORD PTR sym_verbose[rip], 0
	mov	r13d, DWORD PTR 8[rsi]
	mov	rbx, rdi
	mov	r14d, DWORD PTR 12[rsi]
	jne	.L15
.L3:
	mov	eax, DWORD PTR HS_COMPLETE[rip]
	cmp	DWORD PTR 20[rbp], eax
	jne	.L4
	mov	eax, DWORD PTR S_GOOD[rip]
	cmp	DWORD PTR 0[rbp], eax
	je	.L16
.L4:
	mov	rax, QWORD PTR 8[r15]
	mov	rdi, rbx
	xor	r12d, r12d
	mov	esi, DWORD PTR [rax]
	call	sym_reset_scsi_target@PLT
	mov	ebx, DWORD PTR DID_ERROR[rip]
.L5:
	mov	esi, r14d
	mov	rdi, r15
	call	scsi_set_resid@PLT
	mov	eax, ebx
	sal	eax, 16
	add	eax, r12d
	add	eax, r13d
	mov	DWORD PTR [r15], eax
	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
.L15:
	.cfi_restore_state
	mov	esi, DWORD PTR 36[rsi]
	test	esi, esi
	je	.L3
	mov	rdi, r15
	call	sym_print_xerr@PLT
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L2:
	mov	r14d, edx
	mov	edx, DWORD PTR 20[rsi]
	cmp	edx, DWORD PTR HS_COMPLETE[rip]
	mov	r12d, eax
	mov	r13d, DWORD PTR [rsi]
	mov	ebx, DWORD PTR DID_OK[rip]
	je	.L5
	cmp	edx, DWORD PTR HS_SEL_TIMEOUT[rip]
	mov	ebx, DWORD PTR DID_NO_CONNECT[rip]
	je	.L5
	cmp	edx, DWORD PTR HS_UNEXPECTED[rip]
	mov	ebx, DWORD PTR DID_ERROR[rip]
	je	.L5
	cmp	QWORD PTR sym_verbose[rip], 0
	mov	esi, DWORD PTR 16[rsi]
	jne	.L17
.L9:
	mov	edi, DWORD PTR DID_ERROR[rip]
	call	sym_xerr_cam_status@PLT
	mov	ebx, eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L16:
	mov	eax, DWORD PTR 16[rbp]
	test	eax, eax
	jne	.L4
	mov	esi, DWORD PTR 36[rbp]
	mov	edi, DWORD PTR DID_OK[rip]
	call	sym_xerr_cam_status@PLT
	mov	edx, DWORD PTR SCSI_SENSE_BUFFERSIZE[rip]
	mov	edi, DWORD PTR 24[r15]
	xor	esi, esi
	mov	r12d, DWORD PTR DRIVER_SENSE[rip]
	mov	ebx, eax
	call	memset@PLT
	mov	esi, DWORD PTR SYM_SNS_BBUF_LEN[rip]
	mov	edi, DWORD PTR SCSI_SENSE_BUFFERSIZE[rip]
	sal	r12d, 24
	call	min@PLT
	mov	esi, DWORD PTR 32[rbp]
	mov	edi, DWORD PTR 24[r15]
	mov	edx, eax
	call	memcpy@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L17:
	mov	r8d, esi
	mov	ecx, r13d
	lea	rsi, .LC0[rip]
	mov	rdi, r15
	call	sym_print_addr@PLT
	mov	esi, DWORD PTR 16[rbp]
	jmp	.L9
	.cfi_endproc
.LFE0:
	.size	sym_set_cam_result_error, .-sym_set_cam_result_error
	.comm	sym_verbose,8,8
	.comm	S_GOOD,4,4
	.comm	SYM_SNS_BBUF_LEN,4,4
	.comm	SCSI_SENSE_BUFFERSIZE,4,4
	.comm	HS_UNEXPECTED,4,4
	.comm	HS_SEL_TIMEOUT,4,4
	.comm	HS_COMPLETE,4,4
	.comm	HF_SENSE,4,4
	.comm	DRIVER_SENSE,4,4
	.comm	DID_OK,4,4
	.comm	DID_NO_CONNECT,4,4
	.comm	DID_ERROR,4,4
	.comm	DID_ABORT,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_sym_glue.c_sym_set_cam_result_error.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"COMMAND FAILED (%x %x %x).\012\000"
	.text
	.align	2
	.global	sym_set_cam_result_error
	.syntax unified
	.arm
	.fpu softvfp
	.type	sym_set_cam_result_error, %function
sym_set_cam_result_error:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r3, .L27
	ldr	ip, [r1, #4]
	ldr	r3, [r3]
	mov	r6, r1
	ands	r5, ip, r3
	ldr	r8, [r1, #40]
	sub	sp, sp, #8
	beq	.L2
	ldr	r3, .L27+4
	mov	r7, r0
	ldr	r3, [r3]
	ldr	r9, [r1, #8]
	cmp	r3, #0
	ldr	r4, [r1, #12]
	bne	.L21
.L3:
	ldr	r3, .L27+8
	ldr	r2, [r6, #20]
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L4
	ldr	r3, .L27+12
	ldr	r2, [r6]
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L22
.L4:
	mov	r5, #0
	ldr	r3, [r8, #4]
	mov	r0, r7
	ldr	r1, [r3]
	bl	sym_reset_scsi_target
	ldr	r3, .L27+16
	ldr	r7, [r3]
.L5:
	mov	r1, r4
	mov	r0, r8
	bl	scsi_set_resid
	add	r0, r5, r7, lsl #16
	add	r0, r0, r9
	str	r0, [r8]
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L21:
	ldr	r1, [r1, #36]
	cmp	r1, #0
	beq	.L3
	mov	r0, r8
	bl	sym_print_xerr
	b	.L3
.L2:
	ldr	r3, .L27+8
	mov	r4, r2
	ldr	r3, [r3]
	ldr	r2, [r1, #20]
	ldr	r9, [r1]
	cmp	r2, r3
	beq	.L23
	ldr	r3, .L27+20
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L24
	ldr	r3, .L27+24
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L25
	ldr	r3, .L27+4
	ldr	r1, [r1, #16]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L26
.L9:
	ldr	r3, .L27+16
	ldr	r0, [r3]
	bl	sym_xerr_cam_status
	mov	r7, r0
	b	.L5
.L22:
	ldr	r5, [r6, #16]
	cmp	r5, #0
	bne	.L4
	ldr	r3, .L27+28
	ldr	r1, [r6, #36]
	ldr	r0, [r3]
	bl	sym_xerr_cam_status
	ldr	r10, .L27+32
	ldr	r3, .L27+36
	ldr	r2, [r10]
	mov	r1, r5
	mov	r7, r0
	ldr	r0, [r8, #12]
	ldr	r5, [r3]
	bl	memset
	ldr	r3, .L27+40
	ldr	r0, [r10]
	ldr	r1, [r3]
	ldr	r10, [r6, #32]
	ldr	r6, [r8, #12]
	bl	min
	mov	r1, r10
	mov	r2, r0
	mov	r0, r6
	lsl	r5, r5, #24
	bl	memcpy
	b	.L5
.L25:
	ldr	r3, .L27+16
	ldr	r7, [r3]
	b	.L5
.L23:
	ldr	r3, .L27+28
	ldr	r7, [r3]
	b	.L5
.L24:
	ldr	r3, .L27+44
	ldr	r7, [r3]
	b	.L5
.L26:
	str	r1, [sp]
	mov	r3, r9
	ldr	r1, .L27+48
	mov	r0, r8
	bl	sym_print_addr
	ldr	r1, [r6, #16]
	b	.L9
.L28:
	.align	2
.L27:
	.word	HF_SENSE
	.word	sym_verbose
	.word	HS_COMPLETE
	.word	S_GOOD
	.word	DID_ERROR
	.word	HS_SEL_TIMEOUT
	.word	HS_UNEXPECTED
	.word	DID_OK
	.word	SCSI_SENSE_BUFFERSIZE
	.word	DRIVER_SENSE
	.word	SYM_SNS_BBUF_LEN
	.word	DID_NO_CONNECT
	.word	.LC0
	.size	sym_set_cam_result_error, .-sym_set_cam_result_error
	.comm	sym_verbose,4,4
	.comm	S_GOOD,4,4
	.comm	SYM_SNS_BBUF_LEN,4,4
	.comm	SCSI_SENSE_BUFFERSIZE,4,4
	.comm	HS_UNEXPECTED,4,4
	.comm	HS_SEL_TIMEOUT,4,4
	.comm	HS_COMPLETE,4,4
	.comm	HF_SENSE,4,4
	.comm	DRIVER_SENSE,4,4
	.comm	DID_OK,4,4
	.comm	DID_NO_CONNECT,4,4
	.comm	DID_ERROR,4,4
	.comm	DID_ABORT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
