	.file	"extr_scsi_debug.c_resp_readcap.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	resp_readcap, @function
resp_readcap:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r12
	.cfi_offset 12, -24
	mov	r12, rdi
	sub	rsp, 24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR SDEBUG_READCAP_ARR_SZ[rip]
	mov	rcx, rsp
	add	rax, 15
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L3
.L14:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L14
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L15
.L4:
	mov	rdx, rsi
	mov	rdi, r12
	mov	esi, 1
	call	check_readiness@PLT
	test	eax, eax
	je	.L16
.L1:
	mov	rcx, QWORD PTR -24[rbp]
	xor	rcx, QWORD PTR fs:40
	jne	.L17
	mov	r12, QWORD PTR -8[rbp]
	leave
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	call	get_sdebug_capacity@PLT
	mov	edx, DWORD PTR SDEBUG_READCAP_ARR_SZ[rip]
	xor	esi, esi
	mov	rdi, rsp
	mov	DWORD PTR sdebug_capacity[rip], eax
	call	memset@PLT
	mov	edx, DWORD PTR sdebug_capacity[rip]
	mov	rsi, rsp
	mov	rdi, r12
	cmp	edx, -1
	lea	eax, -1[rdx]
	mov	edx, -1
	bswap	eax
	cmove	eax, edx
	mov	edx, DWORD PTR SDEBUG_READCAP_ARR_SZ[rip]
	mov	DWORD PTR [rsp], eax
	movzx	eax, WORD PTR scsi_debug_sector_size[rip]
	rol	ax, 8
	mov	WORD PTR 6[rsp], ax
	call	fill_from_dev_buffer@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L15:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	resp_readcap, .-resp_readcap
	.comm	sdebug_capacity,4,4
	.comm	scsi_debug_sector_size,4,4
	.comm	SDEBUG_READCAP_ARR_SZ,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_readcap.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_readcap, %function
resp_readcap:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, fp, lr}
	add	fp, sp, #24
	sub	sp, sp, #12
	ldr	r6, .L10
	mov	r2, r1
	ldr	r3, [r6]
	mov	r1, #1
	add	r3, r3, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	ldr	r3, .L10+4
	mov	r7, r0
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	mov	r3,#0
	bl	check_readiness
	subs	r4, r0, #0
	beq	.L8
.L1:
	ldr	r3, .L10+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L9
	mov	r0, r4
	sub	sp, fp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, fp, pc}
.L8:
	bl	get_sdebug_capacity
	mov	r5, r0
	ldr	r6, [r6]
	ldr	r3, .L10+8
	mov	r1, r4
	mov	r2, r6
	mov	r0, sp
	str	r5, [r3]
	bl	memset
	cmn	r5, #1
	mov	r8, sp
	beq	.L3
	sub	r5, r5, #1
	lsr	r1, r5, #24
	lsr	r2, r5, #16
	lsr	r3, r5, #8
	strb	r5, [sp, #3]
	strb	r1, [sp]
	strb	r2, [sp, #1]
	strb	r3, [sp, #2]
.L4:
	ldr	r3, .L10+12
	mov	r2, r6
	ldr	r3, [r3]
	mov	r0, r7
	asr	ip, r3, #8
	mov	r1, r8
	strb	r3, [r8, #7]
	strb	ip, [r8, #6]
	bl	fill_from_dev_buffer
	mov	r4, r0
	b	.L1
.L3:
	strb	r5, [sp]
	strb	r5, [sp, #1]
	strb	r5, [sp, #2]
	strb	r5, [sp, #3]
	b	.L4
.L9:
	bl	__stack_chk_fail
.L11:
	.align	2
.L10:
	.word	SDEBUG_READCAP_ARR_SZ
	.word	.LC0
	.word	sdebug_capacity
	.word	scsi_debug_sector_size
	.size	resp_readcap, .-resp_readcap
	.comm	sdebug_capacity,4,4
	.comm	scsi_debug_sector_size,4,4
	.comm	SDEBUG_READCAP_ARR_SZ,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
