	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movl	68(%rdi), %esi
	movl	72(%rdi), %edi
	callq	_to_iport
	movq	%rax, %r14
	movl	(%rbx), %r13d
	movl	%r13d, %r12d
	negl	%r12d
	andl	$3, %r12d
	addl	%r12d, %r13d
	sarl	$2, %r13d
	movq	_QIB_LRH_BTH@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_IB_AH_GRH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	andl	24(%rbx), %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	56(%rbx), %rsi
	addq	$8, %rsi
	leaq	48(%rbx), %rdx
	movl	64(%rbx), %ecx
	movq	%r14, %rdi
	movl	%r13d, %r8d
	callq	_qib_make_grh
	addl	%eax, 64(%rbx)
	movq	_QIB_LRH_GRH@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_2:
	movq	(%r14), %rax
	movq	32(%rbx), %rdi
	movl	(%rax,%rdi,4), %eax
	shll	$12, %eax
	shll	$4, %edi
	orl	%r15d, %edi
	orl	%eax, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_cpu_to_be16
	movq	56(%rbx), %rcx
	movq	(%rcx), %rcx
	movq	%rax, (%rcx)
	movl	40(%rbx), %edi
	callq	_cpu_to_be16
	movq	56(%rbx), %rcx
	movq	(%rcx), %rcx
	movq	%rax, 8(%rcx)
	addl	64(%rbx), %r13d
	movq	_SIZE_OF_CRC@GOTPCREL(%rip), %rax
	addl	(%rax), %r13d
	movl	%r13d, %edi
	callq	_cpu_to_be16
	movq	56(%rbx), %rcx
	movq	(%rcx), %rcx
	movq	%rax, 16(%rcx)
	movq	%r14, %rdi
	callq	_ppd_from_ibp
	movl	44(%rbx), %edi
	orl	(%rax), %edi
	callq	_cpu_to_be16
	movq	56(%rbx), %rcx
	movq	(%rcx), %rcx
	movq	%rax, 24(%rcx)
	movl	20(%rbx), %esi
	movq	%r14, %rdi
	callq	_qib_get_pkey
	shll	$20, %r12d
	movq	8(%rbx), %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	-44(%rbp), %r12d                ## 4-byte Folded Reload
	orl	%eax, %r12d
	orl	%ecx, %r12d
	movl	%r12d, %edi
	callq	_cpu_to_be32
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	(%r14), %rcx
	movq	%rax, (%rcx)
	movl	16(%rbx), %edi
	callq	_cpu_to_be32
	movq	(%r14), %rcx
	movq	%rax, 8(%rcx)
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	callq	_cpu_to_be32
	movq	(%r14), %rcx
	movq	%rax, 16(%rcx)
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.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:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x3
	mov	x22, x2
	mov	x19, x1
	mov	x21, x0
	ldr	w0, [x0, #72]
	ldr	w1, [x21, #68]
	bl	_to_iport
	mov	x23, x0
	ldr	w8, [x21]
	neg	w9, w8
	and	w25, w9, #0x3
	add	w8, w25, w8
	asr	w24, w8, #2
Lloh0:
	adrp	x8, _QIB_LRH_BTH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _QIB_LRH_BTH@GOTPAGEOFF]
Lloh2:
	ldr	w26, [x8]
	ldr	w8, [x21, #24]
Lloh3:
	adrp	x9, _IB_AH_GRH@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IB_AH_GRH@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	and	w0, w9, w8
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
	ldr	x8, [x21, #56]
	add	x1, x8, #8
	add	x2, x21, #48
	ldr	w3, [x21, #64]
	mov	x0, x23
	mov	x4, x24
	bl	_qib_make_grh
	ldr	w8, [x21, #64]
	add	w8, w8, w0
	str	w8, [x21, #64]
Lloh6:
	adrp	x8, _QIB_LRH_GRH@GOTPAGE
Lloh7:
	ldr	x8, [x8, _QIB_LRH_GRH@GOTPAGEOFF]
Lloh8:
	ldr	w26, [x8]
LBB0_2:
	ldr	x8, [x23]
	ldr	x9, [x21, #32]
	ldr	w8, [x8, x9, lsl #2]
	orr	w8, w26, w8, lsl #12
	orr	w0, w8, w9, lsl #4
	bl	_cpu_to_be16
	ldr	x8, [x21, #56]
	ldr	x8, [x8]
	str	x0, [x8]
	ldr	w0, [x21, #40]
	bl	_cpu_to_be16
	ldr	x8, [x21, #56]
	ldr	x8, [x8]
	str	x0, [x8, #8]
	ldr	w8, [x21, #64]
Lloh9:
	adrp	x9, _SIZE_OF_CRC@GOTPAGE
Lloh10:
	ldr	x9, [x9, _SIZE_OF_CRC@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	add	w8, w8, w24
	add	w0, w8, w9
	bl	_cpu_to_be16
	ldr	x8, [x21, #56]
	ldr	x8, [x8]
	str	x0, [x8, #16]
	mov	x0, x23
	bl	_ppd_from_ibp
	ldr	w8, [x0]
	ldr	w9, [x21, #44]
	orr	w0, w9, w8
	bl	_cpu_to_be16
	ldr	x8, [x21, #56]
	ldr	x8, [x8]
	str	x0, [x8, #24]
	ldr	w1, [x21, #20]
	mov	x0, x23
	bl	_qib_get_pkey
	ldr	x8, [x21, #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, w22, w25, lsl #20
	orr	w9, w9, w0
	orr	w0, w9, w8
	bl	_cpu_to_be32
	ldr	x8, [x19]
	str	x0, [x8]
	ldr	w0, [x21, #16]
	bl	_cpu_to_be32
	ldr	x8, [x19]
	str	x0, [x8, #8]
	mov	x0, x20
	bl	_cpu_to_be32
	ldr	x8, [x19]
	str	x0, [x8, #16]
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.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
