	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qib_make_ruc_header            ## -- Begin function qib_make_ruc_header
	.p2align	4, 0x90
_qib_make_ruc_header:                   ## @qib_make_ruc_header
	.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
	movl	%ecx, -64(%rbp)                 ## 4-byte Spill
	movl	%edx, -60(%rbp)                 ## 4-byte Spill
	movq	%rsi, -96(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movq	40(%rdi), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	28(%rdi), %esi
	movl	32(%rdi), %edi
	callq	_to_iport
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %r14d
	movl	%r14d, %r15d
	negl	%r15d
	andl	$3, %r15d
	addl	%r15d, %r14d
	sarl	$2, %r14d
	movq	_QIB_LRH_BTH@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	leaq	24(%rbx), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_rdma_ah_get_ah_flags
	movq	_IB_AH_GRH@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %r12
	addq	$8, %r12
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_rdma_ah_read_grh
	movl	4(%rbx), %ecx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	movl	%eax, %edx
	movl	%r14d, %r8d
	callq	_qib_make_grh
	addl	%eax, 4(%rbx)
	movq	_QIB_LRH_GRH@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_2:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	callq	_rdma_ah_get_sl
	cltq
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx,%rax,4), %ebx
	shll	$12, %ebx
	movq	%r13, %rdi
	callq	_rdma_ah_get_sl
	shll	$4, %eax
	orl	%eax, %r12d
	orl	%ebx, %r12d
	movl	%r12d, %edi
	callq	_cpu_to_be16
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movq	(%r12), %rcx
	movq	(%rcx), %rcx
	movq	%rax, (%rcx)
	movq	%r13, %rdi
	callq	_rdma_ah_get_dlid
	movl	%eax, %edi
	callq	_cpu_to_be16
	movq	(%r12), %rcx
	movq	(%rcx), %rcx
	movq	%rax, 8(%rcx)
	movq	-88(%rbp), %r13                 ## 8-byte Reload
	addl	4(%r13), %r14d
	movq	_SIZE_OF_CRC@GOTPCREL(%rip), %rax
	addl	(%rax), %r14d
	movl	%r14d, %edi
	callq	_cpu_to_be16
	movq	(%r12), %rcx
	movq	(%rcx), %rcx
	movq	%rax, 16(%rcx)
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_ppd_from_ibp
	movl	(%rax), %ebx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_rdma_ah_get_path_bits
	orl	%eax, %ebx
	movl	%ebx, %edi
	callq	_cpu_to_be16
	movq	(%r12), %rcx
	movq	(%rcx), %rcx
	movq	%rax, 24(%rcx)
	movl	20(%r13), %esi
	movq	%r14, %rdi
	callq	_qib_get_pkey
	shll	$20, %r15d
	movq	8(%r13), %rdx
	movq	_IB_MIG_MIGRATED@GOTPCREL(%rip), %rsi
	xorl	%ecx, %ecx
	cmpq	(%rsi), %rdx
	jne	LBB0_4
## %bb.3:
	movq	_IB_BTH_MIG_REQ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_4:
	orl	-60(%rbp), %r15d                ## 4-byte Folded Reload
	orl	%eax, %r15d
	orl	%ecx, %r15d
	movl	%r15d, %edi
	callq	_cpu_to_be32
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	movq	(%rbx), %rcx
	movq	%rax, (%rcx)
	movl	16(%r13), %edi
	callq	_cpu_to_be32
	movq	(%rbx), %rcx
	movq	%rax, 8(%rcx)
	movl	-64(%rbp), %edi                 ## 4-byte Reload
	callq	_cpu_to_be32
	movq	(%rbx), %rcx
	movq	%rax, 16(%rcx)
	movq	8(%r14), %rax
	movl	(%rax), %edi
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_this_cpu_inc                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_QIB_LRH_BTH,4,2                ## @QIB_LRH_BTH
	.comm	_IB_AH_GRH,4,2                  ## @IB_AH_GRH
	.comm	_QIB_LRH_GRH,4,2                ## @QIB_LRH_GRH
	.comm	_SIZE_OF_CRC,4,2                ## @SIZE_OF_CRC
	.comm	_IB_MIG_MIGRATED,8,3            ## @IB_MIG_MIGRATED
	.comm	_IB_BTH_MIG_REQ,4,2             ## @IB_BTH_MIG_REQ
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qib_make_ruc_header            ; -- Begin function qib_make_ruc_header
	.p2align	2
_qib_make_ruc_header:                   ; @qib_make_ruc_header
	.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
	str	w3, [sp, #12]                   ; 4-byte Folded Spill
	mov	x23, x2
	mov	x19, x1
	mov	x22, x0
	ldr	x28, [x0, #40]
	ldr	w0, [x0, #32]
	ldr	w1, [x22, #28]
	bl	_to_iport
	mov	x21, x0
	ldr	w8, [x22]
	neg	w9, w8
	and	w27, w9, #0x3
	add	w8, w27, w8
	asr	w25, w8, #2
Lloh0:
	adrp	x8, _QIB_LRH_BTH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _QIB_LRH_BTH@GOTPAGEOFF]
Lloh2:
	ldr	w26, [x8]
	add	x24, x22, #24
	mov	x0, x24
	bl	_rdma_ah_get_ah_flags
Lloh3:
	adrp	x8, _IB_AH_GRH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IB_AH_GRH@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	and	w0, w8, w0
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
	ldr	x8, [x28]
	add	x26, x8, #8
	mov	x0, x24
	bl	_rdma_ah_read_grh
	mov	x2, x0
	ldr	w3, [x22, #4]
	mov	x0, x21
	mov	x1, x26
	mov	x4, x25
	bl	_qib_make_grh
	ldr	w8, [x22, #4]
	add	w8, w8, w0
	str	w8, [x22, #4]
Lloh6:
	adrp	x8, _QIB_LRH_GRH@GOTPAGE
Lloh7:
	ldr	x8, [x8, _QIB_LRH_GRH@GOTPAGEOFF]
Lloh8:
	ldr	w26, [x8]
LBB0_2:
	ldr	x20, [x21]
	mov	x0, x24
	bl	_rdma_ah_get_sl
	ldr	w20, [x20, w0, sxtw #2]
	mov	x0, x24
	bl	_rdma_ah_get_sl
	orr	w8, w26, w20, lsl #12
	orr	w0, w8, w0, lsl #4
	bl	_cpu_to_be16
	ldr	x8, [x28]
	ldr	x8, [x8]
	str	x0, [x8]
	mov	x0, x24
	bl	_rdma_ah_get_dlid
	bl	_cpu_to_be16
	ldr	x8, [x28]
	ldr	x8, [x8]
	str	x0, [x8, #8]
	ldr	w8, [x22, #4]
Lloh9:
	adrp	x9, _SIZE_OF_CRC@GOTPAGE
Lloh10:
	ldr	x9, [x9, _SIZE_OF_CRC@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	add	w8, w8, w25
	add	w0, w8, w9
	bl	_cpu_to_be16
	ldr	x8, [x28]
	ldr	x8, [x8]
	str	x0, [x8, #16]
	mov	x0, x21
	bl	_ppd_from_ibp
	ldr	w20, [x0]
	mov	x0, x24
	bl	_rdma_ah_get_path_bits
	orr	w0, w0, w20
	bl	_cpu_to_be16
	ldr	x8, [x28]
	ldr	x8, [x8]
	str	x0, [x8, #24]
	ldr	w1, [x22, #20]
	mov	x0, x21
	bl	_qib_get_pkey
	ldr	x8, [x22, #8]
Lloh12:
	adrp	x9, _IB_MIG_MIGRATED@GOTPAGE
Lloh13:
	ldr	x9, [x9, _IB_MIG_MIGRATED@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
Lloh15:
	adrp	x10, _IB_BTH_MIG_REQ@GOTPAGE
Lloh16:
	ldr	x10, [x10, _IB_BTH_MIG_REQ@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	cmp	x8, x9
	csel	w8, w10, wzr, eq
	orr	w9, w23, w27, lsl #20
	orr	w9, w9, w0
	orr	w0, w9, w8
	bl	_cpu_to_be32
	ldr	x8, [x19]
	str	x0, [x8]
	ldr	w0, [x22, #16]
	bl	_cpu_to_be32
	ldr	x8, [x19]
	str	x0, [x8, #8]
	ldr	w0, [sp, #12]                   ; 4-byte Folded Reload
	bl	_cpu_to_be32
	ldr	x8, [x19]
	str	x0, [x8, #16]
	ldr	x8, [x21, #8]
	ldr	w0, [x8]
	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
	b	_this_cpu_inc
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_QIB_LRH_BTH,4,2                ; @QIB_LRH_BTH
	.comm	_IB_AH_GRH,4,2                  ; @IB_AH_GRH
	.comm	_QIB_LRH_GRH,4,2                ; @QIB_LRH_GRH
	.comm	_SIZE_OF_CRC,4,2                ; @SIZE_OF_CRC
	.comm	_IB_MIG_MIGRATED,8,3            ; @IB_MIG_MIGRATED
	.comm	_IB_BTH_MIG_REQ,4,2             ; @IB_BTH_MIG_REQ
.subsections_via_symbols
