	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipu_pre_update                 ## -- Begin function ipu_pre_update
	.p2align	4, 0x90
_ipu_pre_update:                        ## @ipu_pre_update
	.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, %r15d
	movq	%rdi, %rbx
	movq	_jiffies@GOTPCREL(%rip), %r12
	movq	(%r12), %r13
	movl	$5, %edi
	callq	_msecs_to_jiffies
	cmpl	%r15d, (%rbx)
	jne	LBB0_1
## %bb.8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rax, %r14
	addq	%r13, %r14
	movq	_IPU_PRE_NEXT_BUF@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	movl	%r15d, %edi
	callq	_writel
	movl	%r15d, (%rbx)
	movq	(%r12), %rdi
	movq	%r14, %rsi
	callq	_time_after
	testq	%rax, %rax
	je	LBB0_2
LBB0_6:
	movl	16(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_warn                       ## TAILCALL
LBB0_2:
	movq	_IPU_PRE_STORE_ENG_STATUS_STORE_BLOCK_Y_SHIFT@GOTPCREL(%rip), %r13
	movq	_IPU_PRE_STORE_ENG_STATUS_STORE_BLOCK_Y_MASK@GOTPCREL(%rip), %r15
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r12), %rdi
	movq	%r14, %rsi
	callq	_time_after
	testq	%rax, %rax
	jne	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	_IPU_PRE_STORE_ENG_STATUS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%rbx), %rdi
	callq	_readl
	movzwl	%ax, %eax
	movzbl	(%r13), %ecx
	shrl	%cl, %eax
	andw	(%r15), %ax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpw	4(%rbx), %ax
	jae	LBB0_5
## %bb.7:
	movq	_IPU_PRE_CTRL_SDW_UPDATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_IPU_PRE_CTRL_SET@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%rbx), %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writel                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_IPU_PRE_NEXT_BUF,8,3           ## @IPU_PRE_NEXT_BUF
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"timeout waiting for PRE safe window\n"

	.comm	_IPU_PRE_STORE_ENG_STATUS,8,3   ## @IPU_PRE_STORE_ENG_STATUS
	.comm	_IPU_PRE_STORE_ENG_STATUS_STORE_BLOCK_Y_SHIFT,2,1 ## @IPU_PRE_STORE_ENG_STATUS_STORE_BLOCK_Y_SHIFT
	.comm	_IPU_PRE_STORE_ENG_STATUS_STORE_BLOCK_Y_MASK,2,1 ## @IPU_PRE_STORE_ENG_STATUS_STORE_BLOCK_Y_MASK
	.comm	_IPU_PRE_CTRL_SDW_UPDATE,4,2    ## @IPU_PRE_CTRL_SDW_UPDATE
	.comm	_IPU_PRE_CTRL_SET,8,3           ## @IPU_PRE_CTRL_SET
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipu_pre_update                 ; -- Begin function ipu_pre_update
	.p2align	2
_ipu_pre_update:                        ; @ipu_pre_update
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x22, _jiffies@GOTPAGE
Lloh1:
	ldr	x22, [x22, _jiffies@GOTPAGEOFF]
	ldr	x20, [x22]
	mov	w0, #5
	bl	_msecs_to_jiffies
	ldr	w8, [x19]
	cmp	w8, w21
	b.ne	LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_2:
	add	x20, x0, x20
	ldr	x8, [x19, #8]
Lloh2:
	adrp	x9, _IPU_PRE_NEXT_BUF@GOTPAGE
Lloh3:
	ldr	x9, [x9, _IPU_PRE_NEXT_BUF@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x21
	bl	_writel
	str	w21, [x19]
	ldr	x0, [x22]
	mov	x1, x20
	bl	_time_after
	cbz	x0, LBB0_4
LBB0_3:
	ldr	w0, [x19, #16]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_dev_warn
LBB0_4:
Lloh7:
	adrp	x21, _IPU_PRE_STORE_ENG_STATUS@GOTPAGE
Lloh8:
	ldr	x21, [x21, _IPU_PRE_STORE_ENG_STATUS@GOTPAGEOFF]
Lloh9:
	adrp	x23, _IPU_PRE_STORE_ENG_STATUS_STORE_BLOCK_Y_SHIFT@GOTPAGE
Lloh10:
	ldr	x23, [x23, _IPU_PRE_STORE_ENG_STATUS_STORE_BLOCK_Y_SHIFT@GOTPAGEOFF]
Lloh11:
	adrp	x24, _IPU_PRE_STORE_ENG_STATUS_STORE_BLOCK_Y_MASK@GOTPAGE
Lloh12:
	ldr	x24, [x24, _IPU_PRE_STORE_ENG_STATUS_STORE_BLOCK_Y_MASK@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x0, [x22]
	mov	x1, x20
	bl	_time_after
	cbnz	x0, LBB0_3
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_readl
	ldrh	w8, [x23]
	lsr	w8, w0, w8
	ldrh	w9, [x24]
	ands	w8, w8, w9
	b.eq	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldrh	w9, [x19, #4]
	cmp	w8, w9
	b.hs	LBB0_5
; %bb.8:
Lloh13:
	adrp	x8, _IPU_PRE_CTRL_SDW_UPDATE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _IPU_PRE_CTRL_SDW_UPDATE@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	ldr	x8, [x19, #8]
Lloh16:
	adrp	x9, _IPU_PRE_CTRL_SET@GOTPAGE
Lloh17:
	ldr	x9, [x9, _IPU_PRE_CTRL_SET@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	add	x1, x9, x8
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_writel
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_IPU_PRE_NEXT_BUF,8,3           ; @IPU_PRE_NEXT_BUF
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"timeout waiting for PRE safe window\n"

	.comm	_IPU_PRE_STORE_ENG_STATUS,8,3   ; @IPU_PRE_STORE_ENG_STATUS
	.comm	_IPU_PRE_STORE_ENG_STATUS_STORE_BLOCK_Y_SHIFT,2,1 ; @IPU_PRE_STORE_ENG_STATUS_STORE_BLOCK_Y_SHIFT
	.comm	_IPU_PRE_STORE_ENG_STATUS_STORE_BLOCK_Y_MASK,2,1 ; @IPU_PRE_STORE_ENG_STATUS_STORE_BLOCK_Y_MASK
	.comm	_IPU_PRE_CTRL_SDW_UPDATE,4,2    ; @IPU_PRE_CTRL_SDW_UPDATE
	.comm	_IPU_PRE_CTRL_SET,8,3           ; @IPU_PRE_CTRL_SET
.subsections_via_symbols
