	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CDVD_GetDir                    ## -- Begin function CDVD_GetDir
	.p2align	4, 0x90
_CDVD_GetDir:                           ## @CDVD_GetDir
	.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	_cdvd_inited@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_1
## %bb.2:
	movl	%r8d, %ebx
	movq	%rcx, %r15
	movl	%edx, %r12d
	movq	%rsi, %r13
	movq	%rdi, %rsi
	movq	%r9, -48(%rbp)                  ## 8-byte Spill
	movq	_sbuff@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	movl	$1023, %edx                     ## imm = 0x3FF
	callq	_strncpy
	movq	(%r14), %rax
	leaq	1024(%rax), %rdi
	testq	%r13, %r13
	je	LBB0_3
## %bb.4:
	movq	%r13, %rsi
	movl	$127, %edx
	callq	_strncpy
	movq	(%r14), %rax
	jmp	LBB0_5
LBB0_1:
	movl	$-1, %ebx
	jmp	LBB0_7
LBB0_3:
	movl	$0, (%rdi)
LBB0_5:
	movl	%r12d, 1152(%rax)
	movl	%r15d, 1156(%rax)
	movl	%ebx, 1160(%rax)
	shll	$2, %ebx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_SifWriteBackDCache
	movq	_CDVD_GETDIR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%r14), %rcx
	subq	$8, %rsp
	movq	_cd0@GOTPCREL(%rip), %rdi
	xorl	%edx, %edx
	movl	$1164, %r8d                     ## imm = 0x48C
	movq	%rcx, %r9
	pushq	$0
	pushq	$0
	pushq	$1028                           ## imm = 0x404
	callq	_SifCallRpc
	addq	$32, %rsp
	movq	(%r14), %rsi
	movl	(%rsi), %ebx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.6:
	addq	$4, %rsi
	movl	$1023, %edx                     ## imm = 0x3FF
	callq	_strncpy
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cdvd_inited,4,2                ## @cdvd_inited
	.comm	_sbuff,8,3                      ## @sbuff
	.comm	_cd0,4,2                        ## @cd0
	.comm	_CDVD_GETDIR,4,2                ## @CDVD_GETDIR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CDVD_GetDir                    ; -- Begin function CDVD_GetDir
	.p2align	2
_CDVD_GetDir:                           ; @CDVD_GetDir
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
Lloh0:
	adrp	x8, _cdvd_inited@GOTPAGE
Lloh1:
	ldr	x8, [x8, _cdvd_inited@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w8, LBB0_3
; %bb.1:
	mov	x19, x5
	mov	x21, x4
	mov	x20, x3
	mov	x22, x2
	mov	x23, x1
	mov	x1, x0
Lloh3:
	adrp	x24, _sbuff@GOTPAGE
Lloh4:
	ldr	x24, [x24, _sbuff@GOTPAGEOFF]
	ldr	x0, [x24]
	mov	w2, #1023
	bl	_strncpy
	ldr	x8, [x24]
	add	x0, x8, #1024
	cbz	x23, LBB0_4
; %bb.2:
	mov	x1, x23
	mov	w2, #127
	bl	_strncpy
	ldr	x8, [x24]
	b	LBB0_5
LBB0_3:
	mov	w20, #-1
	b	LBB0_7
LBB0_4:
	str	wzr, [x0]
LBB0_5:
	str	w22, [x8, #1152]
	str	w20, [x8, #1156]
	lsl	w1, w21, #2
	str	w21, [x8, #1160]
	mov	x0, x20
	bl	_SifWriteBackDCache
Lloh5:
	adrp	x8, _CDVD_GETDIR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CDVD_GETDIR@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	ldr	x3, [x24]
	str	wzr, [sp]
Lloh8:
	adrp	x0, _cd0@GOTPAGE
Lloh9:
	ldr	x0, [x0, _cd0@GOTPAGEOFF]
	mov	w2, #0
	mov	w4, #1164
	mov	x5, x3
	mov	w6, #1028
	mov	w7, #0
	bl	_SifCallRpc
	ldr	x8, [x24]
	ldr	w20, [x8]
	cbz	x19, LBB0_7
; %bb.6:
	add	x1, x8, #4
	mov	x0, x19
	mov	w2, #1023
	bl	_strncpy
LBB0_7:
	mov	x0, x20
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_cdvd_inited,4,2                ; @cdvd_inited
	.comm	_sbuff,8,3                      ; @sbuff
	.comm	_cd0,4,2                        ; @cd0
	.comm	_CDVD_GETDIR,4,2                ; @CDVD_GETDIR
.subsections_via_symbols
