#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*/ assert(int);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char **argv) {
  signed char sc = 0xef;
  assert(sizeof(char) == 1);
  if ((int)((signed char)-1) == (int)-1) {
    assert(((int)sc) == (0xffffffef));
    printf("1: %8x\n", (int)sc);
    ;
    assert(((int)(signed char)sc) == (0xffffffef));
    printf("2: %8x\n", (int)(signed char)sc);
    ;
    assert(((unsigned int)sc) == (0xffffffef));
    printf("3: %8x\n", (unsigned int)sc);
    ;
    assert(((unsigned int)(unsigned char)sc) == (0xef));
    printf("4: %8x\n", (unsigned int)(unsigned char)sc);
    ;
    assert(((int)(unsigned char)sc) == (0xef));
    printf("5: %8x\n", (int)(unsigned char)sc);
    ;
    assert((sc & 0xff) == (0xef));
    printf("6: %8x\n", sc & 0xff);
    ;
    assert((sc << 8) == (0xffffef00));
    printf("7: %8x\n", sc << 8);
    ;
    assert(((sc << 8) >> 8) == (0xffffffef));
    printf("8: %8x\n", (sc << 8) >> 8);
    ;
  } else {
    printf("no signed char support\n");
  }
  assert(sizeof(int) == 4);
  unsigned int a, b, c, r;
  a = 0xffffffff;
  b = 1234;
  c = 4321;
  printf("a = %08x (%i), b = %08x (%i)\n", a, a, b, b);
  r = a + b;
  assert(r < a && r < b);
  printf("%08x (%i) = %08x (%i) + %08x (%i) (overflow happend? %i)\n", r, r, a,
         a, b, b, r < a);
  r = b + c;
  assert(r >= b && r >= c);
  printf("%08x (%i) = %08x (%i) + %08x (%i) (overflow happend? %i)\n", r, r, b,
         b, c, c, r < b);
  r = a - b;
  assert(r <= a);
  printf("%08x (%i) = %08x (%i) - %08x (%i) (overflow happend? %i)\n", r, r, a,
         a, b, b, r > a);
  r = b - a;
  assert(r > b);
  printf("%08x (%i) = %08x (%i) - %08x (%i) (overflow happend? %i)\n", r, r, b,
         b, a, a, r > b);
  {
    int *a, *b;
    a = NULL;
    b = a + 1;
    assert(sizeof(*a) > 1);
    assert(b - a == 1);
    assert((char *)b - (char *)a == sizeof(int));
  }
  a = -2;
  b = ~a;
  assert(b == 1);
  printf("a: %i, b: %i\n", a, b);
  a = -1;
  b = ~a;
  assert(b == 0);
  printf("a: %i, b: %i\n", a, b);
  a = 0;
  b = ~a;
  assert(b == -1);
  printf("a: %i, b: %i\n", a, b);
  a = 1;
  b = ~a;
  assert(b == -2);
  printf("a: %i, b: %i\n", a, b);
  a = 0x7fffffff;
  b = ~a;
  assert(b == 0x80000000);
  printf("a: %i, b: %i\n", a, b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movb   $0xef,-0x11(%rbp)
mov    $0x1,%edi
call   1040 <assert@plt>
movsbl -0x11(%rbp),%eax
cmp    $0xffffffef,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
movsbl -0x11(%rbp),%esi
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x11(%rbp),%eax
cmp    $0xffffffef,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
movsbl -0x11(%rbp),%esi
lea    0xe7f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x11(%rbp),%eax
cmp    $0xffffffef,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
movsbl -0x11(%rbp),%esi
lea    0xe61(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movzbl -0x11(%rbp),%eax
cmp    $0xef,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
movzbl -0x11(%rbp),%esi
lea    0xe41(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movzbl -0x11(%rbp),%eax
cmp    $0xef,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
movzbl -0x11(%rbp),%esi
lea    0xe21(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x11(%rbp),%eax
and    $0xff,%eax
cmp    $0xef,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
movsbl -0x11(%rbp),%esi
and    $0xff,%esi
lea    0xdf6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x11(%rbp),%eax
shl    $0x8,%eax
cmp    $0xffffef00,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
movsbl -0x11(%rbp),%esi
shl    $0x8,%esi
lea    0xdd0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0x11(%rbp),%eax
shl    $0x8,%eax
sar    $0x8,%eax
cmp    $0xffffffef,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
movsbl -0x11(%rbp),%esi
shl    $0x8,%esi
sar    $0x8,%esi
lea    0xda6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <assert@plt>
movl   $0xffffffff,-0x18(%rbp)
movl   $0x4d2,-0x1c(%rbp)
movl   $0x10e1,-0x20(%rbp)
mov    -0x18(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    -0x1c(%rbp),%r8d
lea    0xd74(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    -0x1c(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%ecx
xor    %eax,%eax
cmp    -0x18(%rbp),%ecx
mov    %al,-0x39(%rbp)
jae    12f9 <main+0x1d9>
mov    -0x24(%rbp),%eax
cmp    -0x1c(%rbp),%eax
setb   %al
mov    %al,-0x39(%rbp)
mov    -0x39(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x24(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x18(%rbp),%r8d
mov    -0x1c(%rbp),%r9d
mov    -0x1c(%rbp),%r10d
mov    -0x24(%rbp),%eax
cmp    -0x18(%rbp),%eax
setb   %al
and    $0x1,%al
movzbl %al,%eax
lea    0xd2e(%rip),%rdi
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    -0x20(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%ecx
xor    %eax,%eax
cmp    -0x1c(%rbp),%ecx
mov    %al,-0x3a(%rbp)
jb     1365 <main+0x245>
mov    -0x24(%rbp),%eax
cmp    -0x20(%rbp),%eax
setae  %al
mov    %al,-0x3a(%rbp)
mov    -0x3a(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x24(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    -0x1c(%rbp),%r8d
mov    -0x20(%rbp),%r9d
mov    -0x20(%rbp),%r10d
mov    -0x24(%rbp),%eax
cmp    -0x1c(%rbp),%eax
setb   %al
and    $0x1,%al
movzbl %al,%eax
lea    0xcc2(%rip),%rdi
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
sub    -0x1c(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x18(%rbp),%eax
setbe  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x24(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x18(%rbp),%r8d
mov    -0x1c(%rbp),%r9d
mov    -0x1c(%rbp),%r10d
mov    -0x24(%rbp),%eax
cmp    -0x18(%rbp),%eax
seta   %al
and    $0x1,%al
movzbl %al,%eax
lea    0xca7(%rip),%rdi
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
sub    -0x18(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x1c(%rbp),%eax
seta   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x24(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    -0x1c(%rbp),%r8d
mov    -0x18(%rbp),%r9d
mov    -0x18(%rbp),%r10d
mov    -0x24(%rbp),%eax
cmp    -0x1c(%rbp),%eax
seta   %al
and    $0x1,%al
movzbl %al,%eax
lea    0xc52(%rip),%rdi
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x0,%al
call   1030 <printf@plt>
movq   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x38(%rbp)
mov    $0x1,%edi
call   1040 <assert@plt>
mov    -0x38(%rbp),%rax
mov    -0x30(%rbp),%rcx
sub    %rcx,%rax
sar    $0x2,%rax
cmp    $0x1,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x38(%rbp),%rax
mov    -0x30(%rbp),%rcx
sub    %rcx,%rax
cmp    $0x4,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
movl   $0xfffffffe,-0x18(%rbp)
mov    -0x18(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x1,-0x1c(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x18(%rbp),%esi
mov    -0x1c(%rbp),%edx
lea    0xbf5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0xffffffff,-0x18(%rbp)
mov    -0x18(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x18(%rbp),%esi
mov    -0x1c(%rbp),%edx
lea    0xbc0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0xffffffff,-0x1c(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x18(%rbp),%esi
mov    -0x1c(%rbp),%edx
lea    0xb8b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0xfffffffe,-0x1c(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x18(%rbp),%esi
mov    -0x1c(%rbp),%edx
lea    0xb56(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x7fffffff,-0x18(%rbp)
mov    -0x18(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x80000000,-0x1c(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x18(%rbp),%esi
mov    -0x1c(%rbp),%edx
lea    0xb1e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x1,%edi
call   1040 <assert@plt>
mov    $0x1,%edi
call   1040 <assert@plt>
lea    0xec4(%rip),%rdi
mov    $0xffffffef,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <assert@plt>
lea    0xeaf(%rip),%rdi
mov    $0xffffffef,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <assert@plt>
lea    0xe9a(%rip),%rdi
mov    $0xffffffef,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <assert@plt>
lea    0xe85(%rip),%rdi
mov    $0xef,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <assert@plt>
lea    0xe70(%rip),%rdi
mov    $0xef,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <assert@plt>
lea    0xe5b(%rip),%rdi
mov    $0xef,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <assert@plt>
lea    0xe46(%rip),%rdi
mov    $0xffffef00,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <assert@plt>
lea    0xe31(%rip),%rdi
mov    $0xffffffef,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <assert@plt>
lea    0xe1c(%rip),%rdi
mov    $0xffffffff,%esi
mov    $0xffffffff,%edx
mov    $0x4d2,%ecx
mov    $0x4d2,%r8d
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <assert@plt>
lea    0xe0d(%rip),%rbx
mov    %rbx,%rdi
mov    $0x4d1,%esi
mov    $0x4d1,%edx
mov    $0xffffffff,%ecx
mov    $0xffffffff,%r8d
mov    $0x4d2,%r9d
xor    %eax,%eax
push   $0x1
push   $0x4d2
call   1030 <printf@plt>
add    $0x10,%rsp
mov    $0x1,%edi
call   1040 <assert@plt>
mov    %rbx,%rdi
mov    $0x15b3,%esi
mov    $0x15b3,%edx
mov    $0x4d2,%ecx
mov    $0x4d2,%r8d
mov    $0x10e1,%r9d
xor    %eax,%eax
push   $0x0
push   $0x10e1
call   1030 <printf@plt>
add    $0x10,%rsp
mov    $0x1,%edi
call   1040 <assert@plt>
lea    0xdcc(%rip),%rbx
mov    %rbx,%rdi
mov    $0xfffffb2d,%esi
mov    $0xfffffb2d,%edx
mov    $0xffffffff,%ecx
mov    $0xffffffff,%r8d
mov    $0x4d2,%r9d
xor    %eax,%eax
push   $0x0
push   $0x4d2
call   1030 <printf@plt>
add    $0x10,%rsp
mov    $0x1,%edi
call   1040 <assert@plt>
mov    %rbx,%rdi
mov    $0x4d3,%esi
mov    $0x4d3,%edx
mov    $0x4d2,%ecx
mov    $0x4d2,%r8d
mov    $0xffffffff,%r9d
xor    %eax,%eax
push   $0x1
push   $0xffffffffffffffff
call   1030 <printf@plt>
add    $0x10,%rsp
mov    $0x1,%edi
call   1040 <assert@plt>
mov    $0x1,%edi
call   1040 <assert@plt>
mov    $0x1,%edi
call   1040 <assert@plt>
mov    $0x1,%edi
call   1040 <assert@plt>
lea    0xd70(%rip),%rbx
mov    %rbx,%rdi
mov    $0xfffffffe,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <assert@plt>
mov    %rbx,%rdi
mov    $0xffffffff,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <assert@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0xffffffff,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <assert@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0xfffffffe,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <assert@plt>
mov    %rbx,%rdi
mov    $0x7fffffff,%esi
mov    $0x80000000,%edx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"1: %8x\0A\00"
@.str.1 = [8 x i8] c"2: %8x\0A\00"
@.str.2 = [8 x i8] c"3: %8x\0A\00"
@.str.3 = [8 x i8] c"4: %8x\0A\00"
@.str.4 = [8 x i8] c"5: %8x\0A\00"
@.str.5 = [8 x i8] c"6: %8x\0A\00"
@.str.6 = [8 x i8] c"7: %8x\0A\00"
@.str.7 = [8 x i8] c"8: %8x\0A\00"
@.str.8 = [30 x i8] c"a = %08x (%i), b = %08x (%i)\0A\00"
@.str.9 = [58 x i8] c"%08x (%i) = %08x (%i) + %08x (%i) (overflow happend? %i)\0A\00"
@.str.10 = [58 x i8] c"%08x (%i) = %08x (%i) - %08x (%i) (overflow happend? %i)\0A\00"
@.str.11 = [14 x i8] c"a: %i, b: %i\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32*
%12 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8 -17, i8* %6
%13 = call i32 @assert(i32 1)
%14 = load i8, i8* %6
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %15, -17
%17 = zext i1 %16 to i32
%18 = call i32 @assert(i32 %17)
%19 = load i8, i8* %6
%20 = sext i8 %19 to i32
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %20)
%22 = load i8, i8* %6
%23 = sext i8 %22 to i32
%24 = icmp eq i32 %23, -17
%25 = zext i1 %24 to i32
%26 = call i32 @assert(i32 %25)
%27 = load i8, i8* %6
%28 = sext i8 %27 to i32
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %28)
%30 = load i8, i8* %6
%31 = sext i8 %30 to i32
%32 = icmp eq i32 %31, -17
%33 = zext i1 %32 to i32
%34 = call i32 @assert(i32 %33)
%35 = load i8, i8* %6
%36 = sext i8 %35 to i32
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 %36)
%38 = load i8, i8* %6
%39 = zext i8 %38 to i32
%40 = icmp eq i32 %39, 239
%41 = zext i1 %40 to i32
%42 = call i32 @assert(i32 %41)
%43 = load i8, i8* %6
%44 = zext i8 %43 to i32
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i32 %44)
%46 = load i8, i8* %6
%47 = zext i8 %46 to i32
%48 = icmp eq i32 %47, 239
%49 = zext i1 %48 to i32
%50 = call i32 @assert(i32 %49)
%51 = load i8, i8* %6
%52 = zext i8 %51 to i32
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i32 %52)
%54 = load i8, i8* %6
%55 = sext i8 %54 to i32
%56 = and i32 %55, 255
%57 = icmp eq i32 %56, 239
%58 = zext i1 %57 to i32
%59 = call i32 @assert(i32 %58)
%60 = load i8, i8* %6
%61 = sext i8 %60 to i32
%62 = and i32 %61, 255
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i32 %62)
%64 = load i8, i8* %6
%65 = sext i8 %64 to i32
%66 = shl i32 %65, 8
%67 = icmp eq i32 %66, -4352
%68 = zext i1 %67 to i32
%69 = call i32 @assert(i32 %68)
%70 = load i8, i8* %6
%71 = sext i8 %70 to i32
%72 = shl i32 %71, 8
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i32 %72)
%74 = load i8, i8* %6
%75 = sext i8 %74 to i32
%76 = shl i32 %75, 8
%77 = ashr i32 %76, 8
%78 = icmp eq i32 %77, -17
%79 = zext i1 %78 to i32
%80 = call i32 @assert(i32 %79)
%81 = load i8, i8* %6
%82 = sext i8 %81 to i32
%83 = shl i32 %82, 8
%84 = ashr i32 %83, 8
%85 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i32 %84)
%86 = call i32 @assert(i32 1)
store i32 -1, i32* %7
store i32 1234, i32* %8
store i32 4321, i32* %9
%87 = load i32, i32* %7
%88 = load i32, i32* %7
%89 = load i32, i32* %8
%90 = load i32, i32* %8
%91 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.8, i64 0, i64 0), i32 %87, i32 %88, i32 %89, i32 %90)
%92 = load i32, i32* %7
%93 = load i32, i32* %8
%94 = add i32 %92, %93
store i32 %94, i32* %10
%95 = load i32, i32* %10
%96 = load i32, i32* %7
%97 = icmp ult i32 %95, %96
br i1 %97, label %98, label %102
98: ; preds = %2
%99 = load i32, i32* %10
%100 = load i32, i32* %8
%101 = icmp ult i32 %99, %100
br label %102
102: ; preds = %98, %2
%103 = phi i1 [ false, %2 ], [ %101, %98 ]
%104 = zext i1 %103 to i32
%105 = call i32 @assert(i32 %104)
%106 = load i32, i32* %10
%107 = load i32, i32* %10
%108 = load i32, i32* %7
%109 = load i32, i32* %7
%110 = load i32, i32* %8
%111 = load i32, i32* %8
%112 = load i32, i32* %10
%113 = load i32, i32* %7
%114 = icmp ult i32 %112, %113
%115 = zext i1 %114 to i32
%116 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.9, i64 0, i64 0), i32 %106, i32 %107, i32 %108, i32 %109, i32 %110, i32 %111, i32 %115)
%117 = load i32, i32* %8
%118 = load i32, i32* %9
%119 = add i32 %117, %118
store i32 %119, i32* %10
%120 = load i32, i32* %10
%121 = load i32, i32* %8
%122 = icmp uge i32 %120, %121
br i1 %122, label %123, label %127
123: ; preds = %102
%124 = load i32, i32* %10
%125 = load i32, i32* %9
%126 = icmp uge i32 %124, %125
br label %127
127: ; preds = %123, %102
%128 = phi i1 [ false, %102 ], [ %126, %123 ]
%129 = zext i1 %128 to i32
%130 = call i32 @assert(i32 %129)
%131 = load i32, i32* %10
%132 = load i32, i32* %10
%133 = load i32, i32* %8
%134 = load i32, i32* %8
%135 = load i32, i32* %9
%136 = load i32, i32* %9
%137 = load i32, i32* %10
%138 = load i32, i32* %8
%139 = icmp ult i32 %137, %138
%140 = zext i1 %139 to i32
%141 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.9, i64 0, i64 0), i32 %131, i32 %132, i32 %133, i32 %134, i32 %135, i32 %136, i32 %140)
%142 = load i32, i32* %7
%143 = load i32, i32* %8
%144 = sub i32 %142, %143
store i32 %144, i32* %10
%145 = load i32, i32* %10
%146 = load i32, i32* %7
%147 = icmp ule i32 %145, %146
%148 = zext i1 %147 to i32
%149 = call i32 @assert(i32 %148)
%150 = load i32, i32* %10
%151 = load i32, i32* %10
%152 = load i32, i32* %7
%153 = load i32, i32* %7
%154 = load i32, i32* %8
%155 = load i32, i32* %8
%156 = load i32, i32* %10
%157 = load i32, i32* %7
%158 = icmp ugt i32 %156, %157
%159 = zext i1 %158 to i32
%160 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.10, i64 0, i64 0), i32 %150, i32 %151, i32 %152, i32 %153, i32 %154, i32 %155, i32 %159)
%161 = load i32, i32* %8
%162 = load i32, i32* %7
%163 = sub i32 %161, %162
store i32 %163, i32* %10
%164 = load i32, i32* %10
%165 = load i32, i32* %8
%166 = icmp ugt i32 %164, %165
%167 = zext i1 %166 to i32
%168 = call i32 @assert(i32 %167)
%169 = load i32, i32* %10
%170 = load i32, i32* %10
%171 = load i32, i32* %8
%172 = load i32, i32* %8
%173 = load i32, i32* %7
%174 = load i32, i32* %7
%175 = load i32, i32* %10
%176 = load i32, i32* %8
%177 = icmp ugt i32 %175, %176
%178 = zext i1 %177 to i32
%179 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.10, i64 0, i64 0), i32 %169, i32 %170, i32 %171, i32 %172, i32 %173, i32 %174, i32 %178)
store i32* null, i32** %11
%180 = load i32*, i32** %11
%181 = getelementptr inbounds i32, i32* %180, i64 1
store i32* %181, i32** %12
%182 = call i32 @assert(i32 1)
%183 = load i32*, i32** %12
%184 = load i32*, i32** %11
%185 = ptrtoint i32* %183 to i64
%186 = ptrtoint i32* %184 to i64
%187 = sub i64 %185, %186
%188 = sdiv exact i64 %187, 4
%189 = icmp eq i64 %188, 1
%190 = zext i1 %189 to i32
%191 = call i32 @assert(i32 %190)
%192 = load i32*, i32** %12
%193 = bitcast i32* %192 to i8*
%194 = load i32*, i32** %11
%195 = bitcast i32* %194 to i8*
%196 = ptrtoint i8* %193 to i64
%197 = ptrtoint i8* %195 to i64
%198 = sub i64 %196, %197
%199 = icmp eq i64 %198, 4
%200 = zext i1 %199 to i32
%201 = call i32 @assert(i32 %200)
store i32 -2, i32* %7
%202 = load i32, i32* %7
%203 = xor i32 %202, -1
store i32 %203, i32* %8
%204 = load i32, i32* %8
%205 = icmp eq i32 %204, 1
%206 = zext i1 %205 to i32
%207 = call i32 @assert(i32 %206)
%208 = load i32, i32* %7
%209 = load i32, i32* %8
%210 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0), i32 %208, i32 %209)
store i32 -1, i32* %7
%211 = load i32, i32* %7
%212 = xor i32 %211, -1
store i32 %212, i32* %8
%213 = load i32, i32* %8
%214 = icmp eq i32 %213, 0
%215 = zext i1 %214 to i32
%216 = call i32 @assert(i32 %215)
%217 = load i32, i32* %7
%218 = load i32, i32* %8
%219 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0), i32 %217, i32 %218)
store i32 0, i32* %7
%220 = load i32, i32* %7
%221 = xor i32 %220, -1
store i32 %221, i32* %8
%222 = load i32, i32* %8
%223 = icmp eq i32 %222, -1
%224 = zext i1 %223 to i32
%225 = call i32 @assert(i32 %224)
%226 = load i32, i32* %7
%227 = load i32, i32* %8
%228 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0), i32 %226, i32 %227)
store i32 1, i32* %7
%229 = load i32, i32* %7
%230 = xor i32 %229, -1
store i32 %230, i32* %8
%231 = load i32, i32* %8
%232 = icmp eq i32 %231, -2
%233 = zext i1 %232 to i32
%234 = call i32 @assert(i32 %233)
%235 = load i32, i32* %7
%236 = load i32, i32* %8
%237 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0), i32 %235, i32 %236)
store i32 2147483647, i32* %7
%238 = load i32, i32* %7
%239 = xor i32 %238, -1
store i32 %239, i32* %8
%240 = load i32, i32* %8
%241 = icmp eq i32 %240, -2147483648
%242 = zext i1 %241 to i32
%243 = call i32 @assert(i32 %242)
%244 = load i32, i32* %7
%245 = load i32, i32* %8
%246 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0), i32 %244, i32 %245)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"1: %8x\0A\00"
@.str.1 = [8 x i8] c"2: %8x\0A\00"
@.str.2 = [8 x i8] c"3: %8x\0A\00"
@.str.3 = [8 x i8] c"4: %8x\0A\00"
@.str.4 = [8 x i8] c"5: %8x\0A\00"
@.str.5 = [8 x i8] c"6: %8x\0A\00"
@.str.6 = [8 x i8] c"7: %8x\0A\00"
@.str.7 = [8 x i8] c"8: %8x\0A\00"
@.str.8 = [30 x i8] c"a = %08x (%i), b = %08x (%i)\0A\00"
@.str.9 = [58 x i8] c"%08x (%i) = %08x (%i) + %08x (%i) (overflow happend? %i)\0A\00"
@.str.10 = [58 x i8] c"%08x (%i) = %08x (%i) - %08x (%i) (overflow happend? %i)\0A\00"
@.str.11 = [14 x i8] c"a: %i, b: %i\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @assert(i32 1)
%4 = tail call i32 @assert(i32 1)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 -17)
%6 = tail call i32 @assert(i32 1)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 -17)
%8 = tail call i32 @assert(i32 1)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 -17)
%10 = tail call i32 @assert(i32 1)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i32 239)
%12 = tail call i32 @assert(i32 1)
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i32 239)
%14 = tail call i32 @assert(i32 1)
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i32 239)
%16 = tail call i32 @assert(i32 1)
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i32 -4352)
%18 = tail call i32 @assert(i32 1)
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i32 -17)
%20 = tail call i32 @assert(i32 1)
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.8, i64 0, i64 0), i32 -1, i32 -1, i32 1234, i32 1234)
%22 = tail call i32 @assert(i32 1)
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @.str.9, i64 0, i64 0), i32 1233, i32 1233, i32 -1, i32 -1, i32 1234, i32 1234, i32 1)
%24 = tail call i32 @assert(i32 1)
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @.str.9, i64 0, i64 0), i32 5555, i32 5555, i32 1234, i32 1234, i32 4321, i32 4321, i32 0)
%26 = tail call i32 @assert(i32 1)
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @.str.10, i64 0, i64 0), i32 -1235, i32 -1235, i32 -1, i32 -1, i32 1234, i32 1234, i32 0)
%28 = tail call i32 @assert(i32 1)
%29 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @.str.10, i64 0, i64 0), i32 1235, i32 1235, i32 1234, i32 1234, i32 -1, i32 -1, i32 1)
%30 = tail call i32 @assert(i32 1)
%31 = tail call i32 @assert(i32 1)
%32 = tail call i32 @assert(i32 1)
%33 = tail call i32 @assert(i32 1)
%34 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0), i32 -2, i32 1)
%35 = tail call i32 @assert(i32 1)
%36 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0), i32 -1, i32 0)
%37 = tail call i32 @assert(i32 1)
%38 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0), i32 0, i32 -1)
%39 = tail call i32 @assert(i32 1)
%40 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0), i32 1, i32 -2)
%41 = tail call i32 @assert(i32 1)
%42 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.11, i64 0, i64 0), i32 2147483647, i32 -2147483648)
ret i32 0
}