#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*/ printf(char *, ...);
int /*<<< orphan*/ sprintf(char *, char *, char const *, ...);
scalar_t__ strcmp(char const *, char *);
int strlen(char const *);
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;
  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(" ");
  printf("%s", args);
  for (i = __END_OF_OPTS + strlen(args); 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    $0x430,%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    0xe93(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
je     11b9 <eca_opt_print_usage_short+0x79>
mov    -0x10(%rbp),%rdi
lea    0xe78(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
je     11b9 <eca_opt_print_usage_short+0x79>
lea    -0x420(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xe56(%rip),%rsi
mov    $0x0,%al
call   1060 <sprintf@plt>
jmp    122e <eca_opt_print_usage_short+0xee>
mov    -0x8(%rbp),%rdi
lea    0xe3d(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    11f1 <eca_opt_print_usage_short+0xb1>
lea    -0x420(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xe27(%rip),%rsi
mov    $0x0,%al
call   1060 <sprintf@plt>
jmp    1229 <eca_opt_print_usage_short+0xe9>
mov    -0x10(%rbp),%rdi
lea    0xe04(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    1224 <eca_opt_print_usage_short+0xe4>
lea    -0x420(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xdf4(%rip),%rsi
mov    $0x0,%al
call   1060 <sprintf@plt>
jmp    1229 <eca_opt_print_usage_short+0xe9>
jmp    122e <eca_opt_print_usage_short+0xee>
lea    -0x420(%rbp),%rsi
lea    0xdd9(%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    127a <eca_opt_print_usage_short+0x13a>
lea    0xdae(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1252 <eca_opt_print_usage_short+0x112>
mov    -0x18(%rbp),%rsi
lea    0xd90(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x24(%rbp),%eax
mov    %eax,-0x424(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x424(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    -0x24(%rbp),%ecx
add    -0x28(%rbp),%ecx
cmp    %ecx,%eax
jge    12d8 <eca_opt_print_usage_short+0x198>
lea    0xd50(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    12ab <eca_opt_print_usage_short+0x16b>
mov    -0x20(%rbp),%rsi
lea    0xd35(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x430,%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    $0x3e8,%rsp
mov    %r9d,%ebp
mov    %r8d,%r12d
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%r13
mov    %rdi,%rbx
lea    0xe77(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
je     11c1 <eca_opt_print_usage_short+0x61>
lea    0xe65(%rip),%rsi
mov    %r13,%rdi
call   1070 <strcmp@plt>
test   %rax,%rax
je     11c1 <eca_opt_print_usage_short+0x61>
lea    0xe54(%rip),%rsi
mov    %rsp,%rdi
mov    %rbx,%rdx
mov    %r13,%rcx
xor    %eax,%eax
call   1080 <sprintf@plt>
jmp    120c <eca_opt_print_usage_short+0xac>
lea    0xe39(%rip),%rsi
mov    %rbx,%rdi
call   1070 <strcmp@plt>
test   %rax,%rax
je     11f8 <eca_opt_print_usage_short+0x98>
lea    0xe24(%rip),%rsi
mov    %r13,%rdi
call   1070 <strcmp@plt>
test   %rax,%rax
jne    120c <eca_opt_print_usage_short+0xac>
lea    0xe21(%rip),%rsi
mov    %rsp,%rdi
mov    %rbx,%rdx
jmp    1205 <eca_opt_print_usage_short+0xa5>
lea    0xe0d(%rip),%rsi
mov    %rsp,%rdi
mov    %r13,%rdx
xor    %eax,%eax
call   1080 <sprintf@plt>
lea    0xe02(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %rbx,%rdi
call   1050 <strlen@plt>
cmp    %r12d,%eax
jge    124f <eca_opt_print_usage_short+0xef>
mov    %r12d,%ebx
sub    %eax,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1240 <eca_opt_print_usage_short+0xe0>
lea    0xdbf(%rip),%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r15,%rdi
call   1050 <strlen@plt>
cmp    %ebp,%eax
jge    1291 <eca_opt_print_usage_short+0x131>
mov    %eax,%ebx
add    %r12d,%ebp
add    %r12d,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    %ebp,%ebx
jl     1280 <eca_opt_print_usage_short+0x120>
mov    %r14,%rdi
call   1040 <puts@plt>
add    $0x3e8,%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 = [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 [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
%15 = load i8*, i8** %7
%16 = call i64 @strcmp(i8* %15, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%17 = icmp ne i64 %16, 0
br i1 %17, label %18, label %27
18: ; preds = %6
%19 = load i8*, i8** %8
%20 = call i64 @strcmp(i8* %19, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%21 = icmp ne i64 %20, 0
br i1 %21, label %22, label %27
22: ; preds = %18
%23 = getelementptr inbounds [1000 x i8], [1000 x i8]* %14, i64 0, i64 0
%24 = load i8*, i8** %7
%25 = load i8*, i8** %8
%26 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %23, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* %24, i8* %25)
br label %45
27: ; preds = %18, %6
%28 = load i8*, i8** %7
%29 = call i64 @strcmp(i8* %28, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%30 = icmp eq i64 %29, 0
br i1 %30, label %31, label %35
31: ; preds = %27
%32 = getelementptr inbounds [1000 x i8], [1000 x i8]* %14, i64 0, i64 0
%33 = load i8*, i8** %8
%34 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %32, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i8* %33)
br label %44
35: ; preds = %27
%36 = load i8*, i8** %8
%37 = call i64 @strcmp(i8* %36, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%38 = icmp eq i64 %37, 0
br i1 %38, label %39, label %43
39: ; preds = %35
%40 = getelementptr inbounds [1000 x i8], [1000 x i8]* %14, i64 0, i64 0
%41 = load i8*, i8** %7
%42 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %40, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* %41)
br label %43
43: ; preds = %39, %35
br label %44
44: ; preds = %43, %31
br label %45
45: ; preds = %44, %22
%46 = getelementptr inbounds [1000 x i8], [1000 x i8]* %14, i64 0, i64 0
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %46)
%48 = getelementptr inbounds [1000 x i8], [1000 x i8]* %14, i64 0, i64 0
%49 = call i32 @strlen(i8* %48)
store i32 %49, i32* %13
br label %50
50: ; preds = %56, %45
%51 = load i32, i32* %13
%52 = load i32, i32* %11
%53 = icmp slt i32 %51, %52
br i1 %53, label %54, label %59
54: ; preds = %50
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
br label %56
56: ; preds = %54
%57 = load i32, i32* %13
%58 = add nsw i32 %57, 1
store i32 %58, i32* %13
br label %50
59: ; preds = %50
%60 = load i8*, i8** %9
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %60)
%62 = load i32, i32* %11
%63 = load i8*, i8** %9
%64 = call i32 @strlen(i8* %63)
%65 = add nsw i32 %62, %64
store i32 %65, i32* %13
br label %66
66: ; preds = %74, %59
%67 = load i32, i32* %13
%68 = load i32, i32* %11
%69 = load i32, i32* %12
%70 = add nsw i32 %68, %69
%71 = icmp slt i32 %67, %70
br i1 %71, label %72, label %77
72: ; preds = %66
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
br label %74
74: ; preds = %72
%75 = load i32, i32* %13
%76 = add nsw i32 %75, 1
store i32 %76, i32* %13
br label %66
77: ; preds = %66
%78 = load i8*, i8** %10
%79 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %78)
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"
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 i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %2)
%37 = call i32 @strlen(i8* %2)
%38 = add nsw i32 %5, %4
%39 = icmp slt i32 %37, %5
br i1 %39, label %40, label %47
40: ; preds = %35
%41 = add nsw i32 %37, %4
br label %42
42: ; preds = %40, %42
%43 = phi i32 [ %45, %42 ], [ %41, %40 ]
%44 = call i32 @putchar(i32 32)
%45 = add nsw i32 %43, 1
%46 = icmp slt i32 %45, %38
br i1 %46, label %42, label %47
47: ; preds = %42, %35
%48 = call i32 @puts(i8* dereferenceable(1) %3)
ret void
}