	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function to_rdma_ah_attr
_to_rdma_ah_attr:                       ## @to_rdma_ah_attr
	.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
	movq	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %r15
	movl	28(%rdx), %edi
	callq	_be32_to_cpu
	movl	%eax, %ebx
	shrl	$24, %ebx
	andl	$3, %ebx
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	testl	%ebx, %ebx
	je	LBB0_3
## %bb.1:
	cmpq	%rbx, (%r15)
	jl	LBB0_3
## %bb.2:
	leaq	16(%r15), %rdi
	movq	%rbx, %rsi
	callq	_rdma_ah_find_type
	movl	%eax, (%r12)
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_rdma_ah_set_port_num
	movl	24(%r14), %edi
	callq	_be16_to_cpu
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_rdma_ah_set_dlid
	movl	20(%r14), %edi
	callq	_be32_to_cpu
	sarl	$28, %eax
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_rdma_ah_set_sl
	movl	(%r14), %esi
	andl	$127, %esi
	movq	%r12, %rdi
	callq	_rdma_ah_set_path_bits
	movl	4(%r14), %esi
	andl	$15, %esi
	movq	%r15, %rdi
	movq	%rbx, %rdx
	callq	_mthca_rate_to_ib
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_rdma_ah_set_static_rate
	testb	$-128, (%r14)
	jne	LBB0_4
LBB0_3:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	20(%r14), %edi
	callq	_be32_to_cpu
	movl	%eax, %edx
	movl	8(%r15), %ecx
	decl	%ecx
	andl	8(%r14), %ecx
	andl	$1048575, %edx                  ## imm = 0xFFFFF
	movl	16(%r14), %r8d
	shrl	$20, %eax
	movzbl	%al, %r9d
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_rdma_ah_set_grh
	movl	12(%r14), %esi
	movq	%r12, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_rdma_ah_set_dgid_raw           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_to_rdma_ah_attr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function to_rdma_ah_attr
_to_rdma_ah_attr:                       ; @to_rdma_ah_attr
	.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	x20, x2
	mov	x19, x1
	mov	x21, x0
	ldr	w0, [x2, #28]
	bl	_be32_to_cpu
	ubfx	w22, w0, #24, #2
	mov	x0, x19
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	cbz	w22, LBB0_3
; %bb.1:
	ldr	x8, [x21]
	cmp	x8, x22
	b.lt	LBB0_3
; %bb.2:
	add	x0, x21, #16
	mov	x1, x22
	bl	_rdma_ah_find_type
	str	w0, [x19]
	mov	x0, x19
	mov	x1, x22
	bl	_rdma_ah_set_port_num
	ldr	w0, [x20, #24]
	bl	_be16_to_cpu
	mov	x1, x0
	mov	x0, x19
	bl	_rdma_ah_set_dlid
	ldr	w0, [x20, #20]
	bl	_be32_to_cpu
	asr	w1, w0, #28
	mov	x0, x19
	bl	_rdma_ah_set_sl
	ldr	w8, [x20]
	and	w1, w8, #0x7f
	mov	x0, x19
	bl	_rdma_ah_set_path_bits
	ldr	w8, [x20, #4]
	and	w1, w8, #0xf
	mov	x0, x21
	mov	x2, x22
	bl	_mthca_rate_to_ib
	mov	x1, x0
	mov	x0, x19
	bl	_rdma_ah_set_static_rate
	ldrb	w8, [x20]
	tbnz	w8, #7, LBB0_4
LBB0_3:
	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
LBB0_4:
	ldr	w0, [x20, #20]
	bl	_be32_to_cpu
	and	w2, w0, #0xfffff
	ldr	w8, [x20, #8]
	ldr	w9, [x21, #8]
	sub	w9, w9, #1
	and	w3, w9, w8
	ldr	w4, [x20, #16]
	ubfx	w5, w0, #20, #8
	mov	x0, x19
	mov	x1, #0
	bl	_rdma_ah_set_grh
	ldr	w1, [x20, #12]
	mov	x0, x19
	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
	b	_rdma_ah_set_dgid_raw
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_to_rdma_ah_attr
.subsections_via_symbols
