	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mthca_make_profile             ## -- Begin function mthca_make_profile
	.p2align	4, 0x90
_mthca_make_profile:                    ## @mthca_make_profile
	.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
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	_MTHCA_RES_NUM@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	shll	$2, %eax
	leal	(%rax,%rax,4), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movl	(%r15), %eax
	movl	%eax, 2660(%r14)
	movl	4(%r15), %eax
	movl	%eax, 2800(%r14)
	movl	8(%r15), %eax
	movl	%eax, 2620(%r14)
	movl	12(%r15), %eax
	movl	%eax, 2820(%r14)
	movl	16(%r15), %eax
	movl	%eax, 2740(%r14)
	movl	20(%r15), %eax
	movl	%eax, 2780(%r14)
	movl	24(%r15), %eax
	movl	%eax, 2760(%r14)
	movq	_MTHCA_RDB_ENTRY_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 2640(%r14)
	movq	_MTHCA_MGM_ENTRY_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 2720(%r14)
	movl	28(%r15), %eax
	movl	%eax, 2700(%r14)
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movl	8(%r12), %eax
	movl	%eax, 2680(%r14)
	movl	32(%r15), %eax
	movl	%eax, 2600(%r14)
	movq	_MTHCA_AV_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 2560(%r14)
	movl	(%rbx), %eax
	movl	%eax, 2580(%r14)
	movl	4(%rbx), %eax
	movl	%eax, 2672(%r14)
	movl	8(%rbx), %ecx
	movl	%ecx, 2632(%r14)
	movl	%eax, 2752(%r14)
	imull	12(%rbx), %eax
	movl	%eax, 2652(%r14)
	movl	16(%rbx), %eax
	movl	%eax, 2832(%r14)
	movq	_MTHCA_NUM_EQS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 2772(%r14)
	movl	20(%rbx), %eax
	movl	%eax, 2732(%r14)
	movl	24(%rbx), %eax
	movl	%eax, 2712(%r14)
	movl	28(%rbx), %eax
	movl	%eax, 2692(%r14)
	movl	32(%rbx), %eax
	movl	%eax, 2612(%r14)
	movl	%eax, 2592(%r14)
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movl	36(%rbx), %eax
	movl	%eax, 2572(%r14)
	cmpl	$0, (%r13)
	jle	LBB0_7
## %bb.3:
	xorl	%r13d, %r13d
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r12
	movq	%r14, %rbx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	incq	%r13
	movq	_MTHCA_RES_NUM@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	$20, %rbx
	cmpq	%rax, %r13
	jge	LBB0_7
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r13d, 8(%rbx)
	movl	12(%rbx), %edi
	callq	_ffs
	leaq	-1(%rax), %rdi
	xorl	%esi, %esi
	callq	_max
	movl	%eax, 16(%rbx)
	movl	(%rbx), %eax
	imull	12(%rbx), %eax
	movl	%eax, (%rbx)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_mthca_is_memfree
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movslq	(%rbx), %rdi
	movl	(%r12), %esi
	callq	_max
	movl	%eax, (%rbx)
	jmp	LBB0_6
LBB0_7:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_mthca_is_memfree
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movl	36(%r15), %ebx
	xorl	%eax, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_10
LBB0_9:
	movl	(%rbx), %ecx
	movl	104(%rbx), %ebx
	movq	%rcx, %rax
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	subl	%ecx, %ebx
LBB0_10:
	movq	_MTHCA_RES_NUM@GOTPCREL(%rip), %rdi
	movl	(%rdi), %eax
	xorl	%r13d, %r13d
	testl	%eax, %eax
	jg	LBB0_11
	jmp	LBB0_25
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_11 Depth=1
	leaq	-1(%rax), %rcx
	cmpq	$1, %rax
	movq	%rcx, %rax
	jbe	LBB0_17
LBB0_11:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_13 Depth 2
	cmpq	$2, %rax
	jb	LBB0_17
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	$1, %ecx
	movq	%r14, %rdx
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_13 Depth=2
	incq	%rcx
	addq	$20, %rdx
	cmpq	%rcx, %rax
	je	LBB0_16
LBB0_13:                                ##   Parent Loop BB0_11 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	20(%rdx), %esi
	cmpl	(%rdx), %esi
	jle	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=2
	movl	36(%rdx), %esi
	movl	%esi, -80(%rbp)
	movups	20(%rdx), %xmm0
	movaps	%xmm0, -96(%rbp)
	movups	(%rdx), %xmm0
	movups	%xmm0, 20(%rdx)
	movl	16(%rdx), %esi
	movl	%esi, 36(%rdx)
	movaps	-96(%rbp), %xmm0
	movups	%xmm0, (%rdx)
	movl	-80(%rbp), %esi
	movl	%esi, 16(%rdx)
	jmp	LBB0_15
LBB0_17:
	movl	(%rdi), %eax
	testl	%eax, %eax
	jle	LBB0_25
## %bb.18:
	movq	%r14, %r12
	addq	$16, %r12
	xorl	%r15d, %r15d
	xorl	%r13d, %r13d
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_19 Depth=1
	cmpl	%r13d, %ebx
	jl	LBB0_22
LBB0_24:                                ##   in Loop: Header=BB0_19 Depth=1
	incq	%r15
	movslq	%eax, %rcx
	addq	$20, %r12
	cmpq	%rcx, %r15
	jge	LBB0_25
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movslq	-16(%r12), %rdx
	testq	%rdx, %rdx
	je	LBB0_20
## %bb.21:                              ##   in Loop: Header=BB0_19 Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	addl	%r13d, %eax
	movl	%eax, -12(%r12)
	addl	%edx, %r13d
	cmpl	%ebx, %r13d
	jg	LBB0_22
## %bb.23:                              ##   in Loop: Header=BB0_19 Depth=1
	movl	-8(%r12), %ecx
	movl	(%r12), %r8d
	movslq	%eax, %r9
	movq	%rdx, (%rsp)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_mthca_dbg
	movq	_MTHCA_RES_NUM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_24
LBB0_25:
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	callq	_mthca_is_memfree
	movl	%r13d, %edx
	sarl	$10, %edx
	testq	%rax, %rax
	je	LBB0_27
## %bb.26:
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_mthca_dbg
	jmp	LBB0_28
LBB0_27:
	movl	%ebx, %ecx
	sarl	$10, %ecx
	subl	%r13d, %ebx
	sarl	$10, %ebx
	leaq	L_.str.3(%rip), %rsi
	movq	%r12, %rdi
	movl	%ebx, %r8d
	xorl	%eax, %eax
	callq	_mthca_dbg
LBB0_28:
	movq	_MTHCA_RES_NUM@GOTPCREL(%rip), %rdi
	cmpl	$0, (%rdi)
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	jle	LBB0_49
## %bb.29:
	xorl	%ebx, %ebx
	leaq	LJTI0_0(%rip), %r9
	jmp	LBB0_30
LBB0_47:                                ##   in Loop: Header=BB0_30 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movl	%edi, 72(%r12)
	movl	4(%r14,%r15,4), %eax
	movl	%eax, 76(%r12)
	movl	%eax, 80(%r8)
	callq	_ffs
	addq	$-13, %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, 96(%rcx)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	32(%rax), %edi
	callq	_ffs
	leaq	LJTI0_0(%rip), %r9
	movq	_MTHCA_RES_NUM@GOTPCREL(%rip), %rdi
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	decq	%rax
	movq	%rax, 88(%r8)
	.p2align	4, 0x90
LBB0_48:                                ##   in Loop: Header=BB0_30 Depth=1
	incq	%rbx
	movslq	(%rdi), %rax
	cmpq	%rax, %rbx
	jge	LBB0_49
LBB0_30:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_40 Depth 2
	leaq	(%rbx,%rbx,4), %r15
	movl	8(%r14,%r15,4), %eax
	addl	$-128, %eax
	cmpl	$13, %eax
	ja	LBB0_48
## %bb.31:                              ##   in Loop: Header=BB0_30 Depth=1
	movslq	(%r9,%rax,4), %rax
	addq	%r9, %rax
	jmpq	*%rax
LBB0_46:                                ##   in Loop: Header=BB0_30 Depth=1
	movl	4(%r14,%r15,4), %eax
	movl	%eax, 80(%r12)
	movl	12(%r14,%r15,4), %eax
	movl	%eax, 84(%r12)
	jmp	LBB0_48
LBB0_45:                                ##   in Loop: Header=BB0_30 Depth=1
	movl	12(%r14,%r15,4), %eax
	movl	%eax, 48(%r12)
	movl	4(%r14,%r15,4), %eax
	movl	%eax, 76(%r8)
	jmp	LBB0_48
LBB0_34:                                ##   in Loop: Header=BB0_30 Depth=1
	movl	12(%r14,%r15,4), %eax
	movl	%eax, 20(%r12)
	movl	4(%r14,%r15,4), %eax
	movl	%eax, 16(%r8)
	movl	16(%r14,%r15,4), %eax
	movl	%eax, 20(%r8)
	jmp	LBB0_48
LBB0_39:                                ##   in Loop: Header=BB0_30 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %eax
	movl	12(%r14,%r15,4), %edx
	movl	$-1, %ecx
	.p2align	4, 0x90
LBB0_40:                                ##   Parent Loop BB0_30 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	incl	%ecx
	movl	%eax, %esi
	shll	%cl, %esi
	cmpl	%edx, %esi
	jl	LBB0_40
## %bb.41:                              ##   in Loop: Header=BB0_30 Depth=1
	movl	%ecx, 96(%r12)
	movl	4(%r14,%r15,4), %eax
	movl	%eax, 100(%r12)
	movl	%eax, 48(%r8)
	jmp	LBB0_48
LBB0_32:                                ##   in Loop: Header=BB0_30 Depth=1
	movl	12(%r14,%r15,4), %eax
	movl	%eax, 12(%r12)
	movl	4(%r14,%r15,4), %eax
	movl	%eax, (%r8)
	movl	16(%r14,%r15,4), %eax
	movl	%eax, 4(%r8)
	jmp	LBB0_48
LBB0_44:                                ##   in Loop: Header=BB0_30 Depth=1
	movl	12(%r14,%r15,4), %eax
	movl	%eax, 44(%r12)
	movl	4(%r14,%r15,4), %eax
	movl	%eax, 92(%r12)
	movl	%eax, 72(%r8)
	movl	8(%r12), %edi
	callq	_ffs
	leaq	LJTI0_0(%rip), %r9
	movq	_MTHCA_RES_NUM@GOTPCREL(%rip), %rdi
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	addq	$-7, %rax
	movq	%rax, 104(%r8)
	jmp	LBB0_48
LBB0_43:                                ##   in Loop: Header=BB0_30 Depth=1
	movl	12(%r14,%r15,4), %eax
	movl	%eax, 40(%r12)
	movl	4(%r14,%r15,4), %eax
	movl	%eax, 88(%r12)
	movl	%eax, 64(%r8)
	movl	16(%r14,%r15,4), %eax
	movl	%eax, 68(%r8)
	jmp	LBB0_48
LBB0_42:                                ##   in Loop: Header=BB0_30 Depth=1
	movl	12(%r14,%r15,4), %eax
	sarl	%eax
	movl	%eax, 32(%r12)
	movl	%eax, 36(%r12)
	movl	4(%r14,%r15,4), %eax
	movl	%eax, 52(%r8)
	movq	_MTHCA_MGM_ENTRY_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ffs
	leaq	LJTI0_0(%rip), %r9
	movq	_MTHCA_RES_NUM@GOTPCREL(%rip), %rdi
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	decq	%rax
	movq	%rax, 112(%r8)
	movl	16(%r14,%r15,4), %ecx
	movl	%ecx, 56(%r8)
	decb	%cl
	movl	$1, %eax
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	movl	%eax, 60(%r8)
	jmp	LBB0_48
LBB0_36:                                ##   in Loop: Header=BB0_30 Depth=1
	movl	4(%r14,%r15,4), %eax
	movl	%eax, 32(%r8)
	jmp	LBB0_48
LBB0_38:                                ##   in Loop: Header=BB0_30 Depth=1
	movl	12(%r14,%r15,4), %eax
	movl	%eax, 28(%r12)
	movl	4(%r14,%r15,4), %eax
	movl	%eax, 40(%r8)
	movl	16(%r14,%r15,4), %eax
	movl	%eax, 44(%r8)
	jmp	LBB0_48
LBB0_37:                                ##   in Loop: Header=BB0_30 Depth=1
	movl	4(%r14,%r15,4), %eax
	movl	%eax, 36(%r8)
	jmp	LBB0_48
LBB0_33:                                ##   in Loop: Header=BB0_30 Depth=1
	movl	12(%r14,%r15,4), %eax
	movl	%eax, 16(%r12)
	movl	4(%r14,%r15,4), %eax
	movl	%eax, 8(%r8)
	movl	16(%r14,%r15,4), %eax
	movl	%eax, 12(%r8)
	jmp	LBB0_48
LBB0_35:                                ##   in Loop: Header=BB0_30 Depth=1
	movl	12(%r14,%r15,4), %eax
	movl	%eax, 24(%r12)
	movl	4(%r14,%r15,4), %eax
	movl	%eax, 24(%r8)
	movl	16(%r14,%r15,4), %eax
	movl	%eax, 28(%r8)
	jmp	LBB0_48
LBB0_49:
	movq	_MTHCA_NUM_PDS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 64(%r12)
	movq	_MTHCA_FLAG_SINAI_OPT@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	testl	%eax, 4(%r12)
	je	LBB0_52
## %bb.50:
	movl	68(%r8), %edx
	cmpl	$24, %edx
	jl	LBB0_52
## %bb.51:
	leaq	L_.str.4(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_mthca_warn
	leaq	L_.str.5(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_mthca_warn
	movl	(%rbx), %eax
	notl	%eax
	andl	%eax, 4(%r12)
LBB0_52:
	movq	%r12, %rdi
	callq	_mthca_is_memfree
	xorl	%ecx, %ecx
	testq	%rax, %rax
	jne	LBB0_55
## %bb.53:
	movq	_BITS_PER_LONG@GOTPCREL(%rip), %rax
	cmpl	$64, (%rax)
	je	LBB0_55
## %bb.54:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	40(%rax), %rcx
LBB0_55:
	movq	%rcx, 56(%r12)
	movq	%r14, %rdi
	callq	_kfree
	jmp	LBB0_56
LBB0_22:
	movslq	%r13d, %rdx
	movslq	%ebx, %rcx
	leaq	L_.str(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_mthca_err
	movq	%r14, %rdi
	callq	_kfree
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_56:
	movl	%r13d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_46, LBB0_46-LJTI0_0
.set L0_0_set_47, LBB0_47-LJTI0_0
.set L0_0_set_45, LBB0_45-LJTI0_0
.set L0_0_set_34, LBB0_34-LJTI0_0
.set L0_0_set_39, LBB0_39-LJTI0_0
.set L0_0_set_32, LBB0_32-LJTI0_0
.set L0_0_set_44, LBB0_44-LJTI0_0
.set L0_0_set_43, LBB0_43-LJTI0_0
.set L0_0_set_42, LBB0_42-LJTI0_0
.set L0_0_set_36, LBB0_36-LJTI0_0
.set L0_0_set_38, LBB0_38-LJTI0_0
.set L0_0_set_37, LBB0_37-LJTI0_0
.set L0_0_set_33, LBB0_33-LJTI0_0
.set L0_0_set_35, LBB0_35-LJTI0_0
LJTI0_0:
	.long	L0_0_set_46
	.long	L0_0_set_47
	.long	L0_0_set_45
	.long	L0_0_set_34
	.long	L0_0_set_39
	.long	L0_0_set_32
	.long	L0_0_set_44
	.long	L0_0_set_43
	.long	L0_0_set_42
	.long	L0_0_set_36
	.long	L0_0_set_38
	.long	L0_0_set_37
	.long	L0_0_set_33
	.long	L0_0_set_35
	.end_data_region
                                        ## -- End function
	.comm	_MTHCA_RES_NUM,4,2              ## @MTHCA_RES_NUM
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MTHCA_RDB_ENTRY_SIZE,4,2       ## @MTHCA_RDB_ENTRY_SIZE
	.comm	_MTHCA_MGM_ENTRY_SIZE,4,2       ## @MTHCA_MGM_ENTRY_SIZE
	.comm	_MTHCA_AV_SIZE,4,2              ## @MTHCA_AV_SIZE
	.comm	_MTHCA_NUM_EQS,4,2              ## @MTHCA_NUM_EQS
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Profile requires 0x%llx bytes; won't fit in 0x%llx bytes of context memory.\n"

L_.str.1:                               ## @.str.1
	.asciz	"profile[%2d]--%2d/%2d @ 0x%16llx (size 0x%8llx)\n"

L_.str.2:                               ## @.str.2
	.asciz	"HCA context memory: reserving %d KB\n"

L_.str.3:                               ## @.str.3
	.asciz	"HCA memory: allocated %d KB/%d KB (%d KB free)\n"

	.comm	_MTHCA_NUM_PDS,4,2              ## @MTHCA_NUM_PDS
	.comm	_MTHCA_FLAG_SINAI_OPT,4,2       ## @MTHCA_FLAG_SINAI_OPT
L_.str.4:                               ## @.str.4
	.asciz	"MPT table too large (requested size 2^%d >= 2^24)\n"

L_.str.5:                               ## @.str.5
	.asciz	"Disabling memory key throughput optimization.\n"

	.comm	_BITS_PER_LONG,4,2              ## @BITS_PER_LONG
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mthca_make_profile             ; -- Begin function mthca_make_profile
	.p2align	2
_mthca_make_profile:                    ; @mthca_make_profile
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x3
	mov	x23, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x26, _MTHCA_RES_NUM@GOTPAGE
Lloh1:
	ldr	x26, [x26, _MTHCA_RES_NUM@GOTPAGEOFF]
	ldr	w8, [x26]
	add	w8, w8, w8, lsl #2
	lsl	w0, w8, #2
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_kzalloc
	cbz	x0, LBB0_56
; %bb.1:
	mov	x20, x0
	ldr	w8, [x23]
	str	w8, [x0, #2660]
	ldr	w8, [x23, #4]
	str	w8, [x0, #2800]
	ldr	w8, [x23, #8]
	str	w8, [x0, #2620]
	ldr	w8, [x23, #12]
	str	w8, [x0, #2820]
	ldr	w8, [x23, #16]
	str	w8, [x0, #2740]
	ldr	w8, [x23, #20]
	str	w8, [x0, #2780]
	ldr	w8, [x23, #24]
	str	w8, [x0, #2760]
Lloh5:
	adrp	x8, _MTHCA_RDB_ENTRY_SIZE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MTHCA_RDB_ENTRY_SIZE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _MTHCA_MGM_ENTRY_SIZE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _MTHCA_MGM_ENTRY_SIZE@GOTPAGEOFF]
	str	w8, [x0, #2640]
Lloh10:
	ldr	w8, [x9]
	str	w8, [x0, #2720]
	ldr	w8, [x23, #28]
	str	w8, [x0, #2700]
	ldr	w8, [x19, #8]
	str	w8, [x0, #2680]
	ldr	w8, [x23, #32]
	str	w8, [x0, #2600]
Lloh11:
	adrp	x8, _MTHCA_AV_SIZE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MTHCA_AV_SIZE@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	str	w8, [x0, #2560]
	ldr	w8, [x21]
	str	w8, [x0, #2580]
	ldr	w8, [x21, #4]
	str	w8, [x0, #2672]
	ldr	w9, [x21, #8]
	str	w9, [x0, #2632]
	str	w8, [x0, #2752]
	ldr	w9, [x21, #12]
	mul	w8, w9, w8
	str	w8, [x0, #2652]
	ldr	w8, [x21, #16]
	str	w8, [x0, #2832]
Lloh14:
	adrp	x8, _MTHCA_NUM_EQS@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MTHCA_NUM_EQS@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	str	w8, [x0, #2772]
	ldr	w8, [x21, #20]
	str	w8, [x0, #2732]
	ldr	w8, [x21, #24]
	str	w8, [x0, #2712]
	ldr	w8, [x21, #28]
	str	w8, [x0, #2692]
	ldr	w8, [x21, #32]
	str	w8, [x0, #2612]
	str	w8, [x0, #2592]
	ldr	w8, [x21, #36]
	str	w8, [x0, #2572]
	ldr	w8, [x26]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.2:
	mov	x24, #0
Lloh17:
	adrp	x25, _PAGE_SIZE@GOTPAGE
Lloh18:
	ldr	x25, [x25, _PAGE_SIZE@GOTPAGEOFF]
	mov	x27, x20
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x24, x24, #1
	ldrsw	x8, [x26]
	add	x27, x27, #20
	cmp	x24, x8
	b.ge	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	str	w24, [x27, #8]
	ldr	w0, [x27, #12]
	bl	_ffs
	sub	x0, x0, #1
	mov	w1, #0
	bl	_max
	str	w0, [x27, #16]
	ldr	w8, [x27, #12]
	ldr	w9, [x27]
	mul	w8, w9, w8
	str	w8, [x27]
	mov	x0, x19
	bl	_mthca_is_memfree
	cbz	x0, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldrsw	x0, [x27]
	ldr	w1, [x25]
	bl	_max
	str	w0, [x27]
	b	LBB0_3
LBB0_6:
	mov	x0, x19
	bl	_mthca_is_memfree
	cbz	x0, LBB0_8
; %bb.7:
	mov	w28, #0
	ldr	w27, [x23, #36]
	b	LBB0_9
LBB0_8:
	ldr	w28, [x19]
	ldr	w8, [x19, #104]
	sub	w27, w8, w28
LBB0_9:
	ldr	w8, [x26]
	cmp	w8, #1
	b.ge	LBB0_11
	b	LBB0_23
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	subs	x8, x8, #1
	b.ls	LBB0_16
LBB0_11:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_14 Depth 2
	cmp	x8, #2
	b.lo	LBB0_16
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x9, x20
	mov	w10, #1
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=2
	add	x10, x10, #1
	add	x9, x9, #20
	cmp	x8, x10
	b.eq	LBB0_10
LBB0_14:                                ;   Parent Loop BB0_11 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w11, [x9, #20]
	ldr	w12, [x9]
	cmp	w11, w12
	b.le	LBB0_13
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=2
	ldur	q0, [x9, #20]
	str	q0, [sp, #32]
	ldr	w11, [x9, #36]
	str	w11, [sp, #48]
	ldr	q1, [x9]
	stur	q1, [x9, #20]
	ldr	w12, [x9, #16]
	str	w12, [x9, #36]
	str	q0, [x9]
	str	w11, [x9, #16]
	b	LBB0_13
LBB0_16:
	ldr	w8, [x26]
	cmp	w8, #1
	b.lt	LBB0_23
; %bb.17:
	mov	x24, #0
	mov	w23, #0
	add	x25, x20, #8
	b	LBB0_20
LBB0_18:                                ;   in Loop: Header=BB0_20 Depth=1
	cmp	w27, w23
	b.lt	LBB0_55
LBB0_19:                                ;   in Loop: Header=BB0_20 Depth=1
	add	x24, x24, #1
	add	x25, x25, #20
	cmp	x24, w8, sxtw
	b.ge	LBB0_24
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ldursw	x9, [x25, #-8]
	cbz	w9, LBB0_18
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=1
	add	w8, w23, w28
	stur	w8, [x25, #-4]
	add	w23, w9, w23
	cmp	w23, w27
	b.gt	LBB0_55
; %bb.22:                               ;   in Loop: Header=BB0_20 Depth=1
	sxtw	x8, w8
	ldr	w10, [x25]
	ldr	w11, [x25, #8]
	stp	x8, x9, [sp, #16]
	stp	x10, x11, [sp]
	mov	x0, x19
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x24
	bl	_mthca_dbg
	ldr	w8, [x26]
	b	LBB0_19
LBB0_23:
	mov	w23, #0
LBB0_24:
	mov	x0, x19
	bl	_mthca_is_memfree
	asr	w2, w23, #10
	cbz	x0, LBB0_26
; %bb.25:
Lloh21:
	adrp	x1, l_.str.2@PAGE
Lloh22:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_27
LBB0_26:
	asr	w8, w27, #10
	sub	w9, w27, w23
	asr	w9, w9, #10
	stp	x8, x9, [sp]
Lloh23:
	adrp	x1, l_.str.3@PAGE
Lloh24:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_27:
	mov	x0, x19
	bl	_mthca_dbg
	ldr	w8, [x26]
	cmp	w8, #1
	b.lt	LBB0_48
; %bb.28:
	mov	x24, #0
	mov	w25, #20
Lloh25:
	adrp	x27, lJTI0_0@PAGE
Lloh26:
	add	x27, x27, lJTI0_0@PAGEOFF
	b	LBB0_31
LBB0_29:                                ;   in Loop: Header=BB0_31 Depth=1
	ldr	w0, [x21]
	str	w0, [x19, #72]
	madd	x8, x24, x25, x20
	ldr	w8, [x8, #4]
	str	w8, [x19, #76]
	str	w8, [x22, #80]
	bl	_ffs
	sub	x8, x0, #13
	str	x8, [x22, #96]
	ldr	w0, [x21, #32]
	bl	_ffs
	sub	x8, x0, #1
	str	x8, [x22, #88]
LBB0_30:                                ;   in Loop: Header=BB0_31 Depth=1
	add	x24, x24, #1
	ldrsw	x8, [x26]
	cmp	x24, x8
	b.ge	LBB0_48
LBB0_31:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_37 Depth 2
	madd	x8, x24, x25, x20
	ldr	w8, [x8, #8]
	sub	w8, w8, #128
	cmp	w8, #13
	b.hi	LBB0_30
; %bb.32:                               ;   in Loop: Header=BB0_31 Depth=1
	adr	x9, LBB0_29
	ldrb	w10, [x27, x8]
	add	x9, x9, x10, lsl #2
	br	x9
LBB0_33:                                ;   in Loop: Header=BB0_31 Depth=1
	madd	x8, x24, x25, x20
	ldr	w9, [x8, #4]
	str	w9, [x19, #80]
	ldr	w8, [x8, #12]
	str	w8, [x19, #84]
	b	LBB0_30
LBB0_34:                                ;   in Loop: Header=BB0_31 Depth=1
	madd	x8, x24, x25, x20
	ldr	w9, [x8, #12]
	str	w9, [x19, #48]
	ldr	w8, [x8, #4]
	str	w8, [x22, #76]
	b	LBB0_30
LBB0_35:                                ;   in Loop: Header=BB0_31 Depth=1
	madd	x8, x24, x25, x20
	ldr	w9, [x8, #12]
	str	w9, [x19, #20]
	ldr	w9, [x8, #4]
	str	w9, [x22, #16]
	ldr	w8, [x8, #16]
	str	w8, [x22, #20]
	b	LBB0_30
LBB0_36:                                ;   in Loop: Header=BB0_31 Depth=1
	ldr	w8, [x21, #4]
	madd	x9, x24, x25, x20
	ldr	w10, [x9, #12]
	mov	w9, #-1
LBB0_37:                                ;   Parent Loop BB0_31 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	w9, w9, #1
	lsl	w11, w8, w9
	cmp	w11, w10
	b.lt	LBB0_37
; %bb.38:                               ;   in Loop: Header=BB0_31 Depth=1
	str	w9, [x19, #96]
	madd	x8, x24, x25, x20
	ldr	w8, [x8, #4]
	str	w8, [x19, #100]
	str	w8, [x22, #48]
	b	LBB0_30
LBB0_39:                                ;   in Loop: Header=BB0_31 Depth=1
	madd	x8, x24, x25, x20
	ldr	w9, [x8, #12]
	str	w9, [x19, #12]
	ldr	w9, [x8, #4]
	str	w9, [x22]
	ldr	w8, [x8, #16]
	str	w8, [x22, #4]
	b	LBB0_30
LBB0_40:                                ;   in Loop: Header=BB0_31 Depth=1
	madd	x8, x24, x25, x20
	ldr	w9, [x8, #12]
	str	w9, [x19, #44]
	ldr	w8, [x8, #4]
	str	w8, [x19, #92]
	str	w8, [x22, #72]
	ldr	w0, [x19, #8]
	bl	_ffs
	sub	x8, x0, #7
	str	x8, [x22, #104]
	b	LBB0_30
LBB0_41:                                ;   in Loop: Header=BB0_31 Depth=1
	madd	x8, x24, x25, x20
	ldr	w9, [x8, #12]
	str	w9, [x19, #40]
	ldr	w9, [x8, #4]
	str	w9, [x19, #88]
	str	w9, [x22, #64]
	ldr	w8, [x8, #16]
	str	w8, [x22, #68]
	b	LBB0_30
LBB0_42:                                ;   in Loop: Header=BB0_31 Depth=1
	madd	x28, x24, x25, x20
	ldr	w8, [x28, #12]
	asr	w8, w8, #1
	stp	w8, w8, [x19, #32]
	ldr	w8, [x28, #4]
	str	w8, [x22, #52]
Lloh27:
	adrp	x8, _MTHCA_MGM_ENTRY_SIZE@GOTPAGE
Lloh28:
	ldr	x8, [x8, _MTHCA_MGM_ENTRY_SIZE@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
	bl	_ffs
	sub	x8, x0, #1
	str	x8, [x22, #112]
	ldr	w8, [x28, #16]
	sub	w9, w8, #1
	mov	w10, #1
	lsl	w9, w10, w9
	stp	w8, w9, [x22, #56]
	b	LBB0_30
LBB0_43:                                ;   in Loop: Header=BB0_31 Depth=1
	madd	x8, x24, x25, x20
	ldr	w8, [x8, #4]
	str	w8, [x22, #32]
	b	LBB0_30
LBB0_44:                                ;   in Loop: Header=BB0_31 Depth=1
	madd	x8, x24, x25, x20
	ldr	w9, [x8, #12]
	str	w9, [x19, #28]
	ldr	w9, [x8, #4]
	str	w9, [x22, #40]
	ldr	w8, [x8, #16]
	str	w8, [x22, #44]
	b	LBB0_30
LBB0_45:                                ;   in Loop: Header=BB0_31 Depth=1
	madd	x8, x24, x25, x20
	ldr	w8, [x8, #4]
	str	w8, [x22, #36]
	b	LBB0_30
LBB0_46:                                ;   in Loop: Header=BB0_31 Depth=1
	madd	x8, x24, x25, x20
	ldr	w9, [x8, #12]
	str	w9, [x19, #16]
	ldr	w9, [x8, #4]
	str	w9, [x22, #8]
	ldr	w8, [x8, #16]
	str	w8, [x22, #12]
	b	LBB0_30
LBB0_47:                                ;   in Loop: Header=BB0_31 Depth=1
	madd	x8, x24, x25, x20
	ldr	w9, [x8, #12]
	str	w9, [x19, #24]
	ldr	w9, [x8, #4]
	str	w9, [x22, #24]
	ldr	w8, [x8, #16]
	str	w8, [x22, #28]
	b	LBB0_30
LBB0_48:
Lloh30:
	adrp	x8, _MTHCA_NUM_PDS@GOTPAGE
Lloh31:
	ldr	x8, [x8, _MTHCA_NUM_PDS@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	str	w8, [x19, #64]
	ldr	w8, [x19, #4]
Lloh33:
	adrp	x24, _MTHCA_FLAG_SINAI_OPT@GOTPAGE
Lloh34:
	ldr	x24, [x24, _MTHCA_FLAG_SINAI_OPT@GOTPAGEOFF]
	ldr	w9, [x24]
	tst	w9, w8
	b.eq	LBB0_51
; %bb.49:
	ldr	w8, [x22, #68]
	cmp	w8, #24
	b.lt	LBB0_51
; %bb.50:
	str	x8, [sp]
Lloh35:
	adrp	x1, l_.str.4@PAGE
Lloh36:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_mthca_warn
Lloh37:
	adrp	x1, l_.str.5@PAGE
Lloh38:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_mthca_warn
	ldr	w8, [x24]
	ldr	w9, [x19, #4]
	bic	w8, w9, w8
	str	w8, [x19, #4]
LBB0_51:
	mov	x0, x19
	bl	_mthca_is_memfree
	mov	x8, #0
	cbnz	x0, LBB0_54
; %bb.52:
Lloh39:
	adrp	x9, _BITS_PER_LONG@GOTPAGE
Lloh40:
	ldr	x9, [x9, _BITS_PER_LONG@GOTPAGEOFF]
Lloh41:
	ldr	w9, [x9]
	cmp	w9, #64
	b.eq	LBB0_54
; %bb.53:
	ldr	x8, [x21, #40]
LBB0_54:
	str	x8, [x19, #56]
	mov	x0, x20
	bl	_kfree
	b	LBB0_57
LBB0_55:
	sxtw	x2, w23
	sxtw	x3, w27
Lloh42:
	adrp	x1, l_.str@PAGE
Lloh43:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_mthca_err
	mov	x0, x20
	bl	_kfree
LBB0_56:
Lloh44:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh45:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh46:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_57:
	mov	x0, x23
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_33-LBB0_29)>>2
	.byte	(LBB0_29-LBB0_29)>>2
	.byte	(LBB0_34-LBB0_29)>>2
	.byte	(LBB0_35-LBB0_29)>>2
	.byte	(LBB0_36-LBB0_29)>>2
	.byte	(LBB0_39-LBB0_29)>>2
	.byte	(LBB0_40-LBB0_29)>>2
	.byte	(LBB0_41-LBB0_29)>>2
	.byte	(LBB0_42-LBB0_29)>>2
	.byte	(LBB0_43-LBB0_29)>>2
	.byte	(LBB0_44-LBB0_29)>>2
	.byte	(LBB0_45-LBB0_29)>>2
	.byte	(LBB0_46-LBB0_29)>>2
	.byte	(LBB0_47-LBB0_29)>>2
                                        ; -- End function
	.comm	_MTHCA_RES_NUM,4,2              ; @MTHCA_RES_NUM
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MTHCA_RDB_ENTRY_SIZE,4,2       ; @MTHCA_RDB_ENTRY_SIZE
	.comm	_MTHCA_MGM_ENTRY_SIZE,4,2       ; @MTHCA_MGM_ENTRY_SIZE
	.comm	_MTHCA_AV_SIZE,4,2              ; @MTHCA_AV_SIZE
	.comm	_MTHCA_NUM_EQS,4,2              ; @MTHCA_NUM_EQS
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Profile requires 0x%llx bytes; won't fit in 0x%llx bytes of context memory.\n"

l_.str.1:                               ; @.str.1
	.asciz	"profile[%2d]--%2d/%2d @ 0x%16llx (size 0x%8llx)\n"

l_.str.2:                               ; @.str.2
	.asciz	"HCA context memory: reserving %d KB\n"

l_.str.3:                               ; @.str.3
	.asciz	"HCA memory: allocated %d KB/%d KB (%d KB free)\n"

	.comm	_MTHCA_NUM_PDS,4,2              ; @MTHCA_NUM_PDS
	.comm	_MTHCA_FLAG_SINAI_OPT,4,2       ; @MTHCA_FLAG_SINAI_OPT
l_.str.4:                               ; @.str.4
	.asciz	"MPT table too large (requested size 2^%d >= 2^24)\n"

l_.str.5:                               ; @.str.5
	.asciz	"Disabling memory key throughput optimization.\n"

	.comm	_BITS_PER_LONG,4,2              ; @BITS_PER_LONG
.subsections_via_symbols
