	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mthca_ah_query                 ## -- Begin function mthca_ah_query
	.p2align	4, 0x90
_mthca_ah_query:                        ## @mthca_ah_query
	.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
	pushq	%rax
	.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, %r15
	callq	_to_mah
	movq	%rax, %rbx
	movl	4(%r15), %edi
	callq	_to_mdev
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	8(%rbx), %rax
	movl	28(%rax), %edi
	callq	_be32_to_cpu
	movl	%eax, %r13d
	movq	(%rbx), %rax
	movq	_MTHCA_AH_ON_HCA@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	_ENOSYS@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_4
LBB0_2:
	sarl	$24, %r13d
	xorl	%r12d, %r12d
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movl	(%r15), %eax
	movl	%eax, (%r14)
	movq	8(%rbx), %rax
	movl	24(%rax), %edi
	callq	_be16_to_cpu
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_rdma_ah_set_dlid
	movq	8(%rbx), %rax
	movl	20(%rax), %edi
	callq	_be32_to_cpu
	sarl	$28, %eax
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_rdma_ah_set_sl
	movq	%r14, %rdi
	movl	%r13d, %esi
	callq	_rdma_ah_set_port_num
	movq	8(%rbx), %rax
	movl	(%rax), %esi
	andl	$7, %esi
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movl	%r13d, %edx
	callq	_mthca_rate_to_ib
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_rdma_ah_set_static_rate
	movq	8(%rbx), %rax
	movl	4(%rax), %esi
	andl	$127, %esi
	movq	%r14, %rdi
	callq	_rdma_ah_set_path_bits
	movq	%rbx, %rdi
	callq	_mthca_ah_grh_present
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	8(%rbx), %rax
	movl	20(%rax), %edi
	callq	_be32_to_cpu
	movl	%eax, %edx
	movq	8(%rbx), %rsi
	movl	(%r15), %ecx
	decl	%ecx
	andl	8(%rsi), %ecx
	andl	$1048575, %edx                  ## imm = 0xFFFFF
	movl	16(%rsi), %r8d
	shrl	$20, %eax
	movzbl	%al, %r9d
	xorl	%r12d, %r12d
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_rdma_ah_set_grh
	movq	8(%rbx), %rax
	movl	12(%rax), %esi
	movq	%r14, %rdi
	callq	_rdma_ah_set_dgid_raw
LBB0_4:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MTHCA_AH_ON_HCA,8,3            ## @MTHCA_AH_ON_HCA
	.comm	_ENOSYS,4,2                     ## @ENOSYS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mthca_ah_query                 ; -- Begin function mthca_ah_query
	.p2align	2
_mthca_ah_query:                        ; @mthca_ah_query
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x1
	mov	x22, x0
	bl	_to_mah
	mov	x20, x0
	ldr	w0, [x22, #4]
	bl	_to_mdev
	mov	x21, x0
	ldr	x8, [x20, #8]
	ldr	w0, [x8, #28]
	bl	_be32_to_cpu
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _MTHCA_AH_ON_HCA@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MTHCA_AH_ON_HCA@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_4
LBB0_2:
	asr	w23, w0, #24
	mov	x0, x19
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	ldr	w8, [x22]
	str	w8, [x19]
	ldr	x8, [x20, #8]
	ldr	w0, [x8, #24]
	bl	_be16_to_cpu
	mov	x1, x0
	mov	x0, x19
	bl	_rdma_ah_set_dlid
	ldr	x8, [x20, #8]
	ldr	w0, [x8, #20]
	bl	_be32_to_cpu
	asr	w1, w0, #28
	mov	x0, x19
	bl	_rdma_ah_set_sl
	mov	x0, x19
	mov	x1, x23
	bl	_rdma_ah_set_port_num
	ldr	x8, [x20, #8]
	ldr	w8, [x8]
	and	w1, w8, #0x7
	mov	x0, x21
	mov	x2, x23
	bl	_mthca_rate_to_ib
	mov	x1, x0
	mov	x0, x19
	bl	_rdma_ah_set_static_rate
	ldr	x8, [x20, #8]
	ldr	w8, [x8, #4]
	and	w1, w8, #0x7f
	mov	x0, x19
	bl	_rdma_ah_set_path_bits
	mov	x0, x20
	bl	_mthca_ah_grh_present
	cbz	x0, LBB0_4
; %bb.3:
	ldr	x8, [x20, #8]
	ldr	w0, [x8, #20]
	bl	_be32_to_cpu
	and	w2, w0, #0xfffff
	ldr	x8, [x20, #8]
	ldr	w9, [x8, #8]
	ldr	w10, [x21]
	sub	w10, w10, #1
	and	w3, w10, w9
	ldr	w4, [x8, #16]
	ubfx	w5, w0, #20, #8
	mov	x0, x19
	mov	x1, #0
	bl	_rdma_ah_set_grh
	ldr	x8, [x20, #8]
	ldr	w1, [x8, #12]
	mov	x0, x19
	bl	_rdma_ah_set_dgid_raw
	mov	w0, #0
LBB0_4:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MTHCA_AH_ON_HCA,8,3            ; @MTHCA_AH_ON_HCA
	.comm	_ENOSYS,4,2                     ; @ENOSYS
.subsections_via_symbols
