	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function isCiaInstalled
_isCiaInstalled:                        ## @isCiaInstalled
	.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
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	%rdi, -64(%rbp)
	movq	_MEDIATYPE_SD@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	leaq	-44(%rbp), %rsi
	callq	_AM_GetTitleCount
	movl	%eax, %edi
	callq	_R_FAILED
	movl	$-1, %r15d
	testq	%rax, %rax
	je	LBB0_1
LBB0_11:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	-44(%rbp), %edi
	shll	$2, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_11
## %bb.2:
	movq	%rax, %r12
	movl	(%r13), %esi
	movl	-44(%rbp), %edx
	leaq	-48(%rbp), %rdi
	movq	%rax, %rcx
	callq	_AM_GetTitleList
	movl	%eax, %edi
	callq	_R_FAILED
	testq	%rax, %rax
	jne	LBB0_11
## %bb.3:
	movl	-48(%rbp), %eax
	testl	%eax, %eax
	jle	LBB0_9
## %bb.4:
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rbx, (%r12,%rcx,8)
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_6 Depth=1
	incq	%rcx
	cmpq	%rcx, %rax
	jne	LBB0_6
LBB0_9:
	movq	%r12, %rdi
	callq	_free
LBB0_10:
	xorl	%r15d, %r15d
	jmp	LBB0_11
LBB0_7:
	movq	%r12, %rdi
	callq	_free
	movl	(%r13), %edi
	leaq	-64(%rbp), %rdx
	leaq	-56(%rbp), %rcx
	movl	$1, %esi
	callq	_AM_GetTitleInfo
	movl	%eax, %edi
	callq	_R_FAILED
	testq	%rax, %rax
	jne	LBB0_11
## %bb.8:
	movl	$1, %r15d
	cmpq	%r14, -56(%rbp)
	je	LBB0_11
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_MEDIATYPE_SD,4,2               ## @MEDIATYPE_SD
	.no_dead_strip	_isCiaInstalled
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function isCiaInstalled
_isCiaInstalled:                        ; @isCiaInstalled
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x1
	mov	x20, x0
	str	x0, [sp, #24]
Lloh0:
	adrp	x22, _MEDIATYPE_SD@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MEDIATYPE_SD@GOTPAGEOFF]
	ldr	w0, [x22]
	add	x1, sp, #20
	bl	_AM_GetTitleCount
	bl	_R_FAILED
	cbz	x0, LBB0_3
LBB0_1:
	mov	w0, #-1
LBB0_2:
	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
	add	sp, sp, #80
	ret
LBB0_3:
	ldr	w8, [sp, #20]
	lsl	w0, w8, #2
	bl	_malloc
	cbz	x0, LBB0_1
; %bb.4:
	mov	x21, x0
	ldr	w1, [x22]
	ldr	w2, [sp, #20]
	add	x0, sp, #16
	mov	x3, x21
	bl	_AM_GetTitleList
	bl	_R_FAILED
	cbnz	x0, LBB0_1
; %bb.5:
	ldr	w9, [sp, #16]
	cmp	w9, #1
	b.lt	LBB0_9
; %bb.6:
	mov	x8, #0
	lsl	x9, x9, #3
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x21, x8]
	cmp	x10, x20
	b.eq	LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x8, x8, #8
	cmp	x9, x8
	b.ne	LBB0_7
LBB0_9:
	mov	x0, x21
	bl	_free
LBB0_10:
	mov	w0, #0
	b	LBB0_2
LBB0_11:
	mov	x0, x21
	bl	_free
	ldr	w0, [x22]
	add	x2, sp, #24
	add	x3, sp, #8
	mov	w1, #1
	bl	_AM_GetTitleInfo
	bl	_R_FAILED
	cbnz	x0, LBB0_1
; %bb.12:
	ldr	x8, [sp, #8]
	cmp	x8, x19
	b.ne	LBB0_10
; %bb.13:
	mov	w0, #1
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_MEDIATYPE_SD,4,2               ; @MEDIATYPE_SD
	.no_dead_strip	_isCiaInstalled
.subsections_via_symbols
