#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 int time_t;
typedef int /*<<< orphan*/ st;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strtime(char *, int, int, int);
int main(int argc, char **argv) {
  char st[32];
  time_t t;
  strtime(st, sizeof(st), 1, 0);
  printf("%s\n", st);
  strtime(st, sizeof(st), 2, 0);
  printf("%s\n", st);
  strtime(st, sizeof(st), 3, 0);
  printf("%s\n", st);
  t = 1376129111;
  strtime(st, sizeof(st), 1, t);
  printf("%s\n", st);
  strtime(st, sizeof(st), 2, t);
  printf("%s\n", st);
  strtime(st, sizeof(st), 3, t);
  printf("%s\n", st);
  strtime(st, sizeof(st), 1, -1);
  printf("[%s]\n", st);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x30(%rbp),%rdi
mov    $0x20,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1040 <strtime@plt>
lea    -0x30(%rbp),%rsi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
lea    -0x30(%rbp),%rdi
mov    $0x20,%esi
mov    $0x2,%edx
xor    %ecx,%ecx
call   1040 <strtime@plt>
lea    -0x30(%rbp),%rsi
lea    0xe85(%rip),%rdi
call   1030 <printf@plt>
lea    -0x30(%rbp),%rdi
mov    $0x20,%esi
mov    $0x3,%edx
xor    %ecx,%ecx
call   1040 <strtime@plt>
lea    -0x30(%rbp),%rsi
lea    0xe60(%rip),%rdi
call   1030 <printf@plt>
movl   $0x52061057,-0x34(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x34(%rbp),%ecx
mov    $0x20,%esi
mov    $0x1,%edx
call   1040 <strtime@plt>
lea    -0x30(%rbp),%rsi
lea    0xe33(%rip),%rdi
call   1030 <printf@plt>
lea    -0x30(%rbp),%rdi
mov    -0x34(%rbp),%ecx
mov    $0x20,%esi
mov    $0x2,%edx
call   1040 <strtime@plt>
lea    -0x30(%rbp),%rsi
lea    0xe0d(%rip),%rdi
call   1030 <printf@plt>
lea    -0x30(%rbp),%rdi
mov    -0x34(%rbp),%ecx
mov    $0x20,%esi
mov    $0x3,%edx
call   1040 <strtime@plt>
lea    -0x30(%rbp),%rsi
lea    0xde7(%rip),%rdi
call   1030 <printf@plt>
lea    -0x30(%rbp),%rdi
mov    $0x20,%esi
mov    $0x1,%edx
mov    $0xffffffff,%ecx
call   1040 <strtime@plt>
lea    -0x30(%rbp),%rsi
lea    0xdc3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x20,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1040 <strtime@plt>
lea    0xebb(%rip),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x20,%esi
mov    $0x2,%edx
xor    %ecx,%ecx
call   1040 <strtime@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x20,%esi
mov    $0x3,%edx
xor    %ecx,%ecx
call   1040 <strtime@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x20,%esi
mov    $0x1,%edx
mov    $0x52061057,%ecx
call   1040 <strtime@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x20,%esi
mov    $0x2,%edx
mov    $0x52061057,%ecx
call   1040 <strtime@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x20,%esi
mov    $0x3,%edx
mov    $0x52061057,%ecx
call   1040 <strtime@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x20,%esi
mov    $0x1,%edx
mov    $0xffffffff,%ecx
call   1040 <strtime@plt>
lea    0xdf2(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [6 x i8] c"[%s]\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [32 x i8]
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%9 = call i32 @strtime(i8* %8, i32 32, i32 1, i32 0)
%10 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%13 = call i32 @strtime(i8* %12, i32 32, i32 2, i32 0)
%14 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%15 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %14)
%16 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%17 = call i32 @strtime(i8* %16, i32 32, i32 3, i32 0)
%18 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%19 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %18)
store i32 1376129111, i32* %7
%20 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%21 = load i32, i32* %7
%22 = call i32 @strtime(i8* %20, i32 32, i32 1, i32 %21)
%23 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%24 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %23)
%25 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%26 = load i32, i32* %7
%27 = call i32 @strtime(i8* %25, i32 32, i32 2, i32 %26)
%28 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%29 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %28)
%30 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%31 = load i32, i32* %7
%32 = call i32 @strtime(i8* %30, i32 32, i32 3, i32 %31)
%33 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%34 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %33)
%35 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%36 = call i32 @strtime(i8* %35, i32 32, i32 1, i32 -1)
%37 = getelementptr inbounds [32 x i8], [32 x i8]* %6, i64 0, i64 0
%38 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %37)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [6 x i8] c"[%s]\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [32 x i8]
%4 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%5 = call i32 @strtime(i8* %4, i32 32, i32 1, i32 0)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%7 = call i32 @strtime(i8* %4, i32 32, i32 2, i32 0)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%9 = call i32 @strtime(i8* %4, i32 32, i32 3, i32 0)
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%11 = call i32 @strtime(i8* %4, i32 32, i32 1, i32 1376129111)
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%13 = call i32 @strtime(i8* %4, i32 32, i32 2, i32 1376129111)
%14 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%15 = call i32 @strtime(i8* %4, i32 32, i32 3, i32 1376129111)
%16 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%17 = call i32 @strtime(i8* %4, i32 32, i32 1, i32 -1)
%18 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 0
}