#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;
struct timeval {
  int tv_sec;
  int tv_usec;
};
typedef int /*<<< orphan*/ result;

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int snprintf(char *, int, char *, int);
const char *sec2str(const struct timeval *total) {
  static char result[256];
  int days, hours, mins, secs;
  int first = 1;
  char *p = result;
  char *ep = &result[sizeof(result)];
  int n;
  struct timeval now;
  time_t tsec;
  gettimeofday(&now, NULL);
  tsec = total->tv_sec;
  tsec += total->tv_usec / 1000000;
  tsec -= now.tv_sec;
  tsec -= now.tv_usec / 1000000;
  days = tsec / 3600 / 24;
  hours = (tsec / 3600) % 24;
  mins = (tsec / 60) % 60;
  secs = tsec % 60;
  if (days) {
    first = 0;
    n = snprintf(p, ep - p, "%dd", days);
    if (n < 0 || n >= ep - p)
      return "?";
    p += n;
  }
  if (!first || hours) {
    first = 0;
    n = snprintf(p, ep - p, "%dh", hours);
    if (n < 0 || n >= ep - p)
      return "?";
    p += n;
  }
  if (!first || mins) {
    first = 0;
    n = snprintf(p, ep - p, "%dm", mins);
    if (n < 0 || n >= ep - p)
      return "?";
    p += n;
  }
  snprintf(p, ep - p, "%ds", secs);
  return (result);
}


x86 assembly (clang, -O0):
<sec2str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x1,-0x24(%rbp)
lea    0x2f06(%rip),%rax
mov    %rax,-0x30(%rbp)
lea    0x2efb(%rip),%rax
add    $0x100,%rax
mov    %rax,-0x38(%rbp)
lea    -0x48(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <gettimeofday@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%eax
mov    $0xf4240,%ecx
cltd
idiv   %ecx
add    -0x4c(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x48(%rbp),%ecx
mov    -0x4c(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x4c(%rbp)
mov    -0x44(%rbp),%eax
mov    $0xf4240,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x4c(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
mov    $0xe10,%ecx
cltd
idiv   %ecx
mov    $0x18,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0x4c(%rbp),%eax
mov    $0xe10,%ecx
cltd
idiv   %ecx
mov    $0x18,%ecx
cltd
idiv   %ecx
mov    %edx,-0x18(%rbp)
mov    -0x4c(%rbp),%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
mov    $0x3c,%ecx
cltd
idiv   %ecx
mov    %edx,-0x1c(%rbp)
mov    -0x4c(%rbp),%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
mov    %edx,-0x20(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1261 <sec2str+0x141>
movl   $0x0,-0x24(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rax
mov    -0x30(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,%esi
mov    -0x14(%rbp),%ecx
lea    0xdea(%rip),%rdx
call   1030 <snprintf@plt>
mov    %eax,-0x3c(%rbp)
cmpl   $0x0,-0x3c(%rbp)
jl     1240 <sec2str+0x120>
movslq -0x3c(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    -0x30(%rbp),%rdx
sub    %rdx,%rcx
cmp    %rcx,%rax
jl     1250 <sec2str+0x130>
lea    0xdbd(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    138e <sec2str+0x26e>
mov    -0x3c(%rbp),%ecx
mov    -0x30(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
cmpl   $0x0,-0x24(%rbp)
je     1275 <sec2str+0x155>
cmpl   $0x0,-0x18(%rbp)
je     12e2 <sec2str+0x1c2>
movl   $0x0,-0x24(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rax
mov    -0x30(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,%esi
mov    -0x18(%rbp),%ecx
lea    0xd6f(%rip),%rdx
call   1030 <snprintf@plt>
mov    %eax,-0x3c(%rbp)
cmpl   $0x0,-0x3c(%rbp)
jl     12c1 <sec2str+0x1a1>
movslq -0x3c(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    -0x30(%rbp),%rdx
sub    %rdx,%rcx
cmp    %rcx,%rax
jl     12d1 <sec2str+0x1b1>
lea    0xd3c(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    138e <sec2str+0x26e>
mov    -0x3c(%rbp),%ecx
mov    -0x30(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
cmpl   $0x0,-0x24(%rbp)
je     12f6 <sec2str+0x1d6>
cmpl   $0x0,-0x1c(%rbp)
je     1363 <sec2str+0x243>
movl   $0x0,-0x24(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rax
mov    -0x30(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,%esi
mov    -0x1c(%rbp),%ecx
lea    0xcf2(%rip),%rdx
call   1030 <snprintf@plt>
mov    %eax,-0x3c(%rbp)
cmpl   $0x0,-0x3c(%rbp)
jl     1342 <sec2str+0x222>
movslq -0x3c(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    -0x30(%rbp),%rdx
sub    %rdx,%rcx
cmp    %rcx,%rax
jl     1352 <sec2str+0x232>
lea    0xcbb(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    138e <sec2str+0x26e>
mov    -0x3c(%rbp),%ecx
mov    -0x30(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rax
mov    -0x30(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,%esi
mov    -0x20(%rbp),%ecx
lea    0xc90(%rip),%rdx
call   1030 <snprintf@plt>
lea    0x2cb6(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sec2str>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    %rsp,%rdi
xor    %esi,%esi
call   1040 <gettimeofday@plt>
movslq 0x4(%rbx),%rax
imul   $0x431bde83,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
sar    $0x12,%eax
add    %ecx,%eax
add    (%rbx),%eax
sub    (%rsp),%eax
movslq 0x4(%rsp),%rcx
imul   $0xffffffffbce4217d,%rcx,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x12,%ecx
add    %edx,%ecx
lea    (%rax,%rcx,1),%r14d
movslq %r14d,%rdx
imul   $0xffffffff91a2b3c5,%rdx,%rsi
shr    $0x20,%rsi
add    %r14d,%esi
mov    %esi,%edi
shr    $0x1f,%edi
sar    $0xb,%esi
add    %edi,%esi
movslq %esi,%r13
imul   $0x2aaaaaab,%r13,%rsi
mov    %rsi,%rdi
shr    $0x3f,%rdi
shr    $0x22,%rsi
add    %edi,%esi
shl    $0x3,%esi
lea    (%rsi,%rsi,2),%esi
sub    %esi,%r13d
imul   $0xffffffff88888889,%rdx,%rbp
shr    $0x20,%rbp
add    %r14d,%ebp
mov    %ebp,%esi
shr    $0x1f,%esi
sar    $0x5,%ebp
add    %esi,%ebp
movslq %ebp,%r15
imul   $0xffffffff88888889,%r15,%rsi
shr    $0x20,%rsi
add    %ebp,%esi
mov    %esi,%edi
shr    $0x1f,%edi
sar    $0x5,%esi
add    %edi,%esi
imul   $0x3c,%esi,%esi
sub    %esi,%r15d
add    %ecx,%eax
add    $0x1517f,%eax
cmp    $0x2a2ff,%eax
jae    1213 <sec2str+0xf3>
lea    0x2e40(%rip),%r12
test   %r13d,%r13d
jne    125e <sec2str+0x13e>
test   %r15d,%r15d
jne    1298 <sec2str+0x178>
jmp    12d2 <sec2str+0x1b2>
imul   $0xffffffffc22e4507,%rdx,%rcx
shr    $0x20,%rcx
add    %r14d,%ecx
mov    %ecx,%eax
shr    $0x1f,%eax
sar    $0x10,%ecx
add    %eax,%ecx
lea    0x2e0e(%rip),%r12
lea    0xdc7(%rip),%rdx
mov    %r12,%rdi
mov    $0x100,%esi
call   1030 <snprintf@plt>
cmp    $0xff,%eax
jbe    1259 <sec2str+0x139>
lea    0xdb0(%rip),%r13
jmp    12fd <sec2str+0x1dd>
mov    %eax,%eax
add    %rax,%r12
lea    0x2ddb(%rip),%rbx
sub    %r12,%rbx
add    $0x100,%rbx
lea    0xd90(%rip),%rdx
mov    %r12,%rdi
mov    %ebx,%esi
mov    %r13d,%ecx
call   1030 <snprintf@plt>
lea    0xd7a(%rip),%r13
test   %eax,%eax
js     12fd <sec2str+0x1dd>
mov    %eax,%eax
cmp    %rax,%rbx
jle    12fd <sec2str+0x1dd>
add    %rax,%r12
lea    0x2da1(%rip),%rbx
sub    %r12,%rbx
add    $0x100,%rbx
lea    0xd5a(%rip),%rdx
mov    %r12,%rdi
mov    %ebx,%esi
mov    %r15d,%ecx
call   1030 <snprintf@plt>
lea    0xd40(%rip),%r13
test   %eax,%eax
js     12fd <sec2str+0x1dd>
mov    %eax,%eax
cmp    %rax,%rbx
jle    12fd <sec2str+0x1dd>
add    %rax,%r12
imul   $0x3c,%ebp,%eax
sub    %eax,%r14d
lea    0x2d61(%rip),%r13
mov    %r13d,%esi
sub    %r12d,%esi
add    $0x100,%esi
lea    0xd1c(%rip),%rdx
mov    %r12,%rdi
mov    %r14d,%ecx
call   1030 <snprintf@plt>
mov    %r13,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
@sec2str.result = internal global [256 x i8] zeroinitializer
@.str = [4 x i8] c"%dd\00"
@.str.1 = [2 x i8] c"?\00"
@.str.2 = [4 x i8] c"%dh\00"
@.str.3 = [4 x i8] c"%dm\00"
@.str.4 = [4 x i8] c"%ds\00"
define i8* @sec2str(%struct.timeval* %0) {
%2 = alloca i8*
%3 = alloca %struct.timeval*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i32
%12 = alloca %struct.timeval
%13 = alloca i32
store %struct.timeval* %0, %struct.timeval** %3
store i32 1, i32* %8
store i8* getelementptr inbounds ([256 x i8], [256 x i8]* @sec2str.result, i64 0, i64 0), i8** %9
store i8* getelementptr inbounds ([256 x i8], [256 x i8]* @sec2str.result, i64 1, i64 0), i8** %10
%14 = call i32 @gettimeofday(%struct.timeval* %12, i32* null)
%15 = load %struct.timeval*, %struct.timeval** %3
%16 = getelementptr inbounds %struct.timeval, %struct.timeval* %15, i32 0, i32 0
%17 = load i32, i32* %16
store i32 %17, i32* %13
%18 = load %struct.timeval*, %struct.timeval** %3
%19 = getelementptr inbounds %struct.timeval, %struct.timeval* %18, i32 0, i32 1
%20 = load i32, i32* %19
%21 = sdiv i32 %20, 1000000
%22 = load i32, i32* %13
%23 = add nsw i32 %22, %21
store i32 %23, i32* %13
%24 = getelementptr inbounds %struct.timeval, %struct.timeval* %12, i32 0, i32 0
%25 = load i32, i32* %24
%26 = load i32, i32* %13
%27 = sub nsw i32 %26, %25
store i32 %27, i32* %13
%28 = getelementptr inbounds %struct.timeval, %struct.timeval* %12, i32 0, i32 1
%29 = load i32, i32* %28
%30 = sdiv i32 %29, 1000000
%31 = load i32, i32* %13
%32 = sub nsw i32 %31, %30
store i32 %32, i32* %13
%33 = load i32, i32* %13
%34 = sdiv i32 %33, 3600
%35 = sdiv i32 %34, 24
store i32 %35, i32* %4
%36 = load i32, i32* %13
%37 = sdiv i32 %36, 3600
%38 = srem i32 %37, 24
store i32 %38, i32* %5
%39 = load i32, i32* %13
%40 = sdiv i32 %39, 60
%41 = srem i32 %40, 60
store i32 %41, i32* %6
%42 = load i32, i32* %13
%43 = srem i32 %42, 60
store i32 %43, i32* %7
%44 = load i32, i32* %4
%45 = icmp ne i32 %44, 0
br i1 %45, label %46, label %73
46: ; preds = %1
store i32 0, i32* %8
%47 = load i8*, i8** %9
%48 = load i8*, i8** %10
%49 = load i8*, i8** %9
%50 = ptrtoint i8* %48 to i64
%51 = ptrtoint i8* %49 to i64
%52 = sub i64 %50, %51
%53 = trunc i64 %52 to i32
%54 = load i32, i32* %4
%55 = call i32 @snprintf(i8* %47, i32 %53, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %54)
store i32 %55, i32* %11
%56 = load i32, i32* %11
%57 = icmp slt i32 %56, 0
br i1 %57, label %67, label %58
58: ; preds = %46
%59 = load i32, i32* %11
%60 = sext i32 %59 to i64
%61 = load i8*, i8** %10
%62 = load i8*, i8** %9
%63 = ptrtoint i8* %61 to i64
%64 = ptrtoint i8* %62 to i64
%65 = sub i64 %63, %64
%66 = icmp sge i64 %60, %65
br i1 %66, label %67, label %68
67: ; preds = %58, %46
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %149
68: ; preds = %58
%69 = load i32, i32* %11
%70 = load i8*, i8** %9
%71 = sext i32 %69 to i64
%72 = getelementptr inbounds i8, i8* %70, i64 %71
store i8* %72, i8** %9
br label %73
73: ; preds = %68, %1
%74 = load i32, i32* %8
%75 = icmp ne i32 %74, 0
br i1 %75, label %76, label %79
76: ; preds = %73
%77 = load i32, i32* %5
%78 = icmp ne i32 %77, 0
br i1 %78, label %79, label %106
79: ; preds = %76, %73
store i32 0, i32* %8
%80 = load i8*, i8** %9
%81 = load i8*, i8** %10
%82 = load i8*, i8** %9
%83 = ptrtoint i8* %81 to i64
%84 = ptrtoint i8* %82 to i64
%85 = sub i64 %83, %84
%86 = trunc i64 %85 to i32
%87 = load i32, i32* %5
%88 = call i32 @snprintf(i8* %80, i32 %86, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %87)
store i32 %88, i32* %11
%89 = load i32, i32* %11
%90 = icmp slt i32 %89, 0
br i1 %90, label %100, label %91
91: ; preds = %79
%92 = load i32, i32* %11
%93 = sext i32 %92 to i64
%94 = load i8*, i8** %10
%95 = load i8*, i8** %9
%96 = ptrtoint i8* %94 to i64
%97 = ptrtoint i8* %95 to i64
%98 = sub i64 %96, %97
%99 = icmp sge i64 %93, %98
br i1 %99, label %100, label %101
100: ; preds = %91, %79
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %149
101: ; preds = %91
%102 = load i32, i32* %11
%103 = load i8*, i8** %9
%104 = sext i32 %102 to i64
%105 = getelementptr inbounds i8, i8* %103, i64 %104
store i8* %105, i8** %9
br label %106
106: ; preds = %101, %76
%107 = load i32, i32* %8
%108 = icmp ne i32 %107, 0
br i1 %108, label %109, label %112
109: ; preds = %106
%110 = load i32, i32* %6
%111 = icmp ne i32 %110, 0
br i1 %111, label %112, label %139
112: ; preds = %109, %106
store i32 0, i32* %8
%113 = load i8*, i8** %9
%114 = load i8*, i8** %10
%115 = load i8*, i8** %9
%116 = ptrtoint i8* %114 to i64
%117 = ptrtoint i8* %115 to i64
%118 = sub i64 %116, %117
%119 = trunc i64 %118 to i32
%120 = load i32, i32* %6
%121 = call i32 @snprintf(i8* %113, i32 %119, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %120)
store i32 %121, i32* %11
%122 = load i32, i32* %11
%123 = icmp slt i32 %122, 0
br i1 %123, label %133, label %124
124: ; preds = %112
%125 = load i32, i32* %11
%126 = sext i32 %125 to i64
%127 = load i8*, i8** %10
%128 = load i8*, i8** %9
%129 = ptrtoint i8* %127 to i64
%130 = ptrtoint i8* %128 to i64
%131 = sub i64 %129, %130
%132 = icmp sge i64 %126, %131
br i1 %132, label %133, label %134
133: ; preds = %124, %112
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %149
134: ; preds = %124
%135 = load i32, i32* %11
%136 = load i8*, i8** %9
%137 = sext i32 %135 to i64
%138 = getelementptr inbounds i8, i8* %136, i64 %137
store i8* %138, i8** %9
br label %139
139: ; preds = %134, %109
%140 = load i8*, i8** %9
%141 = load i8*, i8** %10
%142 = load i8*, i8** %9
%143 = ptrtoint i8* %141 to i64
%144 = ptrtoint i8* %142 to i64
%145 = sub i64 %143, %144
%146 = trunc i64 %145 to i32
%147 = load i32, i32* %7
%148 = call i32 @snprintf(i8* %140, i32 %146, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 %147)
store i8* getelementptr inbounds ([256 x i8], [256 x i8]* @sec2str.result, i64 0, i64 0), i8** %2
br label %149
149: ; preds = %139, %133, %100, %67
%150 = load i8*, i8** %2
ret i8* %150
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
@sec2str.result = internal global [256 x i8] zeroinitializer
@.str = [4 x i8] c"%dd\00"
@.str.1 = [2 x i8] c"?\00"
@.str.2 = [4 x i8] c"%dh\00"
@.str.3 = [4 x i8] c"%dm\00"
@.str.4 = [4 x i8] c"%ds\00"
define i8* @sec2str(%struct.timeval* nocapture %0) {
%2 = alloca %struct.timeval
%3 = bitcast %struct.timeval* %2 to i8*
%4 = call i32 @gettimeofday(%struct.timeval* %2, i32* null)
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 0
%6 = load i32, i32* %5
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 1
%8 = load i32, i32* %7
%9 = sdiv i32 %8, 1000000
%10 = add nsw i32 %9, %6
%11 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i64 0, i32 0
%12 = load i32, i32* %11
%13 = sub i32 %10, %12
%14 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i64 0, i32 1
%15 = load i32, i32* %14
%16 = sdiv i32 %15, -1000000
%17 = add i32 %13, %16
%18 = sdiv i32 %17, 3600
%19 = srem i32 %18, 24
%20 = sdiv i32 %17, 60
%21 = srem i32 %20, 60
%22 = srem i32 %17, 60
%23 = add i32 %17, 86399
%24 = icmp ult i32 %23, 172799
br i1 %24, label %32, label %25
25: ; preds = %1
%26 = sdiv i32 %17, 86400
%27 = tail call i32 @snprintf(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @sec2str.result, i64 0, i64 0), i32 256, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %26)
%28 = icmp ugt i32 %27, 255
br i1 %28, label %66, label %29
29: ; preds = %25
%30 = zext i32 %27 to i64
%31 = getelementptr inbounds [256 x i8], [256 x i8]* @sec2str.result, i64 0, i64 %30
br label %34
32: ; preds = %1
%33 = icmp eq i32 %19, 0
br i1 %33, label %46, label %34
34: ; preds = %29, %32
%35 = phi i8* [ %31, %29 ], [ getelementptr inbounds ([256 x i8], [256 x i8]* @sec2str.result, i64 0, i64 0), %32 ]
%36 = ptrtoint i8* %35 to i64
%37 = sub i64 ptrtoint (i8* getelementptr inbounds ([256 x i8], [256 x i8]* @sec2str.result, i64 1, i64 0) to i64), %36
%38 = trunc i64 %37 to i32
%39 = tail call i32 @snprintf(i8* %35, i32 %38, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %19)
%40 = icmp slt i32 %39, 0
br i1 %40, label %66, label %41
41: ; preds = %34
%42 = zext i32 %39 to i64
%43 = icmp sgt i64 %37, %42
br i1 %43, label %44, label %66
44: ; preds = %41
%45 = getelementptr inbounds i8, i8* %35, i64 %42
br label %48
46: ; preds = %32
%47 = icmp eq i32 %21, 0
br i1 %47, label %60, label %48
48: ; preds = %44, %46
%49 = phi i8* [ %45, %44 ], [ getelementptr inbounds ([256 x i8], [256 x i8]* @sec2str.result, i64 0, i64 0), %46 ]
%50 = ptrtoint i8* %49 to i64
%51 = sub i64 ptrtoint (i8* getelementptr inbounds ([256 x i8], [256 x i8]* @sec2str.result, i64 1, i64 0) to i64), %50
%52 = trunc i64 %51 to i32
%53 = tail call i32 @snprintf(i8* %49, i32 %52, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %21)
%54 = icmp slt i32 %53, 0
br i1 %54, label %66, label %55
55: ; preds = %48
%56 = zext i32 %53 to i64
%57 = icmp sgt i64 %51, %56
br i1 %57, label %58, label %66
58: ; preds = %55
%59 = getelementptr inbounds i8, i8* %49, i64 %56
br label %60
60: ; preds = %46, %58
%61 = phi i8* [ %59, %58 ], [ getelementptr inbounds ([256 x i8], [256 x i8]* @sec2str.result, i64 0, i64 0), %46 ]
%62 = ptrtoint i8* %61 to i64
%63 = trunc i64 %62 to i32
%64 = sub i32 ptrtoint (i8* getelementptr inbounds ([256 x i8], [256 x i8]* @sec2str.result, i64 1, i64 0) to i32), %63
%65 = tail call i32 @snprintf(i8* %61, i32 %64, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 %22)
br label %66
66: ; preds = %48, %55, %34, %41, %25, %60
%67 = phi i8* [ getelementptr inbounds ([256 x i8], [256 x i8]* @sec2str.result, i64 0, i64 0), %60 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), %25 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), %41 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), %34 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), %55 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), %48 ]
ret i8* %67
}