#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 */
scalar_t__ RAND_MAX;
int atoi(char *);
char *calloc(int, int);
int /*<<< orphan*/ free(char *);
char *malloc(int);
int /*<<< orphan*/ printf(char *, char *, ...);
double rand();
int /*<<< orphan*/ show_help();
int /*<<< orphan*/ sprintf(char *, char *, char *, char *, char *);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
int /*<<< orphan*/ time(int /*<<< orphan*/);
int main(int argc, char **argv) {
  int length = 8;
  unsigned int switches = 0;
  srand(time(0));
  if (argc > 1) {
    for (int i = 1; i < argc; i++) {
      if (argv[i][0] == '-') {
        for (int j = 0; j < strlen(argv[i]); j++) {
          switch (argv[i][j]) {
          case 'g':
            switches |= 0x00000001;
            switches |= 0x00000002;
            length = 32;
            break;
          case 'x':
            switches |= 0x00000002;
            break;
          case 'a':
            switches |= 0x00000004;
            break;
          case 'n':
            switches |= 0x00000008;
            break;
          case 's':
            switches |= 0x00000010;
            break;
          case '?':
          case 'h':
            show_help();
            return (0);
          default:
            break;
          }
        }
      } else if (!(switches & 0x00000001))
        length = atoi(argv[i]);
    }
  }
  if (!(switches & (0x00000002 | 0x00000004 | 0x00000008 | 0x00000010)))
    switches |= (0x00000004 | 0x00000008);
  char *chars = 0;
  if (switches & 0x00000002) {
    chars = malloc(sizeof(char) * (strlen(("0123456789"
                                           "abcdef")) +
                                   1));
    strcpy(chars, ("0123456789"
                   "abcdef"));
  } else {
    chars = malloc(
        sizeof(char) *
        (((switches & 0x00000004)
              ? strlen("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")
              : 0) +
         ((switches & 0x00000008) ? strlen("0123456789") : 0) +
         ((switches & 0x00000010)
              ? strlen("~`!@#$%^&*()-_+=[]{}|\\:;\"\'<>,.?/")
              : 0) +
         1));
    sprintf(chars, "%s%s%s", (switches & 0x00000008) ? "0123456789" : "",
            (switches & 0x00000004)
                ? "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
                : "",
            (switches & 0x00000010) ? "~`!@#$%^&*()-_+=[]{}|\\:;\"\'<>,.?/"
                                    : "");
  }
  char *rand_str = calloc(sizeof(char), length + 1);
  int num_chars = strlen(chars);
  for (int i = 0; i < length; i++)
    rand_str[i] = chars[(int)((rand() / (double)RAND_MAX) * num_chars)];
  if (switches & 0x00000001)
    printf("%.8s-%.4s-%.4s-%.4s-%.12s\n", rand_str, rand_str + 8, rand_str + 12,
           rand_str + 16, rand_str + 20);
  else
    printf("%s\n", rand_str);
  free(rand_str);
  free(chars);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x8,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
xor    %edi,%edi
call   1090 <time@plt>
mov    %eax,%edi
call   1070 <srand@plt>
cmpl   $0x1,-0x8(%rbp)
jle    1352 <main+0x192>
movl   $0x1,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    134d <main+0x18d>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    1312 <main+0x152>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1050 <strlen@plt>
mov    %eax,%ecx
mov    -0x3c(%rbp),%eax
cmp    %ecx,%eax
jge    130d <main+0x14d>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x20(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
add    $0xffffffc1,%eax
mov    %eax,%ecx
mov    %rcx,-0x48(%rbp)
sub    $0x39,%eax
ja     12f5 <main+0x135>
mov    -0x48(%rbp),%rax
lea    0xd7d(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x18(%rbp),%eax
or     $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
or     $0x2,%eax
mov    %eax,-0x18(%rbp)
movl   $0x20,-0x14(%rbp)
jmp    12fa <main+0x13a>
mov    -0x18(%rbp),%eax
or     $0x2,%eax
mov    %eax,-0x18(%rbp)
jmp    12fa <main+0x13a>
mov    -0x18(%rbp),%eax
or     $0x4,%eax
mov    %eax,-0x18(%rbp)
jmp    12fa <main+0x13a>
mov    -0x18(%rbp),%eax
or     $0x8,%eax
mov    %eax,-0x18(%rbp)
jmp    12fa <main+0x13a>
mov    -0x18(%rbp),%eax
or     $0x10,%eax
mov    %eax,-0x18(%rbp)
jmp    12fa <main+0x13a>
mov    $0x0,%al
call   10a0 <show_help@plt>
movl   $0x0,-0x4(%rbp)
jmp    15be <main+0x3fe>
jmp    12fa <main+0x13a>
jmp    12ff <main+0x13f>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    122e <main+0x6e>
jmp    133a <main+0x17a>
mov    -0x18(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
jne    1335 <main+0x175>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   10c0 <atoi@plt>
mov    %eax,-0x14(%rbp)
jmp    133a <main+0x17a>
jmp    133f <main+0x17f>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1203 <main+0x43>
jmp    1352 <main+0x192>
mov    -0x18(%rbp),%eax
and    $0x1e,%eax
cmp    $0x0,%eax
jne    136a <main+0x1aa>
mov    -0x18(%rbp),%eax
or     $0xc,%eax
mov    %eax,-0x18(%rbp)
movq   $0x0,-0x28(%rbp)
mov    -0x18(%rbp),%eax
and    $0x2,%eax
cmp    $0x0,%eax
je     13b6 <main+0x1f6>
lea    0xd60(%rip),%rdi
call   1050 <strlen@plt>
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   10b0 <malloc@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
lea    0xd3c(%rip),%rsi
call   1040 <strcpy@plt>
jmp    14cb <main+0x30b>
mov    -0x18(%rbp),%eax
and    $0x4,%eax
cmp    $0x0,%eax
je     13d9 <main+0x219>
lea    0xd2d(%rip),%rdi
call   1050 <strlen@plt>
mov    %eax,-0x4c(%rbp)
jmp    13e3 <main+0x223>
xor    %eax,%eax
mov    %eax,-0x4c(%rbp)
jmp    13e3 <main+0x223>
mov    -0x4c(%rbp),%eax
mov    %eax,-0x50(%rbp)
mov    -0x18(%rbp),%eax
and    $0x8,%eax
cmp    $0x0,%eax
je     140c <main+0x24c>
lea    0xd2f(%rip),%rdi
call   1050 <strlen@plt>
mov    %eax,-0x54(%rbp)
jmp    1416 <main+0x256>
xor    %eax,%eax
mov    %eax,-0x54(%rbp)
jmp    1416 <main+0x256>
mov    -0x50(%rbp),%eax
mov    -0x54(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x58(%rbp)
mov    -0x18(%rbp),%eax
and    $0x10,%eax
cmp    $0x0,%eax
je     1444 <main+0x284>
lea    0xd02(%rip),%rdi
call   1050 <strlen@plt>
mov    %eax,-0x5c(%rbp)
jmp    144e <main+0x28e>
xor    %eax,%eax
mov    %eax,-0x5c(%rbp)
jmp    144e <main+0x28e>
mov    -0x58(%rbp),%eax
mov    -0x5c(%rbp),%ecx
add    %ecx,%eax
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   10b0 <malloc@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x18(%rbp),%ecx
and    $0x8,%ecx
lea    0xd04(%rip),%rdx
lea    0xcac(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
mov    -0x18(%rbp),%esi
and    $0x4,%esi
lea    0xce9(%rip),%rcx
lea    0xc5c(%rip),%rax
cmp    $0x0,%esi
cmovne %rax,%rcx
mov    -0x18(%rbp),%esi
and    $0x10,%esi
lea    0xcce(%rip),%r8
lea    0xc81(%rip),%rax
cmp    $0x0,%esi
cmovne %rax,%r8
lea    0xc94(%rip),%rsi
call   10d0 <sprintf@plt>
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    $0x1,%edi
call   1080 <calloc@plt>
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,-0x34(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    154d <main+0x38d>
mov    -0x28(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    $0x0,%al
call   10e0 <rand@plt>
mov    -0x68(%rbp),%rax
mov    0x2ad0(%rip),%rcx
cvtsi2sdq (%rcx),%xmm1
divsd  %xmm1,%xmm0
cvtsi2sdl -0x34(%rbp),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x30(%rbp),%rax
movslq -0x38(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    14f2 <main+0x332>
mov    -0x18(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1593 <main+0x3d3>
mov    -0x30(%rbp),%rsi
mov    -0x30(%rbp),%rdx
add    $0x8,%rdx
mov    -0x30(%rbp),%rcx
add    $0xc,%rcx
mov    -0x30(%rbp),%r8
add    $0x10,%r8
mov    -0x30(%rbp),%r9
add    $0x14,%r9
lea    0xbda(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    15a5 <main+0x3e5>
mov    -0x30(%rbp),%rsi
lea    0xbde(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r12
mov    %edi,%r15d
xor    %ebp,%ebp
xor    %edi,%edi
call   1090 <time@plt>
mov    %eax,%edi
call   1070 <srand@plt>
mov    $0x8,%r14d
cmp    $0x2,%r15d
jl     12a7 <main+0xe7>
mov    %r15d,%eax
mov    %rax,(%rsp)
xor    %ebp,%ebp
mov    $0x8,%r14d
mov    $0x1,%ebx
lea    0xdf4(%rip),%r13
jmp    121e <main+0x5e>
xchg   %ax,%ax
add    $0x1,%rbx
cmp    (%rsp),%rbx
je     12a7 <main+0xe7>
mov    (%r12,%rbx,8),%rdi
cmpb   $0x2d,(%rdi)
jne    1290 <main+0xd0>
call   1050 <strlen@plt>
test   %eax,%eax
jle    1210 <main+0x50>
xor    %r15d,%r15d
jmp    1250 <main+0x90>
or     $0x10,%ebp
nopl   0x0(%rax,%rax,1)
add    $0x1,%r15
call   1050 <strlen@plt>
cltq
cmp    %rax,%r15
jge    1210 <main+0x50>
mov    (%r12,%rbx,8),%rdi
movsbl (%rdi,%r15,1),%eax
add    $0xffffffc1,%eax
cmp    $0x39,%eax
ja     1240 <main+0x80>
movslq 0x0(%r13,%rax,4),%rax
add    %r13,%rax
jmp    *%rax
or     $0x4,%ebp
jmp    1240 <main+0x80>
or     $0x3,%ebp
mov    $0x20,%r14d
jmp    1240 <main+0x80>
or     $0x8,%ebp
jmp    1240 <main+0x80>
or     $0x2,%ebp
jmp    1240 <main+0x80>
cs nopw 0x0(%rax,%rax,1)
nop
test   $0x1,%bpl
jne    1210 <main+0x50>
call   10c0 <atoi@plt>
mov    %eax,%r14d
jmp    1210 <main+0x50>
mov    %ebp,%r13d
or     $0xc,%r13d
test   $0x1e,%bpl
cmovne %ebp,%r13d
test   $0x2,%r13b
jne    136b <main+0x1ab>
mov    $0x1,%ebx
test   $0x4,%r13b
je     12dc <main+0x11c>
lea    0xe27(%rip),%rdi
call   1050 <strlen@plt>
mov    %eax,%ebx
add    $0x1,%ebx
xor    %r15d,%r15d
mov    $0x0,%ebp
test   $0x8,%r13b
je     12f8 <main+0x138>
lea    0xe3d(%rip),%rdi
call   1050 <strlen@plt>
mov    %eax,%ebp
lea    0xe80(%rip),%r12
test   $0x10,%r13b
je     1317 <main+0x157>
lea    0xe2d(%rip),%r12
mov    %r12,%rdi
call   1050 <strlen@plt>
mov    %eax,%r15d
add    %ebp,%ebx
add    %r15d,%ebx
mov    %ebx,%edi
call   10b0 <malloc@plt>
mov    %rax,%r15
test   $0x8,%r13b
lea    0xdfd(%rip),%rdx
lea    0xe47(%rip),%rax
cmove  %rax,%rdx
test   $0x4,%r13b
lea    0xdb2(%rip),%rcx
cmove  %rax,%rcx
lea    0xe08(%rip),%rsi
mov    %r15,%rdi
mov    %r12,%r8
call   10d0 <sprintf@plt>
jmp    1390 <main+0x1d0>
xor    %eax,%eax
call   10a0 <show_help@plt>
jmp    1450 <main+0x290>
lea    0xd76(%rip),%rbx
mov    %rbx,%rdi
call   1050 <strlen@plt>
lea    0x1(%rax),%edi
call   10b0 <malloc@plt>
mov    %rax,%r15
mov    %rax,%rdi
mov    %rbx,%rsi
call   1040 <strcpy@plt>
lea    0x1(%r14),%esi
mov    $0x1,%edi
call   1080 <calloc@plt>
mov    %rax,%r12
mov    %r15,%rdi
call   1050 <strlen@plt>
test   %r14d,%r14d
jle    1400 <main+0x240>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,(%rsp)
mov    %r14d,%ebp
mov    0x2c27(%rip),%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %eax,%eax
call   10e0 <rand@plt>
xorps  %xmm1,%xmm1
cvtsi2sdq (%r14),%xmm1
divsd  %xmm1,%xmm0
mulsd  (%rsp),%xmm0
cvttsd2si %xmm0,%eax
cltq
movzbl (%r15,%rax,1),%eax
mov    %al,(%r12,%rbx,1)
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    13d0 <main+0x210>
test   $0x1,%r13b
jne    1419 <main+0x259>
lea    0xd6f(%rip),%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
jmp    1440 <main+0x280>
lea    0x8(%r12),%rdx
lea    0xc(%r12),%rcx
lea    0x10(%r12),%r8
mov    %r12,%r9
add    $0x14,%r9
lea    0xd2b(%rip),%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r12,%rdi
call   1030 <free@plt>
mov    %r15,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [17 x i8] c"0123456789abcdef\00"
@.str.1 = [53 x i8] c"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\00"
@.str.2 = [11 x i8] c"0123456789\00"
@.str.3 = [33 x i8] c"~`!@#$%^&*()-_+=[]{}|\\:;\22'<>,.?/\00"
@.str.4 = [7 x i8] c"%s%s%s\00"
@.str.5 = [1 x i8] zeroinitializer
@RAND_MAX = global i64 0
@.str.6 = [27 x i8] c"%.8s-%.4s-%.4s-%.4s-%.12s\0A\00"
@.str.7 = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i32
%13 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 8, i32* %6
store i32 0, i32* %7
%14 = call i32 @time(i32 0)
%15 = call i32 @srand(i32 %14)
%16 = load i32, i32* %4
%17 = icmp sgt i32 %16, 1
br i1 %17, label %18, label %96
18: ; preds = %2
store i32 1, i32* %8
br label %19
19: ; preds = %92, %18
%20 = load i32, i32* %8
%21 = load i32, i32* %4
%22 = icmp slt i32 %20, %21
br i1 %22, label %23, label %95
23: ; preds = %19
%24 = load i8**, i8*** %5
%25 = load i32, i32* %8
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds i8*, i8** %24, i64 %26
%28 = load i8*, i8** %27
%29 = getelementptr inbounds i8, i8* %28, i64 0
%30 = load i8, i8* %29
%31 = sext i8 %30 to i32
%32 = icmp eq i32 %31, 45
br i1 %32, label %33, label %79
33: ; preds = %23
store i32 0, i32* %9
br label %34
34: ; preds = %75, %33
%35 = load i32, i32* %9
%36 = load i8**, i8*** %5
%37 = load i32, i32* %8
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds i8*, i8** %36, i64 %38
%40 = load i8*, i8** %39
%41 = call i32 @strlen(i8* %40)
%42 = icmp slt i32 %35, %41
br i1 %42, label %43, label %78
43: ; preds = %34
%44 = load i8**, i8*** %5
%45 = load i32, i32* %8
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds i8*, i8** %44, i64 %46
%48 = load i8*, i8** %47
%49 = load i32, i32* %9
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds i8, i8* %48, i64 %50
%52 = load i8, i8* %51
%53 = sext i8 %52 to i32
switch i32 %53, label %73 [
i32 103, label %54
i32 120, label %59
i32 97, label %62
i32 110, label %65
i32 115, label %68
i32 63, label %71
i32 104, label %71
]
54: ; preds = %43
%55 = load i32, i32* %7
%56 = or i32 %55, 1
store i32 %56, i32* %7
%57 = load i32, i32* %7
%58 = or i32 %57, 2
store i32 %58, i32* %7
store i32 32, i32* %6
br label %74
59: ; preds = %43
%60 = load i32, i32* %7
%61 = or i32 %60, 2
store i32 %61, i32* %7
br label %74
62: ; preds = %43
%63 = load i32, i32* %7
%64 = or i32 %63, 4
store i32 %64, i32* %7
br label %74
65: ; preds = %43
%66 = load i32, i32* %7
%67 = or i32 %66, 8
store i32 %67, i32* %7
br label %74
68: ; preds = %43
%69 = load i32, i32* %7
%70 = or i32 %69, 16
store i32 %70, i32* %7
br label %74
71: ; preds = %43, %43
%72 = call i32 (...) @show_help()
store i32 0, i32* %3
br label %218
73: ; preds = %43
br label %74
74: ; preds = %73, %68, %65, %62, %59, %54
br label %75
75: ; preds = %74
%76 = load i32, i32* %9
%77 = add nsw i32 %76, 1
store i32 %77, i32* %9
br label %34
78: ; preds = %34
br label %91
79: ; preds = %23
%80 = load i32, i32* %7
%81 = and i32 %80, 1
%82 = icmp ne i32 %81, 0
br i1 %82, label %90, label %83
83: ; preds = %79
%84 = load i8**, i8*** %5
%85 = load i32, i32* %8
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds i8*, i8** %84, i64 %86
%88 = load i8*, i8** %87
%89 = call i32 @atoi(i8* %88)
store i32 %89, i32* %6
br label %90
90: ; preds = %83, %79
br label %91
91: ; preds = %90, %78
br label %92
92: ; preds = %91
%93 = load i32, i32* %8
%94 = add nsw i32 %93, 1
store i32 %94, i32* %8
br label %19
95: ; preds = %19
br label %96
96: ; preds = %95, %2
%97 = load i32, i32* %7
%98 = and i32 %97, 30
%99 = icmp ne i32 %98, 0
br i1 %99, label %103, label %100
100: ; preds = %96
%101 = load i32, i32* %7
%102 = or i32 %101, 12
store i32 %102, i32* %7
br label %103
103: ; preds = %100, %96
store i8* null, i8** %10
%104 = load i32, i32* %7
%105 = and i32 %104, 2
%106 = icmp ne i32 %105, 0
br i1 %106, label %107, label %116
107: ; preds = %103
%108 = call i32 @strlen(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%109 = add nsw i32 %108, 1
%110 = sext i32 %109 to i64
%111 = mul i64 1, %110
%112 = trunc i64 %111 to i32
%113 = call i8* @malloc(i32 %112)
store i8* %113, i8** %10
%114 = load i8*, i8** %10
%115 = call i32 @strcpy(i8* %114, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
br label %165
116: ; preds = %103
%117 = load i32, i32* %7
%118 = and i32 %117, 4
%119 = icmp ne i32 %118, 0
br i1 %119, label %120, label %122
120: ; preds = %116
%121 = call i32 @strlen(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i64 0, i64 0))
br label %123
122: ; preds = %116
br label %123
123: ; preds = %122, %120
%124 = phi i32 [ %121, %120 ], [ 0, %122 ]
%125 = load i32, i32* %7
%126 = and i32 %125, 8
%127 = icmp ne i32 %126, 0
br i1 %127, label %128, label %130
128: ; preds = %123
%129 = call i32 @strlen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
br label %131
130: ; preds = %123
br label %131
131: ; preds = %130, %128
%132 = phi i32 [ %129, %128 ], [ 0, %130 ]
%133 = add nsw i32 %124, %132
%134 = load i32, i32* %7
%135 = and i32 %134, 16
%136 = icmp ne i32 %135, 0
br i1 %136, label %137, label %139
137: ; preds = %131
%138 = call i32 @strlen(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0))
br label %140
139: ; preds = %131
br label %140
140: ; preds = %139, %137
%141 = phi i32 [ %138, %137 ], [ 0, %139 ]
%142 = add nsw i32 %133, %141
%143 = add nsw i32 %142, 1
%144 = sext i32 %143 to i64
%145 = mul i64 1, %144
%146 = trunc i64 %145 to i32
%147 = call i8* @malloc(i32 %146)
store i8* %147, i8** %10
%148 = load i8*, i8** %10
%149 = load i32, i32* %7
%150 = and i32 %149, 8
%151 = icmp ne i32 %150, 0
%152 = zext i1 %151 to i64
%153 = select i1 %151, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0)
%154 = load i32, i32* %7
%155 = and i32 %154, 4
%156 = icmp ne i32 %155, 0
%157 = zext i1 %156 to i64
%158 = select i1 %156, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0)
%159 = load i32, i32* %7
%160 = and i32 %159, 16
%161 = icmp ne i32 %160, 0
%162 = zext i1 %161 to i64
%163 = select i1 %161, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0)
%164 = call i32 @sprintf(i8* %148, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* %153, i8* %158, i8* %163)
br label %165
165: ; preds = %140, %107
%166 = load i32, i32* %6
%167 = add nsw i32 %166, 1
%168 = call i8* @calloc(i32 1, i32 %167)
store i8* %168, i8** %11
%169 = load i8*, i8** %10
%170 = call i32 @strlen(i8* %169)
store i32 %170, i32* %12
store i32 0, i32* %13
br label %171
171: ; preds = %192, %165
%172 = load i32, i32* %13
%173 = load i32, i32* %6
%174 = icmp slt i32 %172, %173
br i1 %174, label %175, label %195
175: ; preds = %171
%176 = load i8*, i8** %10
%177 = call double (...) @rand()
%178 = load i64, i64* @RAND_MAX
%179 = sitofp i64 %178 to double
%180 = fdiv double %177, %179
%181 = load i32, i32* %12
%182 = sitofp i32 %181 to double
%183 = fmul double %180, %182
%184 = fptosi double %183 to i32
%185 = sext i32 %184 to i64
%186 = getelementptr inbounds i8, i8* %176, i64 %185
%187 = load i8, i8* %186
%188 = load i8*, i8** %11
%189 = load i32, i32* %13
%190 = sext i32 %189 to i64
%191 = getelementptr inbounds i8, i8* %188, i64 %190
store i8 %187, i8* %191
br label %192
192: ; preds = %175
%193 = load i32, i32* %13
%194 = add nsw i32 %193, 1
store i32 %194, i32* %13
br label %171
195: ; preds = %171
%196 = load i32, i32* %7
%197 = and i32 %196, 1
%198 = icmp ne i32 %197, 0
br i1 %198, label %199, label %210
199: ; preds = %195
%200 = load i8*, i8** %11
%201 = load i8*, i8** %11
%202 = getelementptr inbounds i8, i8* %201, i64 8
%203 = load i8*, i8** %11
%204 = getelementptr inbounds i8, i8* %203, i64 12
%205 = load i8*, i8** %11
%206 = getelementptr inbounds i8, i8* %205, i64 16
%207 = load i8*, i8** %11
%208 = getelementptr inbounds i8, i8* %207, i64 20
%209 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0), i8* %200, i8* %202, i8* %204, i8* %206, i8* %208)
br label %213
210: ; preds = %195
%211 = load i8*, i8** %11
%212 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %211)
br label %213
213: ; preds = %210, %199
%214 = load i8*, i8** %11
%215 = call i32 @free(i8* %214)
%216 = load i8*, i8** %10
%217 = call i32 @free(i8* %216)
store i32 0, i32* %3
br label %218
218: ; preds = %213, %71
%219 = load i32, i32* %3
ret i32 %219
}

LLVM IR (-O2):
@.str = [17 x i8] c"0123456789abcdef\00"
@.str.1 = [53 x i8] c"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\00"
@.str.2 = [11 x i8] c"0123456789\00"
@.str.3 = [33 x i8] c"~`!@#$%^&*()-_+=[]{}|\\:;\22'<>,.?/\00"
@.str.4 = [7 x i8] c"%s%s%s\00"
@.str.5 = [1 x i8] zeroinitializer
@RAND_MAX = global i64 0
@.str.6 = [27 x i8] c"%.8s-%.4s-%.4s-%.4s-%.12s\0A\00"
@.str.7 = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = tail call i32 @time(i32 0)
%4 = tail call i32 @srand(i32 %3)
%5 = icmp sgt i32 %0, 1
br i1 %5, label %6, label %56
6: ; preds = %2
%7 = zext i32 %0 to i64
br label %8
8: ; preds = %6, %49
%9 = phi i64 [ 1, %6 ], [ %52, %49 ]
%10 = phi i32 [ 8, %6 ], [ %51, %49 ]
%11 = phi i32 [ 0, %6 ], [ %50, %49 ]
%12 = getelementptr inbounds i8*, i8** %1, i64 %9
%13 = load i8*, i8** %12
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 45
br i1 %15, label %16, label %44
16: ; preds = %8
%17 = tail call i32 @strlen(i8* %13)
%18 = icmp sgt i32 %17, 0
br i1 %18, label %19, label %49
19: ; preds = %16, %37
%20 = phi i64 [ %40, %37 ], [ 0, %16 ]
%21 = phi i32 [ %39, %37 ], [ %10, %16 ]
%22 = phi i32 [ %38, %37 ], [ %11, %16 ]
%23 = load i8*, i8** %12
%24 = getelementptr inbounds i8, i8* %23, i64 %20
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
switch i32 %26, label %37 [
i32 103, label %27
i32 120, label %29
i32 97, label %31
i32 110, label %33
i32 115, label %35
i32 63, label %54
i32 104, label %54
]
27: ; preds = %19
%28 = or i32 %22, 3
br label %37
29: ; preds = %19
%30 = or i32 %22, 2
br label %37
31: ; preds = %19
%32 = or i32 %22, 4
br label %37
33: ; preds = %19
%34 = or i32 %22, 8
br label %37
35: ; preds = %19
%36 = or i32 %22, 16
br label %37
37: ; preds = %27, %29, %31, %33, %35, %19
%38 = phi i32 [ %22, %19 ], [ %36, %35 ], [ %34, %33 ], [ %32, %31 ], [ %30, %29 ], [ %28, %27 ]
%39 = phi i32 [ %21, %19 ], [ %21, %35 ], [ %21, %33 ], [ %21, %31 ], [ %21, %29 ], [ 32, %27 ]
%40 = add nuw nsw i64 %20, 1
%41 = tail call i32 @strlen(i8* %23)
%42 = sext i32 %41 to i64
%43 = icmp slt i64 %40, %42
br i1 %43, label %19, label %49
44: ; preds = %8
%45 = and i32 %11, 1
%46 = icmp eq i32 %45, 0
br i1 %46, label %47, label %49
47: ; preds = %44
%48 = tail call i32 @atoi(i8* %13)
br label %49
49: ; preds = %37, %16, %47, %44
%50 = phi i32 [ %11, %44 ], [ %11, %47 ], [ %11, %16 ], [ %38, %37 ]
%51 = phi i32 [ %10, %44 ], [ %48, %47 ], [ %10, %16 ], [ %39, %37 ]
%52 = add nuw nsw i64 %9, 1
%53 = icmp eq i64 %52, %7
br i1 %53, label %56, label %8
54: ; preds = %19, %19
%55 = tail call i32 (...) @show_help()
br label %134
56: ; preds = %49, %2
%57 = phi i32 [ 0, %2 ], [ %50, %49 ]
%58 = phi i32 [ 8, %2 ], [ %51, %49 ]
%59 = and i32 %57, 30
%60 = icmp eq i32 %59, 0
%61 = or i32 %57, 12
%62 = select i1 %60, i32 %61, i32 %57
%63 = and i32 %62, 2
%64 = icmp eq i32 %63, 0
br i1 %64, label %70, label %65
65: ; preds = %56
%66 = tail call i32 @strlen(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%67 = add nsw i32 %66, 1
%68 = tail call i8* @malloc(i32 %67)
%69 = tail call i32 @strcpy(i8* %68, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
br label %97
70: ; preds = %56
%71 = and i32 %62, 4
%72 = icmp eq i32 %71, 0
br i1 %72, label %76, label %73
73: ; preds = %70
%74 = tail call i32 @strlen(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i64 0, i64 0))
%75 = add i32 %74, 1
br label %76
76: ; preds = %70, %73
%77 = phi i32 [ %75, %73 ], [ 1, %70 ]
%78 = and i32 %62, 8
%79 = icmp eq i32 %78, 0
br i1 %79, label %82, label %80
80: ; preds = %76
%81 = tail call i32 @strlen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
br label %82
82: ; preds = %76, %80
%83 = phi i32 [ %81, %80 ], [ 0, %76 ]
%84 = and i32 %62, 16
%85 = icmp eq i32 %84, 0
br i1 %85, label %88, label %86
86: ; preds = %82
%87 = tail call i32 @strlen(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0))
br label %88
88: ; preds = %82, %86
%89 = phi i8* [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0), %82 ], [ getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0), %86 ]
%90 = phi i32 [ 0, %82 ], [ %87, %86 ]
%91 = add i32 %77, %83
%92 = add i32 %91, %90
%93 = tail call i8* @malloc(i32 %92)
%94 = select i1 %79, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0)
%95 = select i1 %72, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i64 0, i64 0)
%96 = tail call i32 @sprintf(i8* dereferenceable(1) %93, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* %94, i8* %95, i8* %89)
br label %97
97: ; preds = %88, %65
%98 = phi i8* [ %68, %65 ], [ %93, %88 ]
%99 = add nsw i32 %58, 1
%100 = tail call i8* @calloc(i32 1, i32 %99)
%101 = tail call i32 @strlen(i8* %98)
%102 = icmp sgt i32 %58, 0
br i1 %102, label %103, label %106
103: ; preds = %97
%104 = sitofp i32 %101 to double
%105 = zext i32 %58 to i64
br label %109
106: ; preds = %109, %97
%107 = and i32 %62, 1
%108 = icmp eq i32 %107, 0
br i1 %108, label %129, label %123
109: ; preds = %103, %109
%110 = phi i64 [ 0, %103 ], [ %121, %109 ]
%111 = tail call double (...) @rand()
%112 = load i64, i64* @RAND_MAX
%113 = sitofp i64 %112 to double
%114 = fdiv double %111, %113
%115 = fmul double %114, %104
%116 = fptosi double %115 to i32
%117 = sext i32 %116 to i64
%118 = getelementptr inbounds i8, i8* %98, i64 %117
%119 = load i8, i8* %118
%120 = getelementptr inbounds i8, i8* %100, i64 %110
store i8 %119, i8* %120
%121 = add nuw nsw i64 %110, 1
%122 = icmp eq i64 %121, %105
br i1 %122, label %106, label %109
123: ; preds = %106
%124 = getelementptr inbounds i8, i8* %100, i64 8
%125 = getelementptr inbounds i8, i8* %100, i64 12
%126 = getelementptr inbounds i8, i8* %100, i64 16
%127 = getelementptr inbounds i8, i8* %100, i64 20
%128 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0), i8* %100, i8* %124, i8* %125, i8* %126, i8* %127)
br label %131
129: ; preds = %106
%130 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %100)
br label %131
131: ; preds = %129, %123
%132 = tail call i32 @free(i8* %100)
%133 = tail call i32 @free(i8* %98)
br label %134
134: ; preds = %54, %131
ret i32 0
}