	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function exynos_flip
_exynos_flip:                           ## @exynos_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	cmpq	$0, (%rdi)
	jle	LBB0_2
## %bb.1:
	movl	$-1, %edi
	callq	_drm_wait_flip
LBB0_2:
	movq	_g_drm_fd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_g_crtc_id@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rbx), %edx
	movq	_DRM_MODE_PAGE_FLIP_EVENT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %r8
	callq	_drmModePageFlip
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rdi
	callq	_RARCH_ERR
	movl	$-1, %ebx
	jmp	LBB0_6
LBB0_4:
	incq	(%r14)
	xorl	%ebx, %ebx
	cmpl	$0, 8(%r14)
	jne	LBB0_6
## %bb.5:
	movl	$-1, %edi
	callq	_drm_wait_flip
LBB0_6:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_g_drm_fd,4,2                   ## @g_drm_fd
	.comm	_g_crtc_id,4,2                  ## @g_crtc_id
	.comm	_DRM_MODE_PAGE_FLIP_EVENT,4,2   ## @DRM_MODE_PAGE_FLIP_EVENT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[video_exynos]: failed to issue page flip\n"

	.no_dead_strip	_exynos_flip
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function exynos_flip
_exynos_flip:                           ; @exynos_flip
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0]
	cmp	x8, #1
	b.lt	LBB0_2
; %bb.1:
	mov	w0, #-1
	bl	_drm_wait_flip
LBB0_2:
Lloh0:
	adrp	x8, _g_drm_fd@GOTPAGE
Lloh1:
	ldr	x8, [x8, _g_drm_fd@GOTPAGEOFF]
Lloh2:
	adrp	x9, _g_crtc_id@GOTPAGE
Lloh3:
	ldr	x9, [x9, _g_crtc_id@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	ldr	w1, [x9]
	ldr	w2, [x20]
Lloh6:
	adrp	x8, _DRM_MODE_PAGE_FLIP_EVENT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DRM_MODE_PAGE_FLIP_EVENT@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	x4, x20
	bl	_drmModePageFlip
	cbz	x0, LBB0_4
; %bb.3:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_RARCH_ERR
	mov	w0, #-1
	b	LBB0_7
LBB0_4:
	ldr	x8, [x19]
	add	x8, x8, #1
	str	x8, [x19]
	ldr	w8, [x19, #8]
	cbnz	w8, LBB0_6
; %bb.5:
	mov	w0, #-1
	bl	_drm_wait_flip
LBB0_6:
	mov	w0, #0
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_g_drm_fd,4,2                   ; @g_drm_fd
	.comm	_g_crtc_id,4,2                  ; @g_crtc_id
	.comm	_DRM_MODE_PAGE_FLIP_EVENT,4,2   ; @DRM_MODE_PAGE_FLIP_EVENT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[video_exynos]: failed to issue page flip\n"

	.no_dead_strip	_exynos_flip
.subsections_via_symbols
