	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function idetape_position_tape
_idetape_position_tape:                 ## @idetape_position_tape
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movl	%edx, %r12d
	movl	%esi, %r13d
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	8(%rax), %rcx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	(%rax), %rax
	movq	_IDETAPE_DIR_READ@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	___ide_tape_discard_merge_buffer
LBB0_2:
	movq	_HZ@GOTPCREL(%rip), %rax
	imull	$300, (%rax), %esi              ## imm = 0x12C
	movq	%rbx, %rdi
	callq	_idetape_wait_ready
	leaq	-56(%rbp), %r14
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	%r13d, %edx
	movl	%r12d, %ecx
	movl	%r15d, %r8d
	callq	_idetape_create_locate_cmd
	movq	%rbx, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%r14, %rdx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_ide_queue_pc_tail
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_ide_tape_read_position
	movl	%eax, %ecx
	sarl	$31, %eax
	andl	%ecx, %eax
LBB0_4:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IDETAPE_DIR_READ,8,3           ## @IDETAPE_DIR_READ
	.comm	_HZ,4,2                         ## @HZ
	.no_dead_strip	_idetape_position_tape
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function idetape_position_tape
_idetape_position_tape:                 ; @idetape_position_tape
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
	mov	x19, x0
	ldr	x8, [x0]
	ldp	x8, x20, [x8]
Lloh0:
	adrp	x9, _IDETAPE_DIR_READ@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IDETAPE_DIR_READ@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	___ide_tape_discard_merge_buffer
LBB0_2:
Lloh3:
	adrp	x8, _HZ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	w9, #300
	mul	w1, w8, w9
	mov	x0, x19
	bl	_idetape_wait_ready
	add	x1, sp, #8
	mov	x0, x19
	mov	x2, x23
	mov	x3, x22
	mov	x4, x21
	bl	_idetape_create_locate_cmd
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, x20
	mov	x3, #0
	mov	w4, #0
	bl	_ide_queue_pc_tail
	cbnz	w0, LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_ide_tape_read_position
	cmp	w0, #0
	csel	w0, w0, wzr, lt
LBB0_4:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_IDETAPE_DIR_READ,8,3           ; @IDETAPE_DIR_READ
	.comm	_HZ,4,2                         ; @HZ
	.no_dead_strip	_idetape_position_tape
.subsections_via_symbols
