	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cdrom_read_subq                ## -- Begin function cdrom_read_subq
	.p2align	4, 0x90
_cdrom_read_subq:                       ## @cdrom_read_subq
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$32, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -8(%rbp)
	movabsq	$648799821318193731, %rax       ## imm = 0x901000000020243
	movq	%rax, -24(%rbp)
	movw	$48, -16(%rbp)
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.2:
	movq	%rdx, %rcx
	movq	%rsi, %rdx
	movq	_DIRECTION_IN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$0, (%rsp)
	leaq	-24(%rbp), %r8
	movl	$10, %r9d
	callq	_cdrom_send_command
	movl	%eax, %ecx
	xorl	%eax, %eax
	testl	%ecx, %ecx
	setne	%al
	jmp	LBB0_3
LBB0_1:
	movl	$1, %eax
LBB0_3:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-8(%rbp), %rcx
	jne	LBB0_5
## %bb.4:
	addq	$32, %rsp
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
l___const.cdrom_read_subq.cdb:          ## @__const.cdrom_read_subq.cdb
	.asciz	"C\002\002\000\000\000\001\t0"

	.comm	_DIRECTION_IN,4,2               ## @DIRECTION_IN
	.comm	_stdout,4,2                     ## @stdout
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cdrom_read_subq                ; -- Begin function cdrom_read_subq
	.p2align	2
_cdrom_read_subq:                       ; @cdrom_read_subq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-8]
Lloh3:
	adrp	x8, l___const.cdrom_read_subq.cdb@PAGE
Lloh4:
	add	x8, x8, l___const.cdrom_read_subq.cdb@PAGEOFF
Lloh5:
	ldr	x8, [x8]
	str	x8, [sp, #8]
	mov	w8, #48
	strh	w8, [sp, #16]
	cbz	x1, LBB0_2
; %bb.1:
	mov	x3, x2
	mov	x2, x1
Lloh6:
	adrp	x8, _DIRECTION_IN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DIRECTION_IN@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x4, sp, #8
	mov	w5, #10
	mov	w6, #0
	bl	_cdrom_send_command
	cmp	w0, #0
	cset	w0, ne
	b	LBB0_3
LBB0_2:
	mov	w0, #1
LBB0_3:
	ldur	x8, [x29, #-8]
Lloh9:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh10:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpAddLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
l___const.cdrom_read_subq.cdb:          ; @__const.cdrom_read_subq.cdb
	.asciz	"C\002\002\000\000\000\001\t0"

	.comm	_DIRECTION_IN,4,2               ; @DIRECTION_IN
	.comm	_stdout,4,2                     ; @stdout
.subsections_via_symbols
