	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipu_dmfc_init                  ## -- Begin function ipu_dmfc_init
	.p2align	4, 0x90
_ipu_dmfc_init:                         ## @ipu_dmfc_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	%rdx, %r12
	movq	%rsi, %r15
	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, %r13
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_devm_ioremap
	movq	%rax, (%r13)
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%r15, 32(%r13)
	movq	%r14, 24(%r13)
	movq	%r13, %rdi
	addq	$16, %rdi
	callq	_mutex_init
	movq	%r13, (%r14)
	movq	_DMFC_NUM_CHANNELS@GOTPCREL(%rip), %r8
	movl	(%r8), %ecx
	testl	%ecx, %ecx
	jle	LBB0_10
## %bb.4:
	movq	8(%r13), %rdx
	movq	_IPUV3_CHANNEL_MEM_BG_SYNC@GOTPCREL(%rip), %rax
	movq	(%rax), %r11
	xorl	%edi, %edi
	movq	_dmfcdata@GOTPCREL(%rip), %rax
	movq	_IPUV3_CHANNEL_MEM_FG_SYNC@GOTPCREL(%rip), %r9
	movq	_IPUV3_CHANNEL_MEM_DC_SYNC@GOTPCREL(%rip), %r10
	xorl	%ebx, %ebx
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	$2, (%rdx,%rdi,4)
	movl	(%r8), %ecx
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	incq	%rbx
	movslq	%ecx, %rsi
	addq	$8, %rdi
	cmpq	%rsi, %rbx
	jge	LBB0_10
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, 24(%rdx,%rdi,4)
	movq	%r14, 16(%rdx,%rdi,4)
	movq	(%rax), %rsi
	addq	%rdi, %rsi
	movq	%rsi, 8(%rdx,%rdi,4)
	movq	(%rax), %rsi
	movq	(%rsi,%rdi), %rsi
	cmpq	%r11, %rsi
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpq	(%r9), %rsi
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpq	(%r10), %rsi
	jne	LBB0_9
	jmp	LBB0_8
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_11
LBB0_10:
	movq	_DMFC_WR_CHAN@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r13), %rsi
	movl	$80, %edi
	callq	_writel
	movq	_DMFC_DP_CHAN@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r13), %rsi
	movl	$22100, %edi                    ## imm = 0x5654
	callq	_writel
	movq	_DMFC_WR_CHAN_DEF@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r13), %rsi
	movl	$538976502, %edi                ## imm = 0x202020F6
	callq	_writel
	movq	_DMFC_DP_CHAN_DEF@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r13), %rsi
	movl	$539031286, %edi                ## imm = 0x2020F6F6
	callq	_writel
	movq	_DMFC_GENERAL1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r13), %rsi
	movl	$3, %edi
	callq	_writel
	xorl	%eax, %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_DMFC_NUM_CHANNELS,4,2          ## @DMFC_NUM_CHANNELS
	.comm	_dmfcdata,8,3                   ## @dmfcdata
	.comm	_IPUV3_CHANNEL_MEM_BG_SYNC,8,3  ## @IPUV3_CHANNEL_MEM_BG_SYNC
	.comm	_IPUV3_CHANNEL_MEM_FG_SYNC,8,3  ## @IPUV3_CHANNEL_MEM_FG_SYNC
	.comm	_IPUV3_CHANNEL_MEM_DC_SYNC,8,3  ## @IPUV3_CHANNEL_MEM_DC_SYNC
	.comm	_DMFC_WR_CHAN,8,3               ## @DMFC_WR_CHAN
	.comm	_DMFC_DP_CHAN,8,3               ## @DMFC_DP_CHAN
	.comm	_DMFC_WR_CHAN_DEF,8,3           ## @DMFC_WR_CHAN_DEF
	.comm	_DMFC_DP_CHAN_DEF,8,3           ## @DMFC_DP_CHAN_DEF
	.comm	_DMFC_GENERAL1,8,3              ## @DMFC_GENERAL1
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipu_dmfc_init                  ; -- Begin function ipu_dmfc_init
	.p2align	2
_ipu_dmfc_init:                         ; @ipu_dmfc_init
	.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	x22, x2
	mov	x21, 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
Lloh3:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x21
	mov	x1, x22
	bl	_devm_ioremap
	str	x0, [x19]
	cbz	x0, LBB0_7
; %bb.2:
	stp	x20, x21, [x19, #24]
	add	x0, x19, #16
	bl	_mutex_init
	str	x19, [x20]
Lloh6:
	adrp	x8, _DMFC_NUM_CHANNELS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DMFC_NUM_CHANNELS@GOTPAGEOFF]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_8
; %bb.3:
	mov	x10, #0
	mov	x11, #0
	ldr	x14, [x19, #8]
Lloh8:
	adrp	x12, _IPUV3_CHANNEL_MEM_BG_SYNC@GOTPAGE
Lloh9:
	ldr	x12, [x12, _IPUV3_CHANNEL_MEM_BG_SYNC@GOTPAGEOFF]
Lloh10:
	ldr	x12, [x12]
Lloh11:
	adrp	x13, _dmfcdata@GOTPAGE
Lloh12:
	ldr	x13, [x13, _dmfcdata@GOTPAGEOFF]
	add	x14, x14, #16
Lloh13:
	adrp	x15, _IPUV3_CHANNEL_MEM_FG_SYNC@GOTPAGE
Lloh14:
	ldr	x15, [x15, _IPUV3_CHANNEL_MEM_FG_SYNC@GOTPAGEOFF]
Lloh15:
	adrp	x16, _IPUV3_CHANNEL_MEM_DC_SYNC@GOTPAGE
Lloh16:
	ldr	x16, [x16, _IPUV3_CHANNEL_MEM_DC_SYNC@GOTPAGEOFF]
	mov	w17, #2
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x11, x11, #1
	add	x10, x10, #8
	add	x14, x14, #32
	cmp	x11, w9, sxtw
	b.ge	LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	stp	x20, x19, [x14]
	ldr	x0, [x13]
	add	x0, x0, x10
	stur	x0, [x14, #-8]
	ldr	x0, [x13]
	ldr	x0, [x0, x10]
	ldr	x1, [x15]
	ldr	x2, [x16]
	cmp	x0, x12
	ccmp	x0, x1, #4, ne
	ccmp	x0, x2, #4, ne
	b.ne	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	stur	w17, [x14, #-16]
	ldr	w9, [x8]
	b	LBB0_4
LBB0_7:
Lloh17:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_8:
	ldr	x8, [x19]
Lloh20:
	adrp	x9, _DMFC_WR_CHAN@GOTPAGE
Lloh21:
	ldr	x9, [x9, _DMFC_WR_CHAN@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #80
	bl	_writel
	ldr	x8, [x19]
Lloh23:
	adrp	x9, _DMFC_DP_CHAN@GOTPAGE
Lloh24:
	ldr	x9, [x9, _DMFC_DP_CHAN@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #22100
	bl	_writel
	ldr	x8, [x19]
Lloh26:
	adrp	x9, _DMFC_WR_CHAN_DEF@GOTPAGE
Lloh27:
	ldr	x9, [x9, _DMFC_WR_CHAN_DEF@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #8438
	movk	w0, #8224, lsl #16
	bl	_writel
	ldr	x8, [x19]
Lloh29:
	adrp	x9, _DMFC_DP_CHAN_DEF@GOTPAGE
Lloh30:
	ldr	x9, [x9, _DMFC_DP_CHAN_DEF@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #63222
	movk	w0, #8224, lsl #16
	bl	_writel
	ldr	x8, [x19]
Lloh32:
	adrp	x9, _DMFC_GENERAL1@GOTPAGE
Lloh33:
	ldr	x9, [x9, _DMFC_GENERAL1@GOTPAGEOFF]
Lloh34:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #3
	bl	_writel
	mov	w0, #0
LBB0_9:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_DMFC_NUM_CHANNELS,4,2          ; @DMFC_NUM_CHANNELS
	.comm	_dmfcdata,8,3                   ; @dmfcdata
	.comm	_IPUV3_CHANNEL_MEM_BG_SYNC,8,3  ; @IPUV3_CHANNEL_MEM_BG_SYNC
	.comm	_IPUV3_CHANNEL_MEM_FG_SYNC,8,3  ; @IPUV3_CHANNEL_MEM_FG_SYNC
	.comm	_IPUV3_CHANNEL_MEM_DC_SYNC,8,3  ; @IPUV3_CHANNEL_MEM_DC_SYNC
	.comm	_DMFC_WR_CHAN,8,3               ; @DMFC_WR_CHAN
	.comm	_DMFC_DP_CHAN,8,3               ; @DMFC_DP_CHAN
	.comm	_DMFC_WR_CHAN_DEF,8,3           ; @DMFC_WR_CHAN_DEF
	.comm	_DMFC_DP_CHAN_DEF,8,3           ; @DMFC_DP_CHAN_DEF
	.comm	_DMFC_GENERAL1,8,3              ; @DMFC_GENERAL1
.subsections_via_symbols
