	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function scr_write
_scr_write:                             ## @scr_write
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $esi killed $esi def $rsi
	movq	_sata_regs_base@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movslq	%edi, %r15
	movq	(%rax,%r15,8), %rax
	movq	_SATA_LINK_DATA@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	movq	%rdx, (%rax,%rcx,8)
	shll	$2, %esi
	movq	_SATA_STD_ASYNC_REGS_OFF@GOTPCREL(%rip), %rcx
	addq	(%rcx), %rsi
	movq	_SATA_LINK_WR_ADDR@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	movq	%rsi, (%rax,%rcx,8)
	movq	_MAX_SRC_WRITE_LOOPS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	movq	_SATA_LINK_CONTROL@GOTPCREL(%rip), %r12
	movslq	(%r12), %rcx
	testb	$1, (%rax,%rcx,8)
	jne	LBB0_4
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	$10, %edi
	callq	_udelay
	decl	%ebx
	je	LBB0_6
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r14), %rax
	movq	(%rax,%r15,8), %rax
	movslq	(%r12), %rcx
	testb	$1, (%rax,%rcx,8)
	je	LBB0_1
## %bb.3:
	movl	$1, %ebx
LBB0_4:
	testl	%ebx, %ebx
	je	LBB0_6
## %bb.5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	leaq	L_str(%rip), %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_puts                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_sata_regs_base,8,3             ## @sata_regs_base
	.comm	_SATA_LINK_DATA,4,2             ## @SATA_LINK_DATA
	.comm	_SATA_STD_ASYNC_REGS_OFF,8,3    ## @SATA_STD_ASYNC_REGS_OFF
	.comm	_SATA_LINK_WR_ADDR,4,2          ## @SATA_LINK_WR_ADDR
	.comm	_MAX_SRC_WRITE_LOOPS,4,2        ## @MAX_SRC_WRITE_LOOPS
	.comm	_SATA_LINK_CONTROL,4,2          ## @SATA_LINK_CONTROL
	.section	__TEXT,__cstring,cstring_literals
L_str:                                  ## @str
	.asciz	"scr_write() Timed out of wait for write completion"

	.no_dead_strip	_scr_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function scr_write
_scr_write:                             ; @scr_write
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
                                        ; kill: def $w0 killed $w0 def $x0
Lloh0:
	adrp	x19, _sata_regs_base@GOTPAGE
Lloh1:
	ldr	x19, [x19, _sata_regs_base@GOTPAGEOFF]
	ldr	x8, [x19]
	ldr	x8, [x8, w0, sxtw #3]
Lloh2:
	adrp	x9, _SATA_LINK_DATA@GOTPAGE
Lloh3:
	ldr	x9, [x9, _SATA_LINK_DATA@GOTPAGEOFF]
Lloh4:
	ldrsw	x9, [x9]
	str	x2, [x8, x9, lsl #3]
	lsl	w9, w1, #2
Lloh5:
	adrp	x10, _SATA_STD_ASYNC_REGS_OFF@GOTPAGE
Lloh6:
	ldr	x10, [x10, _SATA_STD_ASYNC_REGS_OFF@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x10]
Lloh8:
	adrp	x11, _SATA_LINK_WR_ADDR@GOTPAGE
Lloh9:
	ldr	x11, [x11, _SATA_LINK_WR_ADDR@GOTPAGEOFF]
	add	x9, x10, x9
Lloh10:
	ldrsw	x10, [x11]
	str	x9, [x8, x10, lsl #3]
Lloh11:
	adrp	x9, _MAX_SRC_WRITE_LOOPS@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MAX_SRC_WRITE_LOOPS@GOTPAGEOFF]
Lloh13:
	ldr	w20, [x9]
Lloh14:
	adrp	x21, _SATA_LINK_CONTROL@GOTPAGE
Lloh15:
	ldr	x21, [x21, _SATA_LINK_CONTROL@GOTPAGEOFF]
	ldrsw	x9, [x21]
	ldr	x8, [x8, x9, lsl #3]
	tbnz	w8, #0, LBB0_5
; %bb.1:
	sxtw	x22, w0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #10
	bl	_udelay
	subs	w20, w20, #1
	b.eq	LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x19]
	ldr	x8, [x8, x22, lsl #3]
	ldrsw	x9, [x21]
	ldr	x8, [x8, x9, lsl #3]
	tbz	w8, #0, LBB0_2
; %bb.4:
	mov	w20, #1
LBB0_5:
	cbz	w20, LBB0_7
; %bb.6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_7:
Lloh16:
	adrp	x0, l_str@PAGE
Lloh17:
	add	x0, x0, l_str@PAGEOFF
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_puts
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_sata_regs_base,8,3             ; @sata_regs_base
	.comm	_SATA_LINK_DATA,4,2             ; @SATA_LINK_DATA
	.comm	_SATA_STD_ASYNC_REGS_OFF,8,3    ; @SATA_STD_ASYNC_REGS_OFF
	.comm	_SATA_LINK_WR_ADDR,4,2          ; @SATA_LINK_WR_ADDR
	.comm	_MAX_SRC_WRITE_LOOPS,4,2        ; @MAX_SRC_WRITE_LOOPS
	.comm	_SATA_LINK_CONTROL,4,2          ; @SATA_LINK_CONTROL
	.section	__TEXT,__cstring,cstring_literals
l_str:                                  ; @str
	.asciz	"scr_write() Timed out of wait for write completion"

	.no_dead_strip	_scr_write
.subsections_via_symbols
