	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipu_config_wave_gen_1
_ipu_config_wave_gen_1:                 ## @ipu_config_wave_gen_1
	.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	%r8d, %r13d
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
                                        ## kill: def $edx killed $edx def $rdx
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	movl	40(%rbp), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movl	16(%rbp), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	24(%rbp), %r15d
	testl	%esi, %esi
	movq	_IPU_DI1_SW_GEN1_1@GOTPCREL(%rip), %rax
	cmoveq	_IPU_DI0_SW_GEN1_1@GOTPCREL(%rip), %rax
	movq	_IPU_DI1_STP_REP@GOTPCREL(%rip), %rcx
	cmoveq	_IPU_DI0_STP_REP@GOTPCREL(%rip), %rcx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	leal	-1(%rdx), %r12d
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	leal	-4(,%rdx,4), %ebx
	addl	(%rax), %ebx
	movl	%r9d, %edi
	callq	_DI_CNT_POLARITY_GEN_EN
	movl	%eax, %r14d
	movl	%r13d, %edi
	callq	_DI_CNT_CLR_SEL
	movl	%eax, %r13d
	movl	%r15d, %edi
	callq	_DI_CNT_POLARITY_TRIGGER_SEL
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	callq	_DI_CNT_POLARITY_CLR_SEL
	movl	%eax, %r15d
	movl	-56(%rbp), %edi                 ## 4-byte Reload
	callq	_DI_CNT_DOWN
	xorl	%ecx, %ecx
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_2
## %bb.1:
	movq	_DI_CNT_AUTO_RELOAD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_2:
	orl	32(%rbp), %r14d
	orl	-48(%rbp), %r13d                ## 4-byte Folded Reload
	orl	%r14d, %r13d
	orl	%eax, %r15d
	orl	%r13d, %r15d
	orl	%ecx, %r15d
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%r15d, %edx
	callq	_IPU_WRITE4
	shrl	$31, %r12d
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	leal	(%r15,%r12), %ebx
	decl	%ebx
	addl	%ebx, %ebx
	andl	$-4, %ebx
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	addl	(%rax), %ebx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_IPU_READ4
	testb	$1, %r15b
	jne	LBB0_3
## %bb.4:
	movzwl	%ax, %eax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	shll	$16, %ecx
	orl	%eax, %ecx
	movl	%ecx, %eax
	jmp	LBB0_5
LBB0_3:
	andl	$-65536, %eax                   ## imm = 0xFFFF0000
	orl	-44(%rbp), %eax                 ## 4-byte Folded Reload
LBB0_5:
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_IPU_WRITE4                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_IPU_DI1_SW_GEN1_1,4,2          ## @IPU_DI1_SW_GEN1_1
	.comm	_IPU_DI0_SW_GEN1_1,4,2          ## @IPU_DI0_SW_GEN1_1
	.comm	_DI_CNT_AUTO_RELOAD,4,2         ## @DI_CNT_AUTO_RELOAD
	.comm	_IPU_DI1_STP_REP,4,2            ## @IPU_DI1_STP_REP
	.comm	_IPU_DI0_STP_REP,4,2            ## @IPU_DI0_STP_REP
	.no_dead_strip	_ipu_config_wave_gen_1
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ipu_config_wave_gen_1
_ipu_config_wave_gen_1:                 ; @ipu_config_wave_gen_1
	.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	x22, x7
	mov	x23, x6
	mov	x24, x4
	mov	x21, x3
	mov	x20, x2
	mov	x19, x0
Lloh0:
	adrp	x8, _IPU_DI1_SW_GEN1_1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IPU_DI1_SW_GEN1_1@GOTPAGEOFF]
Lloh2:
	adrp	x9, _IPU_DI0_SW_GEN1_1@GOTPAGE
Lloh3:
	ldr	x9, [x9, _IPU_DI0_SW_GEN1_1@GOTPAGEOFF]
	ldp	w28, w25, [x29, #16]
	sub	w26, w2, #1
	cmp	w1, #0
	csel	x8, x9, x8, eq
	ldr	w8, [x8]
	add	w8, w8, w26, lsl #2
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
Lloh4:
	adrp	x8, _IPU_DI1_STP_REP@GOTPAGE
Lloh5:
	ldr	x8, [x8, _IPU_DI1_STP_REP@GOTPAGEOFF]
Lloh6:
	adrp	x9, _IPU_DI0_STP_REP@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IPU_DI0_STP_REP@GOTPAGEOFF]
	csel	x8, x9, x8, eq
	str	x8, [sp]                        ; 8-byte Folded Spill
	mov	x0, x5
	bl	_DI_CNT_POLARITY_GEN_EN
	mov	x27, x0
	mov	x0, x24
	bl	_DI_CNT_CLR_SEL
	mov	x24, x0
	mov	x0, x22
	bl	_DI_CNT_POLARITY_TRIGGER_SEL
	mov	x22, x0
	mov	x0, x23
	bl	_DI_CNT_POLARITY_CLR_SEL
	mov	x23, x0
	mov	x0, x25
	bl	_DI_CNT_DOWN
Lloh8:
	adrp	x8, _DI_CNT_AUTO_RELOAD@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DI_CNT_AUTO_RELOAD@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w21, #0
	csel	w8, w8, wzr, eq
	orr	w9, w27, w28
	orr	w9, w9, w24
	orr	w9, w9, w22
	orr	w9, w9, w23
	orr	w9, w9, w0
	orr	w2, w9, w8
	mov	x0, x19
	ldr	w1, [sp, #12]                   ; 4-byte Folded Reload
	bl	_IPU_WRITE4
	ldr	x8, [sp]                        ; 8-byte Folded Reload
	ldr	w8, [x8]
	cmp	w26, #0
	csel	w9, w20, w26, lt
	lsl	w9, w9, #1
	and	w9, w9, #0xfffffffc
	add	w22, w8, w9
	mov	x0, x19
	mov	x1, x22
	bl	_IPU_READ4
	and	w8, w0, #0xffff0000
	bfi	w0, w21, #16, #16
	orr	w8, w8, w21
	tst	w20, #0x1
	csel	w2, w0, w8, eq
	mov	x0, x19
	mov	x1, x22
	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
	b	_IPU_WRITE4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_IPU_DI1_SW_GEN1_1,4,2          ; @IPU_DI1_SW_GEN1_1
	.comm	_IPU_DI0_SW_GEN1_1,4,2          ; @IPU_DI0_SW_GEN1_1
	.comm	_DI_CNT_AUTO_RELOAD,4,2         ; @DI_CNT_AUTO_RELOAD
	.comm	_IPU_DI1_STP_REP,4,2            ; @IPU_DI1_STP_REP
	.comm	_IPU_DI0_STP_REP,4,2            ; @IPU_DI0_STP_REP
	.no_dead_strip	_ipu_config_wave_gen_1
.subsections_via_symbols
