#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 uint8_t;
struct tm {
  int tm_year;
  int tm_sec;
  int tm_min;
  int tm_wday;
  int tm_mday;
  int tm_mon;
  int tm_hour;
};

/* Variables and functions */
void time_set(uint8_t *regs, struct tm *tm) {
  int year = (tm->tm_year + 1900);
  if (regs[11] & 0x04) {
    regs[0] = tm->tm_sec;
    regs[2] = tm->tm_min;
    regs[6] = (tm->tm_wday + 1);
    regs[7] = tm->tm_mday;
    regs[8] = (tm->tm_mon + 1);
    regs[9] = (year % 100);
    regs[0x32] = (year / 100);
    if (regs[11] & 0x02) {
      regs[4] = tm->tm_hour;
    } else {
      regs[4] = (tm->tm_hour % 12) ? (tm->tm_hour % 12) : 12;
      if (tm->tm_hour > 11)
        regs[4] |= 0x80;
    }
  } else {
    regs[0] = (((tm->tm_sec) % 10) | (((tm->tm_sec) / 10) << 4));
    regs[2] = (((tm->tm_min) % 10) | (((tm->tm_min) / 10) << 4));
    regs[6] = ((((tm->tm_wday) % 10) | (((tm->tm_wday) / 10) << 4)) + 1);
    regs[7] = (((tm->tm_mday) % 10) | (((tm->tm_mday) / 10) << 4));
    regs[8] = ((((tm->tm_mon) % 10) | (((tm->tm_mon) / 10) << 4)) + 1);
    regs[9] = (((year % 100) % 10) | (((year % 100) / 10) << 4));
    regs[0x32] = (((year / 100) % 10) | (((year / 100) / 10) << 4));
    if (regs[11] & 0x02) {
      regs[4] = (((tm->tm_hour) % 10) | (((tm->tm_hour) / 10) << 4));
    } else {
      regs[4] =
          (tm->tm_hour % 12)
              ? (((tm->tm_hour % 12) % 10) | (((tm->tm_hour % 12) / 10) << 4))
              : (((12) % 10) | (((12) / 10) << 4));
      if (tm->tm_hour > 11)
        regs[4] |= 0x80;
    }
  }
}


x86 assembly (clang, -O0):
<time_set>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
add    $0x76c,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    0x2c(%rax),%eax
and    $0x4,%eax
cmp    $0x0,%eax
je     1235 <time_set+0x135>
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0x10(%rbp),%rax
mov    0xc(%rax),%ecx
add    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x18(%rax)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x1c(%rax)
mov    -0x10(%rbp),%rax
mov    0x14(%rax),%ecx
add    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x20(%rax)
mov    -0x14(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    -0x8(%rbp),%rax
mov    %edx,0x24(%rax)
mov    -0x14(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0xc8(%rax)
mov    -0x8(%rbp),%rax
mov    0x2c(%rax),%eax
and    $0x2,%eax
cmp    $0x0,%eax
je     11c7 <time_set+0xc7>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x10(%rax)
jmp    1230 <time_set+0x130>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%eax
mov    $0xc,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     11f6 <time_set+0xf6>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%eax
mov    $0xc,%ecx
cltd
idiv   %ecx
mov    %edx,-0x18(%rbp)
jmp    1203 <time_set+0x103>
mov    $0xc,%eax
mov    %eax,-0x18(%rbp)
jmp    1203 <time_set+0x103>
mov    -0x18(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x10(%rax)
mov    -0x10(%rbp),%rax
cmpl   $0xb,0x18(%rax)
jle    122b <time_set+0x12b>
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%ecx
or     $0x80,%ecx
mov    %ecx,0x10(%rax)
jmp    1230 <time_set+0x130>
jmp    147f <time_set+0x37f>
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x2c(%rbp)
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0x2c(%rbp),%edx
shl    $0x4,%eax
or     %eax,%edx
mov    -0x8(%rbp),%rax
mov    %edx,(%rax)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0x28(%rbp),%edx
shl    $0x4,%eax
or     %eax,%edx
mov    -0x8(%rbp),%rax
mov    %edx,0x8(%rax)
mov    -0x10(%rbp),%rax
mov    0xc(%rax),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%ecx
mov    -0x10(%rbp),%rax
mov    0xc(%rax),%eax
mov    $0xa,%esi
cltd
idiv   %esi
shl    $0x4,%eax
or     %eax,%ecx
add    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x18(%rax)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x24(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0x24(%rbp),%edx
shl    $0x4,%eax
or     %eax,%edx
mov    -0x8(%rbp),%rax
mov    %edx,0x1c(%rax)
mov    -0x10(%rbp),%rax
mov    0x14(%rax),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%ecx
mov    -0x10(%rbp),%rax
mov    0x14(%rax),%eax
mov    $0xa,%esi
cltd
idiv   %esi
shl    $0x4,%eax
or     %eax,%ecx
add    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x20(%rax)
mov    -0x14(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x20(%rbp)
mov    -0x14(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0x20(%rbp),%edx
shl    $0x4,%eax
or     %eax,%edx
mov    -0x8(%rbp),%rax
mov    %edx,0x24(%rax)
mov    -0x14(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0x1c(%rbp),%edx
shl    $0x4,%eax
or     %eax,%edx
mov    -0x8(%rbp),%rax
mov    %edx,0xc8(%rax)
mov    -0x8(%rbp),%rax
mov    0x2c(%rax),%eax
and    $0x2,%eax
cmp    $0x0,%eax
je     13e1 <time_set+0x2e1>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0x30(%rbp),%edx
shl    $0x4,%eax
or     %eax,%edx
mov    -0x8(%rbp),%rax
mov    %edx,0x10(%rax)
jmp    147a <time_set+0x37a>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%eax
mov    $0xc,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1440 <time_set+0x340>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%eax
mov    $0xc,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x38(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%eax
mov    $0xc,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x38(%rbp),%eax
shl    $0x4,%ecx
or     %ecx,%eax
mov    %eax,-0x34(%rbp)
jmp    144d <time_set+0x34d>
mov    $0x12,%eax
mov    %eax,-0x34(%rbp)
jmp    144d <time_set+0x34d>
mov    -0x34(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x10(%rax)
mov    -0x10(%rbp),%rax
cmpl   $0xb,0x18(%rax)
jle    1475 <time_set+0x375>
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%ecx
or     $0x80,%ecx
mov    %ecx,0x10(%rax)
jmp    147a <time_set+0x37a>
jmp    147f <time_set+0x37f>
pop    %rbp
ret

x86 assembly (clang, -O2):
<time_set>:
mov    $0x76c,%r9d
add    (%rsi),%r9d
mov    0x2c(%rdi),%r8d
mov    0x4(%rsi),%eax
test   $0x4,%r8b
jne    12e8 <time_set+0x1e8>
movslq %eax,%rdx
imul   $0x66666667,%rdx,%rdx
mov    %rdx,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rdx
sar    $0x2,%edx
add    %ecx,%edx
lea    (%rdx,%rdx,1),%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
shl    $0x4,%edx
or     %eax,%edx
mov    %edx,(%rdi)
movslq 0x8(%rsi),%rax
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x2,%ecx
add    %edx,%ecx
lea    (%rcx,%rcx,1),%edx
lea    (%rdx,%rdx,4),%edx
sub    %edx,%eax
shl    $0x4,%ecx
or     %eax,%ecx
mov    %ecx,0x8(%rdi)
movslq 0xc(%rsi),%rax
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x2,%ecx
add    %edx,%ecx
lea    (%rcx,%rcx,1),%edx
lea    (%rdx,%rdx,4),%edx
sub    %edx,%eax
shl    $0x4,%ecx
or     %eax,%ecx
add    $0x1,%ecx
mov    %ecx,0x18(%rdi)
movslq 0x10(%rsi),%rax
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x2,%ecx
add    %edx,%ecx
lea    (%rcx,%rcx,1),%edx
lea    (%rdx,%rdx,4),%edx
sub    %edx,%eax
shl    $0x4,%ecx
or     %eax,%ecx
mov    %ecx,0x1c(%rdi)
movslq 0x14(%rsi),%rax
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x2,%ecx
add    %edx,%ecx
lea    (%rcx,%rcx,1),%edx
lea    (%rdx,%rdx,4),%edx
sub    %edx,%eax
shl    $0x4,%ecx
or     %eax,%ecx
add    $0x1,%ecx
mov    %ecx,0x20(%rdi)
movslq %r9d,%r10
imul   $0x51eb851f,%r10,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
sar    $0x5,%eax
add    %ecx,%eax
imul   $0x64,%eax,%ecx
sub    %ecx,%r9d
movsbl %r9b,%ecx
imul   $0x67,%ecx,%ecx
movzwl %cx,%ecx
movswl %cx,%edx
shr    $0xf,%ecx
shr    $0xa,%edx
add    %cl,%dl
movzbl %dl,%ecx
lea    (%rcx,%rcx,1),%edx
lea    (%rdx,%rdx,4),%edx
sub    %dl,%r9b
movsbl %r9b,%edx
movsbl %cl,%ecx
shl    $0x4,%ecx
or     %edx,%ecx
mov    %ecx,0x24(%rdi)
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x2,%ecx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
imul   $0x10624dd3,%r10,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x6,%ecx
add    %edx,%ecx
shl    $0x4,%ecx
or     %eax,%ecx
mov    %ecx,0xc8(%rdi)
mov    0x18(%rsi),%ecx
test   $0x2,%r8b
jne    1370 <time_set+0x270>
movslq %ecx,%rax
imul   $0x2aaaaaab,%rax,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
shr    $0x21,%rax
add    %edx,%eax
shl    $0x2,%eax
lea    (%rax,%rax,2),%eax
sub    %eax,%ecx
je     1398 <time_set+0x298>
movsbl %cl,%eax
imul   $0x67,%eax,%eax
movzwl %ax,%eax
movswl %ax,%edx
shr    $0xf,%eax
shr    $0xa,%edx
add    %al,%dl
movzbl %dl,%eax
lea    (%rax,%rax,1),%edx
lea    (%rdx,%rdx,4),%edx
sub    %dl,%cl
movsbl %cl,%ecx
movsbl %al,%eax
shl    $0x4,%eax
or     %ecx,%eax
jmp    139d <time_set+0x29d>
mov    %eax,(%rdi)
mov    0x8(%rsi),%eax
mov    %eax,0x8(%rdi)
mov    0xc(%rsi),%eax
add    $0x1,%eax
mov    %eax,0x18(%rdi)
mov    0x10(%rsi),%eax
mov    %eax,0x1c(%rdi)
mov    0x14(%rsi),%eax
add    $0x1,%eax
mov    %eax,0x20(%rdi)
movslq %r9d,%rax
imul   $0x51eb851f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x25,%rcx
add    %edx,%ecx
imul   $0x64,%ecx,%edx
sub    %edx,%eax
mov    %eax,0x24(%rdi)
mov    %ecx,0xc8(%rdi)
mov    0x18(%rsi),%eax
test   $0x2,%r8b
jne    13ab <time_set+0x2ab>
movslq %eax,%rcx
imul   $0x2aaaaaab,%rcx,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x21,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,2),%ecx
sub    %ecx,%eax
mov    $0xc,%ecx
cmovne %eax,%ecx
mov    %ecx,0x10(%rdi)
cmpl   $0xc,0x18(%rsi)
jl     13ae <time_set+0x2ae>
or     $0x80,%ecx
mov    %ecx,0x10(%rdi)
ret
movslq %ecx,%rax
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,1),%edx
lea    (%rdx,%rdx,4),%edx
sub    %edx,%eax
shl    $0x4,%ecx
or     %eax,%ecx
mov    %ecx,0x10(%rdi)
ret
mov    $0x12,%eax
mov    %eax,0x10(%rdi)
cmpl   $0xc,0x18(%rsi)
jl     13ae <time_set+0x2ae>
or     $0x80,%eax
mov    %eax,0x10(%rdi)
ret

LLVM IR (-O0):
%struct.tm = type { i32, i32, i32, i32, i32, i32, i32 }
define void @time_set(i32* %0, %struct.tm* %1) {
%3 = alloca i32*
%4 = alloca %struct.tm*
%5 = alloca i32
store i32* %0, i32** %3
store %struct.tm* %1, %struct.tm** %4
%6 = load %struct.tm*, %struct.tm** %4
%7 = getelementptr inbounds %struct.tm, %struct.tm* %6, i32 0, i32 0
%8 = load i32, i32* %7
%9 = add nsw i32 %8, 1900
store i32 %9, i32* %5
%10 = load i32*, i32** %3
%11 = getelementptr inbounds i32, i32* %10, i64 11
%12 = load i32, i32* %11
%13 = and i32 %12, 4
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %89
15: ; preds = %2
%16 = load %struct.tm*, %struct.tm** %4
%17 = getelementptr inbounds %struct.tm, %struct.tm* %16, i32 0, i32 1
%18 = load i32, i32* %17
%19 = load i32*, i32** %3
%20 = getelementptr inbounds i32, i32* %19, i64 0
store i32 %18, i32* %20
%21 = load %struct.tm*, %struct.tm** %4
%22 = getelementptr inbounds %struct.tm, %struct.tm* %21, i32 0, i32 2
%23 = load i32, i32* %22
%24 = load i32*, i32** %3
%25 = getelementptr inbounds i32, i32* %24, i64 2
store i32 %23, i32* %25
%26 = load %struct.tm*, %struct.tm** %4
%27 = getelementptr inbounds %struct.tm, %struct.tm* %26, i32 0, i32 3
%28 = load i32, i32* %27
%29 = add nsw i32 %28, 1
%30 = load i32*, i32** %3
%31 = getelementptr inbounds i32, i32* %30, i64 6
store i32 %29, i32* %31
%32 = load %struct.tm*, %struct.tm** %4
%33 = getelementptr inbounds %struct.tm, %struct.tm* %32, i32 0, i32 4
%34 = load i32, i32* %33
%35 = load i32*, i32** %3
%36 = getelementptr inbounds i32, i32* %35, i64 7
store i32 %34, i32* %36
%37 = load %struct.tm*, %struct.tm** %4
%38 = getelementptr inbounds %struct.tm, %struct.tm* %37, i32 0, i32 5
%39 = load i32, i32* %38
%40 = add nsw i32 %39, 1
%41 = load i32*, i32** %3
%42 = getelementptr inbounds i32, i32* %41, i64 8
store i32 %40, i32* %42
%43 = load i32, i32* %5
%44 = srem i32 %43, 100
%45 = load i32*, i32** %3
%46 = getelementptr inbounds i32, i32* %45, i64 9
store i32 %44, i32* %46
%47 = load i32, i32* %5
%48 = sdiv i32 %47, 100
%49 = load i32*, i32** %3
%50 = getelementptr inbounds i32, i32* %49, i64 50
store i32 %48, i32* %50
%51 = load i32*, i32** %3
%52 = getelementptr inbounds i32, i32* %51, i64 11
%53 = load i32, i32* %52
%54 = and i32 %53, 2
%55 = icmp ne i32 %54, 0
br i1 %55, label %56, label %62
56: ; preds = %15
%57 = load %struct.tm*, %struct.tm** %4
%58 = getelementptr inbounds %struct.tm, %struct.tm* %57, i32 0, i32 6
%59 = load i32, i32* %58
%60 = load i32*, i32** %3
%61 = getelementptr inbounds i32, i32* %60, i64 4
store i32 %59, i32* %61
br label %88
62: ; preds = %15
%63 = load %struct.tm*, %struct.tm** %4
%64 = getelementptr inbounds %struct.tm, %struct.tm* %63, i32 0, i32 6
%65 = load i32, i32* %64
%66 = srem i32 %65, 12
%67 = icmp ne i32 %66, 0
br i1 %67, label %68, label %73
68: ; preds = %62
%69 = load %struct.tm*, %struct.tm** %4
%70 = getelementptr inbounds %struct.tm, %struct.tm* %69, i32 0, i32 6
%71 = load i32, i32* %70
%72 = srem i32 %71, 12
br label %74
73: ; preds = %62
br label %74
74: ; preds = %73, %68
%75 = phi i32 [ %72, %68 ], [ 12, %73 ]
%76 = load i32*, i32** %3
%77 = getelementptr inbounds i32, i32* %76, i64 4
store i32 %75, i32* %77
%78 = load %struct.tm*, %struct.tm** %4
%79 = getelementptr inbounds %struct.tm, %struct.tm* %78, i32 0, i32 6
%80 = load i32, i32* %79
%81 = icmp sgt i32 %80, 11
br i1 %81, label %82, label %87
82: ; preds = %74
%83 = load i32*, i32** %3
%84 = getelementptr inbounds i32, i32* %83, i64 4
%85 = load i32, i32* %84
%86 = or i32 %85, 128
store i32 %86, i32* %84
br label %87
87: ; preds = %82, %74
br label %88
88: ; preds = %87, %56
br label %225
89: ; preds = %2
%90 = load %struct.tm*, %struct.tm** %4
%91 = getelementptr inbounds %struct.tm, %struct.tm* %90, i32 0, i32 1
%92 = load i32, i32* %91
%93 = srem i32 %92, 10
%94 = load %struct.tm*, %struct.tm** %4
%95 = getelementptr inbounds %struct.tm, %struct.tm* %94, i32 0, i32 1
%96 = load i32, i32* %95
%97 = sdiv i32 %96, 10
%98 = shl i32 %97, 4
%99 = or i32 %93, %98
%100 = load i32*, i32** %3
%101 = getelementptr inbounds i32, i32* %100, i64 0
store i32 %99, i32* %101
%102 = load %struct.tm*, %struct.tm** %4
%103 = getelementptr inbounds %struct.tm, %struct.tm* %102, i32 0, i32 2
%104 = load i32, i32* %103
%105 = srem i32 %104, 10
%106 = load %struct.tm*, %struct.tm** %4
%107 = getelementptr inbounds %struct.tm, %struct.tm* %106, i32 0, i32 2
%108 = load i32, i32* %107
%109 = sdiv i32 %108, 10
%110 = shl i32 %109, 4
%111 = or i32 %105, %110
%112 = load i32*, i32** %3
%113 = getelementptr inbounds i32, i32* %112, i64 2
store i32 %111, i32* %113
%114 = load %struct.tm*, %struct.tm** %4
%115 = getelementptr inbounds %struct.tm, %struct.tm* %114, i32 0, i32 3
%116 = load i32, i32* %115
%117 = srem i32 %116, 10
%118 = load %struct.tm*, %struct.tm** %4
%119 = getelementptr inbounds %struct.tm, %struct.tm* %118, i32 0, i32 3
%120 = load i32, i32* %119
%121 = sdiv i32 %120, 10
%122 = shl i32 %121, 4
%123 = or i32 %117, %122
%124 = add nsw i32 %123, 1
%125 = load i32*, i32** %3
%126 = getelementptr inbounds i32, i32* %125, i64 6
store i32 %124, i32* %126
%127 = load %struct.tm*, %struct.tm** %4
%128 = getelementptr inbounds %struct.tm, %struct.tm* %127, i32 0, i32 4
%129 = load i32, i32* %128
%130 = srem i32 %129, 10
%131 = load %struct.tm*, %struct.tm** %4
%132 = getelementptr inbounds %struct.tm, %struct.tm* %131, i32 0, i32 4
%133 = load i32, i32* %132
%134 = sdiv i32 %133, 10
%135 = shl i32 %134, 4
%136 = or i32 %130, %135
%137 = load i32*, i32** %3
%138 = getelementptr inbounds i32, i32* %137, i64 7
store i32 %136, i32* %138
%139 = load %struct.tm*, %struct.tm** %4
%140 = getelementptr inbounds %struct.tm, %struct.tm* %139, i32 0, i32 5
%141 = load i32, i32* %140
%142 = srem i32 %141, 10
%143 = load %struct.tm*, %struct.tm** %4
%144 = getelementptr inbounds %struct.tm, %struct.tm* %143, i32 0, i32 5
%145 = load i32, i32* %144
%146 = sdiv i32 %145, 10
%147 = shl i32 %146, 4
%148 = or i32 %142, %147
%149 = add nsw i32 %148, 1
%150 = load i32*, i32** %3
%151 = getelementptr inbounds i32, i32* %150, i64 8
store i32 %149, i32* %151
%152 = load i32, i32* %5
%153 = srem i32 %152, 100
%154 = srem i32 %153, 10
%155 = load i32, i32* %5
%156 = srem i32 %155, 100
%157 = sdiv i32 %156, 10
%158 = shl i32 %157, 4
%159 = or i32 %154, %158
%160 = load i32*, i32** %3
%161 = getelementptr inbounds i32, i32* %160, i64 9
store i32 %159, i32* %161
%162 = load i32, i32* %5
%163 = sdiv i32 %162, 100
%164 = srem i32 %163, 10
%165 = load i32, i32* %5
%166 = sdiv i32 %165, 100
%167 = sdiv i32 %166, 10
%168 = shl i32 %167, 4
%169 = or i32 %164, %168
%170 = load i32*, i32** %3
%171 = getelementptr inbounds i32, i32* %170, i64 50
store i32 %169, i32* %171
%172 = load i32*, i32** %3
%173 = getelementptr inbounds i32, i32* %172, i64 11
%174 = load i32, i32* %173
%175 = and i32 %174, 2
%176 = icmp ne i32 %175, 0
br i1 %176, label %177, label %190
177: ; preds = %89
%178 = load %struct.tm*, %struct.tm** %4
%179 = getelementptr inbounds %struct.tm, %struct.tm* %178, i32 0, i32 6
%180 = load i32, i32* %179
%181 = srem i32 %180, 10
%182 = load %struct.tm*, %struct.tm** %4
%183 = getelementptr inbounds %struct.tm, %struct.tm* %182, i32 0, i32 6
%184 = load i32, i32* %183
%185 = sdiv i32 %184, 10
%186 = shl i32 %185, 4
%187 = or i32 %181, %186
%188 = load i32*, i32** %3
%189 = getelementptr inbounds i32, i32* %188, i64 4
store i32 %187, i32* %189
br label %224
190: ; preds = %89
%191 = load %struct.tm*, %struct.tm** %4
%192 = getelementptr inbounds %struct.tm, %struct.tm* %191, i32 0, i32 6
%193 = load i32, i32* %192
%194 = srem i32 %193, 12
%195 = icmp ne i32 %194, 0
br i1 %195, label %196, label %209
196: ; preds = %190
%197 = load %struct.tm*, %struct.tm** %4
%198 = getelementptr inbounds %struct.tm, %struct.tm* %197, i32 0, i32 6
%199 = load i32, i32* %198
%200 = srem i32 %199, 12
%201 = srem i32 %200, 10
%202 = load %struct.tm*, %struct.tm** %4
%203 = getelementptr inbounds %struct.tm, %struct.tm* %202, i32 0, i32 6
%204 = load i32, i32* %203
%205 = srem i32 %204, 12
%206 = sdiv i32 %205, 10
%207 = shl i32 %206, 4
%208 = or i32 %201, %207
br label %210
209: ; preds = %190
br label %210
210: ; preds = %209, %196
%211 = phi i32 [ %208, %196 ], [ 18, %209 ]
%212 = load i32*, i32** %3
%213 = getelementptr inbounds i32, i32* %212, i64 4
store i32 %211, i32* %213
%214 = load %struct.tm*, %struct.tm** %4
%215 = getelementptr inbounds %struct.tm, %struct.tm* %214, i32 0, i32 6
%216 = load i32, i32* %215
%217 = icmp sgt i32 %216, 11
br i1 %217, label %218, label %223
218: ; preds = %210
%219 = load i32*, i32** %3
%220 = getelementptr inbounds i32, i32* %219, i64 4
%221 = load i32, i32* %220
%222 = or i32 %221, 128
store i32 %222, i32* %220
br label %223
223: ; preds = %218, %210
br label %224
224: ; preds = %223, %177
br label %225
225: ; preds = %224, %88
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32, i32, i32, i32, i32, i32, i32 }
define void @time_set(i32* nocapture %0, %struct.tm* nocapture %1) {
%3 = getelementptr inbounds %struct.tm, %struct.tm* %1, i64 0, i32 0
%4 = load i32, i32* %3
%5 = add nsw i32 %4, 1900
%6 = getelementptr inbounds i32, i32* %0, i64 11
%7 = load i32, i32* %6
%8 = and i32 %7, 4
%9 = icmp eq i32 %8, 0
%10 = getelementptr inbounds %struct.tm, %struct.tm* %1, i64 0, i32 1
%11 = load i32, i32* %10
br i1 %9, label %46, label %12
12: ; preds = %2
store i32 %11, i32* %0
%13 = getelementptr inbounds %struct.tm, %struct.tm* %1, i64 0, i32 2
%14 = load i32, i32* %13
%15 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %14, i32* %15
%16 = getelementptr inbounds %struct.tm, %struct.tm* %1, i64 0, i32 3
%17 = load i32, i32* %16
%18 = add nsw i32 %17, 1
%19 = getelementptr inbounds i32, i32* %0, i64 6
store i32 %18, i32* %19
%20 = getelementptr inbounds %struct.tm, %struct.tm* %1, i64 0, i32 4
%21 = load i32, i32* %20
%22 = getelementptr inbounds i32, i32* %0, i64 7
store i32 %21, i32* %22
%23 = getelementptr inbounds %struct.tm, %struct.tm* %1, i64 0, i32 5
%24 = load i32, i32* %23
%25 = add nsw i32 %24, 1
%26 = getelementptr inbounds i32, i32* %0, i64 8
store i32 %25, i32* %26
%27 = srem i32 %5, 100
%28 = getelementptr inbounds i32, i32* %0, i64 9
store i32 %27, i32* %28
%29 = sdiv i32 %5, 100
%30 = getelementptr inbounds i32, i32* %0, i64 50
store i32 %29, i32* %30
%31 = and i32 %7, 2
%32 = icmp eq i32 %31, 0
%33 = getelementptr inbounds %struct.tm, %struct.tm* %1, i64 0, i32 6
%34 = load i32, i32* %33
br i1 %32, label %37, label %35
35: ; preds = %12
%36 = getelementptr inbounds i32, i32* %0, i64 4
store i32 %34, i32* %36
br label %124
37: ; preds = %12
%38 = srem i32 %34, 12
%39 = icmp eq i32 %38, 0
%40 = select i1 %39, i32 12, i32 %38
%41 = getelementptr inbounds i32, i32* %0, i64 4
store i32 %40, i32* %41
%42 = load i32, i32* %33
%43 = icmp sgt i32 %42, 11
br i1 %43, label %44, label %124
44: ; preds = %37
%45 = or i32 %40, 128
store i32 %45, i32* %41
br label %124
46: ; preds = %2
%47 = srem i32 %11, 10
%48 = sdiv i32 %11, 10
%49 = shl i32 %48, 4
%50 = or i32 %49, %47
store i32 %50, i32* %0
%51 = getelementptr inbounds %struct.tm, %struct.tm* %1, i64 0, i32 2
%52 = load i32, i32* %51
%53 = srem i32 %52, 10
%54 = sdiv i32 %52, 10
%55 = shl i32 %54, 4
%56 = or i32 %55, %53
%57 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %56, i32* %57
%58 = getelementptr inbounds %struct.tm, %struct.tm* %1, i64 0, i32 3
%59 = load i32, i32* %58
%60 = srem i32 %59, 10
%61 = sdiv i32 %59, 10
%62 = shl i32 %61, 4
%63 = or i32 %62, %60
%64 = add nsw i32 %63, 1
%65 = getelementptr inbounds i32, i32* %0, i64 6
store i32 %64, i32* %65
%66 = getelementptr inbounds %struct.tm, %struct.tm* %1, i64 0, i32 4
%67 = load i32, i32* %66
%68 = srem i32 %67, 10
%69 = sdiv i32 %67, 10
%70 = shl i32 %69, 4
%71 = or i32 %70, %68
%72 = getelementptr inbounds i32, i32* %0, i64 7
store i32 %71, i32* %72
%73 = getelementptr inbounds %struct.tm, %struct.tm* %1, i64 0, i32 5
%74 = load i32, i32* %73
%75 = srem i32 %74, 10
%76 = sdiv i32 %74, 10
%77 = shl i32 %76, 4
%78 = or i32 %77, %75
%79 = add nsw i32 %78, 1
%80 = getelementptr inbounds i32, i32* %0, i64 8
store i32 %79, i32* %80
%81 = srem i32 %5, 100
%82 = trunc i32 %81 to i8
%83 = srem i8 %82, 10
%84 = sext i8 %83 to i32
%85 = sdiv i8 %82, 10
%86 = sext i8 %85 to i32
%87 = shl nsw i32 %86, 4
%88 = or i32 %87, %84
%89 = getelementptr inbounds i32, i32* %0, i64 9
store i32 %88, i32* %89
%90 = sdiv i32 %5, 100
%91 = srem i32 %90, 10
%92 = sdiv i32 %5, 1000
%93 = shl nsw i32 %92, 4
%94 = or i32 %91, %93
%95 = getelementptr inbounds i32, i32* %0, i64 50
store i32 %94, i32* %95
%96 = and i32 %7, 2
%97 = icmp eq i32 %96, 0
%98 = getelementptr inbounds %struct.tm, %struct.tm* %1, i64 0, i32 6
%99 = load i32, i32* %98
br i1 %97, label %106, label %100
100: ; preds = %46
%101 = srem i32 %99, 10
%102 = sdiv i32 %99, 10
%103 = shl i32 %102, 4
%104 = or i32 %103, %101
%105 = getelementptr inbounds i32, i32* %0, i64 4
store i32 %104, i32* %105
br label %124
106: ; preds = %46
%107 = srem i32 %99, 12
%108 = icmp eq i32 %107, 0
br i1 %108, label %117, label %109
109: ; preds = %106
%110 = trunc i32 %107 to i8
%111 = srem i8 %110, 10
%112 = sext i8 %111 to i32
%113 = sdiv i8 %110, 10
%114 = sext i8 %113 to i32
%115 = shl nsw i32 %114, 4
%116 = or i32 %115, %112
br label %117
117: ; preds = %106, %109
%118 = phi i32 [ %116, %109 ], [ 18, %106 ]
%119 = getelementptr inbounds i32, i32* %0, i64 4
store i32 %118, i32* %119
%120 = load i32, i32* %98
%121 = icmp sgt i32 %120, 11
br i1 %121, label %122, label %124
122: ; preds = %117
%123 = or i32 %118, 128
store i32 %123, i32* %119
br label %124
124: ; preds = %100, %122, %117, %35, %44, %37
ret void
}