#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ SimpleProcArgs(char const *, char *, char *, int *,
                                  int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ sprintf(char *, char *, char const *, ...);
scalar_t__ strcmp(char const *, char *);
int strlen(char *);
void eca_opt_print_usage_short(const char *shortopt, const char *longopt,
                               const char *args, const char *comment,
                               int __END_OF_OPTS, int __LEN_OF_ARGS) {
  int i, arglen;
  char tempStr[1000];
  char ChoiceElements[500];
  char ChoiceLessString[500];
  int ArgToksUsed[8];
  if (strcmp(shortopt, "-") != 0 && strcmp(longopt, "--") != 0) {
    sprintf(tempStr, "%s , %s ", shortopt, longopt);
  } else if (strcmp(shortopt, "-") == 0) {
    sprintf(tempStr, "     %s ", longopt);
  } else if (strcmp(longopt, "--") == 0) {
    sprintf(tempStr, "%s ", shortopt);
  }
  printf("%s", tempStr);
  for (i = strlen(tempStr); i < __END_OF_OPTS; i++)
    printf(" ");
  if (strcmp(args, "") != 0) {
    SimpleProcArgs(args, ChoiceElements, ChoiceLessString, ArgToksUsed, 0);
    printf("%s", ChoiceLessString);
    arglen = strlen(ChoiceLessString);
  } else {
    arglen = 0;
  }
  for (i = __END_OF_OPTS + arglen; i < __END_OF_OPTS + __LEN_OF_ARGS; i++)
    printf(" ");
  printf("%s\n", comment);
}


x86 assembly (clang, -O0):
<eca_opt_print_usage_short>:
push   %rbp
mov    %rsp,%rbp
sub    $0x840,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9d,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe83(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
je     11c9 <eca_opt_print_usage_short+0x79>
mov    -0x10(%rbp),%rdi
lea    0xe68(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
je     11c9 <eca_opt_print_usage_short+0x79>
lea    -0x420(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xe46(%rip),%rsi
mov    $0x0,%al
call   1070 <sprintf@plt>
jmp    123e <eca_opt_print_usage_short+0xee>
mov    -0x8(%rbp),%rdi
lea    0xe2d(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    1201 <eca_opt_print_usage_short+0xb1>
lea    -0x420(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xe17(%rip),%rsi
mov    $0x0,%al
call   1070 <sprintf@plt>
jmp    1239 <eca_opt_print_usage_short+0xe9>
mov    -0x10(%rbp),%rdi
lea    0xdf4(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    1234 <eca_opt_print_usage_short+0xe4>
lea    -0x420(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xde4(%rip),%rsi
mov    $0x0,%al
call   1070 <sprintf@plt>
jmp    1239 <eca_opt_print_usage_short+0xe9>
jmp    123e <eca_opt_print_usage_short+0xee>
lea    -0x420(%rbp),%rsi
lea    0xdc9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x420(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    128a <eca_opt_print_usage_short+0x13a>
lea    0xd9e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1262 <eca_opt_print_usage_short+0x112>
mov    -0x18(%rbp),%rdi
lea    0xd86(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
je     12ee <eca_opt_print_usage_short+0x19e>
mov    -0x18(%rbp),%rdi
lea    -0x620(%rbp),%rsi
lea    -0x820(%rbp),%rdx
lea    -0x840(%rbp),%rcx
xor    %r8d,%r8d
call   1060 <SimpleProcArgs@plt>
lea    -0x820(%rbp),%rsi
lea    0xd42(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x820(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x30(%rbp)
jmp    12f5 <eca_opt_print_usage_short+0x1a5>
movl   $0x0,-0x30(%rbp)
mov    -0x24(%rbp),%eax
add    -0x30(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    -0x24(%rbp),%ecx
add    -0x28(%rbp),%ecx
cmp    %ecx,%eax
jge    132b <eca_opt_print_usage_short+0x1db>
lea    0xcfd(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    12fe <eca_opt_print_usage_short+0x1ae>
mov    -0x20(%rbp),%rsi
lea    0xce2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x840,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eca_opt_print_usage_short>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x818,%rsp
mov    %r9d,%r14d
mov    %r8d,%r12d
mov    %rcx,%rbp
mov    %rdx,%r15
mov    %rsi,%r13
mov    %rdi,%rbx
lea    0xe67(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
mov    %rbp,0x8(%rsp)
je     11d8 <eca_opt_print_usage_short+0x68>
lea    0xe50(%rip),%rsi
mov    %r13,%rdi
call   1070 <strcmp@plt>
test   %rax,%rax
je     11d8 <eca_opt_print_usage_short+0x68>
lea    0xe3f(%rip),%rsi
lea    0x30(%rsp),%rdi
mov    %rbx,%rdx
mov    %r13,%rcx
xor    %eax,%eax
call   1090 <sprintf@plt>
jmp    1227 <eca_opt_print_usage_short+0xb7>
lea    0xe22(%rip),%rsi
mov    %rbx,%rdi
call   1070 <strcmp@plt>
test   %rax,%rax
je     1211 <eca_opt_print_usage_short+0xa1>
lea    0xe0d(%rip),%rsi
mov    %r13,%rdi
call   1070 <strcmp@plt>
test   %rax,%rax
jne    1227 <eca_opt_print_usage_short+0xb7>
lea    0xe0a(%rip),%rsi
lea    0x30(%rsp),%rdi
mov    %rbx,%rdx
jmp    1220 <eca_opt_print_usage_short+0xb0>
lea    0xdf4(%rip),%rsi
lea    0x30(%rsp),%rdi
mov    %r13,%rdx
xor    %eax,%eax
call   1090 <sprintf@plt>
lea    0xde7(%rip),%rdi
xor    %ebx,%ebx
lea    0x30(%rsp),%r13
mov    %r13,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r13,%rdi
call   1050 <strlen@plt>
cmp    %r12d,%eax
jge    126f <eca_opt_print_usage_short+0xff>
mov    %r12d,%ebp
sub    %eax,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
jne    1260 <eca_opt_print_usage_short+0xf0>
lea    0xd9e(%rip),%rsi
mov    %r15,%rdi
call   1070 <strcmp@plt>
test   %rax,%rax
je     12c1 <eca_opt_print_usage_short+0x151>
lea    0x620(%rsp),%rsi
lea    0x420(%rsp),%rbx
lea    0x10(%rsp),%rcx
mov    %r15,%rdi
mov    %rbx,%rdx
xor    %r8d,%r8d
call   1080 <SimpleProcArgs@plt>
lea    0xd68(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
call   1050 <strlen@plt>
mov    %eax,%ebx
cmp    %r14d,%ebx
mov    0x8(%rsp),%rbp
jge    12f2 <eca_opt_print_usage_short+0x182>
add    %r12d,%r14d
add    %r12d,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    %r14d,%ebx
jl     12e0 <eca_opt_print_usage_short+0x170>
mov    %rbp,%rdi
call   1040 <puts@plt>
add    $0x818,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"-\00"
@.str.1 = [3 x i8] c"--\00"
@.str.2 = [9 x i8] c"%s , %s \00"
@.str.3 = [9 x i8] c" %s \00"
@.str.4 = [4 x i8] c"%s \00"
@.str.5 = [3 x i8] c"%s\00"
@.str.6 = [2 x i8] c" \00"
@.str.7 = [1 x i8] zeroinitializer
@.str.8 = [4 x i8] c"%s\0A\00"
define void @eca_opt_print_usage_short(i8* %0, i8* %1, i8* %2, i8* %3, i32 %4, i32 %5) {
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca [1000 x i8]
%16 = alloca [500 x i8]
%17 = alloca [500 x i8]
%18 = alloca [8 x i32]
store i8* %0, i8** %7
store i8* %1, i8** %8
store i8* %2, i8** %9
store i8* %3, i8** %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%19 = load i8*, i8** %7
%20 = call i64 @strcmp(i8* %19, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%21 = icmp ne i64 %20, 0
br i1 %21, label %22, label %31
22: ; preds = %6
%23 = load i8*, i8** %8
%24 = call i64 @strcmp(i8* %23, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%25 = icmp ne i64 %24, 0
br i1 %25, label %26, label %31
26: ; preds = %22
%27 = getelementptr inbounds [1000 x i8], [1000 x i8]* %15, i64 0, i64 0
%28 = load i8*, i8** %7
%29 = load i8*, i8** %8
%30 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %27, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* %28, i8* %29)
br label %49
31: ; preds = %22, %6
%32 = load i8*, i8** %7
%33 = call i64 @strcmp(i8* %32, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%34 = icmp eq i64 %33, 0
br i1 %34, label %35, label %39
35: ; preds = %31
%36 = getelementptr inbounds [1000 x i8], [1000 x i8]* %15, i64 0, i64 0
%37 = load i8*, i8** %8
%38 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %36, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i8* %37)
br label %48
39: ; preds = %31
%40 = load i8*, i8** %8
%41 = call i64 @strcmp(i8* %40, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%42 = icmp eq i64 %41, 0
br i1 %42, label %43, label %47
43: ; preds = %39
%44 = getelementptr inbounds [1000 x i8], [1000 x i8]* %15, i64 0, i64 0
%45 = load i8*, i8** %7
%46 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %44, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* %45)
br label %47
47: ; preds = %43, %39
br label %48
48: ; preds = %47, %35
br label %49
49: ; preds = %48, %26
%50 = getelementptr inbounds [1000 x i8], [1000 x i8]* %15, i64 0, i64 0
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %50)
%52 = getelementptr inbounds [1000 x i8], [1000 x i8]* %15, i64 0, i64 0
%53 = call i32 @strlen(i8* %52)
store i32 %53, i32* %13
br label %54
54: ; preds = %60, %49
%55 = load i32, i32* %13
%56 = load i32, i32* %11
%57 = icmp slt i32 %55, %56
br i1 %57, label %58, label %63
58: ; preds = %54
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
br label %60
60: ; preds = %58
%61 = load i32, i32* %13
%62 = add nsw i32 %61, 1
store i32 %62, i32* %13
br label %54
63: ; preds = %54
%64 = load i8*, i8** %9
%65 = call i64 @strcmp(i8* %64, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.7, i64 0, i64 0))
%66 = icmp ne i64 %65, 0
br i1 %66, label %67, label %77
67: ; preds = %63
%68 = load i8*, i8** %9
%69 = getelementptr inbounds [500 x i8], [500 x i8]* %16, i64 0, i64 0
%70 = getelementptr inbounds [500 x i8], [500 x i8]* %17, i64 0, i64 0
%71 = getelementptr inbounds [8 x i32], [8 x i32]* %18, i64 0, i64 0
%72 = call i32 @SimpleProcArgs(i8* %68, i8* %69, i8* %70, i32* %71, i32 0)
%73 = getelementptr inbounds [500 x i8], [500 x i8]* %17, i64 0, i64 0
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %73)
%75 = getelementptr inbounds [500 x i8], [500 x i8]* %17, i64 0, i64 0
%76 = call i32 @strlen(i8* %75)
store i32 %76, i32* %14
br label %78
77: ; preds = %63
store i32 0, i32* %14
br label %78
78: ; preds = %77, %67
%79 = load i32, i32* %11
%80 = load i32, i32* %14
%81 = add nsw i32 %79, %80
store i32 %81, i32* %13
br label %82
82: ; preds = %90, %78
%83 = load i32, i32* %13
%84 = load i32, i32* %11
%85 = load i32, i32* %12
%86 = add nsw i32 %84, %85
%87 = icmp slt i32 %83, %86
br i1 %87, label %88, label %93
88: ; preds = %82
%89 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
br label %90
90: ; preds = %88
%91 = load i32, i32* %13
%92 = add nsw i32 %91, 1
store i32 %92, i32* %13
br label %82
93: ; preds = %82
%94 = load i8*, i8** %10
%95 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8* %94)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"-\00"
@.str.1 = [3 x i8] c"--\00"
@.str.2 = [9 x i8] c"%s , %s \00"
@.str.3 = [9 x i8] c" %s \00"
@.str.4 = [4 x i8] c"%s \00"
@.str.5 = [3 x i8] c"%s\00"
@.str.7 = [1 x i8] zeroinitializer
define void @eca_opt_print_usage_short(i8* %0, i8* %1, i8* %2, i8* nocapture %3, i32 %4, i32 %5) {
%7 = alloca [1000 x i8]
%8 = alloca [500 x i8]
%9 = alloca [500 x i8]
%10 = alloca [8 x i32]
%11 = getelementptr inbounds [1000 x i8], [1000 x i8]* %7, i64 0, i64 0
%12 = getelementptr inbounds [500 x i8], [500 x i8]* %8, i64 0, i64 0
%13 = getelementptr inbounds [500 x i8], [500 x i8]* %9, i64 0, i64 0
%14 = bitcast [8 x i32]* %10 to i8*
%15 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%16 = icmp eq i64 %15, 0
br i1 %16, label %22, label %17
17: ; preds = %6
%18 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%19 = icmp eq i64 %18, 0
br i1 %19, label %22, label %20
20: ; preds = %17
%21 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %11, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* %0, i8* %1)
br label %32
22: ; preds = %17, %6
%23 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%24 = icmp eq i64 %23, 0
br i1 %24, label %25, label %27
25: ; preds = %22
%26 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %11, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i8* %1)
br label %32
27: ; preds = %22
%28 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%29 = icmp eq i64 %28, 0
br i1 %29, label %30, label %32
30: ; preds = %27
%31 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %11, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* %0)
br label %32
32: ; preds = %25, %30, %27, %20
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %11)
%34 = call i32 @strlen(i8* %11)
%35 = icmp slt i32 %34, %4
br i1 %35, label %36, label %41
36: ; preds = %32, %36
%37 = phi i32 [ %39, %36 ], [ %34, %32 ]
%38 = call i32 @putchar(i32 32)
%39 = add i32 %37, 1
%40 = icmp eq i32 %39, %4
br i1 %40, label %41, label %36
41: ; preds = %36, %32
%42 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.7, i64 0, i64 0))
%43 = icmp eq i64 %42, 0
br i1 %43, label %49, label %44
44: ; preds = %41
%45 = getelementptr inbounds [8 x i32], [8 x i32]* %10, i64 0, i64 0
%46 = call i32 @SimpleProcArgs(i8* %2, i8* %12, i8* %13, i32* %45, i32 0)
%47 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %13)
%48 = call i32 @strlen(i8* %13)
br label %49
49: ; preds = %41, %44
%50 = phi i32 [ %48, %44 ], [ 0, %41 ]
%51 = add nsw i32 %5, %4
%52 = icmp slt i32 %50, %5
br i1 %52, label %53, label %60
53: ; preds = %49
%54 = add nsw i32 %50, %4
br label %55
55: ; preds = %53, %55
%56 = phi i32 [ %58, %55 ], [ %54, %53 ]
%57 = call i32 @putchar(i32 32)
%58 = add nsw i32 %56, 1
%59 = icmp slt i32 %58, %51
br i1 %59, label %55, label %60
60: ; preds = %55, %49
%61 = call i32 @puts(i8* dereferenceable(1) %3)
ret void
}