	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_ib_query_ah               ## -- Begin function mlx4_ib_query_ah
	.p2align	4, 0x90
_mlx4_ib_query_ah:                      ## @mlx4_ib_query_ah
	.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, %rbx
	callq	_to_mah
	movq	%rax, %r13
	movl	36(%rax), %edi
	callq	_be32_to_cpu
	movl	%eax, %r15d
	sarl	$24, %r15d
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	(%rbx), %rax
	movq	%rax, (%r14)
	movq	_RDMA_AH_ATTR_TYPE_ROCE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_rdma_ah_set_dlid
	movq	%r13, %rax
	addq	$40, %rax
	movl	$29, %r12d
	jmp	LBB0_3
LBB0_2:
	movl	32(%r13), %edi
	callq	_be16_to_cpu
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_rdma_ah_set_dlid
	movq	%r13, %rax
	addq	$16, %rax
	movl	$28, %r12d
LBB0_3:
	movl	(%rax), %edi
	callq	_be32_to_cpu
	movl	%r12d, %ecx
	sarl	%cl, %eax
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_rdma_ah_set_sl
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_rdma_ah_set_port_num
	movq	24(%r13), %rsi
	testq	%rsi, %rsi
	je	LBB0_5
## %bb.4:
	movq	_MLX4_STAT_RATE_OFFSET@GOTPCREL(%rip), %rax
	subq	(%rax), %rsi
	movq	%r14, %rdi
	callq	_rdma_ah_set_static_rate
LBB0_5:
	movl	(%r13), %esi
	andl	$127, %esi
	movq	%r14, %rdi
	callq	_rdma_ah_set_path_bits
	movq	%r13, %rdi
	callq	_mlx4_ib_ah_grh_present
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movl	16(%r13), %edi
	callq	_be32_to_cpu
	movl	%eax, %edx
	andl	$1048575, %edx                  ## imm = 0xFFFFF
	movl	8(%r13), %r8d
	movl	12(%r13), %ecx
	sarl	$20, %eax
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	%eax, %r9d
	callq	_rdma_ah_set_grh
	movl	4(%r13), %esi
	movq	%r14, %rdi
	callq	_rdma_ah_set_dgid_raw
LBB0_7:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RDMA_AH_ATTR_TYPE_ROCE,8,3     ## @RDMA_AH_ATTR_TYPE_ROCE
	.comm	_MLX4_STAT_RATE_OFFSET,8,3      ## @MLX4_STAT_RATE_OFFSET
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_ib_query_ah               ; -- Begin function mlx4_ib_query_ah
	.p2align	2
_mlx4_ib_query_ah:                      ; @mlx4_ib_query_ah
	.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	x19, x1
	mov	x22, x0
	bl	_to_mah
	mov	x20, x0
	ldr	w0, [x0, #36]
	bl	_be32_to_cpu
	asr	w21, w0, #24
	mov	x0, x19
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	ldr	x8, [x22]
	str	x8, [x19]
Lloh0:
	adrp	x9, _RDMA_AH_ATTR_TYPE_ROCE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RDMA_AH_ATTR_TYPE_ROCE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x19
	mov	w1, #0
	bl	_rdma_ah_set_dlid
	add	x8, x20, #40
	mov	w22, #29
	b	LBB0_3
LBB0_2:
	ldr	w0, [x20, #32]
	bl	_be16_to_cpu
	mov	x1, x0
	mov	x0, x19
	bl	_rdma_ah_set_dlid
	add	x8, x20, #16
	mov	w22, #28
LBB0_3:
	ldr	w0, [x8]
	bl	_be32_to_cpu
	asr	w1, w0, w22
	mov	x0, x19
	bl	_rdma_ah_set_sl
	mov	x0, x19
	mov	x1, x21
	bl	_rdma_ah_set_port_num
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_5
; %bb.4:
Lloh3:
	adrp	x9, _MLX4_STAT_RATE_OFFSET@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MLX4_STAT_RATE_OFFSET@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	sub	x1, x8, x9
	mov	x0, x19
	bl	_rdma_ah_set_static_rate
LBB0_5:
	ldr	w8, [x20]
	and	w1, w8, #0x7f
	mov	x0, x19
	bl	_rdma_ah_set_path_bits
	mov	x0, x20
	bl	_mlx4_ib_ah_grh_present
	cbz	x0, LBB0_7
; %bb.6:
	ldr	w0, [x20, #16]
	bl	_be32_to_cpu
	and	w2, w0, #0xfffff
	ldp	w4, w3, [x20, #8]
	asr	w5, w0, #20
	mov	x0, x19
	mov	x1, #0
	bl	_rdma_ah_set_grh
	ldr	w1, [x20, #4]
	mov	x0, x19
	bl	_rdma_ah_set_dgid_raw
LBB0_7:
	mov	w0, #0
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_RDMA_AH_ATTR_TYPE_ROCE,8,3     ; @RDMA_AH_ATTR_TYPE_ROCE
	.comm	_MLX4_STAT_RATE_OFFSET,8,3      ; @MLX4_STAT_RATE_OFFSET
.subsections_via_symbols
