	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_VGLBitmapCvt                   ## -- Begin function VGLBitmapCvt
	.p2align	4, 0x90
_VGLBitmapCvt:                          ## @VGLBitmapCvt
	.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	%rsi, %r8
	movq	%rdi, %rbx
	movl	4(%rdi), %eax
	movl	8(%rdi), %ecx
	imull	(%rdi), %eax
	cmpl	$2, %ecx
	movl	$1, %edx
	cmovgel	%ecx, %edx
	movl	8(%rsi), %r15d
	cmpl	%edx, %r15d
	jne	LBB0_1
## %bb.13:
	movq	16(%rbx), %rsi
	movq	16(%r8), %rdi
	imull	%eax, %edx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_memmove                        ## TAILCALL
LBB0_1:
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	cmpl	$1, %ecx
	jg	LBB0_12
## %bb.2:
	testl	%eax, %eax
	jle	LBB0_12
## %bb.3:
	movl	%eax, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	leal	-1(%r15), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	%r15d, %r13d
	andl	$3, %r13d
	movl	%r15d, %eax
	andl	$-4, %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	xorl	%r14d, %r14d
	xorl	%r12d, %r12d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=1
	incq	%r14
	cmpq	-64(%rbp), %r14                 ## 8-byte Folded Reload
	je	LBB0_12
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
                                        ##     Child Loop BB0_10 Depth 2
	movq	16(%rbx), %rax
	movl	(%rax,%r14,4), %edi
	callq	_VGLrgb332ToNative
	testl	%r15d, %r15d
	jle	LBB0_11
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	16(%rcx), %rcx
	movslq	%r12d, %r12
	cmpl	$3, -48(%rbp)                   ## 4-byte Folded Reload
	jb	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%eax, (%rcx,%r12,4)
	movl	%eax, %esi
	sarl	$8, %esi
	movl	%esi, 4(%rcx,%r12,4)
	movl	%eax, %esi
	sarl	$16, %esi
	movl	%esi, 8(%rcx,%r12,4)
	movl	%eax, %esi
	sarl	$24, %esi
	movl	%esi, 12(%rcx,%r12,4)
	addq	$4, %r12
	sarl	$31, %eax
	addl	$-4, %edx
	jne	LBB0_7
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	testl	%r13d, %r13d
	je	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	%r13d, %edx
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%eax, (%rcx,%r12,4)
	incq	%r12
	sarl	$8, %eax
	decl	%edx
	jne	LBB0_10
	jmp	LBB0_11
LBB0_12:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_VGLBitmapCvt                   ; -- Begin function VGLBitmapCvt
	.p2align	2
_VGLBitmapCvt:                          ; @VGLBitmapCvt
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x1
	mov	x20, x0
	ldp	w8, w9, [x0]
	mul	w21, w9, w8
	ldr	w8, [x0, #8]
	cmp	w8, #1
	csinc	w9, w8, wzr, gt
	ldr	w22, [x1, #8]
	cmp	w22, w9
	b.ne	LBB0_2
; %bb.1:
	ldr	x1, [x20, #16]
	ldr	x0, [x19, #16]
	mul	w2, w9, w21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_memmove
LBB0_2:
	cmp	w8, #1
	ccmp	w21, #1, #8, le
	b.ge	LBB0_4
LBB0_3:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_4:
	mov	x23, #0
	mov	w24, #0
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x23, x23, #1
	cmp	x23, x21
	b.eq	LBB0_3
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	ldr	x8, [x20, #16]
	ldr	w0, [x8, x23, lsl #2]
	bl	_VGLrgb332ToNative
	cmp	w22, #1
	b.lt	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x19, #16]
	add	x8, x8, w24, sxtw #2
	mov	x9, x22
LBB0_8:                                 ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	str	w0, [x8], #4
	asr	w0, w0, #8
	add	w24, w24, #1
	subs	w9, w9, #1
	b.ne	LBB0_8
	b	LBB0_5
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
