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

	if (HasProperty("functions")) {
		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->functions != NULL) {
				TREE function;
				for (function = GetFirstNode(name->functions); function != NULL; function = GetNextNode(function)) {
					if (GetKey(function) != NULL) {
						fprintf(outputFile, "extern int %s(%s);\n", ((Name) GetKey(function))->name, argType);
					}
				}
				fprintf(outputFile, "static Function %sFunctions[] =\n{\n", name->name);
				for (function = GetFirstNode(name->functions); function != NULL; function = GetNextNode(function)) {
					if (GetKey(function) != NULL) {
						fprintf(outputFile, "	{%s, %s},\n", ((Name) GetKey(function))->name, ((Name) GetInfo(function))->name);
					}
				}
				fputs("};\n", outputFile);
				indexArray[name->index] = name;
			}
		}
		fputs("static FunctionList functionList[] = {\n", outputFile);
		for (i = 0; i <= nodeNumber; i++) {
			name = indexArray[i];
			if (name == NULL) {
				fputs("	{NULL, 0},\n", outputFile);
			} else {
				fprintf(outputFile, "	{%sFunctions, %ld},\n", name->name, CountTree(name->functions, CountNonEmpty));
			}
		}
		fputs("};\n", outputFile);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq 0x19271(%rip), %rax     # 0x20170
movq 0x48(%rax), %rax
movq %rax, -0x20(%rbp)
leaq 0x1261a(%rip), %rdi     # 0x19528
callq 0x4940
cmpw $0x0, %ax
je 0x71a1
movl 0x19e35(%rip), %eax     # 0x20d58
addl $0x1, %eax
cltq
shlq $0x3, %rax
movl %eax, %edi
callq 0x11110
movq %rax, 0x19e56(%rip)     # 0x20d90
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl 0x19e0e(%rip), %eax     # 0x20d58
jg 0x6f6a
movq 0x19e3d(%rip), %rax     # 0x20d90
movslq -0x14(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x6f41
movq 0x19ddf(%rip), %rdi     # 0x20d50
callq 0x10330
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x70e3
movq -0x8(%rbp), %rdi
callq 0x10400
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x4, 0x38(%rax)
jne 0x70cf
movq -0x10(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0x70cf
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rdi
callq 0x10330
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x7014
movq -0x28(%rbp), %rdi
callq 0x10400
cmpq $0x0, %rax
je 0x7003
movq 0x19d5b(%rip), %rax     # 0x20d38
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rdi
callq 0x10400
movq -0x30(%rbp), %rdi
movq (%rax), %rdx
movq -0x20(%rbp), %rcx
leaq 0x126cd(%rip), %rsi     # 0x196c9
movb $0x0, %al
callq 0x3140
jmp 0x7005
movq -0x28(%rbp), %rdi
callq 0x10430
movq %rax, -0x28(%rbp)
jmp 0x6fc0
movq 0x19d1d(%rip), %rdi     # 0x20d38
movq -0x10(%rbp), %rax
movq (%rax), %rdx
leaq 0x126b4(%rip), %rsi     # 0x196dd
movb $0x0, %al
callq 0x3140
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rdi
callq 0x10330
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x70a5
movq -0x28(%rbp), %rdi
callq 0x10400
cmpq $0x0, %rax
je 0x7094
movq 0x19cda(%rip), %rax     # 0x20d38
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rdi
callq 0x10400
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rdi
callq 0x103d0
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rdx
movq (%rax), %rcx
leaq 0x1255a(%rip), %rsi     # 0x195e7
movb $0x0, %al
callq 0x3140
jmp 0x7096
movq -0x28(%rbp), %rdi
callq 0x10430
movq %rax, -0x28(%rbp)
jmp 0x7041
movq 0x19c8c(%rip), %rsi     # 0x20d38
leaq 0x12540(%rip), %rdi     # 0x195f3
callq 0x3100
movq -0x10(%rbp), %rdx
movq 0x19ccd(%rip), %rax     # 0x20d90
movq -0x10(%rbp), %rcx
movq 0x28(%rcx), %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x70d1
movq -0x8(%rbp), %rdi
callq 0x10430
movq %rax, -0x8(%rbp)
jmp 0x6f7a
movq 0x19c4e(%rip), %rsi     # 0x20d38
leaq 0x1260f(%rip), %rdi     # 0x19700
callq 0x3100
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl 0x19c52(%rip), %eax     # 0x20d58
jg 0x718e
movq 0x19c7d(%rip), %rax     # 0x20d90
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x713b
movq 0x19c0b(%rip), %rsi     # 0x20d38
leaq 0x125f4(%rip), %rdi     # 0x19728
callq 0x3100
jmp 0x717e
movq 0x19bf6(%rip), %rax     # 0x20d38
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movq 0x60(%rax), %rdi
leaq 0x18c0(%rip), %rsi      # 0x8a20
callq 0x10790
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rdx
movq %rax, %rcx
leaq 0x125be(%rip), %rsi     # 0x19735
movb $0x0, %al
callq 0x3140
jmp 0x7180
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x70fd
movq 0x19ba3(%rip), %rsi     # 0x20d38
leaq 0x12457(%rip), %rdi     # 0x195f3
callq 0x3100
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)