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

/* Variables and functions */
int /*<<< orphan*/ assert(int);
char *create_string(char *);
long difftime(scalar_t__, scalar_t__);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ log_err(int /*<<< orphan*/, char *);
long snprintf(char *, int, char *, int, ...);
scalar_t__ time(scalar_t__ *);
char *create_time_delta_string(time_t t0, time_t t1) {
  long n;
  int years, weeks, days, hours, minutes, seconds;
  char buf[25];
  if (t1 == (time_t)-1) {
    if (time(&t1) == (time_t)-1) {
      log_err(errno, "time() failed");
    }
  }
  n = difftime(t1, t0);
  assert(n >= 0);
  seconds = n % 60;
  n /= 60;
  minutes = n % 60;
  n /= 60;
  hours = n % 24;
  n /= 24;
  days = n % 7;
  n /= 7;
  weeks = n % 52;
  n /= 52;
  years = n;
  if (years > 0) {
    n = snprintf(buf, sizeof(buf), "%dy%dw%dd%dh%dm%ds", years, weeks, days,
                 hours, minutes, seconds);
  } else if (weeks > 0) {
    n = snprintf(buf, sizeof(buf), "%dw%dd%dh%dm%ds", weeks, days, hours,
                 minutes, seconds);
  } else if (days > 0) {
    n = snprintf(buf, sizeof(buf), "%dd%dh%dm%ds", days, hours, minutes,
                 seconds);
  } else if (hours > 0) {
    n = snprintf(buf, sizeof(buf), "%dh%dm%ds", hours, minutes, seconds);
  } else if (minutes > 0) {
    n = snprintf(buf, sizeof(buf), "%dm%ds", minutes, seconds);
  } else {
    n = snprintf(buf, sizeof(buf), "%ds", seconds);
  }
  assert((n >= 0) && (n < sizeof(buf)));
  return (create_string(buf));
}


x86 assembly (clang, -O0):
<create_time_delta_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0xffffffffffffffff,-0x10(%rbp)
jne    11a8 <create_time_delta_string+0x48>
lea    -0x10(%rbp),%rdi
call   1070 <time@plt>
cmp    $0xffffffffffffffff,%rax
jne    11a3 <create_time_delta_string+0x43>
mov    0x2e4b(%rip),%rax
mov    (%rax),%edi
lea    0xe62(%rip),%rsi
call   1080 <log_err@plt>
jmp    11a8 <create_time_delta_string+0x48>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <difftime@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x18(%rbp),%rax
mov    $0x3c,%ecx
cqto
idiv   %rcx
mov    %edx,%eax
mov    %eax,-0x30(%rbp)
mov    -0x18(%rbp),%rax
mov    $0x3c,%ecx
cqto
idiv   %rcx
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    $0x3c,%ecx
cqto
idiv   %rcx
mov    %edx,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x18(%rbp),%rax
mov    $0x3c,%ecx
cqto
idiv   %rcx
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    $0x18,%ecx
cqto
idiv   %rcx
mov    %edx,%eax
mov    %eax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    $0x18,%ecx
cqto
idiv   %rcx
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    $0x7,%ecx
cqto
idiv   %rcx
mov    %edx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%rax
mov    $0x7,%ecx
cqto
idiv   %rcx
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    $0x34,%ecx
cqto
idiv   %rcx
mov    %edx,%eax
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    $0x34,%ecx
cqto
idiv   %rcx
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jle    12d8 <create_time_delta_string+0x178>
lea    -0x50(%rbp),%rdi
mov    -0x1c(%rbp),%ecx
mov    -0x20(%rbp),%r8d
mov    -0x24(%rbp),%r9d
mov    -0x28(%rbp),%r11d
mov    -0x2c(%rbp),%r10d
mov    -0x30(%rbp),%eax
mov    $0x19,%esi
lea    0xd53(%rip),%rdx
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
mov    $0x0,%al
call   1040 <snprintf@plt>
mov    %rax,-0x18(%rbp)
jmp    13ef <create_time_delta_string+0x28f>
cmpl   $0x0,-0x20(%rbp)
jle    131c <create_time_delta_string+0x1bc>
lea    -0x50(%rbp),%rdi
mov    -0x20(%rbp),%ecx
mov    -0x24(%rbp),%r8d
mov    -0x28(%rbp),%r9d
mov    -0x2c(%rbp),%r10d
mov    -0x30(%rbp),%eax
mov    $0x19,%esi
lea    0xd0d(%rip),%rdx
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x0,%al
call   1040 <snprintf@plt>
mov    %rax,-0x18(%rbp)
jmp    13ea <create_time_delta_string+0x28a>
cmpl   $0x0,-0x24(%rbp)
jle    1357 <create_time_delta_string+0x1f7>
lea    -0x50(%rbp),%rdi
mov    -0x24(%rbp),%ecx
mov    -0x28(%rbp),%r8d
mov    -0x2c(%rbp),%r9d
mov    -0x30(%rbp),%eax
mov    $0x19,%esi
lea    0xcd0(%rip),%rdx
mov    %eax,(%rsp)
mov    $0x0,%al
call   1040 <snprintf@plt>
mov    %rax,-0x18(%rbp)
jmp    13e5 <create_time_delta_string+0x285>
cmpl   $0x0,-0x28(%rbp)
jle    138c <create_time_delta_string+0x22c>
lea    -0x50(%rbp),%rdi
mov    -0x28(%rbp),%ecx
mov    -0x2c(%rbp),%r8d
mov    -0x30(%rbp),%r9d
mov    $0x19,%esi
lea    0xc9b(%rip),%rdx
mov    $0x0,%al
call   1040 <snprintf@plt>
mov    %rax,-0x18(%rbp)
jmp    13e0 <create_time_delta_string+0x280>
cmpl   $0x0,-0x2c(%rbp)
jle    13bd <create_time_delta_string+0x25d>
lea    -0x50(%rbp),%rdi
mov    -0x2c(%rbp),%ecx
mov    -0x30(%rbp),%r8d
mov    $0x19,%esi
lea    0xc6d(%rip),%rdx
mov    $0x0,%al
call   1040 <snprintf@plt>
mov    %rax,-0x18(%rbp)
jmp    13db <create_time_delta_string+0x27b>
lea    -0x50(%rbp),%rdi
mov    -0x30(%rbp),%ecx
mov    $0x19,%esi
lea    0xc4d(%rip),%rdx
mov    $0x0,%al
call   1040 <snprintf@plt>
mov    %rax,-0x18(%rbp)
jmp    13e0 <create_time_delta_string+0x280>
jmp    13e5 <create_time_delta_string+0x285>
jmp    13ea <create_time_delta_string+0x28a>
jmp    13ef <create_time_delta_string+0x28f>
xor    %eax,%eax
cmpq   $0x0,-0x18(%rbp)
mov    %al,-0x51(%rbp)
jl     140a <create_time_delta_string+0x2aa>
cmpq   $0x19,-0x18(%rbp)
setb   %al
mov    %al,-0x51(%rbp)
mov    -0x51(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    -0x50(%rbp),%rdi
call   1060 <create_string@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_time_delta_string>:
push   %r14
push   %rbx
sub    $0x38,%rsp
mov    %rdi,%rbx
mov    %rsi,0x8(%rsp)
cmp    $0xffffffffffffffff,%rsi
jne    119a <create_time_delta_string+0x3a>
lea    0x8(%rsp),%rdi
call   1070 <time@plt>
cmp    $0xffffffffffffffff,%rax
jne    119a <create_time_delta_string+0x3a>
mov    0x2e54(%rip),%rax
mov    (%rax),%edi
lea    0xe6b(%rip),%rsi
call   1080 <log_err@plt>
mov    0x8(%rsp),%rdi
mov    %rbx,%rsi
call   1030 <difftime@plt>
mov    %rax,%rbx
mov    %rax,%rdi
shr    $0x3f,%rdi
xor    $0x1,%edi
call   1050 <assert@plt>
movabs $0x8888888888888889,%rcx
88 88 88
mov    %rbx,%rax
imul   %rcx
mov    %rdx,%r10
add    %rbx,%r10
mov    %r10,%rax
shr    $0x3f,%rax
sar    $0x5,%r10
add    %rax,%r10
imul   $0x3c,%r10d,%eax
mov    %ebx,%r11d
sub    %eax,%r11d
mov    %r10,%rax
imul   %rcx
add    %r10,%rdx
mov    %rdx,%rax
shr    $0x3f,%rax
shr    $0x5,%rdx
add    %eax,%edx
imul   $0x3c,%edx,%eax
sub    %eax,%r10d
movabs $0x48d159e26af37c05,%rcx
59 d1 48
mov    %rbx,%rax
imul   %rcx
mov    %rdx,%r14
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0xa,%r14
add    %rax,%r14
movabs $0x2aaaaaaaaaaaaaab,%rcx
aa aa 2a
mov    %r14,%rax
imul   %rcx
mov    %rdx,%rax
shr    $0x3f,%rax
shr    $0x2,%edx
add    %eax,%edx
shl    $0x3,%edx
lea    (%rdx,%rdx,2),%ecx
movabs $0x1845c8a0ce512957,%rdx
c8 45 18
mov    %rbx,%rax
imul   %rdx
mov    %rdx,%r9
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0xd,%r9
add    %rax,%r9
movabs $0x4924924924924925,%rdx
92 24 49
mov    %r9,%rax
imul   %rdx
sub    %ecx,%r14d
mov    %rdx,%rax
shr    $0x3f,%rax
shr    %rdx
add    %eax,%edx
lea    0x0(,%rdx,8),%eax
sub    %eax,%edx
add    %edx,%r9d
movabs $0x377aef2669de1559,%rcx
ef 7a 37
mov    %rbx,%rax
imul   %rcx
mov    %rdx,%r8
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x11,%r8
add    %rax,%r8
movabs $0x4ec4ec4ec4ec4ec5,%rcx
ec c4 4e
mov    %r8,%rax
imul   %rcx
mov    %rdx,%rax
shr    $0x3f,%rax
shr    $0x4,%rdx
add    %eax,%edx
imul   $0x34,%edx,%eax
sub    %eax,%r8d
movabs $0x222444666888aaad,%rcx
44 24 22
mov    %rbx,%rax
imul   %rcx
mov    %rdx,%rcx
mov    %rdx,%rax
shr    $0x3f,%rax
shr    $0x16,%rcx
add    %eax,%ecx
test   %ecx,%ecx
jle    1322 <create_time_delta_string+0x1c2>
sub    $0x8,%rsp
lea    0xd09(%rip),%rdx
lea    0x18(%rsp),%rdi
mov    $0x19,%esi
xor    %eax,%eax
push   %r11
push   %r10
push   %r14
call   1040 <snprintf@plt>
add    $0x20,%rsp
jmp    1379 <create_time_delta_string+0x219>
test   %r8d,%r8d
jle    1349 <create_time_delta_string+0x1e9>
lea    0xce3(%rip),%rdx
lea    0x10(%rsp),%rdi
mov    $0x19,%esi
mov    %r8d,%ecx
mov    %r9d,%r8d
mov    %r14d,%r9d
xor    %eax,%eax
push   %r11
push   %r10
jmp    1370 <create_time_delta_string+0x210>
test   %r9d,%r9d
jle    139a <create_time_delta_string+0x23a>
sub    $0x8,%rsp
lea    0xcbb(%rip),%rdx
lea    0x18(%rsp),%rdi
mov    $0x19,%esi
mov    %r9d,%ecx
mov    %r14d,%r8d
mov    %r10d,%r9d
xor    %eax,%eax
push   %r11
call   1040 <snprintf@plt>
add    $0x10,%rsp
xor    %edi,%edi
cmp    $0x19,%rax
setb   %dil
call   1050 <assert@plt>
lea    0x10(%rsp),%rdi
call   1060 <create_string@plt>
add    $0x38,%rsp
pop    %rbx
pop    %r14
ret
test   %r14d,%r14d
jle    13c2 <create_time_delta_string+0x262>
lea    0xc71(%rip),%rdx
lea    0x10(%rsp),%rdi
mov    $0x19,%esi
mov    %r14d,%ecx
mov    %r10d,%r8d
mov    %r11d,%r9d
xor    %eax,%eax
call   1040 <snprintf@plt>
jmp    1379 <create_time_delta_string+0x219>
test   %r10d,%r10d
jle    13e7 <create_time_delta_string+0x287>
lea    0xc4c(%rip),%rdx
lea    0x10(%rsp),%rdi
mov    $0x19,%esi
mov    %r10d,%ecx
mov    %r11d,%r8d
xor    %eax,%eax
call   1040 <snprintf@plt>
jmp    1379 <create_time_delta_string+0x219>
lea    0xc2f(%rip),%rdx
lea    0x10(%rsp),%rdi
mov    $0x19,%esi
mov    %r11d,%ecx
xor    %eax,%eax
call   1040 <snprintf@plt>
jmp    1379 <create_time_delta_string+0x219>

LLVM IR (-O0):
@errno = global i32 0
@.str = [14 x i8] c"time() failed\00"
@.str.1 = [19 x i8] c"%dy%dw%dd%dh%dm%ds\00"
@.str.2 = [16 x i8] c"%dw%dd%dh%dm%ds\00"
@.str.3 = [13 x i8] c"%dd%dh%dm%ds\00"
@.str.4 = [10 x i8] c"%dh%dm%ds\00"
@.str.5 = [7 x i8] c"%dm%ds\00"
@.str.6 = [4 x i8] c"%ds\00"
define i8* @create_time_delta_string(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca [25 x i8]
store i64 %0, i64* %3
store i64 %1, i64* %4
%13 = load i64, i64* %4
%14 = icmp eq i64 %13, -1
br i1 %14, label %15, label %22
15: ; preds = %2
%16 = call i64 @time(i64* %4)
%17 = icmp eq i64 %16, -1
br i1 %17, label %18, label %21
18: ; preds = %15
%19 = load i32, i32* @errno
%20 = call i32 @log_err(i32 %19, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %21
21: ; preds = %18, %15
br label %22
22: ; preds = %21, %2
%23 = load i64, i64* %4
%24 = load i64, i64* %3
%25 = call i64 @difftime(i64 %23, i64 %24)
store i64 %25, i64* %5
%26 = load i64, i64* %5
%27 = icmp sge i64 %26, 0
%28 = zext i1 %27 to i32
%29 = call i32 @assert(i32 %28)
%30 = load i64, i64* %5
%31 = srem i64 %30, 60
%32 = trunc i64 %31 to i32
store i32 %32, i32* %11
%33 = load i64, i64* %5
%34 = sdiv i64 %33, 60
store i64 %34, i64* %5
%35 = load i64, i64* %5
%36 = srem i64 %35, 60
%37 = trunc i64 %36 to i32
store i32 %37, i32* %10
%38 = load i64, i64* %5
%39 = sdiv i64 %38, 60
store i64 %39, i64* %5
%40 = load i64, i64* %5
%41 = srem i64 %40, 24
%42 = trunc i64 %41 to i32
store i32 %42, i32* %9
%43 = load i64, i64* %5
%44 = sdiv i64 %43, 24
store i64 %44, i64* %5
%45 = load i64, i64* %5
%46 = srem i64 %45, 7
%47 = trunc i64 %46 to i32
store i32 %47, i32* %8
%48 = load i64, i64* %5
%49 = sdiv i64 %48, 7
store i64 %49, i64* %5
%50 = load i64, i64* %5
%51 = srem i64 %50, 52
%52 = trunc i64 %51 to i32
store i32 %52, i32* %7
%53 = load i64, i64* %5
%54 = sdiv i64 %53, 52
store i64 %54, i64* %5
%55 = load i64, i64* %5
%56 = trunc i64 %55 to i32
store i32 %56, i32* %6
%57 = load i32, i32* %6
%58 = icmp sgt i32 %57, 0
br i1 %58, label %59, label %68
59: ; preds = %22
%60 = getelementptr inbounds [25 x i8], [25 x i8]* %12, i64 0, i64 0
%61 = load i32, i32* %6
%62 = load i32, i32* %7
%63 = load i32, i32* %8
%64 = load i32, i32* %9
%65 = load i32, i32* %10
%66 = load i32, i32* %11
%67 = call i64 (i8*, i32, i8*, i32, ...) @snprintf(i8* %60, i32 25, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %61, i32 %62, i32 %63, i32 %64, i32 %65, i32 %66)
store i64 %67, i64* %5
br label %114
68: ; preds = %22
%69 = load i32, i32* %7
%70 = icmp sgt i32 %69, 0
br i1 %70, label %71, label %79
71: ; preds = %68
%72 = getelementptr inbounds [25 x i8], [25 x i8]* %12, i64 0, i64 0
%73 = load i32, i32* %7
%74 = load i32, i32* %8
%75 = load i32, i32* %9
%76 = load i32, i32* %10
%77 = load i32, i32* %11
%78 = call i64 (i8*, i32, i8*, i32, ...) @snprintf(i8* %72, i32 25, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %73, i32 %74, i32 %75, i32 %76, i32 %77)
store i64 %78, i64* %5
br label %113
79: ; preds = %68
%80 = load i32, i32* %8
%81 = icmp sgt i32 %80, 0
br i1 %81, label %82, label %89
82: ; preds = %79
%83 = getelementptr inbounds [25 x i8], [25 x i8]* %12, i64 0, i64 0
%84 = load i32, i32* %8
%85 = load i32, i32* %9
%86 = load i32, i32* %10
%87 = load i32, i32* %11
%88 = call i64 (i8*, i32, i8*, i32, ...) @snprintf(i8* %83, i32 25, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 %84, i32 %85, i32 %86, i32 %87)
store i64 %88, i64* %5
br label %112
89: ; preds = %79
%90 = load i32, i32* %9
%91 = icmp sgt i32 %90, 0
br i1 %91, label %92, label %98
92: ; preds = %89
%93 = getelementptr inbounds [25 x i8], [25 x i8]* %12, i64 0, i64 0
%94 = load i32, i32* %9
%95 = load i32, i32* %10
%96 = load i32, i32* %11
%97 = call i64 (i8*, i32, i8*, i32, ...) @snprintf(i8* %93, i32 25, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %94, i32 %95, i32 %96)
store i64 %97, i64* %5
br label %111
98: ; preds = %89
%99 = load i32, i32* %10
%100 = icmp sgt i32 %99, 0
br i1 %100, label %101, label %106
101: ; preds = %98
%102 = getelementptr inbounds [25 x i8], [25 x i8]* %12, i64 0, i64 0
%103 = load i32, i32* %10
%104 = load i32, i32* %11
%105 = call i64 (i8*, i32, i8*, i32, ...) @snprintf(i8* %102, i32 25, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i32 %103, i32 %104)
store i64 %105, i64* %5
br label %110
106: ; preds = %98
%107 = getelementptr inbounds [25 x i8], [25 x i8]* %12, i64 0, i64 0
%108 = load i32, i32* %11
%109 = call i64 (i8*, i32, i8*, i32, ...) @snprintf(i8* %107, i32 25, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 %108)
store i64 %109, i64* %5
br label %110
110: ; preds = %106, %101
br label %111
111: ; preds = %110, %92
br label %112
112: ; preds = %111, %82
br label %113
113: ; preds = %112, %71
br label %114
114: ; preds = %113, %59
%115 = load i64, i64* %5
%116 = icmp sge i64 %115, 0
br i1 %116, label %117, label %120
117: ; preds = %114
%118 = load i64, i64* %5
%119 = icmp ult i64 %118, 25
br label %120
120: ; preds = %117, %114
%121 = phi i1 [ false, %114 ], [ %119, %117 ]
%122 = zext i1 %121 to i32
%123 = call i32 @assert(i32 %122)
%124 = getelementptr inbounds [25 x i8], [25 x i8]* %12, i64 0, i64 0
%125 = call i8* @create_string(i8* %124)
ret i8* %125
}

LLVM IR (-O2):
@errno = global i32 0
@.str = [14 x i8] c"time() failed\00"
@.str.1 = [19 x i8] c"%dy%dw%dd%dh%dm%ds\00"
@.str.2 = [16 x i8] c"%dw%dd%dh%dm%ds\00"
@.str.3 = [13 x i8] c"%dd%dh%dm%ds\00"
@.str.4 = [10 x i8] c"%dh%dm%ds\00"
@.str.5 = [7 x i8] c"%dm%ds\00"
@.str.6 = [4 x i8] c"%ds\00"
define i8* @create_time_delta_string(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca [25 x i8]
store i64 %1, i64* %3
%5 = getelementptr inbounds [25 x i8], [25 x i8]* %4, i64 0, i64 0
%6 = icmp eq i64 %1, -1
br i1 %6, label %7, label %13
7: ; preds = %2
%8 = call i64 @time(i64* %3)
%9 = icmp eq i64 %8, -1
br i1 %9, label %10, label %13
10: ; preds = %7
%11 = load i32, i32* @errno
%12 = call i32 @log_err(i32 %11, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %7, %10, %2
%14 = load i64, i64* %3
%15 = call i64 @difftime(i64 %14, i64 %0)
%16 = lshr i64 %15, 63
%17 = trunc i64 %16 to i32
%18 = xor i32 %17, 1
%19 = call i32 @assert(i32 %18)
%20 = srem i64 %15, 60
%21 = trunc i64 %20 to i32
%22 = sdiv i64 %15, 60
%23 = srem i64 %22, 60
%24 = trunc i64 %23 to i32
%25 = sdiv i64 %15, 3600
%26 = srem i64 %25, 24
%27 = trunc i64 %26 to i32
%28 = sdiv i64 %15, 86400
%29 = srem i64 %28, 7
%30 = trunc i64 %29 to i32
%31 = sdiv i64 %15, 604800
%32 = srem i64 %31, 52
%33 = trunc i64 %32 to i32
%34 = sdiv i64 %15, 31449600
%35 = trunc i64 %34 to i32
%36 = icmp sgt i32 %35, 0
br i1 %36, label %37, label %39
37: ; preds = %13
%38 = call i64 (i8*, i32, i8*, i32, ...) @snprintf(i8* %5, i32 25, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %35, i32 %33, i32 %30, i32 %27, i32 %24, i32 %21)
br label %57
39: ; preds = %13
%40 = icmp sgt i32 %33, 0
br i1 %40, label %41, label %43
41: ; preds = %39
%42 = call i64 (i8*, i32, i8*, i32, ...) @snprintf(i8* %5, i32 25, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %33, i32 %30, i32 %27, i32 %24, i32 %21)
br label %57
43: ; preds = %39
%44 = icmp sgt i32 %30, 0
br i1 %44, label %45, label %47
45: ; preds = %43
%46 = call i64 (i8*, i32, i8*, i32, ...) @snprintf(i8* %5, i32 25, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 %30, i32 %27, i32 %24, i32 %21)
br label %57
47: ; preds = %43
%48 = icmp sgt i32 %27, 0
br i1 %48, label %49, label %51
49: ; preds = %47
%50 = call i64 (i8*, i32, i8*, i32, ...) @snprintf(i8* %5, i32 25, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %27, i32 %24, i32 %21)
br label %57
51: ; preds = %47
%52 = icmp sgt i32 %24, 0
br i1 %52, label %53, label %55
53: ; preds = %51
%54 = call i64 (i8*, i32, i8*, i32, ...) @snprintf(i8* %5, i32 25, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i32 %24, i32 %21)
br label %57
55: ; preds = %51
%56 = call i64 (i8*, i32, i8*, i32, ...) @snprintf(i8* %5, i32 25, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i32 %21)
br label %57
57: ; preds = %41, %49, %55, %53, %45, %37
%58 = phi i64 [ %38, %37 ], [ %42, %41 ], [ %46, %45 ], [ %50, %49 ], [ %54, %53 ], [ %56, %55 ]
%59 = icmp ult i64 %58, 25
%60 = zext i1 %59 to i32
%61 = call i32 @assert(i32 %60)
%62 = call i8* @create_string(i8* %5)
ret i8* %62
}