
.intel_syntax noprefix

.global elf_init

.extern dwarf_create_sections
.extern GetSegIdx
.extern SizeFromMemtype
.extern SymTables
.extern LclAlloc
.extern Mangle
.extern asmerr
.extern Options
.extern WriteError
.extern SymFind
.extern tfseek
.extern tfwrite
.extern tstrcat
.extern tstrcpy
.extern tstrlen
.extern tmemcmp
.extern tmemset
.extern tmemcpy
.extern fseek
.extern fwrite


.SECTION .text
	.ALIGN	16

$_001:	mov	qword ptr [rsp+0x10], rdx
	push	rsi
	push	rdi
	push	rbx
	push	rbp
	mov	rbp, rsp
	sub	rsp, 40
	mov	rsi, qword ptr [rcx+0x8]
	lea	rdi, [convsection+rip]
	xor	ebx, ebx
$_002:	cmp	ebx, 4
	jnc	$_005
	movzx	r8d, byte ptr [rdi]
	mov	rdx, qword ptr [rdi+0x8]
	mov	rcx, rsi
	call	tmemcmp@PLT
	test	eax, eax
	jnz	$_004
	movzx	edx, byte ptr [rdi]
	cmp	byte ptr [rsi+rdx], 0
	jnz	$_003
	mov	rax, qword ptr [rdi+0x10]
	jmp	$_006

	jmp	$_004

$_003:	test	byte ptr [rdi+0x1], 0x01
	jz	$_004
	cmp	byte ptr [rsi+rdx], 36
	jnz	$_004
	add	rsi, rdx
	mov	rdx, qword ptr [rdi+0x10]
	mov	rcx, qword ptr [rbp+0x30]
	call	tstrcpy@PLT
	mov	rdx, rsi
	mov	rcx, rax
	call	tstrcat@PLT
	jmp	$_006

$_004:	inc	ebx
	add	rdi, 24
	jmp	$_002

$_005:	mov	rax, rsi
$_006:	leave
	pop	rbx
	pop	rdi
	pop	rsi
	ret

$_007:
	xor	eax, eax
	mov	rcx, qword ptr [SymTables+0x20+rip]
$_008:	test	rcx, rcx
	jz	$_010
	mov	rdx, qword ptr [rcx+0x78]
	cmp	qword ptr [rdx+0x28], 0
	jz	$_009
	inc	eax
$_009:	mov	rcx, qword ptr [rcx+0x80]
	jmp	$_008

$_010:
	ret

$_011:
	mov	qword ptr [rsp+0x18], r8
	push	rsi
	push	rdi
	push	rbx
	push	rbp
	mov	rbp, rsp
	sub	rsp, 296
	mov	dword ptr [rbp-0x8], 1
	mov	rbx, rcx
	mov	eax, 16
	cmp	byte ptr [r14+0x5], 2
	jnz	$_012
	mov	eax, 24
$_012:	mov	esi, eax
	mul	edx
	mov	dword ptr [rbx+0x28], eax
	mov	ecx, eax
	call	LclAlloc@PLT
	mov	qword ptr [rbx+0x30], rax
	lea	rdi, [rax+rsi]
	mov	dword ptr [rdi], 1
	mov	rcx, qword ptr [rbx+0x8]
	call	tstrlen@PLT
	inc	rax
	add	dword ptr [rbp-0x8], eax
	cmp	byte ptr [r14+0x5], 2
	jnz	$_013
	mov	byte ptr [rdi+0x4], 4
	mov	word ptr [rdi+0x6], -15
	jmp	$_014

$_013:	mov	byte ptr [rdi+0xC], 4
	mov	word ptr [rdi+0xE], -15
$_014:	add	rdi, rsi
	mov	ebx, esi
	mov	rsi, qword ptr [SymTables+0x20+rip]
$_015:	test	rsi, rsi
	jz	$_018
	mov	rcx, qword ptr [rsi+0x40]
	call	GetSegIdx@PLT
	cmp	byte ptr [r14+0x5], 2
	jnz	$_016
	mov	byte ptr [rdi+0x4], 3
	mov	word ptr [rdi+0x6], ax
	jmp	$_017

$_016:	mov	byte ptr [rdi+0xC], 3
	mov	word ptr [rdi+0xE], ax
$_017:	add	rdi, rbx
	mov	rsi, qword ptr [rsi+0x80]
	jmp	$_015

$_018:
	mov	rsi, qword ptr [rbp+0x38]
$_019:	test	rsi, rsi
	je	$_030
	lea	rdx, [rbp-0x108]
	mov	rcx, qword ptr [rsi+0x8]
	call	Mangle@PLT
	lea	ecx, [rax+0x1]
	mov	eax, dword ptr [rbp-0x8]
	mov	dword ptr [rdi], eax
	add	dword ptr [rbp-0x8], ecx
	mov	rcx, qword ptr [rsi+0x8]
	mov	rdx, qword ptr [rcx+0x40]
	test	rdx, rdx
	jz	$_020
	mov	rax, qword ptr [rdx+0x78]
$_020:	test	rdx, rdx
	jz	$_021
	cmp	dword ptr [rax+0x48], 1
	jz	$_021
	mov	eax, 1
	jmp	$_022

$_021:	mov	eax, 2
$_022:	cmp	byte ptr [r14+0x5], 2
	jnz	$_023
	mov	byte ptr [rdi+0x4], al
	jmp	$_024

$_023:	mov	byte ptr [rdi+0xC], al
$_024:	mov	eax, dword ptr [rcx+0x30]
	cmp	byte ptr [r14+0x5], 2
	jnz	$_025
	mov	qword ptr [rdi+0x8], rax
	jmp	$_026

$_025:	mov	dword ptr [rdi+0x4], eax
$_026:	mov	eax, 65521
	test	rdx, rdx
	jz	$_027
	mov	rcx, rdx
	call	GetSegIdx@PLT
$_027:	cmp	byte ptr [r14+0x5], 2
	jnz	$_028
	mov	word ptr [rdi+0x6], ax
	jmp	$_029

$_028:	mov	word ptr [rdi+0xE], ax
$_029:	add	rdi, rbx
	mov	rsi, qword ptr [rsi]
	jmp	$_019

$_030:
	mov	rsi, qword ptr [SymTables+0x10+rip]
$_031:	test	rsi, rsi
	je	$_040
	test	byte ptr [rsi+0x4B], 0x01
	jnz	$_032
	test	byte ptr [rsi+0x4B], 0x02
	jnz	$_039
$_032:	lea	rdx, [rbp-0x108]
	mov	rcx, rsi
	call	Mangle@PLT
	lea	ecx, [rax+0x1]
	mov	eax, dword ptr [rbp-0x8]
	mov	dword ptr [rdi], eax
	add	dword ptr [rbp-0x8], ecx
	test	byte ptr [rsi+0x4B], 0x01
	jz	$_033
	mov	eax, 21
	mov	ecx, dword ptr [rsi+0x60]
	mov	edx, 65522
	jmp	$_036

$_033:	mov	rax, rsi
	test	byte ptr [rax+0x4B], 0x01
	jnz	$_034
	cmp	qword ptr [rax+0x68], 0
	jz	$_034
	mov	eax, 32
	jmp	$_035

$_034:	mov	eax, 16
$_035:	mov	ecx, dword ptr [rsi+0x30]
	mov	edx, 0
$_036:	cmp	byte ptr [r14+0x5], 2
	jnz	$_037
	mov	byte ptr [rdi+0x4], al
	mov	qword ptr [rdi+0x8], rcx
	mov	word ptr [rdi+0x6], dx
	jmp	$_038

$_037:	mov	byte ptr [rdi+0xC], al
	mov	dword ptr [rdi+0x4], ecx
	mov	word ptr [rdi+0xE], dx
$_038:	add	rdi, rbx
$_039:	mov	rsi, qword ptr [rsi+0x80]
	jmp	$_031

$_040:
	mov	rsi, qword ptr [SymTables+0x50+rip]
$_041:	test	rsi, rsi
	je	$_057
	mov	rcx, qword ptr [rsi+0x30]
	mov	al, byte ptr [rcx+0x1F]
	mov	byte ptr [rsi+0x1F], al
	lea	rdx, [rbp-0x108]
	mov	rcx, rsi
	call	Mangle@PLT
	lea	ecx, [rax+0x1]
	mov	eax, dword ptr [rbp-0x8]
	mov	dword ptr [rdi], eax
	add	dword ptr [rbp-0x8], ecx
	mov	rcx, qword ptr [rsi+0x30]
	cmp	byte ptr [rcx+0x1D], 1
	jne	$_054
	test	byte ptr [rcx+0x10], 0x04
	je	$_054
	mov	rdx, qword ptr [rcx+0x40]
	test	byte ptr [r14], 0x80
	jz	$_043
	test	byte ptr [rcx+0x10], 0x20
	jnz	$_043
	cmp	byte ptr [r14+0x5], 2
	jnz	$_042
	mov	byte ptr [rdi+0x5], 1
	jmp	$_043

$_042:	mov	byte ptr [rdi+0xD], 1
$_043:	test	rdx, rdx
	jz	$_047
	xor	r8d, r8d
	mov	edx, 254
	movzx	ecx, byte ptr [rcx+0x1E]
	call	SizeFromMemtype@PLT
	mov	rcx, qword ptr [rsi+0x30]
	mov	rdx, qword ptr [rcx+0x40]
	test	eax, eax
	jnz	$_044
	mov	eax, dword ptr [rcx+0x60]
$_044:	cmp	byte ptr [r14+0x5], 2
	jnz	$_045
	mov	qword ptr [rdi+0x10], rax
	jmp	$_046

$_045:	mov	dword ptr [rdi+0x8], eax
$_046:	mov	rcx, qword ptr [rdx+0x78]
$_047:	mov	eax, 18
	test	rdx, rdx
	jz	$_048
	cmp	dword ptr [rcx+0x48], 1
	jz	$_048
	mov	eax, 17
$_048:	mov	rcx, qword ptr [rsi+0x30]
	mov	ecx, dword ptr [rcx+0x30]
	cmp	byte ptr [r14+0x5], 2
	jnz	$_049
	mov	byte ptr [rdi+0x4], al
	mov	qword ptr [rdi+0x8], rcx
	jmp	$_050

$_049:	mov	byte ptr [rdi+0xC], al
	mov	dword ptr [rdi+0x4], ecx
$_050:	mov	eax, 0
	mov	rcx, qword ptr [rsi+0x30]
	cmp	byte ptr [rcx+0x1D], 1
	jnz	$_051
	mov	eax, 65521
	test	rdx, rdx
	jz	$_051
	mov	rcx, rdx
	call	GetSegIdx@PLT
$_051:	cmp	byte ptr [r14+0x5], 2
	jnz	$_052
	mov	word ptr [rdi+0x6], ax
	jmp	$_053

$_052:	mov	word ptr [rdi+0xE], ax
$_053:	jmp	$_056

$_054:	mov	eax, 32
	xor	ecx, ecx
	mov	edx, 0
	cmp	byte ptr [r14+0x5], 2
	jnz	$_055
	mov	byte ptr [rdi+0x4], al
	mov	qword ptr [rdi+0x8], rcx
	mov	word ptr [rdi+0x6], dx
	jmp	$_056

$_055:	mov	byte ptr [rdi+0xC], al
	mov	dword ptr [rdi+0x4], ecx
	mov	word ptr [rdi+0xE], dx
$_056:	add	rdi, rbx
	mov	rsi, qword ptr [rsi+0x80]
	jmp	$_041

$_057:
	mov	rsi, qword ptr [r14+0x238]
$_058:	test	rsi, rsi
	je	$_071
	lea	rdx, [rbp-0x108]
	mov	rcx, qword ptr [rsi+0x8]
	call	Mangle@PLT
	lea	ecx, [rax+0x1]
	mov	eax, dword ptr [rbp-0x8]
	mov	dword ptr [rdi], eax
	add	dword ptr [rbp-0x8], ecx
	mov	rcx, qword ptr [rsi+0x8]
	mov	rdx, qword ptr [rcx+0x40]
	test	byte ptr [r14], 0x80
	jz	$_060
	test	byte ptr [rcx+0x10], 0x20
	jnz	$_060
	cmp	byte ptr [r14+0x5], 2
	jnz	$_059
	mov	byte ptr [rdi+0x5], 1
	jmp	$_060

$_059:	mov	byte ptr [rdi+0xD], 1
$_060:	test	rdx, rdx
	jz	$_064
	xor	r8d, r8d
	mov	edx, 254
	movzx	ecx, byte ptr [rcx+0x1E]
	call	SizeFromMemtype@PLT
	mov	rcx, qword ptr [rsi+0x8]
	mov	rdx, qword ptr [rcx+0x40]
	test	eax, eax
	jnz	$_061
	mov	eax, dword ptr [rcx+0x60]
$_061:	cmp	byte ptr [r14+0x5], 2
	jnz	$_062
	mov	qword ptr [rdi+0x10], rax
	jmp	$_063

$_062:	mov	dword ptr [rdi+0x8], eax
$_063:	mov	rcx, qword ptr [rdx+0x78]
$_064:	mov	eax, 18
	test	rdx, rdx
	jz	$_065
	cmp	dword ptr [rcx+0x48], 1
	jz	$_065
	mov	eax, 17
$_065:	mov	rcx, qword ptr [rsi+0x8]
	mov	ecx, dword ptr [rcx+0x30]
	cmp	byte ptr [r14+0x5], 2
	jnz	$_066
	mov	byte ptr [rdi+0x4], al
	mov	qword ptr [rdi+0x8], rcx
	jmp	$_067

$_066:	mov	byte ptr [rdi+0xC], al
	mov	dword ptr [rdi+0x4], ecx
$_067:	mov	eax, 0
	mov	rcx, qword ptr [rsi+0x8]
	cmp	byte ptr [rcx+0x1D], 1
	jnz	$_068
	mov	eax, 65521
	test	rdx, rdx
	jz	$_068
	mov	rcx, rdx
	call	GetSegIdx@PLT
$_068:	cmp	byte ptr [r14+0x5], 2
	jnz	$_069
	mov	word ptr [rdi+0x6], ax
	jmp	$_070

$_069:	mov	word ptr [rdi+0xE], ax
$_070:	add	rdi, rbx
	mov	rsi, qword ptr [rsi]
	jmp	$_058

$_071:
	mov	eax, dword ptr [rbp-0x8]
	leave
	pop	rbx
	pop	rdi
	pop	rsi
	ret

$_072:
	push	rsi
	push	rdi
	push	rbx
	push	rbp
	mov	rbp, rsp
	sub	rsp, 56
	mov	qword ptr [rbp-0x18], 0
	mov	qword ptr [rbp-0x10], 0
	mov	rbx, rcx
	mov	dword ptr [rbx], 2
	mov	rsi, qword ptr [SymTables+0x20+rip]
$_073:	test	rsi, rsi
	jz	$_074
	mov	eax, dword ptr [rbx]
	mov	dword ptr [rsi+0x70], eax
	inc	dword ptr [rbx]
	mov	rsi, qword ptr [rsi+0x80]
	jmp	$_073

$_074:
	mov	rsi, qword ptr [SymTables+0x20+rip]
$_075:	test	rsi, rsi
	je	$_082
	mov	rcx, qword ptr [rsi+0x78]
	cmp	dword ptr [rcx+0x40], 0
	jz	$_081
	mov	rdi, qword ptr [rcx+0x28]
$_076:	test	rdi, rdi
	jz	$_081
	mov	rcx, qword ptr [rdi+0x30]
	test	byte ptr [rcx+0x10], 0x80
	jz	$_077
	mov	rax, qword ptr [rdi+0x20]
	mov	qword ptr [rdi+0x30], rax
	jmp	$_080

$_077:	cmp	byte ptr [rcx+0x1D], 1
	jnz	$_080
	test	byte ptr [rcx+0x10], 0x04
	jnz	$_080
	test	byte ptr [rcx+0x11], 0x08
	jnz	$_080
	or	byte ptr [rcx+0x11], 0x08
	mov	ecx, 16
	call	LclAlloc@PLT
	mov	rcx, qword ptr [rdi+0x30]
	mov	qword ptr [rax+0x8], rcx
	cmp	qword ptr [rbp-0x10], 0
	jz	$_078
	mov	rdx, qword ptr [rbp-0x10]
	mov	qword ptr [rdx], rax
	mov	qword ptr [rbp-0x10], rax
	jmp	$_079

$_078:	mov	qword ptr [rbp-0x18], rax
	mov	qword ptr [rbp-0x10], rax
$_079:	mov	eax, dword ptr [rbx]
	mov	dword ptr [rcx+0x70], eax
	inc	dword ptr [rbx]
$_080:	mov	rdi, qword ptr [rdi+0x8]
	jmp	$_076

$_081:	mov	rsi, qword ptr [rsi+0x80]
	jmp	$_075

$_082:
	mov	eax, dword ptr [rbx]
	mov	dword ptr [rbx+0x4], eax
	mov	rcx, qword ptr [SymTables+0x10+rip]
$_083:	test	rcx, rcx
	jz	$_086
	test	byte ptr [rcx+0x4B], 0x01
	jnz	$_084
	test	byte ptr [rcx+0x4B], 0x02
	jz	$_084
	jmp	$_085

$_084:	mov	eax, dword ptr [rbx]
	mov	dword ptr [rcx+0x70], eax
	inc	dword ptr [rbx]
$_085:	mov	rcx, qword ptr [rcx+0x80]
	jmp	$_083

$_086:
	mov	rcx, qword ptr [SymTables+0x50+rip]
$_087:	test	rcx, rcx
	jz	$_088
	mov	eax, dword ptr [rbx]
	mov	dword ptr [rcx+0x70], eax
	inc	dword ptr [rbx]
	mov	rcx, qword ptr [rcx+0x80]
	jmp	$_087

$_088:
	mov	rcx, qword ptr [r14+0x238]
$_089:	test	rcx, rcx
	jz	$_090
	mov	rdx, qword ptr [rcx+0x8]
	mov	eax, dword ptr [rbx]
	mov	dword ptr [rdx+0x70], eax
	inc	dword ptr [rbx]
	mov	rcx, qword ptr [rcx]
	jmp	$_089

$_090:
	mov	eax, dword ptr [rbx]
	mov	dword ptr [rbp-0x4], eax
	mov	r8, qword ptr [rbp-0x18]
	mov	edx, dword ptr [rbp-0x4]
	mov	rcx, rbx
	call	$_011
	mov	dword ptr [rbp-0x8], eax
	mov	eax, dword ptr [rbp-0x8]
	mov	dword ptr [rbx+0x38], eax
	mov	ecx, dword ptr [rbp-0x8]
	call	LclAlloc@PLT
	mov	qword ptr [rbx+0x40], rax
	lea	rdi, [rax+0x1]
	mov	rsi, qword ptr [rbx+0x8]
	jmp	$_092

$_091:	movsb
$_092:	cmp	byte ptr [rsi], 0
	jnz	$_091
	movsb
	mov	rsi, qword ptr [rbp-0x18]
$_093:	test	rsi, rsi
	jz	$_094
	mov	rdx, rdi
	mov	rcx, qword ptr [rsi+0x8]
	call	Mangle@PLT
	lea	rdi, [rdi+rax+0x1]
	mov	rsi, qword ptr [rsi]
	jmp	$_093

$_094:
	mov	rsi, qword ptr [SymTables+0x10+rip]
$_095:	test	rsi, rsi
	jz	$_098
	test	byte ptr [rsi+0x4B], 0x01
	jnz	$_096
	test	byte ptr [rsi+0x4B], 0x02
	jz	$_096
	jmp	$_097

$_096:	mov	rdx, rdi
	mov	rcx, rsi
	call	Mangle@PLT
	lea	rdi, [rdi+rax+0x1]
$_097:	mov	rsi, qword ptr [rsi+0x80]
	jmp	$_095

$_098:
	mov	rsi, qword ptr [SymTables+0x50+rip]
$_099:	test	rsi, rsi
	jz	$_100
	mov	rdx, rdi
	mov	rcx, rsi
	call	Mangle@PLT
	lea	rdi, [rdi+rax+0x1]
	mov	rsi, qword ptr [rsi+0x80]
	jmp	$_099

$_100:
	mov	rsi, qword ptr [r14+0x238]
$_101:	test	rsi, rsi
	jz	$_102
	mov	rcx, qword ptr [rsi+0x8]
	mov	rdx, rdi
	call	Mangle@PLT
	lea	rdi, [rdi+rax+0x1]
	mov	rsi, qword ptr [rsi]
	jmp	$_101

$_102:
	leave
	pop	rbx
	pop	rdi
	pop	rsi
	ret

$_103:
	mov	qword ptr [rsp+0x8], rcx
	push	rsi
	push	rdi
	push	rbx
	push	rbp
	mov	rbp, rsp
	sub	rsp, 296
	mov	dword ptr [rbp-0x4], 1
	mov	rsi, qword ptr [SymTables+0x20+rip]
$_104:	test	rsi, rsi
	jz	$_109
	mov	rbx, qword ptr [rsi+0x78]
	cmp	qword ptr [rbx+0x60], 0
	jz	$_105
	mov	rdi, qword ptr [rbx+0x60]
	jmp	$_106

$_105:	lea	rdx, [rbp-0xFC]
	mov	rcx, rsi
	call	$_001
	mov	rdi, rax
$_106:	mov	rcx, rdi
	call	tstrlen@PLT
	add	dword ptr [rbp-0x4], eax
	inc	dword ptr [rbp-0x4]
	cmp	qword ptr [rbx+0x28], 0
	jz	$_108
	mov	rcx, rdi
	call	tstrlen@PLT
	add	dword ptr [rbp-0x4], eax
	cmp	byte ptr [r14+0x5], 2
	jnz	$_107
	add	dword ptr [rbp-0x4], 6
	jmp	$_108

$_107:	add	dword ptr [rbp-0x4], 5
$_108:	mov	rsi, qword ptr [rsi+0x80]
	jmp	$_104

$_109:
	lea	rdi, [internal_segparms+rip]
	xor	ebx, ebx
$_110:	cmp	ebx, 3
	jnc	$_111
	mov	rcx, qword ptr [rdi]
	call	tstrlen@PLT
	inc	eax
	add	dword ptr [rbp-0x4], eax
	inc	ebx
	add	rdi, 16
	jmp	$_110

$_111:
	mov	rbx, qword ptr [rbp+0x28]
	mov	eax, dword ptr [rbp-0x4]
	mov	dword ptr [rbx+0x18], eax
	mov	ecx, dword ptr [rbp-0x4]
	call	LclAlloc@PLT
	mov	qword ptr [rbx+0x20], rax
	lea	rdi, [rax+0x1]
	mov	rsi, qword ptr [SymTables+0x20+rip]
$_112:	test	rsi, rsi
	jz	$_115
	mov	rcx, qword ptr [rsi+0x78]
	cmp	qword ptr [rcx+0x60], 0
	jz	$_113
	mov	rax, qword ptr [rcx+0x60]
	jmp	$_114

$_113:	lea	rdx, [rbp-0xFC]
	mov	rcx, rsi
	call	$_001
$_114:	mov	rdx, rax
	mov	rcx, rdi
	call	tstrcpy@PLT
	mov	rcx, rdi
	call	tstrlen@PLT
	lea	rdi, [rdi+rax+0x1]
	mov	rsi, qword ptr [rsi+0x80]
	jmp	$_112

$_115:
	xor	esi, esi
$_116:	cmp	esi, 3
	jnc	$_117
	imul	ecx, esi, 16
	lea	rdx, [internal_segparms+rip]
	mov	rdx, qword ptr [rdx+rcx]
	mov	rcx, rdi
	call	tstrcpy@PLT
	mov	rcx, rdi
	call	tstrlen@PLT
	lea	rdi, [rdi+rax+0x1]
	inc	esi
	jmp	$_116

$_117:
	mov	rsi, qword ptr [SymTables+0x20+rip]
$_118:	test	rsi, rsi
	je	$_124
	mov	rcx, qword ptr [rsi+0x78]
	cmp	qword ptr [rcx+0x28], 0
	jz	$_123
	cmp	byte ptr [r14+0x5], 2
	jnz	$_119
	lea	rdx, [DS000B+rip]
	mov	rcx, rdi
	call	tstrcpy@PLT
	jmp	$_120

$_119:	lea	rdx, [DS000C+rip]
	mov	rcx, rdi
	call	tstrcpy@PLT
$_120:	mov	rcx, rdi
	call	tstrlen@PLT
	add	rdi, rax
	mov	rcx, qword ptr [rsi+0x78]
	cmp	qword ptr [rcx+0x60], 0
	jz	$_121
	mov	rax, qword ptr [rcx+0x60]
	jmp	$_122

$_121:	lea	rdx, [rbp-0xFC]
	mov	rcx, rsi
	call	$_001
$_122:	mov	rdx, rax
	mov	rcx, rdi
	call	tstrcpy@PLT
	mov	rcx, rdi
	call	tstrlen@PLT
	lea	rdi, [rdi+rax+0x1]
$_123:	mov	rsi, qword ptr [rsi+0x80]
	jmp	$_118

$_124:
	leave
	pop	rbx
	pop	rdi
	pop	rsi
	ret

$_125:
	mov	rcx, qword ptr [rax+0x78]
	xor	eax, eax
	mov	rcx, qword ptr [rcx+0x28]
$_126:	test	rcx, rcx
	jz	$_127
	mov	rcx, qword ptr [rcx+0x8]
	inc	eax
	jmp	$_126

$_127:
	ret

$_128:
	mov	rcx, qword ptr [rax+0x78]
	cmp	byte ptr [rcx+0x1F], 255
	jnz	$_129
	xor	eax, eax
	jmp	$_130

$_129:	mov	cl, byte ptr [rcx+0x1F]
	mov	eax, 1
	shl	eax, cl
$_130:	ret

$_131:
	mov	qword ptr [rsp+0x10], rdx
	push	rsi
	push	rdi
	push	rbx
	push	rbp
	mov	rbp, rsp
	sub	rsp, 104
	mov	rbx, rcx
	add	dword ptr [rbp+0x30], 15
	and	dword ptr [rbp+0x30], 0xFFFFFFF0
	mov	rcx, rbx
	call	$_103
	mov	ecx, 40
	cmp	byte ptr [r14+0x5], 2
	jnz	$_132
	mov	ecx, 64
$_132:	mov	dword ptr [rbp-0x44], ecx
	lea	rdi, [rbp-0x40]
	xor	eax, eax
	rep stosb
	mov	rcx, qword ptr [r14+0x1F0]
	mov	edx, dword ptr [rbp-0x44]
	mov	esi, 1
	lea	rdi, [rbp-0x40]
	call	fwrite@PLT
	cmp	eax, dword ptr [rbp-0x44]
	jz	$_133
	call	WriteError@PLT
$_133:	mov	rdi, qword ptr [rbx+0x20]
	inc	rdi
	mov	rsi, qword ptr [SymTables+0x20+rip]
$_134:	test	rsi, rsi
	je	$_148
	mov	r8d, dword ptr [rbp-0x44]
	xor	edx, edx
	lea	rcx, [rbp-0x40]
	call	tmemset@PLT
	mov	rax, rdi
	sub	rax, qword ptr [rbx+0x20]
	mov	dword ptr [rbp-0x40], eax
	mov	rcx, rdi
	call	tstrlen@PLT
	lea	rdi, [rdi+rax+0x1]
	mov	rcx, qword ptr [rsi+0x78]
	test	byte ptr [rcx+0x1C], 0x02
	jz	$_135
	mov	dword ptr [rbp-0x3C], 7
	jmp	$_142

$_135:	mov	eax, 8
	cmp	dword ptr [rcx+0x48], 3
	jz	$_136
	mov	eax, 1
$_136:	mov	dword ptr [rbp-0x3C], eax
	mov	rax, qword ptr [rcx+0x50]
	test	rax, rax
	jz	$_137
	mov	rax, qword ptr [rax+0x8]
	mov	eax, dword ptr [rax]
$_137:	mov	edx, 3
	cmp	dword ptr [rcx+0x48], 1
	jnz	$_138
	mov	edx, 6
	jmp	$_141

$_138:	test	byte ptr [rcx+0x1C], 0x01
	jz	$_139
	mov	edx, 2
	jmp	$_141

$_139:	cmp	eax, 1397641027
	jnz	$_140
	mov	edx, 2
	jmp	$_141

$_140:	test	byte ptr [rcx+0x1C], 0x10
	jz	$_141
	cmp	eax, 1380013892
	jnz	$_141
	xor	edx, edx
$_141:	mov	dword ptr [rbp-0x38], edx
$_142:	mov	rax, rsi
	call	$_128
	mov	ecx, dword ptr [rbp+0x30]
	mov	dword ptr [rsi+0x50], ecx
	mov	edx, dword ptr [rsi+0x60]
	cmp	byte ptr [r14+0x5], 2
	jnz	$_143
	mov	dword ptr [rbp-0x28], ecx
	mov	dword ptr [rbp-0x20], edx
	mov	dword ptr [rbp-0x10], eax
	jmp	$_144

$_143:	mov	dword ptr [rbp-0x30], ecx
	mov	dword ptr [rbp-0x2C], edx
	mov	dword ptr [rbp-0x20], eax
$_144:	mov	r9, qword ptr [r14+0x1F0]
	mov	r8d, dword ptr [rbp-0x44]
	mov	edx, 1
	lea	rcx, [rbp-0x40]
	call	tfwrite@PLT
	cmp	eax, dword ptr [rbp-0x44]
	jz	$_145
	call	WriteError@PLT
$_145:	mov	rax, rsi
	call	$_125
	mov	rcx, qword ptr [rsi+0x78]
	mov	dword ptr [rcx+0x40], eax
	cmp	dword ptr [rbp-0x3C], 8
	jz	$_147
	mov	eax, dword ptr [rbp-0x2C]
	cmp	byte ptr [r14+0x5], 2
	jnz	$_146
	mov	eax, dword ptr [rbp-0x20]
$_146:	add	eax, dword ptr [rbp+0x30]
	add	eax, 15
	and	eax, 0xFFFFFFF0
	mov	dword ptr [rbp+0x30], eax
$_147:	mov	rsi, qword ptr [rsi+0x80]
	jmp	$_134

$_148:
	mov	rcx, rbx
	call	$_072
	mov	r8d, dword ptr [rbp-0x44]
	xor	edx, edx
	lea	rcx, [rbp-0x40]
	call	tmemset@PLT
	xor	esi, esi
$_149:	cmp	esi, 3
	jnc	$_157
	mov	rax, rdi
	sub	rax, qword ptr [rbx+0x20]
	mov	dword ptr [rbp-0x40], eax
	mov	rcx, rdi
	call	tstrlen@PLT
	lea	rdi, [rdi+rax+0x1]
	imul	ecx, esi, 16
	lea	rdx, [internal_segparms+rip]
	mov	eax, dword ptr [rdx+rcx+0x8]
	mov	dword ptr [rbp-0x3C], eax
	imul	ecx, esi, 16
	mov	eax, dword ptr [rbp+0x30]
	mov	dword ptr [rbx+rcx+0x1C], eax
	mov	ecx, dword ptr [rbx+rcx+0x18]
	cmp	byte ptr [r14+0x5], 2
	jnz	$_150
	mov	dword ptr [rbp-0x28], eax
	mov	dword ptr [rbp-0x20], ecx
	jmp	$_151

$_150:	mov	dword ptr [rbp-0x30], eax
	mov	dword ptr [rbp-0x2C], ecx
$_151:	xor	eax, eax
	xor	ecx, ecx
	xor	edx, edx
	mov	dword ptr [rbp-0x48], 1
	cmp	esi, 1
	jnz	$_152
	mov	eax, dword ptr [r14+0x364]
	add	eax, 3
	mov	ecx, dword ptr [rbx+0x4]
	mov	dword ptr [rbp-0x48], 4
	mov	edx, 16
	cmp	byte ptr [r14+0x5], 2
	jnz	$_152
	mov	edx, 24
$_152:	cmp	byte ptr [r14+0x5], 2
	jnz	$_153
	mov	dword ptr [rbp-0x18], eax
	mov	dword ptr [rbp-0x14], ecx
	mov	dword ptr [rbp-0x8], edx
	mov	eax, dword ptr [rbp-0x48]
	mov	dword ptr [rbp-0x10], eax
	jmp	$_154

$_153:	mov	dword ptr [rbp-0x28], eax
	mov	dword ptr [rbp-0x24], ecx
	mov	dword ptr [rbp-0x1C], edx
	mov	eax, dword ptr [rbp-0x48]
	mov	dword ptr [rbp-0x20], eax
$_154:	mov	r9, qword ptr [r14+0x1F0]
	mov	r8d, dword ptr [rbp-0x44]
	mov	edx, 1
	lea	rcx, [rbp-0x40]
	call	tfwrite@PLT
	cmp	eax, dword ptr [rbp-0x44]
	jz	$_155
	call	WriteError@PLT
$_155:	mov	eax, dword ptr [rbp-0x2C]
	cmp	byte ptr [r14+0x5], 2
	jnz	$_156
	mov	eax, dword ptr [rbp-0x20]
$_156:	add	eax, dword ptr [rbp+0x30]
	add	eax, 15
	and	eax, 0xFFFFFFF0
	mov	dword ptr [rbp+0x30], eax
	inc	esi
	jmp	$_149

$_157:
	mov	rsi, qword ptr [SymTables+0x20+rip]
$_158:	test	rsi, rsi
	je	$_169
	mov	rcx, qword ptr [rsi+0x78]
	cmp	qword ptr [rcx+0x28], 0
	je	$_168
	mov	r8d, dword ptr [rbp-0x44]
	xor	edx, edx
	lea	rcx, [rbp-0x40]
	call	tmemset@PLT
	mov	rax, rdi
	sub	rax, qword ptr [rbx+0x20]
	mov	dword ptr [rbp-0x40], eax
	mov	rcx, rdi
	call	tstrlen@PLT
	lea	rdi, [rdi+rax+0x1]
	mov	rdx, qword ptr [rsi+0x78]
	mov	eax, dword ptr [rbp+0x30]
	mov	dword ptr [rdx+0xC], eax
	cmp	byte ptr [r14+0x5], 2
	jnz	$_159
	mov	dword ptr [rbp-0x28], eax
	mov	ecx, 4
	jmp	$_160

$_159:	mov	dword ptr [rbp-0x30], eax
	mov	ecx, 9
$_160:	mov	dword ptr [rbp-0x3C], ecx
	mov	eax, 8
	cmp	byte ptr [r14+0x5], 2
	jnz	$_161
	mov	eax, 24
$_161:	mov	ecx, eax
	mul	dword ptr [rdx+0x40]
	mov	edx, dword ptr [r14+0x364]
	add	edx, 2
	cmp	byte ptr [r14+0x5], 2
	jnz	$_162
	mov	dword ptr [rbp-0x20], eax
	mov	dword ptr [rbp-0x18], edx
	mov	dword ptr [rbp-0x8], ecx
	jmp	$_163

$_162:	mov	dword ptr [rbp-0x2C], eax
	mov	dword ptr [rbp-0x28], edx
	mov	dword ptr [rbp-0x1C], ecx
$_163:	mov	rcx, qword ptr [rsi+0x40]
	call	GetSegIdx@PLT
	mov	ecx, 4
	cmp	byte ptr [r14+0x5], 2
	jnz	$_164
	mov	dword ptr [rbp-0x14], eax
	mov	dword ptr [rbp-0x10], ecx
	jmp	$_165

$_164:	mov	dword ptr [rbp-0x24], eax
	mov	dword ptr [rbp-0x20], ecx
$_165:	mov	r9, qword ptr [r14+0x1F0]
	mov	r8d, dword ptr [rbp-0x44]
	mov	edx, 1
	lea	rcx, [rbp-0x40]
	call	tfwrite@PLT
	cmp	eax, dword ptr [rbp-0x44]
	jz	$_166
	call	WriteError@PLT
$_166:	mov	eax, dword ptr [rbp-0x2C]
	cmp	byte ptr [r14+0x5], 2
	jnz	$_167
	mov	eax, dword ptr [rbp-0x20]
$_167:	add	eax, dword ptr [rbp+0x30]
	add	eax, 15
	and	eax, 0xFFFFFFF0
	mov	dword ptr [rbp+0x30], eax
$_168:	mov	rsi, qword ptr [rsi+0x80]
	jmp	$_158

$_169:
	xor	eax, eax
	leave
	pop	rbx
	pop	rdi
	pop	rsi
	ret

$_170:
	mov	qword ptr [rsp+0x10], rdx
	push	rsi
	push	rbx
	push	rbp
	mov	rbp, rsp
	sub	rsp, 64
	mov	rbx, rcx
	mov	rcx, qword ptr [rdx+0x78]
	mov	rsi, qword ptr [rcx+0x28]
$_171:	test	rsi, rsi
	je	$_196
	mov	eax, dword ptr [rsi+0x14]
	mov	dword ptr [rbp-0x8], eax
	movzx	eax, byte ptr [rsi+0x18]
	jmp	$_193

$_172:	mov	edx, 2
	mov	rcx, qword ptr [rsi+0x30]
	test	byte ptr [r14+0x1], 0x01
	jz	$_173
	test	byte ptr [rcx+0x10], 0x02
	jz	$_173
	mov	edx, 4
	jmp	$_175

$_173:	test	byte ptr [r14], 0x40
	jnz	$_174
	test	byte ptr [r14], 0x80
	jz	$_175
$_174:	test	byte ptr [rcx+0x10], 0x02
	jz	$_175
	mov	edx, 4
	test	byte ptr [r14+0x1], 0x02
	jz	$_175
	mov	edx, 3
$_175:	jmp	$_194

$_176:	mov	edx, 1
	test	byte ptr [r14], 0x40
	jnz	$_177
	test	byte ptr [r14], 0x80
	jz	$_183
$_177:	mov	rcx, qword ptr [rsi+0x30]
	cmp	rcx, qword ptr [rbx+0x48]
	jnz	$_178
	mov	edx, 10
	jmp	$_194

$_178:	mov	edx, 1
	cmp	byte ptr [rcx+0x1D], 3
	jz	$_183
	mov	edx, 9
	cmp	byte ptr [rcx+0x1D], 2
	jnz	$_180
	test	byte ptr [rcx+0x10], 0x20
	jz	$_179
	mov	edx, 43
$_179:	jmp	$_181

$_180:	test	byte ptr [rcx+0x10], 0x04
	jz	$_181
	test	byte ptr [r14], 0x80
	jz	$_181
	mov	edx, 43
$_181:	cmp	edx, 43
	jnz	$_183
	mov	rcx, qword ptr [rsi+0x28]
	mov	eax, dword ptr [rsi+0x14]
	mov	rcx, qword ptr [rcx+0x78]
	add	rax, qword ptr [rcx+0x10]
	mov	eax, dword ptr [rax-0x2]
	and	ah, 0xC7
	cmp	ah, 5
	jz	$_182
	cmp	al, 141
	jnz	$_183
$_182:	mov	edx, 3
$_183:	jmp	$_194

$_184:	mov	edx, 9
	jmp	$_194

$_185:	mov	edx, 8
	jmp	$_194

$_186:	mov	dword ptr [rbx+0x10], 1
	mov	edx, 20
	jmp	$_194

$_187:	mov	dword ptr [rbx+0x10], 1
	mov	edx, 21
	jmp	$_194

$_188:	mov	dword ptr [rbx+0x10], 1
	mov	edx, 22
	jmp	$_194

$_189:	mov	dword ptr [rbx+0x10], 1
	mov	edx, 23
	jmp	$_194

$_190:	mov	rcx, qword ptr [rbp+0x28]
	cmp	byte ptr [rsi+0x18], 14
	jnc	$_191
	mov	rdx, qword ptr [r14+0x1B8]
	mov	eax, dword ptr [rsi+0x14]
	mov	dword ptr [rsp+0x20], eax
	mov	r9, qword ptr [rcx+0x8]
	movzx	r8d, byte ptr [rsi+0x18]
	movsx	edx, byte ptr [rdx+0xA]
	mov	ecx, 3008
	call	asmerr@PLT
	jmp	$_192

$_191:	mov	r9d, dword ptr [rsi+0x14]
	mov	r8, qword ptr [rcx+0x8]
	movzx	edx, byte ptr [rsi+0x18]
	mov	ecx, 3007
	call	asmerr@PLT
$_192:	mov	edx, 0
	jmp	$_194

$_193:	cmp	eax, 3
	je	$_172
	cmp	eax, 6
	je	$_176
	cmp	eax, 13
	je	$_184
	cmp	eax, 12
	je	$_185
	cmp	eax, 5
	je	$_186
	cmp	eax, 2
	je	$_187
	cmp	eax, 4
	je	$_188
	cmp	eax, 1
	je	$_189
	jmp	$_190

$_194:	mov	rcx, qword ptr [rsi+0x30]
	mov	eax, dword ptr [rcx+0x70]
	shl	eax, 8
	add	eax, edx
	mov	dword ptr [rbp-0x4], eax
	mov	r9, qword ptr [r14+0x1F0]
	mov	r8d, 8
	mov	edx, 1
	lea	rcx, [rbp-0x8]
	call	tfwrite@PLT
	cmp	eax, 8
	jz	$_195
	call	WriteError@PLT
$_195:	mov	rsi, qword ptr [rsi+0x8]
	jmp	$_171

$_196:
	leave
	pop	rbx
	pop	rsi
	ret

$_197:
	mov	qword ptr [rsp+0x10], rdx
	push	rsi
	push	rdi
	push	rbx
	push	rbp
	mov	rbp, rsp
	sub	rsp, 88
	mov	byte ptr [rbp-0x19], 0
	mov	rbx, rcx
	mov	rcx, qword ptr [rdx+0x78]
	test	byte ptr [r14+0x1], 0x01
	jnz	$_198
	test	byte ptr [r14], 0x40
	jnz	$_198
	test	byte ptr [r14], 0x80
	jz	$_199
$_198:	inc	byte ptr [rbp-0x19]
$_199:	mov	rsi, qword ptr [rcx+0x28]
$_200:	test	rsi, rsi
	je	$_231
	mov	rcx, qword ptr [rsi+0x30]
	mov	edi, dword ptr [rcx+0x70]
	mov	eax, dword ptr [rsi+0x14]
	mov	qword ptr [rbp-0x18], rax
	mov	eax, dword ptr [rsi+0x10]
	movzx	edx, byte ptr [rsi+0x1A]
	test	byte ptr [rsi+0x1B], 0x04
	jz	$_201
	add	edx, 4
$_201:	sub	eax, edx
	movsxd	rax, eax
	mov	qword ptr [rbp-0x8], rax
	movzx	eax, byte ptr [rsi+0x18]
	jmp	$_228

$_202:	mov	edx, 2
	test	byte ptr [r14+0x1], 0x01
	jz	$_203
	test	byte ptr [rcx+0x10], 0x02
	jz	$_203
	mov	edx, 4
	jmp	$_211

$_203:	test	byte ptr [r14], 0x40
	jnz	$_204
	test	byte ptr [r14], 0x80
	jz	$_211
$_204:	test	byte ptr [rcx+0x10], 0x02
	jz	$_206
	mov	edx, 4
	test	byte ptr [r14+0x1], 0x02
	jz	$_205
	mov	edx, 9
$_205:	jmp	$_210

$_206:	test	byte ptr [r14], 0x80
	jz	$_208
	test	byte ptr [rcx+0x10], 0x20
	jz	$_207
	mov	edx, 42
$_207:	jmp	$_210

$_208:	test	byte ptr [r14], 0x40
	jz	$_210
	test	byte ptr [rcx+0x10], 0x04
	jnz	$_209
	cmp	byte ptr [rcx+0x1D], 2
	jnz	$_210
$_209:	mov	edx, 42
$_210:	cmp	edx, 42
	jnz	$_211
	mov	rcx, qword ptr [rsi+0x28]
	mov	eax, dword ptr [rsi+0x14]
	mov	rcx, qword ptr [rcx+0x78]
	add	rax, qword ptr [rcx+0x10]
	mov	al, byte ptr [rax-0x2]
	cmp	al, 141
	jnz	$_211
	mov	edx, 9
$_211:	jmp	$_229

$_212:	mov	edx, 1
	cmp	byte ptr [rbp-0x19], 0
	jz	$_213
	test	byte ptr [rsi+0x1B], 0x08
	jz	$_213
	mov	edx, 24
$_213:	jmp	$_229

$_214:	mov	edx, 8
	jmp	$_229

$_215:	mov	edx, 10
	cmp	rcx, qword ptr [rbx+0x48]
	jnz	$_216
	mov	edx, 26
	jmp	$_218

$_216:	cmp	byte ptr [rbp-0x19], 0
	jz	$_217
	test	byte ptr [rsi+0x1B], 0x08
	jz	$_217
	mov	edx, 2
	jmp	$_218

$_217:	test	byte ptr [rsi+0x1B], 0x04
	jz	$_218
	mov	edx, 2
$_218:	jmp	$_229

$_219:	mov	edx, 12
	cmp	byte ptr [rbp-0x19], 0
	jz	$_220
	test	byte ptr [rsi+0x1B], 0x08
	jz	$_220
	mov	edx, 13
$_220:	jmp	$_229

$_221:	mov	edx, 13
	jmp	$_229

$_222:	mov	edx, 14
	cmp	byte ptr [rbp-0x19], 0
	jz	$_223
	test	byte ptr [rsi+0x1B], 0x08
	jz	$_223
	mov	edx, 15
$_223:	jmp	$_229

$_224:	mov	edx, 15
	jmp	$_229

$_225:	mov	rcx, qword ptr [rbp+0x30]
	cmp	byte ptr [rsi+0x18], 14
	jnc	$_226
	mov	rdx, qword ptr [r14+0x1B8]
	mov	eax, dword ptr [rsi+0x14]
	mov	dword ptr [rsp+0x20], eax
	mov	r9, qword ptr [rcx+0x8]
	movzx	r8d, byte ptr [rsi+0x18]
	lea	rdx, [rdx+0xA]
	mov	ecx, 3008
	call	asmerr@PLT
	jmp	$_227

$_226:	mov	r9d, dword ptr [rsi+0x14]
	mov	r8, qword ptr [rcx+0x8]
	movzx	edx, byte ptr [rsi+0x18]
	mov	ecx, 3007
	call	asmerr@PLT
$_227:	mov	edx, 0
	jmp	$_229

$_228:	cmp	eax, 3
	je	$_202
	cmp	eax, 7
	je	$_212
	cmp	eax, 12
	je	$_214
	cmp	eax, 6
	je	$_215
	cmp	eax, 5
	je	$_219
	cmp	eax, 2
	je	$_221
	cmp	eax, 4
	je	$_222
	cmp	eax, 1
	je	$_224
	jmp	$_225

$_229:	mov	dword ptr [rbp-0x10], edx
	mov	dword ptr [rbp-0xC], edi
	mov	r9, qword ptr [r14+0x1F0]
	mov	r8d, 24
	mov	edx, 1
	lea	rcx, [rbp-0x18]
	call	tfwrite@PLT
	cmp	eax, 24
	jz	$_230
	call	WriteError@PLT
$_230:	mov	rsi, qword ptr [rsi+0x8]
	jmp	$_200

$_231:
	leave
	pop	rbx
	pop	rdi
	pop	rsi
	ret

$_232:
	mov	qword ptr [rsp+0x8], rcx
	push	rsi
	push	rdi
	push	rbx
	push	rbp
	mov	rbp, rsp
	sub	rsp, 40
	mov	byte ptr [rbp-0x5], 0
	mov	rsi, qword ptr [SymTables+0x20+rip]
$_233:	test	rsi, rsi
	je	$_238
	mov	rdi, qword ptr [rsi+0x78]
	mov	ebx, dword ptr [rsi+0x60]
	sub	ebx, dword ptr [rdi+0x8]
	cmp	dword ptr [rdi+0x48], 3
	je	$_237
	test	ebx, ebx
	jz	$_237
	mov	eax, dword ptr [rdi+0x8]
	mov	dword ptr [rbp-0x4], eax
$_234:	cmp	dword ptr [rbp-0x4], 0
	jz	$_235
	mov	r9, qword ptr [r14+0x1F0]
	mov	r8d, 1
	mov	edx, 1
	lea	rcx, [rbp-0x5]
	call	tfwrite@PLT
	dec	dword ptr [rbp-0x4]
	jmp	$_234

$_235:	cmp	qword ptr [rdi+0x10], 0
	jnz	$_236
	mov	r8d, 1
	mov	edx, ebx
	mov	rcx, qword ptr [r14+0x1F0]
	call	tfseek@PLT
	jmp	$_237

$_236:	xor	r8d, r8d
	mov	edx, dword ptr [rsi+0x50]
	mov	rcx, qword ptr [r14+0x1F0]
	call	tfseek@PLT
	mov	r9, qword ptr [r14+0x1F0]
	mov	r8d, ebx
	mov	edx, 1
	mov	rcx, qword ptr [rdi+0x10]
	call	tfwrite@PLT
	cmp	rax, rbx
	jz	$_237
	call	WriteError@PLT
$_237:	mov	rsi, qword ptr [rsi+0x80]
	jmp	$_233

$_238:
	mov	rbx, qword ptr [rbp+0x28]
	xor	esi, esi
$_239:	cmp	esi, 3
	jnc	$_241
	imul	edi, esi, 16
	cmp	qword ptr [rbx+rdi+0x20], 0
	jz	$_240
	xor	r8d, r8d
	mov	edx, dword ptr [rbx+rdi+0x1C]
	mov	rcx, qword ptr [r14+0x1F0]
	call	tfseek@PLT
	mov	r9, qword ptr [r14+0x1F0]
	mov	r8d, dword ptr [rbx+rdi+0x18]
	mov	edx, 1
	mov	rcx, qword ptr [rbx+rdi+0x20]
	call	tfwrite@PLT
	cmp	eax, dword ptr [rbx+rdi+0x18]
	jz	$_240
	call	WriteError@PLT
$_240:	inc	esi
	jmp	$_239

$_241:
	mov	rsi, qword ptr [SymTables+0x20+rip]
$_242:	test	rsi, rsi
	jz	$_245
	mov	rdi, qword ptr [rsi+0x78]
	cmp	dword ptr [rdi+0x40], 0
	jz	$_244
	xor	r8d, r8d
	mov	edx, dword ptr [rdi+0xC]
	mov	rcx, qword ptr [r14+0x1F0]
	call	tfseek@PLT
	cmp	byte ptr [r14+0x5], 2
	jnz	$_243
	mov	rdx, rsi
	mov	rcx, rbx
	call	$_197
	jmp	$_244

$_243:	mov	rdx, rsi
	mov	rcx, rbx
	call	$_170
$_244:	mov	rsi, qword ptr [rsi+0x80]
	jmp	$_242

$_245:
	cmp	dword ptr [rbx+0x10], 0
	jz	$_246
	mov	ecx, 8007
	call	asmerr@PLT
$_246:	xor	eax, eax
	leave
	pop	rbx
	pop	rdi
	pop	rsi
	ret

elf_write_module:
	push	rsi
	push	rdi
	push	rbx
	push	rbp
	mov	rbp, rsp
	sub	rsp, 184
	mov	r8d, 144
	xor	edx, edx
	lea	rcx, [rbp-0x90]
	call	tmemset@PLT
	mov	rdi, qword ptr [r14+0x208]
	mov	rcx, rdi
	call	tstrlen@PLT
	lea	rdx, [rdi+rax]
	jmp	$_248

$_247:	cmp	byte ptr [rdx-0x1], 92
	jz	$_249
	cmp	byte ptr [rdx-0x1], 47
	jz	$_249
	dec	rdx
$_248:	cmp	rdx, rdi
	ja	$_247
$_249:	mov	qword ptr [rbp-0x88], rdx
	test	byte ptr [Options+0x4+rip], 0x02
	jz	$_250
	call	dwarf_create_sections@PLT
$_250:	lea	rcx, [DS000D+rip]
	call	SymFind@PLT
	mov	qword ptr [rbp-0x48], rax
	xor	edx, edx
	xor	esi, esi
	mov	rdi, qword ptr [r14+0x1F0]
	call	fseek@PLT
	mov	r8d, 4
	lea	rdx, [DS000E+rip]
	lea	rcx, [rbp-0x40]
	call	tmemcpy@PLT
	mov	byte ptr [rbp-0x3B], 1
	mov	byte ptr [rbp-0x3A], 1
	mov	al, byte ptr [r14+0x2C]
	mov	byte ptr [rbp-0x39], al
	mov	word ptr [rbp-0x30], 1
	mov	dword ptr [rbp-0x2C], 1
	cmp	byte ptr [r14+0x5], 2
	jnz	$_252
	mov	byte ptr [rbp-0x3C], 2
	mov	word ptr [rbp-0x2E], 62
	mov	dword ptr [rbp-0x18], 64
	mov	word ptr [rbp-0xC], 64
	mov	word ptr [rbp-0x6], 64
	call	$_007
	add	eax, dword ptr [r14+0x364]
	add	eax, 4
	mov	word ptr [rbp-0x4], ax
	mov	eax, dword ptr [r14+0x364]
	add	eax, 1
	mov	word ptr [rbp-0x2], ax
	mov	rcx, qword ptr [r14+0x1F0]
	mov	edx, 64
	mov	esi, 1
	lea	rdi, [rbp-0x40]
	call	fwrite@PLT
	cmp	eax, 64
	jz	$_251
	call	WriteError@PLT
$_251:	movzx	eax, word ptr [rbp-0x4]
	mul	word ptr [rbp-0x6]
	add	eax, 64
	jmp	$_254

$_252:	mov	byte ptr [rbp-0x3C], 1
	mov	word ptr [rbp-0x2E], 3
	mov	dword ptr [rbp-0x20], 52
	mov	word ptr [rbp-0x18], 52
	mov	word ptr [rbp-0x12], 40
	call	$_007
	add	eax, dword ptr [r14+0x364]
	add	eax, 4
	mov	word ptr [rbp-0x10], ax
	mov	eax, dword ptr [r14+0x364]
	add	eax, 1
	mov	word ptr [rbp-0xE], ax
	mov	rcx, qword ptr [r14+0x1F0]
	mov	edx, 52
	mov	esi, 1
	lea	rdi, [rbp-0x40]
	call	fwrite@PLT
	cmp	eax, 52
	jz	$_253
	call	WriteError@PLT
$_253:	movzx	eax, word ptr [rbp-0x10]
	mul	word ptr [rbp-0x12]
	add	eax, 52
$_254:	mov	edx, eax
	lea	rcx, [rbp-0x90]
	call	$_131
	lea	rcx, [rbp-0x90]
	call	$_232
	xor	eax, eax
	leave
	pop	rbx
	pop	rdi
	pop	rsi
	ret

elf_init:
	mov	byte ptr [r14+0x2C], 0
	lea	rax, [elf_write_module@PLT+rip]
	mov	qword ptr [r14+0x340], rax
	ret


.SECTION .data
	.ALIGN	16

internal_segparms:
	.quad  DS0000
	.quad  0x0000000000000003
	.quad  DS0001
	.quad  0x0000000000000002
	.quad  DS0002
	.quad  0x0000000000000003

convsection:
	.byte  0x05, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
	.quad  DS0003
	.quad  DS0004
	.quad  0x0000000000000105
	.quad  DS0005
	.quad  DS0006
	.quad  0x0000000000000105
	.quad  DS0007
	.quad  DS0008
	.quad  0x0000000000000004
	.quad  DS0009
	.quad  DS000A

DS000B:
	.byte  0x2E, 0x72, 0x65, 0x6C, 0x61, 0x00

DS000C:
	.byte  0x2E, 0x72, 0x65, 0x6C, 0x00

DS000D:
	.byte  0x5F, 0x47, 0x4C, 0x4F, 0x42, 0x41, 0x4C, 0x5F
	.byte  0x4F, 0x46, 0x46, 0x53, 0x45, 0x54, 0x5F, 0x54
	.byte  0x41, 0x42, 0x4C, 0x45, 0x5F, 0x00

DS000E:
	.byte  0x7F, 0x45, 0x4C, 0x46, 0x00


.SECTION .rodata
	.ALIGN	16

DS0000:
	.byte  0x2E, 0x73, 0x68, 0x73, 0x74, 0x72, 0x74, 0x61
	.byte  0x62, 0x00

DS0001:
	.byte  0x2E, 0x73, 0x79, 0x6D, 0x74, 0x61, 0x62, 0x00

DS0002:
	.byte  0x2E, 0x73, 0x74, 0x72, 0x74, 0x61, 0x62, 0x00

DS0003:
	.byte  0x5F, 0x54, 0x45, 0x58, 0x54, 0x00

DS0004:
	.byte  0x2E, 0x74, 0x65, 0x78, 0x74, 0x00

DS0005:
	.byte  0x5F, 0x44, 0x41, 0x54, 0x41, 0x00

DS0006:
	.byte  0x2E, 0x64, 0x61, 0x74, 0x61, 0x00

DS0007:
	.byte  0x43, 0x4F, 0x4E, 0x53, 0x54, 0x00

DS0008:
	.byte  0x2E, 0x72, 0x6F, 0x64, 0x61, 0x74, 0x61, 0x00

DS0009:
	.byte  0x5F, 0x42, 0x53, 0x53, 0x00

DS000A:
	.byte  0x2E, 0x62, 0x73, 0x73, 0x00


.att_syntax prefix
