	.file	"extr_arcmsr.c_arcmsr_handle_virtual_command.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Areca   "
.LC1:
	.string	"RAID controller "
.LC2:
	.string	"R001"
	.text
	.p2align 4
	.type	arcmsr_handle_virtual_command, @function
arcmsr_handle_virtual_command:
.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
	mov	rbp, rsi
	sub	rsp, 48
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	cmp	QWORD PTR 8[rsi], 0
	mov	eax, DWORD PTR [rsi]
	jne	.L14
	or	eax, DWORD PTR CAM_REQ_CMP[rip]
	mov	r12, rdi
	mov	rdi, rsi
	mov	DWORD PTR [rsi], eax
	call	scsiio_cdb_ptr@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 129
	jle	.L15
	cmp	eax, 130
	jne	.L6
	movzx	eax, BYTE PTR T_PROCESSOR[rip]
	lea	rdi, 8[rsp]
	mov	edx, 8
	lea	rsi, .LC0[rip]
	mov	r12, QWORD PTR 0[rbp]
	mov	BYTE PTR 1[rsp], 0
	mov	r13, rsp
	mov	BYTE PTR [rsp], al
	xor	eax, eax
	mov	WORD PTR 2[rsp], ax
	mov	DWORD PTR 4[rsp], 31
	call	strncpy@PLT
	lea	rdi, 16[rsp]
	mov	edx, 16
	lea	rsi, .LC1[rip]
	call	strncpy@PLT
	lea	rdi, 32[rsp]
	mov	edx, 4
	lea	rsi, .LC2[rip]
	call	strncpy@PLT
	mov	rdi, r12
	mov	edx, 36
	mov	rsi, r13
	call	memcpy@PLT
	mov	rdi, rbp
	call	xpt_done@PLT
.L1:
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L16
	add	rsp, 48
	.cfi_remember_state
	.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
.L15:
	.cfi_restore_state
	cmp	eax, 127
	jg	.L17
.L6:
	mov	rdi, rbp
	call	xpt_done@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L17:
	mov	rsi, rbp
	mov	rdi, r12
	call	arcmsr_iop_message_xfer@PLT
	test	eax, eax
	je	.L6
	mov	eax, DWORD PTR CAM_SCSI_STATUS_ERROR[rip]
	or	DWORD PTR 0[rbp], eax
	mov	rdi, rbp
	mov	eax, DWORD PTR SCSI_STATUS_CHECK_COND[rip]
	mov	DWORD PTR 8[rbp], eax
	call	xpt_done@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L14:
	or	eax, DWORD PTR CAM_DEV_NOT_THERE[rip]
	mov	rdi, rsi
	mov	DWORD PTR [rsi], eax
	call	xpt_done@PLT
	jmp	.L1
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	arcmsr_handle_virtual_command, .-arcmsr_handle_virtual_command
	.comm	T_PROCESSOR,1,1
	.comm	SCSI_STATUS_CHECK_COND,4,4
	.comm	CAM_SCSI_STATUS_ERROR,4,4
	.comm	CAM_REQ_CMP,4,4
	.comm	CAM_DEV_NOT_THERE,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_arcmsr.c_arcmsr_handle_virtual_command.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Areca   \000"
	.align	2
.LC1:
	.ascii	"RAID controller \000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	arcmsr_handle_virtual_command, %function
arcmsr_handle_virtual_command:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r6, [r1, #4]
	ldr	r3, .L23
	sub	sp, sp, #40
	cmp	r6, #0
	mov	r4, r1
	ldr	r3, [r3]
	str	r3, [sp, #36]
	mov	r3,#0
	ldr	r2, [r1]
	bne	.L20
	ldr	r3, .L23+4
	mov	r5, r0
	ldr	r3, [r3]
	mov	r0, r1
	orr	r3, r3, r2
	str	r3, [r1]
	bl	scsiio_cdb_ptr
	ldr	r3, [r0]
	cmp	r3, #129
	ble	.L21
	cmp	r3, #130
	bne	.L6
	mov	lr, #31
	ldr	r0, .L23+8
	ldr	r1, .L23+12
	ldr	r3, .L23+16
	add	r2, sp, #8
	add	ip, sp, #16
	ldrb	r5, [r0]	@ zero_extendqisi2
	strb	r6, [sp, #1]
	ldm	r1, {r0, r1}
	stm	r2, {r0, r1}
	ldm	r3, {r0, r1, r2, r3}
	stm	ip, {r0, r1, r2, r3}
	ldr	r3, .L23+20
	mov	r2, #36
	mov	r1, sp
	ldr	r0, [r4]
	str	r3, [sp, #32]
	strh	r6, [sp, #2]	@ movhi
	strb	r5, [sp]
	str	lr, [sp, #4]
	bl	memcpy
	ldr	r3, .L23
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L16
.L10:
	mov	r0, r4
	add	sp, sp, #40
	@ sp needed
	pop	{r4, r5, r6, lr}
	b	xpt_done
.L21:
	cmp	r3, #127
	bgt	.L22
.L6:
	ldr	r3, .L23
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L10
.L16:
	bl	__stack_chk_fail
.L22:
	mov	r0, r5
	mov	r1, r4
	bl	arcmsr_iop_message_xfer
	cmp	r0, #0
	beq	.L6
	ldr	r2, .L23+24
	ldr	r3, [r4]
	ldr	r1, [r2]
	ldr	r2, .L23+28
	orr	r3, r3, r1
	str	r3, [r4]
	ldr	r3, [r2]
	str	r3, [r4, #4]
	b	.L6
.L20:
	ldr	r3, .L23+32
	ldr	r3, [r3]
	orr	r3, r3, r2
	str	r3, [r1]
	ldr	r3, .L23
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L16
	mov	r0, r4
	add	sp, sp, #40
	@ sp needed
	pop	{r4, r5, r6, lr}
	b	xpt_done
.L24:
	.align	2
.L23:
	.word	.LC2
	.word	CAM_REQ_CMP
	.word	T_PROCESSOR
	.word	.LC0
	.word	.LC1
	.word	825241682
	.word	CAM_SCSI_STATUS_ERROR
	.word	SCSI_STATUS_CHECK_COND
	.word	CAM_DEV_NOT_THERE
	.size	arcmsr_handle_virtual_command, .-arcmsr_handle_virtual_command
	.comm	T_PROCESSOR,1,1
	.comm	SCSI_STATUS_CHECK_COND,4,4
	.comm	CAM_SCSI_STATUS_ERROR,4,4
	.comm	CAM_REQ_CMP,4,4
	.comm	CAM_DEV_NOT_THERE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
