	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Sin_LoadBSPFileTexinfo         ## -- Begin function Sin_LoadBSPFileTexinfo
	.p2align	4, 0x90
_Sin_LoadBSPFileTexinfo:                ## @Sin_LoadBSPFileTexinfo
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	$4, %edi
	callq	_GetMemory
	movq	_header@GOTPCREL(%rip), %r12
	movq	%rax, (%r12)
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_fopen
	movq	%rax, %r15
	movq	(%r12), %rdi
	movl	$4, %esi
	movl	$1, %edx
	movq	%rax, %rcx
	callq	_fread
	movq	(%r12), %rax
	movl	(%rax), %edi
	callq	_LittleLong
	movq	(%r12), %rsi
	movl	%eax, (%rsi)
	movq	(%rsi), %rax
	movq	_SIN_BSPHEADER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_3
## %bb.1:
	movq	_SINGAME_BSPHEADER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_3
## %bb.2:
	leaq	L_.str.1(%rip), %rdi
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_Error
	movq	(%r12), %rsi
LBB0_3:
	movq	8(%rsi), %rdx
	movq	_SIN_BSPVERSION@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	cmpq	%rcx, %rdx
	je	LBB0_6
## %bb.4:
	movq	_SINGAME_BSPVERSION@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	je	LBB0_6
## %bb.5:
	leaq	L_.str.2(%rip), %rdi
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_Error
	movq	(%r12), %rsi
LBB0_6:
	movq	16(%rsi), %rax
	movq	_SIN_LUMP_TEXINFO@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,8), %ebx
	movl	4(%rax,%rcx,8), %esi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_fseek
	movq	_sin_texinfo@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movl	%ebx, %esi
	movl	$1, %edx
	movq	%r15, %rcx
	callq	_fread
	movq	%r15, %rdi
	callq	_fclose
	sarl	$2, %ebx
	movq	_sin_numtexinfo@GOTPCREL(%rip), %rax
	movl	%ebx, (%rax)
	movq	(%r12), %rdi
	callq	_FreeMemory
	xorl	%edi, %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_Sin_SwapBSPFile                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_header,8,3                     ## @header
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rb"

	.comm	_SIN_BSPHEADER,8,3              ## @SIN_BSPHEADER
	.comm	_SINGAME_BSPHEADER,8,3          ## @SINGAME_BSPHEADER
L_.str.1:                               ## @.str.1
	.asciz	"%s is not a IBSP file"

	.comm	_SIN_BSPVERSION,8,3             ## @SIN_BSPVERSION
	.comm	_SINGAME_BSPVERSION,8,3         ## @SINGAME_BSPVERSION
L_.str.2:                               ## @.str.2
	.asciz	"%s is version %i, not %i"

	.comm	_SIN_LUMP_TEXINFO,8,3           ## @SIN_LUMP_TEXINFO
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_sin_texinfo,8,3                ## @sin_texinfo
	.comm	_sin_numtexinfo,4,2             ## @sin_numtexinfo
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Sin_LoadBSPFileTexinfo         ; -- Begin function Sin_LoadBSPFileTexinfo
	.p2align	2
_Sin_LoadBSPFileTexinfo:                ; @Sin_LoadBSPFileTexinfo
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x0
	mov	w0, #4
	bl	_GetMemory
Lloh0:
	adrp	x21, _header@GOTPAGE
Lloh1:
	ldr	x21, [x21, _header@GOTPAGEOFF]
	str	x0, [x21]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_fopen
	mov	x19, x0
	ldr	x0, [x21]
	mov	w1, #4
	mov	w2, #1
	mov	x3, x19
	bl	_fread
	ldr	x8, [x21]
	ldr	w0, [x8]
	bl	_LittleLong
	ldr	x8, [x21]
	str	w0, [x8]
	ldr	x9, [x8]
Lloh4:
	adrp	x10, _SIN_BSPHEADER@GOTPAGE
Lloh5:
	ldr	x10, [x10, _SIN_BSPHEADER@GOTPAGEOFF]
Lloh6:
	ldr	x10, [x10]
Lloh7:
	adrp	x11, _SINGAME_BSPHEADER@GOTPAGE
Lloh8:
	ldr	x11, [x11, _SINGAME_BSPHEADER@GOTPAGEOFF]
Lloh9:
	ldr	x11, [x11]
	cmp	x9, x10
	ccmp	x9, x11, #4, ne
	b.eq	LBB0_2
; %bb.1:
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_Error
	ldr	x8, [x21]
LBB0_2:
	ldr	x9, [x8, #8]
Lloh12:
	adrp	x10, _SIN_BSPVERSION@GOTPAGE
Lloh13:
	ldr	x10, [x10, _SIN_BSPVERSION@GOTPAGEOFF]
Lloh14:
	ldr	x10, [x10]
Lloh15:
	adrp	x11, _SINGAME_BSPVERSION@GOTPAGE
Lloh16:
	ldr	x11, [x11, _SINGAME_BSPVERSION@GOTPAGEOFF]
Lloh17:
	ldr	x11, [x11]
	cmp	x9, x10
	ccmp	x9, x11, #4, ne
	b.eq	LBB0_4
; %bb.3:
	stp	x9, x10, [sp]
Lloh18:
	adrp	x0, l_.str.2@PAGE
Lloh19:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x20
	bl	_Error
	ldr	x8, [x21]
LBB0_4:
	ldr	x8, [x8, #16]
Lloh20:
	adrp	x9, _SIN_LUMP_TEXINFO@GOTPAGE
Lloh21:
	ldr	x9, [x9, _SIN_LUMP_TEXINFO@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	add	x8, x8, x9, lsl #3
	ldp	w20, w1, [x8]
Lloh23:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh24:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_fseek
Lloh26:
	adrp	x8, _sin_texinfo@GOTPAGE
Lloh27:
	ldr	x8, [x8, _sin_texinfo@GOTPAGEOFF]
Lloh28:
	ldr	x0, [x8]
	mov	x1, x20
	mov	w2, #1
	mov	x3, x19
	bl	_fread
	mov	x0, x19
	bl	_fclose
	asr	w8, w20, #2
Lloh29:
	adrp	x9, _sin_numtexinfo@GOTPAGE
Lloh30:
	ldr	x9, [x9, _sin_numtexinfo@GOTPAGEOFF]
Lloh31:
	str	w8, [x9]
	ldr	x0, [x21]
	bl	_FreeMemory
	mov	w0, #0
	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
	add	sp, sp, #64
	b	_Sin_SwapBSPFile
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotStr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_header,8,3                     ; @header
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rb"

	.comm	_SIN_BSPHEADER,8,3              ; @SIN_BSPHEADER
	.comm	_SINGAME_BSPHEADER,8,3          ; @SINGAME_BSPHEADER
l_.str.1:                               ; @.str.1
	.asciz	"%s is not a IBSP file"

	.comm	_SIN_BSPVERSION,8,3             ; @SIN_BSPVERSION
	.comm	_SINGAME_BSPVERSION,8,3         ; @SINGAME_BSPVERSION
l_.str.2:                               ; @.str.2
	.asciz	"%s is version %i, not %i"

	.comm	_SIN_LUMP_TEXINFO,8,3           ; @SIN_LUMP_TEXINFO
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_sin_texinfo,8,3                ; @sin_texinfo
	.comm	_sin_numtexinfo,4,2             ; @sin_numtexinfo
.subsections_via_symbols
