	.file	"extr_ide-cd_ioctl.c_ide_cd_get_toc_entry.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ide_cd_get_toc_entry, @function
ide_cd_get_toc_entry:
.LFB0:
	.cfi_startproc
	endbr64
	mov	eax, DWORD PTR [rdi]
	test	DWORD PTR IDE_AFLAG_TOC_VALID[rip], eax
	je	.L6
	mov	rax, QWORD PTR 8[rdi]
	mov	r8d, DWORD PTR CDROM_LEADOUT[rip]
	mov	r10d, 0
	mov	rdi, QWORD PTR [rax]
	mov	r9d, DWORD PTR [rdi]
	mov	ecx, DWORD PTR 4[rdi]
	mov	eax, r9d
	sub	eax, ecx
	add	eax, 1
	cmp	ecx, r8d
	cmove	eax, r10d
	cmp	r8d, esi
	je	.L9
	cmp	ecx, esi
	jg	.L6
	cmp	r9d, esi
	jl	.L6
	mov	rax, QWORD PTR 8[rdi]
	sub	esi, ecx
	movsx	rsi, esi
	lea	rax, [rax+rsi*4]
	mov	QWORD PTR [rdx], rax
	xor	eax, eax
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	mov	rcx, QWORD PTR 8[rdi]
	cdqe
	lea	rax, [rcx+rax*4]
	mov	QWORD PTR [rdx], rax
	xor	eax, eax
	ret
	.cfi_endproc
.LFE0:
	.size	ide_cd_get_toc_entry, .-ide_cd_get_toc_entry
	.comm	IDE_AFLAG_TOC_VALID,4,4
	.comm	EINVAL,4,4
	.comm	CDROM_LEADOUT,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_ide-cd_ioctl.c_ide_cd_get_toc_entry.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ide_cd_get_toc_entry, %function
ide_cd_get_toc_entry:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L15
	ldr	ip, [r0]
	ldr	r3, [r3]
	tst	ip, r3
	beq	.L12
	ldr	r3, [r0, #4]
	ldr	r0, .L15+4
	push	{r4, lr}
	ldr	r3, [r3]
	ldr	lr, [r0]
	ldm	r3, {r0, ip}
	cmp	ip, lr
	subne	r4, r0, ip
	moveq	r4, #0
	addne	r4, r4, #1
	cmp	lr, r1
	beq	.L13
	cmp	r0, r1
	movge	r0, #0
	movlt	r0, #1
	cmp	ip, r1
	orrgt	r0, r0, #1
	cmp	r0, #0
	beq	.L14
	ldr	r3, .L15+8
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, pc}
.L13:
	ldr	r3, [r3, #8]
	mov	r0, #0
	add	r4, r3, r4, lsl #2
	str	r4, [r2]
	pop	{r4, pc}
.L12:
	ldr	r3, .L15+8
	ldr	r0, [r3]
	rsb	r0, r0, #0
	bx	lr
.L14:
	ldr	r3, [r3, #8]
	sub	r1, r1, ip
	add	r1, r3, r1, lsl #2
	str	r1, [r2]
	pop	{r4, pc}
.L16:
	.align	2
.L15:
	.word	IDE_AFLAG_TOC_VALID
	.word	CDROM_LEADOUT
	.word	EINVAL
	.size	ide_cd_get_toc_entry, .-ide_cd_get_toc_entry
	.comm	IDE_AFLAG_TOC_VALID,4,4
	.comm	EINVAL,4,4
	.comm	CDROM_LEADOUT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
