#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 ProcArgList(char const *, int, int /*<<< orphan*/, 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];
  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) {
    arglen = ProcArgList(args, 1, 0, 0);
  } 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    $0x420,%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     12be <eca_opt_print_usage_short+0x16e>
mov    -0x18(%rbp),%rdi
mov    $0x1,%esi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1060 <ProcArgList@plt>
mov    %eax,-0x30(%rbp)
jmp    12c5 <eca_opt_print_usage_short+0x175>
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    12fb <eca_opt_print_usage_short+0x1ab>
lea    0xd2d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    12ce <eca_opt_print_usage_short+0x17e>
mov    -0x20(%rbp),%rsi
lea    0xd12(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x420,%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    $0x3f8,%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    0x10(%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    0x10(%rsp),%rdi
mov    %rbx,%rdx
jmp    1220 <eca_opt_print_usage_short+0xb0>
lea    0xdf4(%rip),%rsi
lea    0x10(%rsp),%rdi
mov    %r13,%rdx
xor    %eax,%eax
call   1090 <sprintf@plt>
lea    0xde7(%rip),%rdi
xor    %ebx,%ebx
lea    0x10(%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     1296 <eca_opt_print_usage_short+0x126>
mov    %r15,%rdi
mov    $0x1,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1080 <ProcArgList@plt>
mov    %eax,%ebx
cmp    %r14d,%ebx
mov    0x8(%rsp),%rbp
jge    12c2 <eca_opt_print_usage_short+0x152>
add    %r12d,%r14d
add    %r12d,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    %r14d,%ebx
jl     12b0 <eca_opt_print_usage_short+0x140>
mov    %rbp,%rdi
call   1040 <puts@plt>
add    $0x3f8,%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]
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
%16 = load i8*, i8** %7
%17 = call i64 @strcmp(i8* %16, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%18 = icmp ne i64 %17, 0
br i1 %18, label %19, label %28
19: ; preds = %6
%20 = load i8*, i8** %8
%21 = call i64 @strcmp(i8* %20, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%22 = icmp ne i64 %21, 0
br i1 %22, label %23, label %28
23: ; preds = %19
%24 = getelementptr inbounds [1000 x i8], [1000 x i8]* %15, i64 0, i64 0
%25 = load i8*, i8** %7
%26 = load i8*, i8** %8
%27 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %24, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* %25, i8* %26)
br label %46
28: ; preds = %19, %6
%29 = load i8*, i8** %7
%30 = call i64 @strcmp(i8* %29, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%31 = icmp eq i64 %30, 0
br i1 %31, label %32, label %36
32: ; preds = %28
%33 = getelementptr inbounds [1000 x i8], [1000 x i8]* %15, i64 0, i64 0
%34 = load i8*, i8** %8
%35 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %33, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i8* %34)
br label %45
36: ; preds = %28
%37 = load i8*, i8** %8
%38 = call i64 @strcmp(i8* %37, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%39 = icmp eq i64 %38, 0
br i1 %39, label %40, label %44
40: ; preds = %36
%41 = getelementptr inbounds [1000 x i8], [1000 x i8]* %15, i64 0, i64 0
%42 = load i8*, i8** %7
%43 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %41, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* %42)
br label %44
44: ; preds = %40, %36
br label %45
45: ; preds = %44, %32
br label %46
46: ; preds = %45, %23
%47 = getelementptr inbounds [1000 x i8], [1000 x i8]* %15, i64 0, i64 0
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %47)
%49 = getelementptr inbounds [1000 x i8], [1000 x i8]* %15, i64 0, i64 0
%50 = call i32 @strlen(i8* %49)
store i32 %50, i32* %13
br label %51
51: ; preds = %57, %46
%52 = load i32, i32* %13
%53 = load i32, i32* %11
%54 = icmp slt i32 %52, %53
br i1 %54, label %55, label %60
55: ; preds = %51
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
br label %57
57: ; preds = %55
%58 = load i32, i32* %13
%59 = add nsw i32 %58, 1
store i32 %59, i32* %13
br label %51
60: ; preds = %51
%61 = load i8*, i8** %9
%62 = call i64 @strcmp(i8* %61, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.7, i64 0, i64 0))
%63 = icmp ne i64 %62, 0
br i1 %63, label %64, label %67
64: ; preds = %60
%65 = load i8*, i8** %9
%66 = call i32 @ProcArgList(i8* %65, i32 1, i32 0, i32 0)
store i32 %66, i32* %14
br label %68
67: ; preds = %60
store i32 0, i32* %14
br label %68
68: ; preds = %67, %64
%69 = load i32, i32* %11
%70 = load i32, i32* %14
%71 = add nsw i32 %69, %70
store i32 %71, i32* %13
br label %72
72: ; preds = %80, %68
%73 = load i32, i32* %13
%74 = load i32, i32* %11
%75 = load i32, i32* %12
%76 = add nsw i32 %74, %75
%77 = icmp slt i32 %73, %76
br i1 %77, label %78, label %83
78: ; preds = %72
%79 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
br label %80
80: ; preds = %78
%81 = load i32, i32* %13
%82 = add nsw i32 %81, 1
store i32 %82, i32* %13
br label %72
83: ; preds = %72
%84 = load i8*, i8** %10
%85 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8* %84)
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 = getelementptr inbounds [1000 x i8], [1000 x i8]* %7, i64 0, i64 0
%9 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%10 = icmp eq i64 %9, 0
br i1 %10, label %16, label %11
11: ; preds = %6
%12 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%13 = icmp eq i64 %12, 0
br i1 %13, label %16, label %14
14: ; preds = %11
%15 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* %0, i8* %1)
br label %26
16: ; preds = %11, %6
%17 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%18 = icmp eq i64 %17, 0
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i8* %1)
br label %26
21: ; preds = %16
%22 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%23 = icmp eq i64 %22, 0
br i1 %23, label %24, label %26
24: ; preds = %21
%25 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* %0)
br label %26
26: ; preds = %19, %24, %21, %14
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %8)
%28 = call i32 @strlen(i8* %8)
%29 = icmp slt i32 %28, %4
br i1 %29, label %30, label %35
30: ; preds = %26, %30
%31 = phi i32 [ %33, %30 ], [ %28, %26 ]
%32 = call i32 @putchar(i32 32)
%33 = add i32 %31, 1
%34 = icmp eq i32 %33, %4
br i1 %34, label %35, label %30
35: ; preds = %30, %26
%36 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.7, i64 0, i64 0))
%37 = icmp eq i64 %36, 0
br i1 %37, label %40, label %38
38: ; preds = %35
%39 = call i32 @ProcArgList(i8* %2, i32 1, i32 0, i32 0)
br label %40
40: ; preds = %35, %38
%41 = phi i32 [ %39, %38 ], [ 0, %35 ]
%42 = add nsw i32 %5, %4
%43 = icmp slt i32 %41, %5
br i1 %43, label %44, label %51
44: ; preds = %40
%45 = add nsw i32 %41, %4
br label %46
46: ; preds = %44, %46
%47 = phi i32 [ %49, %46 ], [ %45, %44 ]
%48 = call i32 @putchar(i32 32)
%49 = add nsw i32 %47, 1
%50 = icmp slt i32 %49, %42
br i1 %50, label %46, label %51
51: ; preds = %46, %40
%52 = call i32 @puts(i8* dereferenceable(1) %3)
ret void
}