#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 INT_MAX;
void foo(int j) {
  int i1 = (int)(double)1.0 + INT_MAX;
  int i2 = (int)(double)1 + INT_MAX;
  int i3 = 1 + INT_MAX;
  int i4 = +1 + INT_MAX;
  int i5 = (int)((double)1.0 + INT_MAX);
  int i6 = (double)1.0 + INT_MAX;
  int i7 = 0 ? (int)(double)1.0 + INT_MAX : 1;
  int i8 = 1 ? 1 : (int)(double)1.0 + INT_MAX;
  int i9 = j ? (int)(double)1.0 + INT_MAX : 1;
  unsigned int i10 = 0 ? (int)(double)1.0 + INT_MAX : 9U;
  unsigned int i11 = 1 ? 9U : (int)(double)1.0 + INT_MAX;
  unsigned int i12 = j ? (int)(double)1.0 + INT_MAX : 9U;
  int i13 = 1 || (int)(double)1.0 + INT_MAX < 0;
  int i14 = 0 && (int)(double)1.0 + INT_MAX < 0;
  int i15 = 0 || (int)(double)1.0 + INT_MAX < 0;
  int i16 = 1 && (int)(double)1.0 + INT_MAX < 0;
  int i17 = j || (int)(double)1.0 + INT_MAX < 0;
  int i18 = j && (int)(double)1.0 + INT_MAX < 0;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    0x2eda(%rip),%rax
mov    (%rax),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    0x2ecb(%rip),%rax
mov    (%rax),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    0x2ebc(%rip),%rax
mov    (%rax),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    0x2e9e(%rip),%rax
cvtsi2sdl (%rax),%xmm1
movsd  0xeaa(%rip),%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x18(%rbp)
mov    0x2e80(%rip),%rax
cvtsi2sdl (%rax),%xmm1
movsd  0xe8c(%rip),%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x1c(%rbp)
movl   $0x1,-0x20(%rbp)
movl   $0x1,-0x24(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     11ab <foo+0xab>
mov    0x2e4a(%rip),%rax
mov    (%rax),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    11b8 <foo+0xb8>
mov    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    11b8 <foo+0xb8>
mov    -0x50(%rbp),%eax
mov    %eax,-0x28(%rbp)
movl   $0x9,-0x2c(%rbp)
movl   $0x9,-0x30(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     11ea <foo+0xea>
mov    0x2e0b(%rip),%rax
mov    (%rax),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    11f7 <foo+0xf7>
mov    $0x9,%eax
mov    %eax,-0x54(%rbp)
jmp    11f7 <foo+0xf7>
mov    -0x54(%rbp),%eax
mov    %eax,-0x34(%rbp)
movl   $0x1,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    0x2dd6(%rip),%rax
mov    (%rax),%eax
add    $0x1,%eax
cmp    $0x0,%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x40(%rbp)
mov    0x2dbc(%rip),%rax
mov    (%rax),%eax
add    $0x1,%eax
cmp    $0x0,%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x44(%rbp)
mov    $0x1,%al
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x55(%rbp)
jne    1263 <foo+0x163>
mov    0x2d93(%rip),%rax
mov    (%rax),%eax
add    $0x1,%eax
cmp    $0x0,%eax
setl   %al
mov    %al,-0x55(%rbp)
mov    -0x55(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x48(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x56(%rbp)
je     1292 <foo+0x192>
mov    0x2d64(%rip),%rax
mov    (%rax),%eax
add    $0x1,%eax
cmp    $0x0,%eax
setl   %al
mov    %al,-0x56(%rbp)
mov    -0x56(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4c(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
ret

LLVM IR (-O0):
@INT_MAX = global i32 0
define void @foo(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
store i32 %0, i32* %2
%21 = load i32, i32* @INT_MAX
%22 = add nsw i32 1, %21
store i32 %22, i32* %3
%23 = load i32, i32* @INT_MAX
%24 = add nsw i32 1, %23
store i32 %24, i32* %4
%25 = load i32, i32* @INT_MAX
%26 = add nsw i32 1, %25
store i32 %26, i32* %5
%27 = load i32, i32* @INT_MAX
%28 = add nsw i32 1, %27
store i32 %28, i32* %6
%29 = load i32, i32* @INT_MAX
%30 = sitofp i32 %29 to double
%31 = fadd double 1.000000e+00, %30
%32 = fptosi double %31 to i32
store i32 %32, i32* %7
%33 = load i32, i32* @INT_MAX
%34 = sitofp i32 %33 to double
%35 = fadd double 1.000000e+00, %34
%36 = fptosi double %35 to i32
store i32 %36, i32* %8
store i32 1, i32* %9
store i32 1, i32* %10
%37 = load i32, i32* %2
%38 = icmp ne i32 %37, 0
br i1 %38, label %39, label %42
39: ; preds = %1
%40 = load i32, i32* @INT_MAX
%41 = add nsw i32 1, %40
br label %43
42: ; preds = %1
br label %43
43: ; preds = %42, %39
%44 = phi i32 [ %41, %39 ], [ 1, %42 ]
store i32 %44, i32* %11
store i32 9, i32* %12
store i32 9, i32* %13
%45 = load i32, i32* %2
%46 = icmp ne i32 %45, 0
br i1 %46, label %47, label %50
47: ; preds = %43
%48 = load i32, i32* @INT_MAX
%49 = add nsw i32 1, %48
br label %51
50: ; preds = %43
br label %51
51: ; preds = %50, %47
%52 = phi i32 [ %49, %47 ], [ 9, %50 ]
store i32 %52, i32* %14
store i32 1, i32* %15
store i32 0, i32* %16
%53 = load i32, i32* @INT_MAX
%54 = add nsw i32 1, %53
%55 = icmp slt i32 %54, 0
%56 = zext i1 %55 to i32
store i32 %56, i32* %17
%57 = load i32, i32* @INT_MAX
%58 = add nsw i32 1, %57
%59 = icmp slt i32 %58, 0
%60 = zext i1 %59 to i32
store i32 %60, i32* %18
%61 = load i32, i32* %2
%62 = icmp ne i32 %61, 0
br i1 %62, label %67, label %63
63: ; preds = %51
%64 = load i32, i32* @INT_MAX
%65 = add nsw i32 1, %64
%66 = icmp slt i32 %65, 0
br label %67
67: ; preds = %63, %51
%68 = phi i1 [ true, %51 ], [ %66, %63 ]
%69 = zext i1 %68 to i32
store i32 %69, i32* %19
%70 = load i32, i32* %2
%71 = icmp ne i32 %70, 0
br i1 %71, label %72, label %76
72: ; preds = %67
%73 = load i32, i32* @INT_MAX
%74 = add nsw i32 1, %73
%75 = icmp slt i32 %74, 0
br label %76
76: ; preds = %72, %67
%77 = phi i1 [ false, %67 ], [ %75, %72 ]
%78 = zext i1 %77 to i32
store i32 %78, i32* %20
ret void
}

LLVM IR (-O2):
@INT_MAX = global i32 0
define void @foo(i32 %0) {
ret void
}