	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function drm_gfx_frame
_drm_gfx_frame:                         ## @drm_gfx_frame
	.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	%r9d, %r15d
	movl	%ecx, %r12d
	movl	%edx, %r13d
	movq	%rsi, %r14
	movq	%rdi, %rbx
	cmpl	%edx, (%rdi)
	jne	LBB0_2
## %bb.1:
	cmpl	%r12d, 4(%rbx)
	je	LBB0_10
LBB0_2:
	testl	%r13d, %r13d
	je	LBB0_11
## %bb.3:
	testl	%r12d, %r12d
	je	LBB0_11
## %bb.4:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movl	%r13d, (%rbx)
	movl	%r12d, 4(%rbx)
	movl	%r15d, 8(%rbx)
	leaq	16(%rbx), %r14
	cmpq	$0, 16(%rbx)
	je	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_drm_surface_free
LBB0_6:
	xorl	%eax, %eax
	cmpq	$0, 32(%rbx)
	setne	%al
	leal	2(%rax,%rax), %r8d
	jne	LBB0_7
## %bb.8:
	movq	_DRM_FORMAT_RGB565@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	movq	_DRM_FORMAT_XRGB8888@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %r9d
	movl	24(%rbx), %eax
	subq	$8, %rsp
	movq	%rbx, %rdi
	movl	%r13d, %esi
	movl	%r12d, %edx
	movl	%r15d, %ecx
	pushq	%r14
	pushq	$0
	pushq	$3
	pushq	%rax
	pushq	$255
	callq	_drm_surface_setup
	addq	$48, %rsp
	movq	16(%rbx), %rdi
	callq	_drm_plane_setup
	movq	-48(%rbp), %r14                 ## 8-byte Reload
LBB0_10:
	movq	24(%rbp), %rsi
	movl	(%rsi), %edi
	callq	*8(%rsi)
	movq	16(%rbx), %rdx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_drm_surface_update
LBB0_11:
	movl	$1, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DRM_FORMAT_XRGB8888,4,2        ## @DRM_FORMAT_XRGB8888
	.comm	_DRM_FORMAT_RGB565,4,2          ## @DRM_FORMAT_RGB565
	.no_dead_strip	_drm_gfx_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function drm_gfx_frame
_drm_gfx_frame:                         ; @drm_gfx_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x7
	mov	x22, x5
	mov	x23, x3
	mov	x24, x2
	mov	x19, x1
	mov	x20, x0
	ldr	w8, [x0]
	cmp	w8, w2
	b.ne	LBB0_2
; %bb.1:
	ldr	w8, [x20, #4]
	cmp	w8, w23
	b.eq	LBB0_7
LBB0_2:
	cbz	w24, LBB0_8
; %bb.3:
	cbz	w23, LBB0_8
; %bb.4:
	stp	w24, w23, [x20]
	str	w22, [x20, #8]
	mov	x25, x20
	ldr	x8, [x25, #16]!
	cbz	x8, LBB0_6
; %bb.5:
	mov	x0, x20
	mov	x1, x25
	bl	_drm_surface_free
LBB0_6:
	ldr	x8, [x20, #32]
	mov	w9, #4
Lloh0:
	adrp	x10, _DRM_FORMAT_XRGB8888@GOTPAGE
Lloh1:
	ldr	x10, [x10, _DRM_FORMAT_XRGB8888@GOTPAGEOFF]
Lloh2:
	adrp	x11, _DRM_FORMAT_RGB565@GOTPAGE
Lloh3:
	ldr	x11, [x11, _DRM_FORMAT_RGB565@GOTPAGEOFF]
	mov	w12, #2
	cmp	x8, #0
	csel	x8, x11, x10, eq
	csel	w4, w12, w9, eq
	ldr	w5, [x8]
	ldr	w7, [x20, #24]
	mov	w8, #3
	stp	x8, x25, [sp]
	mov	x0, x20
	mov	x1, x24
	mov	x2, x23
	mov	x3, x22
	mov	w6, #255
	bl	_drm_surface_setup
	ldr	x0, [x20, #16]
	bl	_drm_plane_setup
LBB0_7:
	ldr	x8, [x21, #8]
	ldr	w0, [x21]
	mov	x1, x21
	blr	x8
	ldr	x2, [x20, #16]
	mov	x0, x20
	mov	x1, x19
	bl	_drm_surface_update
LBB0_8:
	mov	w0, #1
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_DRM_FORMAT_XRGB8888,4,2        ; @DRM_FORMAT_XRGB8888
	.comm	_DRM_FORMAT_RGB565,4,2          ; @DRM_FORMAT_RGB565
	.no_dead_strip	_drm_gfx_frame
.subsections_via_symbols
