	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipu_ic_init                    ## -- Begin function ipu_ic_init
	.p2align	4, 0x90
_ipu_ic_init:                           ## @ipu_ic_init
	.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	%rcx, %r13
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rsi, %rdi
	movl	$40, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%rax, (%r14)
	movq	%rax, %rdi
	addq	$32, %rdi
	callq	_spin_lock_init
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_devm_ioremap
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	_SZ_64K@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_devm_ioremap
	movq	%rax, 24(%rbx)
	testq	%rax, %rax
	je	LBB0_1
## %bb.4:
	movq	16(%rbx), %rcx
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movq	%r15, %rdx
	callq	_dev_dbg
	movq	%r14, 8(%rbx)
	movq	_IC_NUM_TASKS@GOTPCREL(%rip), %r8
	cmpl	$0, (%r8)
	jle	LBB0_5
## %bb.6:
	movq	(%rbx), %rdx
	xorl	%eax, %eax
	movq	_ic_task_reg@GOTPCREL(%rip), %r9
	movq	_ic_task_bit@GOTPCREL(%rip), %r10
	xorl	%ecx, %ecx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	%esi, (%rdx,%rcx,8)
	movq	%rbx, 24(%rdx,%rcx,8)
	movq	(%r9), %rdi
	addq	%rcx, %rdi
	movq	%rdi, 16(%rdx,%rcx,8)
	movq	(%r10), %rdi
	addq	%rcx, %rdi
	movq	%rdi, 8(%rdx,%rcx,8)
	incq	%rsi
	movslq	(%r8), %rdi
	addq	$4, %rcx
	cmpq	%rdi, %rsi
	jl	LBB0_7
	jmp	LBB0_8
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	xorl	%eax, %eax
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_SZ_64K,4,2                     ## @SZ_64K
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"IC base: 0x%08lx remapped to %p\n"

	.comm	_IC_NUM_TASKS,4,2               ## @IC_NUM_TASKS
	.comm	_ic_task_reg,8,3                ## @ic_task_reg
	.comm	_ic_task_bit,8,3                ## @ic_task_bit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipu_ic_init                    ; -- Begin function ipu_ic_init
	.p2align	2
_ipu_ic_init:                           ; @ipu_ic_init
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x23, x3
	mov	x21, x2
	mov	x22, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x1
	mov	w1, #40
	bl	_devm_kzalloc
	cbz	x0, LBB0_7
; %bb.1:
	mov	x19, x0
	str	x0, [x20]
	add	x0, x0, #32
	bl	_spin_lock_init
Lloh3:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x22
	mov	x1, x21
	bl	_devm_ioremap
	str	x0, [x19, #16]
	cbz	x0, LBB0_7
; %bb.2:
Lloh6:
	adrp	x8, _SZ_64K@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SZ_64K@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x22
	mov	x1, x23
	bl	_devm_ioremap
	str	x0, [x19, #24]
	cbz	x0, LBB0_7
; %bb.3:
	ldr	x3, [x19, #16]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	mov	x2, x21
	bl	_dev_dbg
	str	x20, [x19, #8]
Lloh11:
	adrp	x8, _IC_NUM_TASKS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _IC_NUM_TASKS@GOTPAGEOFF]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_6
; %bb.4:
	mov	x9, #0
	mov	x10, #0
	ldr	x11, [x19]
	add	x11, x11, #16
Lloh13:
	adrp	x12, _ic_task_reg@GOTPAGE
Lloh14:
	ldr	x12, [x12, _ic_task_reg@GOTPAGEOFF]
Lloh15:
	adrp	x13, _ic_task_bit@GOTPAGE
Lloh16:
	ldr	x13, [x13, _ic_task_bit@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	stur	w10, [x11, #-16]
	str	x19, [x11, #8]
	ldr	x14, [x12]
	add	x14, x14, x9
	str	x14, [x11]
	ldr	x14, [x13]
	add	x14, x14, x9
	stur	x14, [x11, #-8]
	add	x10, x10, #1
	ldrsw	x14, [x8]
	add	x9, x9, #4
	add	x11, x11, #32
	cmp	x10, x14
	b.lt	LBB0_5
LBB0_6:
	mov	w0, #0
	b	LBB0_8
LBB0_7:
Lloh17:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_SZ_64K,4,2                     ; @SZ_64K
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"IC base: 0x%08lx remapped to %p\n"

	.comm	_IC_NUM_TASKS,4,2               ; @IC_NUM_TASKS
	.comm	_ic_task_reg,8,3                ; @ic_task_reg
	.comm	_ic_task_bit,8,3                ; @ic_task_bit
.subsections_via_symbols
