	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ide_cd_get_toc_entry
_ide_cd_get_toc_entry:                  ## @ide_cd_get_toc_entry
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_IDE_AFLAG_TOC_VALID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_1
## %bb.2:
	movq	8(%rdi), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	movl	4(%rax), %r8d
	movq	_CDROM_LEADOUT@GOTPCREL(%rip), %rcx
	cmpl	%esi, (%rcx)
	jne	LBB0_4
## %bb.3:
	subl	%r8d, %edi
	incl	%edi
	xorl	%ecx, %ecx
	cmpl	%esi, %r8d
	cmovnel	%edi, %ecx
	jmp	LBB0_7
LBB0_4:
	cmpl	%esi, %r8d
	jg	LBB0_1
## %bb.5:
	cmpl	%esi, %edi
	jl	LBB0_1
## %bb.6:
	subl	%r8d, %esi
	movl	%esi, %ecx
LBB0_7:
	movslq	%ecx, %rcx
	shlq	$2, %rcx
	addq	8(%rax), %rcx
	movq	%rcx, (%rdx)
	xorl	%eax, %eax
	popq	%rbp
	retq
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IDE_AFLAG_TOC_VALID,4,2        ## @IDE_AFLAG_TOC_VALID
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CDROM_LEADOUT,4,2              ## @CDROM_LEADOUT
	.no_dead_strip	_ide_cd_get_toc_entry
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ide_cd_get_toc_entry
_ide_cd_get_toc_entry:                  ; @ide_cd_get_toc_entry
	.cfi_startproc
; %bb.0:
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _IDE_AFLAG_TOC_VALID@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IDE_AFLAG_TOC_VALID@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.1:
	ldr	x8, [x0, #8]
	ldr	x8, [x8]
	ldp	w10, w9, [x8]
Lloh3:
	adrp	x11, _CDROM_LEADOUT@GOTPAGE
Lloh4:
	ldr	x11, [x11, _CDROM_LEADOUT@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x11]
	cmp	w11, w1
	b.ne	LBB0_3
; %bb.2:
	sub	w10, w10, w9
	cmp	w9, w1
	csinc	w9, wzr, w10, eq
	b	LBB0_6
LBB0_3:
	cmp	w9, w1
	ccmp	w10, w1, #8, le
	b.ge	LBB0_5
LBB0_4:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	ret
LBB0_5:
	sub	w9, w1, w9
LBB0_6:
	mov	w0, #0
	ldr	x8, [x8, #8]
	add	x8, x8, w9, sxtw #2
	str	x8, [x2]
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_IDE_AFLAG_TOC_VALID,4,2        ; @IDE_AFLAG_TOC_VALID
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CDROM_LEADOUT,4,2              ; @CDROM_LEADOUT
	.no_dead_strip	_ide_cd_get_toc_entry
.subsections_via_symbols
