	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mthca_path_set
_mthca_path_set:                        ## @mthca_path_set
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r12d
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	%rsi, %rdi
	callq	_rdma_ah_get_path_bits
	andl	$127, %eax
	movl	%eax, (%r14)
	movq	%rbx, %rdi
	callq	_rdma_ah_get_dlid
	movl	%eax, %edi
	callq	_cpu_to_be16
	movl	%eax, 36(%r14)
	movq	%rbx, %rdi
	callq	_rdma_ah_get_static_rate
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	%r12d, %edx
	callq	_mthca_get_rate
	movl	%eax, 32(%r14)
	movq	%rbx, %rdi
	callq	_rdma_ah_get_ah_flags
	movq	_IB_AH_GRH@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.1:
	movq	%rbx, %rdi
	callq	_rdma_ah_read_grh
	movq	(%rax), %rdx
	movq	(%r15), %rcx
	cmpq	%rcx, %rdx
	jge	LBB0_3
## %bb.2:
	movq	%rax, %r12
	orb	$-128, (%r14)
	movq	%rdx, 8(%r14)
	movl	20(%rax), %eax
	movl	%eax, 28(%r14)
	movq	%rbx, %rdi
	callq	_rdma_ah_get_sl
	shll	$28, %eax
	movl	8(%r12), %edi
	shll	$20, %edi
	orl	%eax, %edi
	orl	12(%r12), %edi
	callq	_cpu_to_be32
	movq	%rax, 16(%r14)
	movl	24(%r14), %edi
	movl	16(%r12), %esi
	movl	$16, %edx
	callq	_memcpy
	jmp	LBB0_5
LBB0_4:
	movq	%rbx, %rdi
	callq	_rdma_ah_get_sl
	shll	$28, %eax
	movl	%eax, %edi
	callq	_cpu_to_be32
	movq	%rax, 16(%r14)
LBB0_5:
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_3:
	decq	%rcx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_mthca_dbg
	movl	$-1, %eax
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_AH_GRH,4,2                  ## @IB_AH_GRH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sgid_index (%u) too large. max is %d\n"

	.no_dead_strip	_mthca_path_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mthca_path_set
_mthca_path_set:                        ; @mthca_path_set
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x22, x3
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	mov	x0, x1
	bl	_rdma_ah_get_path_bits
	and	w8, w0, #0x7f
	str	w8, [x19]
	mov	x0, x20
	bl	_rdma_ah_get_dlid
	bl	_cpu_to_be16
	str	w0, [x19, #36]
	mov	x0, x20
	bl	_rdma_ah_get_static_rate
	mov	x1, x0
	mov	x0, x21
	mov	x2, x22
	bl	_mthca_get_rate
	str	w0, [x19, #32]
	mov	x0, x20
	bl	_rdma_ah_get_ah_flags
Lloh0:
	adrp	x8, _IB_AH_GRH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IB_AH_GRH@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_3
; %bb.1:
	mov	x0, x20
	bl	_rdma_ah_read_grh
	ldr	x2, [x0]
	ldr	x8, [x21]
	cmp	x2, x8
	b.ge	LBB0_4
; %bb.2:
	mov	x22, x0
	ldr	w8, [x19]
	orr	w8, w8, #0x80
	str	w8, [x19]
	str	x2, [x19, #8]
	ldr	w8, [x0, #20]
	str	w8, [x19, #28]
	mov	x0, x20
	bl	_rdma_ah_get_sl
	ldp	w8, w9, [x22, #8]
	lsl	w8, w8, #20
	orr	w8, w8, w0, lsl #28
	orr	w0, w8, w9
	bl	_cpu_to_be32
	str	x0, [x19, #16]
	ldr	w0, [x19, #24]
	ldr	w1, [x22, #16]
	mov	w2, #16
	bl	_memcpy
	mov	w0, #0
	b	LBB0_5
LBB0_3:
	mov	x0, x20
	bl	_rdma_ah_get_sl
	lsl	w0, w0, #28
	bl	_cpu_to_be32
	mov	x8, x0
	mov	w0, #0
	str	x8, [x19, #16]
	b	LBB0_5
LBB0_4:
	sub	x3, x8, #1
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_mthca_dbg
	mov	w0, #-1
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_AH_GRH,4,2                  ; @IB_AH_GRH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sgid_index (%u) too large. max is %d\n"

	.no_dead_strip	_mthca_path_set
.subsections_via_symbols
