	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cdrom_send_command_linux
_cdrom_send_command_linux:              ## @cdrom_send_command_linux
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$80, %rsp
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -32(%rbp)
	movaps	%xmm0, -48(%rbp)
	movaps	%xmm0, -64(%rbp)
	movaps	%xmm0, -80(%rbp)
	movq	$0, -16(%rbp)
	cmpl	$128, %esi
	jne	LBB0_1
## %bb.2:
	movq	_SG_DXFER_TO_DEV@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_SG_DXFER_NONE@GOTPCREL(%rip), %rax
LBB0_3:
	movaps	16(%rbp), %xmm0
	cmpl	$130, %esi
	jne	LBB0_5
## %bb.4:
	movq	_SG_DXFER_FROM_DEV@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	movl	%eax, -16(%rbp)
	movb	$83, -80(%rbp)
	movq	%r9, -72(%rbp)
	movq	%r8, -64(%rbp)
	movq	%rdx, -24(%rbp)
	movq	%rcx, -56(%rbp)
	movaps	%xmm0, -48(%rbp)
	movl	$5000, -32(%rbp)                ## imm = 0x1388
	movl	(%rdi), %edi
	callq	_fileno
	movq	_SG_IO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	-80(%rbp), %rdx
	movl	%eax, %edi
	callq	_ioctl
	cmpl	$-1, %eax
	je	LBB0_6
## %bb.7:
	movq	_SG_INFO_CHECK@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%eax, %eax
	testl	%ecx, -28(%rbp)
	setne	%al
	jmp	LBB0_8
LBB0_6:
	movl	$1, %eax
LBB0_8:
	addq	$80, %rsp
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SG_DXFER_FROM_DEV,4,2          ## @SG_DXFER_FROM_DEV
	.comm	_SG_DXFER_TO_DEV,4,2            ## @SG_DXFER_TO_DEV
	.comm	_SG_DXFER_NONE,4,2              ## @SG_DXFER_NONE
	.comm	_SG_IO,4,2                      ## @SG_IO
	.comm	_SG_INFO_CHECK,4,2              ## @SG_INFO_CHECK
	.no_dead_strip	_cdrom_send_command_linux
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cdrom_send_command_linux
_cdrom_send_command_linux:              ; @cdrom_send_command_linux
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	str	xzr, [sp, #64]
	movi.2d	v0, #0000000000000000
Lloh0:
	adrp	x8, _SG_DXFER_FROM_DEV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SG_DXFER_FROM_DEV@GOTPAGEOFF]
	stp	q0, q0, [sp, #32]
Lloh2:
	adrp	x9, _SG_DXFER_TO_DEV@GOTPAGE
Lloh3:
	ldr	x9, [x9, _SG_DXFER_TO_DEV@GOTPAGEOFF]
Lloh4:
	adrp	x10, _SG_DXFER_NONE@GOTPAGE
Lloh5:
	ldr	x10, [x10, _SG_DXFER_NONE@GOTPAGEOFF]
	stp	q0, q0, [sp]
	cmp	w1, #128
	csel	x9, x9, x10, eq
	cmp	w1, #130
	csel	x8, x8, x9, eq
	ldr	w8, [x8]
	str	w8, [sp, #64]
	mov	w8, #83
	strb	w8, [sp]
	stp	x5, x4, [sp, #8]
	str	x2, [sp, #56]
	stp	x3, x6, [sp, #24]
	str	x7, [sp, #40]
	mov	w8, #5000
	str	w8, [sp, #48]
	ldr	w0, [x0]
	bl	_fileno
Lloh6:
	adrp	x8, _SG_IO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SG_IO@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x2, sp
	bl	_ioctl
	cmn	w0, #1
	b.eq	LBB0_2
; %bb.1:
	ldr	w8, [sp, #52]
Lloh9:
	adrp	x9, _SG_INFO_CHECK@GOTPAGE
Lloh10:
	ldr	x9, [x9, _SG_INFO_CHECK@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w0, ne
	b	LBB0_3
LBB0_2:
	mov	w0, #1
LBB0_3:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_SG_DXFER_FROM_DEV,4,2          ; @SG_DXFER_FROM_DEV
	.comm	_SG_DXFER_TO_DEV,4,2            ; @SG_DXFER_TO_DEV
	.comm	_SG_DXFER_NONE,4,2              ; @SG_DXFER_NONE
	.comm	_SG_IO,4,2                      ; @SG_IO
	.comm	_SG_INFO_CHECK,4,2              ; @SG_INFO_CHECK
	.no_dead_strip	_cdrom_send_command_linux
.subsections_via_symbols
