	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mthca_get_rate                 ## -- Begin function mthca_get_rate
	.p2align	4, 0x90
_mthca_get_rate:                        ## @mthca_get_rate
	.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
	xorl	%ebx, %ebx
	testl	%esi, %esi
	je	LBB0_6
## %bb.1:
	movl	%edx, %r12d
	movl	%esi, %r15d
	movq	%rdi, %r14
	movl	%esi, %edi
	callq	_ib_rate_to_mult
	movq	(%r14), %rcx
	movslq	%r12d, %r12
	cmpq	-8(%rcx,%r12,8), %rax
	jge	LBB0_6
## %bb.2:
	movq	%r14, %rdi
	callq	_mthca_is_memfree
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	decq	%r12
	movl	%r15d, %edi
	callq	_ib_rate_to_mult
	movq	(%r14), %rcx
	movq	(%rcx,%r12,8), %rsi
	movq	%rax, %rdi
	callq	_ib_rate_to_memfree
	jmp	LBB0_5
LBB0_4:
	movl	%r15d, %edi
	callq	_ib_rate_to_tavor
LBB0_5:
	movl	8(%r14), %ecx
	btl	%eax, %ecx
	movl	$1, %ebx
	cmovbl	%eax, %ebx
LBB0_6:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mthca_get_rate                 ; -- Begin function mthca_get_rate
	.p2align	2
_mthca_get_rate:                        ; @mthca_get_rate
	.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
	cbz	w1, LBB0_4
; %bb.1:
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	mov	x0, x1
	bl	_ib_rate_to_mult
	ldr	x8, [x19]
	sub	w21, w21, #1
	ldr	x8, [x8, w21, sxtw #3]
	cmp	x0, x8
	b.ge	LBB0_4
; %bb.2:
	mov	x0, x19
	bl	_mthca_is_memfree
	cbz	x0, LBB0_5
; %bb.3:
	sxtw	x21, w21
	mov	x0, x20
	bl	_ib_rate_to_mult
	ldr	x8, [x19]
	ldr	x1, [x8, x21, lsl #3]
	bl	_ib_rate_to_memfree
	b	LBB0_6
LBB0_4:
	mov	w0, #0
	b	LBB0_7
LBB0_5:
	mov	x0, x20
	bl	_ib_rate_to_tavor
LBB0_6:
	ldr	w8, [x19, #8]
	lsr	w8, w8, w0
	tst	w8, #0x1
	csinc	w0, w0, wzr, ne
LBB0_7:
	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
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
