// File: lindorx[P]train/main.cpp
// Function: main
int main(int argc, char* argv[])
{
	using namespace std;
	int i, n = 0;
	if (argc == 1)return 0;
	for (i = 1; i < argc; ++i) {
		FileSize = 0;//�������ɵ��ļ���С
	Number = 0;//����ƫ�Ƶ�ַ
	Line_num = 1;//�к�
	is_Title = false;//��־λ������ֵΪtrue˵��CutStrCode()�����ڴ��������ҵ��ˡ�:��,������ʽΪ�棬�жϺ�Ӧ���¸�ֵΪfalse
		fin_src = argv[i];
		cout<<"code file="<<fin_src<<endl;
		if (fin_src.rfind(".asm") == 0) {//.asmΪ���������ļ����������ǣ��������룬����ʾ��׺������
			cout << "The suffix name is not \".asm\"" << endl;//��ʾ��׺�������⣬��������
		}
		n = fin_src.rfind(".");
		if (n == 0)return 0;
		fout_src = fin_src.substr(0, n)+".bin";
		CompileCode();//����Դ�ļ����ı����룬���ɶ�Ӧ�Ķ������ļ�
		EndCode();//�����ļ��в�������ȷ��������ֵ��λ�ã�������β����
		FileOut();
		cout << "file size=\t" << FileSize << "\tbyte" << endl<<endl;
	}
	cout << endl<<"compile done." << endl;
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x18(%rbp)
cmpl $0x1, -0x8(%rbp)
jne 0x1652f
movl $0x0, -0x4(%rbp)
jmp 0x1672f
movl $0x1, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x166f7
movl $0x0, 0xbb38(%rip)      # 0x22084
movl $0x0, 0xbb32(%rip)      # 0x22088
movl $0x1, 0xbb2c(%rip)      # 0x2208c
movb $0x0, 0xbc51(%rip)      # 0x221b8
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xbb2e(%rip), %rdi      # 0x220a8
callq 0x3320
movq 0xaa52(%rip), %rdi      # 0x20fd8
leaq 0x50d6(%rip), %rsi      # 0x1b663
callq 0x31f0
movq %rax, %rdi
leaq 0xbb0c(%rip), %rsi      # 0x220a8
callq 0x31e0
movq %rax, %rdi
movq 0xaa15(%rip), %rsi      # 0x20fc0
callq 0x3240
leaq 0xbaf1(%rip), %rdi      # 0x220a8
leaq 0x50b0(%rip), %rsi      # 0x1b66e
movq $-0x1, %rdx
callq 0x33c0
cmpq $0x0, %rax
jne 0x165f2
movq 0xaa01(%rip), %rdi      # 0x20fd8
leaq 0x5095(%rip), %rsi      # 0x1b673
callq 0x31f0
movq %rax, %rdi
movq 0xa9d3(%rip), %rsi      # 0x20fc0
callq 0x3240
leaq 0xbaaf(%rip), %rdi      # 0x220a8
leaq 0x50b4(%rip), %rsi      # 0x1b6b4
movq $-0x1, %rdx
callq 0x33c0
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jne 0x16621
movl $0x0, -0x4(%rbp)
jmp 0x1672f
movslq -0x18(%rbp), %rcx
leaq 0xba7c(%rip), %rsi      # 0x220a8
xorl %eax, %eax
movl %eax, %edx
leaq -0x58(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq 0x3230
movq -0x70(%rbp), %rsi
leaq 0x5049(%rip), %rdx      # 0x1b691
leaq -0x38(%rbp), %rdi
callq 0x19d90
jmp 0x16653
leaq 0xba6e(%rip), %rdi      # 0x220c8
leaq -0x38(%rbp), %rsi
callq 0x32c0
leaq -0x38(%rbp), %rdi
callq 0x3468
leaq -0x58(%rbp), %rdi
callq 0x3468
callq 0x16750
callq 0x188a0
callq 0x18b40
movq 0xa94d(%rip), %rdi      # 0x20fd8
leaq 0x5004(%rip), %rsi      # 0x1b696
callq 0x31f0
movq %rax, %rdi
movl 0xb9e4(%rip), %esi      # 0x22084
callq 0x33d0
movq %rax, %rdi
leaq 0x4ff3(%rip), %rsi      # 0x1b6a2
callq 0x31f0
movq %rax, %rdi
movq 0xa902(%rip), %rsi      # 0x20fc0
callq 0x3240
movq %rax, %rdi
movq 0xa8f3(%rip), %rsi      # 0x20fc0
callq 0x3240
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x16536
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x3468
jmp 0x16738
movq 0xa8da(%rip), %rdi      # 0x20fd8
movq 0xa8bb(%rip), %rsi      # 0x20fc0
callq 0x3240
movq %rax, %rdi
leaq 0x4f94(%rip), %rsi      # 0x1b6a8
callq 0x31f0
movq %rax, %rdi
movq 0xa89d(%rip), %rsi      # 0x20fc0
callq 0x3240
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0x33f0
nopw %cs:(%rax,%rax)