// File: /workspace/github_cpp_makefile_star2_O3/haught[P]cws_plugin/cws_plugin.cpp
// Function: main
int main(int argc, char **argv) {
	int i;
	map<string, string> valueMap;
	char fileName[1024];
	for (int i = 0; i < argc; i++) {
		cout << "arg" <<  i << ":" << argv[i] << endl;
	}
	if (argc <3) {
		cout << "error:Invalid parameter,format:" << argv[0] << "input output" << endl;	//Error to UI
		exit(0);
	}
	sprintf(fileName, "%s/run.gcode",argv[1]);
	readGcode(fileName, valueMap);


	sprintf(fileName, "%s/default.slicing", argv[1]);
	writeDefault_slicing(fileName, valueMap);

	sprintf(fileName, "%s/manifest.xml", argv[1]);
	writeManifest_xml(argv[1],fileName, valueMap);

	sprintf(fileName, "%s/1.gcode", argv[1]);
	write_1_gcode(fileName, valueMap);



	cout << "progress:0" << endl;				//progross to UI

	cout << "info:" << endl;				//progross to UI

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x438, %rsp            # imm = 0x438
movq %rsi, %r13
leaq -0x58(%rbp), %rax
movl $0x0, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
testl %edi, %edi
jle 0x6f9b
movl %edi, %eax
movq %rax, -0x30(%rbp)
xorl %r14d, %r14d
movq 0x4237(%rip), %r15      # 0xafd8
movl $0x3, %edx
movq %r15, %rdi
leaq 0x22e4(%rip), %rsi      # 0x9094
callq 0x2240
movq %r15, %rdi
movl %r14d, %esi
callq 0x2360
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
leaq 0x1f5f(%rip), %rsi      # 0x8d31
callq 0x2240
movq %r13, %rbx
movq (%r13,%r14,8), %r13
testq %r13, %r13
je 0x6dff
movq %r13, %rdi
callq 0x2110
movq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x2240
movq %rbx, %r13
jmp 0x6e1d
movq (%r12), %rax
movq -0x18(%rax), %rax
movq %r12, %rdi
addq %rax, %rdi
movl 0x20(%r12,%rax), %esi
orl $0x1, %esi
callq 0x2340
movq %rbx, %r13
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x21e0
movsbl %al, %esi
movq %r12, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2170
incq %r14
cmpq %r14, -0x30(%rbp)
jne 0x6da1
cmpl $0x3, -0x30(%rbp)
jl 0x6f9b
movq 0x8(%r13), %rdx
leaq 0x225e(%rip), %rsi      # 0x90c5
leaq -0x460(%rbp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2080
leaq -0x60(%rbp), %rsi
movq %r14, %rdi
callq 0x6a16
movq 0x8(%r13), %rdx
leaq 0x2243(%rip), %rsi      # 0x90d2
movq %r14, %rdi
xorl %eax, %eax
callq 0x2080
leaq -0x60(%rbp), %rsi
movq %r14, %rdi
callq 0x4a5c
movq 0x8(%r13), %rdx
leaq 0x2235(%rip), %rsi      # 0x90e5
movq %r14, %rdi
xorl %eax, %eax
callq 0x2080
movq 0x8(%r13), %rdi
leaq -0x60(%rbp), %rdx
movq %r14, %rsi
callq 0x4226
movq 0x8(%r13), %rdx
leaq 0x2220(%rip), %rsi      # 0x90f5
leaq -0x460(%rbp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2080
leaq -0x60(%rbp), %rsi
movq %rbx, %rdi
callq 0x2680
movq 0x40df(%rip), %rbx      # 0xafd8
leaq 0x2200(%rip), %rsi      # 0x9100
movl $0xa, %edx
movq %rbx, %rdi
callq 0x2240
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x21e0
movsbl %al, %esi
movq 0x40ad(%rip), %rdi      # 0xafd8
callq 0x2040
movq %rax, %rdi
callq 0x2170
movq 0x4099(%rip), %rbx      # 0xafd8
leaq 0x21c5(%rip), %rsi      # 0x910b
movl $0x5, %edx
movq %rbx, %rdi
callq 0x2240
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x21e0
movsbl %al, %esi
movq 0x4067(%rip), %rdi      # 0xafd8
callq 0x2040
movq %rax, %rdi
callq 0x2170
leaq -0x60(%rbp), %rdi
callq 0x71e6
xorl %eax, %eax
addq $0x438, %rsp            # imm = 0x438
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x4036(%rip), %rdi      # 0xafd8
leaq 0x20ef(%rip), %rsi      # 0x9098
movl $0x1f, %edx
callq 0x2240
movq (%r13), %rsi
movq 0x401a(%rip), %rdi      # 0xafd8
callq 0x21f0
movq %rax, %rbx
leaq 0x20eb(%rip), %rsi      # 0x90b8
movl $0xc, %edx
movq %rax, %rdi
callq 0x2240
movq %rbx, %rdi
callq 0x2120
xorl %edi, %edi
callq 0x2250
jmp 0x6feb
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x71e6
movq %rbx, %rdi
callq 0x2380
nop