#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;
struct tm {
  int /*<<< orphan*/ tm_min;
};

/* Variables and functions */
int /*<<< orphan*/ atoi(char *);
char *ctime(scalar_t__ *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, ...);
struct tm *localtime(scalar_t__ *);
scalar_t__ mktime(struct tm *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
scalar_t__ time(scalar_t__ *);
scalar_t__ timezone;
char **tzname;
int main(int argc, char *argv[]) {
  time_t current_time, new_time;
  struct tm *bd_time;
  if (argc != 2) {
    (void)fprintf(stderr, "Usage: %s <modifier>\n", argv[0]);
    exit(1);
  }
  current_time = time((time_t *)0);
  bd_time = localtime(&current_time);
  bd_time->tm_min = atoi(argv[1]);
  new_time = mktime(bd_time) + timezone;
  (void)fprintf(stdout, "TIME: %.24s %s %s\n", ctime(&new_time), tzname[0],
                tzname[1]);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     11b8 <main+0x48>
mov    0x2e49(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe59(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1060 <time@plt>
mov    %rax,-0x18(%rbp)
lea    -0x18(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1080 <atoi@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x28(%rbp),%rdi
call   1070 <mktime@plt>
mov    0x2dd9(%rip),%rcx
add    (%rcx),%rax
mov    %rax,-0x20(%rbp)
mov    0x2dd3(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x2c(%rbp)
lea    -0x20(%rbp),%rdi
call   1040 <ctime@plt>
mov    -0x2c(%rbp),%edi
mov    %rax,%rdx
mov    0x2da8(%rip),%rax
mov    (%rax),%rax
mov    (%rax),%rcx
mov    0x2d9b(%rip),%rax
mov    (%rax),%rax
mov    0x8(%rax),%r8
lea    0xddb(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
xor    %edi,%edi
call   1090 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%r14
cmp    $0x2,%edi
jne    11f8 <main+0x88>
xor    %edi,%edi
call   1060 <time@plt>
mov    %rax,0x10(%rsp)
lea    0x10(%rsp),%rdi
call   1030 <localtime@plt>
mov    %rax,%rbx
mov    0x8(%r14),%rdi
call   1080 <atoi@plt>
mov    %eax,(%rbx)
mov    %rbx,%rdi
call   1070 <mktime@plt>
mov    0x2e1e(%rip),%rcx
add    (%rcx),%rax
mov    %rax,0x8(%rsp)
mov    0x2e17(%rip),%rax
mov    (%rax),%ebx
lea    0x8(%rsp),%rdi
call   1040 <ctime@plt>
mov    0x2df4(%rip),%rcx
mov    (%rcx),%rdx
mov    (%rdx),%rcx
mov    0x8(%rdx),%r8
lea    0xe31(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
xor    %edi,%edi
call   1090 <exit@plt>
mov    0x2de1(%rip),%rax
mov    (%rax),%edi
mov    (%r14),%rdx
lea    0xdf5(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1090 <exit@plt>

LLVM IR (-O0):
%struct.tm = type { i32 }
@stderr = global i32 0
@.str = [22 x i8] c"Usage: %s <modifier>\0A\00"
@timezone = global i64 0
@stdout = global i32 0
@.str.1 = [19 x i8] c"TIME: %.24s %s %s\0A\00"
@tzname = global i8** null
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
%7 = alloca i64
%8 = alloca %struct.tm*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = load i32, i32* %4
%10 = icmp ne i32 %9, 2
br i1 %10, label %11, label %18
11: ; preds = %2
%12 = load i32, i32* @stderr
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 0
%15 = load i8*, i8** %14
%16 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %12, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %15)
%17 = call i32 @exit(i32 1)
unreachable
18: ; preds = %2
%19 = call i64 @time(i64* null)
store i64 %19, i64* %6
%20 = call %struct.tm* @localtime(i64* %6)
store %struct.tm* %20, %struct.tm** %8
%21 = load i8**, i8*** %5
%22 = getelementptr inbounds i8*, i8** %21, i64 1
%23 = load i8*, i8** %22
%24 = call i32 @atoi(i8* %23)
%25 = load %struct.tm*, %struct.tm** %8
%26 = getelementptr inbounds %struct.tm, %struct.tm* %25, i32 0, i32 0
store i32 %24, i32* %26
%27 = load %struct.tm*, %struct.tm** %8
%28 = call i64 @mktime(%struct.tm* %27)
%29 = load i64, i64* @timezone
%30 = add nsw i64 %28, %29
store i64 %30, i64* %7
%31 = load i32, i32* @stdout
%32 = call i8* @ctime(i64* %7)
%33 = load i8**, i8*** @tzname
%34 = getelementptr inbounds i8*, i8** %33, i64 0
%35 = load i8*, i8** %34
%36 = load i8**, i8*** @tzname
%37 = getelementptr inbounds i8*, i8** %36, i64 1
%38 = load i8*, i8** %37
%39 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %31, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %32, i8* %35, i8* %38)
%40 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@stderr = global i32 0
@.str = [22 x i8] c"Usage: %s <modifier>\0A\00"
@timezone = global i64 0
@stdout = global i32 0
@.str.1 = [19 x i8] c"TIME: %.24s %s %s\0A\00"
@tzname = global i8** null
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i64
%4 = alloca i64
%5 = bitcast i64* %3 to i8*
%6 = bitcast i64* %4 to i8*
%7 = icmp eq i32 %0, 2
br i1 %7, label %13, label %8
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %1
%11 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = tail call i32 @exit(i32 1)
unreachable
13: ; preds = %2
%14 = tail call i64 @time(i64* null)
store i64 %14, i64* %3
%15 = call %struct.tm* @localtime(i64* %3)
%16 = getelementptr inbounds i8*, i8** %1, i64 1
%17 = load i8*, i8** %16
%18 = call i32 @atoi(i8* %17)
%19 = getelementptr inbounds %struct.tm, %struct.tm* %15, i64 0, i32 0
store i32 %18, i32* %19
%20 = call i64 @mktime(%struct.tm* %15)
%21 = load i64, i64* @timezone
%22 = add nsw i64 %21, %20
store i64 %22, i64* %4
%23 = load i32, i32* @stdout
%24 = call i8* @ctime(i64* %4)
%25 = load i8**, i8*** @tzname
%26 = load i8*, i8** %25
%27 = getelementptr inbounds i8*, i8** %25, i64 1
%28 = load i8*, i8** %27
%29 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %24, i8* %26, i8* %28)
%30 = call i32 @exit(i32 0)
unreachable
}