	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function msb_sg_copy
_msb_sg_copy:                           ## @msb_sg_copy
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r13
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r15
	movq	%rdi, %rbx
	testq	%rcx, %rcx
	je	LBB0_5
## %bb.1:
	movq	%rcx, %r14
	xorl	%eax, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rsi
	subq	%r14, %rsi
	ja	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_sg_is_last
	testq	%rax, %rax
	jne	LBB0_16
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rbx), %r15
	movq	%rbx, %rdi
	callq	_sg_next
	movq	%rax, %rbx
	subq	%r15, %r14
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	jne	LBB0_2
	jmp	LBB0_9
LBB0_5:
	xorl	%eax, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_9
LBB0_6:
	movq	%r13, %rdi
	callq	_min
	movq	%r15, %r12
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_sg_page
	addq	8(%rbx), %r14
	movq	%r12, %rdi
	movl	%eax, %esi
	movq	%r15, %rdx
	movq	%r14, %rcx
	callq	_sg_set_page
	movq	%rbx, %rdi
	callq	_sg_is_last
	testq	%rax, %rax
	jne	LBB0_23
## %bb.7:
	subq	%r15, %r13
	movq	%r15, %r14
	je	LBB0_24
## %bb.8:
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_sg_next
	movq	%rax, %r15
	decl	-52(%rbp)                       ## 4-byte Folded Spill
	movq	%rbx, %rdi
	callq	_sg_next
	movq	%rax, %rbx
LBB0_9:
	movq	(%rbx), %r14
	cmpq	%r14, %r13
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	jbe	LBB0_15
## %bb.10:
	movl	-52(%rbp), %r13d                ## 4-byte Reload
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	subl	$1, %r13d
	jb	LBB0_17
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	addq	%r14, -64(%rbp)                 ## 8-byte Folded Spill
	movq	%rbx, %rdi
	callq	_sg_page
	movq	(%rbx), %rdx
	movq	8(%rbx), %rcx
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_sg_set_page
	movq	%rbx, %rdi
	callq	_sg_is_last
	testq	%rax, %rax
	jne	LBB0_26
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	subq	%r14, %r12
	je	LBB0_26
## %bb.14:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	%rbx, %rdi
	callq	_sg_next
	movq	%rax, %rbx
	movq	%r15, %rdi
	callq	_sg_next
	movq	%rax, %r15
	movq	(%rbx), %r14
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	cmpq	%r14, %r12
	ja	LBB0_11
	jmp	LBB0_18
LBB0_15:
	movl	-52(%rbp), %r13d                ## 4-byte Reload
	jmp	LBB0_18
LBB0_16:
	xorl	%r14d, %r14d
	jmp	LBB0_22
LBB0_17:
	movl	$-1, %r13d
LBB0_18:
	cmpq	$0, -48(%rbp)                   ## 8-byte Folded Reload
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_21
## %bb.19:
	testl	%r13d, %r13d
	je	LBB0_21
## %bb.20:
	movq	%rbx, %rdi
	callq	_sg_page
	movq	8(%rbx), %rcx
	movq	%r15, %rdi
	movl	%eax, %esi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdx
	callq	_sg_set_page
	addq	%rbx, %r14
	jmp	LBB0_21
LBB0_26:
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_21
LBB0_23:
	movq	%r15, %r14
LBB0_24:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
LBB0_21:
	movq	%r15, %rdi
	callq	_sg_mark_end
LBB0_22:
	movq	%r14, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_msb_sg_copy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function msb_sg_copy
_msb_sg_copy:                           ; @msb_sg_copy
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x4
	mov	x22, x2
	mov	x19, x1
	mov	x23, x0
	cbz	x3, LBB0_5
; %bb.1:
	mov	x24, x3
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	subs	x1, x8, x24
	b.hi	LBB0_15
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x23
	bl	_sg_is_last
	cbnz	x0, LBB0_18
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x23]
	sub	x24, x24, x8
	mov	x0, x23
	bl	_sg_next
	mov	x23, x0
	cbnz	x24, LBB0_2
LBB0_5:
	mov	x21, #0
LBB0_6:
	ldr	x24, [x23]
	cmp	x20, x24
	b.ls	LBB0_11
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	cbz	w22, LBB0_20
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x21, x24, x21
	mov	x0, x23
	bl	_sg_page
	mov	x1, x0
	ldp	x2, x3, [x23]
	mov	x0, x19
	bl	_sg_set_page
	mov	x0, x23
	bl	_sg_is_last
	cbnz	x0, LBB0_14
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	sub	x20, x20, x24
	cbz	x20, LBB0_14
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x23
	bl	_sg_next
	mov	x23, x0
	mov	x0, x19
	bl	_sg_next
	mov	x19, x0
	ldr	x24, [x23]
	sub	w22, w22, #1
	cmp	x20, x24
	b.hi	LBB0_7
LBB0_11:
	cbz	x20, LBB0_14
LBB0_12:
	cbz	w22, LBB0_14
; %bb.13:
	mov	x0, x23
	bl	_sg_page
	mov	x1, x0
	ldr	x3, [x23, #8]
	mov	x0, x19
	mov	x2, x20
	bl	_sg_set_page
	add	x21, x21, x20
LBB0_14:
	mov	x0, x19
	bl	_sg_mark_end
	b	LBB0_19
LBB0_15:
	mov	x0, x20
	bl	_min
	mov	x21, x0
	mov	x0, x23
	bl	_sg_page
	mov	x1, x0
	ldr	x8, [x23, #8]
	add	x3, x8, x24
	mov	x0, x19
	mov	x2, x21
	bl	_sg_set_page
	mov	x0, x23
	bl	_sg_is_last
	cbnz	x0, LBB0_14
; %bb.16:
	sub	x20, x20, x21
	cbz	x20, LBB0_14
; %bb.17:
	mov	x0, x19
	bl	_sg_next
	mov	x19, x0
	sub	w22, w22, #1
	mov	x0, x23
	bl	_sg_next
	mov	x23, x0
	b	LBB0_6
LBB0_18:
	mov	x21, #0
LBB0_19:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_20:
	mov	w22, #-1
	cbnz	x20, LBB0_12
	b	LBB0_14
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_msb_sg_copy
.subsections_via_symbols
