#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 *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
long fromBase62(char *);
long getTime();
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ toBase62(long, char *);
int shorturl_plus_localtime(int argc, const char *argv[]) {
  char szBase62[16] = {
      0x00,
  };
  long dec = 0;
  long timeInput = 0;
  timeInput = getTime();
  toBase62((long)atol(argv[1]) + timeInput, szBase62);
  dec = fromBase62(szBase62);
  fprintf(stdout, "%s", szBase62);
  return 0;
}


x86 assembly (clang, -O0):
<shorturl_plus_localtime>:
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   1040 <memset@plt>
movq   $0x0,-0x28(%rbp)
movq   $0x0,-0x30(%rbp)
mov    $0x0,%al
call   1030 <getTime@plt>
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1060 <atol@plt>
mov    %rax,%rdi
add    -0x30(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1070 <toBase62@plt>
lea    -0x20(%rbp),%rdi
call   1080 <fromBase62@plt>
mov    %rax,-0x28(%rbp)
mov    0x2e15(%rip),%rax
mov    (%rax),%edi
lea    -0x20(%rbp),%rdx
lea    0xe28(%rip),%rsi
call   1050 <fprintf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shorturl_plus_localtime>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%r14
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <getTime@plt>
mov    %rax,%rbx
mov    0x8(%r14),%rdi
call   1050 <atol@plt>
add    %rax,%rbx
mov    %rsp,%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <toBase62@plt>
mov    %r14,%rdi
call   1070 <fromBase62@plt>
mov    0x2e4c(%rip),%rax
mov    (%rax),%edi
lea    0xe63(%rip),%rsi
mov    %r14,%rdx
call   1040 <fprintf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [3 x i8] c"%s\00"
define i32 @shorturl_plus_localtime(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 i8**, i8*** %4
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = call i64 @atol(i8* %12)
%14 = load i64, i64* %7
%15 = add nsw i64 %13, %14
%16 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 0
%17 = call i32 @toBase62(i64 %15, i8* %16)
%18 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 0
%19 = call i64 @fromBase62(i8* %18)
store i64 %19, i64* %6
%20 = load i32, i32* @stdout
%21 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 0
%22 = call i32 @fprintf(i32 %20, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %21)
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [3 x i8] c"%s\00"
define i32 @shorturl_plus_localtime(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 = getelementptr inbounds i8*, i8** %1, i64 1
%7 = load i8*, i8** %6
%8 = tail call i64 @atol(i8* %7)
%9 = add nsw i64 %8, %5
%10 = call i32 @toBase62(i64 %9, i8* %4)
%11 = call i64 @fromBase62(i8* %4)
%12 = load i32, i32* @stdout
%13 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 0
}