	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_LoadPCX                        ## -- Begin function LoadPCX
	.p2align	4, 0x90
_LoadPCX:                               ## @LoadPCX
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r14
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	leaq	-80(%rbp), %rsi
	callq	_LoadFile
	movl	%eax, %r12d
	movq	-80(%rbp), %r13
	movl	4(%r13), %edi
	callq	_LittleShort
	movl	%eax, 4(%r13)
	movl	8(%r13), %edi
	callq	_LittleShort
	movl	%eax, 8(%r13)
	movl	12(%r13), %edi
	callq	_LittleShort
	movl	%eax, 12(%r13)
	movl	16(%r13), %edi
	callq	_LittleShort
	movl	%eax, 16(%r13)
	movl	20(%r13), %edi
	callq	_LittleShort
	movl	%eax, 20(%r13)
	movl	24(%r13), %edi
	callq	_LittleShort
	movl	%eax, 24(%r13)
	movl	28(%r13), %edi
	callq	_LittleShort
	movl	%eax, 28(%r13)
	movl	32(%r13), %edi
	callq	_LittleShort
	movl	%eax, 32(%r13)
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	cmpl	$10, 36(%r13)
	jne	LBB0_6
## %bb.1:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpl	$5, 40(%rax)
	jne	LBB0_6
## %bb.2:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpl	$1, 44(%rax)
	jne	LBB0_6
## %bb.3:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpl	$8, 48(%rax)
	jne	LBB0_6
## %bb.4:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpl	$639, 12(%rax)                  ## imm = 0x27F
	jg	LBB0_6
## %bb.5:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpl	$480, 16(%rax)                  ## imm = 0x1E0
	jl	LBB0_7
LBB0_6:
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	xorl	%eax, %eax
	callq	_Error
LBB0_7:
	movslq	%r12d, %rbx
	testq	%r14, %r14
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	je	LBB0_9
## %bb.8:
	movl	$768, %edi                      ## imm = 0x300
	callq	_malloc
	movq	%rax, (%r14)
	leaq	(%r12,%rbx,4), %rsi
	addq	$-3072, %rsi                    ## imm = 0xF400
	movq	%rax, %rdi
	movl	$768, %edx                      ## imm = 0x300
	callq	_memcpy
LBB0_9:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	testq	%rcx, %rcx
	je	LBB0_11
## %bb.10:
	movl	12(%r12), %eax
	incl	%eax
	movl	%eax, (%rcx)
LBB0_11:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	testq	%rcx, %rcx
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_13
## %bb.12:
	movl	16(%r12), %eax
	incl	%eax
	movl	%eax, (%rcx)
LBB0_13:
	testq	%rbx, %rbx
	je	LBB0_47
## %bb.14:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movl	12(%r12), %edi
	movl	16(%r12), %eax
	incl	%eax
	incl	%edi
	imull	%eax, %edi
	callq	_malloc
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_16
## %bb.15:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_Error
LBB0_16:
	movq	%r15, (%rbx)
	movq	-80(%rbp), %r11
	movl	16(%r12), %edx
	testl	%edx, %edx
	js	LBB0_17
## %bb.18:
	movl	12(%r12), %r8d
	xorl	%r10d, %r10d
	movl	%r8d, %eax
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_42:                                ##   in Loop: Header=BB0_19 Depth=1
	movq	%r11, -80(%rbp)
	movl	16(%r12), %edx
	movl	%r8d, %eax
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
LBB0_43:                                ##   in Loop: Header=BB0_19 Depth=1
	leal	1(%r10), %ecx
	movslq	%eax, %rsi
	leaq	(%r15,%rsi,4), %r15
	addq	$4, %r15
	cmpl	%edx, %r10d
	movl	%ecx, %r10d
	jge	LBB0_44
LBB0_19:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_23 Depth 2
                                        ##       Child Loop BB0_33 Depth 3
                                        ##       Child Loop BB0_36 Depth 3
                                        ##       Child Loop BB0_41 Depth 3
	testl	%eax, %eax
	js	LBB0_43
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	leaq	112(%r15), %rcx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	leaq	16(%r15), %r9
	xorl	%edi, %edi
	jmp	LBB0_23
LBB0_38:                                ##   in Loop: Header=BB0_23 Depth=2
	movq	-48(%rbp), %r12                 ## 8-byte Reload
LBB0_21:                                ##   in Loop: Header=BB0_23 Depth=2
	movl	12(%r12), %r8d
LBB0_22:                                ##   in Loop: Header=BB0_23 Depth=2
	movl	%r8d, %eax
	cmpl	%edi, %r8d
	jl	LBB0_42
LBB0_23:                                ##   Parent Loop BB0_19 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_33 Depth 3
                                        ##       Child Loop BB0_36 Depth 3
                                        ##       Child Loop BB0_41 Depth 3
	movl	(%r11), %edx
	movl	%edx, %esi
	notl	%esi
	testb	$-64, %sil
	jne	LBB0_24
## %bb.25:                              ##   in Loop: Header=BB0_23 Depth=2
	movl	%edx, %esi
	andl	$63, %esi
	movl	4(%r11), %edx
	addq	$8, %r11
	cmpl	16(%r12), %r10d
	je	LBB0_27
	jmp	LBB0_28
	.p2align	4, 0x90
LBB0_24:                                ##   in Loop: Header=BB0_23 Depth=2
	addq	$4, %r11
	movl	$1, %esi
	cmpl	16(%r12), %r10d
	jne	LBB0_28
LBB0_27:                                ##   in Loop: Header=BB0_23 Depth=2
	leal	(%rsi,%rdi), %ebx
	incl	%eax
	movl	%eax, %ecx
	subl	%edi, %ecx
	cmpl	%eax, %ebx
	cmovlel	%esi, %ecx
	movl	%ecx, %esi
LBB0_28:                                ##   in Loop: Header=BB0_23 Depth=2
	testl	%esi, %esi
	jle	LBB0_22
## %bb.29:                              ##   in Loop: Header=BB0_23 Depth=2
	movslq	%edi, %rdi
	leal	-1(%rsi), %r13d
	cmpl	$7, %r13d
	jb	LBB0_40
## %bb.30:                              ##   in Loop: Header=BB0_23 Depth=2
	incq	%r13
	movq	%r13, %r14
	andq	$-8, %r14
	movd	%edx, %xmm0
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	leaq	-8(%r14), %rbx
	movq	%rbx, %rcx
	shrq	$3, %rcx
	incq	%rcx
	movl	%ecx, %eax
	andl	$3, %eax
	cmpq	$24, %rbx
	jae	LBB0_32
## %bb.31:                              ##   in Loop: Header=BB0_23 Depth=2
	xorl	%r12d, %r12d
	jmp	LBB0_34
LBB0_32:                                ##   in Loop: Header=BB0_23 Depth=2
	andq	$-4, %rcx
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	leaq	(%rbx,%rdi,4), %r8
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_33:                                ##   Parent Loop BB0_19 Depth=1
                                        ##     Parent Loop BB0_23 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movdqu	%xmm0, -112(%r8,%r12,4)
	movdqu	%xmm0, -96(%r8,%r12,4)
	movdqu	%xmm0, -80(%r8,%r12,4)
	movdqu	%xmm0, -64(%r8,%r12,4)
	movdqu	%xmm0, -48(%r8,%r12,4)
	movdqu	%xmm0, -32(%r8,%r12,4)
	movdqu	%xmm0, -16(%r8,%r12,4)
	movdqu	%xmm0, (%r8,%r12,4)
	addq	$32, %r12
	addq	$-4, %rcx
	jne	LBB0_33
LBB0_34:                                ##   in Loop: Header=BB0_23 Depth=2
	testq	%rax, %rax
	je	LBB0_37
## %bb.35:                              ##   in Loop: Header=BB0_23 Depth=2
	addq	%rdi, %r12
	leaq	(%r9,%r12,4), %rcx
	shlq	$5, %rax
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_36:                                ##   Parent Loop BB0_19 Depth=1
                                        ##     Parent Loop BB0_23 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movdqu	%xmm0, -16(%rcx,%rbx)
	movdqu	%xmm0, (%rcx,%rbx)
	addq	$32, %rbx
	cmpq	%rbx, %rax
	jne	LBB0_36
LBB0_37:                                ##   in Loop: Header=BB0_23 Depth=2
	addq	%r14, %rdi
	cmpq	%r14, %r13
	je	LBB0_38
## %bb.39:                              ##   in Loop: Header=BB0_23 Depth=2
	subl	%r14d, %esi
	movq	-48(%rbp), %r12                 ## 8-byte Reload
LBB0_40:                                ##   in Loop: Header=BB0_23 Depth=2
	incl	%esi
	.p2align	4, 0x90
LBB0_41:                                ##   Parent Loop BB0_19 Depth=1
                                        ##     Parent Loop BB0_23 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movl	%edx, (%r15,%rdi,4)
	incq	%rdi
	decl	%esi
	cmpl	$1, %esi
	ja	LBB0_41
	jmp	LBB0_21
LBB0_17:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
LBB0_44:
	subq	%r12, %r11
	sarq	$2, %r11
	cmpq	%rdi, %r11
	jle	LBB0_46
## %bb.45:
	leaq	L_.str.2(%rip), %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_Error
LBB0_46:
	movq	%r12, %rdi
	callq	_free
LBB0_47:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Bad pcx file %s"

L_.str.1:                               ## @.str.1
	.asciz	"Skin_Cache: couldn't allocate"

L_.str.2:                               ## @.str.2
	.asciz	"PCX file %s was malformed"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_LoadPCX                        ; -- Begin function LoadPCX
	.p2align	2
_LoadPCX:                               ; @LoadPCX
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x22, x4
	mov	x24, x3
	mov	x25, x2
	mov	x23, x1
	mov	x19, x0
	add	x1, sp, #8
	bl	_LoadFile
	mov	x21, x0
	ldr	x20, [sp, #8]
	ldr	w0, [x20, #4]
	bl	_LittleShort
	str	w0, [x20, #4]
	ldr	w0, [x20, #8]
	bl	_LittleShort
	str	w0, [x20, #8]
	ldr	w0, [x20, #12]
	bl	_LittleShort
	str	w0, [x20, #12]
	ldr	w0, [x20, #16]
	bl	_LittleShort
	str	w0, [x20, #16]
	ldr	w0, [x20, #20]
	bl	_LittleShort
	str	w0, [x20, #20]
	ldr	w0, [x20, #24]
	bl	_LittleShort
	str	w0, [x20, #24]
	ldr	w0, [x20, #28]
	bl	_LittleShort
	str	w0, [x20, #28]
	ldr	w0, [x20, #32]
	bl	_LittleShort
	str	w0, [x20, #32]
	ldr	w8, [x20, #36]
	cmp	w8, #10
	b.ne	LBB0_6
; %bb.1:
	ldr	w8, [x20, #40]
	cmp	w8, #5
	b.ne	LBB0_6
; %bb.2:
	ldr	w8, [x20, #44]
	cmp	w8, #1
	b.ne	LBB0_6
; %bb.3:
	ldr	w8, [x20, #48]
	cmp	w8, #8
	b.ne	LBB0_6
; %bb.4:
	ldr	w8, [x20, #12]
	cmp	w8, #639
	b.gt	LBB0_6
; %bb.5:
	ldr	w8, [x20, #16]
	cmp	w8, #480
	b.lt	LBB0_7
LBB0_6:
	str	x19, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_Error
LBB0_7:
	cbz	x25, LBB0_9
; %bb.8:
	mov	w0, #768
	bl	_malloc
	str	x0, [x25]
	add	x8, x20, w21, sxtw #2
	sub	x1, x8, #3072
	mov	w2, #768
	bl	_memcpy
LBB0_9:
	cbz	x24, LBB0_11
; %bb.10:
	ldr	w8, [x20, #12]
	add	w8, w8, #1
	str	w8, [x24]
LBB0_11:
	cbz	x22, LBB0_13
; %bb.12:
	ldr	w8, [x20, #16]
	add	w8, w8, #1
	str	w8, [x22]
LBB0_13:
	cbz	x23, LBB0_38
; %bb.14:
	ldp	w9, w8, [x20, #12]
	add	w8, w8, #1
	madd	w0, w8, w9, w8
	bl	_malloc
	mov	x22, x0
	cbnz	x0, LBB0_16
; %bb.15:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_Error
LBB0_16:
	str	x22, [x23]
	ldr	x8, [sp, #8]
	ldr	w10, [x20, #16]
	tbnz	w10, #31, LBB0_35
; %bb.17:
	mov	w9, #0
	ldr	w12, [x20, #12]
	b	LBB0_20
LBB0_18:                                ;   in Loop: Header=BB0_20 Depth=1
	str	x8, [sp, #8]
	ldr	w10, [x20, #16]
LBB0_19:                                ;   in Loop: Header=BB0_20 Depth=1
	add	w11, w9, #1
	add	w13, w12, #1
	add	x22, x22, w13, sxtw #2
	cmp	w9, w10
	mov	x9, x11
	b.ge	LBB0_35
LBB0_20:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_24 Depth 2
                                        ;       Child Loop BB0_31 Depth 3
                                        ;       Child Loop BB0_34 Depth 3
	tbnz	w12, #31, LBB0_19
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=1
	mov	w11, #0
	add	x10, x22, #32
	b	LBB0_24
LBB0_22:                                ;   in Loop: Header=BB0_24 Depth=2
	ldr	w12, [x20, #12]
LBB0_23:                                ;   in Loop: Header=BB0_24 Depth=2
	cmp	w12, w11
	b.lt	LBB0_18
LBB0_24:                                ;   Parent Loop BB0_20 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_31 Depth 3
                                        ;       Child Loop BB0_34 Depth 3
	mov	x15, x8
	ldr	w13, [x15], #4
	mvn	w14, w13
	tst	w14, #0xc0
	b.ne	LBB0_26
; %bb.25:                               ;   in Loop: Header=BB0_24 Depth=2
	and	w14, w13, #0x3f
	ldr	w13, [x8, #4]
	add	x8, x8, #8
	b	LBB0_27
LBB0_26:                                ;   in Loop: Header=BB0_24 Depth=2
	mov	w14, #1
	mov	x8, x15
LBB0_27:                                ;   in Loop: Header=BB0_24 Depth=2
	ldr	w15, [x20, #16]
	add	w16, w12, #1
	sub	w17, w16, w11
	add	w0, w14, w11
	cmp	w0, w16
	csel	w16, w17, w14, gt
	cmp	w9, w15
	csel	w14, w14, w16, ne
	subs	w15, w14, #1
	b.lt	LBB0_23
; %bb.28:                               ;   in Loop: Header=BB0_24 Depth=2
                                        ; kill: def $w11 killed $w11 killed $x11 def $x11
	sxtw	x16, w11
	cmp	w15, #15
	b.hs	LBB0_30
; %bb.29:                               ;   in Loop: Header=BB0_24 Depth=2
	mov	x11, x16
	b	LBB0_33
LBB0_30:                                ;   in Loop: Header=BB0_24 Depth=2
	add	x12, x15, #1
	and	x15, x12, #0x1fffffff0
	add	x11, x15, x16
	sub	w14, w14, w15
	dup.4s	v0, w13
	add	x16, x10, x16, lsl #2
	mov	x17, x15
LBB0_31:                                ;   Parent Loop BB0_20 Depth=1
                                        ;     Parent Loop BB0_24 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	stp	q0, q0, [x16, #-32]
	stp	q0, q0, [x16], #64
	subs	x17, x17, #16
	b.ne	LBB0_31
; %bb.32:                               ;   in Loop: Header=BB0_24 Depth=2
	cmp	x12, x15
	b.eq	LBB0_22
LBB0_33:                                ;   in Loop: Header=BB0_24 Depth=2
	add	w12, w14, #1
	mov	x14, x11
LBB0_34:                                ;   Parent Loop BB0_20 Depth=1
                                        ;     Parent Loop BB0_24 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	add	x11, x14, #1
	str	w13, [x22, x14, lsl #2]
	sub	w12, w12, #1
	mov	x14, x11
	cmp	w12, #1
	b.hi	LBB0_34
	b	LBB0_22
LBB0_35:
	sub	x8, x8, x20
	sxtw	x9, w21
	cmp	x9, x8, asr #2
	b.ge	LBB0_37
; %bb.36:
	str	x19, [sp]
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_Error
LBB0_37:
	mov	x0, x20
	bl	_free
LBB0_38:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Bad pcx file %s"

l_.str.1:                               ; @.str.1
	.asciz	"Skin_Cache: couldn't allocate"

l_.str.2:                               ; @.str.2
	.asciz	"PCX file %s was malformed"

.subsections_via_symbols
