	.file	"extr_scsi_scan.c_scsi_probe_lun.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"scsi scan: INQUIRY pass %d length %d\n"
	.align 8
.LC1:
	.string	"scsi scan: %d byte inquiry failed.  Consider BLIST_INQUIRY_36 for this device\n"
	.align 8
.LC2:
	.string	"scsi scan: INQUIRY result too short (%d), using 36\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC3:
	.string	"successful"
	.section	.rodata.str1.8
	.align 8
.LC4:
	.string	"scsi scan: INQUIRY %s with code 0x%x\n"
	.section	.rodata.str1.1
.LC5:
	.string	"failed"
	.text
	.p2align 4
	.type	scsi_probe_lun, @function
scsi_probe_lun:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	mov	r14, rsi
	push	r13
	push	r12
	push	rbx
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 120
	mov	QWORD PTR -152[rbp], rcx
	mov	rcx, rsp
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR MAX_COMMAND_SIZE[rip]
	add	rax, 15
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L3
.L48:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L48
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L49
.L4:
	mov	rax, QWORD PTR -152[rbp]
	mov	DWORD PTR -100[rbp], 1
	mov	r13, rsp
	mov	DWORD PTR [rax], 0
	mov	ecx, DWORD PTR [rbx]
	mov	eax, 36
	test	ecx, ecx
	cmovne	eax, ecx
	mov	DWORD PTR -116[rbp], eax
	mov	r12d, eax
	lea	rax, -80[rbp]
	mov	QWORD PTR -112[rbp], rax
	lea	rax, -84[rbp]
	mov	QWORD PTR -128[rbp], rax
	.p2align 4,,10
	.p2align 3
.L6:
	mov	ecx, DWORD PTR -100[rbp]
	mov	edi, DWORD PTR KERN_INFO[rip]
	mov	r8d, r12d
	mov	rsi, rbx
	lea	rdx, .LC0[rip]
	xor	eax, eax
	call	sdev_printk@PLT
	mov	edi, 3
	mov	esi, eax
	call	SCSI_LOG_SCAN_BUS@PLT
	mov	DWORD PTR -104[rbp], 3
.L10:
	mov	edx, 6
	xor	esi, esi
	mov	rdi, r13
	call	memset@PLT
	mov	edx, r12d
	xor	esi, esi
	mov	rdi, r14
	movzx	eax, BYTE PTR INQUIRY[rip]
	mov	BYTE PTR 4[r13], r12b
	mov	BYTE PTR 0[r13], al
	call	memset@PLT
	sub	rsp, 8
	push	QWORD PTR -128[rbp]
	mov	r9, QWORD PTR -112[rbp]
	mov	ecx, DWORD PTR HZ[rip]
	push	3
	mov	r8d, r12d
	mov	rsi, r13
	mov	edx, DWORD PTR scsi_inq_timeout[rip]
	mov	rdi, rbx
	mov	eax, ecx
	imul	edx, ecx
	shr	eax, 31
	add	eax, ecx
	mov	rcx, r14
	sar	eax
	add	eax, edx
	mov	edx, DWORD PTR DMA_FROM_DEVICE[rip]
	push	rax
	call	scsi_execute_req@PLT
	add	rsp, 32
	mov	r15d, eax
	test	eax, eax
	je	.L50
	mov	edi, DWORD PTR KERN_INFO[rip]
	mov	r8d, eax
	mov	rsi, rbx
	xor	eax, eax
	lea	rcx, .LC5[rip]
	lea	rdx, .LC4[rip]
	call	sdev_printk@PLT
	mov	edi, 3
	mov	esi, eax
	call	SCSI_LOG_SCAN_BUS@PLT
	mov	edi, r15d
	call	driver_byte@PLT
	cmp	rax, QWORD PTR DRIVER_SENSE[rip]
	jne	.L11
	mov	rdi, QWORD PTR -112[rbp]
	call	scsi_sense_valid@PLT
	test	rax, rax
	je	.L11
	mov	rax, QWORD PTR UNIT_ATTENTION[rip]
	cmp	QWORD PTR -80[rbp], rax
	jne	.L11
	mov	eax, DWORD PTR -72[rbp]
	sub	eax, 40
	cmp	eax, 1
	ja	.L11
	cmp	QWORD PTR -64[rbp], 0
	je	.L24
.L11:
	test	r15d, r15d
	je	.L39
	cmp	DWORD PTR -100[rbp], 2
	jne	.L17
	mov	edi, DWORD PTR KERN_INFO[rip]
	mov	ecx, r12d
	mov	rsi, rbx
	xor	eax, eax
	lea	rdx, .LC1[rip]
	call	sdev_printk@PLT
	mov	DWORD PTR -100[rbp], 3
	mov	r12d, DWORD PTR -116[rbp]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L50:
	mov	edi, DWORD PTR KERN_INFO[rip]
	xor	r8d, r8d
	mov	rsi, rbx
	xor	eax, eax
	lea	rcx, .LC3[rip]
	lea	rdx, .LC4[rip]
	call	sdev_printk@PLT
	mov	edi, 3
	mov	esi, eax
	call	SCSI_LOG_SCAN_BUS@PLT
	cmp	r12d, DWORD PTR -84[rbp]
	je	.L24
.L39:
	lea	r8, 8[r14]
	mov	esi, 8
	mov	rdi, r8
	mov	QWORD PTR -144[rbp], r8
	call	scsi_sanitize_inquiry_string@PLT
	lea	rdx, 16[r14]
	mov	esi, 16
	mov	rdi, rdx
	mov	QWORD PTR -136[rbp], rdx
	call	scsi_sanitize_inquiry_string@PLT
	lea	rdi, 32[r14]
	mov	esi, 4
	call	scsi_sanitize_inquiry_string@PLT
	movzx	eax, BYTE PTR 4[r14]
	mov	r8, QWORD PTR -144[rbp]
	mov	rdi, rbx
	mov	rdx, QWORD PTR -136[rbp]
	lea	ecx, 5[rax]
	mov	rsi, r8
	cmp	ecx, 256
	cmovge	ecx, DWORD PTR -116[rbp]
	mov	DWORD PTR -104[rbp], ecx
	call	scsi_get_device_flags@PLT
	mov	rcx, QWORD PTR -152[rbp]
	cmp	DWORD PTR -100[rbp], 1
	mov	DWORD PTR [rcx], eax
	mov	ecx, DWORD PTR -104[rbp]
	jne	.L44
	mov	edx, 36
	test	DWORD PTR BLIST_INQUIRY_36[rip], eax
	jne	.L15
	mov	edx, DWORD PTR [rbx]
	test	edx, edx
	cmove	edx, ecx
.L15:
	cmp	edx, r12d
	jle	.L44
	mov	DWORD PTR -100[rbp], 2
	mov	r12d, edx
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L24:
	sub	DWORD PTR -104[rbp], 1
	je	.L11
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L17:
	mov	r15d, DWORD PTR EIO[rip]
	neg	r15d
.L1:
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L51
	lea	rsp, -40[rbp]
	mov	eax, r15d
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L44:
	.cfi_restore_state
	mov	esi, ecx
	mov	edi, r12d
	call	min@PLT
	mov	DWORD PTR [rbx], eax
	cmp	eax, 35
	jg	.L23
	mov	rsi, QWORD PTR 16[rbx]
	mov	edx, DWORD PTR [rsi]
	test	edx, edx
	je	.L52
.L18:
	mov	DWORD PTR [rbx], 36
.L23:
	movzx	edx, BYTE PTR 2[r14]
	mov	eax, edx
	and	eax, 7
	and	edx, 6
	mov	BYTE PTR 4[rbx], al
	je	.L53
.L19:
	add	eax, 1
	mov	BYTE PTR 4[rbx], al
.L20:
	mov	rdx, QWORD PTR 24[rbx]
	movzx	eax, al
	mov	DWORD PTR [rdx], eax
	cmp	eax, DWORD PTR SCSI_2[rip]
	mov	DWORD PTR 8[rbx], 0
	jg	.L1
	cmp	eax, DWORD PTR SCSI_UNKNOWN[rip]
	je	.L1
	mov	rax, QWORD PTR 16[rbx]
	mov	eax, DWORD PTR 4[rax]
	test	eax, eax
	jne	.L1
	mov	DWORD PTR 8[rbx], 1
	xor	r15d, r15d
	jmp	.L1
.L53:
	cmp	al, 1
	jne	.L20
	movzx	edx, BYTE PTR 3[r14]
	and	edx, 15
	cmp	dl, 1
	jne	.L20
	jmp	.L19
.L49:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
.L52:
	mov	edi, DWORD PTR KERN_INFO[rip]
	mov	ecx, eax
	lea	rdx, .LC2[rip]
	call	shost_printk@PLT
	mov	rax, QWORD PTR 16[rbx]
	mov	DWORD PTR [rax], 1
	jmp	.L18
.L51:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	scsi_probe_lun, .-scsi_probe_lun
	.comm	scsi_inq_timeout,4,4
	.comm	UNIT_ATTENTION,8,8
	.comm	SCSI_UNKNOWN,4,4
	.comm	SCSI_2,4,4
	.comm	MAX_COMMAND_SIZE,4,4
	.comm	KERN_INFO,4,4
	.comm	INQUIRY,1,1
	.comm	HZ,4,4
	.comm	EIO,4,4
	.comm	DRIVER_SENSE,8,8
	.comm	DMA_FROM_DEVICE,4,4
	.comm	BLIST_INQUIRY_36,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_scsi_scan.c_scsi_probe_lun.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"scsi scan: INQUIRY pass %d length %d\012\000"
	.align	2
.LC1:
	.ascii	"scsi scan: %d byte inquiry failed.  Consider BLIST_"
	.ascii	"INQUIRY_36 for this device\012\000"
	.align	2
.LC2:
	.ascii	"scsi scan: INQUIRY result too short (%d), using 36\012"
	.ascii	"\000"
	.align	2
.LC3:
	.ascii	"successful\000"
	.align	2
.LC4:
	.ascii	"scsi scan: INQUIRY %s with code 0x%x\012\000"
	.align	2
.LC5:
	.ascii	"failed\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	scsi_probe_lun, %function
scsi_probe_lun:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #76
	mov	ip, r3
	mov	r2, #0
	mov	r6, r0
	str	r3, [fp, #-80]
	ldr	r3, .L46
	ldr	r0, .L46+4
	ldr	r3, [r3]
	ldr	r0, [r0]
	str	r0, [fp, #-40]
	mov	r0,#0
	add	r3, r3, #7
	str	r2, [ip]
	ldr	r2, [r6]
	bic	r3, r3, #7
	sub	sp, sp, r3
	cmp	r2, #0
	add	r3, sp, #24
	movne	r4, r2
	moveq	r4, #36
	str	r3, [fp, #-76]
	mov	r3, #1
	mov	r9, r1
	str	r4, [fp, #-72]
	add	r10, sp, #25
	str	r3, [fp, #-64]
.L3:
	ldr	r0, .L46+8
	str	r4, [sp]
	ldr	r3, [fp, #-64]
	mov	r1, r6
	ldr	r2, .L46+12
	ldr	r0, [r0]
	bl	sdev_printk
	mov	r1, r0
	mov	r0, #3
	bl	SCSI_LOG_SCAN_BUS
	mov	r3, #3
	mov	r5, #0
	str	r3, [fp, #-68]
.L7:
	mov	r8, #3
	ldr	r3, .L46+16
	ldr	r7, [fp, #-76]
	ldrb	r3, [r3]	@ zero_extendqisi2
	strb	r5, [r10]
	strb	r5, [r10, #1]
	strb	r5, [r10, #2]
	strb	r5, [r10, #3]
	strb	r5, [r10, #4]
	mov	r2, r4
	strb	r3, [r7]
	mov	r1, #0
	strb	r4, [r7, #4]
	mov	r0, r9
	bl	memset
	ldr	r3, .L46+20
	ldr	r2, .L46+24
	ldr	r3, [r3]
	ldr	r1, [r2]
	add	r2, r3, r3, lsr #31
	asr	r2, r2, #1
	mla	r3, r1, r3, r2
	sub	r2, fp, #56
	str	r2, [sp, #16]
	sub	r2, fp, #52
	str	r2, [sp, #4]
	ldr	r2, .L46+28
	str	r3, [sp, #8]
	str	r4, [sp]
	str	r8, [sp, #12]
	mov	r3, r9
	mov	r1, r7
	mov	r0, r6
	ldr	r2, [r2]
	bl	scsi_execute_req
	ldr	r3, .L46+8
	subs	r7, r0, #0
	ldr	r0, [r3]
	beq	.L42
	ldr	r3, .L46+32
	ldr	r2, .L46+36
	mov	r1, r6
	str	r7, [sp]
	bl	sdev_printk
	mov	r1, r0
	mov	r0, r8
	bl	SCSI_LOG_SCAN_BUS
	mov	r0, r7
	bl	driver_byte
	ldr	r3, .L46+40
	ldr	r3, [r3]
	cmp	r0, r3
	bne	.L8
	sub	r0, fp, #52
	bl	scsi_sense_valid
	cmp	r0, #0
	beq	.L8
	ldr	r3, .L46+44
	ldr	r2, [fp, #-52]
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L8
	ldr	r3, [fp, #-48]
	sub	r3, r3, #40
	cmp	r3, #1
	bhi	.L8
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	beq	.L21
.L8:
	cmp	r7, #0
	beq	.L33
	ldr	r3, [fp, #-64]
	cmp	r3, #2
	bne	.L14
	ldr	r0, .L46+8
	mov	r3, r4
	mov	r1, r6
	ldr	r2, .L46+48
	ldr	r0, [r0]
	bl	sdev_printk
	mov	r3, #3
	ldr	r4, [fp, #-72]
	str	r3, [fp, #-64]
	b	.L3
.L42:
	ldr	r3, .L46+52
	mov	r1, r6
	ldr	r2, .L46+36
	str	r7, [sp]
	bl	sdev_printk
	mov	r1, r0
	mov	r0, r8
	bl	SCSI_LOG_SCAN_BUS
	ldr	r3, [fp, #-56]
	cmp	r4, r3
	beq	.L21
.L33:
	add	r8, r9, #8
	add	r5, r9, #16
	mov	r1, #8
	mov	r0, r8
	bl	scsi_sanitize_inquiry_string
	mov	r0, r5
	mov	r1, #16
	bl	scsi_sanitize_inquiry_string
	mov	r1, #4
	add	r0, r9, #32
	bl	scsi_sanitize_inquiry_string
	ldrb	r3, [r9, #4]	@ zero_extendqisi2
	mov	r2, r5
	mov	r1, r8
	mov	r0, r6
	add	r5, r3, #5
	bl	scsi_get_device_flags
	ldr	r3, [fp, #-72]
	cmp	r5, #255
	movgt	r5, r3
	ldr	r3, [fp, #-64]
	cmp	r3, #1
	ldr	r3, [fp, #-80]
	str	r0, [r3]
	bne	.L11
	ldr	r3, .L46+56
	ldr	r3, [r3]
	tst	r0, r3
	movne	r3, #36
	bne	.L12
	ldr	r3, [r6]
	cmp	r3, #0
	moveq	r3, r5
.L12:
	cmp	r3, r4
	ble	.L11
	mov	r4, r3
	mov	r3, #2
	str	r3, [fp, #-64]
	b	.L3
.L21:
	ldr	r3, [fp, #-68]
	subs	r3, r3, #1
	str	r3, [fp, #-68]
	beq	.L8
	b	.L7
.L14:
	ldr	r3, .L46+60
	ldr	r0, [r3]
	rsb	r3, r0, #0
	mov	r7, r3
.L1:
	ldr	r3, .L46+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L43
	mov	r0, r7
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L11:
	mov	r1, r5
	mov	r0, r4
	bl	min
	cmp	r0, #35
	str	r0, [r6]
	bgt	.L20
	ldr	r1, [r6, #12]
	ldr	r3, [r1]
	cmp	r3, #0
	beq	.L44
.L15:
	mov	r3, #36
	str	r3, [r6]
.L20:
	ldrb	r3, [r9, #2]	@ zero_extendqisi2
	tst	r3, #6
	and	r3, r3, #7
	strb	r3, [r6, #4]
	beq	.L45
.L16:
	add	r3, r3, #1
	and	r3, r3, #255
	strb	r3, [r6, #4]
.L17:
	mov	r1, #0
	ldr	r0, [r6, #16]
	ldr	r2, .L46+64
	str	r3, [r0]
	ldr	r2, [r2]
	str	r1, [r6, #8]
	cmp	r3, r2
	bgt	.L1
	ldr	r2, .L46+68
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L1
	ldr	r3, [r6, #12]
	ldr	r3, [r3, #4]
	cmp	r3, r1
	moveq	r2, #1
	moveq	r7, r3
	streq	r2, [r6, #8]
	b	.L1
.L45:
	cmp	r3, #1
	bne	.L17
	ldrb	r2, [r9, #3]	@ zero_extendqisi2
	and	r2, r2, #15
	cmp	r2, #1
	bne	.L17
	b	.L16
.L44:
	ldr	r2, .L46+8
	mov	r3, r0
	ldr	r0, [r2]
	ldr	r2, .L46+72
	bl	shost_printk
	mov	r2, #1
	ldr	r3, [r6, #12]
	str	r2, [r3]
	b	.L15
.L43:
	bl	__stack_chk_fail
.L47:
	.align	2
.L46:
	.word	MAX_COMMAND_SIZE
	.word	.LC6
	.word	KERN_INFO
	.word	.LC0
	.word	INQUIRY
	.word	HZ
	.word	scsi_inq_timeout
	.word	DMA_FROM_DEVICE
	.word	.LC5
	.word	.LC4
	.word	DRIVER_SENSE
	.word	UNIT_ATTENTION
	.word	.LC1
	.word	.LC3
	.word	BLIST_INQUIRY_36
	.word	EIO
	.word	SCSI_2
	.word	SCSI_UNKNOWN
	.word	.LC2
	.size	scsi_probe_lun, .-scsi_probe_lun
	.comm	scsi_inq_timeout,4,4
	.comm	UNIT_ATTENTION,4,4
	.comm	SCSI_UNKNOWN,4,4
	.comm	SCSI_2,4,4
	.comm	MAX_COMMAND_SIZE,4,4
	.comm	KERN_INFO,4,4
	.comm	INQUIRY,1,1
	.comm	HZ,4,4
	.comm	EIO,4,4
	.comm	DRIVER_SENSE,4,4
	.comm	DMA_FROM_DEVICE,4,4
	.comm	BLIST_INQUIRY_36,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
