	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nx_walk_and_build              ## -- Begin function nx_walk_and_build
	.p2align	4, 0x90
_nx_walk_and_build:                     ## @nx_walk_and_build
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movq	%rdx, %rbx
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movl	(%r8), %r12d
	leaq	-56(%rbp), %rdi
	movq	%rdx, %rsi
	callq	_scatterwalk_start
	movl	(%rbx), %eax
	movl	$0, %r14d
	cmpl	%r15d, %eax
	ja	LBB0_3
## %bb.1:
	leaq	-56(%rbp), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_sg_next
	movq	%rax, %rbx
	movq	%r13, %rdi
	movq	%rax, %rsi
	callq	_scatterwalk_start
	movl	(%rbx), %eax
	addl	%r14d, %eax
	cmpl	%r15d, %eax
	jbe	LBB0_2
LBB0_3:
	subl	%r14d, %r15d
	leaq	-56(%rbp), %rdi
	movl	%r15d, %esi
	callq	_scatterwalk_advance
	testl	%r12d, %r12d
	je	LBB0_4
## %bb.5:
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	leaq	-56(%rbp), %r13
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, %r14
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	%r13, %rdi
	callq	_scatterwalk_map
	movq	%rax, %rbx
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	subl	%r15d, %ecx
	movq	%r14, %rdi
	movq	%rax, %rsi
	leaq	-44(%rbp), %rdx
	callq	_nx_build_sg_list
	movq	%rax, %r14
	movl	-44(%rbp), %r15d
	movq	%rbx, %rdi
	callq	_scatterwalk_unmap
	movl	-44(%rbp), %esi
	movq	%r13, %rdi
	callq	_scatterwalk_advance
	movq	_SCATTERWALK_FROM_SG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, %edx
	subl	%r15d, %edx
	movq	%r13, %rdi
	callq	_scatterwalk_done
	subl	%r15d, %r12d
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	je	LBB0_11
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %r15
	subq	%rax, %r15
	sarq	$2, %r15
	cmpq	-80(%rbp), %r15                 ## 8-byte Folded Reload
	jge	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_scatterwalk_clamp
	movl	%eax, -44(%rbp)
	testl	%eax, %eax
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	-56(%rbp), %rdi
	callq	_sg_next
	movq	%r13, %rdi
	movq	%rax, %rsi
	callq	_scatterwalk_start
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_scatterwalk_clamp
	movl	%eax, -44(%rbp)
	jmp	LBB0_10
LBB0_4:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_12
LBB0_11:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
LBB0_12:
	xorl	%r12d, %r12d
	jmp	LBB0_13
LBB0_7:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
LBB0_13:
	subl	%r12d, (%rax)
	movq	%r14, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SCATTERWALK_FROM_SG,4,2        ## @SCATTERWALK_FROM_SG
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nx_walk_and_build              ; -- Begin function nx_walk_and_build
	.p2align	2
_nx_walk_and_build:                     ; @nx_walk_and_build
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x4
	mov	x23, x3
	mov	x24, x2
	mov	x22, x1
	mov	x20, x0
	ldr	w21, [x4]
	add	x0, sp, #8
	mov	x1, x2
	bl	_scatterwalk_start
	ldr	w8, [x24]
	cmp	w8, w23
	b.ls	LBB0_2
; %bb.1:
	mov	w25, #0
	b	LBB0_3
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x25, x8
	mov	x0, x24
	bl	_sg_next
	mov	x24, x0
	add	x0, sp, #8
	mov	x1, x24
	bl	_scatterwalk_start
	ldr	w8, [x24]
	add	w8, w8, w25
	cmp	w8, w23
	b.ls	LBB0_2
LBB0_3:
	sub	w1, w23, w25
	add	x0, sp, #8
	bl	_scatterwalk_advance
	cbz	w21, LBB0_10
; %bb.4:
	mov	w25, w22
Lloh0:
	adrp	x26, _SCATTERWALK_FROM_SG@GOTPAGE
Lloh1:
	ldr	x26, [x26, _SCATTERWALK_FROM_SG@GOTPAGEOFF]
	mov	x23, x20
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	lsr	x27, x24, #2
	add	x0, sp, #8
	bl	_scatterwalk_map
	mov	x24, x0
	sub	w3, w22, w27
	add	x2, sp, #4
	mov	x0, x23
	mov	x1, x24
	bl	_nx_build_sg_list
	mov	x23, x0
	ldr	w8, [sp, #4]
	sub	w21, w21, w8
	mov	x0, x24
	bl	_scatterwalk_unmap
	ldr	w1, [sp, #4]
	add	x0, sp, #8
	bl	_scatterwalk_advance
	ldr	w1, [x26]
	add	x0, sp, #8
	mov	x2, x21
	bl	_scatterwalk_done
	cbz	w21, LBB0_9
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	sub	x24, x23, x20
	cmp	x25, x24, asr #2
	b.le	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x0, sp, #8
	mov	x1, x21
	bl	_scatterwalk_clamp
	str	w0, [sp, #4]
	cbnz	w0, LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x0, [sp, #8]
	bl	_sg_next
	mov	x1, x0
	add	x0, sp, #8
	bl	_scatterwalk_start
	add	x0, sp, #8
	mov	x1, x21
	bl	_scatterwalk_clamp
	str	w0, [sp, #4]
	b	LBB0_5
LBB0_9:
	mov	x20, x23
LBB0_10:
	ldr	w8, [x19]
	sub	w8, w8, w21
	str	w8, [x19]
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_SCATTERWALK_FROM_SG,4,2        ; @SCATTERWALK_FROM_SG
.subsections_via_symbols
