	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function msb_sg_compare_to_buffer
_msb_sg_compare_to_buffer:              ## @msb_sg_compare_to_buffer
	.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
	movq	%rcx, %rbx
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r15
	movq	%rdi, %r12
	callq	_sg_nents
	movq	_SG_MITER_ATOMIC@GOTPCREL(%rip), %rdx
	movq	_SG_MITER_FROM_SG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rdx), %ecx
	leaq	-64(%rbp), %r13
	movq	%r13, %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	callq	_sg_miter_start
	movq	%r13, %rdi
	movq	%rbx, %r13
	callq	_sg_miter_next
	testq	%rbx, %rbx
	setne	%cl
	xorl	%r14d, %r14d
	testq	%rax, %rax
	je	LBB0_10
## %bb.1:
	testq	%r13, %r13
	je	LBB0_10
## %bb.2:
	xorl	%r14d, %r14d
	leaq	-64(%rbp), %r12
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movq	%r15, %rbx
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-64(%rbp), %rdi
	subq	%rdi, %rbx
	jb	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	%r12, %rdi
	callq	_sg_miter_next
	movq	%rbx, %r15
	testq	%rax, %rax
	jne	LBB0_4
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	subq	%r15, %rdi
	movq	%r13, %rsi
	callq	_min
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	movl	%eax, %r13d
	addq	-56(%rbp), %r15
	movq	%r15, %rdi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_memcmp
	xorl	%r14d, %r14d
	testq	%rax, %rax
	setne	%r14b
	negl	%r14d
	testq	%rax, %rax
	jne	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movslq	%r13d, %r15
	movq	%r12, %rdi
	callq	_sg_miter_next
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	subq	%r15, %r13
	setne	%cl
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	(%rbx,%r15,4), %rbx
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movl	$0, %r15d
	testq	%r13, %r13
	jne	LBB0_3
	jmp	LBB0_10
LBB0_9:
	movb	$1, %cl
LBB0_10:
	testb	%cl, %cl
	movl	$-1, %ebx
	cmovel	%r14d, %ebx
	testl	%r14d, %r14d
	cmovnel	%r14d, %ebx
	leaq	-64(%rbp), %rdi
	callq	_sg_miter_stop
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SG_MITER_ATOMIC,4,2            ## @SG_MITER_ATOMIC
	.comm	_SG_MITER_FROM_SG,4,2           ## @SG_MITER_FROM_SG
	.no_dead_strip	_msb_sg_compare_to_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function msb_sg_compare_to_buffer
_msb_sg_compare_to_buffer:              ; @msb_sg_compare_to_buffer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	bl	_sg_nents
	mov	x2, x0
Lloh0:
	adrp	x8, _SG_MITER_ATOMIC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SG_MITER_ATOMIC@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _SG_MITER_FROM_SG@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SG_MITER_FROM_SG@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w3, w9, w8
	mov	x0, sp
	mov	x1, x22
	bl	_sg_miter_start
	mov	x0, sp
	bl	_sg_miter_next
	mov	w23, #0
	cmp	x19, #0
	cset	w8, ne
	cbz	x0, LBB0_9
; %bb.1:
	cbz	x19, LBB0_9
; %bb.2:
	mov	w23, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [sp]
	subs	x22, x21, x8
	b.lo	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, sp
	bl	_sg_miter_next
	mov	x21, x22
	cbnz	x0, LBB0_3
	b	LBB0_8
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	sub	x0, x8, x21
	mov	x1, x19
	bl	_min
	mov	x22, x0
	ldr	x8, [sp, #8]
	add	x0, x8, x21
	mov	x1, x20
	mov	x2, x22
	bl	_memcmp
	cmp	x0, #0
	csetm	w23, ne
	cbnz	x0, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	sub	x19, x19, w22, sxtw
	mov	x0, sp
	bl	_sg_miter_next
	cmp	x19, #0
	cset	w8, ne
	cbz	x0, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x21, #0
	add	x20, x20, w22, sxtw #2
	cbnz	x19, LBB0_3
	b	LBB0_9
LBB0_8:
	mov	w8, #1
LBB0_9:
	cmp	w23, #0
	cset	w9, eq
	tst	w9, w8
	csinv	w19, w23, wzr, eq
	mov	x0, sp
	bl	_sg_miter_stop
	mov	x0, x19
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SG_MITER_ATOMIC,4,2            ; @SG_MITER_ATOMIC
	.comm	_SG_MITER_FROM_SG,4,2           ; @SG_MITER_FROM_SG
	.no_dead_strip	_msb_sg_compare_to_buffer
.subsections_via_symbols
