	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___VGLBitmapCopy                ## -- Begin function __VGLBitmapCopy
	.p2align	4, 0x90
___VGLBitmapCopy:                       ## @__VGLBitmapCopy
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $r9d killed $r9d def $r9
	movl	%r8d, %r12d
	movl	%edx, %r14d
	movl	%esi, %ebx
	movq	%rdi, %r13
	movl	24(%rbp), %r15d
	movl	16(%rbp), %edx
	testl	%r15d, %r15d
	jns	LBB0_1
## %bb.2:
	negl	%r15d
	movq	_VGLDisplay@GOTPCREL(%rip), %rax
	cmpq	%rcx, (%rax)
	je	LBB0_3
LBB0_1:
	xorl	%edi, %edi
                                        ## implicit-def: $rax
                                        ## kill: killed $rax
LBB0_7:
	movl	4(%r13), %r10d
	movl	$-1, %eax
	cmpl	%ebx, %r10d
	jl	LBB0_22
## %bb.8:
	movl	8(%r13), %esi
	cmpl	%r14d, %esi
	jl	LBB0_22
## %bb.9:
	movl	4(%rcx), %r11d
	cmpl	%r12d, %r11d
	jl	LBB0_22
## %bb.10:
	movl	8(%rcx), %r8d
	cmpl	%r9d, %r8d
	jl	LBB0_22
## %bb.11:
	movl	%edi, -92(%rbp)                 ## 4-byte Spill
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	testl	%ebx, %ebx
	movq	%r9, -48(%rbp)                  ## 8-byte Spill
	movl	%r8d, -52(%rbp)                 ## 4-byte Spill
	movl	$0, %r9d
	cmovgl	%ebx, %r9d
	movl	%r9d, -80(%rbp)                 ## 4-byte Spill
	movl	$0, %ecx
	cmovnsl	%ecx, %ebx
	subl	%ebx, %r12d
	addl	%edx, %ebx
	testl	%r14d, %r14d
	movl	$0, %eax
	cmovgl	%r14d, %eax
	cmovnsl	%ecx, %r14d
	xorl	%edx, %edx
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	subl	%r14d, %ecx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movl	%r12d, %ecx
	sarl	$31, %ecx
	andl	%r12d, %ecx
	subl	%ecx, %r9d
	testl	%r12d, %r12d
	cmovlel	%edx, %r12d
	addl	%ebx, %ecx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
                                        ## kill: def $edi killed $edi killed $rdi def $rdi
	sarl	$31, %edi
	andl	-48(%rbp), %edi                 ## 4-byte Folded Reload
	subl	%edi, %eax
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	$0, %r8d
	cmovlel	%r8d, %edx
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	addl	%r14d, %edi
	addl	%r15d, %edi
	addl	-80(%rbp), %ebx                 ## 4-byte Folded Reload
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	movl	%r10d, %edx
	movl	%r9d, -88(%rbp)                 ## 4-byte Spill
	subl	%r9d, %edx
	cmpl	%r10d, %ebx
	cmovlel	%ecx, %edx
	leal	(%rdi,%rax), %ecx
	movl	%esi, %ebx
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	subl	%eax, %ebx
	cmpl	%esi, %ecx
	cmovlel	%edi, %ebx
	leal	(%rdx,%r12), %ecx
	movl	%r11d, %esi
	subl	%r12d, %esi
	cmpl	%r11d, %ecx
	cmovlel	%edx, %esi
	leal	(%rbx,%r8), %ecx
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, %edx
	subl	%r8d, %edx
	cmpl	%eax, %ecx
	cmovlel	%ebx, %edx
	testl	%esi, %esi
	js	LBB0_12
## %bb.13:
	testl	%edx, %edx
	movl	$-1, %eax
	js	LBB0_22
## %bb.14:
	movq	16(%r13), %rcx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	cmpq	16(%rdi), %rcx
	sete	%al
	cmpl	%r8d, -112(%rbp)                ## 4-byte Folded Reload
	setb	%bl
	andb	%al, %bl
	xorl	%r9d, %r9d
	testb	%bl, %bl
	movl	$-1, %eax
	cmovel	%edx, %eax
	leal	-1(%rdx), %r14d
	cmovel	%r9d, %r14d
	cmpl	%eax, %r14d
	jne	LBB0_15
LBB0_21:
	xorl	%eax, %eax
	jmp	LBB0_22
LBB0_3:
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movl	%r12d, %edi
	movq	%r9, -48(%rbp)                  ## 8-byte Spill
	movl	%r9d, %esi
	movl	%r15d, %ecx
	callq	_VGLMouseOverlap
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movl	(%r13), %edi
	movl	16(%rbp), %eax
	imull	%eax, %edi
	callq	_alloca
	movq	%rax, -120(%rbp)                ## 8-byte Spill
	movb	$1, %dil
	jmp	LBB0_6
LBB0_4:
	xorl	%edi, %edi
                                        ## implicit-def: $rax
                                        ## kill: killed $rax
LBB0_6:
	movq	-48(%rbp), %r9                  ## 8-byte Reload
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	16(%rbp), %edx
	jmp	LBB0_7
LBB0_12:
	movl	$-1, %eax
LBB0_22:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	xorb	$1, %bl
	movzbl	%bl, %edx
	addl	%edx, %edx
	decl	%edx
	movl	%edx, -84(%rbp)                 ## 4-byte Spill
	subl	%edx, %eax
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	movl	%eax, %r13d
	movq	%r12, -104(%rbp)                ## 8-byte Spill
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	leal	(%r8,%r14), %r15d
	movq	-112(%rbp), %rax                ## 8-byte Reload
	leal	(%rax,%r14), %edx
	imull	%r10d, %edx
	addl	-88(%rbp), %edx                 ## 4-byte Folded Reload
	movslq	(%rdi), %rax
	movslq	%edx, %rdx
	imulq	%rax, %rdx
	leaq	(%rcx,%rdx,4), %rbx
	cmpb	$0, -92(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_20
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	movl	%r12d, %edi
	movl	%r15d, %esi
	movl	-52(%rbp), %r13d                ## 4-byte Reload
	movl	%r13d, %edx
	movl	$1, %ecx
	callq	_VGLMouseOverlap
	testq	%rax, %rax
	je	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edx
	imull	%r13d, %edx
	movq	-120(%rbp), %r12                ## 8-byte Reload
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_memmove
	movq	-104(%rbp), %rdi                ## 8-byte Reload
                                        ## kill: def $edi killed $edi killed $rdi
	movl	%r15d, %esi
	movl	%r13d, %edx
	movq	%r12, %rcx
	callq	_VGLMouseMerge
	movq	%r12, %rbx
	movq	-104(%rbp), %r12                ## 8-byte Reload
LBB0_19:                                ##   in Loop: Header=BB0_16 Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	-68(%rbp), %r13d                ## 4-byte Reload
LBB0_20:                                ##   in Loop: Header=BB0_16 Depth=1
	movl	%r12d, %esi
	movl	%r15d, %edx
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	movq	%rbx, %r8
	callq	_WriteVerticalLine
	cmpl	%r14d, %r13d
	je	LBB0_21
## %bb.23:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	16(%rax), %rcx
	movl	4(%rax), %r10d
	addl	-84(%rbp), %r14d                ## 4-byte Folded Reload
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_VGLDisplay,8,3                 ## @VGLDisplay
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___VGLBitmapCopy                ; -- Begin function __VGLBitmapCopy
	.p2align	2
___VGLBitmapCopy:                       ; @__VGLBitmapCopy
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x23, x7
	mov	x24, x6
	mov	x22, x5
	mov	x26, x4
	mov	x19, x3
	mov	x25, x2
	mov	x27, x1
	mov	x20, x0
	tbz	w7, #31, LBB0_2
; %bb.1:
	neg	w23, w23
Lloh0:
	adrp	x8, _VGLDisplay@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VGLDisplay@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x19
	b.eq	LBB0_9
LBB0_2:
	mov	w28, #0
                                        ; implicit-def: $x0
                                        ; kill: killed $x0
LBB0_3:
	ldr	w8, [x20, #4]
	cmp	w8, w27
	b.lt	LBB0_7
; %bb.4:
	ldr	w9, [x20, #8]
	cmp	w9, w25
	b.lt	LBB0_7
; %bb.5:
	ldr	w10, [x19, #4]
	cmp	w10, w26
	b.lt	LBB0_7
; %bb.6:
	ldr	w11, [x19, #8]
	cmp	w11, w22
	b.ge	LBB0_11
LBB0_7:
	mov	w0, #-1
LBB0_8:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_9:
	mov	x0, x26
	mov	x1, x22
	mov	x2, x24
	mov	x3, x23
	bl	_VGLMouseOverlap
	cbz	x0, LBB0_2
; %bb.10:
	ldr	w8, [x20]
	mul	w0, w8, w24
	bl	_alloca
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	mov	w28, #1
	b	LBB0_3
LBB0_11:
	cmp	w27, #0
	csel	w12, w27, wzr, gt
	csel	w13, w27, wzr, lt
	sub	w14, w26, w13
	cmp	w25, #0
	csel	w15, w25, wzr, gt
	csel	w16, w25, wzr, lt
	sub	w17, w22, w16
	cmp	w14, #0
	csel	w0, w14, wzr, lt
	csel	w22, w14, wzr, gt
	add	w13, w13, w24
	add	w14, w13, w0
	cmp	w17, #0
	csel	w1, w17, wzr, lt
	csel	w21, w17, wzr, gt
	add	w16, w1, w16
	add	w16, w16, w23
	sub	w26, w12, w0
	sub	w17, w8, w26
	add	w12, w13, w12
	cmp	w12, w8
	csel	w12, w17, w14, gt
	sub	w14, w15, w1
	add	w13, w16, w14
	str	w14, [sp, #28]                  ; 4-byte Folded Spill
	sub	w14, w9, w14
	cmp	w13, w9
	csel	w9, w14, w16, gt
	sub	w13, w10, w22
	add	w14, w12, w22
	cmp	w14, w10
	csel	w23, w13, w12, gt
	sub	w10, w11, w21
	add	w12, w9, w21
	cmp	w12, w11
	csel	w10, w10, w9, gt
	mov	w0, #-1
	tbnz	w23, #31, LBB0_8
; %bb.12:
	tbnz	w10, #31, LBB0_8
; %bb.13:
	mov	w0, #0
	ldr	x9, [x20, #16]
	ldr	x11, [x19, #16]
	cmp	x9, x11
	cset	w11, eq
	ldr	w12, [sp, #28]                  ; 4-byte Folded Reload
	cmp	w12, w21
	cset	w12, lo
	sub	w13, w10, #1
	tst	w11, w12
	csinv	w10, w10, wzr, eq
	csel	w27, w13, wzr, ne
	mov	w11, #-1
	cneg	w11, w11, eq
	cmp	w27, w10
	b.eq	LBB0_8
; %bb.14:
	sub	w10, w10, w11
	stp	w11, w10, [sp, #20]             ; 8-byte Folded Spill
	str	w28, [sp, #4]                   ; 4-byte Folded Spill
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	add	w24, w21, w27
	ldr	w10, [sp, #28]                  ; 4-byte Folded Reload
	add	w10, w10, w27
	madd	w8, w8, w10, w26
	ldr	w10, [x19]
	mul	w8, w8, w10
	add	x25, x9, w8, sxtw #2
	cbz	w28, LBB0_18
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	mov	x0, x22
	mov	x1, x24
	mov	x2, x23
	mov	w3, #1
	bl	_VGLMouseOverlap
	cbz	x0, LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	w8, [x20]
	mul	w2, w8, w23
	mov	x28, x26
	mov	x26, x21
	ldr	x21, [sp, #8]                   ; 8-byte Folded Reload
	mov	x0, x21
	mov	x1, x25
	bl	_memmove
	mov	x0, x22
	mov	x1, x24
	mov	x2, x23
	mov	x3, x21
	bl	_VGLMouseMerge
	mov	x25, x21
	mov	x21, x26
	mov	x26, x28
	ldr	w28, [sp, #4]                   ; 4-byte Folded Reload
LBB0_18:                                ;   in Loop: Header=BB0_15 Depth=1
	mov	x0, x19
	mov	x1, x22
	mov	x2, x24
	mov	x3, x23
	mov	x4, x25
	bl	_WriteVerticalLine
	ldr	w8, [sp, #24]                   ; 4-byte Folded Reload
	cmp	w8, w27
	b.eq	LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	x9, [x20, #16]
	ldr	w8, [x20, #4]
	ldr	w10, [sp, #20]                  ; 4-byte Folded Reload
	add	w27, w27, w10
	b	LBB0_15
LBB0_20:
	mov	w0, #0
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_VGLDisplay,8,3                 ; @VGLDisplay
.subsections_via_symbols
