	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipu_update_channel_buffer
_ipu_update_channel_buffer:             ## @ipu_update_channel_buffer
	.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
	movl	%edx, %r14d
	movl	%esi, %ebx
	movq	%rdi, %r15
	movl	8(%rdi), %r12d
	movq	_ipu_data@GOTPCREL(%rip), %rdi
	callq	_spin_lock_irqsave
	testl	%ebx, %ebx
	je	LBB0_1
## %bb.3:
	movq	_IPU_CHA_BUF1_RDY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ipu_data@GOTPCREL(%rip), %rdi
	callq	_idmac_read_ipureg
	movl	$1, %ebx
	movl	%r12d, %ecx
	shlq	%cl, %rbx
	btq	%r12, %rax
	jae	LBB0_5
## %bb.4:
	movq	_ipu_data@GOTPCREL(%rip), %rdi
	movl	%r12d, %esi
	callq	_ipu_ic_disable_task
	movq	_IPU_CHANNEL_READY@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r15)
LBB0_5:
	movq	_IPU_CHA_DB_MODE_SEL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_ipu_data@GOTPCREL(%rip), %rdi
	callq	_idmac_read_ipureg
	movl	$9, %r13d
	testq	%rbx, %rax
	jne	LBB0_7
## %bb.6:
	orl	%ebx, %eax
	movl	(%r15), %edx
	movq	_ipu_data@GOTPCREL(%rip), %rdi
	movl	%eax, %esi
	callq	_idmac_write_ipureg
	jmp	LBB0_7
LBB0_1:
	movq	_IPU_CHA_BUF0_RDY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ipu_data@GOTPCREL(%rip), %rdi
	callq	_idmac_read_ipureg
	movl	$8, %r13d
	btq	%r12, %rax
	jae	LBB0_7
## %bb.2:
	movq	_ipu_data@GOTPCREL(%rip), %rdi
	movl	%r12d, %esi
	callq	_ipu_ic_disable_task
	movq	_IPU_CHANNEL_READY@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r15)
LBB0_7:
	movl	%r12d, %edi
	callq	_dma_param_addr
	addl	%eax, %r13d
	movq	_IPU_IMA_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_ipu_data@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdi
	movl	%r13d, %esi
	callq	_idmac_write_ipureg
	movq	_IPU_IMA_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_idmac_write_ipureg
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ipu_data,4,2                   ## @ipu_data
	.comm	_IPU_CHA_BUF0_RDY,4,2           ## @IPU_CHA_BUF0_RDY
	.comm	_IPU_CHANNEL_READY,8,3          ## @IPU_CHANNEL_READY
	.comm	_IPU_IMA_ADDR,4,2               ## @IPU_IMA_ADDR
	.comm	_IPU_IMA_DATA,4,2               ## @IPU_IMA_DATA
	.comm	_IPU_CHA_BUF1_RDY,4,2           ## @IPU_CHA_BUF1_RDY
	.comm	_IPU_CHA_DB_MODE_SEL,4,2        ## @IPU_CHA_DB_MODE_SEL
	.no_dead_strip	_ipu_update_channel_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ipu_update_channel_buffer
_ipu_update_channel_buffer:             ; @ipu_update_channel_buffer
	.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	x19, x2
	mov	x22, x1
	mov	x21, x0
	ldr	w20, [x0, #8]
Lloh0:
	adrp	x0, _ipu_data@GOTPAGE
Lloh1:
	ldr	x0, [x0, _ipu_data@GOTPAGEOFF]
	bl	_spin_lock_irqsave
	cbz	w22, LBB0_6
; %bb.1:
Lloh2:
	adrp	x8, _IPU_CHA_BUF1_RDY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IPU_CHA_BUF1_RDY@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x0, _ipu_data@GOTPAGE
Lloh6:
	ldr	x0, [x0, _ipu_data@GOTPAGEOFF]
	bl	_idmac_read_ipureg
	mov	w8, #1
	lsl	x22, x8, x20
	tst	x0, x22
	b.eq	LBB0_3
; %bb.2:
Lloh7:
	adrp	x0, _ipu_data@GOTPAGE
Lloh8:
	ldr	x0, [x0, _ipu_data@GOTPAGEOFF]
	mov	x1, x20
	bl	_ipu_ic_disable_task
Lloh9:
	adrp	x8, _IPU_CHANNEL_READY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IPU_CHANNEL_READY@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	str	x8, [x21]
LBB0_3:
Lloh12:
	adrp	x21, _IPU_CHA_DB_MODE_SEL@GOTPAGE
Lloh13:
	ldr	x21, [x21, _IPU_CHA_DB_MODE_SEL@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh14:
	adrp	x0, _ipu_data@GOTPAGE
Lloh15:
	ldr	x0, [x0, _ipu_data@GOTPAGEOFF]
	bl	_idmac_read_ipureg
	tst	x0, x22
	b.ne	LBB0_5
; %bb.4:
	orr	w1, w0, w22
	ldr	w2, [x21]
Lloh16:
	adrp	x0, _ipu_data@GOTPAGE
Lloh17:
	ldr	x0, [x0, _ipu_data@GOTPAGEOFF]
	bl	_idmac_write_ipureg
LBB0_5:
	mov	w21, #9
	b	LBB0_9
LBB0_6:
Lloh18:
	adrp	x8, _IPU_CHA_BUF0_RDY@GOTPAGE
Lloh19:
	ldr	x8, [x8, _IPU_CHA_BUF0_RDY@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	adrp	x0, _ipu_data@GOTPAGE
Lloh22:
	ldr	x0, [x0, _ipu_data@GOTPAGEOFF]
	bl	_idmac_read_ipureg
	lsr	x8, x0, x20
	tbz	w8, #0, LBB0_8
; %bb.7:
Lloh23:
	adrp	x0, _ipu_data@GOTPAGE
Lloh24:
	ldr	x0, [x0, _ipu_data@GOTPAGEOFF]
	mov	x1, x20
	bl	_ipu_ic_disable_task
Lloh25:
	adrp	x8, _IPU_CHANNEL_READY@GOTPAGE
Lloh26:
	ldr	x8, [x8, _IPU_CHANNEL_READY@GOTPAGEOFF]
Lloh27:
	ldr	x8, [x8]
	str	x8, [x21]
LBB0_8:
	mov	w21, #8
LBB0_9:
	mov	x0, x20
	bl	_dma_param_addr
	add	w1, w0, w21
Lloh28:
	adrp	x8, _IPU_IMA_ADDR@GOTPAGE
Lloh29:
	ldr	x8, [x8, _IPU_IMA_ADDR@GOTPAGEOFF]
Lloh30:
	ldr	w2, [x8]
Lloh31:
	adrp	x20, _ipu_data@GOTPAGE
Lloh32:
	ldr	x20, [x20, _ipu_data@GOTPAGEOFF]
	mov	x0, x20
	bl	_idmac_write_ipureg
Lloh33:
	adrp	x8, _IPU_IMA_DATA@GOTPAGE
Lloh34:
	ldr	x8, [x8, _IPU_IMA_DATA@GOTPAGEOFF]
Lloh35:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x19
	bl	_idmac_write_ipureg
	mov	x0, x20
	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
	b	_spin_unlock_irqrestore
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_ipu_data,4,2                   ; @ipu_data
	.comm	_IPU_CHA_BUF0_RDY,4,2           ; @IPU_CHA_BUF0_RDY
	.comm	_IPU_CHANNEL_READY,8,3          ; @IPU_CHANNEL_READY
	.comm	_IPU_IMA_ADDR,4,2               ; @IPU_IMA_ADDR
	.comm	_IPU_IMA_DATA,4,2               ; @IPU_IMA_DATA
	.comm	_IPU_CHA_BUF1_RDY,4,2           ; @IPU_CHA_BUF1_RDY
	.comm	_IPU_CHA_DB_MODE_SEL,4,2        ; @IPU_CHA_DB_MODE_SEL
	.no_dead_strip	_ipu_update_channel_buffer
.subsections_via_symbols
