// File: /workspace/github_c_makefile_star2_O0/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
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpl $0x1, 0x30(%rax)
jne 0x460f
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x45f4
jmp 0x4611
cmpq $0x0, -0x8(%rbp)
je 0x4777
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rsi
callq 0x10ba0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x37, 0x8(%rax)
je 0x4649
movq -0x20(%rbp), %rax
cmpl $0x39, 0x8(%rax)
jne 0x4695
leaq 0x18cd8(%rip), %rax     # 0x1d328
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movl 0x1c(%rax), %edi
callq 0x1730
movq -0x28(%rbp), %rdi
movq %rax, %rdx
leaq 0x111e1(%rip), %rsi     # 0x15852
movb $0x0, %al
callq 0x10d0
leaq 0x18ca9(%rip), %rax     # 0x1d328
movq (%rax), %rdi
leaq 0x10f7f(%rip), %rsi     # 0x15608
movb $0x0, %al
callq 0x10d0
jmp 0x4726
movq -0x20(%rbp), %rdi
callq 0x13fc0
cmpl $0x0, %eax
je 0x46cd
movq -0x20(%rbp), %rdi
leaq 0x11074(%rip), %rsi     # 0x15722
callq 0x1900
leaq 0x18c6e(%rip), %rax     # 0x1d328
movq (%rax), %rdi
leaq 0x1103b(%rip), %rsi     # 0x156ff
movb $0x0, %al
callq 0x10d0
jmp 0x4724
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq 0x10de6(%rip), %rdx     # 0x154c2
xorl %ecx, %ecx
callq 0x4430
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq 0x111de(%rip), %rdx     # 0x158d0
movl $0x1, %ecx
callq 0x4430
movq -0x20(%rbp), %rdi
leaq 0x1101b(%rip), %rsi     # 0x15722
callq 0x1900
leaq 0x18c15(%rip), %rax     # 0x1d328
movq (%rax), %rdi
leaq 0x10fe2(%rip), %rsi     # 0x156ff
movb $0x0, %al
callq 0x10d0
jmp 0x4726
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x10(%rbp)
movb %al, -0x29(%rbp)
je 0x475b
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpl $0x1, 0x30(%rax)
sete %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0x4764
jmp 0x4772
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x473e
jmp 0x4611
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)