	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ide_cdrom_prep_pc
_ide_cdrom_prep_pc:                     ## @ide_cdrom_prep_pc
	.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
	callq	_scsi_req
	movq	(%rax), %rax
	movl	(%rax), %edx
	movq	_READ_6@GOTPCREL(%rip), %rsi
	movl	%edx, %ecx
	subl	(%rsi), %ecx
	je	LBB0_2
## %bb.1:
	movq	_WRITE_6@GOTPCREL(%rip), %rsi
	cmpl	(%rsi), %edx
	je	LBB0_2
## %bb.3:
	movq	_MODE_SENSE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	je	LBB0_5
## %bb.4:
	movq	_MODE_SELECT@GOTPCREL(%rip), %rcx
	movl	$1, %eax
	cmpl	(%rcx), %edx
	jne	LBB0_6
LBB0_5:
	movq	_ILLEGAL_REQUEST@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%rbx, %rdi
	callq	_scsi_req
	movl	%r14d, 12(%rax)
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_2:
	movl	16(%rax), %edx
	movl	%edx, 32(%rax)
	movq	8(%rax), %rdx
	movq	%rdx, 16(%rax)
	movl	4(%rax), %edx
	movl	%edx, %esi
	andl	$31, %esi
	movl	%esi, 12(%rax)
	movl	$0, 8(%rax)
	andl	$224, %edx
	movl	%edx, 4(%rax)
	movq	_READ_10@GOTPCREL(%rip), %rdx
	addl	(%rdx), %ecx
	movl	%ecx, (%rax)
	movq	%rbx, %rdi
	callq	_scsi_req
	movl	$10, 8(%rax)
	movl	$1, %eax
LBB0_6:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_READ_6,4,2                     ## @READ_6
	.comm	_WRITE_6,4,2                    ## @WRITE_6
	.comm	_READ_10,4,2                    ## @READ_10
	.comm	_MODE_SENSE,4,2                 ## @MODE_SENSE
	.comm	_MODE_SELECT,4,2                ## @MODE_SELECT
	.comm	_ILLEGAL_REQUEST,4,2            ## @ILLEGAL_REQUEST
	.no_dead_strip	_ide_cdrom_prep_pc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ide_cdrom_prep_pc
_ide_cdrom_prep_pc:                     ; @ide_cdrom_prep_pc
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_scsi_req
	ldr	x8, [x0]
	ldr	w10, [x8]
Lloh0:
	adrp	x9, _READ_6@GOTPAGE
Lloh1:
	ldr	x9, [x9, _READ_6@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x11, _WRITE_6@GOTPAGE
Lloh4:
	ldr	x11, [x11, _WRITE_6@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x11]
	subs	w9, w10, w9
	ccmp	w10, w11, #4, ne
	b.ne	LBB0_2
; %bb.1:
	ldr	w10, [x8, #16]
	str	w10, [x8, #32]
	ldr	d0, [x8, #8]
	str	d0, [x8, #16]
	ldr	w10, [x8, #4]
	and	w11, w10, #0x1f
	stp	wzr, w11, [x8, #8]
	and	w10, w10, #0xe0
Lloh6:
	adrp	x11, _READ_10@GOTPAGE
Lloh7:
	ldr	x11, [x11, _READ_10@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x11]
	add	w9, w9, w11
	stp	w9, w10, [x8]
	mov	x0, x19
	bl	_scsi_req
	mov	w8, #10
	str	w8, [x0, #8]
	b	LBB0_4
LBB0_2:
Lloh9:
	adrp	x8, _MODE_SENSE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MODE_SENSE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _MODE_SELECT@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MODE_SELECT@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	cmp	w10, w8
	ccmp	w10, w9, #4, ne
	b.ne	LBB0_4
; %bb.3:
Lloh15:
	adrp	x8, _ILLEGAL_REQUEST@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ILLEGAL_REQUEST@GOTPAGEOFF]
Lloh17:
	ldr	w20, [x8]
	mov	x0, x19
	bl	_scsi_req
	mov	x8, x0
	mov	w0, #0
	str	w20, [x8, #12]
	b	LBB0_5
LBB0_4:
	mov	w0, #1
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_READ_6,4,2                     ; @READ_6
	.comm	_WRITE_6,4,2                    ; @WRITE_6
	.comm	_READ_10,4,2                    ; @READ_10
	.comm	_MODE_SENSE,4,2                 ; @MODE_SENSE
	.comm	_MODE_SELECT,4,2                ; @MODE_SELECT
	.comm	_ILLEGAL_REQUEST,4,2            ; @ILLEGAL_REQUEST
	.no_dead_strip	_ide_cdrom_prep_pc
.subsections_via_symbols
