	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_scif_writeto                   ## -- Begin function scif_writeto
	.p2align	4, 0x90
_scif_writeto:                          ## @scif_writeto
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r14d
	movq	%rcx, %r15
	movq	%rdx, %r12
	movq	%rsi, %rbx
	movl	%edi, %r13d
	movq	_scif_info@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	subq	$8, %rsp
	leaq	L_.str(%rip), %rsi
	movl	%r13d, %edx
	movq	%rbx, %rcx
	movq	%r12, %r8
	movq	%r15, %r9
	pushq	%r14
	callq	_dev_dbg
	addq	$16, %rsp
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_scif_unaligned
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	_SCIF_MAX_UNALIGNED_BUF_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	cmpq	%r12, %rcx
	jae	LBB0_4
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_SCIF_LOCAL_TO_REMOTE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%r13d, %edi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	movq	%r15, %r8
	movl	%r14d, %r9d
	pushq	$0
	pushq	%rax
	callq	_scif_rma_copy
	addq	$16, %rsp
	testl	%eax, %eax
	jne	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_SCIF_MAX_UNALIGNED_BUF_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	addq	%rcx, %rbx
	addq	%rcx, %r15
	subq	%rcx, %r12
	cmpq	%rcx, %r12
	ja	LBB0_2
LBB0_4:
	movq	_SCIF_LOCAL_TO_REMOTE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%r13d, %edi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	movq	%r12, %rcx
	movq	%r15, %r8
	movl	%r14d, %r9d
	pushq	$1
	pushq	%rax
	callq	_scif_rma_copy
	addq	$24, %rsp
	jmp	LBB0_6
LBB0_5:
	addq	$8, %rsp
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_scif_info,4,2                  ## @scif_info
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SCIFAPI writeto: ep %p loffset 0x%lx len 0x%lx roffset 0x%lx flags 0x%x\n"

	.comm	_SCIF_MAX_UNALIGNED_BUF_SIZE,8,3 ## @SCIF_MAX_UNALIGNED_BUF_SIZE
	.comm	_SCIF_LOCAL_TO_REMOTE,4,2       ## @SCIF_LOCAL_TO_REMOTE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_scif_writeto                   ; -- Begin function scif_writeto
	.p2align	2
_scif_writeto:                          ; @scif_writeto
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x4
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
Lloh0:
	adrp	x8, _scif_info@GOTPAGE
Lloh1:
	ldr	x8, [x8, _scif_info@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x23
	mov	x3, x22
	mov	x4, x21
	mov	x5, x20
	mov	x6, x19
	bl	_dev_dbg
	mov	x0, x22
	mov	x1, x20
	bl	_scif_unaligned
Lloh5:
	adrp	x24, _SCIF_LOCAL_TO_REMOTE@GOTPAGE
Lloh6:
	ldr	x24, [x24, _SCIF_LOCAL_TO_REMOTE@GOTPAGEOFF]
	cbz	x0, LBB0_4
; %bb.1:
Lloh7:
	adrp	x25, _SCIF_MAX_UNALIGNED_BUF_SIZE@GOTPAGE
Lloh8:
	ldr	x25, [x25, _SCIF_MAX_UNALIGNED_BUF_SIZE@GOTPAGEOFF]
	ldr	x3, [x25]
	cmp	x3, x21
	b.hs	LBB0_4
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w6, [x24]
	mov	x0, x23
	mov	x1, x22
	mov	w2, #0
	mov	x4, x20
	mov	x5, x19
	mov	w7, #0
	bl	_scif_rma_copy
	cbnz	w0, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x3, [x25]
	add	x22, x3, x22
	add	x20, x3, x20
	sub	x21, x21, x3
	cmp	x21, x3
	b.hi	LBB0_2
LBB0_4:
	ldr	w6, [x24]
	mov	x0, x23
	mov	x1, x22
	mov	w2, #0
	mov	x3, x21
	mov	x4, x20
	mov	x5, x19
	mov	w7, #1
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_scif_rma_copy
LBB0_5:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_scif_info,4,2                  ; @scif_info
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SCIFAPI writeto: ep %p loffset 0x%lx len 0x%lx roffset 0x%lx flags 0x%x\n"

	.comm	_SCIF_MAX_UNALIGNED_BUF_SIZE,8,3 ; @SCIF_MAX_UNALIGNED_BUF_SIZE
	.comm	_SCIF_LOCAL_TO_REMOTE,4,2       ; @SCIF_LOCAL_TO_REMOTE
.subsections_via_symbols
