	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cdrom_drive_has_media          ## -- Begin function cdrom_drive_has_media
	.p2align	4, 0x90
_cdrom_drive_has_media:                 ## @cdrom_drive_has_media
	.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
	subq	$272, %rsp                      ## imm = 0x110
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%edi, %edx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -48(%rbp)
	movaps	%xmm0, -64(%rbp)
	movaps	%xmm0, -80(%rbp)
	movaps	%xmm0, -96(%rbp)
	movaps	%xmm0, -112(%rbp)
	movaps	%xmm0, -128(%rbp)
	movaps	%xmm0, -144(%rbp)
	movaps	%xmm0, -160(%rbp)
	movaps	%xmm0, -176(%rbp)
	movaps	%xmm0, -192(%rbp)
	movaps	%xmm0, -208(%rbp)
	movaps	%xmm0, -224(%rbp)
	movaps	%xmm0, -240(%rbp)
	movaps	%xmm0, -256(%rbp)
	movaps	%xmm0, -272(%rbp)
	movaps	%xmm0, -288(%rbp)
	leaq	-288(%rbp), %rbx
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	movl	$256, %esi                      ## imm = 0x100
	movl	$1, %ecx
	xorl	%r8d, %r8d
	callq	_cdrom_device_fillpath
	movq	_RETRO_VFS_FILE_ACCESS_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_filestream_open
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_filestream_get_vfs_handle
	movq	%rax, %rdi
	callq	_cdrom_is_media_inserted
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_filestream_close
LBB0_2:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-24(%rbp), %rax
	jne	LBB0_4
## %bb.3:
	movl	%r14d, %eax
	addq	$272, %rsp                      ## imm = 0x110
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_RETRO_VFS_FILE_ACCESS_READ,4,2 ## @RETRO_VFS_FILE_ACCESS_READ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cdrom_drive_has_media          ; -- Begin function cdrom_drive_has_media
	.p2align	2
_cdrom_drive_has_media:                 ; @cdrom_drive_has_media
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #320
	.cfi_def_cfa_offset 320
	stp	x28, x27, [sp, #272]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #288]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #304]            ; 16-byte Folded Spill
	add	x29, sp, #304
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w27, -40
	.cfi_offset w28, -48
	mov	x2, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp, #224]
	stp	q0, q0, [sp, #192]
	stp	q0, q0, [sp, #160]
	stp	q0, q0, [sp, #128]
	stp	q0, q0, [sp, #96]
	stp	q0, q0, [sp, #64]
	stp	q0, q0, [sp, #32]
	stp	q0, q0, [sp]
	mov	x0, sp
	mov	w1, #256
	mov	w3, #1
	mov	w4, #0
	bl	_cdrom_device_fillpath
Lloh3:
	adrp	x8, _RETRO_VFS_FILE_ACCESS_READ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RETRO_VFS_FILE_ACCESS_READ@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, sp
	mov	w2, #0
	bl	_filestream_open
	cbz	x0, LBB0_2
; %bb.1:
	mov	x20, x0
	bl	_filestream_get_vfs_handle
	bl	_cdrom_is_media_inserted
	mov	x19, x0
	mov	x0, x20
	bl	_filestream_close
	b	LBB0_3
LBB0_2:
	mov	w19, #0
LBB0_3:
	ldur	x8, [x29, #-40]
Lloh6:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh7:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	mov	x0, x19
	ldp	x29, x30, [sp, #304]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #288]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #272]            ; 16-byte Folded Reload
	add	sp, sp, #320
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_RETRO_VFS_FILE_ACCESS_READ,4,2 ; @RETRO_VFS_FILE_ACCESS_READ
.subsections_via_symbols
