#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 scalar_t__ time_t;

/* Variables and functions */
int /*<<< orphan*/ CalcMix();
unsigned long MixUp(char, scalar_t__);
scalar_t__ RAND_MAX;
int /*<<< orphan*/ printf(char *, char, scalar_t__, scalar_t__, unsigned long,
                          unsigned long);
float rand();
int /*<<< orphan*/ time(scalar_t__ *);
void main() {
  time_t t, old;
  unsigned long l;
  char aux[16], mid;
  CalcMix();
  do {
    time(&t);
    if (old != t) {
      old = t;
      mid = (int)((rand() / (float)RAND_MAX) * (16));
      l = MixUp(mid, t);
      printf("%X) %010ld - %lX - %+11ld - %08lX\n", mid, t, t, l, l);
    }
  } while (1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    $0x0,%al
call   1040 <CalcMix@plt>
lea    -0x8(%rbp),%rdi
call   1060 <time@plt>
mov    -0x10(%rbp),%rax
cmp    -0x8(%rbp),%rax
je     11dd <main+0x8d>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1070 <rand@plt>
mov    0x2e5c(%rip),%rax
cvtsi2ssq (%rax),%xmm1
divss  %xmm1,%xmm0
movss  0xe63(%rip),%xmm1
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
mov    %al,-0x31(%rbp)
mov    -0x31(%rbp),%al
mov    -0x8(%rbp),%rsi
movsbl %al,%edi
call   1050 <MixUp@plt>
mov    %rax,-0x18(%rbp)
mov    -0x31(%rbp),%al
mov    -0x8(%rbp),%rdx
mov    -0x8(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    -0x18(%rbp),%r9
lea    0xe2f(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
jmp    11e2 <main+0x92>
mov    $0x1,%al
test   $0x1,%al
jne    115f <main+0xf>
jmp    11f1 <main+0xa1>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <CalcMix@plt>
mov    %rsp,%r13
mov    0x2e7c(%rip),%r15
lea    0xe91(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r13,%rdi
call   1060 <time@plt>
mov    (%rsp),%rbp
cmp    %rbp,%rbx
je     1180 <main+0x30>
xor    %eax,%eax
call   1070 <rand@plt>
xorps  %xmm1,%xmm1
cvtsi2ssq (%r15),%xmm1
divss  %xmm1,%xmm0
mulss  0xe54(%rip),%xmm0
cvttss2si %xmm0,%eax
mov    (%rsp),%rsi
movsbl %al,%r12d
mov    %r12d,%edi
call   1050 <MixUp@plt>
mov    (%rsp),%rcx
mov    %r14,%rdi
mov    %r12d,%esi
mov    %rcx,%rdx
mov    %rax,%r8
mov    %rax,%r9
call   1030 <printf@plt>
mov    %rbp,%rbx
jmp    1180 <main+0x30>

LLVM IR (-O0):
@RAND_MAX = global i64 0
@.str = [35 x i8] c"%X) %010ld - %lX - %+11ld - %08lX\0A\00"
define void @main() {
%1 = alloca i64
%2 = alloca i64
%3 = alloca i64
%4 = alloca [16 x i8]
%5 = alloca i8
%6 = call i32 (...) @CalcMix()
br label %7
7: ; preds = %31, %0
%8 = call i32 @time(i64* %1)
%9 = load i64, i64* %2
%10 = load i64, i64* %1
%11 = icmp ne i64 %9, %10
br i1 %11, label %12, label %30
12: ; preds = %7
%13 = load i64, i64* %1
store i64 %13, i64* %2
%14 = call float (...) @rand()
%15 = load i64, i64* @RAND_MAX
%16 = sitofp i64 %15 to float
%17 = fdiv float %14, %16
%18 = fmul float %17, 1.600000e+01
%19 = fptosi float %18 to i32
%20 = trunc i32 %19 to i8
store i8 %20, i8* %5
%21 = load i8, i8* %5
%22 = load i64, i64* %1
%23 = call i64 @MixUp(i8 signext %21, i64 %22)
store i64 %23, i64* %3
%24 = load i8, i8* %5
%25 = load i64, i64* %1
%26 = load i64, i64* %1
%27 = load i64, i64* %3
%28 = load i64, i64* %3
%29 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8 signext %24, i64 %25, i64 %26, i64 %27, i64 %28)
br label %30
30: ; preds = %12, %7
br label %31
31: ; preds = %30
br i1 true, label %7, label %32
32: ; preds = %31
ret void
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
@.str = [35 x i8] c"%X) %010ld - %lX - %+11ld - %08lX\0A\00"
define void @main() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = tail call i32 (...) @CalcMix()
br label %4
4: ; preds = %10, %0
%5 = phi i64 [ %8, %10 ], [ undef, %0 ]
br label %6
6: ; preds = %4, %6
%7 = call i32 @time(i64* %1)
%8 = load i64, i64* %1
%9 = icmp eq i64 %5, %8
br i1 %9, label %6, label %10
10: ; preds = %6
%11 = call float (...) @rand()
%12 = load i64, i64* @RAND_MAX
%13 = sitofp i64 %12 to float
%14 = fdiv float %11, %13
%15 = fmul float %14, 1.600000e+01
%16 = fptosi float %15 to i32
%17 = trunc i32 %16 to i8
%18 = load i64, i64* %1
%19 = call i64 @MixUp(i8 signext %17, i64 %18)
%20 = load i64, i64* %1
%21 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8 signext %17, i64 %20, i64 %20, i64 %19, i64 %19)
br label %4
}