#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 EXIT_FAILURE;
int expected(unsigned int, unsigned int, unsigned int, unsigned int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ freopen(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ strcmp(char *, char *);
int main(int argc, char *argv[]) {
  int i, raw = 0;
  char *outname = NULL;
  unsigned signed_, lconst, rconst, lidx, ridx, if_, opidx;
  unsigned testValues[] = {0x00000000, 0x00000001, 0x00000002, 0x7FFFFFFD,
                           0x7FFFFFFE, 0x7FFFFFFF, 0x80000000, 0x80000001,
                           0x80000002, 0xFFFFFFFD, 0xFFFFFFFE, 0xFFFFFFFF};
  char *operators[] = {
      "==", "!=", "<", ">=", "<=", ">",
  };
  for (i = 1; i < argc; i++) {
    if (!strcmp(argv[i], "-raw")) {
      raw = 1;
      continue;
    } else if (!strcmp(argv[i], "-o")) {
      if (i + 1 < argc) {
        ++i;
        outname = argv[i];
        continue;
      }
    }
    fprintf(stderr, "Invalid or unsupported command line option '%s'\n",
            argv[i]);
    return EXIT_FAILURE;
  }
  if (outname)
    freopen(outname, "w", stdout);
  if (!raw) {
    printf("#include <limits.h>\n");
    printf("#include <stdio.h>\n");
    printf("#include <stdlib.h>\n\n");
    printf("// Ensure:\n");
    printf("// - expected type sizes\n");
    printf("// - 2's complement arithmetic\n");
    printf("extern char StAtIcAsSeRt[(CHAR_BIT == 8) ? 1 : -1];\n");
    printf("extern char StAtIcAsSeRt[(-INT_MAX == INT_MIN + 1) ? 1 : -1];\n");
    printf("extern char StAtIcAsSeRt[((int)UINT_MAX == -1) ? 1 : -1];\n");
    printf("extern char StAtIcAsSeRt[(sizeof(int) == 4) ? 1 : -1];\n");
    printf("\n");
  }
  printf("int main(void)\n{\n");
  printf("  unsigned error = 0;\n");
  for (signed_ = 0; signed_ <= 1; signed_++)
    for (lconst = 0; lconst <= 1; lconst++)
      for (rconst = 0; rconst <= 1; rconst++)
        for (lidx = 0; lidx < sizeof testValues / sizeof testValues[0]; lidx++)
          for (ridx = 0; ridx < sizeof testValues / sizeof testValues[0];
               ridx++)
            for (opidx = 0; opidx < sizeof operators / sizeof operators[0];
                 opidx++)
              for (if_ = 0; if_ <= 1; if_++) {
                unsigned lval = testValues[lidx];
                unsigned rval = testValues[ridx];
                int e = expected(signed_, opidx, lval, rval);
                printf("  {\n");
                if (!lconst)
                  printf("    %s l = %s0x%08Xu;\n",
                         signed_ ? "int" : "unsigned", signed_ ? "(int)" : "",
                         lval);
                if (!rconst)
                  printf("    %s r = %s0x%08Xu;\n",
                         signed_ ? "int" : "unsigned", signed_ ? "(int)" : "",
                         rval);
                if (if_)
                  printf("    if (");
                else
                  printf("    int v = ");
                if (lconst)
                  printf("%s0x%08Xu", signed_ ? "(int)" : "", lval);
                else
                  printf("l");
                printf(" %s ", operators[opidx]);
                if (rconst)
                  printf("%s0x%08Xu", signed_ ? "(int)" : "", rval);
                else
                  printf("r");
                if (if_) {
                  if (e)
                    printf("); else error = __LINE__;\n");
                  else
                    printf(") error = __LINE__;\n");
                } else {
                  printf("; if (v == %d); else error = __LINE__;\n", e);
                }
                printf("  }\n");
              }
  printf("  if (error) { printf(\"Test on line %%u failed\\n\", error); return "
         "%s; }\n",
         raw ? "1" : "EXIT_FAILURE");
  printf("  printf(\"All tests passed\\n\");\n");
  printf("  return 0;\n}\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
lea    -0x70(%rbp),%rdi
lea    0xe5d(%rip),%rsi
mov    $0x30,%edx
call   1080 <memcpy@plt>
lea    -0xa0(%rbp),%rdi
xor    %esi,%esi
mov    $0x30,%edx
call   1040 <memset@plt>
lea    0xe69(%rip),%rax
mov    %rax,-0xa0(%rbp)
lea    0xe5e(%rip),%rax
mov    %rax,-0x98(%rbp)
lea    0xe53(%rip),%rax
mov    %rax,-0x90(%rbp)
lea    0xe47(%rip),%rax
mov    %rax,-0x88(%rbp)
lea    0xe3c(%rip),%rax
mov    %rax,-0x80(%rbp)
lea    0xe34(%rip),%rax
mov    %rax,-0x78(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    12e6 <main+0x176>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe0c(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    124e <main+0xde>
movl   $0x1,-0x18(%rbp)
jmp    12d8 <main+0x168>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xde4(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    12a1 <main+0x131>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
cmp    -0x8(%rbp),%eax
jge    129c <main+0x12c>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x20(%rbp)
jmp    12d8 <main+0x168>
jmp    12a1 <main+0x131>
jmp    12a6 <main+0x136>
mov    0x2d33(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xd86(%rip),%rsi
call   1070 <fprintf@plt>
mov    0x2d0a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1729 <main+0x5b9>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1215 <main+0xa5>
cmpq   $0x0,-0x20(%rbp)
je     130a <main+0x19a>
mov    -0x20(%rbp),%rdi
mov    0x2cd4(%rip),%rax
mov    (%rax),%edx
lea    0xd3e(%rip),%rsi
call   1050 <freopen@plt>
cmpl   $0x0,-0x18(%rbp)
jne    13ae <main+0x23e>
lea    0xd5e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd65(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd6b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd73(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd71(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd7d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd8f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xdb6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xde7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe14(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd0f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe30(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe34(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x24(%rbp)
cmpl   $0x1,-0x24(%rbp)
ja     16e0 <main+0x570>
movl   $0x0,-0x28(%rbp)
cmpl   $0x1,-0x28(%rbp)
ja     16cd <main+0x55d>
movl   $0x0,-0x2c(%rbp)
cmpl   $0x1,-0x2c(%rbp)
ja     16ba <main+0x54a>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    $0xc,%rax
jae    16a7 <main+0x537>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    $0xc,%rax
jae    1694 <main+0x524>
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    $0x6,%rax
jae    1681 <main+0x511>
movl   $0x0,-0x38(%rbp)
cmpl   $0x1,-0x38(%rbp)
ja     166e <main+0x4fe>
mov    -0x30(%rbp),%eax
mov    -0x70(%rbp,%rax,4),%eax
mov    %eax,-0xa4(%rbp)
mov    -0x34(%rbp),%eax
mov    -0x70(%rbp,%rax,4),%eax
mov    %eax,-0xa8(%rbp)
mov    -0x24(%rbp),%edi
mov    -0x3c(%rbp),%esi
mov    -0xa4(%rbp),%edx
mov    -0xa8(%rbp),%ecx
call   1090 <expected@plt>
mov    %eax,-0xac(%rbp)
lea    0xd86(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x28(%rbp)
jne    14dd <main+0x36d>
mov    -0x24(%rbp),%ecx
lea    0xd8b(%rip),%rsi
lea    0xd80(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
mov    -0x24(%rbp),%ecx
lea    0xbfc(%rip),%rdx
lea    0xd75(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
mov    -0xa4(%rbp),%ecx
lea    0xd3d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x2c(%rbp)
jne    152b <main+0x3bb>
mov    -0x24(%rbp),%ecx
lea    0xd3d(%rip),%rsi
lea    0xd32(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
mov    -0x24(%rbp),%ecx
lea    0xbae(%rip),%rdx
lea    0xd27(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rdx
mov    -0xa8(%rbp),%ecx
lea    0xd19(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x38(%rbp)
je     1548 <main+0x3d8>
lea    0xd18(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1556 <main+0x3e6>
lea    0xd0e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x28(%rbp)
je     1591 <main+0x421>
mov    -0x24(%rbp),%ecx
lea    0xb4d(%rip),%rsi
lea    0xcc6(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
mov    -0xa4(%rbp),%edx
lea    0xce5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    159f <main+0x42f>
lea    0xcdc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x3c(%rbp),%eax
mov    -0xa0(%rbp,%rax,8),%rsi
ff
lea    0xcc5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x2c(%rbp)
je     15f3 <main+0x483>
mov    -0x24(%rbp),%ecx
lea    0xaeb(%rip),%rsi
lea    0xc64(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
mov    -0xa8(%rbp),%edx
lea    0xc83(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1601 <main+0x491>
lea    0xc81(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x38(%rbp)
je     163e <main+0x4ce>
cmpl   $0x0,-0xac(%rbp)
je     162b <main+0x4bb>
lea    0xc80(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1639 <main+0x4c9>
lea    0xc4b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1652 <main+0x4e2>
mov    -0xac(%rbp),%esi
lea    0xc47(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xc61(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1440 <main+0x2d0>
jmp    1673 <main+0x503>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    142c <main+0x2bc>
jmp    1686 <main+0x516>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1418 <main+0x2a8>
jmp    1699 <main+0x529>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1404 <main+0x294>
jmp    16ac <main+0x53c>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    13f3 <main+0x283>
jmp    16bf <main+0x54f>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    13e2 <main+0x272>
jmp    16d2 <main+0x562>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    13d1 <main+0x261>
mov    -0x18(%rbp),%ecx
lea    0xc20(%rip),%rsi
lea    0xc17(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
lea    0xbc0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xc0a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xc1d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
lea    0xeab(%rip),%rax
mov    %rax,0x40(%rsp)
lea    0xea2(%rip),%rax
mov    %rax,0x48(%rsp)
lea    0xe99(%rip),%rax
mov    %rax,0x50(%rsp)
lea    0xe8f(%rip),%rax
mov    %rax,0x58(%rsp)
lea    0xe86(%rip),%rax
mov    %rax,0x60(%rsp)
lea    0xfc1(%rip),%rax
mov    %rax,0x68(%rsp)
cmp    $0x2,%edi
jl     1296 <main+0x126>
mov    %rsi,%r13
mov    %edi,%ebp
xor    %eax,%eax
mov    %rax,0x8(%rsp)
mov    $0x1,%r15d
lea    0xe56(%rip),%r14
xor    %r12d,%r12d
jmp    1203 <main+0x93>
nopl   (%rax)
mov    $0x1,%eax
mov    %rax,0x8(%rsp)
add    $0x1,%r15d
cmp    %ebp,%r15d
jge    1266 <main+0xf6>
movslq %r15d,%rax
mov    0x0(%r13,%rax,8),%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1070 <strcmp@plt>
test   %eax,%eax
je     11f0 <main+0x80>
mov    %rbx,%rdi
lea    0xe1f(%rip),%rsi
call   1070 <strcmp@plt>
test   %eax,%eax
jne    1240 <main+0xd0>
add    $0x1,%r15d
cmp    %ebp,%r15d
jge    1240 <main+0xd0>
movslq %r15d,%rax
mov    0x0(%r13,%rax,8),%r12
jmp    11fa <main+0x8a>
mov    0x2d99(%rip),%rax
mov    (%rax),%edi
lea    0xdf6(%rip),%rsi
mov    %rbx,%rdx
call   1080 <fprintf@plt>
mov    0x2d79(%rip),%rax
mov    (%rax),%ebx
jmp    1692 <main+0x522>
test   %r12,%r12
je     1283 <main+0x113>
mov    0x2d5e(%rip),%rax
mov    (%rax),%edx
lea    0xdc6(%rip),%rsi
mov    %r12,%rdi
call   1060 <freopen@plt>
cmpl   $0x0,0x8(%rsp)
je     1296 <main+0x126>
lea    0xebd(%rip),%rax
jmp    131f <main+0x1af>
lea    0xec0(%rip),%rdi
call   1040 <puts@plt>
lea    0xec8(%rip),%rdi
call   1040 <puts@plt>
lea    0xecf(%rip),%rdi
call   1040 <puts@plt>
lea    0xed8(%rip),%rdi
call   1040 <puts@plt>
lea    0xed7(%rip),%rdi
call   1040 <puts@plt>
lea    0xee4(%rip),%rdi
call   1040 <puts@plt>
lea    0xef7(%rip),%rdi
call   1040 <puts@plt>
lea    0xf1f(%rip),%rdi
call   1040 <puts@plt>
lea    0xf51(%rip),%rdi
call   1040 <puts@plt>
lea    0xf7f(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe31(%rip),%rax
mov    %rax,0x28(%rsp)
lea    0xf94(%rip),%rdi
call   1040 <puts@plt>
lea    0xf99(%rip),%rdi
call   1040 <puts@plt>
lea    0xfd5(%rip),%rbx
xor    %edi,%edi
jmp    135c <main+0x1ec>
nopw   0x0(%rax,%rax,1)
add    $0x1,%edi
cmp    $0x2,%edi
je     1665 <main+0x4f5>
test   %edi,%edi
lea    0xd29(%rip),%rcx
lea    0xd26(%rip),%rax
cmove  %rax,%rcx
mov    %rcx,0x20(%rsp)
lea    0xd1f(%rip),%rcx
lea    0xcf3(%rip),%rax
cmove  %rax,%rcx
mov    %rcx,0x10(%rsp)
movl   $0x0,0x4(%rsp)
mov    %edi,0x1c(%rsp)
jmp    13b0 <main+0x240>
nopw   0x0(%rax,%rax,1)
mov    0x4(%rsp),%eax
add    $0x1,%eax
mov    %eax,0x4(%rsp)
cmp    $0x2,%eax
je     1350 <main+0x1e0>
movl   $0x0,0x8(%rsp)
jmp    13d0 <main+0x260>
nopw   0x0(%rax,%rax,1)
mov    0x8(%rsp),%eax
add    $0x1,%eax
mov    %eax,0x8(%rsp)
cmp    $0x2,%eax
je     13a0 <main+0x230>
xor    %ecx,%ecx
jmp    13ef <main+0x27f>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x30(%rsp),%rcx
add    $0x1,%rcx
cmp    $0xc,%rcx
je     13c0 <main+0x250>
lea    0xc0a(%rip),%rax
mov    %rcx,0x30(%rsp)
mov    (%rax,%rcx,4),%ebp
xor    %ecx,%ecx
jmp    141f <main+0x2af>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x38(%rsp),%rcx
add    $0x1,%rcx
cmp    $0xc,%rcx
je     13e0 <main+0x270>
lea    0xbda(%rip),%rax
mov    %rcx,0x38(%rsp)
mov    (%rax,%rcx,4),%r15d
xor    %r13d,%r13d
jmp    145e <main+0x2ee>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
call   1040 <puts@plt>
mov    %r14,%rbx
mov    %r14,%rdi
call   1040 <puts@plt>
add    $0x1,%r13
cmp    $0x6,%r13
mov    0x1c(%rsp),%edi
je     1410 <main+0x2a0>
mov    %r13d,%esi
mov    %ebp,%edx
mov    %r15d,%ecx
call   1090 <expected@plt>
mov    %eax,%r14d
lea    0xe9f(%rip),%rdi
call   1040 <puts@plt>
cmpl   $0x0,0x4(%rsp)
je     14c0 <main+0x350>
cmpl   $0x0,0x8(%rsp)
je     14e1 <main+0x371>
lea    0xc32(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
cmpl   $0x0,0x4(%rsp)
je     1500 <main+0x390>
lea    0xc2a(%rip),%rdi
mov    0x10(%rsp),%rsi
mov    %ebp,%edx
xor    %eax,%eax
call   1050 <printf@plt>
jmp    150a <main+0x39a>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    0xbb0(%rip),%rdi
mov    0x20(%rsp),%rsi
mov    0x10(%rsp),%rdx
mov    %ebp,%ecx
xor    %eax,%eax
call   1050 <printf@plt>
cmpl   $0x0,0x8(%rsp)
jne    1488 <main+0x318>
lea    0xbb9(%rip),%rdi
mov    0x20(%rsp),%rsi
mov    0x10(%rsp),%rdx
mov    %r15d,%ecx
xor    %eax,%eax
call   1050 <printf@plt>
jmp    1488 <main+0x318>
xchg   %ax,%ax
mov    $0x6c,%edi
call   1030 <putchar@plt>
mov    0x40(%rsp,%r13,8),%r12
lea    0xbc2(%rip),%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
cmpl   $0x0,0x8(%rsp)
je     1540 <main+0x3d0>
lea    0xba0(%rip),%rdi
mov    0x10(%rsp),%rsi
mov    %r15d,%edx
xor    %eax,%eax
call   1050 <printf@plt>
jmp    154a <main+0x3da>
nop
mov    $0x72,%edi
call   1030 <putchar@plt>
lea    0xb8c(%rip),%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%r14
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    0x1c(%rsp),%edi
mov    %r13d,%esi
mov    %ebp,%edx
mov    %r15d,%ecx
call   1090 <expected@plt>
mov    %eax,%ebx
lea    0xd94(%rip),%rdi
call   1040 <puts@plt>
cmpl   $0x0,0x4(%rsp)
je     15c0 <main+0x450>
cmpl   $0x0,0x8(%rsp)
je     15e1 <main+0x471>
lea    0xb1e(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
cmpl   $0x0,0x4(%rsp)
je     1600 <main+0x490>
lea    0xb1f(%rip),%rdi
mov    0x10(%rsp),%rsi
mov    %ebp,%edx
xor    %eax,%eax
call   1050 <printf@plt>
jmp    160a <main+0x49a>
nop
lea    0xab0(%rip),%rdi
mov    0x20(%rsp),%rsi
mov    0x10(%rsp),%rdx
mov    %ebp,%ecx
xor    %eax,%eax
call   1050 <printf@plt>
cmpl   $0x0,0x8(%rsp)
jne    1593 <main+0x423>
lea    0xab9(%rip),%rdi
mov    0x20(%rsp),%rsi
mov    0x10(%rsp),%rdx
mov    %r15d,%ecx
xor    %eax,%eax
call   1050 <printf@plt>
jmp    1593 <main+0x423>
xchg   %ax,%ax
mov    $0x6c,%edi
call   1030 <putchar@plt>
lea    0xac7(%rip),%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
cmpl   $0x0,0x8(%rsp)
je     1640 <main+0x4d0>
lea    0xaa5(%rip),%rdi
mov    0x10(%rsp),%rsi
mov    %r15d,%edx
xor    %eax,%eax
call   1050 <printf@plt>
jmp    164a <main+0x4da>
nopw   0x0(%rax,%rax,1)
mov    $0x72,%edi
call   1030 <putchar@plt>
lea    0xccb(%rip),%rdi
test   %ebx,%ebx
je     1440 <main+0x2d0>
lea    0xcd0(%rip),%rdi
jmp    1440 <main+0x2d0>
lea    0xa99(%rip),%rdi
xor    %ebx,%ebx
mov    0x28(%rsp),%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xc65(%rip),%rdi
call   1040 <puts@plt>
lea    0xc79(%rip),%rdi
call   1040 <puts@plt>
mov    %ebx,%eax
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.testValues = [12 x i32] [i32 0, i32 1, i32 2, i32 2147483645, i32 2147483646, i32 2147483647, i32 -2147483648, i32 -2147483647, i32 -2147483646, i32 -3, i32 -2, i32 -1]
@.str = [3 x i8] c"==\00"
@.str.1 = [3 x i8] c"!=\00"
@.str.2 = [2 x i8] c"<\00"
@.str.3 = [3 x i8] c">=\00"
@.str.4 = [3 x i8] c"<=\00"
@.str.5 = [2 x i8] c">\00"
@.str.6 = [5 x i8] c"-raw\00"
@.str.7 = [3 x i8] c"-o\00"
@stderr = global i32 0
@.str.8 = [49 x i8] c"Invalid or unsupported command line option '%s'\0A\00"
@EXIT_FAILURE = global i32 0
@.str.9 = [2 x i8] c"w\00"
@stdout = global i32 0
@.str.10 = [21 x i8] c"#include <limits.h>\0A\00"
@.str.11 = [20 x i8] c"#include <stdio.h>\0A\00"
@.str.12 = [22 x i8] c"#include <stdlib.h>\0A\0A\00"
@.str.13 = [12 x i8] c"// Ensure:\0A\00"
@.str.14 = [26 x i8] c"// - expected type sizes\0A\00"
@.str.15 = [32 x i8] c"// - 2's complement arithmetic\0A\00"
@.str.16 = [53 x i8] c"extern char StAtIcAsSeRt[(CHAR_BIT == 8) ? 1 : -1];\0A\00"
@.str.17 = [63 x i8] c"extern char StAtIcAsSeRt[(-INT_MAX == INT_MIN + 1) ? 1 : -1];\0A\00"
@.str.18 = [59 x i8] c"extern char StAtIcAsSeRt[((int)UINT_MAX == -1) ? 1 : -1];\0A\00"
@.str.19 = [56 x i8] c"extern char StAtIcAsSeRt[(sizeof(int) == 4) ? 1 : -1];\0A\00"
@.str.20 = [2 x i8] c"\0A\00"
@.str.21 = [18 x i8] c"int main(void)\0A{\0A\00"
@.str.22 = [23 x i8] c" unsigned error = 0;\0A\00"
@.str.23 = [5 x i8] c" {\0A\00"
@.str.24 = [23 x i8] c" %s l = %s0x%08Xu;\0A\00"
@.str.25 = [4 x i8] c"int\00"
@.str.26 = [9 x i8] c"unsigned\00"
@.str.27 = [6 x i8] c"(int)\00"
@.str.28 = [1 x i8] zeroinitializer
@.str.29 = [23 x i8] c" %s r = %s0x%08Xu;\0A\00"
@.str.30 = [9 x i8] c" if (\00"
@.str.31 = [13 x i8] c" int v = \00"
@.str.32 = [10 x i8] c"%s0x%08Xu\00"
@.str.33 = [2 x i8] c"l\00"
@.str.34 = [5 x i8] c" %s \00"
@.str.35 = [2 x i8] c"r\00"
@.str.36 = [27 x i8] c"); else error = __LINE__;\0A\00"
@.str.37 = [21 x i8] c") error = __LINE__;\0A\00"
@.str.38 = [40 x i8] c"; if (v == %d); else error = __LINE__;\0A\00"
@.str.39 = [5 x i8] c" }\0A\00"
@.str.40 = [73 x i8] c" if (error) { printf(\22Test on line %%u failed\\n\22, error); return %s; }\0A\00"
@.str.41 = [2 x i8] c"1\00"
@.str.42 = [13 x i8] c"EXIT_FAILURE\00"
@.str.43 = [33 x i8] c" printf(\22All tests passed\\n\22);\0A\00"
@.str.44 = [15 x i8] c" return 0;\0A}\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca [12 x i32]
%17 = alloca [6 x i8*]
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %7
store i8* null, i8** %8
%21 = bitcast [12 x i32]* %16 to i8*
%22 = bitcast [6 x i8*]* %17 to i8*
%23 = bitcast i8* %22 to [6 x i8*]*
%24 = getelementptr inbounds [6 x i8*], [6 x i8*]* %23, i32 0, i32 0
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i32 0, i32 0), i8** %24
%25 = getelementptr inbounds [6 x i8*], [6 x i8*]* %23, i32 0, i32 1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i32 0, i32 0), i8** %25
%26 = getelementptr inbounds [6 x i8*], [6 x i8*]* %23, i32 0, i32 2
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i32 0, i32 0), i8** %26
%27 = getelementptr inbounds [6 x i8*], [6 x i8*]* %23, i32 0, i32 3
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i32 0, i32 0), i8** %27
%28 = getelementptr inbounds [6 x i8*], [6 x i8*]* %23, i32 0, i32 4
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i32 0, i32 0), i8** %28
%29 = getelementptr inbounds [6 x i8*], [6 x i8*]* %23, i32 0, i32 5
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i32 0, i32 0), i8** %29
store i32 1, i32* %6
br label %30
30: ; preds = %75, %2
%31 = load i32, i32* %6
%32 = load i32, i32* %4
%33 = icmp slt i32 %31, %32
br i1 %33, label %34, label %78
34: ; preds = %30
%35 = load i8**, i8*** %5
%36 = load i32, i32* %6
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds i8*, i8** %35, i64 %37
%39 = load i8*, i8** %38
%40 = call i32 @strcmp(i8* %39, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
%41 = icmp ne i32 %40, 0
br i1 %41, label %43, label %42
42: ; preds = %34
store i32 1, i32* %7
br label %75
43: ; preds = %34
%44 = load i8**, i8*** %5
%45 = load i32, i32* %6
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds i8*, i8** %44, i64 %46
%48 = load i8*, i8** %47
%49 = call i32 @strcmp(i8* %48, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
%50 = icmp ne i32 %49, 0
br i1 %50, label %65, label %51
51: ; preds = %43
%52 = load i32, i32* %6
%53 = add nsw i32 %52, 1
%54 = load i32, i32* %4
%55 = icmp slt i32 %53, %54
br i1 %55, label %56, label %64
56: ; preds = %51
%57 = load i32, i32* %6
%58 = add nsw i32 %57, 1
store i32 %58, i32* %6
%59 = load i8**, i8*** %5
%60 = load i32, i32* %6
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds i8*, i8** %59, i64 %61
%63 = load i8*, i8** %62
store i8* %63, i8** %8
br label %75
64: ; preds = %51
br label %65
65: ; preds = %64, %43
br label %66
66: ; preds = %65
%67 = load i32, i32* @stderr
%68 = load i8**, i8*** %5
%69 = load i32, i32* %6
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds i8*, i8** %68, i64 %70
%72 = load i8*, i8** %71
%73 = call i32 @fprintf(i32 %67, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.8, i64 0, i64 0), i8* %72)
%74 = load i32, i32* @EXIT_FAILURE
store i32 %74, i32* %3
br label %262
75: ; preds = %56, %42
%76 = load i32, i32* %6
%77 = add nsw i32 %76, 1
store i32 %77, i32* %6
br label %30
78: ; preds = %30
%79 = load i8*, i8** %8
%80 = icmp ne i8* %79, null
br i1 %80, label %81, label %85
81: ; preds = %78
%82 = load i8*, i8** %8
%83 = load i32, i32* @stdout
%84 = call i32 @freopen(i8* %82, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0), i32 %83)
br label %85
85: ; preds = %81, %78
%86 = load i32, i32* %7
%87 = icmp ne i32 %86, 0
br i1 %87, label %100, label %88
88: ; preds = %85
%89 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.10, i64 0, i64 0))
%90 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.11, i64 0, i64 0))
%91 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.12, i64 0, i64 0))
%92 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0))
%93 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.14, i64 0, i64 0))
%94 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.15, i64 0, i64 0))
%95 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.16, i64 0, i64 0))
%96 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.17, i64 0, i64 0))
%97 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.18, i64 0, i64 0))
%98 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.19, i64 0, i64 0))
%99 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.20, i64 0, i64 0))
br label %100
100: ; preds = %88, %85
%101 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.21, i64 0, i64 0))
%102 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.22, i64 0, i64 0))
store i32 0, i32* %9
br label %103
103: ; preds = %251, %100
%104 = load i32, i32* %9
%105 = icmp ule i32 %104, 1
br i1 %105, label %106, label %254
106: ; preds = %103
store i32 0, i32* %10
br label %107
107: ; preds = %247, %106
%108 = load i32, i32* %10
%109 = icmp ule i32 %108, 1
br i1 %109, label %110, label %250
110: ; preds = %107
store i32 0, i32* %11
br label %111
111: ; preds = %243, %110
%112 = load i32, i32* %11
%113 = icmp ule i32 %112, 1
br i1 %113, label %114, label %246
114: ; preds = %111
store i32 0, i32* %12
br label %115
115: ; preds = %239, %114
%116 = load i32, i32* %12
%117 = zext i32 %116 to i64
%118 = icmp ult i64 %117, 12
br i1 %118, label %119, label %242
119: ; preds = %115
store i32 0, i32* %13
br label %120
120: ; preds = %235, %119
%121 = load i32, i32* %13
%122 = zext i32 %121 to i64
%123 = icmp ult i64 %122, 12
br i1 %123, label %124, label %238
124: ; preds = %120
store i32 0, i32* %15
br label %125
125: ; preds = %231, %124
%126 = load i32, i32* %15
%127 = zext i32 %126 to i64
%128 = icmp ult i64 %127, 6
br i1 %128, label %129, label %234
129: ; preds = %125
store i32 0, i32* %14
br label %130
130: ; preds = %227, %129
%131 = load i32, i32* %14
%132 = icmp ule i32 %131, 1
br i1 %132, label %133, label %230
133: ; preds = %130
%134 = load i32, i32* %12
%135 = zext i32 %134 to i64
%136 = getelementptr inbounds [12 x i32], [12 x i32]* %16, i64 0, i64 %135
%137 = load i32, i32* %136
store i32 %137, i32* %18
%138 = load i32, i32* %13
%139 = zext i32 %138 to i64
%140 = getelementptr inbounds [12 x i32], [12 x i32]* %16, i64 0, i64 %139
%141 = load i32, i32* %140
store i32 %141, i32* %19
%142 = load i32, i32* %9
%143 = load i32, i32* %15
%144 = load i32, i32* %18
%145 = load i32, i32* %19
%146 = call i32 @expected(i32 %142, i32 %143, i32 %144, i32 %145)
store i32 %146, i32* %20
%147 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.23, i64 0, i64 0))
%148 = load i32, i32* %10
%149 = icmp ne i32 %148, 0
br i1 %149, label %161, label %150
150: ; preds = %133
%151 = load i32, i32* %9
%152 = icmp ne i32 %151, 0
%153 = zext i1 %152 to i64
%154 = select i1 %152, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.25, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.26, i64 0, i64 0)
%155 = load i32, i32* %9
%156 = icmp ne i32 %155, 0
%157 = zext i1 %156 to i64
%158 = select i1 %156, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.27, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.28, i64 0, i64 0)
%159 = load i32, i32* %18
%160 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.24, i64 0, i64 0), i8* %154, i8* %158, i32 %159)
br label %161
161: ; preds = %150, %133
%162 = load i32, i32* %11
%163 = icmp ne i32 %162, 0
br i1 %163, label %175, label %164
164: ; preds = %161
%165 = load i32, i32* %9
%166 = icmp ne i32 %165, 0
%167 = zext i1 %166 to i64
%168 = select i1 %166, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.25, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.26, i64 0, i64 0)
%169 = load i32, i32* %9
%170 = icmp ne i32 %169, 0
%171 = zext i1 %170 to i64
%172 = select i1 %170, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.27, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.28, i64 0, i64 0)
%173 = load i32, i32* %19
%174 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.29, i64 0, i64 0), i8* %168, i8* %172, i32 %173)
br label %175
175: ; preds = %164, %161
%176 = load i32, i32* %14
%177 = icmp ne i32 %176, 0
br i1 %177, label %178, label %180
178: ; preds = %175
%179 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.30, i64 0, i64 0))
br label %182
180: ; preds = %175
%181 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.31, i64 0, i64 0))
br label %182
182: ; preds = %180, %178
%183 = load i32, i32* %10
%184 = icmp ne i32 %183, 0
br i1 %184, label %185, label %192
185: ; preds = %182
%186 = load i32, i32* %9
%187 = icmp ne i32 %186, 0
%188 = zext i1 %187 to i64
%189 = select i1 %187, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.27, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.28, i64 0, i64 0)
%190 = load i32, i32* %18
%191 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.32, i64 0, i64 0), i8* %189, i32 %190)
br label %194
192: ; preds = %182
%193 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.33, i64 0, i64 0))
br label %194
194: ; preds = %192, %185
%195 = load i32, i32* %15
%196 = zext i32 %195 to i64
%197 = getelementptr inbounds [6 x i8*], [6 x i8*]* %17, i64 0, i64 %196
%198 = load i8*, i8** %197
%199 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.34, i64 0, i64 0), i8* %198)
%200 = load i32, i32* %11
%201 = icmp ne i32 %200, 0
br i1 %201, label %202, label %209
202: ; preds = %194
%203 = load i32, i32* %9
%204 = icmp ne i32 %203, 0
%205 = zext i1 %204 to i64
%206 = select i1 %204, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.27, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.28, i64 0, i64 0)
%207 = load i32, i32* %19
%208 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.32, i64 0, i64 0), i8* %206, i32 %207)
br label %211
209: ; preds = %194
%210 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.35, i64 0, i64 0))
br label %211
211: ; preds = %209, %202
%212 = load i32, i32* %14
%213 = icmp ne i32 %212, 0
br i1 %213, label %214, label %222
214: ; preds = %211
%215 = load i32, i32* %20
%216 = icmp ne i32 %215, 0
br i1 %216, label %217, label %219
217: ; preds = %214
%218 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.36, i64 0, i64 0))
br label %221
219: ; preds = %214
%220 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.37, i64 0, i64 0))
br label %221
221: ; preds = %219, %217
br label %225
222: ; preds = %211
%223 = load i32, i32* %20
%224 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.38, i64 0, i64 0), i32 %223)
br label %225
225: ; preds = %222, %221
%226 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.39, i64 0, i64 0))
br label %227
227: ; preds = %225
%228 = load i32, i32* %14
%229 = add i32 %228, 1
store i32 %229, i32* %14
br label %130
230: ; preds = %130
br label %231
231: ; preds = %230
%232 = load i32, i32* %15
%233 = add i32 %232, 1
store i32 %233, i32* %15
br label %125
234: ; preds = %125
br label %235
235: ; preds = %234
%236 = load i32, i32* %13
%237 = add i32 %236, 1
store i32 %237, i32* %13
br label %120
238: ; preds = %120
br label %239
239: ; preds = %238
%240 = load i32, i32* %12
%241 = add i32 %240, 1
store i32 %241, i32* %12
br label %115
242: ; preds = %115
br label %243
243: ; preds = %242
%244 = load i32, i32* %11
%245 = add i32 %244, 1
store i32 %245, i32* %11
br label %111
246: ; preds = %111
br label %247
247: ; preds = %246
%248 = load i32, i32* %10
%249 = add i32 %248, 1
store i32 %249, i32* %10
br label %107
250: ; preds = %107
br label %251
251: ; preds = %250
%252 = load i32, i32* %9
%253 = add i32 %252, 1
store i32 %253, i32* %9
br label %103
254: ; preds = %103
%255 = load i32, i32* %7
%256 = icmp ne i32 %255, 0
%257 = zext i1 %256 to i64
%258 = select i1 %256, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.41, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.42, i64 0, i64 0)
%259 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.40, i64 0, i64 0), i8* %258)
%260 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.43, i64 0, i64 0))
%261 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.44, i64 0, i64 0))
store i32 0, i32* %3
br label %262
262: ; preds = %254, %66
%263 = load i32, i32* %3
ret i32 %263
}

LLVM IR (-O2):
@__const.main.testValues = [12 x i32] [i32 0, i32 1, i32 2, i32 2147483645, i32 2147483646, i32 2147483647, i32 -2147483648, i32 -2147483647, i32 -2147483646, i32 -3, i32 -2, i32 -1]
@.str = [3 x i8] c"==\00"
@.str.1 = [3 x i8] c"!=\00"
@.str.2 = [2 x i8] c"<\00"
@.str.3 = [3 x i8] c">=\00"
@.str.4 = [3 x i8] c"<=\00"
@.str.5 = [2 x i8] c">\00"
@.str.6 = [5 x i8] c"-raw\00"
@.str.7 = [3 x i8] c"-o\00"
@stderr = global i32 0
@.str.8 = [49 x i8] c"Invalid or unsupported command line option '%s'\0A\00"
@EXIT_FAILURE = global i32 0
@.str.9 = [2 x i8] c"w\00"
@stdout = global i32 0
@.str.24 = [23 x i8] c" %s l = %s0x%08Xu;\0A\00"
@.str.25 = [4 x i8] c"int\00"
@.str.26 = [9 x i8] c"unsigned\00"
@.str.27 = [6 x i8] c"(int)\00"
@.str.28 = [1 x i8] zeroinitializer
@.str.29 = [23 x i8] c" %s r = %s0x%08Xu;\0A\00"
@.str.30 = [9 x i8] c" if (\00"
@.str.31 = [13 x i8] c" int v = \00"
@.str.32 = [10 x i8] c"%s0x%08Xu\00"
@.str.34 = [5 x i8] c" %s \00"
@.str.38 = [40 x i8] c"; if (v == %d); else error = __LINE__;\0A\00"
@.str.40 = [73 x i8] c" if (error) { printf(\22Test on line %%u failed\\n\22, error); return %s; }\0A\00"
@.str.41 = [2 x i8] c"1\00"
@.str.42 = [13 x i8] c"EXIT_FAILURE\00"
@str = [20 x i8] c"#include <limits.h>\00"
@str.45 = [19 x i8] c"#include <stdio.h>\00"
@str.46 = [21 x i8] c"#include <stdlib.h>\0A\00"
@str.47 = [11 x i8] c"// Ensure:\00"
@str.48 = [25 x i8] c"// - expected type sizes\00"
@str.49 = [31 x i8] c"// - 2's complement arithmetic\00"
@str.50 = [52 x i8] c"extern char StAtIcAsSeRt[(CHAR_BIT == 8) ? 1 : -1];\00"
@str.51 = [62 x i8] c"extern char StAtIcAsSeRt[(-INT_MAX == INT_MIN + 1) ? 1 : -1];\00"
@str.52 = [58 x i8] c"extern char StAtIcAsSeRt[((int)UINT_MAX == -1) ? 1 : -1];\00"
@str.53 = [55 x i8] c"extern char StAtIcAsSeRt[(sizeof(int) == 4) ? 1 : -1];\00"
@str.54 = [17 x i8] c"int main(void)\0A{\00"
@str.55 = [22 x i8] c" unsigned error = 0;\00"
@str.56 = [32 x i8] c" printf(\22All tests passed\\n\22);\00"
@str.57 = [14 x i8] c" return 0;\0A}\00"
@str.58 = [4 x i8] c" {\00"
@str.59 = [4 x i8] c" }\00"
@str.60 = [20 x i8] c") error = __LINE__;\00"
@str.61 = [26 x i8] c"); else error = __LINE__;\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [6 x i8*]
%4 = bitcast [6 x i8*]* %3 to i8*
%5 = getelementptr inbounds [6 x i8*], [6 x i8*]* %3, i64 0, i64 0
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %5
%6 = getelementptr inbounds [6 x i8*], [6 x i8*]* %3, i64 0, i64 1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8** %6
%7 = getelementptr inbounds [6 x i8*], [6 x i8*]* %3, i64 0, i64 2
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8** %7
%8 = getelementptr inbounds [6 x i8*], [6 x i8*]* %3, i64 0, i64 3
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8** %8
%9 = getelementptr inbounds [6 x i8*], [6 x i8*]* %3, i64 0, i64 4
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8** %9
%10 = getelementptr inbounds [6 x i8*], [6 x i8*]* %3, i64 0, i64 5
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i8** %10
%11 = icmp sgt i32 %0, 1
br i1 %11, label %12, label %48
12: ; preds = %2, %35
%13 = phi i32 [ %39, %35 ], [ 1, %2 ]
%14 = phi i32 [ %37, %35 ], [ 0, %2 ]
%15 = phi i8* [ %36, %35 ], [ null, %2 ]
%16 = sext i32 %13 to i64
%17 = getelementptr inbounds i8*, i8** %1, i64 %16
%18 = load i8*, i8** %17
%19 = tail call i32 @strcmp(i8* dereferenceable(1) %18, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
%20 = icmp eq i32 %19, 0
br i1 %20, label %35, label %21
21: ; preds = %12
%22 = tail call i32 @strcmp(i8* dereferenceable(1) %18, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
%23 = icmp eq i32 %22, 0
br i1 %23, label %24, label %31
24: ; preds = %21
%25 = add nsw i32 %13, 1
%26 = icmp slt i32 %25, %0
br i1 %26, label %27, label %31
27: ; preds = %24
%28 = sext i32 %25 to i64
%29 = getelementptr inbounds i8*, i8** %1, i64 %28
%30 = load i8*, i8** %29
br label %35
31: ; preds = %21, %24
%32 = load i32, i32* @stderr
%33 = tail call i32 @fprintf(i32 %32, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.8, i64 0, i64 0), i8* %18)
%34 = load i32, i32* @EXIT_FAILURE
br label %155
35: ; preds = %12, %27
%36 = phi i8* [ %30, %27 ], [ %15, %12 ]
%37 = phi i32 [ %14, %27 ], [ 1, %12 ]
%38 = phi i32 [ %25, %27 ], [ %13, %12 ]
%39 = add nsw i32 %38, 1
%40 = icmp slt i32 %39, %0
br i1 %40, label %12, label %41
41: ; preds = %35
%42 = icmp eq i8* %36, null
br i1 %42, label %46, label %43
43: ; preds = %41
%44 = load i32, i32* @stdout
%45 = tail call i32 @freopen(i8* %36, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0), i32 %44)
br label %46
46: ; preds = %43, %41
%47 = icmp eq i32 %37, 0
br i1 %47, label %48, label %60
48: ; preds = %2, %46
%49 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%50 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.45, i64 0, i64 0))
%51 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.46, i64 0, i64 0))
%52 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.47, i64 0, i64 0))
%53 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.48, i64 0, i64 0))
%54 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.49, i64 0, i64 0))
%55 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.50, i64 0, i64 0))
%56 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.51, i64 0, i64 0))
%57 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str.52, i64 0, i64 0))
%58 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str.53, i64 0, i64 0))
%59 = tail call i32 @putchar(i32 10)
br label %60
60: ; preds = %48, %46
%61 = phi i8* [ getelementptr inbounds ([13 x i8], [13 x i8]* @.str.42, i64 0, i64 0), %48 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.41, i64 0, i64 0), %46 ]
%62 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str.54, i64 0, i64 0))
%63 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.55, i64 0, i64 0))
br label %64
64: ; preds = %60, %148
%65 = phi i32 [ 0, %60 ], [ %149, %148 ]
%66 = icmp eq i32 %65, 0
%67 = select i1 %66, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.26, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.25, i64 0, i64 0)
%68 = select i1 %66, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.28, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.27, i64 0, i64 0)
br label %69
69: ; preds = %64, %145
%70 = phi i32 [ 0, %64 ], [ %146, %145 ]
%71 = icmp eq i32 %70, 0
br label %72
72: ; preds = %69, %142
%73 = phi i32 [ 0, %69 ], [ %143, %142 ]
%74 = icmp eq i32 %73, 0
br label %75
75: ; preds = %72, %139
%76 = phi i64 [ 0, %72 ], [ %140, %139 ]
%77 = getelementptr inbounds [12 x i32], [12 x i32]* @__const.main.testValues, i64 0, i64 %76
%78 = load i32, i32* %77
br label %79
79: ; preds = %75, %136
%80 = phi i64 [ 0, %75 ], [ %137, %136 ]
%81 = getelementptr inbounds [12 x i32], [12 x i32]* @__const.main.testValues, i64 0, i64 %80
%82 = load i32, i32* %81
br label %83
83: ; preds = %79, %129
%84 = phi i64 [ 0, %79 ], [ %134, %129 ]
%85 = getelementptr inbounds [6 x i8*], [6 x i8*]* %3, i64 0, i64 %84
%86 = trunc i64 %84 to i32
%87 = tail call i32 @expected(i32 %65, i32 %86, i32 %78, i32 %82)
%88 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.58, i64 0, i64 0))
br i1 %71, label %89, label %91
89: ; preds = %83
%90 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.24, i64 0, i64 0), i8* %67, i8* %68, i32 %78)
br label %91
91: ; preds = %89, %83
br i1 %74, label %92, label %94
92: ; preds = %91
%93 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.29, i64 0, i64 0), i8* %67, i8* %68, i32 %82)
br label %94
94: ; preds = %92, %91
%95 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.31, i64 0, i64 0))
br i1 %71, label %98, label %96
96: ; preds = %94
%97 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.32, i64 0, i64 0), i8* %68, i32 %78)
br label %100
98: ; preds = %94
%99 = tail call i32 @putchar(i32 108)
br label %100
100: ; preds = %98, %96
%101 = load i8*, i8** %85
%102 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.34, i64 0, i64 0), i8* %101)
br i1 %74, label %105, label %103
103: ; preds = %100
%104 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.32, i64 0, i64 0), i8* %68, i32 %82)
br label %107
105: ; preds = %100
%106 = tail call i32 @putchar(i32 114)
br label %107
107: ; preds = %105, %103
%108 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.38, i64 0, i64 0), i32 %87)
%109 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.59, i64 0, i64 0))
%110 = tail call i32 @expected(i32 %65, i32 %86, i32 %78, i32 %82)
%111 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.58, i64 0, i64 0))
br i1 %71, label %112, label %114
112: ; preds = %107
%113 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.24, i64 0, i64 0), i8* %67, i8* %68, i32 %78)
br label %114
114: ; preds = %112, %107
br i1 %74, label %115, label %117
115: ; preds = %114
%116 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.29, i64 0, i64 0), i8* %67, i8* %68, i32 %82)
br label %117
117: ; preds = %115, %114
%118 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.30, i64 0, i64 0))
br i1 %71, label %121, label %119
119: ; preds = %117
%120 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.32, i64 0, i64 0), i8* %68, i32 %78)
br label %123
121: ; preds = %117
%122 = tail call i32 @putchar(i32 108)
br label %123
123: ; preds = %121, %119
%124 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.34, i64 0, i64 0), i8* %101)
br i1 %74, label %127, label %125
125: ; preds = %123
%126 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.32, i64 0, i64 0), i8* %68, i32 %82)
br label %129
127: ; preds = %123
%128 = tail call i32 @putchar(i32 114)
br label %129
129: ; preds = %125, %127
%130 = icmp eq i32 %110, 0
%131 = select i1 %130, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @str.60, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @str.61, i64 0, i64 0)
%132 = tail call i32 @puts(i8* dereferenceable(1) %131)
%133 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.59, i64 0, i64 0))
%134 = add nuw nsw i64 %84, 1
%135 = icmp eq i64 %134, 6
br i1 %135, label %136, label %83
136: ; preds = %129
%137 = add nuw nsw i64 %80, 1
%138 = icmp eq i64 %137, 12
br i1 %138, label %139, label %79
139: ; preds = %136
%140 = add nuw nsw i64 %76, 1
%141 = icmp eq i64 %140, 12
br i1 %141, label %142, label %75
142: ; preds = %139
%143 = add nuw nsw i32 %73, 1
%144 = icmp eq i32 %143, 2
br i1 %144, label %145, label %72
145: ; preds = %142
%146 = add nuw nsw i32 %70, 1
%147 = icmp eq i32 %146, 2
br i1 %147, label %148, label %69
148: ; preds = %145
%149 = add nuw nsw i32 %65, 1
%150 = icmp eq i32 %149, 2
br i1 %150, label %151, label %64
151: ; preds = %148
%152 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([73 x i8], [73 x i8]* @.str.40, i64 0, i64 0), i8* %61)
%153 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.56, i64 0, i64 0))
%154 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.57, i64 0, i64 0))
br label %155
155: ; preds = %151, %31
%156 = phi i32 [ %34, %31 ], [ 0, %151 ]
ret i32 %156
}