	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_track
_get_track:                             ## @get_track
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r13d
	andl	$3, %r13d
	movq	_unit@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%r13, %r12
	shlq	$4, %r12
	xorl	%r15d, %r15d
	cmpl	%esi, (%rax,%r12)
	je	LBB0_13
## %bb.1:
	movl	%esi, %r14d
	movl	%r13d, %edi
	callq	_get_fdc
	movl	%r13d, %edi
	callq	_fd_motor_on
	movl	$-1, %r15d
	testl	%eax, %eax
	je	LBB0_12
## %bb.2:
	movq	_unit@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpl	$1, 4(%rax,%r12)
	jne	LBB0_4
## %bb.3:
	movq	_flush_track_timer@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addl	%r13d, %edi
	callq	_del_timer
	movl	%r13d, %edi
	callq	_non_int_flush_track
LBB0_4:
	movq	_MAX_ERRORS@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_12
## %bb.5:
	xorl	%ebx, %ebx
	movq	_unit@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r13d, %edi
	movl	%r14d, %esi
	callq	_fd_seek
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	%r13d, %edi
	callq	_raw_read
	movq	(%r15), %rax
	movq	8(%rax,%r12), %rax
	movl	%r13d, %edi
	callq	*(%rax)
	testl	%eax, %eax
	je	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	(%r15), %rax
	movl	$-1, (%rax,%r12)
	incl	%ebx
	movq	_MAX_ERRORS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jl	LBB0_6
## %bb.11:
	movl	$-1, %r15d
	jmp	LBB0_12
LBB0_7:
	movl	$-1, %r15d
	jmp	LBB0_13
LBB0_9:
	xorl	%r15d, %r15d
LBB0_12:
	xorl	%eax, %eax
	callq	_rel_fdc
LBB0_13:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_unit,8,3                       ## @unit
	.comm	_flush_track_timer,4,2          ## @flush_track_timer
	.comm	_MAX_ERRORS,4,2                 ## @MAX_ERRORS
	.no_dead_strip	_get_track
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_track
_get_track:                             ; @get_track
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
Lloh0:
	adrp	x22, _unit@GOTPAGE
Lloh1:
	ldr	x22, [x22, _unit@GOTPAGEOFF]
	and	w20, w0, #0x3
	ldr	x8, [x22]
	lsl	x23, x20, #4
	ldr	w8, [x8, x23]
	cmp	w8, w1
	b.ne	LBB0_2
; %bb.1:
	mov	w21, #0
	b	LBB0_12
LBB0_2:
	mov	x19, x1
	mov	x0, x20
	bl	_get_fdc
	mov	x0, x20
	bl	_fd_motor_on
	cbz	w0, LBB0_10
; %bb.3:
	ldr	x8, [x22]
	add	x8, x8, x20, lsl #4
	ldr	w8, [x8, #4]
	cmp	w8, #1
	b.ne	LBB0_5
; %bb.4:
Lloh2:
	adrp	x8, _flush_track_timer@GOTPAGE
Lloh3:
	ldr	x8, [x8, _flush_track_timer@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	add	w0, w8, w20
	bl	_del_timer
	mov	x0, x20
	bl	_non_int_flush_track
LBB0_5:
Lloh5:
	adrp	x24, _MAX_ERRORS@GOTPAGE
Lloh6:
	ldr	x24, [x24, _MAX_ERRORS@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.6:
	mov	w25, #0
	mov	w21, #-1
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x19
	bl	_fd_seek
	cbz	w0, LBB0_13
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x20
	bl	_raw_read
	ldr	x8, [x22]
	add	x8, x8, x20, lsl #4
	ldr	x8, [x8, #8]
	ldr	x8, [x8]
	mov	x0, x20
	blr	x8
	cbz	w0, LBB0_14
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x22]
	str	w21, [x8, x23]
	add	w25, w25, #1
	ldr	w8, [x24]
	cmp	w25, w8
	b.lt	LBB0_7
	b	LBB0_11
LBB0_10:
	mov	w21, #-1
LBB0_11:
	bl	_rel_fdc
LBB0_12:
	mov	x0, x21
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_13:
	mov	w21, #-1
	b	LBB0_12
LBB0_14:
	mov	w21, #0
	b	LBB0_11
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_unit,8,3                       ; @unit
	.comm	_flush_track_timer,4,2          ; @flush_track_timer
	.comm	_MAX_ERRORS,4,2                 ; @MAX_ERRORS
	.no_dead_strip	_get_track
.subsections_via_symbols
