	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipu_init_channel
_ipu_init_channel:                      ## @ipu_init_channel
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movl	4(%rsi), %ebx
	callq	_to_ipu
	movq	%rax, %r15
	movl	12(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_dev_dbg
	leal	-128(%rbx), %eax
	cmpl	$3, %eax
	jae	LBB0_1
## %bb.2:
	movq	%r15, %r12
	addq	$8, %r12
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	leal	-128(%rbx), %eax
	cmpl	$2, %eax
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	jae	LBB0_3
## %bb.6:
	movl	$4, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_7
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_12
LBB0_3:
	cmpl	$130, %ebx
	jne	LBB0_4
## %bb.5:
	movq	_IC_CONF@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_idmac_read_icreg
	movq	_IC_CONF_CSI_MEM_WR_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movl	(%r13), %edx
	movq	%r15, %rdi
	callq	_idmac_write_icreg
	movl	$16, -44(%rbp)                  ## 4-byte Folded Spill
LBB0_7:
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_8
LBB0_4:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movb	$1, %al
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
LBB0_8:
	movl	$1, %eax
	movl	%ebx, %ecx
	shlq	%cl, %rax
	orq	%rax, (%r15)
	movq	_IPU_CONF@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%r15, %rdi
	callq	_idmac_read_ipureg
	movl	%eax, %r13d
	movl	%ebx, %edi
	callq	_ipu_channel_conf_mask
	orl	%eax, %r13d
	movl	(%r14), %edx
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_idmac_write_ipureg
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%ebx, %ebx
	cmpb	$0, -48(%rbp)                   ## 1-byte Folded Reload
	jne	LBB0_11
## %bb.9:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	cmpl	$0, (%rdi)
	jne	LBB0_11
## %bb.10:
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_idmac_desc_alloc
	movl	%eax, %ebx
LBB0_11:
	movq	%r15, %rdi
	callq	_dump_idmac_reg
LBB0_12:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"init channel = %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IC_CONF,4,2                    ## @IC_CONF
	.comm	_IC_CONF_CSI_MEM_WR_EN,4,2      ## @IC_CONF_CSI_MEM_WR_EN
	.comm	_IPU_FS_PROC_FLOW,4,2           ## @IPU_FS_PROC_FLOW
	.comm	_FS_ENC_IN_VALID,4,2            ## @FS_ENC_IN_VALID
	.comm	_IPU_CONF,4,2                   ## @IPU_CONF
	.no_dead_strip	_ipu_init_channel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ipu_init_channel
_ipu_init_channel:                      ; @ipu_init_channel
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x1
	ldr	w21, [x1, #4]
	bl	_to_ipu
	mov	x19, x0
	ldr	w0, [x0, #12]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_dev_dbg
	sub	w8, w21, #128
	cmp	w8, #3
	b.hs	LBB0_3
; %bb.1:
	add	x22, x19, #8
	mov	x0, x22
	bl	_spin_lock_irqsave
	sub	w8, w21, #128
	cmp	w8, #2
	b.hs	LBB0_4
; %bb.2:
	mov	w25, #0
	mov	w23, #4
	b	LBB0_7
LBB0_3:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_12
LBB0_4:
	cmp	w21, #130
	b.ne	LBB0_6
; %bb.5:
Lloh5:
	adrp	x23, _IC_CONF@GOTPAGE
Lloh6:
	ldr	x23, [x23, _IC_CONF@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x19
	bl	_idmac_read_icreg
Lloh7:
	adrp	x8, _IC_CONF_CSI_MEM_WR_EN@GOTPAGE
Lloh8:
	ldr	x8, [x8, _IC_CONF_CSI_MEM_WR_EN@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	bic	w1, w0, w8
	ldr	w2, [x23]
	mov	x0, x19
	bl	_idmac_write_icreg
	mov	w25, #0
	mov	w23, #16
	b	LBB0_7
LBB0_6:
	mov	w23, #0
	mov	w25, #1
LBB0_7:
	mov	w8, #1
	lsl	x8, x8, x21
	ldr	x9, [x19]
	orr	x8, x9, x8
	str	x8, [x19]
Lloh10:
	adrp	x26, _IPU_CONF@GOTPAGE
Lloh11:
	ldr	x26, [x26, _IPU_CONF@GOTPAGEOFF]
	ldr	w1, [x26]
	mov	x0, x19
	bl	_idmac_read_ipureg
	mov	x24, x0
	mov	x0, x21
	bl	_ipu_channel_conf_mask
	orr	w1, w0, w24
	ldr	w2, [x26]
	mov	x0, x19
	bl	_idmac_write_ipureg
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	tbnz	w25, #0, LBB0_9
; %bb.8:
	ldr	w8, [x20]
	cbz	w8, LBB0_10
LBB0_9:
	mov	w20, #0
	b	LBB0_11
LBB0_10:
	mov	x0, x20
	mov	x1, x23
	bl	_idmac_desc_alloc
	mov	x20, x0
LBB0_11:
	mov	x0, x19
	bl	_dump_idmac_reg
LBB0_12:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"init channel = %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IC_CONF,4,2                    ; @IC_CONF
	.comm	_IC_CONF_CSI_MEM_WR_EN,4,2      ; @IC_CONF_CSI_MEM_WR_EN
	.comm	_IPU_FS_PROC_FLOW,4,2           ; @IPU_FS_PROC_FLOW
	.comm	_FS_ENC_IN_VALID,4,2            ; @FS_ENC_IN_VALID
	.comm	_IPU_CONF,4,2                   ; @IPU_CONF
	.no_dead_strip	_ipu_init_channel
.subsections_via_symbols
