	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ahci_write_fis_d2h_ncq
_ahci_write_fis_d2h_ncq:                ## @ahci_write_fis_d2h_ncq
	.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	$88, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	_ATA_S_READY@GOTPCREL(%rip), %rax
	movq	_ATA_S_DSC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, (%rdi)
	leaq	-112(%rbp), %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$80, %edx
	callq	_memset
	movq	_FIS_TYPE_REGD2H@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%esi, -112(%rbp)
	movl	$0, -108(%rbp)
	movl	(%rbx), %eax
	movl	%eax, -104(%rbp)
	movl	$-2, %eax
	movl	%r14d, %ecx
	roll	%cl, %eax
	movl	$0, -100(%rbp)
	andl	%eax, 4(%rbx)
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_ahci_write_fis
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_2
## %bb.1:
	addq	$88, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ATA_S_READY,4,2                ## @ATA_S_READY
	.comm	_ATA_S_DSC,4,2                  ## @ATA_S_DSC
	.comm	_FIS_TYPE_REGD2H,4,2            ## @FIS_TYPE_REGD2H
	.no_dead_strip	_ahci_write_fis_d2h_ncq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ahci_write_fis_d2h_ncq
_ahci_write_fis_d2h_ncq:                ; @ahci_write_fis_d2h_ncq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
Lloh3:
	adrp	x8, _ATA_S_READY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ATA_S_READY@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _ATA_S_DSC@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ATA_S_DSC@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x0]
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #80
	bl	_memset
Lloh9:
	adrp	x8, _FIS_TYPE_REGD2H@GOTPAGE
Lloh10:
	ldr	x8, [x8, _FIS_TYPE_REGD2H@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	stp	w1, wzr, [sp, #8]
	ldp	w8, w9, [x20]
	stp	w8, wzr, [sp, #16]
	mov	w8, #1
	lsl	w8, w8, w19
	bic	w8, w9, w8
	str	w8, [x20, #4]
	add	x2, sp, #8
	mov	x0, x20
	bl	_ahci_write_fis
	ldur	x8, [x29, #-24]
Lloh12:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh14:
	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
	add	sp, sp, #128
	ret
LBB0_2:
	bl	___stack_chk_fail
	.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_S_READY,4,2                ; @ATA_S_READY
	.comm	_ATA_S_DSC,4,2                  ; @ATA_S_DSC
	.comm	_FIS_TYPE_REGD2H,4,2            ; @FIS_TYPE_REGD2H
	.no_dead_strip	_ahci_write_fis_d2h_ncq
.subsections_via_symbols
