	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qib_count_sge
_qib_count_sge:                         ## @qib_count_sge
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	56(%rdi), %r12
	movups	8(%rdi), %xmm0
	movups	24(%rdi), %xmm1
	movups	40(%rdi), %xmm2
	movaps	%xmm2, -64(%rbp)
	movaps	%xmm1, -80(%rbp)
	movaps	%xmm0, -96(%rbp)
	testl	%esi, %esi
	je	LBB0_16
## %bb.1:
	movl	%esi, %ebx
	movq	(%rdi), %r14
	movl	$1, %r13d
	movl	$2, %ecx
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_5 Depth=1
	decq	%r14
	je	LBB0_15
## %bb.3:                               ##   in Loop: Header=BB0_5 Depth=1
	movups	(%r12), %xmm0
	movups	16(%r12), %xmm1
	movups	32(%r12), %xmm2
	addq	$48, %r12
	movaps	%xmm2, -64(%rbp)
	movaps	%xmm1, -80(%rbp)
	movaps	%xmm0, -96(%rbp)
LBB0_4:                                 ##   in Loop: Header=BB0_5 Depth=1
	leal	1(%r15), %ecx
	subl	%eax, %ebx
	je	LBB0_19
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ecx, %r15d
	leaq	-96(%rbp), %rdi
	movl	%ebx, %esi
	callq	_rvt_get_sge_length
	movq	-56(%rbp), %rcx
	testb	$3, %cl
	jne	LBB0_18
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpl	%eax, %ebx
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	%eax, %edx
	andl	$3, %edx
	jne	LBB0_18
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	incl	%r13d
	movslq	%eax, %rdx
	addq	%rdx, %rcx
	movq	%rcx, -56(%rbp)
	movq	-96(%rbp), %rcx
	movq	%rcx, %rsi
	subq	%rdx, %rsi
	movq	%rsi, -96(%rbp)
	subq	%rdx, -88(%rbp)
	je	LBB0_2
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpq	%rdx, %rcx
	jne	LBB0_4
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-64(%rbp), %rcx
	cmpq	$0, 16(%rcx)
	je	LBB0_4
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-80(%rbp), %rsi
	movq	-72(%rbp), %rdx
	incq	%rsi
	movq	%rsi, -80(%rbp)
	movq	_RVT_SEGSZ@GOTPCREL(%rip), %rdi
	cmpq	(%rdi), %rsi
	jl	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_5 Depth=1
	incq	%rdx
	movq	%rdx, -72(%rbp)
	cmpq	(%rcx), %rdx
	jge	LBB0_20
## %bb.13:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	$0, -80(%rbp)
	xorl	%esi, %esi
LBB0_14:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%rcx), %rcx
	movq	(%rcx,%rdx,8), %rcx
	movq	(%rcx), %rcx
	shlq	$4, %rsi
	movq	8(%rcx,%rsi), %rdx
	movq	%rdx, -56(%rbp)
	movq	(%rcx,%rsi), %rcx
	movq	%rcx, -96(%rbp)
	jmp	LBB0_4
LBB0_15:                                ##   in Loop: Header=BB0_5 Depth=1
	xorl	%r14d, %r14d
	jmp	LBB0_4
LBB0_18:
	xorl	%r15d, %r15d
	jmp	LBB0_19
LBB0_16:
	movl	$1, %r15d
LBB0_19:
	movl	%r15d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	movl	%r13d, %r15d
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_RVT_SEGSZ,8,3                  ## @RVT_SEGSZ
	.no_dead_strip	_qib_count_sge
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qib_count_sge
_qib_count_sge:                         ; @qib_count_sge
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	ldr	x21, [x0, #56]
	ldur	q0, [x0, #8]
	ldur	q1, [x0, #24]
	stp	q0, q1, [sp]
	ldur	q0, [x0, #40]
	str	q0, [sp, #32]
	cbz	w1, LBB0_16
; %bb.1:
	mov	x19, x1
	ldr	x23, [x0]
	mov	w22, #1
	mov	w8, #2
Lloh0:
	adrp	x24, _RVT_SEGSZ@GOTPAGE
Lloh1:
	ldr	x24, [x24, _RVT_SEGSZ@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x8, #8]
	ldr	x8, [x8, x9, lsl #3]
	ldr	x8, [x8]
	add	x8, x8, x10, lsl #4
	ldr	x9, [x8, #8]
	str	x9, [sp, #40]
	ldr	x8, [x8]
	str	x8, [sp]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w8, w20, #1
	subs	w19, w19, w0
	b.eq	LBB0_17
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x20, x8
	mov	x0, sp
	mov	x1, x19
	bl	_rvt_get_sge_length
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	x8, [sp, #40]
	tst	x8, #0x3
	b.ne	LBB0_15
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w19, w0
	b.eq	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	and	w9, w0, #0x3
	cbnz	w9, LBB0_15
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w22, w22, #1
	sxtw	x9, w0
	add	x8, x8, x9
	str	x8, [sp, #40]
	ldp	x8, x10, [sp]
	sub	x11, x8, x9
	subs	x10, x10, x9
	stp	x11, x10, [sp]
	b.ne	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	subs	x23, x23, #1
	b.eq	LBB0_3
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	ldp	q0, q1, [x21]
	ldr	q2, [x21, #32]
	add	x21, x21, #48
	stp	q1, q2, [sp, #16]
	str	q0, [sp]
	b	LBB0_3
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [sp, #32]
	ldr	x9, [x8, #16]
	cbz	x9, LBB0_3
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	ldp	x10, x9, [sp, #16]
	add	x10, x10, #1
	str	x10, [sp, #16]
	ldr	x11, [x24]
	cmp	x10, x11
	b.lt	LBB0_2
; %bb.13:                               ;   in Loop: Header=BB0_4 Depth=1
	add	x9, x9, #1
	str	x9, [sp, #24]
	ldr	x10, [x8]
	cmp	x9, x10
	b.ge	LBB0_18
; %bb.14:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x10, #0
	str	xzr, [sp, #16]
	b	LBB0_2
LBB0_15:
	mov	w20, #0
	b	LBB0_17
LBB0_16:
	mov	w20, #1
LBB0_17:
	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
	add	sp, sp, #112
	ret
LBB0_18:
	mov	x20, x22
	b	LBB0_17
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_RVT_SEGSZ,8,3                  ; @RVT_SEGSZ
	.no_dead_strip	_qib_count_sge
.subsections_via_symbols
