#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int strlen(char *);
void showUsageEnumType(FILE *file, char *option_str, int num_str, char **str) {
  int max_char_on_line = 75;
  int i, j, num_char_on_line;
  fprintf(file, "\t%s [ ", option_str);
  num_char_on_line = 8 + strlen(option_str);
  for (i = 0; i < num_str; i++) {
    if ((num_char_on_line + strlen(str[i])) > max_char_on_line) {
      fprintf(file, "\n\t");
      for (j = 0; j < (strlen(option_str) + 3); j++)
        fprintf(file, " ");
      num_char_on_line = 8 + strlen(option_str);
      ;
    }
    fprintf(file, "%s", str[i]);
    num_char_on_line += strlen(str[i]);
    if (i != (num_str - 1)) {
      fprintf(file, ", ");
      num_char_on_line += 2;
    } else
      fprintf(file, " ]\n");
  }
}


x86 assembly (clang, -O0):
<showUsageEnumType>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
movl   $0x4b,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xeb3(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x8,%eax
mov    %eax,-0x30(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    128f <showUsageEnumType+0x16f>
mov    -0x30(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x34(%rbp),%eax
add    %ecx,%eax
cmp    -0x24(%rbp),%eax
jle    1204 <showUsageEnumType+0xe4>
mov    -0x8(%rbp),%rdi
lea    0xe5f(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x38(%rbp),%eax
add    $0x3,%ecx
cmp    %ecx,%eax
jge    11f5 <showUsageEnumType+0xd5>
mov    -0x8(%rbp),%rdi
lea    0xe2e(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11b6 <showUsageEnumType+0x96>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x8,%eax
mov    %eax,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xdef(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x20(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <strlen@plt>
add    -0x30(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x28(%rbp),%eax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
je     126a <showUsageEnumType+0x14a>
mov    -0x8(%rbp),%rdi
lea    0xdb8(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x30(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x30(%rbp)
jmp    127c <showUsageEnumType+0x15c>
mov    -0x8(%rbp),%rdi
lea    0xd9b(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    1281 <showUsageEnumType+0x161>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    116a <showUsageEnumType+0x4a>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<showUsageEnumType>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rcx,%rbx
mov    %edx,%r12d
mov    %rsi,%r15
mov    %rdi,%r14
lea    0xe8f(%rip),%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    %r15,%rdi
call   1030 <strlen@plt>
test   %r12d,%r12d
jle    1299 <showUsageEnumType+0x149>
mov    %eax,%r13d
add    $0x8,%r13d
lea    -0x1(%r12),%eax
mov    %rax,0x10(%rsp)
mov    %r12d,%eax
mov    %rax,0x8(%rsp)
xor    %ebp,%ebp
jmp    11db <showUsageEnumType+0x8b>
nopl   0x0(%rax)
mov    $0x3,%esi
mov    $0x1,%edx
lea    0xe4c(%rip),%rdi
mov    %r14,%rcx
call   1070 <fwrite@plt>
add    $0x1,%rbp
mov    %r12d,%r13d
cmp    0x8(%rsp),%rbp
je     1299 <showUsageEnumType+0x149>
mov    (%rbx,%rbp,8),%rdi
call   1030 <strlen@plt>
add    %r13d,%eax
cmp    $0x4c,%eax
jl     1251 <showUsageEnumType+0x101>
mov    %rbx,%r12
mov    $0x2,%esi
mov    $0x1,%edx
lea    0xe07(%rip),%rdi
mov    %r14,%rcx
call   1070 <fwrite@plt>
mov    %r15,%rdi
call   1030 <strlen@plt>
cmp    $0xfffffffe,%eax
jl     123f <showUsageEnumType+0xef>
mov    $0xffffffff,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x20,%edi
mov    %r14,%rsi
call   1050 <fputc@plt>
mov    %r15,%rdi
call   1030 <strlen@plt>
add    $0x2,%eax
add    $0x1,%ebx
cmp    %eax,%ebx
jl     1220 <showUsageEnumType+0xd0>
mov    %r15,%rdi
call   1030 <strlen@plt>
mov    %eax,%r13d
add    $0x8,%r13d
mov    %r12,%rbx
mov    (%rbx,%rbp,8),%rdi
mov    %r14,%rsi
call   1040 <fputs@plt>
mov    (%rbx,%rbp,8),%rdi
call   1030 <strlen@plt>
mov    %eax,%r12d
add    %r13d,%r12d
cmp    0x10(%rsp),%rbp
je     11b0 <showUsageEnumType+0x60>
mov    $0x2,%esi
mov    $0x1,%edx
lea    0xd82(%rip),%rdi
mov    %r14,%rcx
call   1070 <fwrite@plt>
add    $0x2,%r12d
jmp    11c9 <showUsageEnumType+0x79>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"\09%s [ \00"
@.str.1 = [3 x i8] c"\0A\09\00"
@.str.4 = [3 x i8] c", \00"
@.str.5 = [4 x i8] c" ]\0A\00"
define void @showUsageEnumType(i32* nocapture %0, i8* %1, i32 %2, i8** nocapture %3) {
%5 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %1)
%6 = tail call i32 @strlen(i8* %1)
%7 = icmp sgt i32 %2, 0
br i1 %7, label %8, label %52
8: ; preds = %4
%9 = add nsw i32 %6, 8
%10 = add nsw i32 %2, -1
%11 = zext i32 %10 to i64
%12 = zext i32 %2 to i64
br label %13
13: ; preds = %8, %48
%14 = phi i64 [ 0, %8 ], [ %50, %48 ]
%15 = phi i32 [ %9, %8 ], [ %49, %48 ]
%16 = getelementptr inbounds i8*, i8** %3, i64 %14
%17 = load i8*, i8** %16
%18 = tail call i32 @strlen(i8* %17)
%19 = add nsw i32 %18, %15
%20 = icmp sgt i32 %19, 75
br i1 %20, label %21, label %35
21: ; preds = %13
%22 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i64 2, i64 1, i32* %0)
%23 = tail call i32 @strlen(i8* %1)
%24 = icmp sgt i32 %23, -3
br i1 %24, label %25, label %32
25: ; preds = %21, %25
%26 = phi i32 [ %28, %25 ], [ 0, %21 ]
%27 = tail call i32 @fputc(i32 32, i32* %0)
%28 = add nuw nsw i32 %26, 1
%29 = tail call i32 @strlen(i8* %1)
%30 = add nsw i32 %29, 2
%31 = icmp slt i32 %26, %30
br i1 %31, label %25, label %32
32: ; preds = %25, %21
%33 = tail call i32 @strlen(i8* %1)
%34 = add nsw i32 %33, 8
br label %35
35: ; preds = %32, %13
%36 = phi i32 [ %34, %32 ], [ %15, %13 ]
%37 = load i8*, i8** %16
%38 = tail call i32 @fputs(i8* %37, i32* %0)
%39 = load i8*, i8** %16
%40 = tail call i32 @strlen(i8* %39)
%41 = add nsw i32 %40, %36
%42 = icmp eq i64 %14, %11
br i1 %42, label %46, label %43
43: ; preds = %35
%44 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i64 2, i64 1, i32* %0)
%45 = add nsw i32 %41, 2
br label %48
46: ; preds = %35
%47 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i64 3, i64 1, i32* %0)
br label %48
48: ; preds = %43, %46
%49 = phi i32 [ %45, %43 ], [ %41, %46 ]
%50 = add nuw nsw i64 %14, 1
%51 = icmp eq i64 %50, %12
br i1 %51, label %52, label %13
52: ; preds = %48, %4
ret void
}