	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atapi_report_luns
_atapi_report_luns:                     ## @atapi_report_luns
	.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	$80, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -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, -40(%rbp)
	leaq	-112(%rbp), %r12
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$64, %edx
	callq	_memset
	movl	$8, -100(%rbp)
	movl	16(%rbx), %eax
	andl	$-8, %eax
	movq	_ATA_I_CMD@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_ATA_I_IN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, 16(%rbx)
	movq	%r15, %rdi
	movl	%r14d, %esi
	movq	%rbx, %rdx
	movq	%r12, %rcx
	movl	$64, %r8d
	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	-40(%rbp), %rax
	jne	LBB0_2
## %bb.1:
	addq	$80, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ATA_I_CMD,4,2                  ## @ATA_I_CMD
	.comm	_ATA_I_IN,4,2                   ## @ATA_I_IN
	.comm	_ATA_S_READY,4,2                ## @ATA_S_READY
	.comm	_ATA_S_DSC,4,2                  ## @ATA_S_DSC
	.no_dead_strip	_atapi_report_luns
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atapi_report_luns
_atapi_report_luns:                     ; @atapi_report_luns
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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]
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #64
	bl	_memset
	mov	w8, #8
	str	w8, [sp, #20]
	ldr	w8, [x19, #16]
	and	w8, w8, #0xfffffff8
Lloh3:
	adrp	x9, _ATA_I_CMD@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ATA_I_CMD@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh6:
	adrp	x9, _ATA_I_IN@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ATA_I_IN@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x19, #16]
	add	x3, sp, #8
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	mov	w4, #64
	bl	_write_prdt
Lloh9:
	adrp	x8, _ATA_S_READY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ATA_S_READY@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _ATA_S_DSC@GOTPAGE
Lloh13:
	ldr	x9, [x9, _ATA_S_DSC@GOTPAGEOFF]
Lloh14:
	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]
Lloh15:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh16:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_2:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ATA_I_CMD,4,2                  ; @ATA_I_CMD
	.comm	_ATA_I_IN,4,2                   ; @ATA_I_IN
	.comm	_ATA_S_READY,4,2                ; @ATA_S_READY
	.comm	_ATA_S_DSC,4,2                  ; @ATA_S_DSC
	.no_dead_strip	_atapi_report_luns
.subsections_via_symbols
