	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mthca_alloc_mtt_range
_mthca_alloc_mtt_range:                 ## @mthca_alloc_mtt_range
	.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	%rdx, %r14
	movl	%esi, %r15d
	movq	%rdi, %r13
	movq	%rdx, %rdi
	callq	_mthca_buddy_alloc
	cmpl	$-1, %eax
	je	LBB0_4
## %bb.1:
	movl	%eax, %ebx
	movq	%r13, %rdi
	callq	_mthca_is_memfree
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	movl	$-1, %eax
	movl	%r15d, %ecx
	shll	%cl, %eax
	movl	(%r13), %esi
	movl	$-1, %r12d
	notl	%eax
	movl	%ebx, %ecx
	addl	%eax, %ecx
	movq	%r13, %rdi
	movl	%ebx, %edx
	callq	_mthca_table_get_range
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%r15d, %edx
	callq	_mthca_buddy_free
	jmp	LBB0_7
LBB0_4:
	movl	$-1, %r12d
	jmp	LBB0_7
LBB0_6:
	movl	%ebx, %r12d
LBB0_7:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_mthca_alloc_mtt_range
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mthca_alloc_mtt_range
_mthca_alloc_mtt_range:                 ; @mthca_alloc_mtt_range
	.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	x21, x2
	mov	x20, x1
	mov	x22, x0
	mov	x0, x2
	bl	_mthca_buddy_alloc
	mov	x19, x0
	cmn	w0, #1
	b.eq	LBB0_4
; %bb.1:
	mov	x0, x22
	bl	_mthca_is_memfree
	cbz	x0, LBB0_4
; %bb.2:
	ldr	w1, [x22]
	mov	w8, #-1
	lsl	w8, w8, w20
	mvn	w8, w8
	add	w3, w19, w8
	mov	x0, x22
	mov	x2, x19
	bl	_mthca_table_get_range
	cbz	x0, LBB0_4
; %bb.3:
	mov	x0, x21
	mov	x1, x19
	mov	x2, x20
	bl	_mthca_buddy_free
	mov	w19, #-1
LBB0_4:
	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
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_mthca_alloc_mtt_range
.subsections_via_symbols
