	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function task_database_chd_get_serial
_task_database_chd_get_serial:          ## @task_database_chd_get_serial
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	_RETRO_VFS_FILE_ACCESS_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RETRO_VFS_FILE_ACCESS_HINT_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_CHDSTREAM_TRACK_FIRST_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_intfstream_open_chd_track
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%rax, %rbx
	movq	%rax, %rdi
	movq	%r14, %rsi
	callq	_intfstream_get_serial
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_intfstream_close
	movq	%rbx, %rdi
	callq	_free
	movl	%r14d, %eax
	jmp	LBB0_3
LBB0_2:
	xorl	%eax, %eax
LBB0_3:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RETRO_VFS_FILE_ACCESS_READ,4,2 ## @RETRO_VFS_FILE_ACCESS_READ
	.comm	_RETRO_VFS_FILE_ACCESS_HINT_NONE,4,2 ## @RETRO_VFS_FILE_ACCESS_HINT_NONE
	.comm	_CHDSTREAM_TRACK_FIRST_DATA,4,2 ## @CHDSTREAM_TRACK_FIRST_DATA
	.no_dead_strip	_task_database_chd_get_serial
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function task_database_chd_get_serial
_task_database_chd_get_serial:          ; @task_database_chd_get_serial
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
Lloh0:
	adrp	x8, _RETRO_VFS_FILE_ACCESS_READ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RETRO_VFS_FILE_ACCESS_READ@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _RETRO_VFS_FILE_ACCESS_HINT_NONE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RETRO_VFS_FILE_ACCESS_HINT_NONE@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x8, _CHDSTREAM_TRACK_FIRST_DATA@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CHDSTREAM_TRACK_FIRST_DATA@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	bl	_intfstream_open_chd_track
	cbz	x0, LBB0_2
; %bb.1:
	mov	x20, x0
	mov	x1, x19
	bl	_intfstream_get_serial
	mov	x19, x0
	mov	x0, x20
	bl	_intfstream_close
	mov	x0, x20
	bl	_free
	mov	x0, x19
LBB0_2:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_RETRO_VFS_FILE_ACCESS_READ,4,2 ; @RETRO_VFS_FILE_ACCESS_READ
	.comm	_RETRO_VFS_FILE_ACCESS_HINT_NONE,4,2 ; @RETRO_VFS_FILE_ACCESS_HINT_NONE
	.comm	_CHDSTREAM_TRACK_FIRST_DATA,4,2 ; @CHDSTREAM_TRACK_FIRST_DATA
	.no_dead_strip	_task_database_chd_get_serial
.subsections_via_symbols
