	.file	"extr_FileIO.c_InitHamcore.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str4.4,"aMS",@progbits,4
	.align 4
.LC0:
	.string	"%"
	.string	""
	.string	""
	.string	"s"
	.string	""
	.string	""
	.string	"/"
	.string	""
	.string	""
	.string	"%"
	.string	""
	.string	""
	.string	"S"
	.string	""
	.string	""
	.string	""
	.string	""
	.string	""
	.string	""
	.section	.rodata.str4.8,"aMS",@progbits,4
	.align 8
.LC1:
	.string	"/"
	.string	""
	.string	""
	.string	"b"
	.string	""
	.string	""
	.string	"i"
	.string	""
	.string	""
	.string	"n"
	.string	""
	.string	""
	.string	"/"
	.string	""
	.string	""
	.string	"%"
	.string	""
	.string	""
	.string	"S"
	.string	""
	.string	""
	.string	""
	.string	""
	.string	""
	.string	""
	.text
	.p2align 4
	.globl	InitHamcore
	.type	InitHamcore, @function
InitHamcore:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	push	r12
	push	rbx
	sub	rsp, 56
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR MAX_PATH[rip]
	mov	rdi, rsp
	mov	rbx, rsp
	mov	r13, rax
	lea	rax, 15[0+rax*4]
	mov	rsi, rax
	mov	rcx, rax
	and	rsi, -4096
	and	rcx, -16
	sub	rdi, rsi
	mov	rsi, rdi
	cmp	rsp, rsi
	je	.L3
.L51:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rsi
	jne	.L51
.L3:
	and	ecx, 4095
	sub	rsp, rcx
	test	rcx, rcx
	jne	.L52
.L4:
	mov	rsi, rax
	mov	rdx, rsp
	mov	rcx, rax
	mov	r12, rsp
	and	rsi, -4096
	and	rcx, -16
	sub	rdx, rsi
	mov	rsi, rdx
	cmp	rsp, rsi
	je	.L6
.L53:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rsi
	jne	.L53
.L6:
	and	ecx, 4095
	sub	rsp, rcx
	test	rcx, rcx
	jne	.L54
.L7:
	mov	rcx, rax
	mov	rdx, rsp
	and	rax, -4096
	mov	r15, rsp
	sub	rdx, rax
	and	rcx, -16
	mov	rax, rdx
	cmp	rsp, rax
	je	.L9
.L55:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L55
.L9:
	and	ecx, 4095
	sub	rsp, rcx
	test	rcx, rcx
	je	.L10
	or	QWORD PTR -8[rsp+rcx], 0
.L10:
	movsx	rax, DWORD PTR HAMCORE_HEADER_SIZE[rip]
	mov	rdx, rsp
	mov	QWORD PTR -88[rbp], rsp
	mov	DWORD PTR -92[rbp], eax
	add	rax, 15
	mov	rcx, rax
	and	rax, -4096
	sub	rdx, rax
	and	rcx, -16
	mov	rax, rdx
	cmp	rsp, rax
	je	.L12
.L56:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L56
.L12:
	and	ecx, 4095
	sub	rsp, rcx
	test	rcx, rcx
	je	.L13
	or	QWORD PTR -8[rsp+rcx], 0
.L13:
	mov	edi, DWORD PTR CompareHamcore[rip]
	mov	r14, rsp
	call	NewList@PLT
	mov	DWORD PTR hamcore[rip], eax
	xor	eax, eax
	call	MayaquaIsMinimalMode@PLT
	test	rax, rax
	jne	.L19
	sal	r13d, 2
	mov	rdi, QWORD PTR -88[rbp]
	mov	esi, r13d
	call	GetExeDirW@PLT
	mov	ecx, DWORD PTR -88[rbp]
	mov	esi, r13d
	mov	rdi, r12
	mov	r8d, DWORD PTR HAMCORE_FILE_NAME[rip]
	lea	rdx, .LC0[rip]
	xor	eax, eax
	call	UniFormat@PLT
	mov	ecx, DWORD PTR -88[rbp]
	mov	esi, r13d
	mov	rdi, r15
	mov	r8d, DWORD PTR HAMCORE_FILE_NAME_2[rip]
	lea	rdx, .LC0[rip]
	xor	eax, eax
	call	UniFormat@PLT
	mov	rsi, r12
	mov	rdi, r15
	call	FileReplaceRenameW@PLT
	xor	esi, esi
	mov	rdi, r12
	call	FileOpenW@PLT
	mov	QWORD PTR hamcore_io[rip], rax
	test	rax, rax
	je	.L15
.L18:
	mov	esi, DWORD PTR -92[rbp]
	mov	rdi, r14
	call	Zero@PLT
	mov	edx, DWORD PTR HAMCORE_HEADER_SIZE[rip]
	mov	rsi, r14
	xor	eax, eax
	mov	rdi, QWORD PTR hamcore_io[rip]
	call	FileRead@PLT
	mov	edx, DWORD PTR HAMCORE_HEADER_SIZE[rip]
	mov	esi, DWORD PTR HAMCORE_HEADER_DATA[rip]
	mov	rdi, r14
	call	Cmp@PLT
	mov	r13, rax
	test	rax, rax
	jne	.L57
	mov	rdi, QWORD PTR hamcore_io[rip]
	lea	rsi, -72[rbp]
	mov	edx, 8
	xor	eax, eax
	mov	QWORD PTR -72[rbp], 0
	call	FileRead@PLT
	mov	rdi, QWORD PTR -72[rbp]
	call	Endian32@PLT
	mov	QWORD PTR -72[rbp], rax
	test	rax, rax
	jle	.L19
	lea	r15, -64[rbp]
.L26:
	movsx	rax, DWORD PTR MAX_SIZE[rip]
	mov	rcx, rsp
	mov	r14, rsp
	mov	r12, rax
	add	rax, 15
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L22
.L58:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L58
.L22:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	je	.L23
	or	QWORD PTR -8[rsp+rdx], 0
.L23:
	mov	rdi, QWORD PTR hamcore_io[rip]
	mov	edx, 8
	mov	rsi, r15
	xor	eax, eax
	mov	QWORD PTR -64[rbp], 0
	call	FileRead@PLT
	mov	rdi, QWORD PTR -64[rbp]
	call	Endian32@PLT
	mov	esi, r12d
	mov	rdi, rsp
	test	rax, rax
	lea	rdx, -1[rax]
	cmovg	rax, rdx
	add	r13, 1
	mov	QWORD PTR -64[rbp], rax
	call	Zero@PLT
	mov	rdx, QWORD PTR -64[rbp]
	mov	rsi, rsp
	xor	eax, eax
	mov	rdi, QWORD PTR hamcore_io[rip]
	call	FileRead@PLT
	mov	edi, 8
	call	ZeroMalloc@PLT
	mov	rdi, rsp
	mov	r12, rax
	call	CopyStr@PLT
	mov	rdi, QWORD PTR hamcore_io[rip]
	mov	edx, 8
	mov	rsi, r12
	mov	DWORD PTR 4[r12], eax
	xor	eax, eax
	call	FileRead@PLT
	movsx	rdi, BYTE PTR [r12]
	call	Endian32@PLT
	lea	rsi, 1[r12]
	mov	edx, 8
	mov	BYTE PTR [r12], al
	mov	rdi, QWORD PTR hamcore_io[rip]
	xor	eax, eax
	call	FileRead@PLT
	movsx	rdi, BYTE PTR 1[r12]
	call	Endian32@PLT
	lea	rsi, 2[r12]
	mov	edx, 8
	mov	BYTE PTR 1[r12], al
	mov	rdi, QWORD PTR hamcore_io[rip]
	xor	eax, eax
	call	FileRead@PLT
	movsx	rdi, BYTE PTR 2[r12]
	call	Endian32@PLT
	mov	rsi, r12
	mov	BYTE PTR 2[r12], al
	mov	edi, DWORD PTR hamcore[rip]
	call	Insert@PLT
	mov	rsp, r14
	cmp	QWORD PTR -72[rbp], r13
	jg	.L26
.L19:
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	mov	rsp, rbx
	jne	.L59
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L52:
	.cfi_restore_state
	or	QWORD PTR -8[rsp+rcx], 0
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L54:
	or	QWORD PTR -8[rsp+rcx], 0
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L57:
	mov	rdi, QWORD PTR hamcore_io[rip]
	call	FileClose@PLT
	mov	QWORD PTR hamcore_io[rip], 0
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L15:
	mov	ecx, DWORD PTR HAMCORE_FILE_NAME[rip]
	mov	esi, r13d
	mov	rdi, r12
	xor	eax, eax
	lea	rdx, .LC1[rip]
	call	UniFormat@PLT
	xor	esi, esi
	mov	rdi, r12
	call	FileOpenW@PLT
	mov	QWORD PTR hamcore_io[rip], rax
	test	rax, rax
	jne	.L18
	jmp	.L19
.L59:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	InitHamcore, .-InitHamcore
	.comm	hamcore_io,8,8
	.comm	hamcore,4,4
	.comm	MAX_SIZE,4,4
	.comm	MAX_PATH,4,4
	.comm	HAMCORE_HEADER_SIZE,4,4
	.comm	HAMCORE_HEADER_DATA,4,4
	.comm	HAMCORE_FILE_NAME_2,4,4
	.comm	HAMCORE_FILE_NAME,4,4
	.comm	CompareHamcore,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_FileIO.c_InitHamcore.c"
	.text
	.section	.rodata.str4.4,"aMS",%progbits,4
	.align	2
.LC0:
	.ascii	"%\000\000\000s\000\000\000/\000\000\000%\000\000\000"
	.ascii	"S\000\000\000\000\000\000\000"
	.align	2
.LC1:
	.ascii	"/\000\000\000b\000\000\000i\000\000\000n\000\000\000"
	.ascii	"/\000\000\000%\000\000\000S\000\000\000\000\000\000"
	.ascii	"\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	InitHamcore
	.syntax unified
	.arm
	.fpu softvfp
	.type	InitHamcore, %function
InitHamcore:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #44
	ldr	r3, .L25
	ldr	r10, .L25+4
	ldr	r4, [r3]
	ldr	r2, [r10]
	lsl	r4, r4, #2
	add	r3, r4, #7
	bic	r3, r3, #7
	str	sp, [fp, #-56]
	sub	sp, sp, r3
	ldr	r1, .L25+8
	str	r2, [fp, #-64]
	add	r6, sp, #8
	add	r2, r2, #7
	sub	sp, sp, r3
	bic	r2, r2, #7
	add	r7, sp, #8
	sub	sp, sp, r3
	ldr	r3, .L25+12
	ldr	r0, [r1]
	add	r5, sp, #8
	sub	sp, sp, r2
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	bl	NewList
	ldr	r8, .L25+16
	str	r0, [r8]
	bl	MayaquaIsMinimalMode
	subs	r3, r0, #0
	str	r3, [fp, #-60]
	beq	.L22
.L7:
	ldr	r3, .L25+12
	ldr	sp, [fp, #-56]
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L23
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L22:
	mov	r1, r4
	mov	r0, r5
	bl	GetExeDirW
	ldr	r2, .L25+20
	mov	r3, r5
	ldr	r2, [r2]
	mov	r1, r4
	str	r2, [sp]
	mov	r0, r6
	ldr	r2, .L25+24
	bl	UniFormat
	ldr	r2, .L25+28
	mov	r3, r5
	ldr	r1, [r2]
	mov	r0, r7
	ldr	r2, .L25+24
	str	r1, [sp]
	mov	r1, r4
	bl	UniFormat
	mov	r1, r6
	mov	r0, r7
	bl	FileReplaceRenameW
	mov	r0, r6
	ldr	r1, [fp, #-60]
	bl	FileOpenW
	ldr	r5, .L25+32
	cmp	r0, #0
	mov	r7, r0
	add	r9, sp, #8
	str	r0, [r5]
	beq	.L3
.L6:
	ldr	r1, [fp, #-64]
	mov	r0, r9
	bl	Zero
	mov	r1, r9
	ldr	r2, [r10]
	ldr	r0, [r5]
	bl	FileRead
	ldr	r3, .L25+36
	mov	r0, r9
	ldr	r2, [r10]
	ldr	r1, [r3]
	bl	Cmp
	subs	r6, r0, #0
	bne	.L24
	mov	r2, #4
	sub	r1, fp, #48
	ldr	r0, [r5]
	str	r6, [fp, #-48]
	bl	FileRead
	ldr	r0, [fp, #-48]
	bl	Endian32
	cmp	r0, #0
	str	r0, [fp, #-48]
	ble	.L7
	mov	r10, r6
.L11:
	ldr	r3, .L25+40
	mov	r2, #4
	ldr	r4, [r3]
	sub	r1, fp, #44
	add	r3, r4, #7
	bic	r3, r3, #7
	mov	r7, sp
	ldr	r0, [r5]
	sub	sp, sp, r3
	str	r10, [fp, #-44]
	bl	FileRead
	ldr	r0, [fp, #-44]
	bl	Endian32
	cmp	r0, #0
	subgt	r0, r0, #1
	add	r9, sp, #8
	mov	r1, r4
	str	r0, [fp, #-44]
	mov	r0, r9
	bl	Zero
	mov	r1, r9
	ldr	r2, [fp, #-44]
	ldr	r0, [r5]
	bl	FileRead
	mov	r0, #8
	bl	ZeroMalloc
	mov	r4, r0
	mov	r0, r9
	bl	CopyStr
	mov	r1, r4
	mov	r2, #4
	str	r0, [r4, #4]
	ldr	r0, [r5]
	bl	FileRead
	ldrb	r0, [r4]	@ zero_extendqisi2
	bl	Endian32
	mov	r1, r4
	strb	r0, [r1], #1
	mov	r2, #4
	ldr	r0, [r5]
	bl	FileRead
	ldrb	r0, [r4, #1]	@ zero_extendqisi2
	bl	Endian32
	strb	r0, [r4, #1]
	mov	r2, #4
	add	r1, r4, #2
	ldr	r0, [r5]
	bl	FileRead
	ldrb	r0, [r4, #2]	@ zero_extendqisi2
	bl	Endian32
	strb	r0, [r4, #2]
	mov	r1, r4
	ldr	r0, [r8]
	bl	Insert
	ldr	r3, [fp, #-48]
	add	r6, r6, #1
	cmp	r3, r6
	mov	sp, r7
	bgt	.L11
	b	.L7
.L24:
	ldr	r0, [r5]
	bl	FileClose
	mov	r3, #0
	str	r3, [r5]
	b	.L7
.L3:
	ldr	r3, .L25+20
	mov	r1, r4
	ldr	r3, [r3]
	ldr	r2, .L25+44
	mov	r0, r6
	bl	UniFormat
	mov	r1, r7
	mov	r0, r6
	bl	FileOpenW
	cmp	r0, #0
	str	r0, [r5]
	bne	.L6
	b	.L7
.L23:
	bl	__stack_chk_fail
.L26:
	.align	2
.L25:
	.word	MAX_PATH
	.word	HAMCORE_HEADER_SIZE
	.word	CompareHamcore
	.word	.LC2
	.word	hamcore
	.word	HAMCORE_FILE_NAME
	.word	.LC0
	.word	HAMCORE_FILE_NAME_2
	.word	hamcore_io
	.word	HAMCORE_HEADER_DATA
	.word	MAX_SIZE
	.word	.LC1
	.size	InitHamcore, .-InitHamcore
	.comm	hamcore_io,4,4
	.comm	hamcore,4,4
	.comm	MAX_SIZE,4,4
	.comm	MAX_PATH,4,4
	.comm	HAMCORE_HEADER_SIZE,4,4
	.comm	HAMCORE_HEADER_DATA,4,4
	.comm	HAMCORE_FILE_NAME_2,4,4
	.comm	HAMCORE_FILE_NAME,4,4
	.comm	CompareHamcore,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
