	.file	"extr_scsi_debug.c_resp_mode_sense.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	resp_mode_sense, @function
resp_mode_sense:
.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	r14d, esi
	push	r13
	.cfi_offset 13, -40
	mov	r13, rdi
	push	r12
	push	rbx
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	rbx, rdx
	sub	rsp, 72
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR SDEBUG_MAX_MSENSE_SZ[rip]
	mov	rdi, rsp
	add	rax, 15
	mov	rdx, rax
	and	rax, -4096
	sub	rdi, rax
	and	rdx, -16
	mov	rax, rdi
	cmp	rsp, rax
	je	.L3
.L77:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L77
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L78
.L4:
	mov	rdx, rbx
	mov	esi, 1
	mov	rdi, r13
	mov	r12, QWORD PTR 0[r13]
	call	check_readiness@PLT
	mov	r15, rsp
	mov	r10d, eax
	test	eax, eax
	jne	.L1
	movzx	eax, BYTE PTR 2[r12]
	movzx	edx, BYTE PTR 1[r12]
	movzx	edi, BYTE PTR MODE_SENSE[rip]
	mov	r11d, eax
	and	eax, 63
	mov	ecx, edx
	shr	r11b, 6
	mov	BYTE PTR -68[rbp], al
	movzx	eax, BYTE PTR 3[r12]
	and	ecx, 8
	movzx	esi, r11b
	mov	BYTE PTR -70[rbp], dil
	mov	DWORD PTR -92[rbp], esi
	movzx	esi, BYTE PTR [r12]
	mov	BYTE PTR -71[rbp], al
	mov	DWORD PTR -76[rbp], eax
	mov	rax, QWORD PTR scsi_debug_ptype[rip]
	mov	BYTE PTR -69[rbp], sil
	cmp	sil, dil
	je	.L6
	and	edx, 16
	je	.L79
	test	rax, rax
	je	.L43
.L75:
	xor	ecx, ecx
.L44:
	movzx	eax, WORD PTR 7[r12]
	rol	ax, 8
	movzx	eax, ax
	mov	DWORD PTR -96[rbp], eax
.L10:
	mov	edx, DWORD PTR SDEBUG_MAX_MSENSE_SZ[rip]
	xor	esi, esi
	mov	rdi, r15
	mov	DWORD PTR -88[rbp], r10d
	mov	DWORD PTR -84[rbp], ecx
	mov	BYTE PTR -80[rbp], r11b
	call	memset@PLT
	movzx	r11d, BYTE PTR -80[rbp]
	mov	ecx, DWORD PTR -84[rbp]
	mov	r10d, DWORD PTR -88[rbp]
	cmp	r11b, 3
	je	.L80
	mov	rax, QWORD PTR 8[rbx]
	imul	edx, DWORD PTR [rbx], 1000
	mov	rax, QWORD PTR [rax]
	mov	eax, DWORD PTR [rax]
	add	eax, 1
	imul	eax, eax, 2000
	lea	eax, -3[rax+rdx]
	mov	DWORD PTR -80[rbp], eax
	xor	eax, eax
	cmp	QWORD PTR scsi_debug_ptype[rip], 0
	je	.L81
.L12:
	movzx	edi, BYTE PTR -70[rbp]
	mov	edx, ecx
	cmp	BYTE PTR -69[rbp], dil
	je	.L82
	mov	BYTE PTR 3[r15], al
	cmp	ecx, 16
	jne	.L15
	mov	BYTE PTR 4[r15], 1
.L15:
	mov	BYTE PTR 7[r15], dl
	mov	r12d, 8
	mov	r11d, 8
.L14:
	add	r12, r15
	test	ecx, ecx
	je	.L16
	mov	eax, DWORD PTR sdebug_capacity[rip]
	test	eax, eax
	je	.L83
.L17:
	cmp	ecx, 8
	jne	.L18
	mov	eax, DWORD PTR sdebug_capacity[rip]
	cmp	DWORD PTR sdebug_capacity[rip], -1
	mov	edx, -1
	bswap	eax
	cmove	eax, edx
	add	r11d, 8
	mov	DWORD PTR [r12], eax
	movzx	eax, WORD PTR scsi_debug_sector_size[rip]
	rol	ax, 8
	mov	WORD PTR 6[r12], ax
	movsx	r12, r11d
	add	r12, r15
.L16:
	mov	eax, DWORD PTR -76[rbp]
	sub	eax, 1
	cmp	eax, 253
	ja	.L72
	cmp	BYTE PTR -68[rbp], 25
	jne	.L24
.L23:
	mov	ecx, DWORD PTR -76[rbp]
	lea	eax, -3[rcx]
	cmp	eax, 251
	jbe	.L24
	movzx	eax, BYTE PTR -71[rbp]
	cmp	ecx, 255
	sete	bl
	sub	eax, 1
	cmp	al, -3
	ja	.L84
.L35:
	cmp	DWORD PTR -76[rbp], 1
	je	.L54
	test	bl, bl
	jne	.L54
.L36:
	cmp	DWORD PTR -76[rbp], 2
	je	.L55
	test	bl, bl
	jne	.L55
.L38:
	lea	esi, [r11+r10]
	jmp	.L33
.L27:
	mov	esi, DWORD PTR -92[rbp]
	mov	edx, r14d
	mov	rdi, r12
	mov	DWORD PTR -68[rbp], r11d
	call	resp_iec_m_pg@PLT
	mov	r11d, DWORD PTR -68[rbp]
	lea	esi, [r11+rax]
	.p2align 4,,10
	.p2align 3
.L33:
	movzx	ebx, BYTE PTR -70[rbp]
	cmp	BYTE PTR -69[rbp], bl
	je	.L85
	lea	eax, -2[rsi]
	movzx	eax, ah
	mov	BYTE PTR [r15], al
	lea	eax, -2[rsi]
	mov	BYTE PTR 1[r15], al
.L42:
	mov	edi, DWORD PTR -96[rbp]
	call	min@PLT
	mov	rsi, r15
	mov	rdi, r13
	mov	edx, eax
	call	fill_from_dev_buffer@PLT
	mov	r10d, eax
.L1:
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L86
	lea	rsp, -40[rbp]
	mov	eax, r10d
	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
.L72:
	.cfi_restore_state
	movzx	eax, BYTE PTR -68[rbp]
	lea	rdx, .L26[rip]
	movsx	rax, DWORD PTR [rdx+rax*4]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L26:
	.long	.L24-.L26
	.long	.L32-.L26
	.long	.L31-.L26
	.long	.L30-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L29-.L26
	.long	.L24-.L26
	.long	.L28-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L23-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L27-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L24-.L26
	.long	.L25-.L26
	.text
	.p2align 4,,10
	.p2align 3
.L6:
	test	rax, rax
	je	.L45
	xor	ecx, ecx
.L46:
	movzx	eax, BYTE PTR 4[r12]
	mov	DWORD PTR -96[rbp], eax
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L79:
	test	rax, rax
	jne	.L75
	test	cl, cl
	sete	cl
	movzx	ecx, cl
	sal	ecx, 3
	jmp	.L44
.L25:
	movzx	eax, BYTE PTR -71[rbp]
	mov	DWORD PTR -68[rbp], r11d
	sub	eax, 1
	cmp	al, -3
	ja	.L87
.L24:
	mov	edx, DWORD PTR INVALID_FIELD_IN_CDB[rip]
	mov	esi, DWORD PTR ILLEGAL_REQUEST[rip]
	xor	ecx, ecx
	mov	rdi, rbx
	call	mk_sense_buffer@PLT
	mov	r10d, DWORD PTR check_condition_result[rip]
	jmp	.L1
.L28:
	mov	esi, DWORD PTR -92[rbp]
	mov	edx, r14d
	mov	rdi, r12
	mov	DWORD PTR -68[rbp], r11d
	call	resp_ctrl_m_pg@PLT
	mov	r11d, DWORD PTR -68[rbp]
	lea	esi, [r11+rax]
	jmp	.L33
.L29:
	mov	esi, DWORD PTR -92[rbp]
	mov	edx, r14d
	mov	rdi, r12
	mov	DWORD PTR -68[rbp], r11d
	call	resp_caching_pg@PLT
	mov	r11d, DWORD PTR -68[rbp]
	lea	esi, [r11+rax]
	jmp	.L33
.L30:
	mov	esi, DWORD PTR -92[rbp]
	mov	edx, r14d
	mov	rdi, r12
	mov	DWORD PTR -68[rbp], r11d
	call	resp_format_pg@PLT
	mov	r11d, DWORD PTR -68[rbp]
	lea	esi, [r11+rax]
	jmp	.L33
.L31:
	mov	esi, DWORD PTR -92[rbp]
	mov	edx, r14d
	mov	rdi, r12
	mov	DWORD PTR -68[rbp], r11d
	call	resp_disconnect_pg@PLT
	mov	r11d, DWORD PTR -68[rbp]
	lea	esi, [r11+rax]
	jmp	.L33
.L32:
	mov	esi, DWORD PTR -92[rbp]
	mov	edx, r14d
	mov	rdi, r12
	mov	DWORD PTR -68[rbp], r11d
	call	resp_err_recov_pg@PLT
	mov	r11d, DWORD PTR -68[rbp]
	lea	esi, [r11+rax]
	jmp	.L33
	.p2align 4,,10
	.p2align 3
.L78:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L45:
	test	cl, cl
	sete	cl
	movzx	ecx, cl
	sal	ecx, 3
	jmp	.L46
	.p2align 4,,10
	.p2align 3
.L43:
	test	cl, cl
	sete	cl
	movzx	ecx, cl
	sal	ecx, 4
	jmp	.L44
	.p2align 4,,10
	.p2align 3
.L83:
	xor	eax, eax
	mov	DWORD PTR -100[rbp], r10d
	mov	DWORD PTR -88[rbp], ecx
	mov	DWORD PTR -84[rbp], r11d
	call	get_sdebug_capacity@PLT
	mov	r10d, DWORD PTR -100[rbp]
	mov	ecx, DWORD PTR -88[rbp]
	mov	DWORD PTR sdebug_capacity[rip], eax
	mov	r11d, DWORD PTR -84[rbp]
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L18:
	cmp	ecx, 16
	jne	.L16
	movsx	rdx, DWORD PTR sdebug_capacity[rip]
	lea	rax, 7[r12]
	.p2align 4,,10
	.p2align 3
.L21:
	mov	rcx, rax
	mov	BYTE PTR [rax], dl
	shr	rdx, 8
	sub	rax, 1
	cmp	rcx, r12
	jne	.L21
	mov	eax, DWORD PTR scsi_debug_sector_size[rip]
	add	r11d, 16
	bswap	eax
	mov	DWORD PTR 12[r12], eax
	movsx	r12, r11d
	add	r12, r15
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L82:
	mov	BYTE PTR 2[r15], al
	mov	r12d, 4
	mov	r11d, 4
	mov	BYTE PTR 3[r15], cl
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L81:
	mov	edi, r14d
	mov	DWORD PTR -88[rbp], r10d
	mov	DWORD PTR -84[rbp], ecx
	call	DEV_READONLY@PLT
	mov	r10d, DWORD PTR -88[rbp]
	mov	ecx, DWORD PTR -84[rbp]
	cmp	rax, 1
	sbb	eax, eax
	and	eax, -128
	sub	eax, 112
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L85:
	lea	eax, -1[rsi]
	mov	BYTE PTR [r15], al
	jmp	.L42
	.p2align 4,,10
	.p2align 3
.L80:
	mov	edx, DWORD PTR SAVING_PARAMS_UNSUP[rip]
	mov	esi, DWORD PTR ILLEGAL_REQUEST[rip]
	xor	ecx, ecx
	mov	rdi, rbx
	call	mk_sense_buffer@PLT
	mov	r10d, DWORD PTR check_condition_result[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L87:
	mov	esi, DWORD PTR -92[rbp]
	mov	edx, r14d
	mov	rdi, r12
	call	resp_err_recov_pg@PLT
	mov	esi, DWORD PTR -92[rbp]
	mov	edx, r14d
	movsx	rdi, eax
	mov	rbx, rdi
	add	rdi, r12
	call	resp_disconnect_pg@PLT
	mov	esi, DWORD PTR -92[rbp]
	mov	edx, r14d
	add	ebx, eax
	movsx	rdi, ebx
	add	rdi, r12
	call	resp_format_pg@PLT
	mov	esi, DWORD PTR -92[rbp]
	mov	edx, r14d
	add	ebx, eax
	movsx	rdi, ebx
	add	rdi, r12
	call	resp_caching_pg@PLT
	mov	esi, DWORD PTR -92[rbp]
	mov	edx, r14d
	add	ebx, eax
	movsx	rdi, ebx
	add	rdi, r12
	call	resp_ctrl_m_pg@PLT
	mov	esi, DWORD PTR -92[rbp]
	mov	edx, r14d
	add	ebx, eax
	movsx	rdi, ebx
	add	rdi, r12
	call	resp_sas_sf_m_pg@PLT
	mov	r11d, DWORD PTR -68[rbp]
	add	ebx, eax
	movsx	rdi, ebx
	add	rdi, r12
	cmp	DWORD PTR -76[rbp], 255
	je	.L88
.L40:
	mov	esi, DWORD PTR -92[rbp]
	mov	edx, r14d
	mov	DWORD PTR -68[rbp], r11d
	call	resp_iec_m_pg@PLT
	mov	r11d, DWORD PTR -68[rbp]
	add	eax, ebx
	lea	esi, [rax+r11]
	jmp	.L33
	.p2align 4,,10
	.p2align 3
.L55:
	movsx	rdi, r10d
	mov	esi, DWORD PTR -92[rbp]
	mov	DWORD PTR -76[rbp], r11d
	add	rdi, r12
	mov	DWORD PTR -68[rbp], r10d
	call	resp_sas_sha_m_spg@PLT
	mov	r10d, DWORD PTR -68[rbp]
	mov	r11d, DWORD PTR -76[rbp]
	add	r10d, eax
	jmp	.L38
	.p2align 4,,10
	.p2align 3
.L54:
	movsx	rdi, r10d
	mov	ecx, DWORD PTR -80[rbp]
	mov	esi, DWORD PTR -92[rbp]
	mov	edx, r14d
	add	rdi, r12
	mov	DWORD PTR -84[rbp], r11d
	mov	DWORD PTR -68[rbp], r10d
	call	resp_sas_pcd_m_spg@PLT
	mov	r10d, DWORD PTR -68[rbp]
	mov	r11d, DWORD PTR -84[rbp]
	add	r10d, eax
	jmp	.L36
	.p2align 4,,10
	.p2align 3
.L84:
	mov	esi, DWORD PTR -92[rbp]
	mov	edx, r14d
	mov	rdi, r12
	mov	DWORD PTR -68[rbp], r11d
	call	resp_sas_sf_m_pg@PLT
	mov	r11d, DWORD PTR -68[rbp]
	mov	r10d, eax
	jmp	.L35
.L88:
	mov	ecx, DWORD PTR -80[rbp]
	mov	esi, DWORD PTR -92[rbp]
	mov	edx, r14d
	call	resp_sas_pcd_m_spg@PLT
	mov	esi, DWORD PTR -92[rbp]
	add	ebx, eax
	movsx	rdi, ebx
	add	rdi, r12
	call	resp_sas_sha_m_spg@PLT
	mov	r11d, DWORD PTR -68[rbp]
	add	ebx, eax
	movsx	rdi, ebx
	add	rdi, r12
	jmp	.L40
.L86:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	resp_mode_sense, .-resp_mode_sense
	.comm	sdebug_capacity,4,4
	.comm	scsi_debug_sector_size,4,4
	.comm	scsi_debug_ptype,8,8
	.comm	check_condition_result,4,4
	.comm	SDEBUG_MAX_MSENSE_SZ,4,4
	.comm	SAVING_PARAMS_UNSUP,4,4
	.comm	MODE_SENSE,1,1
	.comm	INVALID_FIELD_IN_CDB,4,4
	.comm	ILLEGAL_REQUEST,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_debug.c_resp_mode_sense.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	resp_mode_sense, %function
resp_mode_sense:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #44
	mov	ip, r1
	ldr	r10, .L73
	str	ip, [fp, #-64]
	ldr	r3, [r10]
	mov	r1, #1
	add	r3, r3, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	ldr	r3, .L73+4
	mov	r9, r0
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	mov	r8, r2
	ldr	r7, [r0]
	bl	check_readiness
	subs	r4, r0, #0
	bne	.L1
	ldr	r2, .L73+8
	ldrb	r1, [r7, #1]	@ zero_extendqisi2
	ldr	r3, .L73+12
	ldrb	r0, [r2]	@ zero_extendqisi2
	ldrb	ip, [r7]	@ zero_extendqisi2
	ldrb	r2, [r7, #2]	@ zero_extendqisi2
	ldr	r3, [r3]
	lsr	r5, r1, #3
	eor	r5, r5, #1
	cmp	r3, #0
	movne	r5, #0
	andeq	r5, r5, #1
	str	r0, [fp, #-60]
	cmp	ip, r0
	lsr	r0, r2, #6
	and	r2, r2, #63
	str	r2, [fp, #-48]
	ldrb	r2, [r7, #3]	@ zero_extendqisi2
	mov	r6, sp
	str	ip, [fp, #-56]
	str	r0, [fp, #-52]
	str	r2, [fp, #-68]
	beq	.L3
	tst	r1, #16
	ldrb	r2, [r7, #7]	@ zero_extendqisi2
	ldrb	r1, [r7, #8]	@ zero_extendqisi2
	lsleq	r5, r5, #3
	orr	r2, r2, r1, lsl #8
	lsr	r1, r2, #8
	orr	r2, r1, r2, lsl #8
	lsl	r2, r2, #16
	lsr	r2, r2, #16
	lslne	r5, r5, #4
	str	r2, [fp, #-76]
.L7:
	ldr	r2, [r10]
	mov	r1, #0
	mov	r0, r6
	str	r3, [fp, #-72]
	bl	memset
	ldr	r3, [fp, #-52]
	cmp	r3, #3
	ldreq	r2, .L73+16
	ldr	r3, [fp, #-72]
	beq	.L61
	ldr	r1, [r8, #4]
	ldr	r2, [r8]
	ldr	r1, [r1]
	cmp	r3, #0
	ldr	r3, [r1]
	rsb	r0, r2, r2, lsl #5
	add	r3, r3, #1
	rsb	r1, r3, r3, lsl #5
	add	r2, r2, r0, lsl #2
	add	r3, r3, r1, lsl #2
	lsl	r2, r2, #3
	add	r2, r2, r3, lsl #4
	sub	r3, r2, #3
	str	r3, [fp, #-72]
	movne	r2, #0
	beq	.L63
.L9:
	ldr	r3, [fp, #-56]
	ldr	r1, [fp, #-60]
	cmp	r3, r1
	and	r3, r5, #255
	beq	.L64
	mov	r7, #8
	cmp	r5, #16
	strb	r2, [r6, #3]
	moveq	r2, #1
	mov	r10, r7
	strbeq	r2, [r6, #4]
	strb	r3, [r6, #7]
.L11:
	cmp	r5, #0
	add	r7, r6, r7
	beq	.L13
	ldr	r3, .L73+20
	ldr	r2, [r3]
	cmp	r2, #0
	beq	.L65
.L14:
	cmp	r5, #8
	bne	.L15
	ldr	r3, [r3]
	cmn	r3, #1
	beq	.L66
	lsr	r1, r3, #24
	asr	r2, r3, #16
	strb	r3, [r7, #3]
	asr	r3, r3, #8
	strb	r1, [r7]
	strb	r2, [r7, #1]
	strb	r3, [r7, #2]
.L17:
	ldr	r3, .L73+24
	add	r10, r10, #8
	ldr	r3, [r3]
	asr	r2, r3, #8
	strb	r3, [r7, #7]
	strb	r2, [r7, #6]
	add	r7, r6, r10
.L13:
	ldr	r3, [fp, #-68]
	sub	r2, r3, #1
	cmp	r2, #253
	ldr	r3, [fp, #-48]
	bhi	.L19
	cmp	r3, #25
	bne	.L21
.L20:
	ldr	r1, [fp, #-68]
	sub	r3, r1, #3
	cmp	r3, #251
	bls	.L21
	sub	r5, r1, #255
	clz	r5, r5
	and	r2, r2, #255
	cmp	r2, #253
	lsr	r5, r5, #5
	bhi	.L67
.L32:
	ldr	r3, [fp, #-68]
	cmp	r3, #1
	movne	r3, r5
	orreq	r3, r5, #1
	cmp	r3, #0
	bne	.L68
.L33:
	ldr	r3, [fp, #-68]
	cmp	r3, #2
	orreq	r5, r5, #1
	cmp	r5, #0
	bne	.L69
.L34:
	add	r1, r10, r4
	b	.L30
.L24:
	ldr	r1, [fp, #-52]
	mov	r0, r7
	ldr	r2, [fp, #-64]
	bl	resp_iec_m_pg
	add	r1, r10, r0
.L30:
	ldr	r2, [fp, #-60]
	ldr	r3, [fp, #-56]
	ldr	r0, [fp, #-76]
	cmp	r3, r2
	subne	r2, r1, #2
	and	r3, r1, #255
	asrne	r2, r2, #8
	subeq	r3, r3, #1
	subne	r3, r3, #2
	strbne	r2, [r6]
	strbeq	r3, [r6]
	strbne	r3, [r6, #1]
	bl	min
	mov	r1, r6
	mov	r2, r0
	mov	r0, r9
	bl	fill_from_dev_buffer
	mov	r4, r0
.L1:
	ldr	r3, .L73+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L70
	mov	r0, r4
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L3:
	ldrb	r2, [r7, #4]	@ zero_extendqisi2
	lsl	r5, r5, #3
	str	r2, [fp, #-76]
	b	.L7
.L19:
	sub	r3, r3, #1
	cmp	r3, #62
	ldrls	pc, [pc, r3, asl #2]
	b	.L21
.L23:
	.word	.L29
	.word	.L28
	.word	.L27
	.word	.L21
	.word	.L21
	.word	.L21
	.word	.L21
	.word	.L26
	.word	.L21
	.word	.L25
	.word	.L21
	.word	.L21
	.word	.L21
	.word	.L21
	.word	.L21
	.word	.L21
	.word	.L21
	.word	.L21
	.word	.L21
	.word	.L21
	.word	.L21
	.word	.L21
	.word	.L21
	.word	.L21
	.word	.L20
	.word	.L21
	.word	.L21
	.word	.L24
	.word	.L21
	.word	.L21
	.word	.L21
	.word	.L21
	.word	.L21
	.word	.L21
	.word	.L21
	.word	.L21
	.word	.L21
	.word	.L21
	.word	.L21
	.word	.L21
	.word	.L21
	.word	.L21
	.word	.L21
	.word	.L21
	.word	.L21
	.word	.L21
	.word	.L21
	.word	.L21
	.word	.L21
	.word	.L21
	.word	.L21
	.word	.L21
	.word	.L21
	.word	.L21
	.word	.L21
	.word	.L21
	.word	.L21
	.word	.L21
	.word	.L21
	.word	.L21
	.word	.L21
	.word	.L21
	.word	.L22
.L22:
	and	r2, r2, #255
	cmp	r2, #253
	bhi	.L71
.L21:
	ldr	r2, .L73+28
.L61:
	ldr	r3, .L73+32
	mov	r0, r8
	ldr	r1, [r3]
	ldr	r2, [r2]
	mov	r3, #0
	bl	mk_sense_buffer
	ldr	r3, .L73+36
	ldr	r4, [r3]
	b	.L1
.L25:
	ldr	r1, [fp, #-52]
	mov	r0, r7
	ldr	r2, [fp, #-64]
	bl	resp_ctrl_m_pg
	add	r1, r10, r0
	b	.L30
.L26:
	ldr	r1, [fp, #-52]
	mov	r0, r7
	ldr	r2, [fp, #-64]
	bl	resp_caching_pg
	add	r1, r10, r0
	b	.L30
.L27:
	ldr	r1, [fp, #-52]
	mov	r0, r7
	ldr	r2, [fp, #-64]
	bl	resp_format_pg
	add	r1, r10, r0
	b	.L30
.L28:
	ldr	r1, [fp, #-52]
	mov	r0, r7
	ldr	r2, [fp, #-64]
	bl	resp_disconnect_pg
	add	r1, r10, r0
	b	.L30
.L29:
	ldr	r1, [fp, #-52]
	mov	r0, r7
	ldr	r2, [fp, #-64]
	bl	resp_err_recov_pg
	add	r1, r10, r0
	b	.L30
.L65:
	bl	get_sdebug_capacity
	ldr	r3, .L73+20
	str	r0, [r3]
	b	.L14
.L15:
	cmp	r5, #16
	bne	.L13
	ldr	r2, [r3]
	add	r0, r7, #8
	asr	r3, r2, #31
.L18:
	lsr	r1, r2, #8
	strb	r2, [r0, #-1]!
	orr	r1, r1, r3, lsl #24
	lsr	ip, r3, #8
	cmp	r0, r7
	mov	r2, r1
	mov	r3, ip
	bne	.L18
	ldr	r3, .L73+24
	add	r10, r10, #16
	ldr	r3, [r3]
	lsr	r1, r3, #24
	asr	r2, r3, #16
	strb	r3, [r7, #15]
	asr	r3, r3, #8
	strb	r1, [r7, #12]
	strb	r2, [r7, #13]
	strb	r3, [r7, #14]
	add	r7, r6, r10
	b	.L13
.L64:
	mov	r7, #4
	strb	r2, [r6, #2]
	mov	r10, r7
	strb	r3, [r6, #3]
	b	.L11
.L63:
	ldr	r0, [fp, #-64]
	bl	DEV_READONLY
	cmp	r0, #0
	movne	r2, #144
	moveq	r2, #16
	b	.L9
.L66:
	strb	r3, [r7]
	strb	r3, [r7, #1]
	strb	r3, [r7, #2]
	strb	r3, [r7, #3]
	b	.L17
.L71:
	ldr	r8, [fp, #-64]
	ldr	r5, [fp, #-52]
	mov	r2, r8
	mov	r1, r5
	mov	r0, r7
	bl	resp_err_recov_pg
	mov	r2, r8
	mov	r4, r0
	mov	r1, r5
	add	r0, r7, r0
	bl	resp_disconnect_pg
	add	r4, r4, r0
	mov	r2, r8
	mov	r1, r5
	add	r0, r7, r4
	bl	resp_format_pg
	add	r4, r4, r0
	mov	r2, r8
	mov	r1, r5
	add	r0, r7, r4
	bl	resp_caching_pg
	add	r4, r4, r0
	mov	r2, r8
	mov	r1, r5
	add	r0, r7, r4
	bl	resp_ctrl_m_pg
	add	r4, r4, r0
	add	r0, r7, r4
	mov	r2, r8
	mov	r1, r5
	bl	resp_sas_sf_m_pg
	ldr	r3, [fp, #-68]
	add	r4, r4, r0
	cmp	r3, #255
	add	r0, r7, r4
	beq	.L72
.L35:
	ldr	r1, [fp, #-52]
	ldr	r2, [fp, #-64]
	bl	resp_iec_m_pg
	add	r4, r4, r0
	add	r1, r4, r10
	b	.L30
.L69:
	add	r0, r7, r4
	ldr	r1, [fp, #-52]
	bl	resp_sas_sha_m_spg
	add	r4, r4, r0
	b	.L34
.L68:
	add	r0, r7, r4
	ldr	r3, [fp, #-72]
	ldr	r2, [fp, #-64]
	ldr	r1, [fp, #-52]
	bl	resp_sas_pcd_m_spg
	add	r4, r4, r0
	b	.L33
.L67:
	mov	r0, r7
	ldr	r2, [fp, #-64]
	ldr	r1, [fp, #-52]
	bl	resp_sas_sf_m_pg
	mov	r4, r0
	b	.L32
.L72:
	ldr	r5, [fp, #-52]
	ldr	r3, [fp, #-72]
	mov	r1, r5
	ldr	r2, [fp, #-64]
	bl	resp_sas_pcd_m_spg
	add	r4, r4, r0
	add	r0, r7, r4
	mov	r1, r5
	bl	resp_sas_sha_m_spg
	add	r4, r4, r0
	add	r0, r7, r4
	b	.L35
.L70:
	bl	__stack_chk_fail
.L74:
	.align	2
.L73:
	.word	SDEBUG_MAX_MSENSE_SZ
	.word	.LC0
	.word	MODE_SENSE
	.word	scsi_debug_ptype
	.word	SAVING_PARAMS_UNSUP
	.word	sdebug_capacity
	.word	scsi_debug_sector_size
	.word	INVALID_FIELD_IN_CDB
	.word	ILLEGAL_REQUEST
	.word	check_condition_result
	.size	resp_mode_sense, .-resp_mode_sense
	.comm	sdebug_capacity,4,4
	.comm	scsi_debug_sector_size,4,4
	.comm	scsi_debug_ptype,4,4
	.comm	check_condition_result,4,4
	.comm	SDEBUG_MAX_MSENSE_SZ,4,4
	.comm	SAVING_PARAMS_UNSUP,4,4
	.comm	MODE_SENSE,1,1
	.comm	INVALID_FIELD_IN_CDB,4,4
	.comm	ILLEGAL_REQUEST,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
