
.intel_syntax noprefix

.global TypesInit
.global CreateTypeSymbol
.global SearchInStruct
.global SearchNameInStruct
.global StructDirective
.global EndstructDirective
.global CreateStructField
.global AlignInStruct
.global UpdateStructSize
.global SetStructCurrentOffset
.global GetQualifiedType
.global CreateType
.global TypedefDirective
.global RecordDirective
.global CurrStruct

.extern LstWrite
.extern EvalOperand
.extern CreateProc
.extern ParseProc
.extern sym_remove_table
.extern SizeFromMemtype
.extern SymTables
.extern LclDup
.extern LclAlloc
.extern myltoa
.extern asmerr
.extern Parse_Pass
.extern SymHash
.extern SymCmpFunc
.extern SymFindID
.extern SymFind
.extern SymLookup
.extern SymAddGlobal
.extern SymCreate
.extern SymFree
.extern SymAlloc
.extern tstrcmp
.extern tstrlen


.SECTION .text
	.ALIGN	16

TypesInit:
	mov	qword ptr [CurrStruct+rip], 0
	mov	qword ptr [redef_struct+rip], 0
	ret

CreateTypeSymbol:
	mov	qword ptr [rsp+0x10], rdx
	mov	qword ptr [rsp+0x18], r8
	push	rsi
	push	rdi
	push	rbp
	mov	rbp, rsp
	sub	rsp, 32
	mov	rsi, rcx
	test	rsi, rsi
	jz	$_002
	mov	rdx, rsi
	lea	rcx, [SymTables+rip]
	call	sym_remove_table@PLT
	mov	rcx, qword ptr [rsi+0x8]
	call	SymHash@PLT
	mov	dword ptr [rsi+0x18], eax
	and	byte ptr [rsi+0x1C], 0xFE
	test	byte ptr [r14], 0x01
	jz	$_001
	or	byte ptr [rsi+0x1C], 0x01
$_001:	jmp	$_005

$_002:	cmp	dword ptr [rbp+0x30], 0
	jz	$_003
	mov	rcx, qword ptr [rbp+0x28]
	call	SymCreate@PLT
	jmp	$_004

$_003:	mov	rcx, qword ptr [rbp+0x28]
	call	SymAlloc@PLT
$_004:	mov	rsi, rax
$_005:	test	rsi, rsi
	jz	$_006
	mov	byte ptr [rsi+0x1D], 7
	mov	word ptr [rsi+0x6E], 0
	mov	ecx, 24
	call	LclAlloc@PLT
	mov	rdi, rax
	mov	qword ptr [rsi+0x78], rdi
$_006:	mov	rax, rsi
	leave
	pop	rdi
	pop	rsi
	ret

SearchInStruct:
	push	rsi
	push	rdi
	push	rbx
	push	rbp
	mov	rbp, rsp
	sub	rsp, 56
	mov	rax, qword ptr [rcx+0x78]
	mov	rbx, qword ptr [rax]
	test	rbx, rbx
	jz	$_007
	cmp	dword ptr [rbp+0x48], 32
	jl	$_009
$_007:	test	rbx, rbx
	jz	$_008
	mov	ecx, 1007
	call	asmerr@PLT
$_008:	xor	eax, eax
	jmp	$_019

$_009:	inc	dword ptr [rbp+0x48]
	mov	edi, edx
	mov	esi, r8d
$_010:	test	rbx, rbx
	je	$_018
	cmp	dword ptr [rbx+0x18], 0
	jnz	$_016
	cmp	byte ptr [rbx+0x1D], 7
	jnz	$_013
	mov	eax, dword ptr [rbp+0x48]
	mov	dword ptr [rsp+0x20], eax
	mov	r8d, esi
	mov	edx, edi
	mov	rcx, rbx
	call	SearchInStruct
	test	rax, rax
	jz	$_012
	mov	rcx, r9
	test	rcx, rcx
	jz	$_011
	mov	edx, dword ptr [rbx+0x30]
	add	dword ptr [rcx], edx
$_011:	jmp	$_019

$_012:	jmp	$_015

$_013:	cmp	byte ptr [rbx+0x1E], 196
	jnz	$_015
	mov	eax, dword ptr [rbp+0x48]
	mov	dword ptr [rsp+0x20], eax
	mov	r8d, esi
	mov	edx, edi
	mov	rcx, qword ptr [rbx+0x28]
	call	SearchInStruct
	test	rax, rax
	jz	$_015
	mov	rcx, r9
	test	rcx, rcx
	jz	$_014
	mov	edx, dword ptr [rbx+0x30]
	add	dword ptr [rcx], edx
$_014:	jmp	$_019

$_015:	jmp	$_017

$_016:	cmp	edi, dword ptr [rbx+0x14]
	jnz	$_017
	cmp	esi, dword ptr [rbx+0x18]
	jnz	$_017
	mov	rax, rbx
	jmp	$_019

$_017:	mov	rbx, qword ptr [rbx+0x80]
	jmp	$_010

$_018:	xor	eax, eax
$_019:	leave
	pop	rbx
	pop	rdi
	pop	rsi
	ret

SearchNameInStruct:
	push	rsi
	push	rdi
	push	rbx
	push	rbp
	mov	rbp, rsp
	sub	rsp, 56
	mov	rbx, rcx
	mov	rax, qword ptr [rbx+0x78]
	mov	rax, qword ptr [rax]
	test	rax, rax
	jnz	$_020
	jmp	$_024

$_020:	mov	ecx, 32
	test	byte ptr [rax+0x1C], 0x01
	jz	$_021
	xor	ecx, ecx
$_021:	movzx	esi, byte ptr [rdx]
	mov	rdi, rdx
	test	esi, esi
	jz	$_023
	or	esi, ecx
	xor	esi, 0x50C5D1F
	inc	rdx
	movzx	eax, byte ptr [rdx]
	test	eax, eax
	jz	$_023
$_022:	inc	rdx
	imul	esi, esi, 16777619
	or	eax, ecx
	xor	esi, eax
	mov	al, byte ptr [rdx]
	test	eax, eax
	jnz	$_022
$_023:	sub	rdx, rdi
	mov	dword ptr [rsp+0x20], r9d
	mov	r9, r8
	mov	r8d, esi
	mov	rcx, rbx
	call	SearchInStruct
$_024:	leave
	pop	rbx
	pop	rdi
	pop	rsi
	ret

$_025:
	push	rdi
	push	rbx
	push	rbp
	mov	rbp, rsp
	sub	rsp, 32
	mov	rax, qword ptr [rdx+0x78]
	mov	rbx, qword ptr [rax]
	mov	rcx, qword ptr [rcx+0x78]
	mov	rdi, qword ptr [rcx]
	mov	ax, word ptr [rdi+0x6E]
	cmp	word ptr [rbx+0x6E], ax
	jz	$_026
	xor	eax, eax
	jmp	$_034

$_026:	test	rbx, rbx
	jz	$_032
	test	rdi, rdi
	jnz	$_027
	xor	eax, eax
	jmp	$_034

$_027:	mov	rax, qword ptr [rdi+0x8]
	test	byte ptr [r14+0x3], 0x02
	jz	$_028
	cmp	byte ptr [rax], 0
	jnz	$_028
	jmp	$_029

$_028:	mov	rdx, qword ptr [rdi+0x8]
	mov	rcx, qword ptr [rbx+0x8]
	call	tstrcmp@PLT
	test	rax, rax
	jz	$_029
	xor	eax, eax
	jmp	$_034

$_029:	mov	eax, dword ptr [rdi+0x30]
	cmp	dword ptr [rbx+0x30], eax
	jz	$_030
	xor	eax, eax
	jmp	$_034

$_030:	mov	eax, dword ptr [rdi+0x60]
	cmp	dword ptr [rbx+0x60], eax
	jz	$_031
	xor	eax, eax
	jmp	$_034

$_031:	mov	rbx, qword ptr [rbx+0x80]
	mov	rdi, qword ptr [rdi+0x80]
	jmp	$_026

$_032:	test	rdi, rdi
	jz	$_033
	xor	eax, eax
	jmp	$_034

$_033:	mov	eax, 1
$_034:	leave
	pop	rbx
	pop	rdi
	ret

StructDirective:
	mov	qword ptr [rsp+0x8], rcx
	mov	qword ptr [rsp+0x10], rdx
	push	rsi
	push	rdi
	push	rbx
	push	rbp
	mov	rbp, rsp
	sub	rsp, 168
	mov	rbx, rdx
	mov	rsi, qword ptr [rbx+0x10]
	mov	rdi, rbx
	imul	ecx, ecx, 32
	add	rbx, rcx
	mov	al, 1
	cmp	dword ptr [rbx+0x4], 596
	jnz	$_035
	mov	al, 2
	jmp	$_036

$_035:	cmp	dword ptr [rbx+0x4], 598
	jnz	$_036
	mov	al, 4
$_036:	mov	byte ptr [rbp-0x9], al
	mov	rax, qword ptr [CurrStruct+rip]
	test	rax, rax
	jnz	$_037
	cmp	dword ptr [rbp+0x28], 1
	jnz	$_038
$_037:	test	rax, rax
	jz	$_039
	cmp	dword ptr [rbp+0x28], 0
	jz	$_039
$_038:	mov	rdx, qword ptr [rbx+0x10]
	mov	ecx, 2008
	call	asmerr@PLT
	jmp	$_074

$_039:	mov	eax, 1
	mov	cl, byte ptr [r14+0xA]
	shl	eax, cl
	mov	dword ptr [rbp-0x4], eax
	inc	dword ptr [rbp+0x28]
	add	rbx, 32
	cmp	dword ptr [rbp+0x28], 1
	jnz	$_040
	lea	rsi, [DS0000+rip]
	cmp	byte ptr [rbx], 8
	jnz	$_040
	mov	rsi, qword ptr [rbx+0x10]
	mov	rdi, rbx
	inc	dword ptr [rbp+0x28]
	add	rbx, 32
$_040:	cmp	qword ptr [CurrStruct+rip], 0
	jne	$_050
	cmp	byte ptr [rbx], 0
	je	$_050
	mov	byte ptr [rsp+0x20], 0
	lea	r9, [rbp-0x78]
	mov	r8d, dword ptr [r14+0x64]
	mov	rdx, qword ptr [rbp+0x30]
	lea	rcx, [rbp+0x28]
	call	EvalOperand@PLT
	cmp	eax, -1
	jz	$_049
	mov	rcx, qword ptr [rbp-0x28]
	cmp	dword ptr [rbp-0x3C], -2
	jnz	$_041
	jmp	$_049

$_041:	cmp	dword ptr [rbp-0x3C], 0
	jz	$_044
	test	rcx, rcx
	jz	$_042
	cmp	byte ptr [rcx+0x1D], 0
	jnz	$_042
	mov	rdx, qword ptr [rcx+0x8]
	mov	ecx, 2006
	call	asmerr@PLT
	jmp	$_043

$_042:	mov	ecx, 2026
	call	asmerr@PLT
$_043:	jmp	$_049

$_044:	cmp	dword ptr [rbp-0x78], 32
	jle	$_045
	mov	ecx, 2064
	call	asmerr@PLT
	jmp	$_049

$_045:	mov	eax, 1
$_046:	cmp	eax, dword ptr [rbp-0x78]
	jge	$_047
	shl	eax, 1
	jmp	$_046

$_047:	cmp	eax, dword ptr [rbp-0x78]
	jz	$_048
	mov	edx, dword ptr [rbp-0x78]
	mov	ecx, 2063
	call	asmerr@PLT
	jmp	$_049

$_048:	mov	eax, dword ptr [rbp-0x78]
	mov	dword ptr [rbp-0x4], eax
$_049:	imul	ebx, dword ptr [rbp+0x28], 32
	add	rbx, qword ptr [rbp+0x30]
	cmp	byte ptr [rbx], 44
	jnz	$_050
	inc	dword ptr [rbp+0x28]
	add	rbx, 32
	cmp	byte ptr [rbx], 8
	jnz	$_050
	cmp	dword ptr [rbx+0x8], -1600658413
	jnz	$_050
	lea	rdx, [DS0001+rip]
	mov	ecx, 8010
	call	asmerr@PLT
	inc	dword ptr [rbp+0x28]
	add	rbx, 32
$_050:	cmp	byte ptr [rbx], 0
	jz	$_051
	mov	rdx, qword ptr [rbx+0x18]
	mov	ecx, 2008
	call	asmerr@PLT
	jmp	$_074

$_051:	cmp	byte ptr [rsi], 0
	jz	$_054
	cmp	qword ptr [CurrStruct+rip], 0
	jnz	$_052
	mov	rcx, rdi
	call	SymFindID@PLT
	mov	rdi, rax
	jmp	$_053

$_052:	xor	r9d, r9d
	lea	r8, [rbp-0x8]
	mov	rdx, rsi
	mov	rcx, qword ptr [CurrStruct+rip]
	call	SearchNameInStruct
	mov	rdi, rax
$_053:	jmp	$_055

$_054:	xor	edi, edi
$_055:	test	byte ptr [r14], 0x08
	jz	$_057
	mov	rcx, qword ptr [CurrStruct+rip]
	test	rcx, rcx
	jz	$_056
	xor	r8d, r8d
	mov	edx, dword ptr [rcx+0x60]
	mov	ecx, 6
	call	LstWrite@PLT
	jmp	$_057

$_056:	xor	r8d, r8d
	xor	edx, edx
	mov	ecx, 6
	call	LstWrite@PLT
$_057:	cmp	dword ptr [Parse_Pass+rip], 0
	jbe	$_059
	mov	rcx, qword ptr [CurrStruct+rip]
	test	rcx, rcx
	jz	$_058
	mov	rcx, qword ptr [rcx+0x78]
	mov	rdx, qword ptr [rcx+0x8]
	mov	rdi, qword ptr [rdx+0x28]
	mov	rax, qword ptr [rdx+0x80]
	mov	qword ptr [rcx+0x8], rax
$_058:	mov	rcx, qword ptr [rdi+0x78]
	mov	rax, qword ptr [rcx]
	mov	qword ptr [rcx+0x8], rax
	mov	dword ptr [rdi+0x30], 0
	mov	byte ptr [rdi+0x59], 0
	or	byte ptr [rdi+0x10], 0x01
	mov	byte ptr [rdi+0x1D], 7
	mov	rax, qword ptr [CurrStruct+rip]
	mov	qword ptr [rdi+0x80], rax
	mov	qword ptr [CurrStruct+rip], rdi
	xor	eax, eax
	jmp	$_074

$_059:	test	rdi, rdi
	jnz	$_062
	cmp	qword ptr [CurrStruct+rip], 0
	jnz	$_060
	mov	r8d, 1
	mov	rdx, rsi
	xor	ecx, ecx
	call	CreateTypeSymbol
	mov	rdi, rax
	jmp	$_061

$_060:	xor	r8d, r8d
	mov	rdx, rsi
	xor	ecx, ecx
	call	CreateTypeSymbol
	mov	rdi, rax
	mov	rcx, qword ptr [CurrStruct+rip]
	mov	rcx, qword ptr [rcx+0x78]
	movzx	eax, byte ptr [rcx+0x10]
	mov	dword ptr [rbp-0x4], eax
$_061:	jmp	$_071

$_062:	cmp	byte ptr [rdi+0x1D], 0
	jnz	$_064
	xor	eax, eax
	cmp	qword ptr [CurrStruct+rip], 0
	jnz	$_063
	inc	eax
$_063:	mov	r8d, eax
	xor	edx, edx
	mov	rcx, rdi
	call	CreateTypeSymbol
	jmp	$_071

$_064:	cmp	byte ptr [rdi+0x1D], 7
	jnz	$_070
	cmp	qword ptr [CurrStruct+rip], 0
	jnz	$_070
	jmp	$_068

$_065:	mov	qword ptr [redef_struct+rip], rdi
	xor	r8d, r8d
	mov	rdx, rsi
	xor	ecx, ecx
	call	CreateTypeSymbol
	mov	rdi, rax
	jmp	$_069

$_066:	jmp	$_069

$_067:	mov	rdx, qword ptr [rdi+0x8]
	mov	ecx, 2005
	call	asmerr@PLT
	jmp	$_074

	jmp	$_069

$_068:	cmp	word ptr [rdi+0x6E], 1
	jz	$_065
	cmp	word ptr [rdi+0x6E], 2
	jz	$_065
	cmp	word ptr [rdi+0x6E], 0
	jz	$_066
	jmp	$_067

$_069:	jmp	$_071

$_070:	mov	rdx, qword ptr [rdi+0x8]
	mov	ecx, 2005
	call	asmerr@PLT
	jmp	$_074

$_071:	mov	dword ptr [rdi+0x30], 0
	movzx	eax, byte ptr [rbp-0x9]
	mov	word ptr [rdi+0x6E], ax
	mov	rcx, qword ptr [rdi+0x78]
	mov	eax, dword ptr [rbp-0x4]
	mov	byte ptr [rcx+0x10], al
	or	byte ptr [rcx+0x11], 0x01
	mov	rax, qword ptr [CurrStruct+rip]
	mov	qword ptr [rdi+0x80], rax
	cmp	qword ptr [r14+0x2F0], 0
	jz	$_073
	mov	rbx, qword ptr [r14+0x2F0]
	mov	rcx, qword ptr [rbx+0x8]
	call	tstrlen@PLT
	mov	ecx, eax
	mov	rdx, rdi
	mov	rdi, qword ptr [rbx+0x8]
	repe cmpsb
	mov	rdi, rdx
	jnz	$_073
	mov	eax, dword ptr [rsi]
	test	al, al
	jnz	$_072
	mov	qword ptr [rbx+0x28], rdi
	or	byte ptr [rdi+0x13], 0x02
	jmp	$_073

$_072:	cmp	eax, 1818391638
	jnz	$_073
	cmp	byte ptr [rsi+0x4], 0
	jnz	$_073
	mov	rcx, qword ptr [rbx+0x28]
	or	byte ptr [rcx+0x12], 0x02
	mov	qword ptr [rcx+0x40], rdi
	mov	qword ptr [rdi+0x38], rcx
	or	byte ptr [rdi+0x13], 0x01
$_073:	mov	qword ptr [CurrStruct+rip], rdi
	xor	eax, eax
$_074:	leave
	pop	rbx
	pop	rdi
	pop	rsi
	ret

EndstructDirective:
	mov	qword ptr [rsp+0x8], rcx
	push	rsi
	push	rdi
	push	rbx
	push	rbp
	mov	rbp, rsp
	sub	rsp, 56
	mov	rdi, qword ptr [CurrStruct+rip]
	cmp	dword ptr [Parse_Pass+rip], 0
	jbe	$_077
	mov	dword ptr [rdi+0x30], 0
	mov	ebx, dword ptr [rdi+0x60]
	mov	rax, qword ptr [rdi+0x80]
	mov	qword ptr [CurrStruct+rip], rax
	cmp	qword ptr [CurrStruct+rip], 0
	jz	$_075
	mov	rcx, rdi
	call	UpdateStructSize
$_075:	cmp	qword ptr [r14+0x1F8], 0
	jz	$_076
	mov	r8, rdi
	mov	edx, ebx
	mov	ecx, 6
	call	LstWrite@PLT
$_076:	xor	eax, eax
	jmp	$_109

$_077:	mov	rbx, rdx
	cmp	ecx, 1
	jnz	$_078
	cmp	qword ptr [rdi+0x80], 0
	jz	$_079
$_078:	test	ecx, ecx
	jnz	$_080
	cmp	qword ptr [rdi+0x80], 0
	jz	$_080
$_079:	jmp	$_082

$_080:	lea	rdx, [DS0001+0x9+rip]
	cmp	ecx, 1
	jnz	$_081
	mov	rdx, qword ptr [rbx+0x10]
$_081:	mov	ecx, 1010
	call	asmerr@PLT
	jmp	$_109

$_082:	cmp	ecx, 1
	jnz	$_083
	movsxd	r8, dword ptr [rdi+0x14]
	mov	rdx, qword ptr [rdi+0x8]
	mov	rcx, qword ptr [rbx+0x10]
	call	qword ptr [SymCmpFunc+rip]
	test	eax, eax
	jz	$_083
	mov	rdx, qword ptr [rbx+0x10]
	mov	ecx, 1010
	call	asmerr@PLT
	jmp	$_109

$_083:	inc	dword ptr [rbp+0x28]
	imul	ecx, dword ptr [rbp+0x28], 32
	add	rbx, rcx
	mov	rsi, qword ptr [rdi+0x78]
	test	byte ptr [rsi+0x11], 0x02
	jz	$_087
	xor	ecx, ecx
	mov	rdx, qword ptr [rsi]
$_084:	test	rdx, rdx
	jz	$_086
	cmp	dword ptr [rdx+0x30], ecx
	jge	$_085
	mov	ecx, dword ptr [rdx+0x30]
$_085:	mov	rdx, qword ptr [rdx+0x80]
	jmp	$_084

$_086:	mov	eax, dword ptr [rdi+0x60]
	sub	eax, ecx
	mov	dword ptr [rdi+0x60], eax
$_087:	movzx	edx, byte ptr [rsi+0x10]
	cmp	edx, 1
	jbe	$_090
	mov	eax, dword ptr [rdi+0x50]
	test	eax, eax
	jnz	$_088
	inc	eax
$_088:	cmp	eax, edx
	jbe	$_089
	mov	eax, edx
$_089:	mov	ecx, eax
	neg	ecx
	add	eax, dword ptr [rdi+0x60]
	dec	eax
	and	eax, ecx
	mov	dword ptr [rdi+0x60], eax
$_090:	and	byte ptr [rsi+0x11], 0xFE
	or	byte ptr [rdi+0x10], 0x01
	mov	esi, dword ptr [rdi+0x60]
	mov	dword ptr [rdi+0x30], 0
	mov	rax, qword ptr [rdi+0x80]
	mov	qword ptr [CurrStruct+rip], rax
	cmp	dword ptr [rbp+0x28], 1
	jnz	$_092
	mov	rcx, qword ptr [rdi+0x8]
	cmp	byte ptr [rcx], 0
	jnz	$_091
	xor	ecx, ecx
$_091:	mov	eax, dword ptr [rdi+0x60]
	mov	dword ptr [rsp+0x28], eax
	mov	qword ptr [rsp+0x20], rdi
	mov	r9d, 196
	mov	r8, rcx
	xor	edx, edx
	mov	ecx, 4294967295
	call	CreateStructField
	mov	ecx, dword ptr [rdi+0x60]
	mov	dword ptr [rax+0x60], ecx
	lea	rax, [DS0001+0x9+rip]
	mov	qword ptr [rdi+0x8], rax
	mov	dword ptr [rdi+0x14], 0
$_092:	cmp	qword ptr [r14+0x1F8], 0
	jz	$_093
	mov	r8, rdi
	movzx	edx, si
	mov	ecx, 6
	call	LstWrite@PLT
$_093:	test	byte ptr [rdi+0x4B], 0x08
	jz	$_094
	movzx	eax, word ptr [rdi+0x5A]
	add	eax, eax
	mov	al, byte ptr [r12+rax*8+0xC]
	mov	byte ptr [rdi+0x1E], al
	jmp	$_102

$_094:	mov	eax, dword ptr [rdi+0x60]
	jmp	$_101

$_095:	mov	byte ptr [rdi+0x1E], 0
	jmp	$_102

$_096:	mov	byte ptr [rdi+0x1E], 1
	jmp	$_102

$_097:	mov	byte ptr [rdi+0x1E], 3
	jmp	$_102

$_098:	mov	byte ptr [rdi+0x1E], 5
	jmp	$_102

$_099:	mov	byte ptr [rdi+0x1E], 7
	jmp	$_102

$_100:	mov	byte ptr [rdi+0x1E], 192
	jmp	$_102

$_101:	cmp	eax, 1
	jz	$_095
	cmp	eax, 2
	jz	$_096
	cmp	eax, 4
	jz	$_097
	cmp	eax, 6
	jz	$_098
	cmp	eax, 8
	jz	$_099
	jmp	$_100

$_102:	cmp	qword ptr [CurrStruct+rip], 0
	jnz	$_105
	cmp	qword ptr [redef_struct+rip], 0
	jz	$_104
	mov	rdx, qword ptr [redef_struct+rip]
	mov	rcx, rdi
	call	$_025
	test	rax, rax
	jnz	$_103
	mov	r8, qword ptr [rdi+0x8]
	lea	rdx, [DS0002+rip]
	mov	ecx, 2007
	call	asmerr@PLT
$_103:	mov	rcx, rdi
	call	SymFree@PLT
	mov	qword ptr [redef_struct+rip], 0
$_104:	jmp	$_107

$_105:	mov	rcx, qword ptr [CurrStruct+rip]
	mov	eax, dword ptr [rdi+0x50]
	cmp	eax, dword ptr [rcx+0x50]
	jbe	$_106
	mov	dword ptr [rcx+0x50], eax
$_106:	mov	rcx, rdi
	call	UpdateStructSize
$_107:	cmp	byte ptr [rbx], 0
	jz	$_108
	mov	rdx, qword ptr [rbx+0x10]
	mov	ecx, 2008
	call	asmerr@PLT
	jmp	$_109

$_108:	xor	eax, eax
$_109:	leave
	pop	rbx
	pop	rdi
	pop	rsi
	ret

$_110:
	push	rdi
	push	rbp
	mov	rbp, rsp
	sub	rsp, 56
	mov	rcx, qword ptr [rcx+0x78]
	mov	rdi, qword ptr [rcx]
$_111:	test	rdi, rdi
	jz	$_116
	cmp	dword ptr [rdi+0x18], 0
	jz	$_113
	mov	dword ptr [rsp+0x20], 0
	xor	r9d, r9d
	mov	r8d, dword ptr [rdi+0x18]
	mov	edx, dword ptr [rdi+0x14]
	mov	rcx, qword ptr [CurrStruct+rip]
	call	SearchInStruct
	test	rax, rax
	jz	$_112
	mov	rdx, qword ptr [rax+0x8]
	mov	ecx, 2005
	call	asmerr@PLT
	jmp	$_117

$_112:	jmp	$_115

$_113:	cmp	qword ptr [rdi+0x28], 0
	jz	$_115
	mov	rax, qword ptr [rdi+0x28]
	cmp	word ptr [rax+0x6E], 1
	jz	$_114
	cmp	word ptr [rax+0x6E], 2
	jnz	$_115
$_114:	mov	rcx, rax
	call	$_110
	cmp	eax, -1
	jnz	$_115
	mov	rax, -1
	jmp	$_117

$_115:	mov	rdi, qword ptr [rdi+0x80]
	jmp	$_111

$_116:	xor	eax, eax
$_117:	leave
	pop	rdi
	ret

CreateStructField:
	mov	qword ptr [rsp+0x18], r8
	mov	qword ptr [rsp+0x20], r9
	push	rsi
	push	rdi
	push	rbx
	push	rbp
	mov	rbp, rsp
	sub	rsp, 88
	mov	edi, ecx
	mov	rbx, rdx
	mov	rsi, r8
	mov	dword ptr [rbp-0x1C], 0
	mov	rcx, qword ptr [CurrStruct+rip]
	cmp	word ptr [rcx+0x6E], 4
	jnz	$_118
	mov	dword ptr [rbp-0x1C], 1
$_118:	mov	rax, qword ptr [rcx+0x78]
	mov	qword ptr [rbp-0x18], rax
	mov	eax, dword ptr [rcx+0x30]
	mov	dword ptr [rbp-0x4], eax
	test	rsi, rsi
	jz	$_121
	mov	rcx, rsi
	call	SymHash@PLT
	mov	dword ptr [rbp-0xC], eax
	sub	rcx, rsi
	mov	dword ptr [rbp-0x8], ecx
	cmp	ecx, 247
	jbe	$_119
	mov	ecx, 2043
	call	asmerr@PLT
	xor	eax, eax
	jmp	$_151

$_119:	mov	dword ptr [rsp+0x20], 0
	xor	r9d, r9d
	mov	r8d, eax
	mov	edx, ecx
	mov	rcx, qword ptr [CurrStruct+rip]
	call	SearchInStruct
	test	rax, rax
	jz	$_120
	mov	rdx, qword ptr [rax+0x8]
	mov	ecx, 2005
	call	asmerr@PLT
	xor	eax, eax
	jmp	$_151

$_120:	jmp	$_124

$_121:	mov	rcx, qword ptr [rbp+0x48]
	test	rcx, rcx
	jz	$_123
	cmp	word ptr [rcx+0x6E], 1
	jz	$_122
	cmp	word ptr [rcx+0x6E], 2
	jnz	$_123
$_122:	call	$_110
$_123:	lea	rsi, [DS0002+0x9+rip]
	mov	dword ptr [rbp-0x8], 0
	mov	dword ptr [rbp-0xC], 0
$_124:	mov	qword ptr [rbp+0x38], rsi
	cmp	edi, -1
	je	$_131
	inc	edi
	imul	eax, edi, 32
	add	rbx, rax
	mov	rdi, qword ptr [r14+0x1E0]
$_125:	cmp	byte ptr [rbx], 0
	je	$_130
	cmp	byte ptr [rbx], 8
	jnz	$_128
	mov	rcx, rbx
	call	SymFindID@PLT
	mov	rsi, rax
	test	eax, eax
	jz	$_128
	test	byte ptr [rax+0x10], 0x80
	jz	$_128
	test	byte ptr [rax+0x10], 0x08
	jz	$_126
	cmp	qword ptr [rax+0x68], 0
	jz	$_126
	xor	edx, edx
	mov	rcx, rax
	call	qword ptr [rax+0x68]
	mov	rax, rsi
$_126:	xor	ecx, ecx
	cmp	dword ptr [rax+0x34], 0
	jge	$_127
	inc	ecx
$_127:	mov	esi, dword ptr [rax+0x30]
	mov	dword ptr [rsp+0x20], 1
	mov	r9d, ecx
	movzx	r8d, byte ptr [r14+0x8]
	mov	rdx, rdi
	mov	rcx, rsi
	call	myltoa@PLT
	mov	rcx, rdi
	call	tstrlen@PLT
	add	rdi, rax
	mov	al, 32
	stosb
	jmp	$_129

$_128:	mov	rsi, qword ptr [rbx+0x18]
	mov	rcx, qword ptr [rbx+0x38]
	sub	rcx, rsi
	rep movsb
$_129:	add	rbx, 32
	jmp	$_125

$_130:	mov	byte ptr [rdi], 0
	mov	rcx, rdi
	sub	rcx, qword ptr [r14+0x1E0]
	mov	esi, ecx
	add	ecx, 144
	call	LclAlloc@PLT
	mov	rdx, rax
	lea	rdi, [rdx+0x88]
	mov	ecx, esi
	mov	rsi, qword ptr [r14+0x1E0]
	inc	ecx
	rep movsb
	mov	rdi, rdx
	jmp	$_132

$_131:	mov	ecx, 144
	call	LclAlloc@PLT
	mov	rdi, rax
$_132:	mov	eax, dword ptr [rbp-0xC]
	mov	dword ptr [rdi+0x18], eax
	mov	eax, dword ptr [rbp-0x8]
	mov	dword ptr [rdi+0x14], eax
	test	eax, eax
	jz	$_133
	mov	rcx, qword ptr [rbp+0x38]
	call	LclDup@PLT
	mov	qword ptr [rdi+0x8], rax
	jmp	$_134

$_133:	lea	rax, [DS0002+0x9+rip]
	mov	qword ptr [rdi+0x8], rax
$_134:	mov	byte ptr [rdi+0x1D], 6
	test	byte ptr [r14+0x3], 0x10
	jz	$_135
	or	byte ptr [rdi+0x12], 0x01
$_135:	test	byte ptr [r14], 0x01
	jz	$_136
	or	byte ptr [rdi+0x1C], 0x01
$_136:	or	byte ptr [rdi+0x10], 0x01
	mov	al, byte ptr [rbp+0x40]
	mov	byte ptr [rdi+0x1E], al
	mov	rax, qword ptr [rbp+0x48]
	mov	qword ptr [rdi+0x28], rax
	mov	qword ptr [rdi+0x80], 0
	mov	rsi, qword ptr [rbp-0x18]
	mov	rcx, qword ptr [rsi]
	cmp	qword ptr [rsi], 0
	jnz	$_137
	mov	dword ptr [rbp-0x1C], 0
	mov	qword ptr [rsi], rdi
	mov	qword ptr [rsi+0x8], rdi
	jmp	$_138

$_137:	mov	rcx, qword ptr [rsi+0x8]
	mov	qword ptr [rcx+0x80], rdi
	mov	qword ptr [rsi+0x8], rdi
$_138:	mov	rcx, qword ptr [rbp+0x48]
	cmp	byte ptr [rbp+0x40], 196
	jnz	$_142
	jmp	$_140

$_139:	mov	rcx, qword ptr [rcx+0x28]
$_140:	cmp	qword ptr [rcx+0x28], 0
	jnz	$_139
	cmp	word ptr [rcx+0x6E], 1
	jz	$_141
	cmp	word ptr [rcx+0x6E], 2
	jnz	$_142
$_141:	mov	eax, dword ptr [rcx+0x50]
	mov	dword ptr [rbp+0x50], eax
$_142:	movzx	eax, byte ptr [rsi+0x10]
	cmp	eax, 1
	jbe	$_145
	cmp	dword ptr [rbp-0x1C], 0
	jnz	$_145
	mov	ecx, dword ptr [rbp+0x50]
	cmp	eax, ecx
	jnc	$_143
	lea	ecx, [rax-0x1]
	mov	edx, dword ptr [rbp-0x4]
	add	edx, ecx
	neg	eax
	and	edx, eax
	mov	dword ptr [rbp-0x4], edx
	jmp	$_144

$_143:	test	ecx, ecx
	jz	$_144
	mov	eax, ecx
	lea	ecx, [rax-0x1]
	mov	edx, dword ptr [rbp-0x4]
	add	edx, ecx
	neg	eax
	and	edx, eax
	mov	dword ptr [rbp-0x4], edx
$_144:	mov	rcx, qword ptr [CurrStruct+rip]
	cmp	word ptr [rcx+0x6E], 2
	jz	$_145
	mov	eax, dword ptr [rbp-0x4]
	mov	dword ptr [rcx+0x30], eax
	mov	eax, dword ptr [rcx+0x60]
	cmp	dword ptr [rbp-0x4], eax
	jle	$_145
	mov	eax, dword ptr [rbp-0x4]
	mov	dword ptr [rcx+0x60], eax
$_145:	mov	rcx, qword ptr [CurrStruct+rip]
	mov	eax, dword ptr [rcx+0x50]
	cmp	dword ptr [rbp+0x50], eax
	jbe	$_146
	mov	eax, dword ptr [rbp+0x50]
	mov	dword ptr [rcx+0x50], eax
$_146:	mov	eax, dword ptr [rbp-0x4]
	mov	dword ptr [rdi+0x30], eax
	mov	rdx, qword ptr [rbp+0x38]
	test	byte ptr [r14+0x3], 0x02
	jz	$_150
	cmp	byte ptr [rdx], 0
	jz	$_150
	mov	rcx, qword ptr [rbp+0x38]
	call	SymLookup@PLT
	cmp	byte ptr [rax+0x1D], 0
	jnz	$_147
	mov	byte ptr [rax+0x1D], 6
$_147:	cmp	byte ptr [rax+0x1D], 6
	jnz	$_150
	mov	rcx, rax
	mov	al, byte ptr [rbp+0x40]
	mov	byte ptr [rcx+0x1E], al
	mov	rax, qword ptr [rbp+0x48]
	mov	qword ptr [rcx+0x28], rax
	mov	eax, dword ptr [rbp-0x4]
	mov	dword ptr [rcx+0x30], eax
	mov	rdx, qword ptr [CurrStruct+rip]
	mov	rdx, qword ptr [rdx+0x80]
$_148:	test	rdx, rdx
	jz	$_149
	mov	eax, dword ptr [rdx+0x30]
	add	dword ptr [rcx+0x30], eax
	mov	rdx, qword ptr [rdx+0x80]
	jmp	$_148

$_149:	or	byte ptr [rcx+0x10], 0x01
$_150:	mov	rax, rdi
$_151:	leave
	pop	rbx
	pop	rdi
	pop	rsi
	ret

AlignInStruct:
	mov	rdx, qword ptr [CurrStruct+rip]
	cmp	word ptr [rdx+0x6E], 2
	jz	$_152
	mov	eax, dword ptr [rdx+0x30]
	lea	eax, [rax+rcx-0x1]
	neg	ecx
	and	eax, ecx
	mov	dword ptr [rdx+0x30], eax
	cmp	eax, dword ptr [rdx+0x60]
	jbe	$_152
	mov	dword ptr [rdx+0x60], eax
$_152:	xor	eax, eax
	ret

UpdateStructSize:
	mov	rdx, qword ptr [CurrStruct+rip]
	cmp	word ptr [rdx+0x6E], 4
	jnz	$_153
	jmp	$_156

$_153:	cmp	word ptr [rdx+0x6E], 2
	jnz	$_155
	mov	eax, dword ptr [rdx+0x60]
	cmp	dword ptr [rcx+0x60], eax
	jbe	$_154
	mov	eax, dword ptr [rcx+0x60]
	mov	dword ptr [rdx+0x60], eax
$_154:	jmp	$_156

$_155:	mov	eax, dword ptr [rcx+0x60]
	add	dword ptr [rdx+0x30], eax
	mov	eax, dword ptr [rdx+0x60]
	cmp	dword ptr [rdx+0x30], eax
	jle	$_156
	mov	eax, dword ptr [rdx+0x30]
	mov	dword ptr [rdx+0x60], eax
$_156:	ret

SetStructCurrentOffset:
	push	rbp
	mov	rbp, rsp
	sub	rsp, 32
	mov	rdx, qword ptr [CurrStruct+rip]
	cmp	word ptr [rdx+0x6E], 2
	jnz	$_157
	mov	ecx, 2200
	call	asmerr@PLT
	jmp	$_159

$_157:	mov	dword ptr [rdx+0x30], ecx
	mov	rax, qword ptr [rdx+0x78]
	or	byte ptr [rax+0x11], 0x02
	cmp	ecx, dword ptr [rdx+0x60]
	jle	$_158
	mov	dword ptr [rdx+0x60], ecx
$_158:	xor	eax, eax
$_159:	leave
	ret

GetQualifiedType:
	mov	qword ptr [rsp+0x8], rcx
	mov	qword ptr [rsp+0x10], rdx
	mov	qword ptr [rsp+0x18], r8
	push	rsi
	push	rdi
	push	rbx
	push	rbp
	mov	rbp, rsp
	sub	rsp, 56
	mov	dword ptr [rbp-0x10], 0
	mov	eax, dword ptr [rcx]
	mov	dword ptr [rbp-0x14], eax
	imul	ebx, eax, 32
	add	rbx, rdx
	mov	rdx, rbx
$_160:	cmp	byte ptr [rbx], 0
	jz	$_163
	cmp	byte ptr [rbx], 44
	jz	$_163
	cmp	byte ptr [rbx], 3
	jnz	$_162
	cmp	dword ptr [rbx+0x4], 605
	jnz	$_162
	mov	byte ptr [rbx], 6
	mov	cl, byte ptr [r14+0x15]
	mov	eax, 1
	shl	eax, cl
	and	eax, 0x70
	mov	ecx, 290
	jz	$_161
	mov	ecx, 291
$_161:	mov	dword ptr [rbx+0x4], ecx
$_162:	add	rbx, 32
	jmp	$_160

$_163:
	mov	rbx, rdx
	mov	rsi, qword ptr [rbp+0x38]
	mov	dword ptr [rbp-0x4], -1
$_164:	cmp	byte ptr [rbx], 6
	jz	$_165
	cmp	byte ptr [rbx], 5
	jne	$_177
$_165:	cmp	byte ptr [rbx], 6
	jnz	$_174
	mov	edi, dword ptr [rbx+0x4]
	cmp	dword ptr [rbp-0x4], -1
	jnz	$_166
	mov	dword ptr [rbp-0x4], edi
$_166:	mov	eax, edi
	add	eax, eax
	mov	al, byte ptr [r12+rax*8+0xC]
	mov	byte ptr [rbp-0x9], al
	cmp	al, 130
	jz	$_167
	cmp	al, 129
	jnz	$_171
$_167:	cmp	dword ptr [rbp-0x10], 0
	jnz	$_169
	mov	eax, edi
	add	eax, eax
	mov	eax, dword ptr [r12+rax*8+0x4]
	cmp	byte ptr [rbp-0x9], 130
	sete	cl
	mov	byte ptr [rsi+0x12], cl
	cmp	eax, 254
	jz	$_168
	mov	byte ptr [rsi+0x13], al
$_168:	mov	dword ptr [rbp-0x10], 1
	jmp	$_170

$_169:	cmp	dword ptr [rbx-0x1C], 335
	jz	$_170
	jmp	$_177

$_170:	jmp	$_173

$_171:	cmp	byte ptr [rsi+0x11], 0
	jz	$_172
	mov	al, byte ptr [rbp-0x9]
	mov	byte ptr [rsi+0x14], al
$_172:	add	rbx, 32
	jmp	$_177

$_173:	jmp	$_176

$_174:	cmp	dword ptr [rbx+0x4], 335
	jnz	$_175
	mov	dword ptr [rbp-0x4], -2
	inc	byte ptr [rsi+0x11]
	jmp	$_176

$_175:	jmp	$_177

$_176:	add	rbx, 32
	jmp	$_164

$_177:
	cmp	dword ptr [rbp-0x4], -2
	jne	$_188
	cmp	byte ptr [rbx], 8
	jne	$_188
	cmp	dword ptr [rbx-0x1C], 335
	jne	$_188
	mov	rcx, rbx
	call	SymFindID@PLT
	mov	qword ptr [rsi+0x8], rax
	mov	rdi, qword ptr [rsi+0x8]
	test	rdi, rdi
	jz	$_178
	cmp	byte ptr [rdi+0x1D], 0
	jnz	$_179
$_178:	mov	r8d, 1
	mov	rdx, qword ptr [rbx+0x10]
	mov	rcx, rdi
	call	CreateTypeSymbol
	mov	qword ptr [rsi+0x8], rax
	jmp	$_187

$_179:	cmp	byte ptr [rdi+0x1D], 7
	jz	$_180
	mov	rdx, qword ptr [rbx+0x10]
	mov	ecx, 2004
	call	asmerr@PLT
	jmp	$_207

	jmp	$_187

$_180:	cmp	word ptr [rdi+0x6E], 3
	jne	$_187
	mov	al, byte ptr [rdi+0x49]
	add	byte ptr [rsi+0x11], al
	cmp	byte ptr [rdi+0x49], 0
	jnz	$_184
	mov	al, 192
	cmp	byte ptr [rdi+0x1E], 196
	jz	$_181
	mov	al, byte ptr [rdi+0x1E]
$_181:	mov	byte ptr [rsi+0x14], al
	cmp	dword ptr [rbp-0x10], 0
	jnz	$_183
	cmp	byte ptr [rsi+0x11], 1
	jnz	$_183
	cmp	byte ptr [rdi+0x1E], 129
	jz	$_182
	cmp	byte ptr [rdi+0x1E], 128
	jz	$_182
	cmp	byte ptr [rdi+0x1E], 130
	jnz	$_183
$_182:	mov	al, byte ptr [rdi+0x21]
	mov	byte ptr [rsi+0x12], al
	cmp	byte ptr [rdi+0x48], 254
	jz	$_183
	mov	al, byte ptr [rdi+0x48]
	mov	byte ptr [rsi+0x13], al
$_183:	jmp	$_185

$_184:	mov	al, byte ptr [rdi+0x4A]
	mov	byte ptr [rsi+0x14], al
	cmp	dword ptr [rbp-0x10], 0
	jnz	$_185
	cmp	byte ptr [rsi+0x11], 1
	jnz	$_185
	mov	al, byte ptr [rdi+0x21]
	mov	byte ptr [rsi+0x12], al
	cmp	byte ptr [rdi+0x48], 254
	jz	$_185
	mov	al, byte ptr [rdi+0x48]
	mov	byte ptr [rsi+0x13], al
$_185:	cmp	byte ptr [rdi+0x1E], 196
	jnz	$_186
	mov	rax, qword ptr [rdi+0x28]
	mov	qword ptr [rsi+0x8], rax
	jmp	$_187

$_186:	mov	rax, qword ptr [rdi+0x50]
	mov	qword ptr [rsi+0x8], rax
$_187:	add	rbx, 32
$_188:	cmp	dword ptr [rbp-0x4], -1
	jne	$_200
	cmp	byte ptr [rbx], 8
	jz	$_191
	mov	ecx, 2008
	cmp	byte ptr [rbx], 0
	jz	$_189
	cmp	byte ptr [rbx], 44
	jnz	$_190
$_189:	mov	ecx, 2175
$_190:	mov	rdx, qword ptr [rbx+0x10]
	call	asmerr@PLT
	jmp	$_207

$_191:	mov	rcx, rbx
	call	SymFindID@PLT
	mov	qword ptr [rsi+0x8], rax
	mov	rdi, rax
	test	rdi, rdi
	jz	$_192
	cmp	byte ptr [rdi+0x1D], 7
	jz	$_195
$_192:	mov	ecx, 2175
	cmp	qword ptr [rsi+0x8], 0
	jz	$_193
	cmp	byte ptr [rdi+0x1D], 0
	jnz	$_194
$_193:	mov	ecx, 2006
$_194:	mov	rdx, qword ptr [rbx+0x10]
	call	asmerr@PLT
	jmp	$_207

$_195:	mov	rdi, qword ptr [rsi+0x8]
	cmp	word ptr [rdi+0x6E], 3
	jnz	$_198
	mov	al, byte ptr [rdi+0x1E]
	mov	byte ptr [rsi+0x10], al
	mov	al, byte ptr [rdi+0x21]
	mov	byte ptr [rsi+0x12], al
	mov	al, byte ptr [rdi+0x49]
	mov	byte ptr [rsi+0x11], al
	mov	al, byte ptr [rdi+0x48]
	mov	byte ptr [rsi+0x13], al
	mov	eax, dword ptr [rdi+0x60]
	mov	dword ptr [rsi], eax
	mov	al, byte ptr [rdi+0x4A]
	mov	byte ptr [rsi+0x14], al
	cmp	byte ptr [rdi+0x1E], 196
	jnz	$_196
	mov	rax, qword ptr [rdi+0x28]
	mov	qword ptr [rsi+0x8], rax
	jmp	$_197

$_196:	mov	rax, qword ptr [rdi+0x50]
	mov	qword ptr [rsi+0x8], rax
$_197:	jmp	$_199

$_198:	mov	byte ptr [rsi+0x10], 196
	mov	eax, dword ptr [rdi+0x60]
	mov	dword ptr [rsi], eax
$_199:	add	rbx, 32
	jmp	$_206

$_200:	cmp	byte ptr [rsi+0x11], 0
	jz	$_201
	mov	byte ptr [rsi+0x10], 195
	jmp	$_202

$_201:	mov	eax, dword ptr [rbp-0x4]
	add	eax, eax
	mov	al, byte ptr [r12+rax*8+0xC]
	mov	byte ptr [rsi+0x10], al
$_202:	cmp	byte ptr [rsi+0x10], 195
	jnz	$_205
	cmp	dword ptr [rbp-0x10], 0
	jnz	$_203
	test	byte ptr [rsi+0x14], 0xC0
	jnz	$_203
	xor	eax, eax
	mov	edx, 1
	mov	cl, byte ptr [r14+0x15]
	shl	edx, cl
	test	edx, 0x68
	setne	al
	mov	byte ptr [rsi+0x12], al
$_203:	mov	ecx, 129
	cmp	byte ptr [rsi+0x12], 0
	jz	$_204
	mov	ecx, 130
$_204:	xor	r8d, r8d
	movzx	edx, byte ptr [rsi+0x13]
	movzx	ecx, cl
	call	SizeFromMemtype@PLT
	mov	dword ptr [rsi], eax
	jmp	$_206

$_205:	xor	r8d, r8d
	movzx	edx, byte ptr [rsi+0x13]
	movzx	ecx, byte ptr [rsi+0x10]
	call	SizeFromMemtype@PLT
	mov	dword ptr [rsi], eax
$_206:	mov	rax, rbx
	sub	rax, qword ptr [rbp+0x30]
	xor	edx, edx
	mov	ecx, 32
	div	ecx
	mov	rcx, qword ptr [rbp+0x28]
	mov	dword ptr [rcx], eax
	xor	eax, eax
$_207:	leave
	pop	rbx
	pop	rdi
	pop	rsi
	ret

CreateType:
	mov	qword ptr [rsp+0x8], rcx
	mov	qword ptr [rsp+0x10], rdx
	mov	qword ptr [rsp+0x18], r8
	mov	qword ptr [rsp+0x20], r9
	push	rsi
	push	rdi
	push	rbx
	push	rbp
	mov	rbp, rsp
	sub	rsp, 72
	mov	rcx, qword ptr [rbp+0x38]
	call	SymFind@PLT
	mov	rdi, rax
	test	rdi, rdi
	jz	$_208
	cmp	byte ptr [rdi+0x1D], 0
	jnz	$_210
$_208:	mov	r8d, 1
	mov	rdx, qword ptr [rbp+0x38]
	mov	rcx, rdi
	call	CreateTypeSymbol
	mov	rdi, rax
	test	rdi, rdi
	jnz	$_209
	mov	rax, -1
	jmp	$_236

$_209:	jmp	$_212

$_210:	cmp	byte ptr [rdi+0x1D], 7
	jnz	$_211
	cmp	word ptr [rdi+0x6E], 3
	jz	$_212
	cmp	word ptr [rdi+0x6E], 0
	jz	$_212
$_211:	mov	rdx, qword ptr [rdi+0x8]
	mov	ecx, 2005
	call	asmerr@PLT
	jmp	$_236

$_212:	mov	rcx, qword ptr [rbp+0x40]
	test	rcx, rcx
	jz	$_213
	mov	qword ptr [rcx], rdi
$_213:	or	byte ptr [rdi+0x10], 0x01
	test	rcx, rcx
	jnz	$_214
	cmp	dword ptr [Parse_Pass+rip], 0
	jbe	$_214
	xor	eax, eax
	jmp	$_236

$_214:
	mov	word ptr [rdi+0x6E], 3
	imul	ebx, dword ptr [rbp+0x28], 32
	add	rbx, qword ptr [rbp+0x30]
	cmp	byte ptr [rbx], 3
	jne	$_219
	cmp	dword ptr [rbx+0x4], 604
	jne	$_219
	cmp	qword ptr [rdi+0x50], 0
	jnz	$_215
	cmp	byte ptr [rdi+0x1E], 192
	jnz	$_215
	mov	r8d, 7
	lea	rdx, [DS0002+0x9+rip]
	xor	ecx, ecx
	call	CreateProc@PLT
	jmp	$_217

$_215:	cmp	byte ptr [rdi+0x1E], 128
	jnz	$_216
	mov	rax, qword ptr [rdi+0x50]
	jmp	$_217

$_216:	mov	rdx, qword ptr [rdi+0x8]
	mov	ecx, 2004
	call	asmerr@PLT
	jmp	$_236

$_217:	inc	dword ptr [rbp+0x28]
	mov	rsi, rax
	movzx	eax, byte ptr [r14+0x9]
	mov	dword ptr [rsp+0x20], eax
	xor	r9d, r9d
	mov	r8, qword ptr [rbp+0x30]
	mov	edx, dword ptr [rbp+0x28]
	mov	rcx, rsi
	call	ParseProc@PLT
	cmp	eax, -1
	je	$_236
	mov	byte ptr [rdi+0x1E], 128
	mov	al, byte ptr [rsi+0x20]
	mov	byte ptr [rdi+0x48], al
	mov	eax, 2
	mov	cl, byte ptr [rdi+0x48]
	shl	eax, cl
	mov	dword ptr [rdi+0x60], eax
	cmp	byte ptr [rsi+0x1E], 129
	jz	$_218
	mov	byte ptr [rdi+0x21], 1
	add	dword ptr [rdi+0x60], 2
$_218:	mov	qword ptr [rdi+0x50], rsi
	xor	eax, eax
	jmp	$_236

$_219:	mov	dword ptr [rbp-0x18], 0
	mov	byte ptr [rbp-0x7], 0
	mov	byte ptr [rbp-0x6], 0
	mov	cl, byte ptr [r14+0x15]
	mov	eax, 1
	shl	eax, cl
	test	eax, 0x68
	jz	$_220
	mov	byte ptr [rbp-0x6], 1
$_220:	mov	byte ptr [rbp-0x8], 192
	mov	byte ptr [rbp-0x4], 192
	mov	qword ptr [rbp-0x10], 0
	mov	al, byte ptr [r14+0x4]
	mov	byte ptr [rbp-0x5], al
	cmp	byte ptr [rbx], 0
	jz	$_221
	cmp	byte ptr [rbx], 44
	jnz	$_222
$_221:	jmp	$_223

$_222:	lea	r8, [rbp-0x18]
	mov	rdx, qword ptr [rbp+0x30]
	lea	rcx, [rbp+0x28]
	call	GetQualifiedType
	cmp	eax, -1
	jnz	$_223
	jmp	$_236

$_223:	cmp	byte ptr [rdi+0x1E], 192
	je	$_232
	mov	rcx, qword ptr [rbp-0x10]
$_224:	test	rcx, rcx
	jz	$_225
	cmp	qword ptr [rcx+0x28], 0
	jz	$_225
	mov	rcx, qword ptr [rcx+0x28]
	jmp	$_224

$_225:	mov	rdx, qword ptr [rdi+0x50]
	cmp	byte ptr [rdi+0x1E], 196
	jnz	$_226
	mov	rdx, qword ptr [rdi+0x28]
$_226:	test	rdx, rdx
	jz	$_227
	cmp	qword ptr [rdx+0x28], 0
	jz	$_227
	mov	rdx, qword ptr [rdx+0x28]
	jmp	$_226

$_227:	mov	bl, byte ptr [r14+0x4]
	mov	bh, bl
	cmp	byte ptr [rdi+0x48], 254
	jz	$_228
	mov	bl, byte ptr [rdi+0x48]
$_228:	cmp	byte ptr [rbp-0x5], 254
	jz	$_229
	mov	bh, byte ptr [rbp-0x5]
$_229:	cmp	bl, bh
	setne	bl
	mov	al, byte ptr [rdi+0x1E]
	cmp	byte ptr [rbp-0x8], al
	jnz	$_231
	cmp	byte ptr [rbp-0x8], 196
	jnz	$_230
	cmp	rcx, rdx
	jnz	$_231
$_230:	cmp	byte ptr [rbp-0x8], 195
	jnz	$_232
	mov	al, byte ptr [rdi+0x21]
	cmp	byte ptr [rbp-0x6], al
	jnz	$_231
	test	bl, bl
	jnz	$_231
	mov	al, byte ptr [rdi+0x4A]
	cmp	byte ptr [rbp-0x4], al
	jnz	$_231
	cmp	rcx, rdx
	jz	$_232
$_231:	mov	rdx, qword ptr [rbp+0x38]
	mov	ecx, 2004
	call	asmerr@PLT
	jmp	$_236

$_232:	mov	al, byte ptr [rbp-0x8]
	mov	byte ptr [rdi+0x1E], al
	mov	al, byte ptr [rbp-0x5]
	mov	byte ptr [rdi+0x48], al
	mov	eax, dword ptr [rbp-0x18]
	mov	dword ptr [rdi+0x60], eax
	mov	al, byte ptr [rbp-0x7]
	mov	byte ptr [rdi+0x49], al
	mov	al, byte ptr [rbp-0x6]
	mov	byte ptr [rdi+0x21], al
	cmp	byte ptr [rbp-0x8], 196
	jnz	$_233
	mov	rax, qword ptr [rbp-0x10]
	mov	qword ptr [rdi+0x28], rax
	jmp	$_234

$_233:	mov	rax, qword ptr [rbp-0x10]
	mov	qword ptr [rdi+0x50], rax
$_234:	mov	al, byte ptr [rbp-0x4]
	mov	byte ptr [rdi+0x4A], al
	imul	ebx, dword ptr [rbp+0x28], 32
	add	rbx, qword ptr [rbp+0x30]
	cmp	qword ptr [rbp+0x40], 0
	jnz	$_235
	cmp	byte ptr [rbx], 0
	jz	$_235
	mov	rdx, qword ptr [rbx+0x10]
	mov	ecx, 2008
	call	asmerr@PLT
	jmp	$_236

$_235:	xor	eax, eax
$_236:	leave
	pop	rbx
	pop	rdi
	pop	rsi
	ret

TypedefDirective:
	push	rbp
	mov	rbp, rsp
	sub	rsp, 32
	cmp	ecx, 1
	jz	$_237
	imul	eax, ecx, 32
	mov	rdx, qword ptr [rdx+rax+0x10]
	mov	ecx, 2008
	call	asmerr@PLT
	jmp	$_238

$_237:	inc	ecx
	xor	r9d, r9d
	mov	r8, qword ptr [rdx+0x10]
	call	CreateType
$_238:	leave
	ret

RecordDirective:
	mov	qword ptr [rsp+0x8], rcx
	mov	qword ptr [rsp+0x10], rdx
	push	rsi
	push	rdi
	push	rbx
	push	rbp
	mov	rbp, rsp
	sub	rsp, 216
	mov	qword ptr [rbp-0x18], 0
	mov	rbx, rdx
	mov	rax, qword ptr [rbx+0x10]
	mov	qword ptr [rbp-0x8], rax
	imul	ecx, ecx, 32
	add	rbx, rcx
	cmp	dword ptr [rbp+0x28], 1
	jz	$_240
	cmp	dword ptr [rbp+0x28], 0
	jnz	$_239
	mov	rdx, qword ptr [rbp+0x30]
	mov	ecx, dword ptr [rbp+0x28]
	call	StructDirective
	jmp	$_283

$_239:	mov	rdx, qword ptr [rbx+0x10]
	mov	ecx, 2008
	call	asmerr@PLT
	jmp	$_283

$_240:	mov	rcx, qword ptr [rbp-0x8]
	call	SymFind@PLT
	mov	rsi, rax
	test	rsi, rsi
	jz	$_241
	cmp	byte ptr [rsi+0x1D], 0
	jnz	$_242
$_241:	mov	r8d, 1
	mov	rdx, qword ptr [rbp-0x8]
	mov	rcx, rsi
	call	CreateTypeSymbol
	mov	rsi, rax
	jmp	$_246

$_242:	cmp	byte ptr [rsi+0x1D], 7
	jnz	$_245
	cmp	word ptr [rsi+0x6E], 4
	jz	$_243
	cmp	word ptr [rsi+0x6E], 0
	jnz	$_245
$_243:	cmp	dword ptr [Parse_Pass+rip], 0
	jnz	$_244
	cmp	word ptr [rsi+0x6E], 4
	jnz	$_244
	mov	qword ptr [rbp-0x18], rsi
	xor	r8d, r8d
	mov	rdx, qword ptr [rbp-0x8]
	xor	ecx, ecx
	call	CreateTypeSymbol
	mov	rsi, rax
	mov	dword ptr [rbp-0x28], 0
$_244:	jmp	$_246

$_245:	mov	rdx, qword ptr [rbp-0x8]
	mov	ecx, 2005
	call	asmerr@PLT
	jmp	$_283

$_246:	or	byte ptr [rsi+0x10], 0x01
	cmp	dword ptr [Parse_Pass+rip], 0
	jbe	$_247
	xor	eax, eax
	jmp	$_283

$_247:	mov	qword ptr [rbp-0x10], rsi
	mov	word ptr [rsi+0x6E], 4
	inc	dword ptr [rbp+0x28]
	add	rbx, 32
	mov	dword ptr [rbp-0x1C], 0
$_248:	cmp	byte ptr [rbx], 8
	jz	$_249
	mov	rdx, qword ptr [rbx+0x10]
	mov	ecx, 2008
	call	asmerr@PLT
	jmp	$_272

$_249:	mov	rcx, qword ptr [rbx+0x10]
	call	tstrlen@PLT
	mov	dword ptr [rbp-0x24], eax
	cmp	eax, 247
	jbe	$_250
	mov	ecx, 2043
	call	asmerr@PLT
	jmp	$_272

$_250:	mov	rdi, rbx
	inc	dword ptr [rbp+0x28]
	cmp	byte ptr [rbx+0x20], 58
	jz	$_251
	lea	rdx, [DS0002+0x9+rip]
	mov	ecx, 2065
	call	asmerr@PLT
	jmp	$_272

$_251:	inc	dword ptr [rbp+0x28]
	mov	byte ptr [rsp+0x20], 0
	lea	r9, [rbp-0xA0]
	mov	r8d, dword ptr [r14+0x64]
	mov	rdx, qword ptr [rbp+0x30]
	lea	rcx, [rbp+0x28]
	call	EvalOperand@PLT
	cmp	eax, -1
	je	$_272
	cmp	dword ptr [rbp-0x64], 0
	jz	$_252
	mov	ecx, 2026
	call	asmerr@PLT
	mov	dword ptr [rbp-0xA0], 1
$_252:	mov	ecx, dword ptr [rbp-0xA0]
	add	ecx, dword ptr [rbp-0x1C]
	mov	eax, 32
	cmp	byte ptr [r14+0x4], 2
	jnz	$_253
	mov	eax, 64
$_253:	cmp	dword ptr [rbp-0xA0], 0
	jnz	$_254
	mov	rdx, qword ptr [rbx+0x10]
	mov	ecx, 2172
	call	asmerr@PLT
	jmp	$_272

	jmp	$_255

$_254:	cmp	ecx, eax
	jbe	$_255
	mov	rdx, qword ptr [rbx+0x10]
	mov	ecx, 2089
	call	asmerr@PLT
	jmp	$_272

$_255:	mov	dword ptr [rbp-0x2C], 0
	imul	ebx, dword ptr [rbp+0x28], 32
	add	rbx, qword ptr [rbp+0x30]
	cmp	byte ptr [rbx], 3
	jnz	$_259
	cmp	byte ptr [rbx+0x1], 48
	jnz	$_259
	inc	dword ptr [rbp+0x28]
	add	rbx, 32
	mov	rcx, rbx
	mov	qword ptr [rbp-0x38], rbx
$_256:	cmp	byte ptr [rbx], 0
	jz	$_257
	cmp	byte ptr [rbx], 44
	jz	$_257
	inc	dword ptr [rbp+0x28]
	add	rbx, 32
	jmp	$_256

$_257:	cmp	rcx, rbx
	jnz	$_258
	mov	rdx, qword ptr [rdi+0x18]
	mov	ecx, 2008
	call	asmerr@PLT
	jmp	$_272

$_258:	cmp	qword ptr [rbp-0x18], 0
	jnz	$_259
	mov	rax, qword ptr [rbx+0x18]
	sub	rax, qword ptr [rcx+0x18]
	mov	dword ptr [rbp-0x2C], eax
$_259:	mov	rcx, rdi
	call	SymFindID@PLT
	mov	rsi, rax
	mov	dword ptr [rbp-0x20], 1
	cmp	qword ptr [rbp-0x18], 0
	jz	$_262
	test	rsi, rsi
	jz	$_260
	cmp	byte ptr [rsi+0x1D], 6
	jnz	$_260
	cmp	byte ptr [rsi+0x1E], 193
	jnz	$_260
	mov	eax, dword ptr [rbp-0xA0]
	cmp	byte ptr [rsi+0x5A], al
	jz	$_261
$_260:	mov	r8, qword ptr [rdi+0x10]
	lea	rdx, [DS0003+rip]
	mov	ecx, 2007
	call	asmerr@PLT
	inc	dword ptr [rbp-0x28]
	mov	dword ptr [rbp-0x20], 0
$_261:	jmp	$_263

$_262:	test	rsi, rsi
	jz	$_263
	mov	rdx, qword ptr [rsi+0x8]
	mov	ecx, 2005
	call	asmerr@PLT
	jmp	$_272

$_263:	cmp	dword ptr [rbp-0x20], 0
	je	$_268
	mov	rsi, qword ptr [rdi+0x10]
	mov	eax, dword ptr [rbp-0xA0]
	add	dword ptr [rbp-0x1C], eax
	mov	ecx, dword ptr [rbp-0x2C]
	lea	ecx, [rcx+0x90]
	call	LclAlloc@PLT
	mov	rdi, rax
	mov	eax, dword ptr [rbp-0x24]
	mov	dword ptr [rdi+0x14], eax
	mov	rcx, rsi
	call	LclDup@PLT
	mov	qword ptr [rdi+0x8], rax
	mov	rcx, rax
	call	SymHash@PLT
	mov	dword ptr [rdi+0x18], eax
	test	byte ptr [r14], 0x01
	jz	$_264
	or	byte ptr [rdi+0x1C], 0x01
$_264:	movzx	eax, byte ptr [r14+0x3]
	and	eax, 0x10
	shr	eax, 4
	and	byte ptr [rdi+0x12], 0xFE
	or	byte ptr [rdi+0x12], al
	mov	byte ptr [rdi+0x1D], 6
	mov	byte ptr [rdi+0x1E], 193
	mov	eax, dword ptr [rbp-0xA0]
	mov	byte ptr [rdi+0x5A], al
	cmp	qword ptr [rbp-0x18], 0
	jnz	$_265
	mov	rcx, rdi
	call	SymAddGlobal@PLT
$_265:	mov	qword ptr [rdi+0x80], 0
	mov	rcx, qword ptr [rbp-0x10]
	mov	rcx, qword ptr [rcx+0x78]
	cmp	qword ptr [rcx], 0
	jnz	$_266
	mov	qword ptr [rcx], rdi
	mov	qword ptr [rcx+0x8], rdi
	jmp	$_267

$_266:	mov	rdx, qword ptr [rcx+0x8]
	mov	qword ptr [rdx+0x80], rdi
	mov	qword ptr [rcx+0x8], rdi
$_267:	cmp	dword ptr [rbp-0x2C], 0
	jz	$_268
	mov	rcx, qword ptr [rbp-0x38]
	mov	rdx, rdi
	mov	rsi, qword ptr [rcx+0x18]
	lea	rdi, [rdi+0x88]
	mov	ecx, dword ptr [rbp-0x2C]
	rep movsb
	mov	rdi, rdx
$_268:	mov	eax, dword ptr [r14+0x64]
	cmp	dword ptr [rbp+0x28], eax
	jge	$_271
	cmp	byte ptr [rbx], 44
	jnz	$_269
	cmp	byte ptr [rbx+0x20], 0
	jnz	$_270
$_269:	mov	rdx, qword ptr [rbx+0x18]
	mov	ecx, 2008
	call	asmerr@PLT
	jmp	$_272

$_270:	inc	dword ptr [rbp+0x28]
	add	rbx, 32
$_271:	mov	eax, dword ptr [r14+0x64]
	cmp	dword ptr [rbp+0x28], eax
	jl	$_248
$_272:	mov	rsi, qword ptr [rbp-0x10]
	mov	eax, dword ptr [rbp-0x1C]
	mov	ecx, 1
	mov	edx, 0
	cmp	eax, 16
	jbe	$_275
	cmp	eax, 32
	jbe	$_273
	mov	ecx, 8
	mov	edx, 7
	jmp	$_274

$_273:	mov	ecx, 4
	mov	edx, 3
$_274:	jmp	$_276

$_275:	cmp	eax, 8
	jbe	$_276
	mov	ecx, 2
	mov	edx, 1
$_276:	mov	dword ptr [rsi+0x60], ecx
	mov	byte ptr [rsi+0x1E], dl
	mov	rcx, qword ptr [rsi+0x78]
	mov	rdi, qword ptr [rcx]
$_277:	test	rdi, rdi
	jz	$_278
	sub	al, byte ptr [rdi+0x5A]
	mov	byte ptr [rdi+0x59], al
	mov	rdi, qword ptr [rdi+0x80]
	jmp	$_277

$_278:	cmp	qword ptr [rbp-0x18], 0
	jz	$_282
	mov	eax, 1
	cmp	dword ptr [rbp-0x28], 0
	jle	$_279
	dec	eax
	jmp	$_280

$_279:	mov	rdx, qword ptr [rbp-0x18]
	mov	rcx, qword ptr [rbp-0x10]
	call	$_025
$_280:	test	eax, eax
	jnz	$_281
	mov	r8, qword ptr [rsi+0x8]
	lea	rdx, [DS0003+rip]
	mov	ecx, 2007
	call	asmerr@PLT
$_281:	mov	rcx, qword ptr [rbp-0x10]
	call	SymFree@PLT
$_282:	xor	eax, eax
$_283:	leave
	pop	rbx
	pop	rdi
	pop	rsi
	ret


.SECTION .data
	.ALIGN	16

CurrStruct:
	.quad  0x0000000000000000

redef_struct:
	.quad  0x0000000000000000

DS0000:
	.byte  0x00

DS0001:
	.byte  0x4E, 0x4F, 0x4E, 0x55, 0x4E, 0x49, 0x51, 0x55
	.byte  0x45, 0x00

DS0002:
	.byte  0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72
	.byte  0x65, 0x00

DS0003:
	.byte  0x72, 0x65, 0x63, 0x6F, 0x72, 0x64, 0x00


.att_syntax prefix
