	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_HL_FixContentsTextures         ## -- Begin function HL_FixContentsTextures
	.p2align	4, 0x90
_HL_FixContentsTextures:                ## @HL_FixContentsTextures
	.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
	testq	%rdi, %rdi
	je	LBB0_31
## %bb.1:
	movq	%rdi, %r13
	movq	_CONTENTS_WATER@GOTPCREL(%rip), %rbx
	movq	_map_texinfo@GOTPCREL(%rip), %r14
                                        ## implicit-def: $r12d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str(%rip), %rdi
	callq	_Log_Print
LBB0_30:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	24(%r13), %r13
	testq	%r13, %r13
	je	LBB0_31
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
                                        ##     Child Loop BB0_12 Depth 2
                                        ##     Child Loop BB0_24 Depth 2
                                        ##     Child Loop BB0_27 Depth 2
                                        ##     Child Loop BB0_29 Depth 2
	movq	(%r13), %rsi
	cmpq	(%rbx), %rsi
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_CONTENTS_SLIME@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_CONTENTS_LAVA@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jne	LBB0_30
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	8(%r13), %eax
	xorl	%r15d, %r15d
	testl	%eax, %eax
	jle	LBB0_9
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	16(%r13), %rax
	movslq	(%rax,%r15,4), %r12
	movq	(%r14), %rax
	movl	(%rax,%r12,4), %edi
	callq	_HL_TextureContents
	movq	(%r13), %rsi
	cmpq	%rsi, %rax
	je	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=2
	incq	%r15
	movslq	8(%r13), %rax
	cmpq	%rax, %r15
	jl	LBB0_6
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpl	%eax, %r15d
	jge	LBB0_10
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	testl	%r12d, %r12d
	js	LBB0_15
LBB0_18:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	8(%r13), %eax
	testl	%eax, %eax
	jle	LBB0_30
## %bb.19:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%r13), %rcx
	cmpl	$8, %eax
	jae	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_2 Depth=1
	xorl	%edx, %edx
	jmp	LBB0_29
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	8(%r13), %eax
	cmpl	%eax, %r15d
	jl	LBB0_17
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	$-1, %r12d
	movq	_map_numtexinfo@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_15
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %r15
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_12:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r14), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_HL_TextureContents
	movq	(%r13), %rsi
	cmpq	%rsi, %rax
	je	LBB0_16
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=2
	incq	%rbx
	movq	_map_numtexinfo@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %rbx
	jl	LBB0_12
## %bb.14:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rbx
	jmp	LBB0_15
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %rsi
	movl	%ebx, %r12d
	movq	%r15, %rbx
	testl	%r12d, %r12d
	jns	LBB0_18
	jmp	LBB0_15
LBB0_21:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %edx
	andl	$-8, %edx
	movd	%r12d, %xmm0
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	leaq	-8(%rdx), %rsi
	movq	%rsi, %rdi
	shrq	$3, %rdi
	incq	%rdi
	movl	%edi, %r8d
	andl	$7, %r8d
	cmpq	$56, %rsi
	jae	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_2 Depth=1
	xorl	%esi, %esi
	jmp	LBB0_25
LBB0_23:                                ##   in Loop: Header=BB0_2 Depth=1
	andq	$-8, %rdi
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_24:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movdqu	%xmm0, (%rcx,%rsi,4)
	movdqu	%xmm0, 16(%rcx,%rsi,4)
	movdqu	%xmm0, 32(%rcx,%rsi,4)
	movdqu	%xmm0, 48(%rcx,%rsi,4)
	movdqu	%xmm0, 64(%rcx,%rsi,4)
	movdqu	%xmm0, 80(%rcx,%rsi,4)
	movdqu	%xmm0, 96(%rcx,%rsi,4)
	movdqu	%xmm0, 112(%rcx,%rsi,4)
	movdqu	%xmm0, 128(%rcx,%rsi,4)
	movdqu	%xmm0, 144(%rcx,%rsi,4)
	movdqu	%xmm0, 160(%rcx,%rsi,4)
	movdqu	%xmm0, 176(%rcx,%rsi,4)
	movdqu	%xmm0, 192(%rcx,%rsi,4)
	movdqu	%xmm0, 208(%rcx,%rsi,4)
	movdqu	%xmm0, 224(%rcx,%rsi,4)
	movdqu	%xmm0, 240(%rcx,%rsi,4)
	addq	$64, %rsi
	addq	$-8, %rdi
	jne	LBB0_24
LBB0_25:                                ##   in Loop: Header=BB0_2 Depth=1
	testq	%r8, %r8
	je	LBB0_28
## %bb.26:                              ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%rcx,%rsi,4), %rsi
	addq	$16, %rsi
	shlq	$5, %r8
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_27:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movdqu	%xmm0, -16(%rsi,%rdi)
	movdqu	%xmm0, (%rsi,%rdi)
	addq	$32, %rdi
	cmpq	%rdi, %r8
	jne	LBB0_27
LBB0_28:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%rax, %rdx
	je	LBB0_30
	.p2align	4, 0x90
LBB0_29:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%r12d, (%rcx,%rdx,4)
	incq	%rdx
	cmpq	%rdx, %rax
	jne	LBB0_29
	jmp	LBB0_30
LBB0_31:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CONTENTS_WATER,8,3             ## @CONTENTS_WATER
	.comm	_CONTENTS_SLIME,8,3             ## @CONTENTS_SLIME
	.comm	_CONTENTS_LAVA,8,3              ## @CONTENTS_LAVA
	.comm	_map_texinfo,8,3                ## @map_texinfo
	.comm	_map_numtexinfo,4,2             ## @map_numtexinfo
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"brush contents %d with wrong textures\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_HL_FixContentsTextures         ; -- Begin function HL_FixContentsTextures
	.p2align	2
_HL_FixContentsTextures:                ; @HL_FixContentsTextures
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	cbz	x0, LBB0_27
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x21, _CONTENTS_WATER@GOTPAGE
Lloh1:
	ldr	x21, [x21, _CONTENTS_WATER@GOTPAGEOFF]
Lloh2:
	adrp	x22, _CONTENTS_SLIME@GOTPAGE
Lloh3:
	ldr	x22, [x22, _CONTENTS_SLIME@GOTPAGEOFF]
Lloh4:
	adrp	x23, _CONTENTS_LAVA@GOTPAGE
Lloh5:
	ldr	x23, [x23, _CONTENTS_LAVA@GOTPAGEOFF]
Lloh6:
	adrp	x24, _map_texinfo@GOTPAGE
Lloh7:
	ldr	x24, [x24, _map_texinfo@GOTPAGEOFF]
Lloh8:
	adrp	x20, l_.str@PAGE
Lloh9:
	add	x20, x20, l_.str@PAGEOFF
                                        ; implicit-def: $w26
Lloh10:
	adrp	x25, _map_numtexinfo@GOTPAGE
Lloh11:
	ldr	x25, [x25, _map_numtexinfo@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	w26, #-1
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	bl	_Log_Print
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x19, [x19, #24]
	cbz	x19, LBB0_27
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
                                        ;     Child Loop BB0_19 Depth 2
                                        ;     Child Loop BB0_23 Depth 2
                                        ;     Child Loop BB0_26 Depth 2
	ldr	x1, [x19]
	ldr	x8, [x21]
	ldr	x9, [x22]
	ldr	x10, [x23]
	cmp	x1, x8
	ccmp	x1, x9, #4, ne
	ccmp	x1, x10, #4, ne
	b.ne	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x27, #0
LBB0_8:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x19, #16]
	ldrsw	x26, [x8, x27, lsl #2]
	ldr	x8, [x24]
	ldr	w0, [x8, x26, lsl #2]
	bl	_HL_TextureContents
	ldr	x1, [x19]
	cmp	x0, x1
	b.eq	LBB0_16
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	add	x27, x27, #1
	ldrsw	x8, [x19, #8]
	cmp	x27, x8
	b.lt	LBB0_8
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w27, #0
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w27, w8
	b.ge	LBB0_17
LBB0_12:                                ;   in Loop: Header=BB0_5 Depth=1
	tbnz	w26, #31, LBB0_3
LBB0_13:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.14:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x19, #16]
	cmp	w8, #16
	b.hs	LBB0_22
; %bb.15:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x10, #0
	b	LBB0_25
LBB0_16:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x19, #8]
	cmp	w27, w8
	b.lt	LBB0_12
LBB0_17:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x25]
	cmp	w8, #1
	b.lt	LBB0_2
; %bb.18:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x26, #0
LBB0_19:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x24]
	ldr	w0, [x8, x26, lsl #2]
	bl	_HL_TextureContents
	ldr	x1, [x19]
	cmp	x0, x1
	b.eq	LBB0_21
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=2
	add	x26, x26, #1
	ldrsw	x8, [x25]
	cmp	x26, x8
	b.lt	LBB0_19
	b	LBB0_2
LBB0_21:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x1, x0
                                        ; kill: def $w26 killed $w26 killed $x26 def $x26
	tbz	w26, #31, LBB0_13
	b	LBB0_3
LBB0_22:                                ;   in Loop: Header=BB0_5 Depth=1
	and	x10, x8, #0xfffffff0
	dup.4s	v0, w26
	add	x11, x9, #32
	mov	x12, x10
LBB0_23:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	stp	q0, q0, [x11, #-32]
	stp	q0, q0, [x11], #64
	subs	x12, x12, #16
	b.ne	LBB0_23
; %bb.24:                               ;   in Loop: Header=BB0_5 Depth=1
	cmp	x10, x8
	b.eq	LBB0_4
LBB0_25:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x9, x9, x10, lsl #2
	sub	x8, x8, x10
LBB0_26:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	str	w26, [x9], #4
	subs	x8, x8, #1
	b.ne	LBB0_26
	b	LBB0_4
LBB0_27:
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_CONTENTS_WATER,8,3             ; @CONTENTS_WATER
	.comm	_CONTENTS_SLIME,8,3             ; @CONTENTS_SLIME
	.comm	_CONTENTS_LAVA,8,3              ; @CONTENTS_LAVA
	.comm	_map_texinfo,8,3                ; @map_texinfo
	.comm	_map_numtexinfo,4,2             ; @map_numtexinfo
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"brush contents %d with wrong textures\n"

.subsections_via_symbols
