	.file	"extr_ide-tape.c_idetape_position_tape.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	idetape_position_tape, @function
idetape_position_tape:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, edx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, ecx
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rdx, QWORD PTR IDETAPE_DIR_READ[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	rax, QWORD PTR [rdi]
	mov	r15, QWORD PTR 8[rax]
	cmp	QWORD PTR [rax], rdx
	je	.L7
.L2:
	imul	esi, DWORD PTR HZ[rip], 300
	mov	rdi, rbp
	lea	r14, 4[rsp]
	call	idetape_wait_ready@PLT
	mov	edx, r12d
	mov	r8d, ebx
	mov	ecx, r13d
	mov	rsi, r14
	mov	rdi, rbp
	call	idetape_create_locate_cmd@PLT
	xor	r8d, r8d
	xor	ecx, ecx
	mov	rdx, r14
	mov	rsi, r15
	mov	rdi, rbp
	call	ide_queue_pc_tail@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L1
	mov	rdi, rbp
	call	ide_tape_read_position@PLT
	test	eax, eax
	cmovle	r12d, eax
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L8
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	call	__ide_tape_discard_merge_buffer@PLT
	jmp	.L2
.L8:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	idetape_position_tape, .-idetape_position_tape
	.comm	IDETAPE_DIR_READ,8,8
	.comm	HZ,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-tape.c_idetape_position_tape.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	idetape_position_tape, %function
idetape_position_tape:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	ip, [r0]
	ldr	lr, .L9
	ldr	r6, [ip]
	ldr	lr, [lr]
	mov	r7, r3
	ldr	r3, .L9+4
	sub	sp, sp, #16
	cmp	r6, lr
	mov	r4, r0
	mov	r5, r1
	mov	r6, r2
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	ldr	r8, [ip, #4]
	beq	.L7
.L2:
	ldr	r3, .L9+8
	mov	r0, r4
	ldr	ip, [r3]
	add	ip, ip, ip, lsl #2
	rsb	ip, ip, ip, lsl #4
	lsl	r1, ip, #2
	bl	idetape_wait_ready
	mov	r3, r6
	mov	r2, r5
	add	r1, sp, #8
	mov	r0, r4
	str	r7, [sp]
	bl	idetape_create_locate_cmd
	mov	r3, #0
	mov	r1, r8
	mov	r0, r4
	add	r2, sp, #8
	str	r3, [sp]
	bl	ide_queue_pc_tail
	cmp	r0, #0
	bne	.L1
	mov	r0, r4
	bl	ide_tape_read_position
	and	r0, r0, r0, asr #31
.L1:
	ldr	r3, .L9+4
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L8
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L7:
	bl	__ide_tape_discard_merge_buffer
	b	.L2
.L8:
	bl	__stack_chk_fail
.L10:
	.align	2
.L9:
	.word	IDETAPE_DIR_READ
	.word	.LC0
	.word	HZ
	.size	idetape_position_tape, .-idetape_position_tape
	.comm	IDETAPE_DIR_READ,4,4
	.comm	HZ,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
