	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function drm_page_flip
_drm_page_flip:                         ## @drm_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	xorl	%eax, %eax
	callq	_drmModeAtomicAlloc
	movq	%rax, _drm_page_flip.req(%rip)
	movq	_drm@GOTPCREL(%rip), %r14
	movl	4(%r14), %edx
	movl	8(%r14), %esi
	movq	(%rbx), %rcx
	movq	8(%rbx), %rdi
	movl	(%rdi,%rcx,4), %ecx
	movq	%rax, %rdi
	callq	_drmModeAtomicAddProperty
	testl	%eax, %eax
	jns	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_RARCH_ERR
LBB0_2:
	movl	(%r14), %edi
	movq	_drm_page_flip.req(%rip), %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_drmModeAtomicCommit
	testl	%eax, %eax
	jns	LBB0_4
## %bb.3:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_RARCH_ERR
LBB0_4:
	xorl	%eax, %eax
	cmpq	$0, (%rbx)
	sete	%al
	movq	%rax, (%rbx)
	movq	_drm_page_flip.req(%rip), %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_drmModeAtomicFree              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_drm_page_flip.req,8,3 ## @drm_page_flip.req
	.comm	_drm,12,2                       ## @drm
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DRM: failed to add atomic property for pageflip\n"

L_.str.1:                               ## @.str.1
	.asciz	"DRM: failed to commit for pageflip: %s\n"

	.comm	_errno,4,2                      ## @errno
	.no_dead_strip	_drm_page_flip
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function drm_page_flip
_drm_page_flip:                         ; @drm_page_flip
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	bl	_drmModeAtomicAlloc
	adrp	x20, _drm_page_flip.req@PAGE
	str	x0, [x20, _drm_page_flip.req@PAGEOFF]
Lloh0:
	adrp	x21, _drm@GOTPAGE
Lloh1:
	ldr	x21, [x21, _drm@GOTPAGEOFF]
	ldp	w2, w1, [x21, #4]
	ldp	x9, x8, [x19]
	ldr	w3, [x8, x9, lsl #2]
	bl	_drmModeAtomicAddProperty
	tbz	w0, #31, LBB0_2
; %bb.1:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_RARCH_ERR
LBB0_2:
	ldr	w0, [x21]
	ldr	x1, [x20, _drm_page_flip.req@PAGEOFF]
	mov	w2, #0
	mov	x3, #0
	bl	_drmModeAtomicCommit
	tbz	w0, #31, LBB0_4
; %bb.3:
Lloh4:
	adrp	x8, _errno@GOTPAGE
Lloh5:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_RARCH_ERR
LBB0_4:
	ldr	x8, [x19]
	cmp	x8, #0
	cset	w8, eq
	str	x8, [x19]
	ldr	x0, [x20, _drm_page_flip.req@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
	add	sp, sp, #64
	b	_drmModeAtomicFree
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_drm_page_flip.req,8,3 ; @drm_page_flip.req
	.comm	_drm,12,2                       ; @drm
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DRM: failed to add atomic property for pageflip\n"

l_.str.1:                               ; @.str.1
	.asciz	"DRM: failed to commit for pageflip: %s\n"

	.comm	_errno,4,2                      ; @errno
	.no_dead_strip	_drm_page_flip
.subsections_via_symbols
