	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_unregister_cdrom               ## -- Begin function unregister_cdrom
	.p2align	4, 0x90
_unregister_cdrom:                      ## @unregister_cdrom
	.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	%rdi, %rbx
	movq	_CD_OPEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_cdinfo
	movq	_cdrom_mutex@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	leaq	24(%rbx), %rdi
	callq	_list_del
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	16(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	*%rax
LBB0_2:
	movq	8(%rbx), %rax
	decl	(%rax)
	movq	_CD_REG_UNREG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rbx), %edx
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_cdinfo                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CD_OPEN,4,2                    ## @CD_OPEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"entering unregister_cdrom\n"

	.comm	_cdrom_mutex,4,2                ## @cdrom_mutex
	.comm	_CD_REG_UNREG,4,2               ## @CD_REG_UNREG
L_.str.1:                               ## @.str.1
	.asciz	"drive \"/dev/%s\" unregistered\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_unregister_cdrom               ; -- Begin function unregister_cdrom
	.p2align	2
_unregister_cdrom:                      ; @unregister_cdrom
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _CD_OPEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CD_OPEN@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_cdinfo
Lloh5:
	adrp	x20, _cdrom_mutex@GOTPAGE
Lloh6:
	ldr	x20, [x20, _cdrom_mutex@GOTPAGEOFF]
	mov	x0, x20
	bl	_mutex_lock
	add	x0, x19, #24
	bl	_list_del
	mov	x0, x20
	bl	_mutex_unlock
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	blr	x8
LBB0_2:
	ldr	x8, [x19, #8]
	ldr	w9, [x8]
	sub	w9, w9, #1
	str	w9, [x8]
Lloh7:
	adrp	x8, _CD_REG_UNREG@GOTPAGE
Lloh8:
	ldr	x8, [x8, _CD_REG_UNREG@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	ldr	w8, [x19]
	str	x8, [sp]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_cdinfo
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_CD_OPEN,4,2                    ; @CD_OPEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"entering unregister_cdrom\n"

	.comm	_cdrom_mutex,4,2                ; @cdrom_mutex
	.comm	_CD_REG_UNREG,4,2               ; @CD_REG_UNREG
l_.str.1:                               ; @.str.1
	.asciz	"drive \"/dev/%s\" unregistered\n"

.subsections_via_symbols
