#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 PO_showUsageEnumType(FILE *file, char *option_str, char **value_list) {
  int max_char_on_line = 70;
  int i, j, num_char_on_line;
  fprintf(file, "\t%s [ ", option_str);
  num_char_on_line = 8 + strlen(option_str);
  i = 0;
  while (1) {
    if ((value_list[i] == NULL) || (strlen(value_list[i]) < 1))
      break;
    if ((num_char_on_line + strlen(value_list[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", value_list[i]);
    num_char_on_line += strlen(value_list[i]);
    if ((value_list[i + 1] != NULL) && (strlen(value_list[i + 1]) > 0)) {
      fprintf(file, ", ");
      num_char_on_line += 2;
    } else
      fprintf(file, " ]\n");
    i += 1;
  }
}


x86 assembly (clang, -O0):
<PO_showUsageEnumType>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x46,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xeb6(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x8,%eax
mov    %eax,-0x28(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1194 <PO_showUsageEnumType+0x74>
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <strlen@plt>
cmp    $0x1,%eax
jge    1199 <PO_showUsageEnumType+0x79>
jmp    12d3 <PO_showUsageEnumType+0x1b3>
mov    -0x28(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x2c(%rbp),%eax
add    %ecx,%eax
cmp    -0x1c(%rbp),%eax
jle    1227 <PO_showUsageEnumType+0x107>
mov    -0x8(%rbp),%rdi
lea    0xe3c(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x30(%rbp),%eax
add    $0x3,%ecx
cmp    %ecx,%eax
jge    1218 <PO_showUsageEnumType+0xf8>
mov    -0x8(%rbp),%rdi
lea    0xe0b(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11d9 <PO_showUsageEnumType+0xb9>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x8,%eax
mov    %eax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xdcc(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <strlen@plt>
add    -0x28(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     12b3 <PO_showUsageEnumType+0x193>
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <strlen@plt>
cmp    $0x0,%eax
jle    12b3 <PO_showUsageEnumType+0x193>
mov    -0x8(%rbp),%rdi
lea    0xd6f(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x28(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x28(%rbp)
jmp    12c5 <PO_showUsageEnumType+0x1a5>
mov    -0x8(%rbp),%rdi
lea    0xd52(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1167 <PO_showUsageEnumType+0x47>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PO_showUsageEnumType>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r15
lea    0xe92(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %r14,0x8(%rsp)
mov    (%r14),%rdi
test   %rdi,%rdi
je     12c9 <PO_showUsageEnumType+0x179>
mov    %eax,%ebp
add    $0x8,%ebp
xor    %r13d,%r13d
mov    0x8(%rsp),%r14
mov    %rbx,0x10(%rsp)
jmp    11ee <PO_showUsageEnumType+0x9e>
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0x3,%esi
mov    $0x1,%edx
lea    0xe4c(%rip),%rdi
mov    %r15,%rcx
call   1070 <fwrite@plt>
mov    0x8(%rsp),%rax
lea    (%rax,%r13,8),%r14
add    $0x8,%r14
add    $0x1,%r13
mov    (%r14),%rdi
mov    %r12d,%ebp
test   %rdi,%rdi
mov    0x10(%rsp),%rbx
je     12c9 <PO_showUsageEnumType+0x179>
call   1030 <strlen@plt>
test   %eax,%eax
jle    12c9 <PO_showUsageEnumType+0x179>
mov    (%r14),%rdi
call   1030 <strlen@plt>
add    %ebp,%eax
cmp    $0x47,%eax
jl     126c <PO_showUsageEnumType+0x11c>
mov    $0x2,%esi
mov    $0x1,%edx
lea    0xdec(%rip),%rdi
mov    %r15,%rcx
call   1070 <fwrite@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
cmp    $0xfffffffe,%eax
jl     125f <PO_showUsageEnumType+0x10f>
mov    $0xffffffff,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0x20,%edi
mov    %r15,%rsi
call   1050 <fputc@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
add    $0x2,%eax
add    $0x1,%ebp
cmp    %eax,%ebp
jl     1240 <PO_showUsageEnumType+0xf0>
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %eax,%ebp
add    $0x8,%ebp
mov    0x8(%rsp),%rbx
mov    (%rbx,%r13,8),%rdi
mov    %r15,%rsi
call   1040 <fputs@plt>
mov    (%rbx,%r13,8),%rdi
call   1030 <strlen@plt>
mov    %eax,%r12d
add    %ebp,%r12d
mov    0x8(%rbx,%r13,8),%rdi
test   %rdi,%rdi
je     11b0 <PO_showUsageEnumType+0x60>
call   1030 <strlen@plt>
test   %eax,%eax
jle    11b0 <PO_showUsageEnumType+0x60>
mov    $0x2,%esi
mov    $0x1,%edx
lea    0xd52(%rip),%rdi
mov    %r15,%rcx
call   1070 <fwrite@plt>
add    $0x2,%r12d
jmp    11c9 <PO_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 @PO_showUsageEnumType(i32* %0, i8* %1, i8** %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i8**
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32* %0, i32** %4
store i8* %1, i8** %5
store i8** %2, i8*** %6
store i32 70, i32* %7
%11 = load i32*, i32** %4
%12 = load i8*, i8** %5
%13 = call i32 (i32*, i8*, ...) @fprintf(i32* %11, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = load i8*, i8** %5
%15 = call i32 @strlen(i8* %14)
%16 = add nsw i32 8, %15
store i32 %16, i32* %10
store i32 0, i32* %8
br label %17
17: ; preds = %3, %103
%18 = load i8**, i8*** %6
%19 = load i32, i32* %8
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8*, i8** %18, i64 %20
%22 = load i8*, i8** %21
%23 = icmp eq i8* %22, null
br i1 %23, label %32, label %24
24: ; preds = %17
%25 = load i8**, i8*** %6
%26 = load i32, i32* %8
%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 = icmp slt i32 %30, 1
br i1 %31, label %32, label %33
32: ; preds = %24, %17
br label %106
33: ; preds = %24
%34 = load i32, i32* %10
%35 = load i8**, i8*** %6
%36 = load i32, i32* %8
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds i8*, i8** %35, i64 %37
%39 = load i8*, i8** %38
%40 = call i32 @strlen(i8* %39)
%41 = add nsw i32 %34, %40
%42 = load i32, i32* %7
%43 = icmp sgt i32 %41, %42
br i1 %43, label %44, label %63
44: ; preds = %33
%45 = load i32*, i32** %4
%46 = call i32 (i32*, i8*, ...) @fprintf(i32* %45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %9
br label %47
47: ; preds = %56, %44
%48 = load i32, i32* %9
%49 = load i8*, i8** %5
%50 = call i32 @strlen(i8* %49)
%51 = add nsw i32 %50, 3
%52 = icmp slt i32 %48, %51
br i1 %52, label %53, label %59
53: ; preds = %47
%54 = load i32*, i32** %4
%55 = call i32 (i32*, i8*, ...) @fprintf(i32* %54, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %56
56: ; preds = %53
%57 = load i32, i32* %9
%58 = add nsw i32 %57, 1
store i32 %58, i32* %9
br label %47
59: ; preds = %47
%60 = load i8*, i8** %5
%61 = call i32 @strlen(i8* %60)
%62 = add nsw i32 8, %61
store i32 %62, i32* %10
br label %63
63: ; preds = %59, %33
%64 = load i32*, i32** %4
%65 = load i8**, i8*** %6
%66 = load i32, i32* %8
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds i8*, i8** %65, i64 %67
%69 = load i8*, i8** %68
%70 = call i32 (i32*, i8*, ...) @fprintf(i32* %64, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %69)
%71 = load i8**, i8*** %6
%72 = load i32, i32* %8
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds i8*, i8** %71, i64 %73
%75 = load i8*, i8** %74
%76 = call i32 @strlen(i8* %75)
%77 = load i32, i32* %10
%78 = add nsw i32 %77, %76
store i32 %78, i32* %10
%79 = load i8**, i8*** %6
%80 = load i32, i32* %8
%81 = add nsw i32 %80, 1
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds i8*, i8** %79, i64 %82
%84 = load i8*, i8** %83
%85 = icmp ne i8* %84, null
br i1 %85, label %86, label %100
86: ; preds = %63
%87 = load i8**, i8*** %6
%88 = load i32, i32* %8
%89 = add nsw i32 %88, 1
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds i8*, i8** %87, i64 %90
%92 = load i8*, i8** %91
%93 = call i32 @strlen(i8* %92)
%94 = icmp sgt i32 %93, 0
br i1 %94, label %95, label %100
95: ; preds = %86
%96 = load i32*, i32** %4
%97 = call i32 (i32*, i8*, ...) @fprintf(i32* %96, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%98 = load i32, i32* %10
%99 = add nsw i32 %98, 2
store i32 %99, i32* %10
br label %103
100: ; preds = %86, %63
%101 = load i32*, i32** %4
%102 = call i32 (i32*, i8*, ...) @fprintf(i32* %101, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
br label %103
103: ; preds = %100, %95
%104 = load i32, i32* %8
%105 = add nsw i32 %104, 1
store i32 %105, i32* %8
br label %17
106: ; preds = %32
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 @PO_showUsageEnumType(i32* nocapture %0, i8* %1, i8** nocapture %2) {
%4 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %1)
%5 = tail call i32 @strlen(i8* %1)
%6 = load i8*, i8** %2
%7 = icmp eq i8* %6, null
br i1 %7, label %59, label %8
8: ; preds = %3
%9 = add nsw i32 %5, 8
br label %10
10: ; preds = %8, %55
%11 = phi i64 [ 0, %8 ], [ %43, %55 ]
%12 = phi i8* [ %6, %8 ], [ %57, %55 ]
%13 = phi i8** [ %2, %8 ], [ %44, %55 ]
%14 = phi i32 [ %9, %8 ], [ %56, %55 ]
%15 = tail call i32 @strlen(i8* %12)
%16 = icmp slt i32 %15, 1
br i1 %16, label %59, label %17
17: ; preds = %10
%18 = load i8*, i8** %13
%19 = tail call i32 @strlen(i8* %18)
%20 = add nsw i32 %19, %14
%21 = icmp sgt i32 %20, 70
br i1 %21, label %22, label %36
22: ; preds = %17
%23 = 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)
%24 = tail call i32 @strlen(i8* %1)
%25 = icmp sgt i32 %24, -3
br i1 %25, label %26, label %33
26: ; preds = %22, %26
%27 = phi i32 [ %29, %26 ], [ 0, %22 ]
%28 = tail call i32 @fputc(i32 32, i32* %0)
%29 = add nuw nsw i32 %27, 1
%30 = tail call i32 @strlen(i8* %1)
%31 = add nsw i32 %30, 2
%32 = icmp slt i32 %27, %31
br i1 %32, label %26, label %33
33: ; preds = %26, %22
%34 = tail call i32 @strlen(i8* %1)
%35 = add nsw i32 %34, 8
br label %36
36: ; preds = %33, %17
%37 = phi i32 [ %35, %33 ], [ %14, %17 ]
%38 = load i8*, i8** %13
%39 = tail call i32 @fputs(i8* %38, i32* %0)
%40 = load i8*, i8** %13
%41 = tail call i32 @strlen(i8* %40)
%42 = add nsw i32 %41, %37
%43 = add nuw i64 %11, 1
%44 = getelementptr inbounds i8*, i8** %2, i64 %43
%45 = load i8*, i8** %44
%46 = icmp eq i8* %45, null
br i1 %46, label %53, label %47
47: ; preds = %36
%48 = tail call i32 @strlen(i8* %45)
%49 = icmp sgt i32 %48, 0
br i1 %49, label %50, label %53
50: ; preds = %47
%51 = 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)
%52 = add nsw i32 %42, 2
br label %55
53: ; preds = %47, %36
%54 = 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 %55
55: ; preds = %53, %50
%56 = phi i32 [ %52, %50 ], [ %42, %53 ]
%57 = load i8*, i8** %44
%58 = icmp eq i8* %57, null
br i1 %58, label %59, label %10
59: ; preds = %10, %55, %3
ret void
}