#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 */

/* Variables and functions */
int /*<<< orphan*/ package_dump_day(char *, int);
int /*<<< orphan*/ printf(char *, ...);
int write_buffer(int, char *, char *);
int dump_memmory_state(int tty, unsigned int days_in_log) {
  char buffer[17];
  int res;
  int pos = 0;
  unsigned int check = days_in_log;
  for (pos = 0; pos < 32; pos++) {
    if (check & 1) {
      printf("-- dump for %d days back:\n", pos);
      package_dump_day(buffer, pos);
      res = write_buffer(tty, buffer, NULL);
      if (res < 17) {
        printf("Can't write = %d\n", res);
        return res;
      }
      int k;
      float sleep_time = 0;
      int steps_amount = 0;
      int energy_amount = 0;
      int full_distance = 0;
      for (k = 0; k < 96; k++) {
        res = write_buffer(tty, NULL, buffer);
        if (res < 17) {
          printf("Can't write = %d\n", res);
          return res;
        } else {
          if (buffer[0] != 0x5a || buffer[1] != 0x43) {
            printf("-- wrong opperation code\n");
          }
          if ((unsigned char)buffer[2] == (unsigned char)0xf0) {
            char year = buffer[3];
            char month = buffer[4];
            char day = buffer[5];
            char hour = buffer[6] / 4;
            char minutes = (buffer[6] * 15) % 60;
            int seconds = 0;
            if ((unsigned char)buffer[7] == (unsigned char)0xff) {
              int second_interval;
              for (second_interval = 0; second_interval < 8;
                   second_interval++) {
                seconds = second_interval * 112.5;
                printf("-- %02x.%02x.%02x %02d:%02d:%02d :>", year, month, day,
                       hour, (int)(minutes + seconds / 60),
                       ((int)seconds) % 60);
                char sleep_value = buffer[0x08 + second_interval];
                char *sleep_type = "deep";
                if (sleep_value > 10) {
                  sleep_type = "does not";
                } else if (sleep_value > 5) {
                  sleep_type = "light";
                }
                if (sleep_value < 10) {
                  sleep_time += 112.5;
                }
                printf(" %s sleep (%02x)\n", sleep_type, sleep_value);
              }
            } else if ((unsigned char)buffer[7] == (unsigned char)0x00) {
              int energy = (unsigned char)buffer[8];
              energy += ((unsigned char)buffer[9]) << 8;
              energy_amount += energy;
              int steps = (unsigned char)buffer[10];
              steps += ((unsigned char)buffer[11]) << 8;
              steps_amount += steps;
              int distance = (unsigned char)buffer[12];
              distance += ((unsigned char)buffer[13]) << 8;
              full_distance += distance;
              if (distance || steps || energy)
                printf("-- %02x.%02x.%02x %02d:%02d:%02d :>%5d steps, %3.3f "
                       "km, %3.1f kkal\n",
                       year, month, day, hour, minutes, seconds, steps,
                       (float)distance / 1000, (float)energy / 10);
            } else {
              printf("-- %02x.%02x.%02x %02d:%02d:%02d :>", year, month, day,
                     hour, minutes, seconds);
              printf("s/w?\n");
            }
          } else if (buffer[2] == 0x00) {
            if ((unsigned char)buffer[3] == (unsigned char)0xff) {
              printf("-- no data for such day\n");
              break;
            } else if (buffer[3] != 0x00) {
              printf("-- unknow value\n");
            }
          } else {
            printf("-- unknow value\n");
          }
        }
      }
      printf("++ summary %d days back: %.2fh sleep, %.3f km, %.1f kkal, %d "
             "steps\n",
             pos, sleep_time / 3600, (float)full_distance / 1000,
             (float)energy_amount / 10, steps_amount);
    }
    check = check >> 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<dump_memmory_state>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x2c(%rbp)
movl   $0x0,-0x28(%rbp)
cmpl   $0x20,-0x28(%rbp)
jge    15d5 <dump_memmory_state+0x4a5>
mov    -0x2c(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     15be <dump_memmory_state+0x48e>
mov    -0x28(%rbp),%esi
lea    0xea0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%esi
call   1050 <package_dump_day@plt>
mov    -0x8(%rbp),%edi
lea    -0x20(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <write_buffer@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x11,-0x24(%rbp)
jge    11c4 <dump_memmory_state+0x94>
mov    -0x24(%rbp),%esi
lea    0xe81(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x24(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    15dc <dump_memmory_state+0x4ac>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x34(%rbp)
movl   $0x0,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
movl   $0x0,-0x40(%rbp)
movl   $0x0,-0x30(%rbp)
cmpl   $0x60,-0x30(%rbp)
jge    156b <dump_memmory_state+0x43b>
mov    -0x8(%rbp),%edi
lea    -0x20(%rbp),%rdx
xor    %eax,%eax
mov    %eax,%esi
call   1030 <write_buffer@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x11,-0x24(%rbp)
jge    122b <dump_memmory_state+0xfb>
mov    -0x24(%rbp),%esi
lea    0xe1a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x24(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    15dc <dump_memmory_state+0x4ac>
movsbl -0x20(%rbp),%eax
cmp    $0x5a,%eax
jne    1245 <dump_memmory_state+0x115>
movsbl -0x1f(%rbp),%eax
cmp    $0x43,%eax
je     1253 <dump_memmory_state+0x123>
lea    0xdf9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movzbl -0x1e(%rbp),%eax
cmp    $0xf0,%eax
jne    14ec <dump_memmory_state+0x3bc>
mov    -0x1d(%rbp),%al
mov    %al,-0x41(%rbp)
mov    -0x1c(%rbp),%al
mov    %al,-0x42(%rbp)
mov    -0x1b(%rbp),%al
mov    %al,-0x43(%rbp)
movsbl -0x1a(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %al,-0x44(%rbp)
movsbl -0x1a(%rbp),%eax
imul   $0xf,%eax,%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
mov    %dl,%al
mov    %al,-0x45(%rbp)
movl   $0x0,-0x4c(%rbp)
movzbl -0x19(%rbp),%eax
cmp    $0xff,%eax
jne    13c6 <dump_memmory_state+0x296>
movl   $0x0,-0x50(%rbp)
cmpl   $0x8,-0x50(%rbp)
jge    13c1 <dump_memmory_state+0x291>
cvtsi2sdl -0x50(%rbp),%xmm0
movsd  0xd45(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x4c(%rbp)
movsbl -0x41(%rbp),%esi
movsbl -0x42(%rbp),%eax
mov    %eax,-0x70(%rbp)
movsbl -0x43(%rbp),%ecx
movsbl -0x44(%rbp),%r8d
movsbl -0x45(%rbp),%r9d
mov    -0x4c(%rbp),%eax
mov    $0x3c,%edi
cltd
idiv   %edi
add    %eax,%r9d
mov    -0x4c(%rbp),%eax
mov    $0x3c,%edi
cltd
idiv   %edi
mov    %edx,%eax
mov    -0x70(%rbp),%edx
lea    0xd4b(%rip),%rdi
mov    %eax,(%rsp)
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x50(%rbp),%eax
add    $0x8,%eax
cltq
mov    -0x20(%rbp,%rax,1),%al
mov    %al,-0x51(%rbp)
lea    0xd4f(%rip),%rax
mov    %rax,-0x60(%rbp)
movsbl -0x51(%rbp),%eax
cmp    $0xa,%eax
jle    1355 <dump_memmory_state+0x225>
lea    0xd3c(%rip),%rax
mov    %rax,-0x60(%rbp)
jmp    1372 <dump_memmory_state+0x242>
movsbl -0x51(%rbp),%eax
cmp    $0x5,%eax
jle    136d <dump_memmory_state+0x23d>
lea    0xd28(%rip),%rax
mov    %rax,-0x60(%rbp)
jmp    1372 <dump_memmory_state+0x242>
movsbl -0x51(%rbp),%eax
cmp    $0xa,%eax
jge    139d <dump_memmory_state+0x26d>
movss  -0x34(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xc80(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x34(%rbp)
mov    -0x60(%rbp),%rsi
movsbl -0x51(%rbp),%edx
lea    0xceb(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    12b4 <dump_memmory_state+0x184>
jmp    14e7 <dump_memmory_state+0x3b7>
movzbl -0x19(%rbp),%eax
cmp    $0x0,%eax
jne    14aa <dump_memmory_state+0x37a>
movzbl -0x18(%rbp),%eax
mov    %eax,-0x64(%rbp)
movzbl -0x17(%rbp),%eax
shl    $0x8,%eax
add    -0x64(%rbp),%eax
mov    %eax,-0x64(%rbp)
mov    -0x64(%rbp),%eax
add    -0x3c(%rbp),%eax
mov    %eax,-0x3c(%rbp)
movzbl -0x16(%rbp),%eax
mov    %eax,-0x68(%rbp)
movzbl -0x15(%rbp),%eax
shl    $0x8,%eax
add    -0x68(%rbp),%eax
mov    %eax,-0x68(%rbp)
mov    -0x68(%rbp),%eax
add    -0x38(%rbp),%eax
mov    %eax,-0x38(%rbp)
movzbl -0x14(%rbp),%eax
mov    %eax,-0x6c(%rbp)
movzbl -0x13(%rbp),%eax
shl    $0x8,%eax
add    -0x6c(%rbp),%eax
mov    %eax,-0x6c(%rbp)
mov    -0x6c(%rbp),%eax
add    -0x40(%rbp),%eax
mov    %eax,-0x40(%rbp)
cmpl   $0x0,-0x6c(%rbp)
jne    1448 <dump_memmory_state+0x318>
cmpl   $0x0,-0x68(%rbp)
jne    1448 <dump_memmory_state+0x318>
cmpl   $0x0,-0x64(%rbp)
je     14a5 <dump_memmory_state+0x375>
movsbl -0x41(%rbp),%esi
movsbl -0x42(%rbp),%edx
movsbl -0x43(%rbp),%ecx
movsbl -0x44(%rbp),%r8d
movsbl -0x45(%rbp),%r9d
mov    -0x4c(%rbp),%r10d
mov    -0x68(%rbp),%eax
cvtsi2ssl -0x6c(%rbp),%xmm0
movss  0xb92(%rip),%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
cvtsi2ssl -0x64(%rbp),%xmm1
movss  0xb79(%rip),%xmm2
divss  %xmm2,%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xc13(%rip),%rdi
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x2,%al
call   1040 <printf@plt>
jmp    14e2 <dump_memmory_state+0x3b2>
movsbl -0x41(%rbp),%esi
movsbl -0x42(%rbp),%edx
movsbl -0x43(%rbp),%ecx
movsbl -0x44(%rbp),%r8d
movsbl -0x45(%rbp),%r9d
mov    -0x4c(%rbp),%eax
lea    0xb95(%rip),%rdi
mov    %eax,(%rsp)
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xc12(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    14e7 <dump_memmory_state+0x3b7>
jmp    1553 <dump_memmory_state+0x423>
movsbl -0x1e(%rbp),%eax
cmp    $0x0,%eax
jne    1540 <dump_memmory_state+0x410>
movzbl -0x1d(%rbp),%eax
cmp    $0xff,%eax
jne    151b <dump_memmory_state+0x3eb>
lea    0xbe4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    156b <dump_memmory_state+0x43b>
movsbl -0x1d(%rbp),%eax
cmp    $0x0,%eax
je     1536 <dump_memmory_state+0x406>
lea    0xbdd(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    153b <dump_memmory_state+0x40b>
jmp    154e <dump_memmory_state+0x41e>
lea    0xbc5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1553 <dump_memmory_state+0x423>
jmp    1558 <dump_memmory_state+0x428>
jmp    155d <dump_memmory_state+0x42d>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    11e8 <dump_memmory_state+0xb8>
mov    -0x28(%rbp),%esi
movss  -0x34(%rbp),%xmm0
movss  0xa8d(%rip),%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
cvtsi2ssl -0x40(%rbp),%xmm1
movss  0xa74(%rip),%xmm2
divss  %xmm2,%xmm1
cvtss2sd %xmm1,%xmm1
cvtsi2ssl -0x3c(%rbp),%xmm2
movss  0xa5b(%rip),%xmm3
divss  %xmm3,%xmm2
cvtss2sd %xmm2,%xmm2
mov    -0x38(%rbp),%edx
lea    0xb66(%rip),%rdi
mov    $0x3,%al
call   1040 <printf@plt>
mov    -0x2c(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1155 <dump_memmory_state+0x25>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_memmory_state>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %edi,%r14d
lea    0xec0(%rip),%rdi
lea    0x20(%rsp),%r15
xor    %ebx,%ebx
mov    %r14d,0x54(%rsp)
jmp    11ed <dump_memmory_state+0xad>
lea    0xfb7(%rip),%rdi
call   1030 <puts@plt>
cs nopw 0x0(%rax,%rax,1)
nop
movss  0x14(%rsp),%xmm0
divss  0xe7e(%rip),%xmm0
xorps  %xmm1,%xmm1
cvtsi2ssl 0x44(%rsp),%xmm1
cvtss2sd %xmm0,%xmm0
xorps  %xmm2,%xmm2
cvtsi2ssl 0x48(%rsp),%xmm2
divss  0xe54(%rip),%xmm1
cvtss2sd %xmm1,%xmm1
divss  0xe4c(%rip),%xmm2
cvtss2sd %xmm2,%xmm2
lea    0xf10(%rip),%rdi
mov    0x4c(%rsp),%ebx
mov    %ebx,%esi
mov    0x40(%rsp),%edx
mov    $0x3,%al
call   1050 <printf@plt>
mov    0x50(%rsp),%esi
lea    0xe39(%rip),%rdi
shr    %esi
add    $0x1,%ebx
cmp    $0x20,%ebx
je     1519 <dump_memmory_state+0x3d9>
test   $0x1,%sil
je     11df <dump_memmory_state+0x9f>
mov    %esi,0x50(%rsp)
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r15,%rdi
mov    %ebx,0x4c(%rsp)
mov    %ebx,%esi
call   1060 <package_dump_day@plt>
mov    %r14d,%edi
mov    %r15,%rsi
xor    %edx,%edx
call   1040 <write_buffer@plt>
cmp    $0x11,%eax
jl     14f6 <dump_memmory_state+0x3b6>
xorps  %xmm0,%xmm0
movss  %xmm0,0x14(%rsp)
xor    %ebp,%ebp
movl   $0x0,0x44(%rsp)
movl   $0x0,0x48(%rsp)
movl   $0x0,0x40(%rsp)
jmp    1268 <dump_memmory_state+0x128>
nopl   0x0(%rax)
lea    0xec0(%rip),%rdi
call   1030 <puts@plt>
add    $0x1,%ebp
cmp    $0x60,%ebp
je     1180 <dump_memmory_state+0x40>
mov    %r14d,%edi
xor    %esi,%esi
mov    %r15,%rdx
call   1040 <write_buffer@plt>
cmp    $0x11,%eax
jl     14f6 <dump_memmory_state+0x3b6>
cmpb   $0x5a,0x20(%rsp)
jne    128c <dump_memmory_state+0x14c>
cmpb   $0x43,0x21(%rsp)
je     1298 <dump_memmory_state+0x158>
lea    0xeb1(%rip),%rdi
call   1030 <puts@plt>
mov    0x22(%rsp),%al
test   %al,%al
je     1410 <dump_memmory_state+0x2d0>
cmp    $0xf0,%al
jne    1250 <dump_memmory_state+0x110>
mov    %ebp,0x1c(%rsp)
movsbl 0x23(%rsp),%r15d
movsbl 0x24(%rsp),%ebx
movsbl 0x25(%rsp),%r12d
movsbl 0x26(%rsp),%eax
mov    %eax,%ecx
sar    $0x7,%cl
shr    $0x6,%cl
add    %al,%cl
sar    $0x2,%cl
movsbl %cl,%ebp
lea    (%rax,%rax,4),%eax
lea    (%rax,%rax,2),%eax
movswl %ax,%ecx
imul   $0xffff8889,%ecx,%ecx
shr    $0x10,%ecx
add    %eax,%ecx
movzwl %cx,%ecx
movswl %cx,%edx
shr    $0xf,%ecx
sar    $0x5,%edx
add    %ecx,%edx
imul   $0x3c,%edx,%ecx
sub    %ecx,%eax
movswl %ax,%r13d
mov    0x27(%rsp),%al
test   %al,%al
je     1429 <dump_memmory_state+0x2e9>
cmp    $0xff,%al
jne    14a6 <dump_memmory_state+0x366>
xor    %r14d,%r14d
movss  0x14(%rsp),%xmm0
movss  %xmm0,0x18(%rsp)
jmp    1358 <dump_memmory_state+0x218>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    0xd46(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%r14
movss  0x18(%rsp),%xmm0
movss  %xmm0,0x14(%rsp)
cmp    $0x8,%r14
je     14d7 <dump_memmory_state+0x397>
xorps  %xmm0,%xmm0
cvtsi2sd %r14d,%xmm0
mulsd  0xca8(%rip),%xmm0
cvttsd2si %xmm0,%eax
cltq
imul   $0xffffffff88888889,%rax,%r9
shr    $0x20,%r9
add    %eax,%r9d
mov    %r9d,%ecx
shr    $0x1f,%ecx
sar    $0x5,%r9d
add    %ecx,%r9d
imul   $0x3c,%r9d,%ecx
add    %r13d,%r9d
sub    %ecx,%eax
mov    %eax,(%rsp)
lea    0xca9(%rip),%rdi
mov    %r15d,%esi
mov    %ebx,%edx
mov    %r12d,%ecx
mov    %ebp,%r8d
xor    %eax,%eax
call   1050 <printf@plt>
movsbl 0x28(%rsp,%r14,1),%edx
cmp    $0x6,%edx
lea    0xcab(%rip),%rsi
lea    0xcb2(%rip),%rax
cmovge %rax,%rsi
cmp    $0xb,%edx
lea    0xc9b(%rip),%rax
cmovge %rax,%rsi
movss  0x18(%rsp),%xmm0
addss  0xc23(%rip),%xmm0
movss  %xmm0,0x18(%rsp)
cmp    $0xa,%edx
jl     1330 <dump_memmory_state+0x1f0>
movss  0x14(%rsp),%xmm0
movss  %xmm0,0x18(%rsp)
jmp    1330 <dump_memmory_state+0x1f0>
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x23(%rsp),%al
test   %al,%al
je     125c <dump_memmory_state+0x11c>
cmp    $0xff,%al
jne    1250 <dump_memmory_state+0x110>
jmp    1169 <dump_memmory_state+0x29>
movzwl 0x28(%rsp),%ecx
add    %ecx,0x48(%rsp)
movzwl 0x2a(%rsp),%eax
mov    0x40(%rsp),%esi
add    %eax,%esi
movzwl 0x2c(%rsp),%edx
add    %edx,0x44(%rsp)
test   %edx,%edx
mov    %esi,0x40(%rsp)
jne    145a <dump_memmory_state+0x31a>
test   %eax,%eax
jne    145a <dump_memmory_state+0x31a>
test   %ecx,%ecx
je     14e8 <dump_memmory_state+0x3a8>
xorps  %xmm0,%xmm0
cvtsi2ss %edx,%xmm0
cvtsi2ss %ecx,%xmm1
divss  0xb93(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
divss  0xb8b(%rip),%xmm1
cvtss2sd %xmm1,%xmm1
mov    %eax,0x8(%rsp)
movl   $0x0,(%rsp)
lea    0xc00(%rip),%rdi
mov    %r15d,%esi
mov    %ebx,%edx
mov    %r12d,%ecx
mov    %ebp,%r8d
mov    %r13d,%r9d
mov    $0x2,%al
call   1050 <printf@plt>
jmp    14e8 <dump_memmory_state+0x3a8>
movl   $0x0,(%rsp)
lea    0xb91(%rip),%rdi
mov    %r15d,%esi
mov    %ebx,%edx
mov    %r12d,%ecx
mov    %ebp,%r8d
mov    %r13d,%r9d
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xc6f(%rip),%rdi
call   1030 <puts@plt>
jmp    14e8 <dump_memmory_state+0x3a8>
movss  0x18(%rsp),%xmm0
movss  %xmm0,0x14(%rsp)
mov    0x54(%rsp),%r14d
lea    0x20(%rsp),%r15
mov    0x1c(%rsp),%ebp
jmp    125c <dump_memmory_state+0x11c>
mov    %eax,%ebx
lea    0xb34(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %ebx,%eax
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %ebx,%ebx
jmp    1508 <dump_memmory_state+0x3c8>

LLVM IR (-O0):
@.str = [27 x i8] c"-- dump for %d days back:\0A\00"
@.str.1 = [18 x i8] c"Can't write = %d\0A\00"
@.str.2 = [26 x i8] c"-- wrong opperation code\0A\00"
@.str.3 = [36 x i8] c"-- %02x.%02x.%02x %02d:%02d:%02d :>\00"
@.str.4 = [5 x i8] c"deep\00"
@.str.5 = [9 x i8] c"does not\00"
@.str.6 = [6 x i8] c"light\00"
@.str.7 = [18 x i8] c" %s sleep (%02x)\0A\00"
@.str.8 = [68 x i8] c"-- %02x.%02x.%02x %02d:%02d:%02d :>%5d steps, %3.3f km, %3.1f kkal\0A\00"
@.str.9 = [6 x i8] c"s/w?\0A\00"
@.str.10 = [25 x i8] c"-- no data for such day\0A\00"
@.str.11 = [17 x i8] c"-- unknow value\0A\00"
@.str.12 = [68 x i8] c"++ summary %d days back: %.2fh sleep, %.3f km, %.1f kkal, %d steps\0A\00"
define i32 @dump_memmory_state(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca [17 x i8]
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca float
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i8
%16 = alloca i8
%17 = alloca i8
%18 = alloca i8
%19 = alloca i8
%20 = alloca i32
%21 = alloca i32
%22 = alloca i8
%23 = alloca i8*
%24 = alloca i32
%25 = alloca i32
%26 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 0, i32* %8
%27 = load i32, i32* %5
store i32 %27, i32* %9
store i32 0, i32* %8
br label %28
28: ; preds = %297, %2
%29 = load i32, i32* %8
%30 = icmp slt i32 %29, 32
br i1 %30, label %31, label %300
31: ; preds = %28
%32 = load i32, i32* %9
%33 = and i32 %32, 1
%34 = icmp ne i32 %33, 0
br i1 %34, label %35, label %294
35: ; preds = %31
%36 = load i32, i32* %8
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %36)
%38 = getelementptr inbounds [17 x i8], [17 x i8]* %6, i64 0, i64 0
%39 = load i32, i32* %8
%40 = call i32 @package_dump_day(i8* %38, i32 %39)
%41 = load i32, i32* %4
%42 = getelementptr inbounds [17 x i8], [17 x i8]* %6, i64 0, i64 0
%43 = call i32 @write_buffer(i32 %41, i8* %42, i8* null)
store i32 %43, i32* %7
%44 = load i32, i32* %7
%45 = icmp slt i32 %44, 17
br i1 %45, label %46, label %50
46: ; preds = %35
%47 = load i32, i32* %7
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 %47)
%49 = load i32, i32* %7
store i32 %49, i32* %3
br label %301
50: ; preds = %35
store float 0.000000e+00, float* %11
store i32 0, i32* %12
store i32 0, i32* %13
store i32 0, i32* %14
store i32 0, i32* %10
br label %51
51: ; preds = %276, %50
%52 = load i32, i32* %10
%53 = icmp slt i32 %52, 96
br i1 %53, label %54, label %279
54: ; preds = %51
%55 = load i32, i32* %4
%56 = getelementptr inbounds [17 x i8], [17 x i8]* %6, i64 0, i64 0
%57 = call i32 @write_buffer(i32 %55, i8* null, i8* %56)
store i32 %57, i32* %7
%58 = load i32, i32* %7
%59 = icmp slt i32 %58, 17
br i1 %59, label %60, label %64
60: ; preds = %54
%61 = load i32, i32* %7
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 %61)
%63 = load i32, i32* %7
store i32 %63, i32* %3
br label %301
64: ; preds = %54
%65 = getelementptr inbounds [17 x i8], [17 x i8]* %6, i64 0, i64 0
%66 = load i8, i8* %65
%67 = sext i8 %66 to i32
%68 = icmp ne i32 %67, 90
br i1 %68, label %74, label %69
69: ; preds = %64
%70 = getelementptr inbounds [17 x i8], [17 x i8]* %6, i64 0, i64 1
%71 = load i8, i8* %70
%72 = sext i8 %71 to i32
%73 = icmp ne i32 %72, 67
br i1 %73, label %74, label %76
74: ; preds = %69, %64
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
br label %76
76: ; preds = %74, %69
%77 = getelementptr inbounds [17 x i8], [17 x i8]* %6, i64 0, i64 2
%78 = load i8, i8* %77
%79 = zext i8 %78 to i32
%80 = icmp eq i32 %79, 240
br i1 %80, label %81, label %250
81: ; preds = %76
%82 = getelementptr inbounds [17 x i8], [17 x i8]* %6, i64 0, i64 3
%83 = load i8, i8* %82
store i8 %83, i8* %15
%84 = getelementptr inbounds [17 x i8], [17 x i8]* %6, i64 0, i64 4
%85 = load i8, i8* %84
store i8 %85, i8* %16
%86 = getelementptr inbounds [17 x i8], [17 x i8]* %6, i64 0, i64 5
%87 = load i8, i8* %86
store i8 %87, i8* %17
%88 = getelementptr inbounds [17 x i8], [17 x i8]* %6, i64 0, i64 6
%89 = load i8, i8* %88
%90 = sext i8 %89 to i32
%91 = sdiv i32 %90, 4
%92 = trunc i32 %91 to i8
store i8 %92, i8* %18
%93 = getelementptr inbounds [17 x i8], [17 x i8]* %6, i64 0, i64 6
%94 = load i8, i8* %93
%95 = sext i8 %94 to i32
%96 = mul nsw i32 %95, 15
%97 = srem i32 %96, 60
%98 = trunc i32 %97 to i8
store i8 %98, i8* %19
store i32 0, i32* %20
%99 = getelementptr inbounds [17 x i8], [17 x i8]* %6, i64 0, i64 7
%100 = load i8, i8* %99
%101 = zext i8 %100 to i32
%102 = icmp eq i32 %101, 255
br i1 %102, label %103, label %161
103: ; preds = %81
store i32 0, i32* %21
br label %104
104: ; preds = %157, %103
%105 = load i32, i32* %21
%106 = icmp slt i32 %105, 8
br i1 %106, label %107, label %160
107: ; preds = %104
%108 = load i32, i32* %21
%109 = sitofp i32 %108 to double
%110 = fmul double %109, 1.125000e+02
%111 = fptosi double %110 to i32
store i32 %111, i32* %20
%112 = load i8, i8* %15
%113 = sext i8 %112 to i32
%114 = load i8, i8* %16
%115 = sext i8 %114 to i32
%116 = load i8, i8* %17
%117 = sext i8 %116 to i32
%118 = load i8, i8* %18
%119 = sext i8 %118 to i32
%120 = load i8, i8* %19
%121 = sext i8 %120 to i32
%122 = load i32, i32* %20
%123 = sdiv i32 %122, 60
%124 = add nsw i32 %121, %123
%125 = load i32, i32* %20
%126 = srem i32 %125, 60
%127 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i32 %113, i32 %115, i32 %117, i32 %119, i32 %124, i32 %126)
%128 = load i32, i32* %21
%129 = add nsw i32 8, %128
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds [17 x i8], [17 x i8]* %6, i64 0, i64 %130
%132 = load i8, i8* %131
store i8 %132, i8* %22
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8** %23
%133 = load i8, i8* %22
%134 = sext i8 %133 to i32
%135 = icmp sgt i32 %134, 10
br i1 %135, label %136, label %137
136: ; preds = %107
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i8** %23
br label %143
137: ; preds = %107
%138 = load i8, i8* %22
%139 = sext i8 %138 to i32
%140 = icmp sgt i32 %139, 5
br i1 %140, label %141, label %142
141: ; preds = %137
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8** %23
br label %142
142: ; preds = %141, %137
br label %143
143: ; preds = %142, %136
%144 = load i8, i8* %22
%145 = sext i8 %144 to i32
%146 = icmp slt i32 %145, 10
br i1 %146, label %147, label %152
147: ; preds = %143
%148 = load float, float* %11
%149 = fpext float %148 to double
%150 = fadd double %149, 1.125000e+02
%151 = fptrunc double %150 to float
store float %151, float* %11
br label %152
152: ; preds = %147, %143
%153 = load i8*, i8** %23
%154 = load i8, i8* %22
%155 = sext i8 %154 to i32
%156 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0), i8* %153, i32 %155)
br label %157
157: ; preds = %152
%158 = load i32, i32* %21
%159 = add nsw i32 %158, 1
store i32 %159, i32* %21
br label %104
160: ; preds = %104
br label %249
161: ; preds = %81
%162 = getelementptr inbounds [17 x i8], [17 x i8]* %6, i64 0, i64 7
%163 = load i8, i8* %162
%164 = zext i8 %163 to i32
%165 = icmp eq i32 %164, 0
br i1 %165, label %166, label %234
166: ; preds = %161
%167 = getelementptr inbounds [17 x i8], [17 x i8]* %6, i64 0, i64 8
%168 = load i8, i8* %167
%169 = zext i8 %168 to i32
store i32 %169, i32* %24
%170 = getelementptr inbounds [17 x i8], [17 x i8]* %6, i64 0, i64 9
%171 = load i8, i8* %170
%172 = zext i8 %171 to i32
%173 = shl i32 %172, 8
%174 = load i32, i32* %24
%175 = add nsw i32 %174, %173
store i32 %175, i32* %24
%176 = load i32, i32* %24
%177 = load i32, i32* %13
%178 = add nsw i32 %177, %176
store i32 %178, i32* %13
%179 = getelementptr inbounds [17 x i8], [17 x i8]* %6, i64 0, i64 10
%180 = load i8, i8* %179
%181 = zext i8 %180 to i32
store i32 %181, i32* %25
%182 = getelementptr inbounds [17 x i8], [17 x i8]* %6, i64 0, i64 11
%183 = load i8, i8* %182
%184 = zext i8 %183 to i32
%185 = shl i32 %184, 8
%186 = load i32, i32* %25
%187 = add nsw i32 %186, %185
store i32 %187, i32* %25
%188 = load i32, i32* %25
%189 = load i32, i32* %12
%190 = add nsw i32 %189, %188
store i32 %190, i32* %12
%191 = getelementptr inbounds [17 x i8], [17 x i8]* %6, i64 0, i64 12
%192 = load i8, i8* %191
%193 = zext i8 %192 to i32
store i32 %193, i32* %26
%194 = getelementptr inbounds [17 x i8], [17 x i8]* %6, i64 0, i64 13
%195 = load i8, i8* %194
%196 = zext i8 %195 to i32
%197 = shl i32 %196, 8
%198 = load i32, i32* %26
%199 = add nsw i32 %198, %197
store i32 %199, i32* %26
%200 = load i32, i32* %26
%201 = load i32, i32* %14
%202 = add nsw i32 %201, %200
store i32 %202, i32* %14
%203 = load i32, i32* %26
%204 = icmp ne i32 %203, 0
br i1 %204, label %211, label %205
205: ; preds = %166
%206 = load i32, i32* %25
%207 = icmp ne i32 %206, 0
br i1 %207, label %211, label %208
208: ; preds = %205
%209 = load i32, i32* %24
%210 = icmp ne i32 %209, 0
br i1 %210, label %211, label %233
211: ; preds = %208, %205, %166
%212 = load i8, i8* %15
%213 = sext i8 %212 to i32
%214 = load i8, i8* %16
%215 = sext i8 %214 to i32
%216 = load i8, i8* %17
%217 = sext i8 %216 to i32
%218 = load i8, i8* %18
%219 = sext i8 %218 to i32
%220 = load i8, i8* %19
%221 = sext i8 %220 to i32
%222 = load i32, i32* %20
%223 = load i32, i32* %25
%224 = load i32, i32* %26
%225 = sitofp i32 %224 to float
%226 = fdiv float %225, 1.000000e+03
%227 = fpext float %226 to double
%228 = load i32, i32* %24
%229 = sitofp i32 %228 to float
%230 = fdiv float %229, 1.000000e+01
%231 = fpext float %230 to double
%232 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.8, i64 0, i64 0), i32 %213, i32 %215, i32 %217, i32 %219, i32 %221, i32 %222, i32 %223, double %227, double %231)
br label %233
233: ; preds = %211, %208
br label %248
234: ; preds = %161
%235 = load i8, i8* %15
%236 = sext i8 %235 to i32
%237 = load i8, i8* %16
%238 = sext i8 %237 to i32
%239 = load i8, i8* %17
%240 = sext i8 %239 to i32
%241 = load i8, i8* %18
%242 = sext i8 %241 to i32
%243 = load i8, i8* %19
%244 = sext i8 %243 to i32
%245 = load i32, i32* %20
%246 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i32 %236, i32 %238, i32 %240, i32 %242, i32 %244, i32 %245)
%247 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0))
br label %248
248: ; preds = %234, %233
br label %249
249: ; preds = %248, %160
br label %274
250: ; preds = %76
%251 = getelementptr inbounds [17 x i8], [17 x i8]* %6, i64 0, i64 2
%252 = load i8, i8* %251
%253 = sext i8 %252 to i32
%254 = icmp eq i32 %253, 0
br i1 %254, label %255, label %271
255: ; preds = %250
%256 = getelementptr inbounds [17 x i8], [17 x i8]* %6, i64 0, i64 3
%257 = load i8, i8* %256
%258 = zext i8 %257 to i32
%259 = icmp eq i32 %258, 255
br i1 %259, label %260, label %262
260: ; preds = %255
%261 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.10, i64 0, i64 0))
br label %279
262: ; preds = %255
%263 = getelementptr inbounds [17 x i8], [17 x i8]* %6, i64 0, i64 3
%264 = load i8, i8* %263
%265 = sext i8 %264 to i32
%266 = icmp ne i32 %265, 0
br i1 %266, label %267, label %269
267: ; preds = %262
%268 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.11, i64 0, i64 0))
br label %269
269: ; preds = %267, %262
br label %270
270: ; preds = %269
br label %273
271: ; preds = %250
%272 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.11, i64 0, i64 0))
br label %273
273: ; preds = %271, %270
br label %274
274: ; preds = %273, %249
br label %275
275: ; preds = %274
br label %276
276: ; preds = %275
%277 = load i32, i32* %10
%278 = add nsw i32 %277, 1
store i32 %278, i32* %10
br label %51
279: ; preds = %260, %51
%280 = load i32, i32* %8
%281 = load float, float* %11
%282 = fdiv float %281, 3.600000e+03
%283 = fpext float %282 to double
%284 = load i32, i32* %14
%285 = sitofp i32 %284 to float
%286 = fdiv float %285, 1.000000e+03
%287 = fpext float %286 to double
%288 = load i32, i32* %13
%289 = sitofp i32 %288 to float
%290 = fdiv float %289, 1.000000e+01
%291 = fpext float %290 to double
%292 = load i32, i32* %12
%293 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.12, i64 0, i64 0), i32 %280, double %283, double %287, double %291, i32 %292)
br label %294
294: ; preds = %279, %31
%295 = load i32, i32* %9
%296 = lshr i32 %295, 1
store i32 %296, i32* %9
br label %297
297: ; preds = %294
%298 = load i32, i32* %8
%299 = add nsw i32 %298, 1
store i32 %299, i32* %8
br label %28
300: ; preds = %28
store i32 0, i32* %3
br label %301
301: ; preds = %300, %60, %46
%302 = load i32, i32* %3
ret i32 %302
}

LLVM IR (-O2):
@.str = [27 x i8] c"-- dump for %d days back:\0A\00"
@.str.1 = [18 x i8] c"Can't write = %d\0A\00"
@.str.3 = [36 x i8] c"-- %02x.%02x.%02x %02d:%02d:%02d :>\00"
@.str.4 = [5 x i8] c"deep\00"
@.str.5 = [9 x i8] c"does not\00"
@.str.6 = [6 x i8] c"light\00"
@.str.7 = [18 x i8] c" %s sleep (%02x)\0A\00"
@.str.8 = [68 x i8] c"-- %02x.%02x.%02x %02d:%02d:%02d :>%5d steps, %3.3f km, %3.1f kkal\0A\00"
@.str.12 = [68 x i8] c"++ summary %d days back: %.2fh sleep, %.3f km, %.1f kkal, %d steps\0A\00"
@str.13 = [16 x i8] c"-- unknow value\00"
@str.14 = [24 x i8] c"-- no data for such day\00"
@str.15 = [5 x i8] c"s/w?\00"
@str.16 = [25 x i8] c"-- wrong opperation code\00"
define i32 @dump_memmory_state(i32 %0, i32 %1) {
%3 = alloca [17 x i8]
%4 = getelementptr inbounds [17 x i8], [17 x i8]* %3, i64 0, i64 0
%5 = getelementptr inbounds [17 x i8], [17 x i8]* %3, i64 0, i64 1
%6 = getelementptr inbounds [17 x i8], [17 x i8]* %3, i64 0, i64 2
%7 = getelementptr inbounds [17 x i8], [17 x i8]* %3, i64 0, i64 3
%8 = getelementptr inbounds [17 x i8], [17 x i8]* %3, i64 0, i64 4
%9 = getelementptr inbounds [17 x i8], [17 x i8]* %3, i64 0, i64 5
%10 = getelementptr inbounds [17 x i8], [17 x i8]* %3, i64 0, i64 6
%11 = getelementptr inbounds [17 x i8], [17 x i8]* %3, i64 0, i64 7
%12 = getelementptr inbounds [17 x i8], [17 x i8]* %3, i64 0, i64 8
%13 = getelementptr inbounds [17 x i8], [17 x i8]* %3, i64 0, i64 9
%14 = getelementptr inbounds [17 x i8], [17 x i8]* %3, i64 0, i64 10
%15 = getelementptr inbounds [17 x i8], [17 x i8]* %3, i64 0, i64 11
%16 = getelementptr inbounds [17 x i8], [17 x i8]* %3, i64 0, i64 12
%17 = getelementptr inbounds [17 x i8], [17 x i8]* %3, i64 0, i64 13
br label %18
18: ; preds = %2, %160
%19 = phi i32 [ 0, %2 ], [ %162, %160 ]
%20 = phi i32 [ %1, %2 ], [ %161, %160 ]
%21 = and i32 %20, 1
%22 = icmp eq i32 %21, 0
br i1 %22, label %160, label %23
23: ; preds = %18
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %19)
%25 = call i32 @package_dump_day(i8* %4, i32 %19)
%26 = call i32 @write_buffer(i32 %0, i8* %4, i8* null)
%27 = icmp slt i32 %26, 17
br i1 %27, label %164, label %28
28: ; preds = %23, %139
%29 = phi i32 [ %144, %139 ], [ 0, %23 ]
%30 = phi i32 [ %143, %139 ], [ 0, %23 ]
%31 = phi i32 [ %142, %139 ], [ 0, %23 ]
%32 = phi i32 [ %141, %139 ], [ 0, %23 ]
%33 = phi float [ %140, %139 ], [ 0.000000e+00, %23 ]
%34 = call i32 @write_buffer(i32 %0, i8* null, i8* %4)
%35 = icmp slt i32 %34, 17
br i1 %35, label %164, label %36
36: ; preds = %28
%37 = load i8, i8* %4
%38 = icmp ne i8 %37, 90
%39 = load i8, i8* %5
%40 = icmp ne i8 %39, 67
%41 = select i1 %38, i1 true, i1 %40
br i1 %41, label %42, label %44
42: ; preds = %36
%43 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.16, i64 0, i64 0))
br label %44
44: ; preds = %36, %42
%45 = load i8, i8* %6
switch i8 %45, label %137 [
i8 -16, label %46
i8 0, label %131
]
46: ; preds = %44
%47 = load i8, i8* %7
%48 = load i8, i8* %8
%49 = load i8, i8* %9
%50 = load i8, i8* %10
%51 = sext i8 %50 to i16
%52 = sdiv i8 %50, 4
%53 = sext i8 %52 to i32
%54 = mul nsw i16 %51, 15
%55 = srem i16 %54, 60
%56 = sext i16 %55 to i32
%57 = load i8, i8* %11
switch i8 %57, label %125 [
i8 -1, label %58
i8 0, label %87
]
58: ; preds = %46
%59 = sext i8 %47 to i32
%60 = sext i8 %48 to i32
%61 = sext i8 %49 to i32
br label %62
62: ; preds = %58, %62
%63 = phi i64 [ 0, %58 ], [ %85, %62 ]
%64 = phi float [ %33, %58 ], [ %83, %62 ]
%65 = trunc i64 %63 to i32
%66 = sitofp i32 %65 to double
%67 = fmul double %66, 1.125000e+02
%68 = fptosi double %67 to i32
%69 = sdiv i32 %68, 60
%70 = add nsw i32 %69, %56
%71 = srem i32 %68, 60
%72 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i32 %59, i32 %60, i32 %61, i32 %53, i32 %70, i32 %71)
%73 = add nuw nsw i64 %63, 8
%74 = getelementptr inbounds [17 x i8], [17 x i8]* %3, i64 0, i64 %73
%75 = load i8, i8* %74
%76 = sext i8 %75 to i32
%77 = icmp sgt i8 %75, 10
%78 = icmp sgt i8 %75, 5
%79 = select i1 %78, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0)
%80 = select i1 %77, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i8* %79
%81 = icmp slt i8 %75, 10
%82 = fadd float %64, 1.125000e+02
%83 = select i1 %81, float %82, float %64
%84 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.7, i64 0, i64 0), i8* %80, i32 %76)
%85 = add nuw nsw i64 %63, 1
%86 = icmp eq i64 %85, 8
br i1 %86, label %139, label %62
87: ; preds = %46
%88 = load i8, i8* %12
%89 = zext i8 %88 to i32
%90 = load i8, i8* %13
%91 = zext i8 %90 to i32
%92 = shl nuw nsw i32 %91, 8
%93 = or i32 %92, %89
%94 = add nsw i32 %93, %31
%95 = load i8, i8* %14
%96 = zext i8 %95 to i32
%97 = load i8, i8* %15
%98 = zext i8 %97 to i32
%99 = shl nuw nsw i32 %98, 8
%100 = or i32 %99, %96
%101 = add nsw i32 %100, %32
%102 = load i8, i8* %16
%103 = zext i8 %102 to i32
%104 = load i8, i8* %17
%105 = zext i8 %104 to i32
%106 = shl nuw nsw i32 %105, 8
%107 = or i32 %106, %103
%108 = add nsw i32 %107, %30
%109 = icmp ne i32 %107, 0
%110 = icmp ne i32 %100, 0
%111 = select i1 %109, i1 true, i1 %110
%112 = icmp ne i32 %93, 0
%113 = select i1 %111, i1 true, i1 %112
br i1 %113, label %114, label %139
114: ; preds = %87
%115 = sext i8 %47 to i32
%116 = sext i8 %48 to i32
%117 = sext i8 %49 to i32
%118 = sitofp i32 %107 to float
%119 = fdiv float %118, 1.000000e+03
%120 = fpext float %119 to double
%121 = sitofp i32 %93 to float
%122 = fdiv float %121, 1.000000e+01
%123 = fpext float %122 to double
%124 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @.str.8, i64 0, i64 0), i32 %115, i32 %116, i32 %117, i32 %53, i32 %56, i32 0, i32 %100, double %120, double %123)
br label %139
125: ; preds = %46
%126 = sext i8 %47 to i32
%127 = sext i8 %48 to i32
%128 = sext i8 %49 to i32
%129 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i32 %126, i32 %127, i32 %128, i32 %53, i32 %56, i32 0)
%130 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str.15, i64 0, i64 0))
br label %139
131: ; preds = %44
%132 = load i8, i8* %7
switch i8 %132, label %135 [
i8 -1, label %133
i8 0, label %139
]
133: ; preds = %131
%134 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.14, i64 0, i64 0))
br label %146
135: ; preds = %131
%136 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.13, i64 0, i64 0))
br label %139
137: ; preds = %44
%138 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.13, i64 0, i64 0))
br label %139
139: ; preds = %62, %131, %125, %87, %114, %137, %135
%140 = phi float [ %33, %135 ], [ %33, %137 ], [ %33, %125 ], [ %33, %87 ], [ %33, %114 ], [ %33, %131 ], [ %83, %62 ]
%141 = phi i32 [ %32, %135 ], [ %32, %137 ], [ %32, %125 ], [ %101, %87 ], [ %101, %114 ], [ %32, %131 ], [ %32, %62 ]
%142 = phi i32 [ %31, %135 ], [ %31, %137 ], [ %31, %125 ], [ %94, %87 ], [ %94, %114 ], [ %31, %131 ], [ %31, %62 ]
%143 = phi i32 [ %30, %135 ], [ %30, %137 ], [ %30, %125 ], [ %108, %87 ], [ %108, %114 ], [ %30, %131 ], [ %30, %62 ]
%144 = add nuw nsw i32 %29, 1
%145 = icmp eq i32 %144, 96
br i1 %145, label %146, label %28
146: ; preds = %139, %133
%147 = phi float [ %33, %133 ], [ %140, %139 ]
%148 = phi i32 [ %32, %133 ], [ %141, %139 ]
%149 = phi i32 [ %31, %133 ], [ %142, %139 ]
%150 = phi i32 [ %30, %133 ], [ %143, %139 ]
%151 = fdiv float %147, 3.600000e+03
%152 = fpext float %151 to double
%153 = sitofp i32 %150 to float
%154 = fdiv float %153, 1.000000e+03
%155 = fpext float %154 to double
%156 = sitofp i32 %149 to float
%157 = fdiv float %156, 1.000000e+01
%158 = fpext float %157 to double
%159 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @.str.12, i64 0, i64 0), i32 %19, double %152, double %155, double %158, i32 %148)
br label %160
160: ; preds = %146, %18
%161 = lshr i32 %20, 1
%162 = add nuw nsw i32 %19, 1
%163 = icmp eq i32 %162, 32
br i1 %163, label %167, label %18
164: ; preds = %23, %28
%165 = phi i32 [ %34, %28 ], [ %26, %23 ]
%166 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 %165)
br label %167
167: ; preds = %160, %164
%168 = phi i32 [ %165, %164 ], [ 0, %160 ]
ret i32 %168
}