	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_XboxVideoCopyOffScreenBufferToVRAM ## -- Begin function XboxVideoCopyOffScreenBufferToVRAM
	.p2align	4, 0x90
_XboxVideoCopyOffScreenBufferToVRAM:    ## @XboxVideoCopyOffScreenBufferToVRAM
	.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
	movq	_ScreenHeight@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_TOP_BOTTOM_LINES@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%r8d, %eax
	subl	%ebx, %eax
	subl	%ebx, %eax
	movq	_CHAR_HEIGHT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	cltd
	idivl	%esi
	testl	%eax, %eax
	jle	LBB0_7
## %bb.1:
	movslq	%edi, %r15
	movq	_ScreenWidth@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	movq	_CHAR_WIDTH@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	xorl	%r14d, %r14d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	incl	%r14d
	movl	%r8d, %eax
	subl	%ebx, %eax
	subl	%ebx, %eax
	cltd
	idivl	%esi
	cmpl	%eax, %r14d
	jge	LBB0_7
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movl	%ecx, %eax
	cltd
	idivl	%edi
	testl	%eax, %eax
	jle	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r15), %edi
	movl	4(%r15), %esi
	movl	%ebx, %edx
	movl	%r14d, %ecx
	callq	_XboxVideoPutChar
	addq	$8, %r15
	incl	%ebx
	movl	(%r12), %ecx
	movl	(%r13), %edi
	movl	%ecx, %eax
	cltd
	idivl	%edi
	cmpl	%eax, %ebx
	jl	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_ScreenHeight@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_TOP_BOTTOM_LINES@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_CHAR_HEIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	jmp	LBB0_6
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ScreenHeight,4,2               ## @ScreenHeight
	.comm	_TOP_BOTTOM_LINES,4,2           ## @TOP_BOTTOM_LINES
	.comm	_CHAR_HEIGHT,4,2                ## @CHAR_HEIGHT
	.comm	_ScreenWidth,4,2                ## @ScreenWidth
	.comm	_CHAR_WIDTH,4,2                 ## @CHAR_WIDTH
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_XboxVideoCopyOffScreenBufferToVRAM ; -- Begin function XboxVideoCopyOffScreenBufferToVRAM
	.p2align	2
_XboxVideoCopyOffScreenBufferToVRAM:    ; @XboxVideoCopyOffScreenBufferToVRAM
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
                                        ; kill: def $w0 killed $w0 def $x0
Lloh0:
	adrp	x21, _ScreenHeight@GOTPAGE
Lloh1:
	ldr	x21, [x21, _ScreenHeight@GOTPAGEOFF]
	ldr	w8, [x21]
Lloh2:
	adrp	x22, _TOP_BOTTOM_LINES@GOTPAGE
Lloh3:
	ldr	x22, [x22, _TOP_BOTTOM_LINES@GOTPAGEOFF]
	ldr	w9, [x22]
	sub	w10, w8, w9, lsl #1
Lloh4:
	adrp	x23, _CHAR_HEIGHT@GOTPAGE
Lloh5:
	ldr	x23, [x23, _CHAR_HEIGHT@GOTPAGEOFF]
	ldr	w11, [x23]
	sdiv	w10, w10, w11
	cmp	w10, #1
	b.lt	LBB0_7
; %bb.1:
	mov	w19, #0
	sxtw	x24, w0
Lloh6:
	adrp	x25, _ScreenWidth@GOTPAGE
Lloh7:
	ldr	x25, [x25, _ScreenWidth@GOTPAGEOFF]
	ldr	w10, [x25]
Lloh8:
	adrp	x26, _CHAR_WIDTH@GOTPAGE
Lloh9:
	ldr	x26, [x26, _CHAR_WIDTH@GOTPAGEOFF]
	ldr	w12, [x26]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w19, w19, #1
	sub	w13, w8, w9, lsl #1
	sdiv	w13, w13, w11
	cmp	w19, w13
	b.ge	LBB0_7
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	sdiv	w13, w10, w12
	cmp	w13, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w20, #0
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	w0, w1, [x24], #8
	mov	x2, x20
	mov	x3, x19
	bl	_XboxVideoPutChar
	add	w20, w20, #1
	ldr	w10, [x25]
	ldr	w12, [x26]
	sdiv	w8, w10, w12
	cmp	w20, w8
	b.lt	LBB0_5
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x21]
	ldr	w9, [x22]
	ldr	w11, [x23]
	b	LBB0_2
LBB0_7:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ScreenHeight,4,2               ; @ScreenHeight
	.comm	_TOP_BOTTOM_LINES,4,2           ; @TOP_BOTTOM_LINES
	.comm	_CHAR_HEIGHT,4,2                ; @CHAR_HEIGHT
	.comm	_ScreenWidth,4,2                ; @ScreenWidth
	.comm	_CHAR_WIDTH,4,2                 ; @CHAR_WIDTH
.subsections_via_symbols
