	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function to_ib_ah_attr
_to_ib_ah_attr:                         ## @to_ib_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	%rsi, %rdi
	xorl	%esi, %esi
	movl	$44, %edx
	callq	_memset
	movl	28(%r14), %edi
	callq	_be32_to_cpu
	shrl	$24, %eax
	andl	$3, %eax
	movl	%eax, (%rbx)
	je	LBB0_3
## %bb.1:
	cmpl	(%r15), %eax
	jg	LBB0_3
## %bb.2:
	movl	24(%r14), %edi
	callq	_be16_to_cpu
	movl	%eax, 40(%rbx)
	movl	16(%r14), %edi
	callq	_be32_to_cpu
	sarl	$28, %eax
	movl	%eax, 4(%rbx)
	movl	(%r14), %eax
	andl	$127, %eax
	movl	%eax, 8(%rbx)
	movl	4(%r14), %esi
	andl	$15, %esi
	movl	(%rbx), %edx
	movq	%r15, %rdi
	callq	_mthca_rate_to_ib
	movl	%eax, 36(%rbx)
	movsbl	(%r14), %eax
	sarl	$7, %eax
	movq	_IB_AH_GRH@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movl	%eax, 12(%rbx)
	je	LBB0_3
## %bb.4:
	movl	4(%r15), %eax
	decl	%eax
	andl	8(%r14), %eax
	movl	%eax, 16(%rbx)
	movl	20(%r14), %eax
	movl	%eax, 32(%rbx)
	movl	16(%r14), %edi
	callq	_be32_to_cpu
	shrl	$20, %eax
	movzbl	%al, %eax
	movl	%eax, 20(%rbx)
	movl	16(%r14), %edi
	callq	_be32_to_cpu
	andl	$1048575, %eax                  ## imm = 0xFFFFF
	movl	%eax, 24(%rbx)
	movl	28(%rbx), %edi
	movl	12(%r14), %esi
	movl	$4, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_memcpy                         ## TAILCALL
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_AH_GRH,4,2                  ## @IB_AH_GRH
	.no_dead_strip	_to_ib_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_ib_ah_attr
_to_ib_ah_attr:                         ; @to_ib_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	x19, x2
	mov	x20, x1
	mov	x21, x0
	mov	x0, x1
	mov	w1, #0
	mov	w2, #44
	bl	_memset
	ldr	w0, [x19, #28]
	bl	_be32_to_cpu
	ubfx	w8, w0, #24, #2
	str	w8, [x20]
	cbz	w8, LBB0_4
; %bb.1:
	ldr	w9, [x21]
	cmp	w8, w9
	b.gt	LBB0_4
; %bb.2:
	ldr	w0, [x19, #24]
	bl	_be16_to_cpu
	str	w0, [x20, #40]
	ldr	w0, [x19, #16]
	bl	_be32_to_cpu
	asr	w8, w0, #28
	ldp	w9, w10, [x19]
	and	w9, w9, #0x7f
	stp	w8, w9, [x20, #4]
	and	w1, w10, #0xf
	ldr	w2, [x20]
	mov	x0, x21
	bl	_mthca_rate_to_ib
	str	w0, [x20, #36]
	ldr	w8, [x19]
	lsl	w8, w8, #24
Lloh0:
	adrp	x9, _IB_AH_GRH@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IB_AH_GRH@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	ands	w8, w9, w8, asr #31
	str	w8, [x20, #12]
	b.eq	LBB0_4
; %bb.3:
	ldr	w8, [x19, #8]
	ldr	w9, [x21, #4]
	sub	w9, w9, #1
	and	w8, w9, w8
	str	w8, [x20, #16]
	ldp	w0, w8, [x19, #16]
	str	w8, [x20, #32]
	bl	_be32_to_cpu
	ubfx	w8, w0, #20, #8
	str	w8, [x20, #20]
	ldr	w0, [x19, #16]
	bl	_be32_to_cpu
	and	w8, w0, #0xfffff
	str	w8, [x20, #24]
	ldr	w0, [x20, #28]
	ldr	w1, [x19, #12]
	mov	w2, #4
	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	_memcpy
LBB0_4:
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_AH_GRH,4,2                  ; @IB_AH_GRH
	.no_dead_strip	_to_ib_ah_attr
.subsections_via_symbols
