// File: CobaltXII[P]cxcc/./semantic/semantic_analyzer.hpp
// Function: semantic_analyzer_t::validate(std::vector<function_t, std::allocator<function_t>>&)
bool validate(program_t& program) {
		symbol_table_t global_symbols;
		// Add the predefined function sizeof.
		global_symbols.add_symbol(symbol_t(
			{0}, "sizeof", {{{0}, ""}}
		));
		for (int i = 0; i < program.size(); i++) {
			function_t function = program[i];
			// The function is invalid if a function already exists under the
			// same identifier.
			if (global_symbols.exists(function.identifier)) {
				die("redefinition of function '" + function.identifier + "'", function);
				return false;
			}
			// Add the function to the symbol table.
			global_symbols.add_symbol(symbol_t(
				function.type,
				function.identifier,
				function.parameters
			));
			if (!validate_function(function, global_symbols)) {
				return false;
			}
		}
		// The program is semantically correct if this line has been reached.
		// This means that calling expand_ast is completely safe and the
		// resulting output will also be semantically correct.
		expand_ast(program);
		return true;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x390, %rsp            # imm = 0x390
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x320(%rbp)
xorl %eax, %eax
movl %eax, %esi
leaq -0x58(%rbp), %rdi
callq 0x191a0
movq $0x0, -0xb0(%rbp)
leaq -0xd1(%rbp), %rdi
movq %rdi, -0x318(%rbp)
callq 0x34d0
movq -0x318(%rbp), %rdx
leaq 0x20cfd(%rip), %rsi     # 0x28674
leaq -0xd0(%rbp), %rdi
callq 0x6d70
jmp 0x7985
movb $0x1, -0x142(%rbp)
leaq -0x138(%rbp), %rax
movq %rax, -0x140(%rbp)
movq $0x0, -0x138(%rbp)
leaq -0x130(%rbp), %rax
movq %rax, -0x330(%rbp)
leaq -0x141(%rbp), %rdi
movq %rdi, -0x328(%rbp)
callq 0x34d0
movq -0x330(%rbp), %rdi
movq -0x328(%rbp), %rdx
leaq 0x2112b(%rip), %rsi     # 0x28b06
callq 0x6d70
jmp 0x79e2
movb $0x0, -0x142(%rbp)
leaq -0x138(%rbp), %rax
movq %rax, -0x110(%rbp)
movq $0x1, -0x108(%rbp)
leaq -0x143(%rbp), %rdi
movq %rdi, -0x338(%rbp)
callq 0x19260
movq -0x338(%rbp), %rcx
movq -0x110(%rbp), %rsi
movq -0x108(%rbp), %rdx
leaq -0x100(%rbp), %rdi
callq 0x19280
jmp 0x7a38
movq -0xb0(%rbp), %rsi
leaq -0xa8(%rbp), %rdi
leaq -0xd0(%rbp), %rdx
leaq -0x100(%rbp), %rcx
callq 0x19300
jmp 0x7a5b
leaq -0x58(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x19230
jmp 0x7a6d
leaq -0xa8(%rbp), %rdi
callq 0x193b0
leaq -0x100(%rbp), %rdi
callq 0xd830
leaq -0x143(%rbp), %rdi
callq 0x193e0
leaq -0x138(%rbp), %rax
movq %rax, -0x348(%rbp)
addq $0x28, %rax
movq %rax, -0x340(%rbp)
movq -0x340(%rbp), %rdi
addq $-0x28, %rdi
movq %rdi, -0x350(%rbp)
callq 0xf080
movq -0x348(%rbp), %rcx
movq -0x350(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x340(%rbp)
jne 0x7aaa
leaq -0x141(%rbp), %rdi
callq 0x3320
leaq -0xd0(%rbp), %rdi
callq 0x31c0
leaq -0xd1(%rbp), %rdi
callq 0x3320
movl $0x0, -0x148(%rbp)
movslq -0x148(%rbp), %rax
movq %rax, -0x358(%rbp)
movq -0x18(%rbp), %rdi
callq 0xe190
movq %rax, %rcx
movq -0x358(%rbp), %rax
cmpq %rcx, %rax
jae 0x7fbb
movq -0x18(%rbp), %rdi
movslq -0x148(%rbp), %rsi
callq 0x19400
movq %rax, %rsi
leaq -0x1b0(%rbp), %rdi
callq 0x19420
jmp 0x7b54
leaq -0x1a8(%rbp), %rsi
leaq -0x1d0(%rbp), %rdi
callq 0x3130
jmp 0x7b69
leaq -0x58(%rbp), %rdi
leaq -0x1d0(%rbp), %rsi
callq 0x194e0
movb %al, -0x359(%rbp)
jmp 0x7b81
leaq -0x1d0(%rbp), %rdi
callq 0x31c0
movb -0x359(%rbp), %al
testb $0x1, %al
jne 0x7b9c
jmp 0x7e49
leaq -0x1a8(%rbp), %rdx
leaq 0x20ad1(%rip), %rsi     # 0x2867b
leaq -0x210(%rbp), %rdi
callq 0xeda0
jmp 0x7bb8
leaq 0x20d97(%rip), %rdx     # 0x28956
leaq -0x1f0(%rbp), %rdi
leaq -0x210(%rbp), %rsi
callq 0x7160
jmp 0x7bd4
leaq -0x278(%rbp), %rdi
leaq -0x1b0(%rbp), %rsi
callq 0x19420
jmp 0x7be9
movq -0x320(%rbp), %rdi
leaq -0x1f0(%rbp), %rsi
leaq -0x278(%rbp), %rdx
callq 0x195e0
jmp 0x7c05
leaq -0x278(%rbp), %rdi
callq 0xd890
leaq -0x1f0(%rbp), %rdi
callq 0x31c0
leaq -0x210(%rbp), %rdi
callq 0x31c0
movb $0x0, -0x1(%rbp)
movl $0x1, -0x27c(%rbp)
jmp 0x7f7f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
jmp 0x7d84
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
jmp 0x7d14
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
jmp 0x7cbc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
jmp 0x7cb0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x193b0
leaq -0x100(%rbp), %rdi
callq 0xd830
leaq -0x143(%rbp), %rdi
callq 0x193e0
leaq -0x138(%rbp), %rax
movq %rax, -0x370(%rbp)
addq $0x28, %rax
movq %rax, -0x368(%rbp)
movq -0x368(%rbp), %rdi
addq $-0x28, %rdi
movq %rdi, -0x378(%rbp)
callq 0xf080
movq -0x370(%rbp), %rcx
movq -0x378(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x368(%rbp)
jne 0x7ce1
jmp 0x7d14
leaq -0x141(%rbp), %rdi
callq 0x3320
testb $0x1, -0x142(%rbp)
jne 0x7d2b
jmp 0x7d78
movq -0x140(%rbp), %rax
leaq -0x138(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x380(%rbp)
je 0x7d76
movq -0x380(%rbp), %rdi
addq $-0x28, %rdi
movq %rdi, -0x388(%rbp)
callq 0xf080
movq -0x388(%rbp), %rax
leaq -0x138(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x380(%rbp)
jne 0x7d45
jmp 0x7d78
leaq -0xd0(%rbp), %rdi
callq 0x31c0
leaq -0xd1(%rbp), %rdi
callq 0x3320
jmp 0x7ff2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
jmp 0x7ff2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
jmp 0x7fad
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
leaq -0x1d0(%rbp), %rdi
callq 0x31c0
jmp 0x7fad
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
jmp 0x7e38
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
jmp 0x7e2c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
leaq -0x278(%rbp), %rdi
callq 0xd890
leaq -0x1f0(%rbp), %rdi
callq 0x31c0
leaq -0x210(%rbp), %rdi
callq 0x31c0
jmp 0x7fad
movq -0x1b0(%rbp), %rax
movq %rax, -0x2d8(%rbp)
leaq -0x1a8(%rbp), %rsi
leaq -0x2f8(%rbp), %rdi
callq 0x3130
jmp 0x7e6c
leaq -0x188(%rbp), %rsi
leaq -0x310(%rbp), %rdi
callq 0x19660
jmp 0x7e81
movq -0x2d8(%rbp), %rsi
leaq -0x2d0(%rbp), %rdi
leaq -0x2f8(%rbp), %rdx
leaq -0x310(%rbp), %rcx
callq 0x19300
jmp 0x7ea4
leaq -0x58(%rbp), %rdi
leaq -0x2d0(%rbp), %rsi
callq 0x19230
jmp 0x7eb6
leaq -0x2d0(%rbp), %rdi
callq 0x193b0
leaq -0x310(%rbp), %rdi
callq 0xd830
leaq -0x2f8(%rbp), %rdi
callq 0x31c0
movq -0x320(%rbp), %rdi
leaq -0x1b0(%rbp), %rsi
leaq -0x58(%rbp), %rdx
callq 0x19750
movb %al, -0x389(%rbp)
jmp 0x7ef9
movb -0x389(%rbp), %al
testb $0x1, %al
jne 0x7f75
jmp 0x7f05
movb $0x0, -0x1(%rbp)
movl $0x1, -0x27c(%rbp)
jmp 0x7f7f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
jmp 0x7f67
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
jmp 0x7f5b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xe0(%rbp)
movl %eax, -0xe4(%rbp)
leaq -0x2d0(%rbp), %rdi
callq 0x193b0
leaq -0x310(%rbp), %rdi
callq 0xd830
leaq -0x2f8(%rbp), %rdi
callq 0x31c0
jmp 0x7fad
movl $0x0, -0x27c(%rbp)
leaq -0x1b0(%rbp), %rdi
callq 0xd890
movl -0x27c(%rbp), %eax
testl %eax, %eax
jne 0x7fdb
jmp 0x7f97
jmp 0x7f99
movl -0x148(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x148(%rbp)
jmp 0x7b09
leaq -0x1b0(%rbp), %rdi
callq 0xd890
jmp 0x7ff2
movq -0x320(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x19ba0
jmp 0x7fcd
movb $0x1, -0x1(%rbp)
movl $0x1, -0x27c(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x19c10
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x390, %rsp            # imm = 0x390
popq %rbp
retq
leaq -0x58(%rbp), %rdi
callq 0x19c10
movq -0xe0(%rbp), %rdi
callq 0x34c0
nopw (%rax,%rax)