// File: /workspace/github_cpp_makefile_star2_O1/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 $0x448, %rsp            # imm = 0x448
movq %rsi, -0x38(%rbp)
leaq -0x60(%rbp), %rax
movl $0x0, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
movl %edi, -0x2c(%rbp)
testl %edi, %edi
jle 0x6eb0
movl -0x2c(%rbp), %ebx
xorl %r15d, %r15d
movq 0x41d2(%rip), %r12      # 0xafd8
movl $0x3, %edx
movq %r12, %rdi
leaq 0x227f(%rip), %rsi      # 0x9094
callq 0x2240
movq %r12, %rdi
movl %r15d, %esi
callq 0x2360
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
leaq 0x1efa(%rip), %rsi      # 0x8d31
callq 0x2240
movq -0x38(%rbp), %rax
movq (%rax,%r15,8), %r14
testq %r14, %r14
je 0x6e61
movq %r14, %rdi
callq 0x2110
movq %r13, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x2240
jmp 0x6e7c
movq (%r13), %rax
movq -0x18(%rax), %rax
movq %r13, %rdi
addq %rax, %rdi
movl 0x20(%r13,%rax), %esi
orl $0x1, %esi
callq 0x2340
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x21e0
movsbl %al, %esi
movq %r13, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2170
incq %r15
cmpq %r15, %rbx
jne 0x6e06
cmpl $0x3, -0x2c(%rbp)
jl 0x6ffd
movq -0x38(%rbp), %rbx
movq 0x8(%rbx), %rdx
leaq 0x21fc(%rip), %rsi      # 0x90c5
leaq -0x470(%rbp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x2080
leaq -0x68(%rbp), %rsi
movq %r14, %rdi
callq 0x6a6e
movq 0x8(%rbx), %rdx
leaq 0x21e1(%rip), %rsi      # 0x90d2
movq %r14, %rdi
xorl %eax, %eax
callq 0x2080
leaq -0x68(%rbp), %rsi
movq %r14, %rdi
callq 0x4ab4
movq 0x8(%rbx), %rdx
leaq 0x21d3(%rip), %rsi      # 0x90e5
movq %r14, %rdi
xorl %eax, %eax
callq 0x2080
movq 0x8(%rbx), %rdi
leaq -0x68(%rbp), %rdx
movq %r14, %rsi
callq 0x428a
movq 0x8(%rbx), %rdx
leaq 0x21be(%rip), %rsi      # 0x90f5
leaq -0x470(%rbp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2080
leaq -0x68(%rbp), %rsi
movq %rbx, %rdi
callq 0x2680
movq 0x407d(%rip), %rbx      # 0xafd8
leaq 0x219e(%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 0x404b(%rip), %rdi      # 0xafd8
callq 0x2040
movq %rax, %rdi
callq 0x2170
movq 0x4037(%rip), %rbx      # 0xafd8
leaq 0x2163(%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 0x4005(%rip), %rdi      # 0xafd8
callq 0x2040
movq %rax, %rdi
callq 0x2170
leaq -0x68(%rbp), %rdi
callq 0x723e
xorl %eax, %eax
addq $0x448, %rsp            # imm = 0x448
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x3fd4(%rip), %rdi      # 0xafd8
leaq 0x208d(%rip), %rsi      # 0x9098
movl $0x1f, %edx
callq 0x2240
movq -0x38(%rbp), %rax
movq (%rax), %rsi
movq 0x3fb5(%rip), %rdi      # 0xafd8
callq 0x21f0
movq %rax, %rbx
leaq 0x2086(%rip), %rsi      # 0x90b8
movl $0xc, %edx
movq %rax, %rdi
callq 0x2240
movq %rbx, %rdi
callq 0x2120
xorl %edi, %edi
callq 0x2250
jmp 0x7050
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0x723e
movq %rbx, %rdi
callq 0x2380