#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*/ printf(char *, ...);
int scc_cksum(int *, int *);
int scc_validate(int *i, int *j, int verbose) {
  int r, s;
  switch (*i & 0xFF000000) {
  case 0x62000000:
    if (verbose)
      printf("\tPower: run\n");
    break;
  case 0x63000000:
    if (verbose)
      printf("\tPower: stop\n");
    break;
  case 0x64000000:
    if (verbose)
      printf("\tPower: advise stop\n");
    break;
  case 0x65000000:
    if (verbose)
      printf("\tPower: restart\n");
    break;
  case 0x66000000:
    if (verbose)
      printf("\tPower: advise restart\n");
    break;
  case 0x67000000:
    if (verbose)
      printf("\tPower: reset\n");
    break;
  case 0x68000000:
    if (verbose)
      printf("\tPower: advise reset\n");
    break;
  default:
    if (verbose)
      printf("validate: bad power 0x%08x\n", *i);
    return (-1);
  }
  switch (*i & 0x00FF0000) {
  case 0x00610000:
    if (verbose)
      printf("\tLed: off\n");
    break;
  case 0x00620000:
    if (verbose)
      printf("\tLed: blue\n");
    break;
  case 0x00630000:
    if (verbose)
      printf("\tLed: red\n");
    break;
  case 0x00640000:
    if (verbose)
      printf("\tLed: blue flash\n");
    break;
  case 0x00650000:
    if (verbose)
      printf("\tLed: red flash\n");
    break;
  case 0x00660000:
    if (verbose)
      printf("\tLed: alternate1\n");
    break;
  case 0x00670000:
    if (verbose)
      printf("\tLed: alternate3\n");
    break;
  default:
    if (verbose)
      printf("validate: bad led value 0x%08x\n", *i);
    return (-1);
  }
  r = ((*i & 0x0000FF00) >> 8);
  if (verbose) {
    printf("\tLed Flash Rate: %d\n", r);
  }
  if (r >= 40)
    printf("warning: led rate too high - led on (%d)\n", r);
  if (r <= 0)
    printf("warning: led rate too low - led off (%d)\n", r);
  switch (*i & 0x000000FF) {
  case 0x00000061:
    if (verbose)
      printf("\tFan: auto\n");
    break;
  case 0x00000062:
    if (verbose)
      printf("\tFan: on\n");
    break;
  default:
    if (verbose)
      printf("validate: bad fan value 0x%08x\n", *i);
    return (-1);
  }
  r = ((*j & 0xFF000000) >> 24);
  s = ((*j & 0x00FF0000) >> 16);
  if (verbose) {
    printf("\tFan On  Temprature: %dC\n", r);
    printf("\tFan Off Temprature: %dC\n", s);
  }
  if (r >= 60)
    printf("warning: fan on temp too high - fan off (%dC)\n", r);
  if (s <= 15)
    printf("warning: fan on temp too low - fan on (%dC)\n", s);
  if ((r - s) < 2) {
    printf("warning: fan on/off temp too close or on < off \n");
    printf("warning:\tfan on (%dC) fan off (%dC) \n", r, s);
  }
  r = *j & 0x0000FF00;
  if ((r != 0x00000700) && (r != 0x00000000) && (r != 0x00001200)) {
    printf("warning: bad id %08x\n", r);
  }
  r = *j & 0x000000FF;
  if (r != scc_cksum(i, j)) {
    printf("warning: checksum incorrect (%02x != %02x)\n", r, scc_cksum(i, j));
  }
  return (0);
}


x86 assembly (clang, -O0):
<scc_validate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
movzbl 0x3(%rax),%eax
shl    $0x18,%eax
mov    %eax,-0x28(%rbp)
sub    $0x62000000,%eax
je     11c3 <scc_validate+0xa3>
jmp    1151 <scc_validate+0x31>
mov    -0x28(%rbp),%eax
sub    $0x63000000,%eax
je     11e0 <scc_validate+0xc0>
jmp    1164 <scc_validate+0x44>
mov    -0x28(%rbp),%eax
sub    $0x64000000,%eax
je     11fd <scc_validate+0xdd>
jmp    1177 <scc_validate+0x57>
mov    -0x28(%rbp),%eax
sub    $0x65000000,%eax
je     121a <scc_validate+0xfa>
jmp    118a <scc_validate+0x6a>
mov    -0x28(%rbp),%eax
sub    $0x66000000,%eax
je     1237 <scc_validate+0x117>
jmp    119d <scc_validate+0x7d>
mov    -0x28(%rbp),%eax
sub    $0x67000000,%eax
je     1254 <scc_validate+0x134>
jmp    11b0 <scc_validate+0x90>
mov    -0x28(%rbp),%eax
sub    $0x68000000,%eax
je     1271 <scc_validate+0x151>
jmp    128e <scc_validate+0x16e>
cmpl   $0x0,-0x1c(%rbp)
je     11db <scc_validate+0xbb>
lea    0xe2c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12b8 <scc_validate+0x198>
cmpl   $0x0,-0x1c(%rbp)
je     11f8 <scc_validate+0xd8>
lea    0xe1c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12b8 <scc_validate+0x198>
cmpl   $0x0,-0x1c(%rbp)
je     1215 <scc_validate+0xf5>
lea    0xe0d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12b8 <scc_validate+0x198>
cmpl   $0x0,-0x1c(%rbp)
je     1232 <scc_validate+0x112>
lea    0xe05(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12b8 <scc_validate+0x198>
cmpl   $0x0,-0x1c(%rbp)
je     124f <scc_validate+0x12f>
lea    0xdf9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12b8 <scc_validate+0x198>
cmpl   $0x0,-0x1c(%rbp)
je     126c <scc_validate+0x14c>
lea    0xdf4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12b8 <scc_validate+0x198>
cmpl   $0x0,-0x1c(%rbp)
je     1289 <scc_validate+0x169>
lea    0xde6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12b8 <scc_validate+0x198>
cmpl   $0x0,-0x1c(%rbp)
je     12ac <scc_validate+0x18c>
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
lea    0xdd9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    167f <scc_validate+0x55f>
mov    -0x10(%rbp),%rax
movzbl 0x2(%rax),%eax
shl    $0x10,%eax
mov    %eax,-0x2c(%rbp)
sub    $0x610000,%eax
je     1348 <scc_validate+0x228>
jmp    12d6 <scc_validate+0x1b6>
mov    -0x2c(%rbp),%eax
sub    $0x620000,%eax
je     1365 <scc_validate+0x245>
jmp    12e9 <scc_validate+0x1c9>
mov    -0x2c(%rbp),%eax
sub    $0x630000,%eax
je     1382 <scc_validate+0x262>
jmp    12fc <scc_validate+0x1dc>
mov    -0x2c(%rbp),%eax
sub    $0x640000,%eax
je     139f <scc_validate+0x27f>
jmp    130f <scc_validate+0x1ef>
mov    -0x2c(%rbp),%eax
sub    $0x650000,%eax
je     13bc <scc_validate+0x29c>
jmp    1322 <scc_validate+0x202>
mov    -0x2c(%rbp),%eax
sub    $0x660000,%eax
je     13d9 <scc_validate+0x2b9>
jmp    1335 <scc_validate+0x215>
mov    -0x2c(%rbp),%eax
sub    $0x670000,%eax
je     13f6 <scc_validate+0x2d6>
jmp    1413 <scc_validate+0x2f3>
cmpl   $0x0,-0x1c(%rbp)
je     1360 <scc_validate+0x240>
lea    0xd41(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    143d <scc_validate+0x31d>
cmpl   $0x0,-0x1c(%rbp)
je     137d <scc_validate+0x25d>
lea    0xd2f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    143d <scc_validate+0x31d>
cmpl   $0x0,-0x1c(%rbp)
je     139a <scc_validate+0x27a>
lea    0xd1e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    143d <scc_validate+0x31d>
cmpl   $0x0,-0x1c(%rbp)
je     13b7 <scc_validate+0x297>
lea    0xd0c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    143d <scc_validate+0x31d>
cmpl   $0x0,-0x1c(%rbp)
je     13d4 <scc_validate+0x2b4>
lea    0xd01(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    143d <scc_validate+0x31d>
cmpl   $0x0,-0x1c(%rbp)
je     13f1 <scc_validate+0x2d1>
lea    0xcf5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    143d <scc_validate+0x31d>
cmpl   $0x0,-0x1c(%rbp)
je     140e <scc_validate+0x2ee>
lea    0xcea(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    143d <scc_validate+0x31d>
cmpl   $0x0,-0x1c(%rbp)
je     1431 <scc_validate+0x311>
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
lea    0xcd9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    167f <scc_validate+0x55f>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
and    $0xff00,%eax
sar    $0x8,%eax
mov    %eax,-0x20(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     1469 <scc_validate+0x349>
mov    -0x20(%rbp),%esi
lea    0xcc1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x28,-0x20(%rbp)
jl     1484 <scc_validate+0x364>
mov    -0x20(%rbp),%esi
lea    0xcbb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x20(%rbp)
jg     149f <scc_validate+0x37f>
mov    -0x20(%rbp),%esi
lea    0xcca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
mov    %eax,-0x30(%rbp)
sub    $0x61,%eax
je     14c8 <scc_validate+0x3a8>
jmp    14b7 <scc_validate+0x397>
mov    -0x30(%rbp),%eax
sub    $0x62,%eax
je     14e5 <scc_validate+0x3c5>
jmp    1502 <scc_validate+0x3e2>
cmpl   $0x0,-0x1c(%rbp)
je     14e0 <scc_validate+0x3c0>
lea    0xcb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    152c <scc_validate+0x40c>
cmpl   $0x0,-0x1c(%rbp)
je     14fd <scc_validate+0x3dd>
lea    0xca2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    152c <scc_validate+0x40c>
cmpl   $0x0,-0x1c(%rbp)
je     1520 <scc_validate+0x400>
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
lea    0xc89(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    167f <scc_validate+0x55f>
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
and    $0xff000000,%eax
shr    $0x18,%eax
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
and    $0xff0000,%eax
sar    $0x10,%eax
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     157a <scc_validate+0x45a>
mov    -0x20(%rbp),%esi
lea    0xc60(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x24(%rbp),%esi
lea    0xc69(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x3c,-0x20(%rbp)
jl     1595 <scc_validate+0x475>
mov    -0x20(%rbp),%esi
lea    0xc68(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0xf,-0x24(%rbp)
jg     15b0 <scc_validate+0x490>
mov    -0x24(%rbp),%esi
lea    0xc7c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
sub    -0x24(%rbp),%eax
cmp    $0x2,%eax
jge    15e1 <scc_validate+0x4c1>
lea    0xc8c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%esi
mov    -0x24(%rbp),%edx
lea    0xca9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
and    $0xff00,%eax
mov    %eax,-0x20(%rbp)
cmpl   $0x700,-0x20(%rbp)
je     1624 <scc_validate+0x504>
cmpl   $0x0,-0x20(%rbp)
je     1624 <scc_validate+0x504>
cmpl   $0x1200,-0x20(%rbp)
je     1624 <scc_validate+0x504>
mov    -0x20(%rbp),%esi
lea    0xc8c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
and    $0xff,%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <scc_cksum@plt>
mov    %eax,%ecx
mov    -0x34(%rbp),%eax
cmp    %ecx,%eax
je     1678 <scc_validate+0x558>
mov    -0x20(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <scc_cksum@plt>
mov    -0x38(%rbp),%esi
mov    %eax,%edx
lea    0xc4e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scc_validate>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %edx,%ebp
mov    %rsi,%r14
mov    (%rdi),%esi
lea    -0x62000000(%rsi),%eax
shr    $0x18,%eax
cmp    $0x6,%al
ja     116c <scc_validate+0x3c>
mov    %rdi,%r15
lea    0xeaa(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
test   %ebp,%ebp
je     11d6 <scc_validate+0xa6>
lea    0x119c(%rip),%rdi
jmp    11d1 <scc_validate+0xa1>
mov    $0xffffffff,%ebx
test   %ebp,%ebp
je     141c <scc_validate+0x2ec>
lea    0xeb8(%rip),%rdi
jmp    1315 <scc_validate+0x1e5>
test   %ebp,%ebp
je     11d6 <scc_validate+0xa6>
lea    0x1169(%rip),%rdi
jmp    11d1 <scc_validate+0xa1>
test   %ebp,%ebp
je     11d6 <scc_validate+0xa6>
lea    0x1148(%rip),%rdi
jmp    11d1 <scc_validate+0xa1>
test   %ebp,%ebp
je     11d6 <scc_validate+0xa6>
lea    0x112b(%rip),%rdi
jmp    11d1 <scc_validate+0xa1>
test   %ebp,%ebp
je     11d6 <scc_validate+0xa6>
lea    0x1107(%rip),%rdi
jmp    11d1 <scc_validate+0xa1>
test   %ebp,%ebp
je     11d6 <scc_validate+0xa6>
lea    0x10ec(%rip),%rdi
jmp    11d1 <scc_validate+0xa1>
test   %ebp,%ebp
je     11d6 <scc_validate+0xa6>
lea    0x10ca(%rip),%rdi
call   1030 <puts@plt>
mov    (%r15),%eax
mov    %eax,%ecx
and    $0xff0000,%ecx
add    $0xff9f0000,%ecx
shr    $0x10,%ecx
cmp    $0x6,%cx
ja     1211 <scc_validate+0xe1>
lea    0xe25(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
test   %ebp,%ebp
je     12a4 <scc_validate+0x174>
lea    0x1082(%rip),%rdi
jmp    1278 <scc_validate+0x148>
mov    $0xffffffff,%ebx
test   %ebp,%ebp
je     141c <scc_validate+0x2ec>
lea    0xe2f(%rip),%rdi
mov    %eax,%esi
jmp    1315 <scc_validate+0x1e5>
test   %ebp,%ebp
je     12a4 <scc_validate+0x174>
lea    0x104f(%rip),%rdi
jmp    1278 <scc_validate+0x148>
test   %ebp,%ebp
je     12a4 <scc_validate+0x174>
lea    0x1038(%rip),%rdi
jmp    1278 <scc_validate+0x148>
test   %ebp,%ebp
je     12a4 <scc_validate+0x174>
lea    0x101a(%rip),%rdi
jmp    1278 <scc_validate+0x148>
test   %ebp,%ebp
je     12a4 <scc_validate+0x174>
lea    0xffd(%rip),%rdi
jmp    1278 <scc_validate+0x148>
test   %ebp,%ebp
je     12a4 <scc_validate+0x174>
lea    0xfdf(%rip),%rdi
jmp    1278 <scc_validate+0x148>
test   %ebp,%ebp
je     12a4 <scc_validate+0x174>
lea    0xfc1(%rip),%rdi
call   1030 <puts@plt>
movzbl 0x1(%r15),%ebx
lea    0xdeb(%rip),%rdi
xor    %ebp,%ebp
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x28,%ebx
jb     12af <scc_validate+0x17f>
lea    0xde9(%rip),%rdi
mov    %ebx,%esi
jmp    12bc <scc_validate+0x18c>
movzbl %ah,%ebx
mov    $0x1,%bpl
cmp    $0x28,%ebx
jae    1299 <scc_validate+0x169>
test   %ebx,%ebx
jne    12c3 <scc_validate+0x193>
lea    0xdf9(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%r15),%esi
cmp    $0x62,%sil
je     12e0 <scc_validate+0x1b0>
cmp    $0x61,%sil
jne    1300 <scc_validate+0x1d0>
test   %bpl,%bpl
jne    12e5 <scc_validate+0x1b5>
lea    0xf50(%rip),%rdi
jmp    1328 <scc_validate+0x1f8>
test   %bpl,%bpl
je     1321 <scc_validate+0x1f1>
mov    (%r14),%ebp
mov    %ebp,%ebx
shr    $0x18,%ebx
mov    %ebp,%eax
shr    $0x10,%eax
movzbl %al,%r12d
cmp    $0x3c000000,%ebp
jae    1367 <scc_validate+0x237>
jmp    1377 <scc_validate+0x247>
mov    $0xffffffff,%ebx
test   %bpl,%bpl
jne    141c <scc_validate+0x2ec>
lea    0xdc8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    141c <scc_validate+0x2ec>
lea    0xefd(%rip),%rdi
call   1030 <puts@plt>
mov    (%r14),%ebp
mov    %ebp,%ebx
shr    $0x18,%ebx
mov    %ebp,%eax
shr    $0x10,%eax
movzbl %al,%r12d
lea    0xdb8(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xdc2(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0x3c000000,%ebp
jb     1377 <scc_validate+0x247>
lea    0xdc3(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmp    $0xf,%r12d
ja     138e <scc_validate+0x25e>
lea    0xddc(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebx,%eax
sub    %r12d,%eax
cmp    $0x1,%eax
jg     13b7 <scc_validate+0x287>
lea    0xe56(%rip),%rdi
call   1030 <puts@plt>
lea    0xde2(%rip),%rdi
mov    %ebx,%esi
mov    %r12d,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%r14),%eax
mov    %eax,%esi
and    $0xff00,%esi
je     13e9 <scc_validate+0x2b9>
movzwl %si,%ecx
cmp    $0x700,%ecx
je     13e9 <scc_validate+0x2b9>
cmp    $0x1200,%ecx
je     13e9 <scc_validate+0x2b9>
lea    0xdd5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movzbl (%r14),%eax
movzbl %al,%ebp
mov    %r15,%rdi
mov    %r14,%rsi
call   1050 <scc_cksum@plt>
xor    %ebx,%ebx
cmp    %eax,%ebp
je     141c <scc_validate+0x2ec>
mov    %r15,%rdi
mov    %r14,%rsi
call   1050 <scc_cksum@plt>
lea    0xdba(%rip),%rdi
xor    %ebx,%ebx
mov    %ebp,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebx,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [13 x i8] c"\09Power: run\0A\00"
@.str.1 = [14 x i8] c"\09Power: stop\0A\00"
@.str.2 = [21 x i8] c"\09Power: advise stop\0A\00"
@.str.3 = [17 x i8] c"\09Power: restart\0A\00"
@.str.4 = [24 x i8] c"\09Power: advise restart\0A\00"
@.str.5 = [15 x i8] c"\09Power: reset\0A\00"
@.str.6 = [22 x i8] c"\09Power: advise reset\0A\00"
@.str.7 = [28 x i8] c"validate: bad power 0x%08x\0A\00"
@.str.8 = [11 x i8] c"\09Led: off\0A\00"
@.str.9 = [12 x i8] c"\09Led: blue\0A\00"
@.str.10 = [11 x i8] c"\09Led: red\0A\00"
@.str.11 = [18 x i8] c"\09Led: blue flash\0A\00"
@.str.12 = [17 x i8] c"\09Led: red flash\0A\00"
@.str.13 = [18 x i8] c"\09Led: alternate1\0A\00"
@.str.14 = [18 x i8] c"\09Led: alternate3\0A\00"
@.str.15 = [32 x i8] c"validate: bad led value 0x%08x\0A\00"
@.str.16 = [21 x i8] c"\09Led Flash Rate: %d\0A\00"
@.str.17 = [42 x i8] c"warning: led rate too high - led on (%d)\0A\00"
@.str.18 = [42 x i8] c"warning: led rate too low - led off (%d)\0A\00"
@.str.19 = [12 x i8] c"\09Fan: auto\0A\00"
@.str.20 = [10 x i8] c"\09Fan: on\0A\00"
@.str.21 = [32 x i8] c"validate: bad fan value 0x%08x\0A\00"
@.str.22 = [26 x i8] c"\09Fan On Temprature: %dC\0A\00"
@.str.23 = [26 x i8] c"\09Fan Off Temprature: %dC\0A\00"
@.str.24 = [47 x i8] c"warning: fan on temp too high - fan off (%dC)\0A\00"
@.str.25 = [45 x i8] c"warning: fan on temp too low - fan on (%dC)\0A\00"
@.str.26 = [49 x i8] c"warning: fan on/off temp too close or on < off \0A\00"
@.str.27 = [38 x i8] c"warning:\09fan on (%dC) fan off (%dC) \0A\00"
@.str.28 = [22 x i8] c"warning: bad id %08x\0A\00"
@.str.29 = [44 x i8] c"warning: checksum incorrect (%02x != %02x)\0A\00"
define i32 @scc_validate(i32* %0, i32* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32* %0, i32** %5
store i32* %1, i32** %6
store i32 %2, i32* %7
%10 = load i32*, i32** %5
%11 = load i32, i32* %10
%12 = and i32 %11, -16777216
switch i32 %12, label %55 [
i32 1644167168, label %13
i32 1660944384, label %19
i32 1677721600, label %25
i32 1694498816, label %31
i32 1711276032, label %37
i32 1728053248, label %43
i32 1744830464, label %49
]
13: ; preds = %3
%14 = load i32, i32* %7
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %18
18: ; preds = %16, %13
br label %63
19: ; preds = %3
%20 = load i32, i32* %7
%21 = icmp ne i32 %20, 0
br i1 %21, label %22, label %24
22: ; preds = %19
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
br label %24
24: ; preds = %22, %19
br label %63
25: ; preds = %3
%26 = load i32, i32* %7
%27 = icmp ne i32 %26, 0
br i1 %27, label %28, label %30
28: ; preds = %25
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
br label %30
30: ; preds = %28, %25
br label %63
31: ; preds = %3
%32 = load i32, i32* %7
%33 = icmp ne i32 %32, 0
br i1 %33, label %34, label %36
34: ; preds = %31
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
br label %36
36: ; preds = %34, %31
br label %63
37: ; preds = %3
%38 = load i32, i32* %7
%39 = icmp ne i32 %38, 0
br i1 %39, label %40, label %42
40: ; preds = %37
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0))
br label %42
42: ; preds = %40, %37
br label %63
43: ; preds = %3
%44 = load i32, i32* %7
%45 = icmp ne i32 %44, 0
br i1 %45, label %46, label %48
46: ; preds = %43
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0))
br label %48
48: ; preds = %46, %43
br label %63
49: ; preds = %3
%50 = load i32, i32* %7
%51 = icmp ne i32 %50, 0
br i1 %51, label %52, label %54
52: ; preds = %49
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0))
br label %54
54: ; preds = %52, %49
br label %63
55: ; preds = %3
%56 = load i32, i32* %7
%57 = icmp ne i32 %56, 0
br i1 %57, label %58, label %62
58: ; preds = %55
%59 = load i32*, i32** %5
%60 = load i32, i32* %59
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i32 %60)
br label %62
62: ; preds = %58, %55
store i32 -1, i32* %4
br label %232
63: ; preds = %54, %48, %42, %36, %30, %24, %18
%64 = load i32*, i32** %5
%65 = load i32, i32* %64
%66 = and i32 %65, 16711680
switch i32 %66, label %109 [
i32 6356992, label %67
i32 6422528, label %73
i32 6488064, label %79
i32 6553600, label %85
i32 6619136, label %91
i32 6684672, label %97
i32 6750208, label %103
]
67: ; preds = %63
%68 = load i32, i32* %7
%69 = icmp ne i32 %68, 0
br i1 %69, label %70, label %72
70: ; preds = %67
%71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.8, i64 0, i64 0))
br label %72
72: ; preds = %70, %67
br label %117
73: ; preds = %63
%74 = load i32, i32* %7
%75 = icmp ne i32 %74, 0
br i1 %75, label %76, label %78
76: ; preds = %73
%77 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i64 0, i64 0))
br label %78
78: ; preds = %76, %73
br label %117
79: ; preds = %63
%80 = load i32, i32* %7
%81 = icmp ne i32 %80, 0
br i1 %81, label %82, label %84
82: ; preds = %79
%83 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0))
br label %84
84: ; preds = %82, %79
br label %117
85: ; preds = %63
%86 = load i32, i32* %7
%87 = icmp ne i32 %86, 0
br i1 %87, label %88, label %90
88: ; preds = %85
%89 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.11, i64 0, i64 0))
br label %90
90: ; preds = %88, %85
br label %117
91: ; preds = %63
%92 = load i32, i32* %7
%93 = icmp ne i32 %92, 0
br i1 %93, label %94, label %96
94: ; preds = %91
%95 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.12, i64 0, i64 0))
br label %96
96: ; preds = %94, %91
br label %117
97: ; preds = %63
%98 = load i32, i32* %7
%99 = icmp ne i32 %98, 0
br i1 %99, label %100, label %102
100: ; preds = %97
%101 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.13, i64 0, i64 0))
br label %102
102: ; preds = %100, %97
br label %117
103: ; preds = %63
%104 = load i32, i32* %7
%105 = icmp ne i32 %104, 0
br i1 %105, label %106, label %108
106: ; preds = %103
%107 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.14, i64 0, i64 0))
br label %108
108: ; preds = %106, %103
br label %117
109: ; preds = %63
%110 = load i32, i32* %7
%111 = icmp ne i32 %110, 0
br i1 %111, label %112, label %116
112: ; preds = %109
%113 = load i32*, i32** %5
%114 = load i32, i32* %113
%115 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.15, i64 0, i64 0), i32 %114)
br label %116
116: ; preds = %112, %109
store i32 -1, i32* %4
br label %232
117: ; preds = %108, %102, %96, %90, %84, %78, %72
%118 = load i32*, i32** %5
%119 = load i32, i32* %118
%120 = and i32 %119, 65280
%121 = ashr i32 %120, 8
store i32 %121, i32* %8
%122 = load i32, i32* %7
%123 = icmp ne i32 %122, 0
br i1 %123, label %124, label %127
124: ; preds = %117
%125 = load i32, i32* %8
%126 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.16, i64 0, i64 0), i32 %125)
br label %127
127: ; preds = %124, %117
%128 = load i32, i32* %8
%129 = icmp sge i32 %128, 40
br i1 %129, label %130, label %133
130: ; preds = %127
%131 = load i32, i32* %8
%132 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.17, i64 0, i64 0), i32 %131)
br label %133
133: ; preds = %130, %127
%134 = load i32, i32* %8
%135 = icmp sle i32 %134, 0
br i1 %135, label %136, label %139
136: ; preds = %133
%137 = load i32, i32* %8
%138 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.18, i64 0, i64 0), i32 %137)
br label %139
139: ; preds = %136, %133
%140 = load i32*, i32** %5
%141 = load i32, i32* %140
%142 = and i32 %141, 255
switch i32 %142, label %155 [
i32 97, label %143
i32 98, label %149
]
143: ; preds = %139
%144 = load i32, i32* %7
%145 = icmp ne i32 %144, 0
br i1 %145, label %146, label %148
146: ; preds = %143
%147 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.19, i64 0, i64 0))
br label %148
148: ; preds = %146, %143
br label %163
149: ; preds = %139
%150 = load i32, i32* %7
%151 = icmp ne i32 %150, 0
br i1 %151, label %152, label %154
152: ; preds = %149
%153 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.20, i64 0, i64 0))
br label %154
154: ; preds = %152, %149
br label %163
155: ; preds = %139
%156 = load i32, i32* %7
%157 = icmp ne i32 %156, 0
br i1 %157, label %158, label %162
158: ; preds = %155
%159 = load i32*, i32** %5
%160 = load i32, i32* %159
%161 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.21, i64 0, i64 0), i32 %160)
br label %162
162: ; preds = %158, %155
store i32 -1, i32* %4
br label %232
163: ; preds = %154, %148
%164 = load i32*, i32** %6
%165 = load i32, i32* %164
%166 = and i32 %165, -16777216
%167 = lshr i32 %166, 24
store i32 %167, i32* %8
%168 = load i32*, i32** %6
%169 = load i32, i32* %168
%170 = and i32 %169, 16711680
%171 = ashr i32 %170, 16
store i32 %171, i32* %9
%172 = load i32, i32* %7
%173 = icmp ne i32 %172, 0
br i1 %173, label %174, label %179
174: ; preds = %163
%175 = load i32, i32* %8
%176 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.22, i64 0, i64 0), i32 %175)
%177 = load i32, i32* %9
%178 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.23, i64 0, i64 0), i32 %177)
br label %179
179: ; preds = %174, %163
%180 = load i32, i32* %8
%181 = icmp sge i32 %180, 60
br i1 %181, label %182, label %185
182: ; preds = %179
%183 = load i32, i32* %8
%184 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.24, i64 0, i64 0), i32 %183)
br label %185
185: ; preds = %182, %179
%186 = load i32, i32* %9
%187 = icmp sle i32 %186, 15
br i1 %187, label %188, label %191
188: ; preds = %185
%189 = load i32, i32* %9
%190 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.25, i64 0, i64 0), i32 %189)
br label %191
191: ; preds = %188, %185
%192 = load i32, i32* %8
%193 = load i32, i32* %9
%194 = sub nsw i32 %192, %193
%195 = icmp slt i32 %194, 2
br i1 %195, label %196, label %201
196: ; preds = %191
%197 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.26, i64 0, i64 0))
%198 = load i32, i32* %8
%199 = load i32, i32* %9
%200 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.27, i64 0, i64 0), i32 %198, i32 %199)
br label %201
201: ; preds = %196, %191
%202 = load i32*, i32** %6
%203 = load i32, i32* %202
%204 = and i32 %203, 65280
store i32 %204, i32* %8
%205 = load i32, i32* %8
%206 = icmp ne i32 %205, 1792
br i1 %206, label %207, label %216
207: ; preds = %201
%208 = load i32, i32* %8
%209 = icmp ne i32 %208, 0
br i1 %209, label %210, label %216
210: ; preds = %207
%211 = load i32, i32* %8
%212 = icmp ne i32 %211, 4608
br i1 %212, label %213, label %216
213: ; preds = %210
%214 = load i32, i32* %8
%215 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.28, i64 0, i64 0), i32 %214)
br label %216
216: ; preds = %213, %210, %207, %201
%217 = load i32*, i32** %6
%218 = load i32, i32* %217
%219 = and i32 %218, 255
store i32 %219, i32* %8
%220 = load i32, i32* %8
%221 = load i32*, i32** %5
%222 = load i32*, i32** %6
%223 = call i32 @scc_cksum(i32* %221, i32* %222)
%224 = icmp ne i32 %220, %223
br i1 %224, label %225, label %231
225: ; preds = %216
%226 = load i32, i32* %8
%227 = load i32*, i32** %5
%228 = load i32*, i32** %6
%229 = call i32 @scc_cksum(i32* %227, i32* %228)
%230 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.29, i64 0, i64 0), i32 %226, i32 %229)
br label %231
231: ; preds = %225, %216
store i32 0, i32* %4
br label %232
232: ; preds = %231, %162, %116, %62
%233 = load i32, i32* %4
ret i32 %233
}

LLVM IR (-O2):
@.str.7 = [28 x i8] c"validate: bad power 0x%08x\0A\00"
@.str.15 = [32 x i8] c"validate: bad led value 0x%08x\0A\00"
@.str.16 = [21 x i8] c"\09Led Flash Rate: %d\0A\00"
@.str.17 = [42 x i8] c"warning: led rate too high - led on (%d)\0A\00"
@.str.18 = [42 x i8] c"warning: led rate too low - led off (%d)\0A\00"
@.str.21 = [32 x i8] c"validate: bad fan value 0x%08x\0A\00"
@.str.22 = [26 x i8] c"\09Fan On Temprature: %dC\0A\00"
@.str.23 = [26 x i8] c"\09Fan Off Temprature: %dC\0A\00"
@.str.24 = [47 x i8] c"warning: fan on temp too high - fan off (%dC)\0A\00"
@.str.25 = [45 x i8] c"warning: fan on temp too low - fan on (%dC)\0A\00"
@.str.27 = [38 x i8] c"warning:\09fan on (%dC) fan off (%dC) \0A\00"
@.str.28 = [22 x i8] c"warning: bad id %08x\0A\00"
@.str.29 = [44 x i8] c"warning: checksum incorrect (%02x != %02x)\0A\00"
@str = [48 x i8] c"warning: fan on/off temp too close or on < off \00"
@str.30 = [9 x i8] c"\09Fan: on\00"
@str.31 = [11 x i8] c"\09Fan: auto\00"
@str.32 = [17 x i8] c"\09Led: alternate3\00"
@str.33 = [17 x i8] c"\09Led: alternate1\00"
@str.34 = [16 x i8] c"\09Led: red flash\00"
@str.35 = [17 x i8] c"\09Led: blue flash\00"
@str.36 = [10 x i8] c"\09Led: red\00"
@str.37 = [11 x i8] c"\09Led: blue\00"
@str.38 = [10 x i8] c"\09Led: off\00"
@str.39 = [21 x i8] c"\09Power: advise reset\00"
@str.40 = [14 x i8] c"\09Power: reset\00"
@str.41 = [23 x i8] c"\09Power: advise restart\00"
@str.42 = [16 x i8] c"\09Power: restart\00"
@str.43 = [20 x i8] c"\09Power: advise stop\00"
@str.44 = [13 x i8] c"\09Power: stop\00"
@str.45 = [12 x i8] c"\09Power: run\00"
define i32 @scc_validate(i32* %0, i32* %1, i32 %2) {
%4 = load i32, i32* %0
%5 = add i32 %4, -1644167168
%6 = lshr i32 %5, 24
%7 = trunc i32 %6 to i8
switch i8 %7, label %22 [
i8 0, label %8
i8 1, label %10
i8 2, label %12
i8 3, label %14
i8 4, label %16
i8 5, label %18
i8 6, label %20
]
8: ; preds = %3
%9 = icmp eq i32 %2, 0
br i1 %9, label %29, label %26
10: ; preds = %3
%11 = icmp eq i32 %2, 0
br i1 %11, label %29, label %26
12: ; preds = %3
%13 = icmp eq i32 %2, 0
br i1 %13, label %29, label %26
14: ; preds = %3
%15 = icmp eq i32 %2, 0
br i1 %15, label %29, label %26
16: ; preds = %3
%17 = icmp eq i32 %2, 0
br i1 %17, label %29, label %26
18: ; preds = %3
%19 = icmp eq i32 %2, 0
br i1 %19, label %29, label %26
20: ; preds = %3
%21 = icmp eq i32 %2, 0
br i1 %21, label %29, label %26
22: ; preds = %3
%23 = icmp eq i32 %2, 0
br i1 %23, label %127, label %24
24: ; preds = %22
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i32 %4)
br label %127
26: ; preds = %20, %18, %16, %14, %12, %10, %8
%27 = phi i8* [ getelementptr inbounds ([12 x i8], [12 x i8]* @str.45, i64 0, i64 0), %8 ], [ getelementptr inbounds ([13 x i8], [13 x i8]* @str.44, i64 0, i64 0), %10 ], [ getelementptr inbounds ([20 x i8], [20 x i8]* @str.43, i64 0, i64 0), %12 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @str.42, i64 0, i64 0), %14 ], [ getelementptr inbounds ([23 x i8], [23 x i8]* @str.41, i64 0, i64 0), %16 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @str.40, i64 0, i64 0), %18 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @str.39, i64 0, i64 0), %20 ]
%28 = tail call i32 @puts(i8* dereferenceable(1) %27)
br label %29
29: ; preds = %26, %20, %18, %16, %14, %12, %10, %8
%30 = load i32, i32* %0
%31 = and i32 %30, 16711680
%32 = add nsw i32 %31, -6356992
%33 = lshr exact i32 %32, 16
%34 = trunc i32 %33 to i16
switch i16 %34, label %49 [
i16 0, label %35
i16 1, label %37
i16 2, label %39
i16 3, label %41
i16 4, label %43
i16 5, label %45
i16 6, label %47
]
35: ; preds = %29
%36 = icmp eq i32 %2, 0
br i1 %36, label %53, label %56
37: ; preds = %29
%38 = icmp eq i32 %2, 0
br i1 %38, label %53, label %56
39: ; preds = %29
%40 = icmp eq i32 %2, 0
br i1 %40, label %53, label %56
41: ; preds = %29
%42 = icmp eq i32 %2, 0
br i1 %42, label %53, label %56
43: ; preds = %29
%44 = icmp eq i32 %2, 0
br i1 %44, label %53, label %56
45: ; preds = %29
%46 = icmp eq i32 %2, 0
br i1 %46, label %53, label %56
47: ; preds = %29
%48 = icmp eq i32 %2, 0
br i1 %48, label %53, label %56
49: ; preds = %29
%50 = icmp eq i32 %2, 0
br i1 %50, label %127, label %51
51: ; preds = %49
%52 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.15, i64 0, i64 0), i32 %30)
br label %127
53: ; preds = %47, %45, %43, %41, %39, %37, %35
%54 = lshr i32 %30, 8
%55 = and i32 %54, 255
br label %63
56: ; preds = %47, %45, %43, %41, %39, %37, %35
%57 = phi i8* [ getelementptr inbounds ([10 x i8], [10 x i8]* @str.38, i64 0, i64 0), %35 ], [ getelementptr inbounds ([11 x i8], [11 x i8]* @str.37, i64 0, i64 0), %37 ], [ getelementptr inbounds ([10 x i8], [10 x i8]* @str.36, i64 0, i64 0), %39 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @str.35, i64 0, i64 0), %41 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @str.34, i64 0, i64 0), %43 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @str.33, i64 0, i64 0), %45 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @str.32, i64 0, i64 0), %47 ]
%58 = tail call i32 @puts(i8* dereferenceable(1) %57)
%59 = load i32, i32* %0
%60 = lshr i32 %59, 8
%61 = and i32 %60, 255
%62 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.16, i64 0, i64 0), i32 %61)
br label %63
63: ; preds = %53, %56
%64 = phi i1 [ true, %53 ], [ false, %56 ]
%65 = phi i32 [ %55, %53 ], [ %61, %56 ]
%66 = icmp ugt i32 %65, 39
br i1 %66, label %67, label %69
67: ; preds = %63
%68 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.17, i64 0, i64 0), i32 %65)
br label %73
69: ; preds = %63
%70 = icmp eq i32 %65, 0
br i1 %70, label %71, label %73
71: ; preds = %69
%72 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.18, i64 0, i64 0), i32 0)
br label %73
73: ; preds = %67, %71, %69
%74 = load i32, i32* %0
%75 = trunc i32 %74 to i8
switch i8 %75, label %78 [
i8 97, label %76
i8 98, label %77
]
76: ; preds = %73
br i1 %64, label %81, label %86
77: ; preds = %73
br i1 %64, label %81, label %86
78: ; preds = %73
br i1 %64, label %127, label %79
79: ; preds = %78
%80 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.21, i64 0, i64 0), i32 %74)
br label %127
81: ; preds = %77, %76
%82 = load i32, i32* %1
%83 = lshr i32 %82, 24
%84 = lshr i32 %82, 16
%85 = and i32 %84, 255
br label %95
86: ; preds = %77, %76
%87 = phi i8* [ getelementptr inbounds ([11 x i8], [11 x i8]* @str.31, i64 0, i64 0), %76 ], [ getelementptr inbounds ([9 x i8], [9 x i8]* @str.30, i64 0, i64 0), %77 ]
%88 = tail call i32 @puts(i8* dereferenceable(1) %87)
%89 = load i32, i32* %1
%90 = lshr i32 %89, 24
%91 = lshr i32 %89, 16
%92 = and i32 %91, 255
%93 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.22, i64 0, i64 0), i32 %90)
%94 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.23, i64 0, i64 0), i32 %92)
br label %95
95: ; preds = %81, %86
%96 = phi i32 [ %85, %81 ], [ %92, %86 ]
%97 = phi i32 [ %83, %81 ], [ %90, %86 ]
%98 = phi i32 [ %82, %81 ], [ %89, %86 ]
%99 = icmp ugt i32 %98, 1006632959
br i1 %99, label %100, label %102
100: ; preds = %95
%101 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.24, i64 0, i64 0), i32 %97)
br label %102
102: ; preds = %100, %95
%103 = icmp ult i32 %96, 16
br i1 %103, label %104, label %106
104: ; preds = %102
%105 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.25, i64 0, i64 0), i32 %96)
br label %106
106: ; preds = %104, %102
%107 = sub nsw i32 %97, %96
%108 = icmp slt i32 %107, 2
br i1 %108, label %109, label %112
109: ; preds = %106
%110 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str, i64 0, i64 0))
%111 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.27, i64 0, i64 0), i32 %97, i32 %96)
br label %112
112: ; preds = %109, %106
%113 = load i32, i32* %1
%114 = and i32 %113, 65280
%115 = trunc i32 %114 to i16
switch i16 %115, label %116 [
i16 4608, label %119
i16 1792, label %119
i16 0, label %119
]
116: ; preds = %112
%117 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.28, i64 0, i64 0), i32 %114)
%118 = load i32, i32* %1
br label %119
119: ; preds = %112, %112, %112, %116
%120 = phi i32 [ %113, %112 ], [ %113, %112 ], [ %113, %112 ], [ %118, %116 ]
%121 = and i32 %120, 255
%122 = tail call i32 @scc_cksum(i32* %0, i32* %1)
%123 = icmp eq i32 %121, %122
br i1 %123, label %127, label %124
124: ; preds = %119
%125 = tail call i32 @scc_cksum(i32* %0, i32* %1)
%126 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.29, i64 0, i64 0), i32 %121, i32 %125)
br label %127
127: ; preds = %119, %124, %78, %79, %49, %51, %22, %24
%128 = phi i32 [ -1, %24 ], [ -1, %22 ], [ -1, %51 ], [ -1, %49 ], [ -1, %79 ], [ -1, %78 ], [ 0, %124 ], [ 0, %119 ]
ret i32 %128
}