// File: pelrun[P]aft/optionParser.c
// Function: printUsage
void printUsage(char * appliName, char* cmdOptionLine, char* description, struct SOption *option)
{
	int i=0;
	int j=0;
	printf("Usage : %s %s ",appliName, cmdOptionLine);
	while (option[i].shortName !=0)
	{
		if (option[i].nbMin == 0)
			printf("[");
		else
			printf("<");
		printf("-%c",option[i].shortName);
		for (j=0;j<option[i].nbArgs;j++)
			printf(" $%d",j+1);
		if (option[i].nbMin == 0)
		{
			printf("]");
			if (option[i].nbMax == 0)
				printf("*");
		}
		else
		{
			printf(">");
			if (option[i].nbMax == 0)
				printf("+");
		}
		printf(" ");
		i++;
	}
	printf("[-h]");
	printf("\n\n%s %s\n\n",appliName, description);
	i = 0;
	while (option[i].shortName !=0)
	{
		printf("\t-%c",option[i].shortName);
		for (j=0;j<option[i].nbArgs;j++)
			printf(" <$%d>",j+1);
		printf(" | --%s",option[i].longName);
		for (j=0;j<option[i].nbArgs;j++)
			printf(" <$%d>",j+1);
		printf("\n\t\t%s\n",option[i].description);
		i++;
	}
	printf("\t-h | --help\n\t\tDisplay help\n\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
leaq 0x7958(%rip), %rdi      # 0x15afd
movb $0x0, %al
callq 0x4060
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0xe2ee
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x10(%rax)
jne 0xe1ec
leaq 0x77ac(%rip), %rdi      # 0x1598f
movb $0x0, %al
callq 0x4060
jmp 0xe1fa
leaq 0x779e(%rip), %rdi      # 0x15991
movb $0x0, %al
callq 0x4060
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movsbl (%rax), %esi
leaq 0x7909(%rip), %rdi      # 0x15b1c
movb $0x0, %al
callq 0x4060
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
movq -0x20(%rbp), %rcx
movslq -0x24(%rbp), %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x18(%rcx), %eax
jge 0xe257
movl -0x28(%rbp), %esi
addl $0x1, %esi
leaq 0x78c7(%rip), %rdi      # 0x15b0c
movb $0x0, %al
callq 0x4060
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0xe221
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x10(%rax)
jne 0xe29f
leaq 0x772a(%rip), %rdi      # 0x1599d
movb $0x0, %al
callq 0x4060
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x14(%rax)
jne 0xe29d
leaq 0x7700(%rip), %rdi      # 0x15996
movb $0x0, %al
callq 0x4060
jmp 0xe2d2
leaq 0x787f(%rip), %rdi      # 0x15b25
movb $0x0, %al
callq 0x4060
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x14(%rax)
jne 0xe2d0
leaq 0x76cf(%rip), %rdi      # 0x15998
movb $0x0, %al
callq 0x4060
jmp 0xe2d2
leaq 0x769f(%rip), %rdi      # 0x15978
movb $0x0, %al
callq 0x4060
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xe1ac
leaq 0x76a5(%rip), %rdi      # 0x1599a
movb $0x0, %al
callq 0x4060
movq -0x8(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq 0x7806(%rip), %rdi      # 0x15b11
movb $0x0, %al
callq 0x4060
movl $0x0, -0x24(%rbp)
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0xe41e
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movsbl (%rax), %esi
leaq 0x77ce(%rip), %rdi      # 0x15b1b
movb $0x0, %al
callq 0x4060
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
movq -0x20(%rbp), %rcx
movslq -0x24(%rbp), %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x18(%rcx), %eax
jge 0xe391
movl -0x28(%rbp), %esi
addl $0x1, %esi
leaq 0x77a1(%rip), %rdi      # 0x15b20
movb $0x0, %al
callq 0x4060
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0xe35b
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rsi
leaq 0x777c(%rip), %rdi      # 0x15b27
movb $0x0, %al
callq 0x4060
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
movq -0x20(%rbp), %rcx
movslq -0x24(%rbp), %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x18(%rcx), %eax
jge 0xe3ef
movl -0x28(%rbp), %esi
addl $0x1, %esi
leaq 0x7743(%rip), %rdi      # 0x15b20
movb $0x0, %al
callq 0x4060
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0xe3b9
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq 0x20(%rax), %rsi
leaq 0x7726(%rip), %rdi      # 0x15b2f
movb $0x0, %al
callq 0x4060
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xe319
leaq 0x7711(%rip), %rdi      # 0x15b36
movb $0x0, %al
callq 0x4060
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)