LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/anuwu[P]ERPLAG-Compiler/codegen.c
// Function: dynamicDeclarationCheck
void dynamicDeclarationCheck (moduleST *lst, varST *vst)
{
	int start_label , end_label ;
	varST *leftVar , *rightVar ;
	tf |= 1 << dynamicDeclCheck ;

	codePrint ("\n") ;
	if (isLeftLimStatic (vst))
		codePrint ("\t\tMOV AX, %s\n", vst->arrayIndices->tokLeft->lexeme) ;
	else
	{
		leftVar = searchVar (lst, vst->arrayIndices->tokLeft->lexeme) ;
		codePrint ("\t\tMOV AX, [RBP%s]\n", getOffsetStr (leftVar->offset)) ;
	}

	if (isRightLimStatic (vst))
		codePrint ("\t\tMOV BX, %s\n", vst->arrayIndices->tokRight->lexeme) ;
	else
	{
		rightVar = searchVar (lst, vst->arrayIndices->tokRight->lexeme) ;
		codePrint ("\t\tMOV BX, [RBP%s]\n", getOffsetStr(rightVar->offset)) ;
	}

	codePrint ("\t\tCALL @dynamicDeclCheck") ;
	codeComment (10, "checking dynamic array declaration limits") ;

	codePrint ("\n\n") ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
orb $0x40, 0x13d0e(%rip)    # 0x16359
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x13ce0(%rip), %r12     # 0x16338
movq (%r12), %rsi
pushq $0xa
popq %rdi
callq 0x10d0
movq %r14, %rdi
callq 0xcd04
testl %eax, %eax
je 0x2689
movq (%r12), %rdi
movq 0x10(%r14), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdx
leaq 0xc047(%rip), %rsi      # 0xe6ce
jmp 0x26ba
movq 0x10(%r14), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rsi
movq %rbx, %rdi
callq 0xac19
movq (%r12), %r15
movl 0x1c(%rax), %edi
callq 0x156f
leaq 0xc02c(%rip), %rsi      # 0xe6dc
leaq 0x13ca9(%rip), %rdx     # 0x16360
movq %r15, %rdi
xorl %eax, %eax
callq 0x10f0
movq %r14, %rdi
callq 0xcd35
testl %eax, %eax
je 0x26e6
movq (%r12), %rdi
movq 0x10(%r14), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rdx
leaq 0xc00b(%rip), %rsi      # 0xe6ef
jmp 0x2717
movq 0x10(%r14), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rsi
movq %rbx, %rdi
callq 0xac19
movq (%r12), %rbx
movl 0x1c(%rax), %edi
callq 0x156f
leaq 0xbff0(%rip), %rsi      # 0xe6fd
leaq 0x13c4c(%rip), %rdx     # 0x16360
movq %rbx, %rdi
xorl %eax, %eax
callq 0x10f0
movq (%r12), %rcx
leaq 0xbfe7(%rip), %rdi      # 0xe710
pushq $0x18
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x1160
leaq 0xbfeb(%rip), %rsi      # 0xe729
pushq $0xa
popq %rdi
callq 0x151a
movq (%r12), %rcx
leaq 0xc539(%rip), %rdi      # 0xec8a
pushq $0x2
popq %rsi
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1160
// File: /workspace/github_c_makefile_star2_O2/anuwu[P]ERPLAG-Compiler/codegen.c
// Function: switchDeclareVars
void switchDeclareVars (astNode *statementsNode)
{
	astNode *statementNode ;

	// Reserving space for switch scope variables
	while (statementsNode != NULL)
	{
		statementNode = statementsNode->child ;
		while (statementNode != NULL)
		{
			if (statementNode->child->id == TK_DECLARE)
			{
				moduleGeneration (statementNode->child, statementsNode->localST) ;
				statementNode->child->parent = statementNode->child ;		// tieing a knot
			}
			statementNode = statementNode->next ;
		}

		if (statementsNode->next != NULL)
		{
			if (statementsNode->next->id == TK_DEFAULT)
			{
				statementsNode = statementsNode->next->next ;
				statementNode = statementsNode->child ;
				while (statementNode != NULL)
				{
					if (statementNode->child->id == TK_DECLARE)
					{
						moduleGeneration (statementNode->child, statementsNode->localST) ;
						statementNode->child->parent = statementNode->child ;		// tieing a knot
					}
					statementNode = statementNode->next ;
				}

				break ;
			}
			statementsNode = statementsNode->next->next->next ;
		}
		else
			statementsNode = NULL ;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
testq %rbx, %rbx
je 0x2bda
leaq 0x30(%rbx), %r14
movq (%r14), %r14
testq %r14, %r14
je 0x2b91
movq 0x30(%r14), %rdi
cmpl $0x3e, (%rdi)
jne 0x2b8b
movq 0x20(%rbx), %rsi
callq 0x2bdf
movq 0x30(%r14), %rax
movq %rax, 0x28(%rax)
addq $0x38, %r14
jmp 0x2b69
movq 0x38(%rbx), %rax
movl $0x0, %ebx
testq %rax, %rax
je 0x2b60
cmpl $0x55, (%rax)
movq 0x38(%rax), %rbx
je 0x2bae
movq 0x38(%rbx), %rbx
jmp 0x2b60
leaq 0x30(%rbx), %r14
movq (%r14), %r14
testq %r14, %r14
je 0x2bda
movq 0x30(%r14), %rdi
cmpl $0x3e, (%rdi)
jne 0x2bd4
movq 0x20(%rbx), %rsi
callq 0x2bdf
movq 0x30(%r14), %rax
movq %rax, 0x28(%rax)
addq $0x38, %r14
jmp 0x2bb2
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/anuwu[P]ERPLAG-Compiler/codegen.c
// Function: pushInputDynamicArr
void pushInputDynamicArr (varST *vst, varSTentry *varEntry, char *reg, pushArrLim flag)
{
	int lab, sub ;

	if (flag == LEFT)
		sub = 10 ;
	else
		sub = 8 ;

	codePrint ("\t\tMOV %s, [RBP%s]\n", reg, getOffsetStr(vst->offset - sub)) ;

	if (isLeftLimStatic(varEntry->thisVarST) && !isLeftLimStatic(vst))
	{
		lab = get_label (LABEL_OTHER) ;
		tf |= 1 << argLimERROR ;

		if (flag == LEFT)
			codePrint ("\t\tMOV CX, %s\n", varEntry->thisVarST->arrayIndices->tokLeft->lexeme) ;
		else
			codePrint ("\t\tMOV CX, %s\n", varEntry->thisVarST->arrayIndices->tokRight->lexeme) ;

		codePrint ("\t\tCMP %s, CX\n", reg) ;
		codePrint ("\t\tJE @LABEL%d\n", lab) ;
		codePrint ("\t\tCALL @argLimERROR\n") ;
		codePrint ("\n\t@LABEL%d:\n", lab) ; 
	}

	if (!isVarStaticArr (varEntry->thisVarST))
		codePrint ("\t\tPUSH %s\n", reg) ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r15d
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r12
xorl %eax, %eax
testl %ecx, %ecx
setne %al
leaq 0x12bd5(%rip), %rcx     # 0x16338
movq (%rcx), %r13
movl 0x1c(%rdi), %ecx
leal (%rcx,%rax,2), %edi
addl $-0xa, %edi
callq 0x156f
leaq 0xb2c1(%rip), %rsi      # 0xea3c
leaq 0x12bde(%rip), %rcx     # 0x16360
movq %r13, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x10f0
movq (%r14), %rdi
callq 0xcd04
testl %eax, %eax
je 0x384d
movq %r12, %rdi
callq 0xcd04
testl %eax, %eax
jne 0x384d
xorl %eax, %eax
testl %r15d, %r15d
setne %al
movl 0x12b8e(%rip), %r15d    # 0x1634c
incl %r15d
movl %r15d, 0x12b84(%rip)    # 0x1634c
orb $0x8, 0x12b89(%rip)     # 0x16358
leaq 0x12b62(%rip), %r12     # 0x16338
movq (%r12), %rdi
movq (%r14), %rcx
movq 0x10(%rcx), %rcx
movq 0x8(%rcx,%rax,8), %rax
movq 0x8(%rax), %rdx
leaq 0xaa70(%rip), %rsi      # 0xe261
xorl %eax, %eax
callq 0x10f0
movq (%r12), %rdi
leaq 0xb1bc(%rip), %rsi      # 0xe9bf
movq %rbx, %rdx
xorl %eax, %eax
callq 0x10f0
movq (%r12), %rdi
leaq 0xaaa9(%rip), %rsi      # 0xe2c1
movl %r15d, %edx
xorl %eax, %eax
callq 0x10f0
movq (%r12), %rcx
leaq 0xb1a0(%rip), %rdi      # 0xe9cd
pushq $0x14
popq %rsi
pushq $0x1
popq %rdx
callq 0x1160
movq (%r12), %rdi
leaq 0xaaa3(%rip), %rsi      # 0xe2e6
movl %r15d, %edx
xorl %eax, %eax
callq 0x10f0
movq (%r14), %rdi
callq 0xcd66
testl %eax, %eax
je 0x3868
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x12ac9(%rip), %rax     # 0x16338
movq (%rax), %rdi
leaq 0xab0a(%rip), %rsi      # 0xe383
movq %rbx, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10f0
// File: /workspace/github_c_makefile_star2_O2/anuwu[P]ERPLAG-Compiler/codegen.c
// Function: pushInput
void pushInput (astNode *inputEnd, varSTentry *varEntry, moduleST *lst)
{
	varST *searchedVar ;

	while (varEntry->thisVarST->varType == VAR_PLACEHOLDER)
		varEntry = varEntry->next ;

	while (inputEnd != NULL)
	{
		searchedVar = searchVar (lst, inputEnd->tok->lexeme) ;

		if (searchedVar->datatype == TK_INTEGER || searchedVar->datatype == TK_BOOLEAN)
		{
			codePrint ("\t\tMOV AX, [RBP%s]\n", getOffsetStr(searchedVar->offset)) ;
			codePrint ("\t\tPUSH AX\n") ;
		}
		else if (isVarStaticArr (searchedVar))
		{
			loadArrBase (searchedVar, "RAX") ;
			codePrint ("\t\tPUSH RAX\n") ;
		}
		else
		{
			pushInputDynamicArr (searchedVar, varEntry, "AX", LEFT) ;
			pushInputDynamicArr (searchedVar, varEntry, "BX", RIGHT) ;
			loadArrBase (searchedVar, "RAX") ;
			codePrint ("\t\tPUSH RAX\n") ;
		}

		inputEnd = inputEnd->prev ;
		varEntry = varEntry->next ;
		while (varEntry != NULL && varEntry->thisVarST->varType == VAR_PLACEHOLDER)
			varEntry = varEntry->next ;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, -0x30(%rbp)
movq %rsi, %r14
movq %rdi, %r15
movq (%r14), %rax
cmpl $0x1, 0x30(%rax)
jne 0x398c
movq 0x8(%r14), %r14
jmp 0x38a9
movq 0x8(%r15), %rax
movq 0x8(%rax), %rsi
movq -0x30(%rbp), %rdi
callq 0xac19
movq %rax, %r13
movl 0x8(%rax), %eax
cmpl $0x39, %eax
je 0x38dd
cmpl $0x37, %eax
jne 0x3916
leaq 0x12a54(%rip), %rbx     # 0x16338
movq (%rbx), %r12
movl 0x1c(%r13), %edi
callq 0x156f
movq %r12, %rdi
leaq 0xade2(%rip), %rsi      # 0xe6dc
leaq 0x12a5f(%rip), %rdx     # 0x16360
xorl %eax, %eax
callq 0x10f0
movq (%rbx), %rcx
leaq 0xab80(%rip), %rdi      # 0xe492
pushq $0xa
jmp 0x396d
movq %r13, %rdi
callq 0xcd66
testl %eax, %eax
jne 0x394b
movq %r13, %rdi
movq %r14, %rsi
leaq 0xaa1d(%rip), %rdx      # 0xe34c
xorl %ecx, %ecx
callq 0x373b
movq %r13, %rdi
movq %r14, %rsi
leaq 0xae17(%rip), %rdx      # 0xe75a
pushq $0x1
popq %rcx
callq 0x373b
movq %r13, %rdi
leaq 0xac57(%rip), %rsi      # 0xe5ac
callq 0x16c0
leaq 0x129d7(%rip), %rax     # 0x16338
movq (%rax), %rcx
leaq 0xac1e(%rip), %rdi      # 0xe589
pushq $0xb
popq %rsi
pushq $0x1
popq %rdx
callq 0x1160
movq 0x40(%r15), %r15
movq 0x8(%r14), %r14
testq %r14, %r14
je 0x398c
movq (%r14), %rax
cmpl $0x1, 0x30(%rax)
je 0x397a
testq %r15, %r15
jne 0x38bc
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/anuwu[P]ERPLAG-Compiler/codegen.c
// Function: popOutput
void popOutput (astNode *outputHead, moduleST *lst)
{
	varST* searchedVar ;

	while (outputHead != NULL)
	{
		searchedVar = searchVar (lst, outputHead->tok->lexeme) ;
		codePrint ("\t\tPOP AX\n") ;
		codePrint ("\t\tMOV [RBP%s], AX\n", getOffsetStr(searchedVar->offset)) ;

		outputHead = outputHead->next ;
	}

	codePrint ("\n") ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x12979(%rip), %r12     # 0x16338
testq %r14, %r14
je 0x3a18
movq 0x8(%r14), %rax
movq 0x8(%rax), %rsi
movq %rbx, %rdi
callq 0xac19
movq %rax, %r13
movq (%r12), %rcx
leaq 0xa931(%rip), %rdi      # 0xe313
pushq $0x9
popq %rsi
pushq $0x1
popq %rdx
callq 0x1160
movq (%r12), %r15
movl 0x1c(%r13), %edi
callq 0x156f
movq %r15, %rdi
leaq 0xafde(%rip), %rsi      # 0xe9e2
leaq 0x12955(%rip), %rdx     # 0x16360
xorl %eax, %eax
callq 0x10f0
movq 0x38(%r14), %r14
jmp 0x39bf
movq (%r12), %rsi
pushq $0xa
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10d0
// File: /workspace/github_c_makefile_star2_O2/anuwu[P]ERPLAG-Compiler/codegen.c
// Function: retModule
void retModule (moduleST *lst)
{
	codePrint ("\n\t\tMOV RSP, RBP\n") ;
	codePrint ("\t\tPOP RBP\n") ;

	if (lst == realBase->driverST)		// driver module
	{
		#ifdef __linux__
			codePrint ("\t\tMOV RAX, 60\n") ;
			codePrint ("\t\tXOR RDI, RDI\n") ;
			codePrint ("\t\tsyscall\n") ;
		#endif
			
		#ifdef __MACH__
			codePrint ("\t\tMOV RAX, 0x2000001\n") ;
			codePrint ("\t\tXOR RDI, RDI\n") ;
			codePrint ("\t\tsyscall\n") ;
		#endif

		#ifdef _WIN64
			codePrint ("\t\tret\n") ;
		#endif
	}
	else
		codePrint ("\t\tret\n") ;

	printCommentLineNASM () ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x128f2(%rip), %r15     # 0x16338
movq (%r15), %rcx
leaq 0xafa5(%rip), %rdi      # 0xe9f5
pushq $0x10
popq %rsi
pushq $0x1
popq %r14
movq %r14, %rdx
callq 0x1160
movq (%r15), %rcx
leaq 0xaf9d(%rip), %rdi      # 0xea06
pushq $0xa
popq %rsi
movq %r14, %rdx
callq 0x1160
leaq 0x2c59d(%rip), %rax     # 0x30018
movq (%rax), %rax
movq (%r15), %rcx
cmpq %rbx, 0xd0(%rax)
je 0x3a99
leaq 0xb37b(%rip), %rdi      # 0xee0c
pushq $0x6
popq %rsi
pushq $0x1
popq %rdx
jmp 0x3ad3
leaq 0xaf71(%rip), %rdi      # 0xea11
pushq $0xe
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x1160
movq (%r15), %rcx
leaq 0xaf68(%rip), %rdi      # 0xea20
pushq $0xf
popq %rsi
movq %rbx, %rdx
callq 0x1160
movq (%r15), %rcx
leaq 0xaf63(%rip), %rdi      # 0xea30
pushq $0xa
popq %rsi
movq %rbx, %rdx
callq 0x1160
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x58e1
// File: /workspace/github_c_makefile_star2_O2/anuwu[P]ERPLAG-Compiler/codegen.c
// Function: freeDynamic
void freeDynamic (varSTentry *varEntry)
{
	if (varEntry == NULL)
		return ;

	char freeReg[5] ;
	RSPAlign () ;

	#if defined __linux__ || defined __MACH__
		strcpy (freeReg, "RDI") ;
	#endif
	#ifdef _WIN64
		strcpy (freeReg, "RCX") ;
		codePrint ("\n\t\tSUB RSP, 32\n") ;
	#endif

	while (varEntry != NULL)
	{
		codePrint ("\n\t\tMOV %s, [RBP%s]\n", freeReg, getOffsetStr (varEntry->thisVarST->offset)) ;

		#if defined __linux__ || defined _WIN64
			codePrint ("\t\tCALL free") ;
		#endif
		#ifdef __MACH__ 
			codePrint ("\t\tCALL _free") ;
		#endif
		codeComment (8, "freeing local dynamic arrays\n") ;

		varEntry = varEntry->next ;
	}

	#ifdef _WIN64
		codePrint ("\t\tADD RSP, 32\n") ;
	#endif

	RSPRestore () ;
}

// Assembly:
testq %rdi, %rdi
je 0x3b8a
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x2372
leaq -0x30(%rbp), %rax
movl $0x494452, (%rax)       # imm = 0x494452
leaq 0x12821(%rip), %r15     # 0x16338
leaq 0xaf3d(%rip), %r12      # 0xea5b
pushq $0x8
popq %r13
testq %rbx, %rbx
je 0x3b77
movq (%r15), %r14
movq (%rbx), %rax
movl 0x1c(%rax), %edi
callq 0x156f
movq %r14, %rdi
leaq 0xaefc(%rip), %rsi      # 0xea3b
leaq -0x30(%rbp), %rdx
leaq 0x12816(%rip), %rcx     # 0x16360
xorl %eax, %eax
callq 0x10f0
movq (%r15), %rcx
leaq 0xaef4(%rip), %rdi      # 0xea4f
pushq $0xb
popq %rsi
pushq $0x1
popq %rdx
callq 0x1160
movl %r13d, %edi
movq %r12, %rsi
callq 0x151a
movq 0x8(%rbx), %rbx
jmp 0x3b22
callq 0x240c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/anuwu[P]ERPLAG-Compiler/codegen.c
// Function: codeGeneration
void codeGeneration(astNode *node)
{
	if (node == NULL)
		return;

	switch (node->id)
	{
		case program :
			codeGeneration (node->child->next) ;		// <otherModules>
			break ;

		case otherModules :
			codeGeneration (node->child) ;					// Do module definitions
			codeGeneration (node->next) ;					// <driverModule> or NULL
			break ;

		case module :
			codePrint ("\n%s:\n", strcmp(node->child->tok->lexeme , "main") ? node->child->tok->lexeme : "@main") ;
			codePrint ("\t\tPUSH RBP\n") ;
			codePrint ("\t\tMOV RBP, RSP\n\n") ;

			moduleGeneration (node->child->next->next->next, NULL) ;
			codeGeneration (node->next) ;					// Moving on to the next module

			break ;

		case driverModule :
			#ifdef __linux__
				codePrint ("\nmain:\n") ;
			#endif

			#ifdef __MACH__
				codePrint ("\n_main:\n") ;
			#endif

			#ifdef _WIN64
				codePrint ("\nWinMain:\n") ;
			#endif

			codePrint ("\t\tPUSH RBP\n") ;
			codePrint ("\t\tMOV RBP, RSP\n\n") ;

			moduleGeneration(node->child, NULL); 				// <statements>
			codeGeneration(node->next); 				// Move to the next child of program

			break ;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xa659(%rip), %r12      # 0xe1fc
leaq 0x1278e(%rip), %r14     # 0x16338
pushq $0xb
popq %r13
testq %rbx, %rbx
je 0x3cca
movl (%rbx), %eax
cmpq $0x9, %rax
ja 0x3cca
movslq (%r12,%rax,4), %rax
addq %r12, %rax
jmpq *%rax
movq 0x30(%rbx), %rbx
jmp 0x3cc1
movq 0x30(%rbx), %rdi
callq 0x3b8b
jmp 0x3cc1
movq (%r14), %rcx
leaq 0xb062(%rip), %rdi      # 0xec4f
pushq $0x7
popq %rsi
pushq $0x1
popq %r15
movq %r15, %rdx
callq 0x1160
movq (%r14), %rcx
leaq 0xb02c(%rip), %rdi      # 0xec32
movq %r13, %rsi
movq %r15, %rdx
callq 0x1160
movq (%r14), %rcx
leaq 0xb023(%rip), %rdi      # 0xec3e
pushq $0x10
popq %rsi
movq %r15, %rdx
callq 0x1160
movq 0x30(%rbx), %rdi
jmp 0x3cba
movq (%r14), %r13
movq 0x30(%rbx), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %r15
movq %r15, %rdi
leaq 0xafc9(%rip), %rsi      # 0xec11
callq 0x10e0
testl %eax, %eax
leaq 0xafba(%rip), %rax      # 0xec10
cmoveq %rax, %r15
movq %r13, %rdi
pushq $0xb
popq %r13
leaq 0xafc4(%rip), %rsi      # 0xec2c
movq %r15, %rdx
leaq 0xafc0(%rip), %r15      # 0xec32
leaq 0xa583(%rip), %r12      # 0xe1fc
xorl %eax, %eax
callq 0x10f0
movq (%r14), %rcx
movq %r15, %rdi
movq %r13, %rsi
pushq $0x1
popq %r15
movq %r15, %rdx
callq 0x1160
movq (%r14), %rcx
leaq 0xaf9f(%rip), %rdi      # 0xec3e
pushq $0x10
popq %rsi
movq %r15, %rdx
callq 0x1160
movq 0x30(%rbx), %rax
movq 0x38(%rax), %rax
movq 0x38(%rax), %rax
movq 0x38(%rax), %rdi
xorl %esi, %esi
callq 0x2bdf
movq 0x38(%rbx), %rbx
jmp 0x3bae
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/anuwu[P]ERPLAG-Compiler/codegen.c
// Function: preamble
void preamble()
{
	codePrint (";;;;;;;;;;; Compiled for 64-bit ") ;

	#ifdef __linux__
		codePrint ("Linux ") ;
	#endif
	#ifdef __MACH__
		codePrint ("macOS ") ;
	#endif
	#ifdef _WIN64
		codePrint ("Windows ") ;
	#endif

	codePrint (";;;;;;;;;;;\n\n") ;

	#if defined __linux__ || defined _WIN64
		codePrint ("extern printf\n") ;
		codePrint ("extern scanf\n") ;
		codePrint ("extern malloc\n") ;
		codePrint ("extern free\n") ;
		codePrint ("extern exit\n") ;

		#ifdef __linux__
			codePrint ("\nglobal main\n") ;
		#endif

		#ifdef _WIN64
			codePrint ("\nglobal WinMain\n") ;
		#endif
	#endif

	#ifdef __MACH__
		codePrint ("extern _printf\n") ;
		codePrint ("extern _scanf\n") ;
		codePrint ("extern _malloc\n") ;
		codePrint ("extern _free\n") ;
		codePrint ("extern _exit\n") ;

		codePrint ("\nglobal _main\n") ;
	#endif

	codePrint ("section .text\n") ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x1264a(%rip), %r13     # 0x16338
movq (%r13), %rcx
leaq 0xaf5e(%rip), %rdi      # 0xec57
pushq $0x20
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x1160
movq (%r13), %rcx
leaq 0xaf66(%rip), %rdi      # 0xec78
pushq $0x6
popq %rsi
movq %rbx, %rdx
callq 0x1160
movq (%r13), %rcx
leaq 0xaf57(%rip), %rdi      # 0xec7f
pushq $0xd
popq %r14
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1160
movq (%r13), %rcx
leaq 0xaf4b(%rip), %rdi      # 0xec8d
pushq $0xe
popq %r15
movq %r15, %rsi
movq %rbx, %rdx
callq 0x1160
movq (%r13), %rcx
leaq 0xaf40(%rip), %rdi      # 0xec9c
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1160
movq (%r13), %rcx
leaq 0xaf38(%rip), %rdi      # 0xecaa
movq %r15, %rsi
movq %rbx, %rdx
callq 0x1160
movq (%r13), %rcx
leaq 0xaf31(%rip), %rdi      # 0xecb9
pushq $0xc
popq %r12
movq %r12, %rsi
movq %rbx, %rdx
callq 0x1160
movq (%r13), %rcx
leaq 0xaf24(%rip), %rdi      # 0xecc6
movq %r12, %rsi
movq %rbx, %rdx
callq 0x1160
movq (%r13), %rcx
leaq 0xaf1b(%rip), %rdi      # 0xecd3
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1160
movq (%r13), %rcx
leaq 0xaf13(%rip), %rdi      # 0xece1
movq %r15, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1160
// File: /workspace/github_c_makefile_star2_O2/anuwu[P]ERPLAG-Compiler/codegen.c
// Function: errorTF
void errorTF (char *errStr)
{
	RSPAlign () ;

	#if defined __linux__ || defined __MACH__
		codePrint ("\t\tMOV RDI, %s\n", errStr) ;
		codePrint ("\t\tXOR RSI, RSI\n") ;
		codePrint ("\t\tXOR RAX, RAX\n") ;
	#endif
	#ifdef _WIN64
		codePrint ("\t\tMOV RCX, %s\n", errStr) ;
		codePrint ("\t\tXOR RDX, RDX\n") ;
		codePrint ("\t\tSUB RSP, 32\n") ;
	#endif

	#if defined __linux__ || defined _WIN64
		codePrint ("\t\tCALL printf\n") ;
		#ifdef _WIN64
			codePrint ("\t\tADD RSP, 32\n") ;
		#endif
	#endif
	#ifdef __MACH__
		codePrint ("\t\tCALL _printf\n") ;
	#endif

	#if defined __linux__ || defined __MACH__
		codePrint ("\t\tMOV RDI, 1\n") ;
	#endif
	#ifdef _WIN64
		codePrint ("\t\tMOV RCX, 1\n") ;
	#endif

	#if defined __linux__ || defined _WIN64
		codePrint ("\t\tCALL exit\n") ;
	#endif
	#ifdef __MACH__
		codePrint ("\t\tCALL _exit\n") ;
	#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x2372
leaq 0x1252a(%rip), %r15     # 0x16338
movq (%r15), %rdi
leaq 0xaed8(%rip), %rsi      # 0xecf0
movq %rbx, %rdx
xorl %eax, %eax
callq 0x10f0
movq (%r15), %rcx
leaq 0xaed3(%rip), %rdi      # 0xecff
pushq $0xf
popq %r14
pushq $0x1
popq %rbx
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1160
movq (%r15), %rcx
leaq 0xaec7(%rip), %rdi      # 0xed0f
movq %r14, %rsi
movq %rbx, %rdx
callq 0x1160
movq (%r15), %rcx
leaq 0xaec2(%rip), %rdi      # 0xed1f
pushq $0xe
popq %rsi
movq %rbx, %rdx
callq 0x1160
movq (%r15), %rcx
leaq 0xaebc(%rip), %rdi      # 0xed2e
pushq $0xd
popq %rsi
movq %rbx, %rdx
callq 0x1160
movq (%r15), %rcx
leaq 0xaeb5(%rip), %rdi      # 0xed3c
pushq $0xc
popq %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1160
// File: /workspace/github_c_makefile_star2_O2/anuwu[P]ERPLAG-Compiler/codegen.c
// Function: printArrEnd
void printArrEnd ()
{
	#if defined __linux__ || defined _WIN64
		codePrint ("\t\tCALL printf\n") ;
		#ifdef _WIN64
			codePrint ("\t\tADD RSP, 36\n") ;
		#endif
	#endif
	#ifdef __MACH__
		codePrint ("\t\tCALL _printf\n") ;
	#endif

	#if defined __linux__ || defined __MACH__
		codePrint ("\t\tPOP DX\n") ;
		codePrint ("\t\tPOP CX\n") ;
		codePrint ("\t\tPOP BX\n") ;
		codePrint ("\t\tPOP AX\n") ;
		codePrint ("\t\tPOP RDI\n\n") ;
		codePrint ("\t\tADD CX, 2\n") ;
		codePrint ("\t\tCMP CX, DX\n") ;
	#endif
	#ifdef _WIN64
		codePrint ("\t\tPOP BX\n") ;
		codePrint ("\t\tPOP AX\n") ;
		codePrint ("\t\tPOP RDI\n\n") ;
		codePrint ("\t\tADD AX, 2\n") ;
		codePrint ("\t\tCMP AX, BX\n") ;
	#endif

	codePrint ("\t\tJNE .printArr\n\n") ;

	#if defined __linux__ || defined __MACH__
		codePrint ("\t\tMOV RDI, @printNewLine\n") ;
		codePrint ("\t\tXOR RSI, RSI\n") ;
		codePrint ("\t\tXOR RAX, RAX\n") ;
	#endif
	#ifdef _WIN64
		codePrint ("\t\tMOV RCX, @printNewLine\n") ;
		codePrint ("\t\tXOR RDX, RDX\n") ;
		codePrint ("\t\tSUB RSP, 32\n") ;
	#endif

	#if defined __linux__ || defined _WIN64
		codePrint ("\t\tCALL printf\n") ;
		#ifdef _WIN64
			codePrint ("\t\tADD RSP, 32\n") ;
		#endif
	#endif
	#ifdef __MACH__
		codePrint ("\t\tCALL _printf\n") ;
	#endif

	RSPRestore () ;
	codePrint ("\n\t\tret\n") ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x122e7(%rip), %r13     # 0x16338
movq (%r13), %rcx
leaq 0xacc3(%rip), %r14      # 0xed1f
pushq $0xe
popq %r15
pushq $0x1
popq %rbx
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x1160
movq (%r13), %rcx
leaq 0xad0c(%rip), %rdi      # 0xed88
pushq $0x9
popq %r12
movq %r12, %rsi
movq %rbx, %rdx
callq 0x1160
movq (%r13), %rcx
leaq 0xacfc(%rip), %rdi      # 0xed92
movq %r12, %rsi
movq %rbx, %rdx
callq 0x1160
movq (%r13), %rcx
leaq 0xa2e2(%rip), %rdi      # 0xe38e
movq %r12, %rsi
movq %rbx, %rdx
callq 0x1160
movq (%r13), %rcx
leaq 0xa251(%rip), %rdi      # 0xe313
movq %r12, %rsi
movq %rbx, %rdx
callq 0x1160
movq (%r13), %rcx
leaq 0xacc4(%rip), %rdi      # 0xed9c
pushq $0xb
popq %rsi
movq %rbx, %rdx
callq 0x1160
movq (%r13), %rcx
leaq 0xb35e(%rip), %rdi      # 0xf44c
pushq $0xc
popq %rsi
movq %rbx, %rdx
callq 0x1160
movq (%r13), %rcx
leaq 0xaccd(%rip), %rdi      # 0xedd1
pushq $0xd
popq %rsi
movq %rbx, %rdx
callq 0x1160
movq (%r13), %rcx
leaq 0xacc5(%rip), %rdi      # 0xeddf
pushq $0x11
popq %rsi
movq %rbx, %rdx
callq 0x1160
movq (%r13), %rcx
leaq 0xacc1(%rip), %rdi      # 0xedf1
pushq $0x19
popq %rsi
movq %rbx, %rdx
callq 0x1160
movq (%r13), %rcx
leaq 0xabb9(%rip), %rdi      # 0xecff
pushq $0xf
popq %r12
movq %r12, %rsi
movq %rbx, %rdx
callq 0x1160
movq (%r13), %rcx
leaq 0xabaf(%rip), %rdi      # 0xed0f
movq %r12, %rsi
movq %rbx, %rdx
callq 0x1160
movq (%r13), %rcx
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x1160
callq 0x240c
movq (%r13), %rcx
leaq 0xac7e(%rip), %rdi      # 0xee0b
pushq $0x7
popq %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1160
// File: /workspace/github_c_makefile_star2_O2/anuwu[P]ERPLAG-Compiler/ast.c
// Function: createASTNode
astNode* createASTNode (treeNode *PTNode)
{
	astNode *node = (astNode *) malloc (sizeof(astNode)) ;

 	if (PTNode->tag == NON_TERMINAL)
 	{
 		//printf ("\tcreateASTNODE : PTNode->tnt.nonTerm = %d\n", PTNode->tnt.nonTerm) ;
 		node->id = PTNode->tnt.nonTerm ;
 		//printf ("\tcreateASTNODE : node->id = %d\n", node->id) ;
 		node->tok = NULL ;
 	}
 	else
 	{
 		node->id = PTNode->tnt.term->id ;
 		node->tok = PTNode->tnt.term ;
 	}

 	node->parent = NULL ;
 	node->child = NULL ;
 	node->next = NULL ;
 	node->prev = NULL ;
 	node->dt = NULL ;
 	node->localST = NULL ;

 	PTNode->syn = node ;

 	return node ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x48
popq %rdi
callq 0x1110
leaq 0x8(%rbx), %rcx
cmpl $0x1, (%rbx)
jne 0x592e
xorl %edx, %edx
jmp 0x5934
movq (%rcx), %rcx
movq %rcx, %rdx
movl (%rcx), %ecx
movl %ecx, (%rax)
movq %rdx, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rax)
movups %xmm0, 0x28(%rax)
movups %xmm0, 0x38(%rax)
movq %rax, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/anuwu[P]ERPLAG-Compiler/ast.c
// Function: connectChildren
void connectChildren (astNode *parent, astNode **siblings, int num)
{
	for (int i = 0 ; i < num - 1; i++)
	{
		siblings[i]->next = siblings[i+1] ;
		siblings[i]->parent = parent ;
	}

	siblings[num-1]->parent = parent ;
	for (int i = num-1 ; i > 0 ; i--)
		siblings[i]->prev = siblings[i-1] ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
decl %edx
xorl %ecx, %ecx
testl %edx, %edx
movl $0x0, %eax
cmovgl %edx, %eax
cmpq %rcx, %rax
je 0x5b29
movq (%rsi,%rcx,8), %r8
movq 0x8(%rsi,%rcx,8), %r9
movq %r9, 0x38(%r8)
movq (%rsi,%rcx,8), %r8
incq %rcx
movq %rdi, 0x28(%r8)
jmp 0x5b0a
movslq %edx, %rax
movq (%rsi,%rax,8), %rax
movq %rdi, 0x28(%rax)
movl %edx, %eax
testl %eax, %eax
jle 0x5b4c
movq -0x8(%rsi,%rax,8), %rcx
movq (%rsi,%rax,8), %rdx
movq %rcx, 0x40(%rdx)
decq %rax
jmp 0x5b36
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/anuwu[P]ERPLAG-Compiler/lexer.c
// Function: lexer_init
twinBuffer* lexer_init (FILE *fp)
{
	int buf1_read, buf2_read ;
	twinBuffer *twinBuf = (twinBuffer *) malloc (sizeof(twinBuffer)) ;
	twinBuf->fp = fp ;
 
	if (twinBuf->fp == NULL)
		return NULL ;
 
	twinBuf->buf1 = (char *) malloc (sizeof(char) * (bufSize + 1)) ;
	twinBuf->buf2 = (char *) malloc (sizeof(char) * (bufSize + 1)) ;
 
	buf1_read = fread (twinBuf->buf1, sizeof(char), bufSize, twinBuf->fp) ;
	twinBuf->buf1[buf1_read] = EOF ;
	twinBuf->begin = twinBuf->buf1 ;
	twinBuf->forward = twinBuf->buf1 ;
	twinBuf->where_begin = TWIN_ONE ;
	twinBuf->where_forward = TWIN_ONE ;
 
	buf2_read = fread (twinBuf->buf2, sizeof(char) , bufSize, twinBuf->fp) ;
	twinBuf->buf2[buf2_read] = EOF ;
 
	twinBuf->lineNumber = 1 ;
 
	return twinBuf ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
pushq $0x38
popq %rdi
callq 0x1110
movq %r14, (%rax)
testq %r14, %r14
je 0x6e4b
movq %rax, %rbx
movl $0x81, %edi
callq 0x1110
movq %rax, %r12
movq %rax, 0x8(%rbx)
movl $0x81, %edi
callq 0x1110
movq %rax, %r15
movq %rax, 0x10(%rbx)
pushq $0x1
popq %rsi
movl $0x80, %edx
movq %r12, %rdi
movq %r14, %rcx
callq 0x1080
cltq
movb $-0x1, %r13b
movb %r13b, (%r12,%rax)
movq %r12, 0x18(%rbx)
movq %r12, 0x20(%rbx)
andq $0x0, 0x28(%rbx)
movl $0x80, %edx
movq %r15, %rdi
pushq $0x1
popq %rsi
movq %r14, %rcx
callq 0x1080
cltq
movb %r13b, (%r15,%rax)
movl $0x1, 0x30(%rbx)
jmp 0x6e4d
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/anuwu[P]ERPLAG-Compiler/lexer.c
// Function: getLexemeLineNumber
int getLexemeLineNumber (twinBuffer *twinBuf)
{
	int line = twinBuf->lineNumber ;
 
	if (twinBuf->forward == twinBuf->buf1)
		return line ;
 
	if ((twinBuf->forward == twinBuf->buf2 && twinBuf->buf1[bufSize - 1] == '\n') || (*(twinBuf->forward - 1) == '\n') && *twinBuf->forward != EOF)
		return line - 1 ;
}

// Assembly:
movl 0x30(%rdi), %eax
movq 0x8(%rdi), %rdx
movq 0x20(%rdi), %rcx
cmpq %rdx, %rcx
je 0x6ec0
pushq %rbp
movq %rsp, %rbp
cmpq 0x10(%rdi), %rcx
jne 0x6eb0
cmpb $0xa, 0x7f(%rdx)
je 0x6ebb
cmpb $0xa, -0x1(%rcx)
jne 0x6ebf
cmpb $-0x1, (%rcx)
je 0x6ebf
decl %eax
jmp 0x6ebf
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/anuwu[P]ERPLAG-Compiler/lexer.c
// Function: retract
void retract (twinBuffer *twinBuf)
{
	if (twinBuf->where_forward == TWIN_ONE)
	{
		if (twinBuf->forward == twinBuf->buf1)
			printf ("Cannot retract!\n") ;
		else
			twinBuf->forward-- ;
	}
	else if (twinBuf->where_forward == TWIN_TWO)
	{
		if (twinBuf->forward == twinBuf->buf2)
		{
			twinBuf->forward = &twinBuf->buf1[bufSize - 1] ;
			twinBuf->where_forward = TWIN_ONE ;
		}
		else
			twinBuf->forward-- ;
	}
 
	if (*twinBuf->forward == '\n')
		twinBuf->lineNumber-- ;
 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x2c(%rdi), %eax
cmpl $0x1, %eax
je 0x7134
testl %eax, %eax
jne 0x7157
movq 0x20(%rbx), %rax
cmpq 0x8(%rbx), %rax
jne 0x713e
leaq 0x8e49(%rip), %rdi      # 0xff76
callq 0x1070
jmp 0x7157
movq 0x20(%rbx), %rax
cmpq 0x10(%rbx), %rax
je 0x7147
decq %rax
movq %rax, 0x20(%rbx)
jmp 0x7157
movq 0x8(%rbx), %rax
addq $0x7f, %rax
movq %rax, 0x20(%rbx)
andl $0x0, 0x2c(%rbx)
movq 0x20(%rbx), %rax
cmpb $0xa, (%rax)
jne 0x7163
decl 0x30(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/anuwu[P]ERPLAG-Compiler/parser.c
// Function: populate_hash
void populate_hash(int index,int enum_value)
{
	if(heads[enum_value].ind == -1)
	{
		heads[enum_value].ind=index;	
	}

	else
	{
		location* tmp=&heads[enum_value];
		while(tmp->next!=NULL)
		{
			tmp=tmp->next;
		}
		tmp->next=init();
		tmp=tmp->next;
		tmp->ind=index;
		tmp->next=NULL;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
movslq %esi, %rcx
shlq $0x4, %rcx
leaq 0xe162(%rip), %rdx      # 0x16370
leaq (%rdx,%rcx), %rax
cmpl $-0x1, (%rcx,%rdx)
je 0x8236
movq %rax, %r14
movq 0x8(%rax), %rax
testq %rax, %rax
jne 0x8218
callq 0x81c0
movq %rax, 0x8(%r14)
movl %ebx, (%rax)
andq $0x0, 0x8(%rax)
jmp 0x8238
movl %ebx, (%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/anuwu[P]ERPLAG-Compiler/parser.c
// Function: traverse_grammar
void traverse_grammar()
{
	for(int i=0;i<150;i++)
	{
		for(int j=0;j<150;j++)
		{
			parsetable[i][j]=-1;
		}
	}	

	for(int i=0;i<rule_count;i++)
	{
		int lhs_enum_value=rule[i].LHS;
		node* temp=rule[i].RHS;


		// NT -> eps 
		if(temp->key==TK_EPS)
		{
			node* temp3=follows[lhs_enum_value];
			while(temp3!=NULL)
			{
				parsetable[lhs_enum_value][temp3->key]=i;
				temp3=temp3->next;
			}
			continue;
		}	

		// traversing on rhs T/NT sequentially	
		while(temp!=NULL)
		{	
			// temp2 is Terminals in first of T/NT
			node* temp2=firsts[temp->key];

			int flag=0;
			while(temp2!=NULL)
			{
				if(temp2->key!=TK_EPS)
					parsetable[lhs_enum_value][temp2->key]=i;
				else
					flag=1;

				temp2=temp2->next;
			}

			if(flag==0)
				break;
			else // haven't encountered eps yet so keep filling by next T/NT's first
				temp=temp->next;

		}

		if(temp==NULL)
		{
			// all firsts are consumed and all are nullable
			node* temp3=follows[lhs_enum_value];
			while(temp3!=NULL)
			{
				parsetable[lhs_enum_value][temp3->key]=i;
				temp3=temp3->next;
			}
		}
		
	}	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq 0xee6d(%rip), %rax      # 0x18760
xorl %ecx, %ecx
cmpq $0x96, %rcx
je 0x991d
xorl %edx, %edx
cmpq $0x96, %rdx
je 0x9912
orl $-0x1, (%rax,%rdx,4)
incq %rdx
jmp 0x9900
incq %rcx
addq $0x258, %rax            # imm = 0x258
jmp 0x98f5
movl 0x24dcd(%rip), %eax     # 0x2e6f0
xorl %ecx, %ecx
testl %eax, %eax
cmovlel %ecx, %eax
leaq 0x24dcf(%rip), %rdx     # 0x2e700
leaq 0x25a48(%rip), %rsi     # 0x2f380
leaq 0xee21(%rip), %rdi      # 0x18760
leaq 0x2607a(%rip), %r8      # 0x2f9c0
movl $0x1, %r9d
cmpq %rax, %rcx
je 0x9a01
movq %rcx, %r10
shlq $0x4, %r10
movslq (%r10,%rdx), %r11
movq 0x8(%r10,%rdx), %rbx
cmpl $0x36, (%rbx)
jne 0x998d
leaq (%rsi,%r11,8), %r10
imulq $0x258, %r11, %r11      # imm = 0x258
addq %rdi, %r11
movq (%r10), %r10
testq %r10, %r10
je 0x99f9
movl (%r10), %ebx
movl %ecx, (%r11,%rbx,4)
addq $0x8, %r10
jmp 0x9978
leaq (%rsi,%r11,8), %r10
testq %rbx, %rbx
je 0x99da
movl (%rbx), %r14d
leaq (%r8,%r14,8), %r14
xorl %r15d, %r15d
movq (%r14), %r14
testq %r14, %r14
je 0x99cf
movl (%r14), %r12d
movl %r9d, %r13d
cmpq $0x36, %r12
je 0x99c6
imulq $0x258, %r11, %r13      # imm = 0x258
addq %rdi, %r13
movl %ecx, (%r13,%r12,4)
movl %r15d, %r13d
addq $0x8, %r14
movl %r13d, %r15d
jmp 0x99a0
testl %r15d, %r15d
je 0x99f9
movq 0x8(%rbx), %rbx
jmp 0x9991
imulq $0x258, %r11, %r11      # imm = 0x258
addq %rdi, %r11
movq (%r10), %r10
testq %r10, %r10
je 0x99f9
movl (%r10), %ebx
movl %ecx, (%r11,%rbx,4)
addq $0x8, %r10
jmp 0x99e4
incq %rcx
jmp 0x994c
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/anuwu[P]ERPLAG-Compiler/parser.c
// Function: addUniquely
void addUniquely(tokenID target, tokenID insert_it)
{
	//Target linked list should never be empty
	node * tmp_target = firsts[target];

	if(tmp_target->key != insert_it){
		while( 1){

			if(tmp_target->next ==  NULL){
				tmp_target->next = initnode(insert_it);
				return;
			}
			else if(tmp_target->next->key == insert_it){
				return;
			}
			tmp_target = tmp_target->next;
		}
		// else we need not to do anything because its already there
	}
	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %eax
leaq 0x25fa5(%rip), %rcx     # 0x2f9c0
movq (%rcx,%rax,8), %rbx
cmpl %esi, (%rbx)
je 0x9a40
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x9a35
movq %rax, %rbx
cmpl %esi, (%rax)
jne 0x9a23
jmp 0x9a40
movl %esi, %edi
callq 0x8f00
movq %rax, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/anuwu[P]ERPLAG-Compiler/parser.c
// Function: addUniquelyFollow
void addUniquelyFollow(tokenID target, tokenID insert_it){
	//Target linked list should never be empty
	node * tmp_target = follows[target];

	if(tmp_target->key != insert_it){
		while( 1){

			if(tmp_target->next ==  NULL){
				tmp_target->next = initnode(insert_it);
				return;
			}
			else if(tmp_target->next->key == insert_it){
				return;
			}
			tmp_target = tmp_target->next;
		}
		// else we need not to do anything because its already there
	}
	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %eax
leaq 0x2592a(%rip), %rcx     # 0x2f380
movq (%rcx,%rax,8), %rbx
cmpl %esi, (%rbx)
je 0x9a7b
movq 0x8(%rbx), %rax
testq %rax, %rax
je 0x9a70
movq %rax, %rbx
cmpl %esi, (%rax)
jne 0x9a5e
jmp 0x9a7b
movl %esi, %edi
callq 0x8f00
movq %rax, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/anuwu[P]ERPLAG-Compiler/parser.c
// Function: unionFirst
void unionFirst(tokenID target, tokenID source){
	node * sourceLL = firsts[source];
	node * tmp_target = firsts[target];

	if(sourceLL == NULL)
		return;

	// when target was initially empty
	if(tmp_target == NULL){
		firsts[target] = initnode(sourceLL->key);

		node * tmp = firsts[target] ;
		sourceLL = sourceLL->next ;
		while(sourceLL){

			if(sourceLL->key != TK_EPS){
				tmp->next = initnode(sourceLL->key);
				tmp = tmp->next;
				
			}
			
			sourceLL = sourceLL->next;
		}
	}
	else {
		// when target is initially not empty

		while(sourceLL!=NULL){
			tokenID need_to_insert = sourceLL->key;	

			if(need_to_insert != TK_EPS)	
				addUniquely(target,need_to_insert);

			sourceLL = sourceLL->next;
		}
	}

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %eax
leaq 0x25f2a(%rip), %r15     # 0x2f9c0
movq (%r15,%rax,8), %r14
testq %r14, %r14
je 0x9af1
movl %edi, %ebx
movl %edi, %r12d
cmpq $0x0, (%r15,%r12,8)
jne 0x9aec
movl (%r14), %edi
callq 0x8f00
movq %rax, %rbx
movq %rax, (%r15,%r12,8)
movq 0x8(%r14), %r14
testq %r14, %r14
je 0x9af1
movl (%r14), %edi
cmpl $0x36, %edi
je 0x9aba
callq 0x8f00
movq %rax, 0x8(%rbx)
movq %rax, %rbx
jmp 0x9aba
movl (%r14), %esi
cmpl $0x36, %esi
je 0x9ae8
movl %ebx, %edi
callq 0x9a0c
movq 0x8(%r14), %r14
testq %r14, %r14
jne 0x9ad9
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/anuwu[P]ERPLAG-Compiler/parser.c
// Function: containsEpsilon
int containsEpsilon(tokenID id)
{
	node* tmp = firsts[id];
	while(tmp){
		if(tmp->key == TK_EPS)
			return 1;
		tmp = tmp->next ;
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, %eax
leaq 0x25eb9(%rip), %rcx     # 0x2f9c0
leaq (%rcx,%rax,8), %rcx
movl $0x1, %eax
movq (%rcx), %rdx
testq %rdx, %rdx
je 0x9b23
leaq 0x8(%rdx), %rcx
cmpl $0x36, (%rdx)
jne 0x9b10
jmp 0x9b25
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/anuwu[P]ERPLAG-Compiler/parser.c
// Function: populateFirst
void populateFirst (tokenID id)
{
	if(isTerminal(id))
		return;

	location* ruleLoc ;
	node* rRHS ;
	Rule r ;
	int rule_index ;
	ruleLoc = &heads[id] ;

	while (ruleLoc != NULL)
	{		
		rule_index = ruleLoc->ind ;
		r = rule[rule_index] ;
		rRHS = r.RHS ;

		// recursive call to fill all empty RHSs
		while(rRHS != NULL)
		{
			if (firsts[rRHS->key] == NULL)
				populateFirst (rRHS->key) ;

			unionFirst (id, rRHS->key) ;

			if (containsEpsilon(rRHS->key))
				rRHS = rRHS->next ;
			else
				break ;
		}

		if (rRHS == NULL)
			addUniquely (id, TK_EPS) ;

		ruleLoc = ruleLoc->next ;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebx
leal -0x36(%rbx), %eax
cmpl $0x3d, %eax
jae 0x9b4e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %ebx, %eax
shlq $0x4, %rax
leaq 0xc815(%rip), %r15      # 0x16370
addq %rax, %r15
leaq 0x24b9b(%rip), %r12     # 0x2e700
leaq 0x25e54(%rip), %r13     # 0x2f9c0
testq %r15, %r15
je 0x9b3f
movslq (%r15), %rax
shlq $0x4, %rax
leaq (%rax,%r12), %r14
addq $0x8, %r14
movq (%r14), %r14
testq %r14, %r14
je 0x9bb6
movl (%r14), %esi
cmpq $0x0, (%r13,%rsi,8)
jne 0x9b9d
movl %esi, %edi
callq 0x9b27
movl (%r14), %esi
movl %ebx, %edi
callq 0x9a82
movl (%r14), %edi
callq 0x9afa
addq $0x8, %r14
testl %eax, %eax
jne 0x9b80
jmp 0x9bc0
movl %ebx, %edi
pushq $0x36
popq %rsi
callq 0x9a0c
movq 0x8(%r15), %r15
jmp 0x9b6c
// File: /workspace/github_c_makefile_star2_O2/anuwu[P]ERPLAG-Compiler/parser.c
// Function: printFollowSet
void printFollowSet (tokenID id)
{
	node* tmp = follows[id] ;
	if (tmp == NULL)
	 	printf ("Empty follow set\n") ;
	else
	{
	 while (tmp != NULL)
	 {
		 printf ("%d, ", tmp->key) ;
		 tmp = tmp->next ;
	 }
	 endl ;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %eax
leaq 0x257aa(%rip), %rcx     # 0x2f380
movq (%rcx,%rax,8), %r14
testq %r14, %r14
je 0x9c0a
leaq 0x6988(%rip), %rbx      # 0x1056e
testq %r14, %r14
je 0x9bfe
movl (%r14), %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x10b0
movq 0x8(%r14), %r14
jmp 0x9be6
pushq $0xa
popq %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x1040
leaq 0x6a5f(%rip), %rdi      # 0x10670
popq %rbx
popq %r14
popq %rbp
jmp 0x1070
// File: /workspace/github_c_makefile_star2_O2/anuwu[P]ERPLAG-Compiler/parser.c
// Function: populateFollow
void populateFollow (tokenID id)
{
	int rule_index ;

	for (rule_index = 0 ; rule_index < rule_count ; rule_index++)
	{

		tokenID current_rule_lhs = (tokenID) rule[rule_index].LHS;
		node * tmp_of_rhs_of_current_rule = rule[rule_index].RHS;

		while(tmp_of_rhs_of_current_rule != NULL)
		{		
			if(tmp_of_rhs_of_current_rule->key == id)
			{ // if my key is id

				if(tmp_of_rhs_of_current_rule->next == NULL)
				{ // i am last element of this rule

					if(follows[current_rule_lhs] == NULL)
						populateFollow(current_rule_lhs);

					if (id != current_rule_lhs)
						unionFollow (id, current_rule_lhs) ;
				}
				else
				{

					if(containsEpsilon(tmp_of_rhs_of_current_rule->next->key))
					{ // next can go to null firsts[next] contains eps
		
						node * tmp = tmp_of_rhs_of_current_rule->next;
						while(tmp!=NULL && containsEpsilon(tmp->key))
						{
							UnionFollowFirst(id,tmp->key);
							tmp = tmp->next;
						}
						// while can exit either tmp == NULL
						if(tmp == NULL)
						{
							if(follows[current_rule_lhs] == NULL)
								populateFollow(current_rule_lhs);

							unionFollow(id,current_rule_lhs);
						}
						else
							UnionFollowFirst(id,tmp->key);

					}
					else
						UnionFollowFirst(id,tmp_of_rhs_of_current_rule->next->key);
					
				}
			}
			tmp_of_rhs_of_current_rule = tmp_of_rhs_of_current_rule->next;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edi, %ebx
xorl %ecx, %ecx
movslq 0x24aba(%rip), %rax     # 0x2e6f0
cmpq %rax, %rcx
jge 0x9d12
movq %rcx, -0x38(%rbp)
movq %rcx, %rax
shlq $0x4, %rax
leaq 0x24aaf(%rip), %rcx     # 0x2e700
leaq (%rcx,%rax), %r13
movl (%rax,%rcx), %r14d
movq %r14, -0x30(%rbp)
movq 0x8(%r13), %r13
testq %r13, %r13
je 0x9d06
cmpl %ebx, (%r13)
jne 0x9c5d
movq 0x8(%r13), %r14
testq %r14, %r14
je 0x9cb0
movl (%r14), %r15d
movl %r15d, %edi
callq 0x9afa
testl %eax, %eax
je 0x9cd1
testq %r14, %r14
je 0x9cdd
movl (%r14), %r15d
movl %r15d, %edi
callq 0x9afa
movl %eax, %r12d
movl %ebx, %edi
movl %r15d, %esi
callq 0x9d8f
testl %r12d, %r12d
je 0x9c5d
movq 0x8(%r14), %r14
jmp 0x9c88
leaq 0x256c9(%rip), %rax     # 0x2f380
movq -0x30(%rbp), %r14
cmpq $0x0, (%rax,%r14,8)
jne 0x9cca
movl %r14d, %edi
callq 0x9c1a
cmpl %ebx, %r14d
je 0x9c5d
jmp 0x9cf7
movl %ebx, %edi
movl %r15d, %esi
callq 0x9d8f
jmp 0x9c5d
leaq 0x2569c(%rip), %rax     # 0x2f380
movq -0x30(%rbp), %r14
cmpq $0x0, (%rax,%r14,8)
jne 0x9cf7
movl %r14d, %edi
callq 0x9c1a
movl %ebx, %edi
movl %r14d, %esi
callq 0x9d21
jmp 0x9c5d
movq -0x38(%rbp), %rcx
incq %rcx
jmp 0x9c2f
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/anuwu[P]ERPLAG-Compiler/parser.c
// Function: unionFollow
void unionFollow(tokenID target, tokenID source){
	node * sourceLL = follows[source];
	node * tmp_target = follows[target];

	if(sourceLL == NULL)
		return;

	// when target was initially empty
	if(tmp_target == NULL){
		follows[target] = initnode(sourceLL->key);

		node * tmp = follows[target] ;
		sourceLL = sourceLL->next ;
		while(sourceLL){
			tmp->next = initnode(sourceLL->key);
			tmp = tmp->next ;
			sourceLL = sourceLL->next;
		}
	}
	else {
		// when target is initially not empty

		while(sourceLL!=NULL){
			tokenID need_to_insert = sourceLL->key;	
			addUniquelyFollow(target,need_to_insert);
			sourceLL = sourceLL->next;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %eax
leaq 0x2564b(%rip), %r15     # 0x2f380
movq (%r15,%rax,8), %r14
testq %r14, %r14
je 0x9d86
movl %edi, %ebx
movl %edi, %r12d
cmpq $0x0, (%r15,%r12,8)
jne 0x9d81
movl (%r14), %edi
callq 0x8f00
movq %rax, %rbx
movq %rax, (%r15,%r12,8)
movq 0x8(%r14), %r14
testq %r14, %r14
je 0x9d86
movl (%r14), %edi
callq 0x8f00
movq %rax, 0x8(%rbx)
movq %rax, %rbx
jmp 0x9d59
movl (%r14), %esi
movl %ebx, %edi
callq 0x9a47
movq 0x8(%r14), %r14
testq %r14, %r14
jne 0x9d73
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/anuwu[P]ERPLAG-Compiler/parser.c
// Function: UnionFollowFirst
void UnionFollowFirst (tokenID target, tokenID source)
 {
	node * sourceLL = firsts[source];
	node * tmp_target = follows[target];

	if(sourceLL == NULL)
		return;

	// when target was initially empty
	if(tmp_target == NULL){
		follows[target] = initnode(sourceLL->key);

		node * tmp = follows[target] ;
		sourceLL = sourceLL->next ;
		while(sourceLL){

			if(sourceLL->key != TK_EPS){
				tmp->next = initnode(sourceLL->key);
				tmp = tmp->next;	
			}
			
			sourceLL = sourceLL->next;
		}
	}
	else {
		// when target is initially not empty
		while(sourceLL!=NULL){
			tokenID need_to_insert = sourceLL->key;	

			if(need_to_insert != TK_EPS)	
				addUniquelyFollow(target,need_to_insert);

			sourceLL = sourceLL->next;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %eax
leaq 0x25c1d(%rip), %rcx     # 0x2f9c0
movq (%rcx,%rax,8), %r14
testq %r14, %r14
je 0x9e05
movl %edi, %ebx
movl %edi, %r15d
leaq 0x255c8(%rip), %r12     # 0x2f380
cmpq $0x0, (%r12,%r15,8)
jne 0x9e00
movl (%r14), %edi
callq 0x8f00
movq %rax, %rbx
movq %rax, (%r12,%r15,8)
movq 0x8(%r14), %r14
testq %r14, %r14
je 0x9e05
movl (%r14), %edi
cmpl $0x36, %edi
je 0x9dce
callq 0x8f00
movq %rax, 0x8(%rbx)
movq %rax, %rbx
jmp 0x9dce
movl (%r14), %esi
cmpl $0x36, %esi
je 0x9dfc
movl %ebx, %edi
callq 0x9a47
movq 0x8(%r14), %r14
testq %r14, %r14
jne 0x9ded
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/anuwu[P]ERPLAG-Compiler/parser.c
// Function: create_node
treeNode* create_node (nodeTag tag, TNT tnt)
{
	treeNode *node = (treeNode *) malloc (sizeof(treeNode)) ;

	node->tag = tag ;
 
	node->tnt = tnt ;
	node->child = NULL ;
	node->next = NULL ;
	node->parent = NULL ;


	node->gcode = -5 ; // default value ( should be replaced )
	node->syn = NULL ;
	node->inh = NULL ;

	return node ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movl %edi, %r14d
pushq $0x40
popq %rdi
callq 0x1110
movl %r14d, (%rax)
movq %rbx, 0x8(%rax)
xorps %xmm0, %xmm0
andq $0x0, 0x38(%rax)
movups %xmm0, 0x28(%rax)
movl $0xfffffffb, 0x20(%rax) # imm = 0xFFFFFFFB
movups %xmm0, 0x10(%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/anuwu[P]ERPLAG-Compiler/parser.c
// Function: add_child
void add_child (treeNode *parent, treeNode *node)
{
	if (parent->child == NULL)
		parent->child = node ;
	else
	{
		treeNode *ptr ;
		ptr = parent->child ;
		while (ptr->next != NULL)
			ptr = ptr->next ;
 
		ptr->next = node ;
	}
 
	node->parent = parent ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x28(%rdi), %rcx
testq %rcx, %rcx
je 0xa127
movq %rcx, %rax
movq 0x30(%rcx), %rcx
testq %rcx, %rcx
jne 0xa115
addq $0x30, %rax
jmp 0xa12b
leaq 0x28(%rdi), %rax
movq %rsi, (%rax)
movq %rdi, 0x38(%rsi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/anuwu[P]ERPLAG-Compiler/parser.c
// Function: print_node
void print_node (treeNode *node)
{
	if (node->tag == TERMINAL)
		printf ("%d %d %s %d", node->tag, node->tnt.term->id, node->tnt.term->lexeme, node->tnt.term->lineNumber) ;
	else if (node->tag == NON_TERMINAL)
		printf ("%d %d", node->tag, node->tnt.nonTerm) ;
	else
		printf ("INVALID ENUM\n") ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl (%rdi), %eax
cmpl $0x1, %eax
je 0xa162
testl %eax, %eax
jne 0xa179
movq 0x8(%rdi), %rax
movl (%rax), %edx
movq 0x8(%rax), %rcx
movl 0x10(%rax), %r8d
leaq 0x6483(%rip), %rdi      # 0x105db
xorl %esi, %esi
xorl %eax, %eax
popq %rbp
jmp 0x10b0
movl 0x8(%rdi), %edx
leaq 0x647b(%rip), %rdi      # 0x105e7
movl $0x1, %esi
xorl %eax, %eax
popq %rbp
jmp 0x10b0
leaq 0x6501(%rip), %rdi      # 0x10681
popq %rbp
jmp 0x1070
// File: /workspace/github_c_makefile_star2_O2/anuwu[P]ERPLAG-Compiler/parser.c
// Function: print_siblings
void print_siblings (treeNode *node)
{
	treeNode *ptr ;
	printf ("---------------\n") ;
 
	ptr = node ;
	while (ptr != NULL)
	{
		print_node (ptr) ;
		printf("\n") ;
		ptr = ptr->next ;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x64f7(%rip), %rdi      # 0x1068e
callq 0x1070
pushq $0xa
popq %r14
testq %rbx, %rbx
je 0xa1bb
movq %rbx, %rdi
callq 0xa134
movl %r14d, %edi
callq 0x1040
movq 0x30(%rbx), %rbx
jmp 0xa1a0
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/anuwu[P]ERPLAG-Compiler/parser.c
// Function: initStack
stacknode * initStack(){
	stacknode * head = (stacknode* ) malloc(sizeof(stacknode));
	head->key = TK_EOF;
	head->next = NULL;
 
	return head;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq $0x10
popq %rdi
callq 0x1110
movl $0x70, (%rax)
andq $0x0, 0x8(%rax)
popq %rbp
retq