	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function command_event_disk_control_set_eject
_command_event_disk_control_set_eject:  ## @command_event_disk_control_set_eject
	.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	%r12
	pushq	%rbx
	subq	$160, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movb	$0, -176(%rbp)
	movq	_runloop_system@GOTPCREL(%rip), %rax
	cmpl	$0, 8(%rax)
	je	LBB0_11
## %bb.1:
	movl	%esi, %r14d
	movl	%edi, %ebx
	callq	*(%rax)
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	testl	%ebx, %ebx
	jne	LBB0_3
## %bb.4:
	movq	_MSG_DISK_CLOSED@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_7:
	movq	_MSG_FAILED_TO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msg_hash_to_str
	movq	%rax, %r15
	testl	%ebx, %ebx
	leaq	L_.str.3(%rip), %rax
	leaq	L_.str.2(%rip), %rbx
	cmoveq	%rax, %rbx
	movq	_MSG_VIRTUAL_DISK_TRAY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msg_hash_to_str
	leaq	L_.str.1(%rip), %rdx
	leaq	-176(%rbp), %r12
	movq	%r12, %rdi
	movl	$128, %esi
	movq	%r15, %rcx
	movq	%rbx, %r8
	movq	%rax, %r9
	xorl	%eax, %eax
	callq	_snprintf
	movq	%r12, %rdi
	callq	_string_is_empty
	testl	%eax, %eax
	jne	LBB0_11
## %bb.8:
	leaq	L_.str.4(%rip), %rdi
	leaq	-176(%rbp), %rsi
	callq	_RARCH_ERR
	testl	%r14d, %r14d
	jne	LBB0_10
	jmp	LBB0_11
LBB0_3:
	movq	_MSG_DISK_EJECTED@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %edi
	callq	_msg_hash_to_str
	movq	%rax, %rbx
	movq	_MSG_VIRTUAL_DISK_TRAY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msg_hash_to_str
	leaq	L_.str(%rip), %rdx
	leaq	-176(%rbp), %r15
	movq	%r15, %rdi
	movl	$128, %esi
	movq	%rbx, %rcx
	movq	%rax, %r8
	xorl	%eax, %eax
	callq	_snprintf
	movq	%r15, %rdi
	callq	_string_is_empty
	testl	%eax, %eax
	jne	LBB0_11
## %bb.6:
	leaq	L_.str.4(%rip), %rdi
	leaq	-176(%rbp), %rsi
	callq	_RARCH_LOG
	testl	%r14d, %r14d
	je	LBB0_11
LBB0_10:
	movq	_MESSAGE_QUEUE_ICON_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_MESSAGE_QUEUE_CATEGORY_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	leaq	-176(%rbp), %rdi
	movl	$1, %esi
	movl	$180, %edx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	callq	_runloop_msg_queue_push
LBB0_11:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_13
## %bb.12:
	addq	$160, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_runloop_system,4,2             ## @runloop_system
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s %s"

	.comm	_MSG_DISK_EJECTED,4,2           ## @MSG_DISK_EJECTED
	.comm	_MSG_DISK_CLOSED,4,2            ## @MSG_DISK_CLOSED
	.comm	_MSG_VIRTUAL_DISK_TRAY,4,2      ## @MSG_VIRTUAL_DISK_TRAY
L_.str.1:                               ## @.str.1
	.asciz	"%s %s %s"

	.comm	_MSG_FAILED_TO,4,2              ## @MSG_FAILED_TO
L_.str.2:                               ## @.str.2
	.asciz	"eject"

L_.str.3:                               ## @.str.3
	.asciz	"close"

L_.str.4:                               ## @.str.4
	.asciz	"%s\n"

	.comm	_MESSAGE_QUEUE_ICON_DEFAULT,4,2 ## @MESSAGE_QUEUE_ICON_DEFAULT
	.comm	_MESSAGE_QUEUE_CATEGORY_INFO,4,2 ## @MESSAGE_QUEUE_CATEGORY_INFO
	.no_dead_strip	_command_event_disk_control_set_eject
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function command_event_disk_control_set_eject
_command_event_disk_control_set_eject:  ; @command_event_disk_control_set_eject
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #192
	.cfi_def_cfa_offset 192
	stp	x22, x21, [sp, #144]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #160]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #176]            ; 16-byte Folded Spill
	add	x29, sp, #176
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	strb	wzr, [sp, #8]
Lloh3:
	adrp	x8, _runloop_system@GOTPAGE
Lloh4:
	ldr	x8, [x8, _runloop_system@GOTPAGEOFF]
	ldr	w9, [x8, #8]
	cbz	w9, LBB0_7
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x8]
	blr	x8
	cbz	x0, LBB0_4
; %bb.2:
Lloh5:
	adrp	x8, _MSG_DISK_CLOSED@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MSG_DISK_CLOSED@GOTPAGEOFF]
Lloh7:
	adrp	x9, _MSG_DISK_EJECTED@GOTPAGE
Lloh8:
	ldr	x9, [x9, _MSG_DISK_EJECTED@GOTPAGEOFF]
	cmp	w20, #0
	csel	x8, x8, x9, eq
	ldr	w0, [x8]
	bl	_msg_hash_to_str
	mov	x20, x0
Lloh9:
	adrp	x8, _MSG_VIRTUAL_DISK_TRAY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MSG_VIRTUAL_DISK_TRAY@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	_msg_hash_to_str
	mov	x4, x0
Lloh12:
	adrp	x2, l_.str@PAGE
Lloh13:
	add	x2, x2, l_.str@PAGEOFF
	add	x0, sp, #8
	mov	w1, #128
	mov	x3, x20
	bl	_snprintf
	add	x0, sp, #8
	bl	_string_is_empty
	cbnz	w0, LBB0_7
; %bb.3:
Lloh14:
	adrp	x0, l_.str.4@PAGE
Lloh15:
	add	x0, x0, l_.str.4@PAGEOFF
	add	x1, sp, #8
	bl	_RARCH_LOG
	cbnz	w19, LBB0_6
	b	LBB0_7
LBB0_4:
Lloh16:
	adrp	x8, _MSG_FAILED_TO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MSG_FAILED_TO@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	bl	_msg_hash_to_str
	mov	x21, x0
Lloh19:
	adrp	x8, l_.str.2@PAGE
Lloh20:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh21:
	adrp	x9, l_.str.3@PAGE
Lloh22:
	add	x9, x9, l_.str.3@PAGEOFF
	cmp	w20, #0
	csel	x20, x9, x8, eq
Lloh23:
	adrp	x8, _MSG_VIRTUAL_DISK_TRAY@GOTPAGE
Lloh24:
	ldr	x8, [x8, _MSG_VIRTUAL_DISK_TRAY@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	bl	_msg_hash_to_str
Lloh26:
	adrp	x2, l_.str.1@PAGE
Lloh27:
	add	x2, x2, l_.str.1@PAGEOFF
	str	x0, [sp]
	add	x0, sp, #8
	mov	w1, #128
	mov	x3, x21
	mov	x4, x20
	bl	_snprintf
	add	x0, sp, #8
	bl	_string_is_empty
	cbnz	w0, LBB0_7
; %bb.5:
Lloh28:
	adrp	x0, l_.str.4@PAGE
Lloh29:
	add	x0, x0, l_.str.4@PAGEOFF
	add	x1, sp, #8
	bl	_RARCH_ERR
	cbz	w19, LBB0_7
LBB0_6:
Lloh30:
	adrp	x8, _MESSAGE_QUEUE_ICON_DEFAULT@GOTPAGE
Lloh31:
	ldr	x8, [x8, _MESSAGE_QUEUE_ICON_DEFAULT@GOTPAGEOFF]
Lloh32:
	ldr	w5, [x8]
Lloh33:
	adrp	x8, _MESSAGE_QUEUE_CATEGORY_INFO@GOTPAGE
Lloh34:
	ldr	x8, [x8, _MESSAGE_QUEUE_CATEGORY_INFO@GOTPAGEOFF]
Lloh35:
	ldr	w6, [x8]
	add	x0, sp, #8
	mov	w1, #1
	mov	w2, #180
	mov	w3, #1
	mov	x4, #0
	bl	_runloop_msg_queue_push
LBB0_7:
	ldur	x8, [x29, #-40]
Lloh36:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh37:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh38:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.8:
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	add	sp, sp, #192
	ret
LBB0_9:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_runloop_system,4,2             ; @runloop_system
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s %s"

	.comm	_MSG_DISK_EJECTED,4,2           ; @MSG_DISK_EJECTED
	.comm	_MSG_DISK_CLOSED,4,2            ; @MSG_DISK_CLOSED
	.comm	_MSG_VIRTUAL_DISK_TRAY,4,2      ; @MSG_VIRTUAL_DISK_TRAY
l_.str.1:                               ; @.str.1
	.asciz	"%s %s %s"

	.comm	_MSG_FAILED_TO,4,2              ; @MSG_FAILED_TO
l_.str.2:                               ; @.str.2
	.asciz	"eject"

l_.str.3:                               ; @.str.3
	.asciz	"close"

l_.str.4:                               ; @.str.4
	.asciz	"%s\n"

	.comm	_MESSAGE_QUEUE_ICON_DEFAULT,4,2 ; @MESSAGE_QUEUE_ICON_DEFAULT
	.comm	_MESSAGE_QUEUE_CATEGORY_INFO,4,2 ; @MESSAGE_QUEUE_CATEGORY_INFO
	.no_dead_strip	_command_event_disk_control_set_eject
.subsections_via_symbols
