	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function atapi_inquiry
LCPI0_0:
	.long	5                               ## 0x5
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	1                               ## 0x1
LCPI0_1:
	.long	5                               ## 0x5
	.long	128                             ## 0x80
	.long	0                               ## 0x0
	.long	33                              ## 0x21
LCPI0_2:
	.long	31                              ## 0x1f
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_atapi_inquiry:                         ## @atapi_inquiry
	.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	%rbx
	subq	$152, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	testb	$1, 260(%rdx)
	jne	LBB0_1
## %bb.5:
	movaps	LCPI0_1(%rip), %xmm0            ## xmm0 = [5,128,0,33]
	movaps	%xmm0, -176(%rbp)
	movaps	LCPI0_2(%rip), %xmm0            ## xmm0 = [31,0,0,0]
	movaps	%xmm0, -160(%rbp)
	leaq	-144(%rbp), %rdi
	leaq	L_.str(%rip), %rsi
	movl	$8, %edx
	callq	_atapi_string
	leaq	-112(%rbp), %rdi
	leaq	L_.str.1(%rip), %rsi
	movl	$16, %edx
	callq	_atapi_string
	leaq	-48(%rbp), %rdi
	leaq	L_.str.2(%rip), %rsi
	movl	$4, %edx
	callq	_atapi_string
	movl	$144, %eax
	jmp	LBB0_6
LBB0_1:
	cmpl	$0, 264(%rbx)
	je	LBB0_2
## %bb.3:
	movq	_ATA_SENSE_ILLEGAL_REQUEST@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, (%r15)
	movl	$36, 4(%r15)
	shll	$12, %ecx
	movq	_ATA_S_READY@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_ATA_S_ERROR@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	16(%rbx), %eax
	andl	$-8, %eax
	movq	_ATA_I_CMD@GOTPCREL(%rip), %rdx
	orl	(%rdx), %eax
	movq	_ATA_I_IN@GOTPCREL(%rip), %rdx
	orl	(%rdx), %eax
	movl	%eax, 16(%rbx)
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_8
## %bb.4:
	movq	%r15, %rdi
	movl	%r14d, %esi
	movq	%rbx, %rdx
	addq	$152, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ahci_write_fis_d2h             ## TAILCALL
LBB0_2:
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [5,0,0,1]
	movaps	%xmm0, -176(%rbp)
	movl	$0, -160(%rbp)
	movl	$5, %eax
LBB0_6:
	movl	16(%rbx), %ecx
	movl	272(%rbx), %r8d
	cmpl	%r8d, %eax
	cmovll	%eax, %r8d
	andl	$-8, %ecx
	movq	_ATA_I_CMD@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_ATA_I_IN@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, 16(%rbx)
	leaq	-176(%rbp), %rcx
	movq	%r15, %rdi
	movl	%r14d, %esi
	movq	%rbx, %rdx
	callq	_write_prdt
	movq	_ATA_S_READY@GOTPCREL(%rip), %rax
	movq	_ATA_S_DSC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	%r15, %rdi
	movl	%r14d, %esi
	movq	%rbx, %rdx
	callq	_ahci_write_fis_d2h
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_8
## %bb.7:
	addq	$152, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ATA_SENSE_ILLEGAL_REQUEST,4,2  ## @ATA_SENSE_ILLEGAL_REQUEST
	.comm	_ATA_S_READY,4,2                ## @ATA_S_READY
	.comm	_ATA_S_ERROR,4,2                ## @ATA_S_ERROR
	.comm	_ATA_I_CMD,4,2                  ## @ATA_I_CMD
	.comm	_ATA_I_IN,4,2                   ## @ATA_I_IN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"BHYVE"

L_.str.1:                               ## @.str.1
	.asciz	"BHYVE DVD-ROM"

L_.str.2:                               ## @.str.2
	.asciz	"001"

	.comm	_ATA_S_DSC,4,2                  ## @ATA_S_DSC
	.no_dead_strip	_atapi_inquiry
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function atapi_inquiry
lCPI0_0:
	.long	5                               ; 0x5
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	1                               ; 0x1
lCPI0_1:
	.long	5                               ; 0x5
	.long	128                             ; 0x80
	.long	0                               ; 0x0
	.long	33                              ; 0x21
lCPI0_2:
	.long	31                              ; 0x1f
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_atapi_inquiry:                         ; @atapi_inquiry
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #208
	.cfi_def_cfa_offset 208
	stp	x22, x21, [sp, #160]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #176]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #192]            ; 16-byte Folded Spill
	add	x29, sp, #192
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	ldrb	w8, [x2, #260]
	tbnz	w8, #0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, lCPI0_1@PAGE
Lloh4:
	ldr	q0, [x8, lCPI0_1@PAGEOFF]
Lloh5:
	adrp	x8, lCPI0_2@PAGE
Lloh6:
	ldr	q1, [x8, lCPI0_2@PAGEOFF]
	stp	q0, q1, [sp]
	mov	x22, sp
	add	x0, x22, #32
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	w2, #8
	bl	_atapi_string
	add	x0, x22, #64
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w2, #16
	bl	_atapi_string
	add	x0, x22, #128
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w2, #4
	bl	_atapi_string
	mov	w8, #144
	b	LBB0_6
LBB0_2:
	ldr	w8, [x19, #264]
	cbz	w8, LBB0_5
; %bb.3:
Lloh13:
	adrp	x8, _ATA_SENSE_ILLEGAL_REQUEST@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ATA_SENSE_ILLEGAL_REQUEST@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	mov	w9, #36
	stp	w8, w9, [x21]
Lloh16:
	adrp	x9, _ATA_S_READY@GOTPAGE
Lloh17:
	ldr	x9, [x9, _ATA_S_READY@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
Lloh19:
	adrp	x10, _ATA_S_ERROR@GOTPAGE
Lloh20:
	ldr	x10, [x10, _ATA_S_ERROR@GOTPAGEOFF]
Lloh21:
	ldr	w10, [x10]
	ldr	w11, [x19, #16]
	and	w11, w11, #0xfffffff8
Lloh22:
	adrp	x12, _ATA_I_CMD@GOTPAGE
Lloh23:
	ldr	x12, [x12, _ATA_I_CMD@GOTPAGEOFF]
Lloh24:
	ldr	w12, [x12]
	orr	w11, w11, w12
Lloh25:
	adrp	x12, _ATA_I_IN@GOTPAGE
Lloh26:
	ldr	x12, [x12, _ATA_I_IN@GOTPAGEOFF]
Lloh27:
	ldr	w12, [x12]
	orr	w11, w11, w12
	str	w11, [x19, #16]
	ldur	x11, [x29, #-40]
Lloh28:
	adrp	x12, ___stack_chk_guard@GOTPAGE
Lloh29:
	ldr	x12, [x12, ___stack_chk_guard@GOTPAGEOFF]
Lloh30:
	ldr	x12, [x12]
	cmp	x12, x11
	b.ne	LBB0_8
; %bb.4:
	orr	w8, w9, w8, lsl #12
	orr	w3, w8, w10
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	ldp	x29, x30, [sp, #192]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #176]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #160]            ; 16-byte Folded Reload
	add	sp, sp, #208
	b	_ahci_write_fis_d2h
LBB0_5:
Lloh31:
	adrp	x8, lCPI0_0@PAGE
Lloh32:
	ldr	q0, [x8, lCPI0_0@PAGEOFF]
	str	q0, [sp]
	str	wzr, [sp, #16]
	mov	w8, #5
LBB0_6:
	ldr	w9, [x19, #272]
	cmp	w8, w9
	csel	w4, w8, w9, lt
	ldr	w8, [x19, #16]
	and	w8, w8, #0xfffffff8
Lloh33:
	adrp	x9, _ATA_I_CMD@GOTPAGE
Lloh34:
	ldr	x9, [x9, _ATA_I_CMD@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh36:
	adrp	x9, _ATA_I_IN@GOTPAGE
Lloh37:
	ldr	x9, [x9, _ATA_I_IN@GOTPAGEOFF]
Lloh38:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x19, #16]
	mov	x3, sp
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_write_prdt
Lloh39:
	adrp	x8, _ATA_S_READY@GOTPAGE
Lloh40:
	ldr	x8, [x8, _ATA_S_READY@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
Lloh42:
	adrp	x9, _ATA_S_DSC@GOTPAGE
Lloh43:
	ldr	x9, [x9, _ATA_S_DSC@GOTPAGEOFF]
Lloh44:
	ldr	w9, [x9]
	orr	w3, w9, w8
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_ahci_write_fis_d2h
	ldur	x8, [x29, #-40]
Lloh45:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh46:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh47:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.7:
	ldp	x29, x30, [sp, #192]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #176]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #160]            ; 16-byte Folded Reload
	add	sp, sp, #208
	ret
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdr	Lloh5, Lloh6
	.loh AdrpAdrp	Lloh3, Lloh5
	.loh AdrpLdr	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdr	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_ATA_SENSE_ILLEGAL_REQUEST,4,2  ; @ATA_SENSE_ILLEGAL_REQUEST
	.comm	_ATA_S_READY,4,2                ; @ATA_S_READY
	.comm	_ATA_S_ERROR,4,2                ; @ATA_S_ERROR
	.comm	_ATA_I_CMD,4,2                  ; @ATA_I_CMD
	.comm	_ATA_I_IN,4,2                   ; @ATA_I_IN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"BHYVE"

l_.str.1:                               ; @.str.1
	.asciz	"BHYVE DVD-ROM"

l_.str.2:                               ; @.str.2
	.asciz	"001"

	.comm	_ATA_S_DSC,4,2                  ; @ATA_S_DSC
	.no_dead_strip	_atapi_inquiry
.subsections_via_symbols
