cnvtdate(flag) int flag;
{
  static char datbuf[128];
  extern int daylight;
  int tvec[2];
  long int seconds;
  register int *i;
  register char *p, *t;
  time(tvec);
  i = localtime(tvec);
  t = ctime(tvec);
  p = datbuf;
  switch (flag) {
  case 1:
    for (itoa(i[5], p); *p; p++)
      ;
    *p++ = '.';
    for (itoa(i[7], p); *p; p++)
      ;
    *p++ = '.';
    seconds = i[2];
    seconds = i[0] + (i[1] * 60) + (seconds * 3600);
    litoa(seconds, p);
    break;
  case 3:
  default:
    *p++ = t[0];
    *p++ = t[1];
    *p++ = t[2];
    *p++ = ',';
    *p++ = ' ';
    *p++ = t[8];
    *p++ = t[9];
    *p++ = ' ';
    *p++ = t[4];
    *p++ = t[5];
    *p++ = t[6];
    *p++ = ' ';
    *p++ = t[22];
    *p++ = t[23];
    *p++ = ' ';
    *p++ = t[11];
    *p++ = t[12];
    *p++ = ':';
    *p++ = t[14];
    *p++ = t[15];
    *p++ = '-';
    *p++ = 'P';
    *p++ = (i[8]) ? 'D' : 'S';
    *p++ = 'T';
    *p++ = '\000';
  }
  free(i);
  free(t);
  return (datbuf);
}


x86 assembly (clang, -O0):
<cnvtdate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
mov    %al,-0x35(%rbp)
lea    -0xc(%rbp),%rdi
mov    %rdi,-0x40(%rbp)
call   1070 <time@plt>
mov    -0x40(%rbp),%rdi
mov    -0x35(%rbp),%al
call   1040 <localtime@plt>
mov    -0x40(%rbp),%rdi
mov    %eax,%ecx
mov    -0x35(%rbp),%al
movslq %ecx,%rcx
mov    %rcx,-0x20(%rbp)
call   1060 <ctime@plt>
cltq
mov    %rax,-0x30(%rbp)
lea    0x2eb5(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x34(%rbp)
sub    $0x1,%eax
je     11d4 <cnvtdate+0x74>
jmp    11c3 <cnvtdate+0x63>
mov    -0x34(%rbp),%eax
sub    $0x3,%eax
je     12a3 <cnvtdate+0x143>
jmp    12a8 <cnvtdate+0x148>
mov    -0x20(%rbp),%rax
mov    0x14(%rax),%edi
mov    -0x28(%rbp),%rsi
mov    $0x0,%al
call   1080 <itoa@plt>
mov    -0x28(%rbp),%rax
cmpb   $0x0,(%rax)
je     1209 <cnvtdate+0xa9>
jmp    11f8 <cnvtdate+0x98>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    11e6 <cnvtdate+0x86>
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
movb   $0x2e,(%rax)
mov    -0x20(%rbp),%rax
mov    0x1c(%rax),%edi
mov    -0x28(%rbp),%rsi
mov    $0x0,%al
call   1080 <itoa@plt>
mov    -0x28(%rbp),%rax
cmpb   $0x0,(%rax)
je     1250 <cnvtdate+0xf0>
jmp    123f <cnvtdate+0xdf>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    122d <cnvtdate+0xcd>
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
movb   $0x2e,(%rax)
mov    -0x20(%rbp),%rax
movslq 0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    -0x20(%rbp),%rcx
imul   $0x3c,0x4(%rcx),%ecx
add    %ecx,%eax
cltq
imul   $0xe10,-0x18(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    $0x0,%al
call   1050 <litoa@plt>
jmp    14d5 <cnvtdate+0x375>
jmp    12a8 <cnvtdate+0x148>
mov    -0x30(%rbp),%rax
mov    (%rax),%cl
mov    -0x28(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x28(%rbp)
mov    %cl,(%rax)
mov    -0x30(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x28(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x28(%rbp)
mov    %cl,(%rax)
mov    -0x30(%rbp),%rax
mov    0x2(%rax),%cl
mov    -0x28(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x28(%rbp)
mov    %cl,(%rax)
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
movb   $0x2c,(%rax)
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
movb   $0x20,(%rax)
mov    -0x30(%rbp),%rax
mov    0x8(%rax),%cl
mov    -0x28(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x28(%rbp)
mov    %cl,(%rax)
mov    -0x30(%rbp),%rax
mov    0x9(%rax),%cl
mov    -0x28(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x28(%rbp)
mov    %cl,(%rax)
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
movb   $0x20,(%rax)
mov    -0x30(%rbp),%rax
mov    0x4(%rax),%cl
mov    -0x28(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x28(%rbp)
mov    %cl,(%rax)
mov    -0x30(%rbp),%rax
mov    0x5(%rax),%cl
mov    -0x28(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x28(%rbp)
mov    %cl,(%rax)
mov    -0x30(%rbp),%rax
mov    0x6(%rax),%cl
mov    -0x28(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x28(%rbp)
mov    %cl,(%rax)
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
movb   $0x20,(%rax)
mov    -0x30(%rbp),%rax
mov    0x16(%rax),%cl
mov    -0x28(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x28(%rbp)
mov    %cl,(%rax)
mov    -0x30(%rbp),%rax
mov    0x17(%rax),%cl
mov    -0x28(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x28(%rbp)
mov    %cl,(%rax)
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
movb   $0x20,(%rax)
mov    -0x30(%rbp),%rax
mov    0xb(%rax),%cl
mov    -0x28(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x28(%rbp)
mov    %cl,(%rax)
mov    -0x30(%rbp),%rax
mov    0xc(%rax),%cl
mov    -0x28(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x28(%rbp)
mov    %cl,(%rax)
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
movb   $0x3a,(%rax)
mov    -0x30(%rbp),%rax
mov    0xe(%rax),%cl
mov    -0x28(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x28(%rbp)
mov    %cl,(%rax)
mov    -0x30(%rbp),%rax
mov    0xf(%rax),%cl
mov    -0x28(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x28(%rbp)
mov    %cl,(%rax)
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
movb   $0x2d,(%rax)
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
movb   $0x50,(%rax)
mov    -0x20(%rbp),%rax
mov    0x20(%rax),%edx
mov    $0x53,%eax
mov    $0x44,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
mov    %al,%cl
mov    -0x28(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x28(%rbp)
mov    %cl,(%rax)
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
movb   $0x54,(%rax)
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
movb   $0x0,(%rax)
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
lea    0x2b72(%rip),%rax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cnvtdate>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebp
mov    %rsp,%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1070 <time@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <localtime@plt>
movslq %eax,%r14
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <ctime@plt>
movslq %eax,%r15
cmp    $0x1,%ebp
jne    1208 <cnvtdate+0xa8>
mov    0x14(%r14),%edi
lea    0x2ec0(%rip),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1080 <itoa@plt>
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,(%rbx)
lea    0x1(%rbx),%rbx
jne    11b0 <cnvtdate+0x50>
movb   $0x2e,-0x1(%rbx)
mov    0x1c(%r14),%edi
mov    %rbx,%rsi
xor    %eax,%eax
call   1080 <itoa@plt>
nopl   0x0(%rax,%rax,1)
cmpb   $0x0,(%rbx)
lea    0x1(%rbx),%rbx
jne    11d0 <cnvtdate+0x70>
movb   $0x2e,-0x1(%rbx)
movslq 0x8(%r14),%rax
movslq (%r14),%rcx
movslq 0x4(%r14),%rdx
imul   $0x3c,%rdx,%rdx
add    %rcx,%rdx
imul   $0xe10,%rax,%rdi
add    %rdx,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <litoa@plt>
jmp    12e2 <cnvtdate+0x182>
mov    (%r15),%al
mov    %al,0x2e4f(%rip)
mov    0x1(%r15),%al
mov    %al,0x2e46(%rip)
mov    0x2(%r15),%al
mov    %al,0x2e3d(%rip)
movw   $0x202c,0x2e35(%rip)
2c 20
mov    0x8(%r15),%al
mov    %al,0x2e2d(%rip)
mov    0x9(%r15),%al
mov    %al,0x2e24(%rip)
movb   $0x20,0x2e1e(%rip)
mov    0x4(%r15),%al
mov    %al,0x2e15(%rip)
mov    0x5(%r15),%al
mov    %al,0x2e0c(%rip)
mov    0x6(%r15),%al
mov    %al,0x2e03(%rip)
movb   $0x20,0x2dfd(%rip)
mov    0x16(%r15),%al
mov    %al,0x2df4(%rip)
mov    0x17(%r15),%al
mov    %al,0x2deb(%rip)
movb   $0x20,0x2de5(%rip)
mov    0xb(%r15),%al
mov    %al,0x2ddc(%rip)
mov    0xc(%r15),%al
mov    %al,0x2dd3(%rip)
movb   $0x3a,0x2dcd(%rip)
mov    0xe(%r15),%al
mov    %al,0x2dc4(%rip)
mov    0xf(%r15),%al
mov    %al,0x2dbb(%rip)
movw   $0x502d,0x2db3(%rip)
2d 50
cmpl   $0x0,0x20(%r14)
mov    $0x53,%eax
mov    $0x44,%ecx
cmove  %eax,%ecx
mov    %cl,0x2d9d(%rip)
movw   $0x54,0x2d95(%rip)
mov    %r14,%rdi
call   1030 <free@plt>
mov    %r15,%rdi
call   1030 <free@plt>
lea    0x2d67(%rip),%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@cnvtdate.datbuf = internal global [128 x i8] zeroinitializer
define i32 @cnvtdate(i32 %0) {
%2 = alloca i32
%3 = alloca [2 x i32]
%4 = alloca i64
%5 = alloca i32*
%6 = alloca i8*
%7 = alloca i8*
store i32 %0, i32* %2
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
%9 = call i32 (i32*, ...) bitcast (i32 (...)* @time to i32 (i32*, ...)*)(i32* %8)
%10 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
%11 = call i32 (i32*, ...) bitcast (i32 (...)* @localtime to i32 (i32*, ...)*)(i32* %10)
%12 = sext i32 %11 to i64
%13 = inttoptr i64 %12 to i32*
store i32* %13, i32** %5
%14 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
%15 = call i32 (i32*, ...) bitcast (i32 (...)* @ctime to i32 (i32*, ...)*)(i32* %14)
%16 = sext i32 %15 to i64
%17 = inttoptr i64 %16 to i8*
store i8* %17, i8** %7
store i8* getelementptr inbounds ([128 x i8], [128 x i8]* @cnvtdate.datbuf, i64 0, i64 0), i8** %6
%18 = load i32, i32* %2
switch i32 %18, label %72 [
i32 1, label %19
i32 3, label %71
]
19: ; preds = %1
%20 = load i32*, i32** %5
%21 = getelementptr inbounds i32, i32* %20, i64 5
%22 = load i32, i32* %21
%23 = load i8*, i8** %6
%24 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @itoa to i32 (i32, i8*, ...)*)(i32 %22, i8* %23)
br label %25
25: ; preds = %30, %19
%26 = load i8*, i8** %6
%27 = load i8, i8* %26
%28 = icmp ne i8 %27, 0
br i1 %28, label %29, label %33
29: ; preds = %25
br label %30
30: ; preds = %29
%31 = load i8*, i8** %6
%32 = getelementptr inbounds i8, i8* %31, i32 1
store i8* %32, i8** %6
br label %25
33: ; preds = %25
%34 = load i8*, i8** %6
%35 = getelementptr inbounds i8, i8* %34, i32 1
store i8* %35, i8** %6
store i8 46, i8* %34
%36 = load i32*, i32** %5
%37 = getelementptr inbounds i32, i32* %36, i64 7
%38 = load i32, i32* %37
%39 = load i8*, i8** %6
%40 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @itoa to i32 (i32, i8*, ...)*)(i32 %38, i8* %39)
br label %41
41: ; preds = %46, %33
%42 = load i8*, i8** %6
%43 = load i8, i8* %42
%44 = icmp ne i8 %43, 0
br i1 %44, label %45, label %49
45: ; preds = %41
br label %46
46: ; preds = %45
%47 = load i8*, i8** %6
%48 = getelementptr inbounds i8, i8* %47, i32 1
store i8* %48, i8** %6
br label %41
49: ; preds = %41
%50 = load i8*, i8** %6
%51 = getelementptr inbounds i8, i8* %50, i32 1
store i8* %51, i8** %6
store i8 46, i8* %50
%52 = load i32*, i32** %5
%53 = getelementptr inbounds i32, i32* %52, i64 2
%54 = load i32, i32* %53
%55 = sext i32 %54 to i64
store i64 %55, i64* %4
%56 = load i32*, i32** %5
%57 = getelementptr inbounds i32, i32* %56, i64 0
%58 = load i32, i32* %57
%59 = load i32*, i32** %5
%60 = getelementptr inbounds i32, i32* %59, i64 1
%61 = load i32, i32* %60
%62 = mul nsw i32 %61, 60
%63 = add nsw i32 %58, %62
%64 = sext i32 %63 to i64
%65 = load i64, i64* %4
%66 = mul nsw i64 %65, 3600
%67 = add nsw i64 %64, %66
store i64 %67, i64* %4
%68 = load i64, i64* %4
%69 = load i8*, i8** %6
%70 = call i32 (i64, i8*, ...) bitcast (i32 (...)* @litoa to i32 (i64, i8*, ...)*)(i64 %68, i8* %69)
br label %172
71: ; preds = %1
br label %72
72: ; preds = %1, %71
%73 = load i8*, i8** %7
%74 = getelementptr inbounds i8, i8* %73, i64 0
%75 = load i8, i8* %74
%76 = load i8*, i8** %6
%77 = getelementptr inbounds i8, i8* %76, i32 1
store i8* %77, i8** %6
store i8 %75, i8* %76
%78 = load i8*, i8** %7
%79 = getelementptr inbounds i8, i8* %78, i64 1
%80 = load i8, i8* %79
%81 = load i8*, i8** %6
%82 = getelementptr inbounds i8, i8* %81, i32 1
store i8* %82, i8** %6
store i8 %80, i8* %81
%83 = load i8*, i8** %7
%84 = getelementptr inbounds i8, i8* %83, i64 2
%85 = load i8, i8* %84
%86 = load i8*, i8** %6
%87 = getelementptr inbounds i8, i8* %86, i32 1
store i8* %87, i8** %6
store i8 %85, i8* %86
%88 = load i8*, i8** %6
%89 = getelementptr inbounds i8, i8* %88, i32 1
store i8* %89, i8** %6
store i8 44, i8* %88
%90 = load i8*, i8** %6
%91 = getelementptr inbounds i8, i8* %90, i32 1
store i8* %91, i8** %6
store i8 32, i8* %90
%92 = load i8*, i8** %7
%93 = getelementptr inbounds i8, i8* %92, i64 8
%94 = load i8, i8* %93
%95 = load i8*, i8** %6
%96 = getelementptr inbounds i8, i8* %95, i32 1
store i8* %96, i8** %6
store i8 %94, i8* %95
%97 = load i8*, i8** %7
%98 = getelementptr inbounds i8, i8* %97, i64 9
%99 = load i8, i8* %98
%100 = load i8*, i8** %6
%101 = getelementptr inbounds i8, i8* %100, i32 1
store i8* %101, i8** %6
store i8 %99, i8* %100
%102 = load i8*, i8** %6
%103 = getelementptr inbounds i8, i8* %102, i32 1
store i8* %103, i8** %6
store i8 32, i8* %102
%104 = load i8*, i8** %7
%105 = getelementptr inbounds i8, i8* %104, i64 4
%106 = load i8, i8* %105
%107 = load i8*, i8** %6
%108 = getelementptr inbounds i8, i8* %107, i32 1
store i8* %108, i8** %6
store i8 %106, i8* %107
%109 = load i8*, i8** %7
%110 = getelementptr inbounds i8, i8* %109, i64 5
%111 = load i8, i8* %110
%112 = load i8*, i8** %6
%113 = getelementptr inbounds i8, i8* %112, i32 1
store i8* %113, i8** %6
store i8 %111, i8* %112
%114 = load i8*, i8** %7
%115 = getelementptr inbounds i8, i8* %114, i64 6
%116 = load i8, i8* %115
%117 = load i8*, i8** %6
%118 = getelementptr inbounds i8, i8* %117, i32 1
store i8* %118, i8** %6
store i8 %116, i8* %117
%119 = load i8*, i8** %6
%120 = getelementptr inbounds i8, i8* %119, i32 1
store i8* %120, i8** %6
store i8 32, i8* %119
%121 = load i8*, i8** %7
%122 = getelementptr inbounds i8, i8* %121, i64 22
%123 = load i8, i8* %122
%124 = load i8*, i8** %6
%125 = getelementptr inbounds i8, i8* %124, i32 1
store i8* %125, i8** %6
store i8 %123, i8* %124
%126 = load i8*, i8** %7
%127 = getelementptr inbounds i8, i8* %126, i64 23
%128 = load i8, i8* %127
%129 = load i8*, i8** %6
%130 = getelementptr inbounds i8, i8* %129, i32 1
store i8* %130, i8** %6
store i8 %128, i8* %129
%131 = load i8*, i8** %6
%132 = getelementptr inbounds i8, i8* %131, i32 1
store i8* %132, i8** %6
store i8 32, i8* %131
%133 = load i8*, i8** %7
%134 = getelementptr inbounds i8, i8* %133, i64 11
%135 = load i8, i8* %134
%136 = load i8*, i8** %6
%137 = getelementptr inbounds i8, i8* %136, i32 1
store i8* %137, i8** %6
store i8 %135, i8* %136
%138 = load i8*, i8** %7
%139 = getelementptr inbounds i8, i8* %138, i64 12
%140 = load i8, i8* %139
%141 = load i8*, i8** %6
%142 = getelementptr inbounds i8, i8* %141, i32 1
store i8* %142, i8** %6
store i8 %140, i8* %141
%143 = load i8*, i8** %6
%144 = getelementptr inbounds i8, i8* %143, i32 1
store i8* %144, i8** %6
store i8 58, i8* %143
%145 = load i8*, i8** %7
%146 = getelementptr inbounds i8, i8* %145, i64 14
%147 = load i8, i8* %146
%148 = load i8*, i8** %6
%149 = getelementptr inbounds i8, i8* %148, i32 1
store i8* %149, i8** %6
store i8 %147, i8* %148
%150 = load i8*, i8** %7
%151 = getelementptr inbounds i8, i8* %150, i64 15
%152 = load i8, i8* %151
%153 = load i8*, i8** %6
%154 = getelementptr inbounds i8, i8* %153, i32 1
store i8* %154, i8** %6
store i8 %152, i8* %153
%155 = load i8*, i8** %6
%156 = getelementptr inbounds i8, i8* %155, i32 1
store i8* %156, i8** %6
store i8 45, i8* %155
%157 = load i8*, i8** %6
%158 = getelementptr inbounds i8, i8* %157, i32 1
store i8* %158, i8** %6
store i8 80, i8* %157
%159 = load i32*, i32** %5
%160 = getelementptr inbounds i32, i32* %159, i64 8
%161 = load i32, i32* %160
%162 = icmp ne i32 %161, 0
%163 = zext i1 %162 to i64
%164 = select i1 %162, i32 68, i32 83
%165 = trunc i32 %164 to i8
%166 = load i8*, i8** %6
%167 = getelementptr inbounds i8, i8* %166, i32 1
store i8* %167, i8** %6
store i8 %165, i8* %166
%168 = load i8*, i8** %6
%169 = getelementptr inbounds i8, i8* %168, i32 1
store i8* %169, i8** %6
store i8 84, i8* %168
%170 = load i8*, i8** %6
%171 = getelementptr inbounds i8, i8* %170, i32 1
store i8* %171, i8** %6
store i8 0, i8* %170
br label %172
172: ; preds = %72, %49
%173 = load i32*, i32** %5
%174 = bitcast i32* %173 to i8*
%175 = load i8*, i8** %7
ret i32 ptrtoint ([128 x i8]* @cnvtdate.datbuf to i32)
}

LLVM IR (-O2):
@cnvtdate.datbuf = internal global [128 x i8] zeroinitializer
define i32 @cnvtdate(i32 %0) {
%2 = alloca [2 x i32]
%3 = bitcast [2 x i32]* %2 to i8*
%4 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 0
%5 = call i32 (i32*, ...) bitcast (i32 (...)* @time to i32 (i32*, ...)*)(i32* %4)
%6 = call i32 (i32*, ...) bitcast (i32 (...)* @localtime to i32 (i32*, ...)*)(i32* %4)
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
%9 = call i32 (i32*, ...) bitcast (i32 (...)* @ctime to i32 (i32*, ...)*)(i32* %4)
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i8*
%12 = icmp eq i32 %0, 1
br i1 %12, label %13, label %44
13: ; preds = %1
%14 = getelementptr inbounds i32, i32* %8, i64 5
%15 = load i32, i32* %14
%16 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @itoa to i32 (i32, i8*, ...)*)(i32 %15, i8* getelementptr inbounds ([128 x i8], [128 x i8]* @cnvtdate.datbuf, i64 0, i64 0))
br label %17
17: ; preds = %17, %13
%18 = phi i8* [ getelementptr inbounds ([128 x i8], [128 x i8]* @cnvtdate.datbuf, i64 0, i64 0), %13 ], [ %21, %17 ]
%19 = load i8, i8* %18
%20 = icmp eq i8 %19, 0
%21 = getelementptr inbounds i8, i8* %18, i64 1
br i1 %20, label %22, label %17
22: ; preds = %17
store i8 46, i8* %18
%23 = getelementptr inbounds i32, i32* %8, i64 7
%24 = load i32, i32* %23
%25 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @itoa to i32 (i32, i8*, ...)*)(i32 %24, i8* %21)
br label %26
26: ; preds = %26, %22
%27 = phi i8* [ %21, %22 ], [ %30, %26 ]
%28 = load i8, i8* %27
%29 = icmp eq i8 %28, 0
%30 = getelementptr inbounds i8, i8* %27, i64 1
br i1 %29, label %31, label %26
31: ; preds = %26
store i8 46, i8* %27
%32 = getelementptr inbounds i32, i32* %8, i64 2
%33 = load i32, i32* %32
%34 = sext i32 %33 to i64
%35 = load i32, i32* %8
%36 = getelementptr inbounds i32, i32* %8, i64 1
%37 = load i32, i32* %36
%38 = mul nsw i32 %37, 60
%39 = add nsw i32 %38, %35
%40 = sext i32 %39 to i64
%41 = mul nsw i64 %34, 3600
%42 = add nsw i64 %41, %40
%43 = call i32 (i64, i8*, ...) bitcast (i32 (...)* @litoa to i32 (i64, i8*, ...)*)(i64 %42, i8* %30)
br label %76
44: ; preds = %1
%45 = load i8, i8* %11
store i8 %45, i8* getelementptr inbounds ([128 x i8], [128 x i8]* @cnvtdate.datbuf, i64 0, i64 0)
%46 = getelementptr inbounds i8, i8* %11, i64 1
%47 = load i8, i8* %46
store i8 %47, i8* getelementptr inbounds ([128 x i8], [128 x i8]* @cnvtdate.datbuf, i64 0, i64 1)
%48 = getelementptr inbounds i8, i8* %11, i64 2
%49 = load i8, i8* %48
store i8 %49, i8* getelementptr inbounds ([128 x i8], [128 x i8]* @cnvtdate.datbuf, i64 0, i64 2)
store i8 44, i8* getelementptr inbounds ([128 x i8], [128 x i8]* @cnvtdate.datbuf, i64 0, i64 3)
store i8 32, i8* getelementptr inbounds ([128 x i8], [128 x i8]* @cnvtdate.datbuf, i64 0, i64 4)
%50 = getelementptr inbounds i8, i8* %11, i64 8
%51 = load i8, i8* %50
store i8 %51, i8* getelementptr inbounds ([128 x i8], [128 x i8]* @cnvtdate.datbuf, i64 0, i64 5)
%52 = getelementptr inbounds i8, i8* %11, i64 9
%53 = load i8, i8* %52
store i8 %53, i8* getelementptr inbounds ([128 x i8], [128 x i8]* @cnvtdate.datbuf, i64 0, i64 6)
store i8 32, i8* getelementptr inbounds ([128 x i8], [128 x i8]* @cnvtdate.datbuf, i64 0, i64 7)
%54 = getelementptr inbounds i8, i8* %11, i64 4
%55 = load i8, i8* %54
store i8 %55, i8* getelementptr inbounds ([128 x i8], [128 x i8]* @cnvtdate.datbuf, i64 0, i64 8)
%56 = getelementptr inbounds i8, i8* %11, i64 5
%57 = load i8, i8* %56
store i8 %57, i8* getelementptr inbounds ([128 x i8], [128 x i8]* @cnvtdate.datbuf, i64 0, i64 9)
%58 = getelementptr inbounds i8, i8* %11, i64 6
%59 = load i8, i8* %58
store i8 %59, i8* getelementptr inbounds ([128 x i8], [128 x i8]* @cnvtdate.datbuf, i64 0, i64 10)
store i8 32, i8* getelementptr inbounds ([128 x i8], [128 x i8]* @cnvtdate.datbuf, i64 0, i64 11)
%60 = getelementptr inbounds i8, i8* %11, i64 22
%61 = load i8, i8* %60
store i8 %61, i8* getelementptr inbounds ([128 x i8], [128 x i8]* @cnvtdate.datbuf, i64 0, i64 12)
%62 = getelementptr inbounds i8, i8* %11, i64 23
%63 = load i8, i8* %62
store i8 %63, i8* getelementptr inbounds ([128 x i8], [128 x i8]* @cnvtdate.datbuf, i64 0, i64 13)
store i8 32, i8* getelementptr inbounds ([128 x i8], [128 x i8]* @cnvtdate.datbuf, i64 0, i64 14)
%64 = getelementptr inbounds i8, i8* %11, i64 11
%65 = load i8, i8* %64
store i8 %65, i8* getelementptr inbounds ([128 x i8], [128 x i8]* @cnvtdate.datbuf, i64 0, i64 15)
%66 = getelementptr inbounds i8, i8* %11, i64 12
%67 = load i8, i8* %66
store i8 %67, i8* getelementptr inbounds ([128 x i8], [128 x i8]* @cnvtdate.datbuf, i64 0, i64 16)
store i8 58, i8* getelementptr inbounds ([128 x i8], [128 x i8]* @cnvtdate.datbuf, i64 0, i64 17)
%68 = getelementptr inbounds i8, i8* %11, i64 14
%69 = load i8, i8* %68
store i8 %69, i8* getelementptr inbounds ([128 x i8], [128 x i8]* @cnvtdate.datbuf, i64 0, i64 18)
%70 = getelementptr inbounds i8, i8* %11, i64 15
%71 = load i8, i8* %70
store i8 %71, i8* getelementptr inbounds ([128 x i8], [128 x i8]* @cnvtdate.datbuf, i64 0, i64 19)
store i8 45, i8* getelementptr inbounds ([128 x i8], [128 x i8]* @cnvtdate.datbuf, i64 0, i64 20)
store i8 80, i8* getelementptr inbounds ([128 x i8], [128 x i8]* @cnvtdate.datbuf, i64 0, i64 21)
%72 = getelementptr inbounds i32, i32* %8, i64 8
%73 = load i32, i32* %72
%74 = icmp eq i32 %73, 0
%75 = select i1 %74, i8 83, i8 68
store i8 %75, i8* getelementptr inbounds ([128 x i8], [128 x i8]* @cnvtdate.datbuf, i64 0, i64 22)
store i8 84, i8* getelementptr inbounds ([128 x i8], [128 x i8]* @cnvtdate.datbuf, i64 0, i64 23)
store i8 0, i8* getelementptr inbounds ([128 x i8], [128 x i8]* @cnvtdate.datbuf, i64 0, i64 24)
br label %76
76: ; preds = %44, %31
%77 = inttoptr i64 %7 to i8*
ret i32 ptrtoint ([128 x i8]* @cnvtdate.datbuf to i32)
}