#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__ atol(char const *);
long fromBase62(char *);
long getTime();
int /*<<< orphan*/ printf(char *, char const *, long, char *, long);
int /*<<< orphan*/ toBase62(int, char *);
int fulltest(int argc, const char *argv[]) {
  char szBase62[16] = {
      0x00,
  };
  long dec = 0;
  long timeInput = 0;
  timeInput = getTime();
  if (argc > 1) {
    toBase62((long)atol(argv[1]) + timeInput, szBase62);
    dec = fromBase62(szBase62);
  } else {
    toBase62(1042432728, szBase62);
    dec = fromBase62(szBase62);
  }
  printf("Input:[%s] Time:[%ld] Base62:[%s] Base10:[%ld]\n", argv[1], timeInput,
         szBase62, dec);
  return 0;
}


x86 assembly (clang, -O0):
<fulltest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1050 <memset@plt>
movq   $0x0,-0x28(%rbp)
movq   $0x0,-0x30(%rbp)
mov    $0x0,%al
call   1030 <getTime@plt>
mov    %rax,-0x30(%rbp)
cmpl   $0x1,-0x4(%rbp)
jle    11d2 <fulltest+0x72>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1060 <atol@plt>
add    -0x30(%rbp),%rax
mov    %eax,%edi
lea    -0x20(%rbp),%rsi
call   1070 <toBase62@plt>
lea    -0x20(%rbp),%rdi
call   1080 <fromBase62@plt>
mov    %rax,-0x28(%rbp)
jmp    11ed <fulltest+0x8d>
lea    -0x20(%rbp),%rsi
mov    $0x3e2242d8,%edi
call   1070 <toBase62@plt>
lea    -0x20(%rbp),%rdi
call   1080 <fromBase62@plt>
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
mov    -0x30(%rbp),%rdx
lea    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
lea    0xdf8(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fulltest>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%r14
mov    %edi,%ebp
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <getTime@plt>
mov    %rax,%rbx
mov    $0x3e2242d8,%edi
cmp    $0x2,%ebp
jl     1186 <fulltest+0x36>
mov    0x8(%r14),%rdi
call   1050 <atol@plt>
mov    %rax,%rdi
add    %ebx,%edi
mov    %rsp,%rbp
mov    %rbp,%rsi
call   1060 <toBase62@plt>
mov    %rbp,%rdi
call   1070 <fromBase62@plt>
mov    0x8(%r14),%rsi
lea    0xe5c(%rip),%rdi
mov    %rbx,%rdx
mov    %rbp,%rcx
mov    %rax,%r8
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [48 x i8] c"Input:[%s] Time:[%ld] Base62:[%s] Base10:[%ld]\0A\00"
define i32 @fulltest(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca [16 x i8]
%6 = alloca i64
%7 = alloca i64
store i32 %0, i32* %3
store i8** %1, i8*** %4
%8 = bitcast [16 x i8]* %5 to i8*
store i64 0, i64* %6
store i64 0, i64* %7
%9 = call i64 (...) @getTime()
store i64 %9, i64* %7
%10 = load i32, i32* %3
%11 = icmp sgt i32 %10, 1
br i1 %11, label %12, label %24
12: ; preds = %2
%13 = load i8**, i8*** %4
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = call i64 @atol(i8* %15)
%17 = load i64, i64* %7
%18 = add nsw i64 %16, %17
%19 = trunc i64 %18 to i32
%20 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 0
%21 = call i32 @toBase62(i32 %19, i8* %20)
%22 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 0
%23 = call i64 @fromBase62(i8* %22)
store i64 %23, i64* %6
br label %29
24: ; preds = %2
%25 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 0
%26 = call i32 @toBase62(i32 1042432728, i8* %25)
%27 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 0
%28 = call i64 @fromBase62(i8* %27)
store i64 %28, i64* %6
br label %29
29: ; preds = %24, %12
%30 = load i8**, i8*** %4
%31 = getelementptr inbounds i8*, i8** %30, i64 1
%32 = load i8*, i8** %31
%33 = load i64, i64* %7
%34 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 0
%35 = load i64, i64* %6
%36 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i8* %32, i64 %33, i8* %34, i64 %35)
ret i32 0
}

LLVM IR (-O2):
@.str = [48 x i8] c"Input:[%s] Time:[%ld] Base62:[%s] Base10:[%ld]\0A\00"
define i32 @fulltest(i32 %0, i8** nocapture %1) {
%3 = alloca [16 x i8]
%4 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%5 = tail call i64 (...) @getTime()
%6 = icmp sgt i32 %0, 1
br i1 %6, label %7, label %13
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i64 @atol(i8* %9)
%11 = add nsw i64 %10, %5
%12 = trunc i64 %11 to i32
br label %13
13: ; preds = %2, %7
%14 = phi i32 [ %12, %7 ], [ 1042432728, %2 ]
%15 = call i32 @toBase62(i32 %14, i8* %4)
%16 = call i64 @fromBase62(i8* %4)
%17 = getelementptr inbounds i8*, i8** %1, i64 1
%18 = load i8*, i8** %17
%19 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i8* %18, i64 %5, i8* %4, i64 %16)
ret i32 0
}