	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PpcVideoCopyOffScreenBufferToVRAM ## -- Begin function PpcVideoCopyOffScreenBufferToVRAM
	.p2align	4, 0x90
_PpcVideoCopyOffScreenBufferToVRAM:     ## @PpcVideoCopyOffScreenBufferToVRAM
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	leaq	-48(%rbp), %rdi
	leaq	-44(%rbp), %rsi
	leaq	-52(%rbp), %rdx
	callq	_MachVideoGetDisplaySize
	movl	-44(%rbp), %edx
	testl	%edx, %edx
	jle	LBB0_10
## %bb.1:
	xorl	%r13d, %r13d
	movl	-48(%rbp), %eax
	movq	_video_mem@GOTPCREL(%rip), %r12
	movl	%eax, %ecx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	-44(%rbp), %edx
	movl	%eax, %ecx
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%r14d, %r13d
	cmpl	%edx, %r14d
	jge	LBB0_10
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	leal	1(%r13), %r14d
	testl	%ecx, %ecx
	jle	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%ebx, %ebx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=2
	movq	%rdx, (%rsi,%rcx,8)
	movq	(%r15,%rcx,8), %rdi
	incl	%ebx
	xorl	%esi, %esi
	movl	%ebx, %edx
	movl	%r14d, %ecx
	callq	_MachVideoPutChar
	movl	-48(%rbp), %eax
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=2
	movl	%eax, %ecx
	cmpl	%eax, %ebx
	jge	LBB0_8
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	imull	%r13d, %ecx
	addl	%ebx, %ecx
	addl	%ecx, %ecx
	movslq	%ecx, %rcx
	movq	(%r15,%rcx,8), %rdx
	movq	(%r12), %rsi
	cmpq	(%rsi,%rcx,8), %rdx
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	incl	%ebx
	jmp	LBB0_7
LBB0_10:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_video_mem,8,3                  ## @video_mem
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PpcVideoCopyOffScreenBufferToVRAM ; -- Begin function PpcVideoCopyOffScreenBufferToVRAM
	.p2align	2
_PpcVideoCopyOffScreenBufferToVRAM:     ; @PpcVideoCopyOffScreenBufferToVRAM
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
	add	x0, sp, #12
	add	x1, sp, #8
	add	x2, sp, #4
	bl	_MachVideoGetDisplaySize
	ldr	w9, [sp, #8]
	cmp	w9, #1
	b.lt	LBB0_9
; %bb.1:
	mov	w23, #0
	ldr	w8, [sp, #12]
Lloh0:
	adrp	x22, _video_mem@GOTPAGE
Lloh1:
	ldr	x22, [x22, _video_mem@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [sp, #8]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x23, x20
	cmp	w20, w9
	b.ge	LBB0_9
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	add	w20, w23, #1
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w21, #0
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=2
	sxtw	x8, w10
	lsl	x8, x8, #3
	str	x9, [x11, x8]
	ldr	x0, [x19, x8]
	add	w21, w21, #1
	mov	w1, #0
	mov	x2, x21
	mov	x3, x20
	bl	_MachVideoPutChar
	ldr	w8, [sp, #12]
	cmp	w21, w8
	b.ge	LBB0_2
LBB0_7:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	madd	w9, w8, w23, w21
	lsl	w10, w9, #1
	sbfiz	x12, x10, #3, #32
	ldr	x9, [x19, x12]
	ldr	x11, [x22]
	ldr	x12, [x11, x12]
	cmp	x9, x12
	b.ne	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	add	w21, w21, #1
	cmp	w21, w8
	b.lt	LBB0_7
	b	LBB0_2
LBB0_9:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_video_mem,8,3                  ; @video_mem
.subsections_via_symbols
