	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_init_icm_table            ## -- Begin function mlx4_init_icm_table
	.p2align	4, 0x90
_mlx4_init_icm_table:                   ## @mlx4_init_icm_table
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -44(%rbp)                 ## 4-byte Spill
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	movl	%ecx, %r14d
	movl	%edx, %r12d
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	_MLX4_TABLE_CHUNK_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cltd
	idivl	%ecx
	movl	%eax, %r13d
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_19
LBB0_2:
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	movl	%r12d, -48(%rbp)                ## 4-byte Spill
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %esi
	callq	_DIV_ROUND_UP
	movl	%eax, %r12d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r12d, %edi
	movl	$8, %esi
	callq	_kvcalloc
	movq	%rax, 24(%rbx)
	testq	%rax, %rax
	je	LBB0_18
## %bb.3:
	movl	24(%rbp), %ecx
	movl	16(%rbp), %edx
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%rbx)
	movl	%r12d, 4(%rbx)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 40(%rbx)
	movl	%r14d, 8(%rbx)
	movl	%edx, 12(%rbx)
	movl	%ecx, 16(%rbx)
	leaq	32(%rbx), %rdi
	callq	_mutex_init
	imull	%r14d, %r15d
	testl	%r15d, %r15d
	jle	LBB0_21
## %bb.4:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movl	%r12d, -68(%rbp)                ## 4-byte Spill
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	imull	%r14d, %ecx
	movq	_MLX4_TABLE_CHUNK_SIZE@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	movq	%rcx, %rbx
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	leaq	1(%r14), %r13
	movl	%r13d, %ecx
	imull	%esi, %ecx
	cmpl	%ebx, %ecx
	jle	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	%ebx, %edi
	subl	%eax, %edi
	callq	_PAGE_ALIGN
	movl	%eax, %esi
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movzbl	(%rax), %ecx
	shrl	%cl, %esi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	cmpl	$0, 16(%rbp)
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_GFP_HIGHUSER@GOTPCREL(%rip), %rax
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	(%rax), %edx
	movq	___GFP_NOWARN@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movl	24(%rbp), %ecx
	callq	_mlx4_alloc_icm
	movq	24(%r12), %rcx
	movq	%rax, (%rcx,%r14,8)
	movq	24(%r12), %rax
	movq	(%rax,%r14,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	_MLX4_TABLE_CHUNK_SIZE@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	imull	%r14d, %edx
	addl	-48(%rbp), %edx                 ## 4-byte Folded Reload
	movq	%r15, %rdi
	callq	_mlx4_MAP_ICM
	testq	%rax, %rax
	jne	LBB0_11
## %bb.20:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	24(%rax), %rax
	movq	(%rax,%r14,8), %rax
	incl	(%rax)
	movl	(%r12), %esi
	movl	%r13d, %eax
	imull	%esi, %eax
	movq	%r13, %r14
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	cmpl	%r15d, %eax
	jl	LBB0_5
LBB0_21:
	xorl	%eax, %eax
	jmp	LBB0_22
LBB0_11:
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	24(%r12), %rax
	movl	%r14d, %ebx
	shlq	$3, %rbx
	movq	(%rax,%rbx), %rsi
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movl	24(%rbp), %edx
	callq	_mlx4_free_icm
	movq	24(%r12), %rax
	movq	$0, (%rax,%rbx)
LBB0_12:
	movl	-68(%rbp), %eax                 ## 4-byte Reload
	testl	%eax, %eax
	jle	LBB0_17
## %bb.13:
	movl	%eax, %r14d
	xorl	%ebx, %ebx
	movq	_MLX4_ICM_PAGE_SIZE@GOTPCREL(%rip), %r13
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_14 Depth=1
	incq	%rbx
	cmpq	%rbx, %r14
	je	LBB0_17
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	24(%r12), %rax
	cmpq	$0, (%rax,%rbx,8)
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	_MLX4_TABLE_CHUNK_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%ebx, %esi
	imull	%eax, %esi
	addl	-48(%rbp), %esi                 ## 4-byte Folded Reload
	cltd
	idivl	(%r13)
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_mlx4_UNMAP_ICM
	movq	24(%r12), %rax
	movq	(%rax,%rbx,8), %rsi
	movq	%r15, %rdi
	movl	24(%rbp), %edx
	callq	_mlx4_free_icm
	jmp	LBB0_16
LBB0_17:
	movq	24(%r12), %rdi
	callq	_kvfree
LBB0_18:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
LBB0_19:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_22:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX4_TABLE_CHUNK_SIZE,4,2      ## @MLX4_TABLE_CHUNK_SIZE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_GFP_HIGHUSER,4,2               ## @GFP_HIGHUSER
	.comm	___GFP_NOWARN,4,2               ## @__GFP_NOWARN
	.comm	_MLX4_ICM_PAGE_SIZE,4,2         ## @MLX4_ICM_PAGE_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_init_icm_table            ; -- Begin function mlx4_init_icm_table
	.p2align	2
_mlx4_init_icm_table:                   ; @mlx4_init_icm_table
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x7
	mov	x23, x6
	mov	x27, x5
	mov	x25, x4
	mov	x26, x3
	mov	x21, x2
	mov	x20, x1
	mov	x22, x0
Lloh0:
	adrp	x28, _MLX4_TABLE_CHUNK_SIZE@GOTPAGE
Lloh1:
	ldr	x28, [x28, _MLX4_TABLE_CHUNK_SIZE@GOTPAGEOFF]
	ldr	w8, [x28]
	sdiv	w24, w8, w3
	cmp	w24, #0
	cset	w0, eq
	bl	_WARN_ON
	cbz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_19
LBB0_2:
	mov	x0, x25
	mov	x1, x24
	bl	_DIV_ROUND_UP
	mov	x24, x0
Lloh4:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
	mov	w1, #8
	bl	_kvcalloc
	str	x0, [x20, #24]
	cbz	x0, LBB0_18
; %bb.3:
	stp	w21, w24, [x20]
	str	x25, [x20, #40]
	stp	w26, w23, [x20, #8]
	add	x0, x20, #32
	str	w19, [x20, #16]
	bl	_mutex_init
	mul	w27, w27, w26
	cmp	w27, #1
	b.lt	LBB0_10
; %bb.4:
	str	w24, [sp, #12]                  ; 4-byte Folded Spill
	mov	x24, #0
	mov	w8, #0
	mul	w25, w25, w26
	ldr	w0, [x28]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	x26, x24, #1
	mul	w9, w0, w26
	cmp	w9, w25
	b.le	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	sub	w0, w25, w8
	bl	_PAGE_ALIGN
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
Lloh7:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	lsr	w1, w0, w8
	cmp	w23, #0
Lloh10:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh12:
	adrp	x9, _GFP_HIGHUSER@GOTPAGE
Lloh13:
	ldr	x9, [x9, _GFP_HIGHUSER@GOTPAGEOFF]
	csel	x8, x9, x8, eq
	ldr	w8, [x8]
Lloh14:
	adrp	x9, ___GFP_NOWARN@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___GFP_NOWARN@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w2, w8, w9
	mov	x0, x22
	mov	x3, x19
	bl	_mlx4_alloc_icm
	ldr	x8, [x20, #24]
	lsl	x9, x24, #3
	str	x0, [x8, x9]
	ldr	x8, [x20, #24]
	ldr	x1, [x8, x9]
	cbz	x1, LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x28]
	madd	w2, w8, w24, w21
	mov	x0, x22
	bl	_mlx4_MAP_ICM
	cbnz	x0, LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x20, #24]
	ldr	x8, [x8, x24, lsl #3]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	ldr	w0, [x28]
	mul	w8, w0, w26
	add	x24, x24, #1
	cmp	w8, w27
	b.lt	LBB0_5
LBB0_10:
	mov	w0, #0
	b	LBB0_20
LBB0_11:
	ldr	x8, [x20, #24]
	ubfiz	x23, x24, #3, #32
	ldr	x1, [x8, x23]
	mov	x0, x22
	mov	x2, x19
	bl	_mlx4_free_icm
	ldr	x8, [x20, #24]
	str	xzr, [x8, x23]
LBB0_12:
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.13:
	mov	x23, #0
	mov	w24, w8
Lloh17:
	adrp	x25, _MLX4_ICM_PAGE_SIZE@GOTPAGE
Lloh18:
	ldr	x25, [x25, _MLX4_ICM_PAGE_SIZE@GOTPAGEOFF]
	b	LBB0_15
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=1
	add	x23, x23, #1
	cmp	x24, x23
	b.eq	LBB0_17
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #24]
	ldr	x8, [x8, x23, lsl #3]
	cbz	x8, LBB0_14
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	w8, [x28]
	madd	w1, w8, w23, w21
	ldr	w9, [x25]
	sdiv	w2, w8, w9
	mov	x0, x22
	bl	_mlx4_UNMAP_ICM
	ldr	x8, [x20, #24]
	ldr	x1, [x8, x23, lsl #3]
	mov	x0, x22
	mov	x2, x19
	bl	_mlx4_free_icm
	b	LBB0_14
LBB0_17:
	ldr	x0, [x20, #24]
	bl	_kvfree
LBB0_18:
Lloh19:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_19:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_20:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX4_TABLE_CHUNK_SIZE,4,2      ; @MLX4_TABLE_CHUNK_SIZE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_GFP_HIGHUSER,4,2               ; @GFP_HIGHUSER
	.comm	___GFP_NOWARN,4,2               ; @__GFP_NOWARN
	.comm	_MLX4_ICM_PAGE_SIZE,4,2         ; @MLX4_ICM_PAGE_SIZE
.subsections_via_symbols
