	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function WritePCXfile
LCPI0_0:
	.long	10                              ## 0xa
	.long	5                               ## 0x5
	.long	1                               ## 0x1
	.long	8                               ## 0x8
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_WritePCXfile
	.p2align	4, 0x90
_WritePCXfile:                          ## @WritePCXfile
	.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	%r8, %rbx
                                        ## kill: def $ecx killed $ecx def $rcx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movl	%edx, %r13d
	movq	%rsi, %r14
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movl	%edx, %eax
	imull	%ecx, %eax
	leal	(%rax,%rax), %edi
	addl	$1000, %edi                     ## imm = 0x3E8
	callq	_malloc
	movq	%rax, %r12
	xorl	%r15d, %r15d
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	$88, %edx
	callq	_memset
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [10,5,1,8]
	movups	%xmm0, (%r12)
	leal	-1(%r13), %eax
	movswl	%ax, %edi
	xorps	%xmm0, %xmm0
	movups	%xmm0, 72(%r12)
	callq	_LittleShort
	movq	%rax, 64(%r12)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	decl	%eax
	movswl	%ax, %edi
	callq	_LittleShort
	movq	%rax, 56(%r12)
	movswl	%r13w, %edi
	movl	%edi, -52(%rbp)                 ## 4-byte Spill
	callq	_LittleShort
	movq	%rax, 48(%r12)
	movswl	-48(%rbp), %edi                 ## 2-byte Folded Reload
	callq	_LittleShort
	movq	%rax, 40(%r12)
	movl	$1, 16(%r12)
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	callq	_LittleShort
	movq	%rax, 32(%r12)
	movl	$1, %edi
	callq	_LittleShort
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, 24(%r12)
	movq	%r12, %r8
	leaq	20(%r12), %rax
	testl	%ecx, %ecx
	jle	LBB0_18
## %bb.1:
	movl	%r13d, %r9d
	andl	$-2, %r9d
	jmp	LBB0_2
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	$193, (%rax)
	movl	(%r14), %edx
	movl	%edx, 4(%rax)
	addq	$8, %rax
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	addq	$4, %r14
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	incl	%r15d
	cmpl	%ecx, %r15d
	je	LBB0_18
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	testl	%r13d, %r13d
	jle	LBB0_17
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$1, %r13d
	jne	LBB0_4
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	testb	$1, %r13b
	je	LBB0_17
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r14), %edx
	movl	%edx, %esi
	notl	%esi
	testb	$-64, %sil
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	%edx, (%rax)
	addq	$4, %rax
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%r9d, %edx
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=2
	movl	$193, (%rax)
	movl	4(%r14), %esi
	movl	%esi, 4(%rax)
	addq	$8, %rax
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=2
	addq	$8, %r14
	addl	$-2, %edx
	je	LBB0_12
LBB0_5:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r14), %esi
	movl	%esi, %edi
	notl	%edi
	testb	$-64, %dil
	jne	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=2
	movl	$193, (%rax)
	movl	(%r14), %esi
	movl	%esi, 4(%rax)
	addq	$8, %rax
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_5 Depth=2
	movl	%esi, (%rax)
	addq	$4, %rax
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=2
	movl	4(%r14), %esi
	movl	%esi, %edi
	notl	%edi
	testb	$-64, %dil
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=2
	movl	%esi, (%rax)
	addq	$4, %rax
	jmp	LBB0_11
LBB0_18:
	movl	$12, (%rax)
	leaq	4(%rax), %rdx
	movq	%rdx, %rcx
	subq	%rbx, %rcx
	cmpq	$31, %rcx
	ja	LBB0_22
## %bb.19:
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rbx,%rax), %ecx
	movl	%ecx, (%rdx,%rax)
	movl	4(%rbx,%rax), %ecx
	movl	%ecx, 4(%rdx,%rax)
	movl	8(%rbx,%rax), %ecx
	movl	%ecx, 8(%rdx,%rax)
	movl	12(%rbx,%rax), %ecx
	movl	%ecx, 12(%rdx,%rax)
	movl	16(%rbx,%rax), %ecx
	movl	%ecx, 16(%rdx,%rax)
	movl	20(%rbx,%rax), %ecx
	movl	%ecx, 20(%rdx,%rax)
	movl	24(%rbx,%rax), %ecx
	movl	%ecx, 24(%rdx,%rax)
	movl	28(%rbx,%rax), %ecx
	movl	%ecx, 28(%rdx,%rax)
	addq	$32, %rax
	cmpl	$3072, %eax                     ## imm = 0xC00
	jne	LBB0_20
## %bb.21:
	addq	%rax, %rdx
	jmp	LBB0_24
LBB0_22:
	leaq	3076(%rax), %rdx
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_23:                                ## =>This Inner Loop Header: Depth=1
	movups	(%rbx,%rcx,4), %xmm0
	movups	16(%rbx,%rcx,4), %xmm1
	movups	%xmm0, 4(%rax,%rcx,4)
	movups	%xmm1, 20(%rax,%rcx,4)
	movups	32(%rbx,%rcx,4), %xmm0
	movups	48(%rbx,%rcx,4), %xmm1
	movups	%xmm0, 36(%rax,%rcx,4)
	movups	%xmm1, 52(%rax,%rcx,4)
	movups	64(%rbx,%rcx,4), %xmm0
	movups	80(%rbx,%rcx,4), %xmm1
	movups	%xmm0, 68(%rax,%rcx,4)
	movups	%xmm1, 84(%rax,%rcx,4)
	movups	96(%rbx,%rcx,4), %xmm0
	movups	112(%rbx,%rcx,4), %xmm1
	movups	%xmm0, 100(%rax,%rcx,4)
	movups	%xmm1, 116(%rax,%rcx,4)
	addq	$32, %rcx
	cmpq	$768, %rcx                      ## imm = 0x300
	jne	LBB0_23
LBB0_24:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r8, %rbx
	subq	%r8, %rdx
	shrq	$2, %rdx
	movq	%r8, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_SaveFile
	movq	%rbx, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_free                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function WritePCXfile
lCPI0_0:
	.long	10                              ; 0xa
	.long	5                               ; 0x5
	.long	1                               ; 0x1
	.long	8                               ; 0x8
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_WritePCXfile
	.p2align	2
_WritePCXfile:                          ; @WritePCXfile
	.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
	mov	x21, x4
	mov	x22, x3
	mov	x23, x2
	mov	x24, x1
	mov	x19, x0
	mul	w8, w2, w3
	lsl	w8, w8, #1
	add	w0, w8, #1000
	bl	_malloc
	mov	x20, x0
	mov	w1, #0
	mov	w2, #88
	bl	_memset
Lloh0:
	adrp	x8, lCPI0_0@PAGE
Lloh1:
	ldr	q0, [x8, lCPI0_0@PAGEOFF]
	str	q0, [x20]
	sub	w8, w23, #1
	sxth	w0, w8
	stp	xzr, xzr, [x20, #72]
	bl	_LittleShort
	str	x0, [x20, #64]
	subs	w8, w22, #1
	sxth	w0, w8
	bl	_LittleShort
	str	x0, [x20, #56]
	sxth	w25, w23
	mov	x0, x25
	bl	_LittleShort
	str	x0, [x20, #48]
	sxth	w0, w22
	bl	_LittleShort
	str	x0, [x20, #40]
	mov	w8, #1
	str	w8, [x20, #16]
	mov	x0, x25
	bl	_LittleShort
	str	x0, [x20, #32]
	mov	w0, #1
	bl	_LittleShort
	str	x0, [x20, #24]
	add	x8, x20, #20
	cmp	w22, #1
	b.lt	LBB0_9
; %bb.1:
	mov	w9, #0
	mov	w10, #193
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w9, w9, #1
	cmp	w9, w22
	b.eq	LBB0_9
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	cmp	w23, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x11, x23
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=2
	str	w10, [x8]
	ldr	w12, [x24]
	str	w12, [x8, #4]
	add	x8, x8, #8
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=2
	add	x24, x24, #4
	subs	w11, w11, #1
	b.eq	LBB0_2
LBB0_7:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w12, [x24]
	mvn	w13, w12
	tst	w13, #0xc0
	b.eq	LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	str	w12, [x8], #4
	b	LBB0_6
LBB0_9:
	mov	w10, #12
	mov	x9, x8
	str	w10, [x9], #4
	sub	x10, x9, x21
	cmp	x10, #63
	b.hi	LBB0_13
; %bb.10:
	mov	x8, #0
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x21, x8]
	str	w10, [x9, x8]
	add	x8, x8, #4
	cmp	w8, #3072
	b.ne	LBB0_11
; %bb.12:
	add	x9, x9, x8
	b	LBB0_15
LBB0_13:
	mov	x10, #0
	add	x9, x8, #3076
	add	x8, x8, #52
	add	x11, x21, #32
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	add	x12, x11, x10
	ldp	q0, q1, [x12, #-32]
	ldp	q2, q3, [x12]
	add	x12, x8, x10
	stp	q0, q1, [x12, #-48]
	stp	q2, q3, [x12, #-16]
	add	x10, x10, #64
	cmp	x10, #3072
	b.ne	LBB0_14
LBB0_15:
	sub	x8, x9, x20
	lsr	x2, x8, #2
	mov	x0, x19
	mov	x1, x20
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_SaveFile
	mov	x0, x20
	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
	b	_free
	.loh AdrpLdr	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
