	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function media_changed
_media_changed:                         ## @media_changed
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ecx
	andb	$1, %cl
	movl	$1, %ebx
	shll	%cl, %ebx
	movq	%rdi, %r15
	movl	(%rdi), %eax
	movzbl	%cl, %ecx
	xorl	%r14d, %r14d
	btl	%ecx, %eax
	setb	%r14b
	movq	_CDC_MEDIA_CHANGED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_CDROM_CAN
	testl	%eax, %eax
	je	LBB0_5
## %bb.1:
	movq	16(%r15), %rax
	movq	_CDSL_CURRENT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%r15, %rdi
	callq	*(%rax)
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	$0, 8(%r15)
	movl	$1, %r14d
	movl	$3, %eax
	jmp	LBB0_4
LBB0_2:
	movl	(%r15), %eax
LBB0_4:
	notl	%ebx
	andl	%eax, %ebx
	movl	%ebx, (%r15)
LBB0_5:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CDC_MEDIA_CHANGED,4,2          ## @CDC_MEDIA_CHANGED
	.comm	_CDSL_CURRENT,4,2               ## @CDSL_CURRENT
	.no_dead_strip	_media_changed
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function media_changed
_media_changed:                         ; @media_changed
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x0
	and	w21, w1, #0x1
	ldr	w8, [x0]
	lsr	w8, w8, w21
	and	w20, w8, #0x1
Lloh0:
	adrp	x8, _CDC_MEDIA_CHANGED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CDC_MEDIA_CHANGED@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_CDROM_CAN
	cbz	w0, LBB0_5
; %bb.1:
	mov	w8, #1
	lsl	w21, w8, w21
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _CDSL_CURRENT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CDSL_CURRENT@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x9]
	mov	x0, x19
	blr	x8
	cbz	x0, LBB0_3
; %bb.2:
	str	xzr, [x19, #8]
	mov	w20, #1
	mov	w8, #3
	b	LBB0_4
LBB0_3:
	ldr	w8, [x19]
LBB0_4:
	bic	w8, w8, w21
	str	w8, [x19]
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_CDC_MEDIA_CHANGED,4,2          ; @CDC_MEDIA_CHANGED
	.comm	_CDSL_CURRENT,4,2               ; @CDSL_CURRENT
	.no_dead_strip	_media_changed
.subsections_via_symbols
