	.file	"extr_rtsx_scsi.c_inquiry.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Generic-SD/MMC          1.00 "
.LC1:
	.string	"Generic-MemoryStick     1.00 "
.LC2:
	.string	"Generic-SD/MemoryStick  1.00 "
.LC3:
	.string	"Generic-xD/SD/M.S.      1.00 "
	.text
	.p2align 4
	.type	inquiry, @function
inquiry:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rsi
	sub	rsp, 16
	.cfi_def_cfa_offset 64
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	SCSI_LUN@PLT
	mov	rdi, rbx
	mov	r13d, eax
	mov	esi, r13d
	call	get_lun_card@PLT
	mov	esi, DWORD PTR SD_MS_2LUN[rip]
	mov	rdi, rbx
	mov	DWORD PTR 2[rsp], 35586304
	mov	ebp, eax
	mov	eax, DWORD PTR DRCT_ACCESS_DEV[rip]
	or	al, BYTE PTR QULIFIRE[rip]
	mov	BYTE PTR 6[rsp], 0
	mov	BYTE PTR [rsp], al
	movzx	eax, BYTE PTR RMB_DISC[rip]
	or	eax, 13
	mov	BYTE PTR 1[rsp], al
	mov	eax, DWORD PTR WBUS_32[rip]
	or	al, BYTE PTR REL_ADR[rip]
	or	al, BYTE PTR WBUS_16[rip]
	or	al, BYTE PTR SYNC[rip]
	or	al, BYTE PTR LINKED[rip]
	or	al, BYTE PTR CMD_QUE[rip]
	or	al, BYTE PTR SFT_RE[rip]
	mov	BYTE PTR 7[rsp], al
	call	CHECK_LUN_MODE@PLT
	test	rax, rax
	je	.L2
	mov	rax, QWORD PTR [rbx]
	mov	ecx, DWORD PTR SD_CARD[rip]
	lea	r14, .LC0[rip]
	cmp	DWORD PTR [rax+r13*4], ecx
	lea	rax, .LC1[rip]
	cmovne	r14, rax
.L3:
	mov	rdi, r12
	call	scsi_bufflen@PLT
	mov	edi, eax
	call	vmalloc@PLT
	mov	r13, rax
	mov	eax, DWORD PTR TRANSPORT_ERROR[rip]
	test	r13, r13
	je	.L1
	cmp	QWORD PTR 8[rbx], 0
	je	.L6
	test	ebp, ebp
	je	.L7
	cmp	DWORD PTR MS_CARD[rip], ebp
	je	.L7
.L6:
	mov	rdi, r12
	call	scsi_bufflen@PLT
	cmp	eax, 35
	jle	.L24
	mov	rsi, rsp
	mov	edx, 8
	mov	rdi, r13
	call	memcpy@PLT
	lea	rdi, 8[r13]
	mov	edx, 28
	mov	rsi, r14
	call	strncpy@PLT
.L10:
	xor	esi, esi
	mov	rdi, r12
	call	scsi_set_resid@PLT
	mov	rdi, r12
	call	scsi_bufflen@PLT
	mov	rdx, r12
	mov	rdi, r13
	mov	esi, eax
	call	rtsx_stor_set_xfer_buf@PLT
	mov	rdi, r13
	call	vfree@PLT
	mov	eax, DWORD PTR TRANSPORT_GOOD[rip]
.L1:
	mov	rcx, QWORD PTR 8[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L25
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	mov	rdi, r12
	call	scsi_bufflen@PLT
	cmp	eax, 55
	jle	.L26
	mov	rsi, rsp
	mov	edx, 8
	mov	rdi, r13
	call	memcpy@PLT
	mov	edx, 48
	lea	rdi, 8[r13]
	mov	rsi, r14
	call	strncpy@PLT
	mov	BYTE PTR 4[r13], 51
	mov	edx, 20
.L13:
	mov	rsi, QWORD PTR formatter_inquiry_str[rip]
	lea	rdi, 36[r13]
	call	memcpy@PLT
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L2:
	mov	esi, DWORD PTR SD_MS_1LUN[rip]
	mov	rdi, rbx
	lea	r14, .LC2[rip]
	call	CHECK_LUN_MODE@PLT
	test	rax, rax
	lea	rax, .LC3[rip]
	cmove	r14, rax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L24:
	mov	rdi, r12
	call	scsi_bufflen@PLT
	mov	ebx, eax
	cmp	al, 8
	jbe	.L22
	mov	rsi, rsp
	mov	rdi, r13
	mov	edx, 8
	call	memcpy@PLT
	lea	edx, -8[rbx]
	lea	rdi, 8[r13]
	mov	rsi, r14
	movzx	edx, dl
	call	strncpy@PLT
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L26:
	mov	rdi, r12
	call	scsi_bufflen@PLT
	mov	ebx, eax
	cmp	al, 8
	jbe	.L22
	mov	rsi, rsp
	mov	edx, 8
	mov	rdi, r13
	call	memcpy@PLT
	lea	edx, -8[rbx]
	lea	rdi, 8[r13]
	mov	rsi, r14
	movzx	edx, dl
	call	strncpy@PLT
	mov	BYTE PTR 4[r13], 51
	cmp	bl, 36
	jbe	.L10
	lea	edx, -36[rbx]
	movzx	edx, dl
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L22:
	movzx	edx, bl
	mov	rsi, rsp
	mov	rdi, r13
	call	memcpy@PLT
	jmp	.L10
.L25:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	inquiry, .-inquiry
	.comm	formatter_inquiry_str,8,8
	.comm	WBUS_32,4,4
	.comm	WBUS_16,4,4
	.comm	TRANSPORT_GOOD,4,4
	.comm	TRANSPORT_ERROR,4,4
	.comm	SYNC,4,4
	.comm	SFT_RE,4,4
	.comm	SD_MS_2LUN,4,4
	.comm	SD_MS_1LUN,4,4
	.comm	SD_CARD,4,4
	.comm	RMB_DISC,4,4
	.comm	REL_ADR,4,4
	.comm	QULIFIRE,4,4
	.comm	MS_CARD,4,4
	.comm	LINKED,4,4
	.comm	DRCT_ACCESS_DEV,4,4
	.comm	CMD_QUE,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_rtsx_scsi.c_inquiry.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Generic-SD/MMC          1.00 \000"
	.align	2
.LC1:
	.ascii	"Generic-MemoryStick     1.00 \000"
	.align	2
.LC2:
	.ascii	"Generic-SD/MemoryStick  1.00 \000"
	.align	2
.LC3:
	.ascii	"Generic-xD/SD/M.S.      1.00 \000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	inquiry, %function
inquiry:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r3, .L31
	sub	sp, sp, #16
	mov	r5, r1
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	mov	r4, r0
	bl	SCSI_LUN
	mov	r6, r0
	mov	r0, r5
	mov	r1, r6
	bl	get_lun_card
	mov	ip, #256
	mov	r2, #0
	ldr	r1, .L31+4
	ldr	r3, .L31+8
	ldr	lr, [r1]
	ldr	r3, [r3]
	ldr	r1, .L31+12
	orr	r3, r3, lr
	ldr	lr, [r1]
	ldr	r1, .L31+16
	orr	r3, r3, lr
	ldr	lr, [r1]
	ldr	r1, .L31+20
	orr	r3, r3, lr
	ldr	lr, [r1]
	ldr	r1, .L31+24
	orr	r3, r3, lr
	ldr	r1, [r1]
	ldr	lr, .L31+28
	orr	r3, r3, r1
	ldr	r1, .L31+32
	ldr	r7, [lr]
	ldr	lr, [r1]
	ldr	r1, .L31+36
	orr	r3, r3, r7
	ldr	r7, [r1]
	ldr	r1, .L31+40
	strb	r3, [sp, #11]
	ldr	r1, [r1]
	ldr	r3, .L31+44
	orr	lr, lr, r7
	mov	r7, r0
	orr	r0, r1, #13
	ldr	r1, [r3]
	ldr	r3, .L31+48
	strb	r0, [sp, #5]
	mov	r0, r5
	strb	lr, [sp, #4]
	strh	ip, [sp, #6]	@ movhi
	strb	r2, [sp, #10]
	strh	r3, [sp, #8]	@ movhi
	bl	CHECK_LUN_MODE
	cmp	r0, #0
	beq	.L2
	ldr	r3, .L31+52
	ldr	r2, [r5]
	ldr	r0, [r3]
	ldr	r2, [r2, r6, lsl #2]
	ldr	r3, .L31+56
	cmp	r2, r0
	ldr	r8, .L31+60
	movne	r8, r3
.L3:
	mov	r0, r4
	bl	scsi_bufflen
	bl	vmalloc
	subs	r6, r0, #0
	beq	.L27
	ldr	r3, [r5, #4]
	cmp	r3, #0
	beq	.L6
	cmp	r7, #0
	beq	.L7
	ldr	r3, .L31+64
	ldr	r3, [r3]
	cmp	r3, r7
	beq	.L7
.L6:
	mov	r0, r4
	bl	scsi_bufflen
	cmp	r0, #35
	ble	.L28
	mov	r2, #8
	add	r1, sp, #4
	mov	r0, r6
	bl	memcpy
	mov	r1, r8
	mov	r2, #28
	add	r0, r6, #8
	bl	strncpy
.L10:
	mov	r1, #0
	mov	r0, r4
	bl	scsi_set_resid
	mov	r0, r4
	bl	scsi_bufflen
	mov	r2, r4
	mov	r1, r0
	mov	r0, r6
	bl	rtsx_stor_set_xfer_buf
	mov	r0, r6
	bl	vfree
	ldr	r3, .L31+68
	ldr	r0, [r3]
.L1:
	ldr	r3, .L31
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L29
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L7:
	mov	r0, r4
	bl	scsi_bufflen
	cmp	r0, #55
	ble	.L30
	mov	r2, #8
	add	r1, sp, #4
	mov	r0, r6
	bl	memcpy
	mov	r2, #48
	mov	r1, r8
	add	r0, r6, #8
	bl	strncpy
	mov	r3, #51
	mov	r2, #20
	strb	r3, [r6, #4]
.L13:
	ldr	r3, .L31+72
	add	r0, r6, #36
	ldr	r1, [r3]
	bl	memcpy
	b	.L10
.L2:
	ldr	r3, .L31+76
	mov	r0, r5
	ldr	r1, [r3]
	bl	CHECK_LUN_MODE
	ldr	r3, .L31+80
	cmp	r0, #0
	ldr	r8, .L31+84
	moveq	r8, r3
	b	.L3
.L28:
	mov	r0, r4
	bl	scsi_bufflen
	and	r5, r0, #255
	cmp	r5, #8
	bls	.L25
	add	r1, sp, #4
	mov	r2, #8
	mov	r0, r6
	bl	memcpy
	sub	r2, r5, #8
	mov	r1, r8
	and	r2, r2, #255
	add	r0, r6, #8
	bl	strncpy
	b	.L10
.L27:
	ldr	r3, .L31+88
	ldr	r0, [r3]
	b	.L1
.L30:
	mov	r0, r4
	bl	scsi_bufflen
	and	r5, r0, #255
	cmp	r5, #8
	bls	.L25
	mov	r2, #8
	add	r1, sp, #4
	mov	r0, r6
	bl	memcpy
	sub	r2, r5, #8
	mov	r1, r8
	and	r2, r2, #255
	add	r0, r6, #8
	bl	strncpy
	mov	r3, #51
	cmp	r5, #36
	strb	r3, [r6, #4]
	bls	.L10
	sub	r2, r5, #36
	and	r2, r2, #255
	b	.L13
.L25:
	mov	r2, r5
	mov	r0, r6
	add	r1, sp, #4
	bl	memcpy
	b	.L10
.L29:
	bl	__stack_chk_fail
.L32:
	.align	2
.L31:
	.word	.LC4
	.word	WBUS_32
	.word	REL_ADR
	.word	WBUS_16
	.word	SYNC
	.word	LINKED
	.word	CMD_QUE
	.word	SFT_RE
	.word	QULIFIRE
	.word	DRCT_ACCESS_DEV
	.word	RMB_DISC
	.word	SD_MS_2LUN
	.word	543
	.word	SD_CARD
	.word	.LC1
	.word	.LC0
	.word	MS_CARD
	.word	TRANSPORT_GOOD
	.word	formatter_inquiry_str
	.word	SD_MS_1LUN
	.word	.LC3
	.word	.LC2
	.word	TRANSPORT_ERROR
	.size	inquiry, .-inquiry
	.comm	formatter_inquiry_str,4,4
	.comm	WBUS_32,4,4
	.comm	WBUS_16,4,4
	.comm	TRANSPORT_GOOD,4,4
	.comm	TRANSPORT_ERROR,4,4
	.comm	SYNC,4,4
	.comm	SFT_RE,4,4
	.comm	SD_MS_2LUN,4,4
	.comm	SD_MS_1LUN,4,4
	.comm	SD_CARD,4,4
	.comm	RMB_DISC,4,4
	.comm	REL_ADR,4,4
	.comm	QULIFIRE,4,4
	.comm	MS_CARD,4,4
	.comm	LINKED,4,4
	.comm	DRCT_ACCESS_DEV,4,4
	.comm	CMD_QUE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
