	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rs600_page_flip                ## -- Begin function rs600_page_flip
	.p2align	4, 0x90
_rs600_page_flip:                       ## @rs600_page_flip
	.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	%ecx, %ebx
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r12
	movq	8(%rdi), %rax
	movslq	%esi, %rcx
	movq	(%rax,%rcx,8), %r15
	movq	_AVIVO_D1GRPH_UPDATE@GOTPCREL(%rip), %r13
	movq	(%r15), %rdi
	addq	(%r13), %rdi
	callq	_RREG32
	movl	%eax, %r14d
	movq	_AVIVO_D1GRPH_UPDATE_LOCK@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	movq	(%r15), %rdi
	addq	(%r13), %rdi
	movl	%r14d, %esi
	callq	_WREG32
	movq	_AVIVO_D1GRPH_FLIP_CONTROL@GOTPCREL(%rip), %rax
	movq	(%r15), %rdi
	addq	(%rax), %rdi
	testl	%ebx, %ebx
	je	LBB0_2
## %bb.1:
	movq	_AVIVO_D1GRPH_SURFACE_UPDATE_H_RETRACE_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_2:
	movl	%ebx, %esi
	callq	_WREG32
	movq	_AVIVO_D1GRPH_SECONDARY_SURFACE_ADDRESS@GOTPCREL(%rip), %rax
	movq	(%r15), %rdi
	addq	(%rax), %rdi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movl	%ebx, %esi
	callq	_WREG32
	movq	_AVIVO_D1GRPH_PRIMARY_SURFACE_ADDRESS@GOTPCREL(%rip), %rax
	movq	(%r15), %rdi
	addq	(%rax), %rdi
	movl	%ebx, %esi
	callq	_WREG32
	cmpl	$0, (%r12)
	jle	LBB0_6
## %bb.3:
	xorl	%ebx, %ebx
	movq	_AVIVO_D1GRPH_SURFACE_UPDATE_PENDING@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rdi
	movq	_AVIVO_D1GRPH_UPDATE@GOTPCREL(%rip), %rax
	addq	(%rax), %rdi
	callq	_RREG32
	testl	%eax, (%r13)
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	$1, %edi
	callq	_udelay
	incl	%ebx
	cmpl	(%r12), %ebx
	jl	LBB0_4
LBB0_6:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG
	movq	_AVIVO_D1GRPH_UPDATE_LOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %r14d
	movq	(%r15), %rdi
	movq	_AVIVO_D1GRPH_UPDATE@GOTPCREL(%rip), %rax
	addq	(%rax), %rdi
	movl	%r14d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_WREG32                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AVIVO_D1GRPH_UPDATE,8,3        ## @AVIVO_D1GRPH_UPDATE
	.comm	_AVIVO_D1GRPH_UPDATE_LOCK,4,2   ## @AVIVO_D1GRPH_UPDATE_LOCK
	.comm	_AVIVO_D1GRPH_FLIP_CONTROL,8,3  ## @AVIVO_D1GRPH_FLIP_CONTROL
	.comm	_AVIVO_D1GRPH_SURFACE_UPDATE_H_RETRACE_EN,4,2 ## @AVIVO_D1GRPH_SURFACE_UPDATE_H_RETRACE_EN
	.comm	_AVIVO_D1GRPH_SECONDARY_SURFACE_ADDRESS,8,3 ## @AVIVO_D1GRPH_SECONDARY_SURFACE_ADDRESS
	.comm	_AVIVO_D1GRPH_PRIMARY_SURFACE_ADDRESS,8,3 ## @AVIVO_D1GRPH_PRIMARY_SURFACE_ADDRESS
	.comm	_AVIVO_D1GRPH_SURFACE_UPDATE_PENDING,4,2 ## @AVIVO_D1GRPH_SURFACE_UPDATE_PENDING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Update pending now high. Unlocking vupdate_lock.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rs600_page_flip                ; -- Begin function rs600_page_flip
	.p2align	2
_rs600_page_flip:                       ; @rs600_page_flip
	.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	x21, x3
	mov	x22, x2
	mov	x19, x0
	ldr	x8, [x0, #8]
	ldr	x23, [x8, w1, sxtw #3]
Lloh0:
	adrp	x24, _AVIVO_D1GRPH_UPDATE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _AVIVO_D1GRPH_UPDATE@GOTPAGEOFF]
	ldr	x8, [x24]
	ldr	x9, [x23]
	add	x0, x9, x8
	bl	_RREG32
Lloh2:
	adrp	x25, _AVIVO_D1GRPH_UPDATE_LOCK@GOTPAGE
Lloh3:
	ldr	x25, [x25, _AVIVO_D1GRPH_UPDATE_LOCK@GOTPAGEOFF]
	ldr	w8, [x25]
	orr	w20, w8, w0
	ldr	x8, [x24]
	ldr	x9, [x23]
	add	x0, x9, x8
	mov	x1, x20
	bl	_WREG32
Lloh4:
	adrp	x8, _AVIVO_D1GRPH_FLIP_CONTROL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _AVIVO_D1GRPH_FLIP_CONTROL@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	ldr	x9, [x23]
	add	x0, x9, x8
Lloh7:
	adrp	x8, _AVIVO_D1GRPH_SURFACE_UPDATE_H_RETRACE_EN@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AVIVO_D1GRPH_SURFACE_UPDATE_H_RETRACE_EN@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	cmp	w21, #0
	csel	w1, wzr, w8, eq
	bl	_WREG32
Lloh10:
	adrp	x8, _AVIVO_D1GRPH_SECONDARY_SURFACE_ADDRESS@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AVIVO_D1GRPH_SECONDARY_SURFACE_ADDRESS@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	ldr	x9, [x23]
	add	x0, x9, x8
	mov	x1, x22
	bl	_WREG32
Lloh13:
	adrp	x8, _AVIVO_D1GRPH_PRIMARY_SURFACE_ADDRESS@GOTPAGE
Lloh14:
	ldr	x8, [x8, _AVIVO_D1GRPH_PRIMARY_SURFACE_ADDRESS@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	ldr	x9, [x23]
	add	x0, x9, x8
	mov	x1, x22
	bl	_WREG32
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	w21, #0
Lloh16:
	adrp	x22, _AVIVO_D1GRPH_SURFACE_UPDATE_PENDING@GOTPAGE
Lloh17:
	ldr	x22, [x22, _AVIVO_D1GRPH_SURFACE_UPDATE_PENDING@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	ldr	x9, [x23]
	add	x0, x9, x8
	bl	_RREG32
	ldr	w8, [x22]
	tst	w8, w0
	b.ne	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #1
	bl	_udelay
	add	w21, w21, #1
	ldr	w8, [x19]
	cmp	w21, w8
	b.lt	LBB0_2
LBB0_4:
Lloh18:
	adrp	x0, l_.str@PAGE
Lloh19:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG
	ldr	w8, [x25]
	bic	w1, w20, w8
	ldr	x8, [x24]
	ldr	x9, [x23]
	add	x0, x9, x8
	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
	b	_WREG32
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_AVIVO_D1GRPH_UPDATE,8,3        ; @AVIVO_D1GRPH_UPDATE
	.comm	_AVIVO_D1GRPH_UPDATE_LOCK,4,2   ; @AVIVO_D1GRPH_UPDATE_LOCK
	.comm	_AVIVO_D1GRPH_FLIP_CONTROL,8,3  ; @AVIVO_D1GRPH_FLIP_CONTROL
	.comm	_AVIVO_D1GRPH_SURFACE_UPDATE_H_RETRACE_EN,4,2 ; @AVIVO_D1GRPH_SURFACE_UPDATE_H_RETRACE_EN
	.comm	_AVIVO_D1GRPH_SECONDARY_SURFACE_ADDRESS,8,3 ; @AVIVO_D1GRPH_SECONDARY_SURFACE_ADDRESS
	.comm	_AVIVO_D1GRPH_PRIMARY_SURFACE_ADDRESS,8,3 ; @AVIVO_D1GRPH_PRIMARY_SURFACE_ADDRESS
	.comm	_AVIVO_D1GRPH_SURFACE_UPDATE_PENDING,4,2 ; @AVIVO_D1GRPH_SURFACE_UPDATE_PENDING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Update pending now high. Unlocking vupdate_lock.\n"

.subsections_via_symbols
