	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ide_cd_fake_play_trkind
_ide_cd_fake_play_trkind:               ## @ide_cd_fake_play_trkind
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	%rsp, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_BLK_MAX_CDB@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	(%rbx), %rsi
	leaq	-72(%rbp), %rdx
	movq	%r15, %rdi
	callq	_ide_cd_get_toc_entry
	testl	%eax, %eax
	jne	LBB0_7
## %bb.1:
	movq	8(%rbx), %rsi
	leaq	-56(%rbp), %rdx
	movq	%r15, %rdi
	callq	_ide_cd_get_toc_entry
	testl	%eax, %eax
	jne	LBB0_7
## %bb.2:
	movq	8(%rbx), %rcx
	movq	_CDROM_LEADOUT@GOTPCREL(%rip), %rdx
	movq	-56(%rbp), %rax
	cmpq	(%rdx), %rcx
	je	LBB0_4
## %bb.3:
	addq	$8, %rax
	movq	%rax, -56(%rbp)
LBB0_4:
	movq	-72(%rbp), %rcx
	movq	(%rcx), %rcx
	movq	(%rax), %rbx
	cmpq	%rcx, %rbx
	jbe	LBB0_5
## %bb.6:
	movl	(%r12), %edx
	movq	%rcx, %r12
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_memset
	movq	_GPCMD_PLAY_AUDIO_MSF@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	movb	%al, (%r14)
	leaq	3(%r14), %rsi
	leaq	4(%r14), %rdx
	leaq	5(%r14), %rcx
	movq	%r12, %rdi
	callq	_lba_to_msf
	decq	%rbx
	leaq	6(%r14), %rsi
	leaq	7(%r14), %rdx
	movq	%r14, %rcx
	addq	$8, %rcx
	movq	%rbx, %rdi
	callq	_lba_to_msf
	leaq	-64(%rbp), %r9
	movq	%r15, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	pushq	$0
	pushq	$0
	callq	_ide_cd_queue_pc
	addq	$16, %rsp
	jmp	LBB0_7
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	movq	%r13, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_9
## %bb.8:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_BLK_MAX_CDB,4,2                ## @BLK_MAX_CDB
	.comm	_CDROM_LEADOUT,8,3              ## @CDROM_LEADOUT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GPCMD_PLAY_AUDIO_MSF,1,0       ## @GPCMD_PLAY_AUDIO_MSF
	.no_dead_strip	_ide_cd_fake_play_trkind
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ide_cd_fake_play_trkind
_ide_cd_fake_play_trkind:               ; @ide_cd_fake_play_trkind
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	sub	sp, sp, #32
	mov	x21, x1
	mov	x19, x0
	mov	x23, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x22, _BLK_MAX_CDB@GOTPAGE
Lloh4:
	ldr	x22, [x22, _BLK_MAX_CDB@GOTPAGEOFF]
	ldr	w8, [x22]
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x20, x9, x8
	mov	sp, x20
	ldr	x1, [x1]
	sub	x2, x29, #64
	bl	_ide_cd_get_toc_entry
	cbnz	w0, LBB0_7
; %bb.1:
	ldr	x1, [x21, #8]
	sub	x2, x29, #72
	mov	x0, x19
	bl	_ide_cd_get_toc_entry
	cbnz	w0, LBB0_7
; %bb.2:
	ldr	x9, [x21, #8]
Lloh7:
	adrp	x8, _CDROM_LEADOUT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _CDROM_LEADOUT@GOTPAGEOFF]
Lloh9:
	ldr	x10, [x8]
	ldur	x8, [x29, #-72]
	cmp	x9, x10
	b.eq	LBB0_4
; %bb.3:
	add	x8, x8, #8
	stur	x8, [x29, #-72]
LBB0_4:
	ldur	x9, [x29, #-64]
	ldr	x21, [x9]
	ldr	x24, [x8]
	cmp	x24, x21
	b.ls	LBB0_6
; %bb.5:
	ldr	w2, [x22]
	mov	x0, x20
	mov	w1, #0
	bl	_memset
Lloh10:
	adrp	x8, _GPCMD_PLAY_AUDIO_MSF@GOTPAGE
Lloh11:
	ldr	x8, [x8, _GPCMD_PLAY_AUDIO_MSF@GOTPAGEOFF]
	ldrb	w8, [x8]
	mov	x22, x20
	strb	w8, [x22], #8
	add	x1, x20, #3
	add	x2, x20, #4
	add	x3, x20, #5
	mov	x0, x21
	bl	_lba_to_msf
	sub	x0, x24, #1
	add	x1, x20, #6
	add	x2, x20, #7
	mov	x3, x22
	bl	_lba_to_msf
	sub	x5, x29, #80
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	mov	x3, #0
	mov	x4, #0
	mov	w6, #0
	mov	w7, #0
	bl	_ide_cd_queue_pc
	b	LBB0_7
LBB0_6:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	mov	sp, x23
	ldur	x8, [x29, #-56]
Lloh15:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh16:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.8:
	sub	sp, x29, #48
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_9:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_BLK_MAX_CDB,4,2                ; @BLK_MAX_CDB
	.comm	_CDROM_LEADOUT,8,3              ; @CDROM_LEADOUT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GPCMD_PLAY_AUDIO_MSF,1,0       ; @GPCMD_PLAY_AUDIO_MSF
	.no_dead_strip	_ide_cd_fake_play_trkind
.subsections_via_symbols
