	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipu_prg_get_pre
_ipu_prg_get_pre:                       ## @ipu_prg_get_pre
	.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	%esi, %r13d
	movq	%rdi, %r14
	movq	24(%rdi), %rax
	testl	%esi, %esi
	je	LBB0_4
## %bb.1:
	movl	4(%rax), %edi
	callq	_ipu_pre_get
	testl	%eax, %eax
	je	LBB0_6
## %bb.2:
	movq	24(%r14), %rax
	movl	8(%rax), %edi
	callq	_ipu_pre_get
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_5
## %bb.3:
	movl	$2, %eax
	movl	$14, %ecx
	movl	$12, %r15d
	jmp	LBB0_7
LBB0_4:
	movl	(%rax), %edi
	callq	_ipu_pre_get
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_10
LBB0_5:
	movl	4(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r13d, %edx
	callq	_dev_err
	jmp	LBB0_12
LBB0_6:
	movl	$1, %eax
	movl	$12, %ecx
	movl	$14, %r15d
LBB0_7:
	movq	16(%r14), %rdx
	movslq	%r13d, %rsi
	movl	%eax, (%rdx,%rsi,4)
	movl	(%r14), %eax
	movl	8(%r14), %edi
	addl	%eax, %eax
	decl	%r13d
	orl	%eax, %r13d
	movq	_IOMUXC_GPR5@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	$3, %edx
	shll	%cl, %edx
	movl	$3, %r12d
	movl	%r13d, %eax
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	movl	%eax, %ecx
	callq	_regmap_update_bits
	movl	8(%r14), %edi
	movl	(%rbx), %esi
	leaq	-44(%rbp), %rdx
	callq	_regmap_read
	movl	-44(%rbp), %eax
	movl	%r15d, %ecx
	sarl	%cl, %eax
	andl	$3, %eax
	cmpl	%r13d, %eax
	jne	LBB0_11
## %bb.8:
	movl	8(%r14), %edi
	movl	(%rbx), %esi
	movl	%r15d, %ecx
	shll	%cl, %r12d
	xorl	$1, %r13d
	shll	%cl, %r13d
	movl	%r12d, %edx
	movl	%r13d, %ecx
	callq	_regmap_update_bits
	jmp	LBB0_11
LBB0_10:
	movq	16(%r14), %rax
	movl	$0, (%rax)
LBB0_11:
	xorl	%ebx, %ebx
LBB0_12:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IOMUXC_GPR5,4,2                ## @IOMUXC_GPR5
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not get PRE for PRG chan %d"

	.no_dead_strip	_ipu_prg_get_pre
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ipu_prg_get_pre
_ipu_prg_get_pre:                       ; @ipu_prg_get_pre
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0, #24]
	cbz	w1, LBB0_4
; %bb.1:
	ldr	w0, [x8, #4]
	bl	_ipu_pre_get
	cbz	w0, LBB0_6
; %bb.2:
	ldr	x8, [x19, #24]
	ldr	w0, [x8, #8]
	bl	_ipu_pre_get
	mov	x21, x0
	cbnz	w0, LBB0_5
; %bb.3:
	mov	w9, #2
	mov	w8, #14
	mov	w21, #12
	b	LBB0_7
LBB0_4:
	ldr	w0, [x8]
	bl	_ipu_pre_get
	mov	x21, x0
	cbz	w0, LBB0_10
LBB0_5:
	ldr	w0, [x19, #4]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_err
	b	LBB0_11
LBB0_6:
	mov	w9, #1
	mov	w8, #12
	mov	w21, #14
LBB0_7:
	ldr	x10, [x19, #16]
	str	w9, [x10, w20, sxtw #2]
	ldr	w9, [x19]
	sub	w10, w20, #1
	orr	w20, w10, w9, lsl #1
	ldr	w0, [x19, #8]
Lloh2:
	adrp	x22, _IOMUXC_GPR5@GOTPAGE
Lloh3:
	ldr	x22, [x22, _IOMUXC_GPR5@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	w23, #3
	lsl	w2, w23, w8
	lsl	w3, w20, w8
	bl	_regmap_update_bits
	ldr	w0, [x19, #8]
	ldr	w1, [x22]
	add	x2, sp, #12
	bl	_regmap_read
	ldr	w8, [sp, #12]
	asr	w8, w8, w21
	and	w8, w8, #0x3
	cmp	w8, w20
	b.ne	LBB0_9
; %bb.8:
	ldr	w0, [x19, #8]
	ldr	w1, [x22]
	lsl	w2, w23, w21
	eor	w8, w20, #0x1
	lsl	w3, w8, w21
	bl	_regmap_update_bits
LBB0_9:
	mov	w21, #0
	b	LBB0_11
LBB0_10:
	ldr	x8, [x19, #16]
	str	wzr, [x8]
LBB0_11:
	mov	x0, x21
	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
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_IOMUXC_GPR5,4,2                ; @IOMUXC_GPR5
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not get PRE for PRG chan %d"

	.no_dead_strip	_ipu_prg_get_pre
.subsections_via_symbols
