// File: /workspace/github_c_makefile_star2_O0/theovosse[P]llgen/llgen.c
// Function: DefineKeywordList
static void DefineKeywordList(void) {
	TREE sym;
	Name name;
	int i;
    const char* kwlType = targetLanguage->keyWordListType;

	if (HasProperty("keywords")) {
        indexArray = (Name *) mmalloc(sizeof(Name) * (nodeNumber + 1));
        for (i = 0; i <= nodeNumber; i++) {
            indexArray[i] = NULL;
        }
        for (sym = GetFirstNode(idTree); sym != NULL; sym = GetNextNode(sym)) {
            name = GetKey(sym);
            if (name->nameType == token && name->keywords != NULL) {
                if (targetLanguage == &cLanguage || targetLanguage == &cppLanguage) {
                    TREE keyword;
                    fprintf(outputFile, "static KeyWord %sKeyWords[] =\n{\n", name->name);
                    for (keyword = GetFirstNode(name->keywords); keyword != NULL; keyword = GetNextNode(keyword)) {
                        if (GetKey(keyword) != NULL) {
                            fprintf(outputFile, "	{%s, %s},\n", ((Name) GetKey(keyword))->name, ((Name) GetInfo(keyword))->name);
                        }
                    }
                    fputs("};\n", outputFile);
                }
                indexArray[name->index] = name;
            }
        }
        if (targetLanguage == &rustLanguage) {
            for (i = 0; i <= nodeNumber; i++) {
                name = indexArray[i];
                if (name != NULL) {
                    TREE keyword;
                    fprintf(outputFile, "    let mut keyword_list_%d = HashMap::<String, u32>::new();\n", i);
                    for (keyword = GetFirstNode(name->keywords); keyword != NULL; keyword = GetNextNode(keyword)) {
                        Name key = (Name) GetKey(keyword);
                        if (key != NULL) {
                            fprintf(outputFile, "    keyword_list_%d.insert(%s.to_string(), %ld);\n", i, key->name, ((Name) GetInfo(keyword))->index);
                        }
                    }
                    fprintf(outputFile, "    keyword_list.insert(%d, keyword_list_%d);\n", i, i);
                }
            }
        } else {
            PrintArrayDeclaration(outputFile, "static", kwlType, "keywordList", -1, -1);
            fputc('\n', outputFile);
            for (i = 0; i <= nodeNumber; i++) {
                name = indexArray[i];
                fputs("\t", outputFile);
                if (name == NULL) {
                    fputs(targetLanguage->emptyKeyWordListEntry, outputFile);
                } else {
                    if (targetLanguage == &cLanguage || targetLanguage == &cppLanguage) {
                        fprintf(outputFile, "{%sKeyWords, %ld}", name->name, CountTree(name->keywords, CountNonEmpty));
                    } else {
                        TREE keyword;
                        Boolean first = true;
                        fputs("{", outputFile);
                        for (keyword = GetFirstNode(name->keywords); keyword != NULL; keyword = GetNextNode(keyword)) {
                            if (GetKey(keyword) != NULL) {
                                if (!first)
                                    fputs(", ", outputFile);
                                fprintf(outputFile, "%s: %ld", ((Name) GetKey(keyword))->name, ((Name) GetInfo(keyword))->index);
                                first = false;
                            }
                        }
                        fputs("}", outputFile);
                    }
                }
                fputs(",\n", outputFile);
            }
            fprintf(outputFile, "%s%s\n", targetLanguage->endOfArrayLiteral, targetLanguage->terminateDeclaration);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq 0x1976e(%rip), %rax     # 0x20170
movq 0x58(%rax), %rax
movq %rax, -0x20(%rbp)
leaq 0x127d9(%rip), %rdi     # 0x191ea
callq 0x4940
cmpw $0x0, %ax
je 0x6edc
movl 0x1a332(%rip), %eax     # 0x20d58
addl $0x1, %eax
cltq
shlq $0x3, %rax
movl %eax, %edi
callq 0x11110
movq %rax, 0x1a353(%rip)     # 0x20d90
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl 0x1a30b(%rip), %eax     # 0x20d58
jg 0x6a6d
movq 0x1a33a(%rip), %rax     # 0x20d90
movslq -0x14(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x6a44
movq 0x1a2dc(%rip), %rdi     # 0x20d50
callq 0x10330
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x6ba5
movq -0x8(%rbp), %rdi
callq 0x10400
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x4, 0x38(%rax)
jne 0x6b91
movq -0x10(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0x6b91
leaq 0x199f7(%rip), %rax     # 0x204b0
cmpq %rax, 0x196b0(%rip)     # 0x20170
je 0x6ad6
leaq 0x19b4f(%rip), %rax     # 0x20618
cmpq %rax, 0x196a0(%rip)     # 0x20170
jne 0x6b7a
movq 0x1a25b(%rip), %rdi     # 0x20d38
movq -0x10(%rbp), %rax
movq (%rax), %rdx
leaq 0x12adb(%rip), %rsi     # 0x195c6
movb $0x0, %al
callq 0x3140
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0x10330
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x6b67
movq -0x28(%rbp), %rdi
callq 0x10400
cmpq $0x0, %rax
je 0x6b56
movq 0x1a218(%rip), %rax     # 0x20d38
movq %rax, -0x58(%rbp)
movq -0x28(%rbp), %rdi
callq 0x10400
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rdi
callq 0x103d0
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %rdx
movq (%rax), %rcx
leaq 0x12a98(%rip), %rsi     # 0x195e7
movb $0x0, %al
callq 0x3140
jmp 0x6b58
movq -0x28(%rbp), %rdi
callq 0x10430
movq %rax, -0x28(%rbp)
jmp 0x6b03
movq 0x1a1ca(%rip), %rsi     # 0x20d38
leaq 0x12a7e(%rip), %rdi     # 0x195f3
callq 0x3100
movq -0x10(%rbp), %rdx
movq 0x1a20b(%rip), %rax     # 0x20d90
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x6b93
movq -0x8(%rbp), %rdi
callq 0x10430
movq %rax, -0x8(%rbp)
jmp 0x6a7d
leaq 0x1a00c(%rip), %rax     # 0x20bb8
cmpq %rax, 0x195bd(%rip)     # 0x20170
jne 0x6cb4
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl 0x1a18f(%rip), %eax     # 0x20d58
jg 0x6caf
movq 0x1a1ba(%rip), %rax     # 0x20d90
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x6c9f
movq 0x1a144(%rip), %rdi     # 0x20d38
movl -0x14(%rbp), %edx
leaq 0x129f9(%rip), %rsi     # 0x195f7
movb $0x0, %al
callq 0x3140
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0x10330
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x6c84
movq -0x30(%rbp), %rdi
callq 0x10400
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x6c73
movq 0x1a100(%rip), %rax     # 0x20d38
movq %rax, -0x70(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x64(%rbp)
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x30(%rbp), %rdi
callq 0x103d0
movq -0x70(%rbp), %rdi
movl -0x64(%rbp), %edx
movq -0x60(%rbp), %rcx
movq 0x28(%rax), %r8
leaq 0x129c9(%rip), %rsi     # 0x19635
movb $0x0, %al
callq 0x3140
jmp 0x6c75
movq -0x30(%rbp), %rdi
callq 0x10430
movq %rax, -0x30(%rbp)
jmp 0x6c16
movq 0x1a0ad(%rip), %rdi     # 0x20d38
movl -0x14(%rbp), %edx
movl -0x14(%rbp), %ecx
leaq 0x129cf(%rip), %rsi     # 0x19667
movb $0x0, %al
callq 0x3140
jmp 0x6ca1
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x6bc0
jmp 0x6eda
movq 0x1a07d(%rip), %rdi     # 0x20d38
movq -0x20(%rbp), %rdx
leaq 0x129d0(%rip), %rsi     # 0x19696
leaq 0x129d0(%rip), %rcx     # 0x1969d
movq $-0x1, %r8
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
callq 0x89c0
movq 0x1a052(%rip), %rsi     # 0x20d38
movl $0xa, %edi
callq 0x3120
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl 0x1a058(%rip), %eax     # 0x20d58
jg 0x6eaf
movq 0x1a083(%rip), %rax     # 0x20d90
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x10(%rbp)
movq 0x1a018(%rip), %rsi     # 0x20d38
leaq 0x12514(%rip), %rdi     # 0x1923b
callq 0x3100
cmpq $0x0, -0x10(%rbp)
jne 0x6d4f
movq 0x19436(%rip), %rax     # 0x20170
movq 0x60(%rax), %rdi
movq 0x19ff3(%rip), %rsi     # 0x20d38
callq 0x3100
jmp 0x6e8e
leaq 0x1975a(%rip), %rax     # 0x204b0
cmpq %rax, 0x19413(%rip)     # 0x20170
je 0x6d6f
leaq 0x198b2(%rip), %rax     # 0x20618
cmpq %rax, 0x19403(%rip)     # 0x20170
jne 0x6db7
movq 0x19fc2(%rip), %rax     # 0x20d38
movq %rax, -0x80(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rdi
leaq 0x1c8c(%rip), %rsi      # 0x8a20
callq 0x10790
movq -0x80(%rbp), %rdi
movq -0x78(%rbp), %rdx
movq %rax, %rcx
leaq 0x128fe(%rip), %rsi     # 0x196a9
movb $0x0, %al
callq 0x3140
jmp 0x6e8c
movw $0xffff, -0x42(%rbp)    # imm = 0xFFFF
movq 0x19f74(%rip), %rsi     # 0x20d38
leaq 0x14908(%rip), %rdi     # 0x1b6d3
callq 0x3100
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0x10330
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x6e79
movq -0x40(%rbp), %rdi
callq 0x10400
cmpq $0x0, %rax
je 0x6e65
cmpw $0x0, -0x42(%rbp)
jne 0x6e15
movq 0x19f2f(%rip), %rsi     # 0x20d38
leaq 0x12763(%rip), %rdi     # 0x19573
callq 0x3100
movq 0x19f1c(%rip), %rax     # 0x20d38
movq %rax, -0x90(%rbp)
movq -0x40(%rbp), %rdi
callq 0x10400
movq (%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x40(%rbp), %rdi
callq 0x103d0
movq -0x90(%rbp), %rdi
movq -0x88(%rbp), %rdx
movq 0x28(%rax), %rcx
leaq 0x12863(%rip), %rsi     # 0x196bb
movb $0x0, %al
callq 0x3140
movw $0x0, -0x42(%rbp)
jmp 0x6e67
movq -0x40(%rbp), %rdi
callq 0x10430
movq %rax, -0x40(%rbp)
jmp 0x6de1
movq 0x19eb8(%rip), %rsi     # 0x20d38
leaq 0x123bc(%rip), %rdi     # 0x19243
callq 0x3100
jmp 0x6e8e
movq 0x19ea3(%rip), %rsi     # 0x20d38
leaq 0x129c8(%rip), %rdi     # 0x19864
callq 0x3100
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x6cf7
movq 0x19e82(%rip), %rdi     # 0x20d38
movq 0x192b3(%rip), %rax     # 0x20170
movq 0x70(%rax), %rdx
movq 0x192a8(%rip), %rax     # 0x20170
movq 0x78(%rax), %rcx
leaq 0x127f0(%rip), %rsi     # 0x196c3
movb $0x0, %al
callq 0x3140
jmp 0x6edc
addq $0x90, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)