	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_TPL_OpenTPLFromMemory          ## -- Begin function TPL_OpenTPLFromMemory
	.p2align	4, 0x90
_TPL_OpenTPLFromMemory:                 ## @TPL_OpenTPLFromMemory
	.cfi_startproc
## %bb.0:
	movl	$-1, %eax
	testq	%rsi, %rsi
	je	LBB0_9
## %bb.1:
	testq	%rdx, %rdx
	je	LBB0_9
## %bb.2:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_TPL_FILE_TYPE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rdi)
	movq	$0, 16(%rdi)
	movq	_TPL_HDR_NTEXTURE_FIELD@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movq	(%rsi,%rax), %rax
	movq	%rax, (%rdi)
	movq	_TPL_HDR_DESCR_FIELD@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	leaq	(%rsi,%rcx), %r8
	testq	%rax, %rax
	je	LBB0_8
## %bb.3:
	leaq	(%rcx,%rsi), %rdx
	addq	$8, %rdx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	leaq	(%rsi,%rcx), %r10
	addq	%rsi, (%rsi,%rcx)
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%r9, (%rdx)
	movq	%r10, -8(%rdx)
	addq	$16, %rdx
	decq	%rax
	je	LBB0_8
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rdx), %rcx
	addq	%rsi, (%rsi,%rcx)
	leaq	(%rsi,%rcx), %r9
	movq	-8(%rdx), %rcx
	testq	%rcx, %rcx
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	xorl	%r10d, %r10d
	jmp	LBB0_7
LBB0_8:
	movq	%r8, 8(%rdi)
	movl	$1, %eax
	popq	%rbp
LBB0_9:
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TPL_FILE_TYPE_MEM,4,2          ## @TPL_FILE_TYPE_MEM
	.comm	_TPL_HDR_NTEXTURE_FIELD,4,2     ## @TPL_HDR_NTEXTURE_FIELD
	.comm	_TPL_HDR_DESCR_FIELD,4,2        ## @TPL_HDR_DESCR_FIELD
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_TPL_OpenTPLFromMemory          ; -- Begin function TPL_OpenTPLFromMemory
	.p2align	2
_TPL_OpenTPLFromMemory:                 ; @TPL_OpenTPLFromMemory
	.cfi_startproc
; %bb.0:
	mov	w8, #-1
	cbz	x1, LBB0_8
; %bb.1:
	cbz	x2, LBB0_8
; %bb.2:
Lloh0:
	adrp	x8, _TPL_FILE_TYPE_MEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TPL_FILE_TYPE_MEM@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
	str	xzr, [x0, #16]
Lloh3:
	adrp	x8, _TPL_HDR_NTEXTURE_FIELD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TPL_HDR_NTEXTURE_FIELD@GOTPAGEOFF]
Lloh5:
	ldrsw	x8, [x8]
	ldr	x8, [x1, x8]
	str	w9, [x0, #24]
	str	x8, [x0]
Lloh6:
	adrp	x9, _TPL_HDR_DESCR_FIELD@GOTPAGE
Lloh7:
	ldr	x9, [x9, _TPL_HDR_DESCR_FIELD@GOTPAGEOFF]
Lloh8:
	ldrsw	x10, [x9]
	add	x9, x1, x10
	cbz	x8, LBB0_7
; %bb.3:
	add	x10, x10, x1
	add	x10, x10, #8
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	stp	x12, x11, [x10, #-8]
	add	x10, x10, #16
	subs	x8, x8, #1
	b.eq	LBB0_7
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x10]
	add	x11, x1, x11
	ldr	x12, [x11]
	add	x12, x1, x12
	str	x12, [x11]
	ldur	x12, [x10, #-8]
	cbz	x12, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x12, x1, x12
	ldr	x13, [x12]
	add	x13, x1, x13
	str	x13, [x12]
	b	LBB0_4
LBB0_7:
	str	x9, [x0, #8]
	mov	w8, #1
LBB0_8:
	mov	x0, x8
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_TPL_FILE_TYPE_MEM,4,2          ; @TPL_FILE_TYPE_MEM
	.comm	_TPL_HDR_NTEXTURE_FIELD,4,2     ; @TPL_HDR_NTEXTURE_FIELD
	.comm	_TPL_HDR_DESCR_FIELD,4,2        ; @TPL_HDR_DESCR_FIELD
.subsections_via_symbols
