	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dispmanx_gfx_frame
_dispmanx_gfx_frame:                    ## @dispmanx_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
	xorl	%eax, %eax
	callq	_video_driver_get_aspect_ratio
	testq	%r14, %r14
	je	LBB0_15
## %bb.1:
	cmpl	%r13d, (%rbx)
	jne	LBB0_4
## %bb.2:
	cmpl	%r12d, 4(%rbx)
	jne	LBB0_4
## %bb.3:
	movss	8(%rbx), %xmm1                  ## xmm1 = mem[0],zero,zero,zero
	ucomiss	%xmm0, %xmm1
	jne	LBB0_4
	jnp	LBB0_14
LBB0_4:
	testl	%r13d, %r13d
	je	LBB0_15
## %bb.5:
	testl	%r12d, %r12d
	je	LBB0_15
## %bb.6:
	movl	%r13d, (%rbx)
	movl	%r12d, 4(%rbx)
	movl	%r15d, 12(%rbx)
	movss	%xmm0, 8(%rbx)
	leaq	16(%rbx), %rax
	cmpq	$0, 16(%rbx)
	je	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	movq	%rax, %rsi
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	callq	_dispmanx_surface_free
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movss	8(%rbx), %xmm0                  ## xmm0 = mem[0],zero,zero,zero
LBB0_8:
	movq	24(%rbp), %rdx
	xorl	%r8d, %r8d
	cmpq	$0, 40(%rbx)
	setne	%r8b
	jne	LBB0_9
## %bb.10:
	movq	_VC_IMAGE_RGB565@GOTPCREL(%rip), %rcx
	jmp	LBB0_11
LBB0_9:
	movq	_VC_IMAGE_XRGB8888@GOTPCREL(%rip), %rcx
LBB0_11:
	shll	$4, %r8d
	addl	$16, %r8d
	movl	(%rcx), %r9d
	movl	(%rdx), %r10d
	movq	%rbx, %rdi
	movl	%r13d, %esi
	movl	%r12d, %edx
	movl	%r15d, %ecx
	pushq	%rax
	pushq	$0
	pushq	%r10
	pushq	$255
	callq	_dispmanx_surface_setup
	addq	$32, %rsp
	cmpq	$0, 32(%rbx)
	je	LBB0_14
## %bb.12:
	cmpq	$0, 24(%rbx)
	je	LBB0_14
## %bb.13:
	leaq	24(%rbx), %rsi
	movq	%rbx, %rdi
	callq	_dispmanx_surface_free
LBB0_14:
	movq	16(%rbx), %rdx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_dispmanx_surface_update
LBB0_15:
	movl	$1, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VC_IMAGE_XRGB8888,4,2          ## @VC_IMAGE_XRGB8888
	.comm	_VC_IMAGE_RGB565,4,2            ## @VC_IMAGE_RGB565
	.no_dead_strip	_dispmanx_gfx_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dispmanx_gfx_frame
_dispmanx_gfx_frame:                    ; @dispmanx_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	x24, x7
	mov	x21, x5
	mov	x22, x3
	mov	x23, x2
	mov	x19, x1
	mov	x20, x0
	bl	_video_driver_get_aspect_ratio
	cbz	x19, LBB0_12
; %bb.1:
	ldr	w8, [x20]
	cmp	w8, w23
	b.ne	LBB0_4
; %bb.2:
	ldr	w8, [x20, #4]
	cmp	w8, w22
	b.ne	LBB0_4
; %bb.3:
	ldr	s1, [x20, #8]
	fcmp	s1, s0
	b.eq	LBB0_11
LBB0_4:
	cbz	w23, LBB0_12
; %bb.5:
	cbz	w22, LBB0_12
; %bb.6:
	stp	w23, w22, [x20]
	str	w21, [x20, #12]
	str	s0, [x20, #8]
	mov	x25, x20
	ldr	x8, [x25, #16]!
	cbz	x8, LBB0_8
; %bb.7:
	mov	x0, x20
	mov	x1, x25
	bl	_dispmanx_surface_free
	ldr	s0, [x20, #8]
LBB0_8:
	ldr	x8, [x20, #40]
	mov	w9, #32
Lloh0:
	adrp	x10, _VC_IMAGE_XRGB8888@GOTPAGE
Lloh1:
	ldr	x10, [x10, _VC_IMAGE_XRGB8888@GOTPAGEOFF]
Lloh2:
	adrp	x11, _VC_IMAGE_RGB565@GOTPAGE
Lloh3:
	ldr	x11, [x11, _VC_IMAGE_RGB565@GOTPAGEOFF]
	mov	w12, #16
	cmp	x8, #0
	csel	x8, x11, x10, eq
	csel	w4, w12, w9, eq
	ldr	w5, [x8]
	ldr	w7, [x24]
	str	x25, [sp, #8]
	str	wzr, [sp]
	mov	x0, x20
	mov	x1, x23
	mov	x2, x22
	mov	x3, x21
	mov	w6, #255
	bl	_dispmanx_surface_setup
	ldr	x8, [x20, #32]
	cbz	x8, LBB0_11
; %bb.9:
	mov	x1, x20
	ldr	x8, [x1, #24]!
	cbz	x8, LBB0_11
; %bb.10:
	mov	x0, x20
	bl	_dispmanx_surface_free
LBB0_11:
	ldr	x2, [x20, #16]
	mov	x0, x20
	mov	x1, x19
	bl	_dispmanx_surface_update
LBB0_12:
	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	_VC_IMAGE_XRGB8888,4,2          ; @VC_IMAGE_XRGB8888
	.comm	_VC_IMAGE_RGB565,4,2            ; @VC_IMAGE_RGB565
	.no_dead_strip	_dispmanx_gfx_frame
.subsections_via_symbols
