	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function MacOSXCDInit
_MacOSXCDInit:                          ## @MacOSXCDInit
	.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	%rsp, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAXPATHLEN@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	_kIOCDMediaClass@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_IOServiceMatching
	movl	%eax, %ebx
	movq	_kIOMediaEjectableKey@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_CFSTR
	movq	_kCFBooleanTrue@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_CFDictionarySetValue
	movq	_kIOMasterPortDefault@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-52(%rbp), %rdx
	movl	%ebx, %esi
	callq	_IOServiceGetMatchingServices
	movl	-52(%rbp), %edi
	callq	_IOIteratorNext
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%rax, %rbx
	movq	_kIOBSDNameKey@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_CFSTR
	movq	_kCFAllocatorDefault@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rbx, %rdi
	movl	%eax, %esi
	xorl	%ecx, %ecx
	callq	_IORegistryEntryCreateCFProperty
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	%rax, %r15
	movq	__PATH_DEV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_strcpy
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_strcat
	movq	%r14, %rdi
	callq	_strlen
	movq	%r14, %rsi
	addq	%rax, %rsi
	movl	(%r13), %edx
	subl	%eax, %edx
	movq	_kCFStringEncodingUTF8@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	callq	_CFStringGetCString
	movq	%r15, %rdi
	callq	_CFRelease
LBB0_3:
	movq	%rbx, %rdi
	callq	_IOObjectRelease
LBB0_4:
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_open
	movl	%eax, %ecx
	movq	_hCDROM@GOTPCREL(%rip), %rax
	movl	%ecx, (%rax)
	xorl	%eax, %eax
	cmpl	$-1, %ecx
	sete	%cl
	movq	%r12, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmpq	-48(%rbp), %rdx
	jne	LBB0_6
## %bb.5:
	movb	%cl, %al
	negl	%eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAXPATHLEN,4,2                 ## @MAXPATHLEN
	.comm	_kIOCDMediaClass,4,2            ## @kIOCDMediaClass
	.comm	_kIOMediaEjectableKey,4,2       ## @kIOMediaEjectableKey
	.comm	_kCFBooleanTrue,4,2             ## @kCFBooleanTrue
	.comm	_kIOMasterPortDefault,4,2       ## @kIOMasterPortDefault
	.comm	_kIOBSDNameKey,4,2              ## @kIOBSDNameKey
	.comm	_kCFAllocatorDefault,4,2        ## @kCFAllocatorDefault
	.comm	__PATH_DEV,4,2                  ## @_PATH_DEV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"r"

	.comm	_kCFStringEncodingUTF8,4,2      ## @kCFStringEncodingUTF8
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.comm	_hCDROM,4,2                     ## @hCDROM
	.no_dead_strip	_MacOSXCDInit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function MacOSXCDInit
_MacOSXCDInit:                          ; @MacOSXCDInit
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	sub	sp, sp, #16
	mov	x22, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x23, _MAXPATHLEN@GOTPAGE
Lloh4:
	ldr	x23, [x23, _MAXPATHLEN@GOTPAGEOFF]
	ldr	w8, [x23]
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x19, x9, x8
	mov	sp, x19
Lloh7:
	adrp	x8, _kIOCDMediaClass@GOTPAGE
Lloh8:
	ldr	x8, [x8, _kIOCDMediaClass@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	bl	_IOServiceMatching
	mov	x20, x0
Lloh10:
	adrp	x8, _kIOMediaEjectableKey@GOTPAGE
Lloh11:
	ldr	x8, [x8, _kIOMediaEjectableKey@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	bl	_CFSTR
	mov	x1, x0
Lloh13:
	adrp	x8, _kCFBooleanTrue@GOTPAGE
Lloh14:
	ldr	x8, [x8, _kCFBooleanTrue@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_CFDictionarySetValue
Lloh16:
	adrp	x8, _kIOMasterPortDefault@GOTPAGE
Lloh17:
	ldr	x8, [x8, _kIOMasterPortDefault@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	sub	x2, x29, #60
	mov	x1, x20
	bl	_IOServiceGetMatchingServices
	ldur	w0, [x29, #-60]
	bl	_IOIteratorNext
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
Lloh19:
	adrp	x8, _kIOBSDNameKey@GOTPAGE
Lloh20:
	ldr	x8, [x8, _kIOBSDNameKey@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	bl	_CFSTR
	mov	x1, x0
Lloh22:
	adrp	x8, _kCFAllocatorDefault@GOTPAGE
Lloh23:
	ldr	x8, [x8, _kCFAllocatorDefault@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w3, #0
	bl	_IORegistryEntryCreateCFProperty
	cbz	x0, LBB0_3
; %bb.2:
	mov	x21, x0
Lloh25:
	adrp	x8, __PATH_DEV@GOTPAGE
Lloh26:
	ldr	x8, [x8, __PATH_DEV@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_strcpy
Lloh28:
	adrp	x1, l_.str@PAGE
Lloh29:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_strcat
	mov	x0, x19
	bl	_strlen
	add	x1, x19, x0
	ldr	w8, [x23]
	sub	w2, w8, w0
Lloh30:
	adrp	x8, _kCFStringEncodingUTF8@GOTPAGE
Lloh31:
	ldr	x8, [x8, _kCFStringEncodingUTF8@GOTPAGEOFF]
Lloh32:
	ldr	w3, [x8]
	mov	x0, x21
	bl	_CFStringGetCString
	mov	x0, x21
	bl	_CFRelease
LBB0_3:
	mov	x0, x20
	bl	_IOObjectRelease
LBB0_4:
Lloh33:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh34:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_open
Lloh36:
	adrp	x8, _hCDROM@GOTPAGE
Lloh37:
	ldr	x8, [x8, _hCDROM@GOTPAGEOFF]
Lloh38:
	str	w0, [x8]
	cmn	w0, #1
	csetm	w0, eq
	mov	sp, x22
	ldur	x8, [x29, #-56]
Lloh39:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh40:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh41:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.5:
	sub	sp, x29, #48
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_6:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotStr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_MAXPATHLEN,4,2                 ; @MAXPATHLEN
	.comm	_kIOCDMediaClass,4,2            ; @kIOCDMediaClass
	.comm	_kIOMediaEjectableKey,4,2       ; @kIOMediaEjectableKey
	.comm	_kCFBooleanTrue,4,2             ; @kCFBooleanTrue
	.comm	_kIOMasterPortDefault,4,2       ; @kIOMasterPortDefault
	.comm	_kIOBSDNameKey,4,2              ; @kIOBSDNameKey
	.comm	_kCFAllocatorDefault,4,2        ; @kCFAllocatorDefault
	.comm	__PATH_DEV,4,2                  ; @_PATH_DEV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"r"

	.comm	_kCFStringEncodingUTF8,4,2      ; @kCFStringEncodingUTF8
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.comm	_hCDROM,4,2                     ; @hCDROM
	.no_dead_strip	_MacOSXCDInit
.subsections_via_symbols
