	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gfx_ctx_drm_queue_flip
_gfx_ctx_drm_queue_flip:                ## @gfx_ctx_drm_queue_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_g_gbm_surface@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_gbm_surface_lock_front_buffer
	movq	_g_next_bo@GOTPCREL(%rip), %rbx
	movl	%eax, (%rbx)
	movl	%eax, %edi
	callq	_gbm_bo_get_user_data
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movl	(%rbx), %edi
	callq	_drm_fb_get_from_bo
LBB0_2:
	movq	_g_drm_fd@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	_g_crtc_id@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	(%rax), %edx
	movq	_DRM_MODE_PAGE_FLIP_EVENT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_waiting_for_flip@GOTPCREL(%rip), %r8
	callq	_drmModePageFlip
	xorl	%ecx, %ecx
	testq	%rax, %rax
	sete	%cl
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_g_gbm_surface,4,2              ## @g_gbm_surface
	.comm	_g_next_bo,4,2                  ## @g_next_bo
	.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
	.comm	_waiting_for_flip,4,2           ## @waiting_for_flip
	.no_dead_strip	_gfx_ctx_drm_queue_flip
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gfx_ctx_drm_queue_flip
_gfx_ctx_drm_queue_flip:                ; @gfx_ctx_drm_queue_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
Lloh0:
	adrp	x8, _g_gbm_surface@GOTPAGE
Lloh1:
	ldr	x8, [x8, _g_gbm_surface@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_gbm_surface_lock_front_buffer
Lloh3:
	adrp	x19, _g_next_bo@GOTPAGE
Lloh4:
	ldr	x19, [x19, _g_next_bo@GOTPAGEOFF]
	str	w0, [x19]
	bl	_gbm_bo_get_user_data
	cbnz	x0, LBB0_2
; %bb.1:
	ldr	w0, [x19]
	bl	_drm_fb_get_from_bo
LBB0_2:
Lloh5:
	adrp	x8, _g_drm_fd@GOTPAGE
Lloh6:
	ldr	x8, [x8, _g_drm_fd@GOTPAGEOFF]
Lloh7:
	adrp	x9, _g_crtc_id@GOTPAGE
Lloh8:
	ldr	x9, [x9, _g_crtc_id@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	ldr	w1, [x9]
	ldr	w2, [x0]
Lloh11:
	adrp	x9, _DRM_MODE_PAGE_FLIP_EVENT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _DRM_MODE_PAGE_FLIP_EVENT@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x9]
Lloh14:
	adrp	x4, _waiting_for_flip@GOTPAGE
Lloh15:
	ldr	x4, [x4, _waiting_for_flip@GOTPAGEOFF]
	mov	x0, x8
	bl	_drmModePageFlip
	cmp	x0, #0
	cset	w0, eq
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_g_gbm_surface,4,2              ; @g_gbm_surface
	.comm	_g_next_bo,4,2                  ; @g_next_bo
	.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
	.comm	_waiting_for_flip,4,2           ; @waiting_for_flip
	.no_dead_strip	_gfx_ctx_drm_queue_flip
.subsections_via_symbols
