	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function Cs2GetMPEGRom
LCPI0_0:
	.quad	1                               ## 0x1
	.space	8
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_Cs2GetMPEGRom
	.p2align	4, 0x90
_Cs2GetMPEGRom:                         ## @Cs2GetMPEGRom
	.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
	movq	_Cs2Area@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	orl	$768, (%rax)                    ## imm = 0x300
	movq	56(%rax), %rdi
	movq	72(%rax), %rcx
	movq	%rcx, 48(%rax)
	movq	$0, 64(%rax)
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.1:
	leaq	L_.str(%rip), %rsi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_12
## %bb.2:
	movq	%rax, %r14
	movq	(%r12), %rax
	movl	16(%rax), %ecx
	shll	$8, %ecx
	movzwl	%cx, %esi
	orl	20(%rax), %esi
	movq	24(%rax), %r13
	imull	4(%rax), %esi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_fseek
	movq	(%r12), %rax
	movq	48(%rax), %rdi
	callq	_Cs2GetPartition
	testq	%rax, %rax
	je	LBB0_11
## %bb.3:
	movq	%rax, %rbx
	movq	(%r12), %rax
	cmpl	$0, 44(%rax)
	jne	LBB0_11
## %bb.4:
	movq	$0, -48(%rbp)
	movq	$0, 8(%rbx)
	testq	%r13, %r13
	jle	LBB0_10
## %bb.5:
	movq	(%rbx), %rdi
	leaq	-48(%rbp), %r15
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	decq	%r13
	je	LBB0_9
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	shlq	$2, %rdi
	addq	24(%rbx), %rdi
	callq	_Cs2AllocateBlock
	movq	(%rbx), %rdi
	movq	16(%rbx), %rcx
	movq	%rax, (%rcx,%rdi,8)
	movq	16(%rbx), %rax
	movq	(%rax,%rdi,8), %rax
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	(%rax), %rsi
	movq	(%r12), %rax
	movl	4(%rax), %ecx
	movq	%r15, %rdi
	movl	$1, %edx
	movq	%r14, %r8
	callq	_yread
	movq	(%r12), %rax
	movslq	4(%rax), %rax
	movdqa	LCPI0_0(%rip), %xmm0            ## xmm0 = <1,u>
	pinsrq	$1, %rax, %xmm0
	movdqu	(%rbx), %xmm1
	paddq	%xmm1, %xmm0
	movdqu	%xmm0, (%rbx)
	movq	%xmm0, %rdi
	jmp	LBB0_8
LBB0_9:
	movq	(%r12), %rax
LBB0_10:
	movl	$1, 8(%rax)
	movq	_CDB_HIRQ_CSCT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, 32(%rax)
LBB0_11:
	movq	%r14, %rdi
	callq	_fclose
LBB0_12:
	movq	(%r12), %rax
	movl	40(%rax), %edi
	callq	_doCDReport
	movq	_CDB_HIRQ_CMOK@GOTPCREL(%rip), %rax
	movq	_CDB_HIRQ_MPED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	(%r12), %rax
	orl	%ecx, 32(%rax)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_Cs2Area,8,3                    ## @Cs2Area
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rb"

	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_CDB_HIRQ_CSCT,4,2              ## @CDB_HIRQ_CSCT
	.comm	_CDB_HIRQ_CMOK,4,2              ## @CDB_HIRQ_CMOK
	.comm	_CDB_HIRQ_MPED,4,2              ## @CDB_HIRQ_MPED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Cs2GetMPEGRom                  ; -- Begin function Cs2GetMPEGRom
	.p2align	2
_Cs2GetMPEGRom:                         ; @Cs2GetMPEGRom
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
Lloh0:
	adrp	x21, _Cs2Area@GOTPAGE
Lloh1:
	ldr	x21, [x21, _Cs2Area@GOTPAGEOFF]
	ldr	x8, [x21]
	ldr	w9, [x8]
	orr	w9, w9, #0x300
	str	w9, [x8]
	ldr	x9, [x8, #72]
	str	x9, [x8, #48]
	str	xzr, [x8, #64]
	ldr	x0, [x8, #56]
	cbz	x0, LBB0_12
; %bb.1:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fopen
	cbz	x0, LBB0_12
; %bb.2:
	mov	x19, x0
	ldr	x8, [x21]
	ldp	w9, w10, [x8, #16]
	ubfiz	w9, w9, #8, #8
	orr	w9, w9, w10
	ldr	x22, [x8, #24]
	ldr	w8, [x8, #4]
	mul	w1, w9, w8
Lloh4:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
	bl	_fseek
	ldr	x8, [x21]
	ldr	x0, [x8, #48]
	bl	_Cs2GetPartition
	cbz	x0, LBB0_11
; %bb.3:
	ldr	x8, [x21]
	ldr	w9, [x8, #44]
	cbnz	w9, LBB0_11
; %bb.4:
	mov	x20, x0
	str	xzr, [sp, #8]
	str	xzr, [x0, #8]
	cmp	x22, #1
	b.lt	LBB0_10
; %bb.5:
	ldr	x8, [x20]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	subs	x22, x22, #1
	b.eq	LBB0_9
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x20, #24]
	add	x0, x9, x8, lsl #2
	bl	_Cs2AllocateBlock
	ldr	x9, [x20, #16]
	ldr	x8, [x20]
	lsl	x10, x8, #3
	str	x0, [x9, x10]
	ldr	x9, [x20, #16]
	ldr	x9, [x9, x10]
	cbz	x9, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x1, [x9]
	ldr	x8, [x21]
	ldr	w3, [x8, #4]
	add	x0, sp, #8
	mov	w2, #1
	mov	x4, x19
	bl	_yread
	ldp	x8, x9, [x20]
	add	x8, x8, #1
	ldr	x10, [x21]
	ldrsw	x10, [x10, #4]
	add	x9, x9, x10
	stp	x8, x9, [x20]
	b	LBB0_6
LBB0_9:
	ldr	x8, [x21]
LBB0_10:
	mov	w9, #1
	str	w9, [x8, #8]
Lloh7:
	adrp	x9, _CDB_HIRQ_CSCT@GOTPAGE
Lloh8:
	ldr	x9, [x9, _CDB_HIRQ_CSCT@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	ldr	w10, [x8, #32]
	orr	w9, w10, w9
	str	w9, [x8, #32]
LBB0_11:
	mov	x0, x19
	bl	_fclose
LBB0_12:
	ldr	x8, [x21]
	ldr	w0, [x8, #40]
	bl	_doCDReport
Lloh10:
	adrp	x8, _CDB_HIRQ_CMOK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _CDB_HIRQ_CMOK@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _CDB_HIRQ_MPED@GOTPAGE
Lloh14:
	ldr	x9, [x9, _CDB_HIRQ_MPED@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	x9, [x21]
	ldr	w10, [x9, #32]
	orr	w8, w8, w10
	str	w8, [x9, #32]
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_Cs2Area,8,3                    ; @Cs2Area
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rb"

	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_CDB_HIRQ_CSCT,4,2              ; @CDB_HIRQ_CSCT
	.comm	_CDB_HIRQ_CMOK,4,2              ; @CDB_HIRQ_CMOK
	.comm	_CDB_HIRQ_MPED,4,2              ; @CDB_HIRQ_MPED
.subsections_via_symbols
