	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qib_init_sge
_qib_init_sge:                          ## @qib_init_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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	24(%rdi), %edi
	callq	_to_idev
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	16(%rbx), %rax
	leaq	12(%rbx), %rcx
	testq	%rax, %rax
	cmovneq	%rax, %rcx
	movl	(%rcx), %edi
	callq	_to_ipd
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	32(%rbx), %rax
	movq	%rax, 64(%rbx)
	movq	$0, (%rbx)
	movl	(%r14), %edx
	testl	%edx, %edx
	jle	LBB0_1
## %bb.2:
	leaq	8(%rbx), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	leaq	56(%rbx), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	8(%r14), %rcx
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	xorl	%r13d, %r13d
	xorl	%r15d, %r15d
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	addq	%r12, %rcx
	movq	_IB_ACCESS_LOCAL_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	callq	_qib_lkey_ok
	testl	%eax, %eax
	je	LBB0_14
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	8(%rdx), %rcx
	movq	(%rbx), %rax
	addq	(%rcx,%r12), %rax
	movq	%rax, (%rbx)
	incl	%r15d
	movl	(%rdx), %edx
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%r13
	movslq	%edx, %rsi
	addq	$8, %r12
	cmpq	%rsi, %r13
	jge	LBB0_8
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rcx,%r12)
	je	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	testl	%r15d, %r15d
	je	LBB0_5
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	64(%rbx), %rax
	movslq	%r15d, %r14
	leaq	(%rax,%r14,4), %rdx
	addq	$-4, %rdx
	addq	%r12, %rcx
	movq	_IB_ACCESS_LOCAL_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_qib_lkey_ok
	testl	%eax, %eax
	jne	LBB0_6
## %bb.10:
	decl	%r15d
	je	LBB0_13
## %bb.11:
	addq	$-2, %r14
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	64(%rbx), %rax
	movl	(%rax,%r14,4), %edi
	callq	_qib_put_mr
	decq	%r14
	decl	%r15d
	jne	LBB0_12
LBB0_13:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	callq	_qib_put_mr
LBB0_14:
	movl	$0, 40(%rbx)
	leaq	-104(%rbp), %r12
	xorl	%r15d, %r15d
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %eax
	movl	%eax, -88(%rbp)
	movq	_IB_WC_LOC_PROT_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -92(%rbp)
	movq	_IB_WC_RECV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -96(%rbp)
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, -104(%rbp)
	movl	8(%rbx), %edi
	callq	_to_icq
	movl	%eax, %edi
	movq	%r12, %rsi
	movl	$1, %edx
	callq	_qib_cq_enter
	jmp	LBB0_15
LBB0_1:
	xorl	%eax, %eax
	xorl	%r15d, %r15d
LBB0_8:
	movl	%r15d, 40(%rbx)
	movq	%rax, 48(%rbx)
	movl	$1, %r15d
LBB0_15:
	movl	%r15d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_ACCESS_LOCAL_WRITE,4,2      ## @IB_ACCESS_LOCAL_WRITE
	.comm	_IB_WC_LOC_PROT_ERR,4,2         ## @IB_WC_LOC_PROT_ERR
	.comm	_IB_WC_RECV,4,2                 ## @IB_WC_RECV
	.no_dead_strip	_qib_init_sge
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qib_init_sge
_qib_init_sge:                          ; @qib_init_sge
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x20, x1
	mov	x19, x0
	ldr	w0, [x0, #24]
	bl	_to_idev
	mov	x22, x0
	ldr	x8, [x19, #16]
	add	x9, x19, #12
	cmp	x8, #0
	csel	x8, x9, x8, eq
	ldr	w0, [x8]
	bl	_to_ipd
	ldr	x8, [x19, #32]
	str	x8, [x19, #64]
	str	xzr, [x19]
	ldr	w10, [x20]
	cmp	w10, #1
	b.lt	LBB0_13
; %bb.1:
	mov	x23, x0
	mov	x26, #0
	mov	x8, #0
	mov	x27, #0
	mov	w25, #0
	ldr	x9, [x20, #8]
	add	x24, x19, #8
	add	x21, x19, #56
Lloh0:
	adrp	x28, _IB_ACCESS_LOCAL_WRITE@GOTPAGE
Lloh1:
	ldr	x28, [x28, _IB_ACCESS_LOCAL_WRITE@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x3, x9, x26
	ldr	w4, [x28]
	mov	x0, x22
	mov	x1, x23
	mov	x2, x21
	bl	_qib_lkey_ok
	cbz	w0, LBB0_12
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x20, #8]
	ldr	x8, [x9, x26]
	ldr	x10, [x19]
	add	x8, x10, x8
	str	x8, [x19]
	add	w25, w25, #1
	ldr	w10, [x20]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x27, x27, #1
	add	x26, x26, #8
	cmp	x27, w10, sxtw
	b.ge	LBB0_14
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x9, x26]
	cbz	x11, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	cbz	w25, LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x19, #64]
	sub	w10, w25, #1
	add	x2, x8, w10, sxtw #2
	add	x3, x9, x26
	ldr	w4, [x28]
	mov	x0, x22
	mov	x1, x23
	bl	_qib_lkey_ok
	cbnz	w0, LBB0_3
; %bb.8:
	subs	w22, w25, #1
	b.eq	LBB0_11
; %bb.9:
	sxtw	x8, w25
	lsl	x8, x8, #2
	sub	x23, x8, #8
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #64]
	ldr	w0, [x8, x23]
	bl	_qib_put_mr
	sub	x23, x23, #4
	subs	w22, w22, #1
	b.ne	LBB0_10
LBB0_11:
	ldr	w0, [x21]
	bl	_qib_put_mr
LBB0_12:
	str	wzr, [x19, #40]
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	ldr	w8, [x20, #4]
	str	w8, [sp, #24]
Lloh2:
	adrp	x8, _IB_WC_LOC_PROT_ERR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IB_WC_LOC_PROT_ERR@GOTPAGEOFF]
Lloh4:
	adrp	x9, _IB_WC_RECV@GOTPAGE
Lloh5:
	ldr	x9, [x9, _IB_WC_RECV@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #16]
	str	x24, [sp, #8]
	ldr	w0, [x19, #8]
	bl	_to_icq
	add	x1, sp, #8
	mov	w2, #1
	bl	_qib_cq_enter
	mov	w0, #0
	b	LBB0_15
LBB0_13:
	mov	x8, #0
	mov	w25, #0
LBB0_14:
	str	w25, [x19, #40]
	str	x8, [x19, #48]
	mov	w0, #1
LBB0_15:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_ACCESS_LOCAL_WRITE,4,2      ; @IB_ACCESS_LOCAL_WRITE
	.comm	_IB_WC_LOC_PROT_ERR,4,2         ; @IB_WC_LOC_PROT_ERR
	.comm	_IB_WC_RECV,4,2                 ; @IB_WC_RECV
	.no_dead_strip	_qib_init_sge
.subsections_via_symbols
