xunge/DecIR huggingface dataset:
/* Variables and functions */
char *strchr(char *, char);
int check_filter(char *filter) {
  char *c;
  int ret = 1;
  if (filter != NULL) {
    c = strchr(filter, '*');
    if (c != NULL) {
      *c = '\0';
      ret = 0;
    }
  }
  return ret;
}


x86 assembly (clang, -O0):
<check_filter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0x14(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     115e <check_filter+0x4e>
mov    -0x8(%rbp),%rdi
mov    $0x2a,%esi
call   1030 <strchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1159 <check_filter+0x49>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
movl   $0x0,-0x14(%rbp)
jmp    115e <check_filter+0x4e>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_filter>:
push   %rbx
mov    $0x1,%ebx
test   %rdi,%rdi
je     112f <check_filter+0x1f>
mov    $0x2a,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     112f <check_filter+0x1f>
movb   $0x0,(%rax)
xor    %ebx,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @check_filter(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %2
store i32 1, i32* %4
%5 = load i8*, i8** %2
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %15
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = call i8* @strchr(i8* %8, i8 signext 42)
store i8* %9, i8** %3
%10 = load i8*, i8** %3
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %14
12: ; preds = %7
%13 = load i8*, i8** %3
store i8 0, i8* %13
store i32 0, i32* %4
br label %14
14: ; preds = %12, %7
br label %15
15: ; preds = %14, %1
%16 = load i32, i32* %4
ret i32 %16
}

LLVM IR (-O2):
define i32 @check_filter(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i8* @strchr(i8* %0, i8 signext 42)
%5 = icmp eq i8* %4, null
br i1 %5, label %7, label %6
6: ; preds = %3
store i8 0, i8* %4
br label %7
7: ; preds = %3, %6, %1
%8 = phi i32 [ 0, %6 ], [ 1, %3 ], [ 1, %1 ]
ret i32 %8
}
void create_setOf_AltType(void *altTypeSet_m1Impl) { return; }


x86 assembly (clang, -O0):
<create_setOf_AltType>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @create_setOf_AltType(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret void
}

LLVM IR (-O2):
define void @create_setOf_AltType(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int cReadEdgeFace(int, char **);
int main(int argc, char *argv[]) { return cReadEdgeFace(argc, argv); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <cReadEdgeFace@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
jmp    1030 <cReadEdgeFace@plt>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @cReadEdgeFace(i32 %6, i8** %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @cReadEdgeFace(i32 %0, i8** %1)
ret i32 %3
}
/* Variables and functions */
int acos(int /*<<< orphan*/);
double computeOuterSquareRadius(int, double);
double cos(int);
double computeInnerSquareRadius(int numSide, double regularPolygonArea) {
  double outerSquareRadius =
      computeOuterSquareRadius(numSide, regularPolygonArea);
  double cosVal = cos((2 * acos(0)) / numSide);
  return outerSquareRadius * cosVal * cosVal;
}


x86 assembly (clang, -O0):
<computeInnerSquareRadius>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    -0x4(%rbp),%edi
movsd  -0x10(%rbp),%xmm0
call   1050 <computeOuterSquareRadius@plt>
movsd  %xmm0,-0x18(%rbp)
xor    %edi,%edi
call   1030 <acos@plt>
shl    $0x1,%eax
cltd
idivl  -0x4(%rbp)
mov    %eax,%edi
call   1040 <cos@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<computeInnerSquareRadius>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
call   1050 <computeOuterSquareRadius@plt>
movsd  %xmm0,0x8(%rsp)
xor    %edi,%edi
call   1030 <acos@plt>
add    %eax,%eax
cltd
idiv   %ebx
mov    %eax,%edi
call   1040 <cos@plt>
movsd  0x8(%rsp),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @computeInnerSquareRadius(i32 %0, double %1) {
%3 = alloca i32
%4 = alloca double
%5 = alloca double
%6 = alloca double
store i32 %0, i32* %3
store double %1, double* %4
%7 = load i32, i32* %3
%8 = load double, double* %4
%9 = call double @computeOuterSquareRadius(i32 %7, double %8)
store double %9, double* %5
%10 = call i32 @acos(i32 0)
%11 = mul nsw i32 2, %10
%12 = load i32, i32* %3
%13 = sdiv i32 %11, %12
%14 = call double @cos(i32 %13)
store double %14, double* %6
%15 = load double, double* %5
%16 = load double, double* %6
%17 = fmul double %15, %16
%18 = load double, double* %6
%19 = fmul double %17, %18
ret double %19
}

LLVM IR (-O2):
define double @computeInnerSquareRadius(i32 %0, double %1) {
%3 = tail call double @computeOuterSquareRadius(i32 %0, double %1)
%4 = tail call i32 @acos(i32 0)
%5 = shl nsw i32 %4, 1
%6 = sdiv i32 %5, %0
%7 = tail call double @cos(i32 %6)
%8 = fmul double %3, %7
%9 = fmul double %7, %8
ret double %9
}
/* Variables and functions */
int /*<<< orphan*/ RDP(char *);
void uc2_special2() { RDP("uc2:special2\n"); }


x86 assembly (clang, -O0):
<uc2_special2>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <RDP@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<uc2_special2>:
lea    0xee9(%rip),%rdi
jmp    1030 <RDP@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"uc2:special2\0A\00"
define void @uc2_special2() {
%1 = call i32 @RDP(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"uc2:special2\0A\00"
define void @uc2_special2() {
%1 = tail call i32 @RDP(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}
unsigned cpu_uint32_make_uint32(unsigned v0) { return v0; }


x86 assembly (clang, -O0):
<cpu_uint32_make_uint32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpu_uint32_make_uint32>:
mov    %edi,%eax
ret

LLVM IR (-O0):
define i32 @cpu_uint32_make_uint32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
ret i32 %3
}

LLVM IR (-O2):
define i32 @cpu_uint32_make_uint32(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
char const *weak_s2();
const char *__attribute__((section(".test.b"))) call_weak_s2(void) {
  return weak_s2() + 1;
}


x86 assembly (clang, -O0):
<call_weak_s2>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <weak_s2@plt>
add    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_weak_s2>:
push   %rax
xor    %eax,%eax
call   1030 <weak_s2@plt>
add    $0x1,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @call_weak_s2() section ".test.b" {
%1 = call i8* (...) @weak_s2()
%2 = getelementptr inbounds i8, i8* %1, i64 1
ret i8* %2
}

LLVM IR (-O2):
define i8* @call_weak_s2() section ".test.b" {
%1 = tail call i8* (...) @weak_s2()
%2 = getelementptr inbounds i8, i8* %1, i64 1
ret i8* %2
}
unsigned int atou(char *p, int cnt) {
  unsigned int r = 0;
  while (*p != '\0' && cnt) {
    r *= 10;
    r += *p - '0';
    ++p;
  }
  return (r);
}


x86 assembly (clang, -O0):
<atou>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     1131 <atou+0x31>
cmpl   $0x0,-0xc(%rbp)
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1141 <atou+0x41>
jmp    1169 <atou+0x69>
imul   $0xa,-0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
sub    $0x30,%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1112 <atou+0x12>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<atou>:
xor    %eax,%eax
test   %esi,%esi
je     1137 <atou+0x37>
mov    (%rdi),%cl
test   %cl,%cl
je     1137 <atou+0x37>
add    $0x1,%rdi
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl %cl,%ecx
lea    (%rax,%rax,4),%eax
lea    (%rcx,%rax,2),%eax
add    $0xffffffd0,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1120 <atou+0x20>
ret

LLVM IR (-O0):
define i32 @atou(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %16, %2
%7 = load i8*, i8** %3
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %6
%12 = load i32, i32* %4
%13 = icmp ne i32 %12, 0
br label %14
14: ; preds = %11, %6
%15 = phi i1 [ false, %6 ], [ %13, %11 ]
br i1 %15, label %16, label %27
16: ; preds = %14
%17 = load i32, i32* %5
%18 = mul i32 %17, 10
store i32 %18, i32* %5
%19 = load i8*, i8** %3
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = sub nsw i32 %21, 48
%23 = load i32, i32* %5
%24 = add i32 %23, %22
store i32 %24, i32* %5
%25 = load i8*, i8** %3
%26 = getelementptr inbounds i8, i8* %25, i32 1
store i8* %26, i8** %3
br label %6
27: ; preds = %14
%28 = load i32, i32* %5
ret i32 %28
}

LLVM IR (-O2):
define i32 @atou(i8* nocapture %0, i32 %1) {
%3 = icmp ne i32 %1, 0
%4 = load i8, i8* %0
%5 = icmp ne i8 %4, 0
%6 = and i1 %3, %5
br i1 %6, label %7, label %18
7: ; preds = %2, %7
%8 = phi i8 [ %16, %7 ], [ %4, %2 ]
%9 = phi i32 [ %14, %7 ], [ 0, %2 ]
%10 = phi i8* [ %15, %7 ], [ %0, %2 ]
%11 = sext i8 %8 to i32
%12 = mul i32 %9, 10
%13 = add i32 %12, -48
%14 = add i32 %13, %11
%15 = getelementptr inbounds i8, i8* %10, i64 1
%16 = load i8, i8* %15
%17 = icmp eq i8 %16, 0
br i1 %17, label %18, label %7
18: ; preds = %7, %2
%19 = phi i32 [ 0, %2 ], [ %14, %7 ]
ret i32 %19
}
void gtk_table_set_homogeneous() {}


x86 assembly (clang, -O0):
<gtk_table_set_homogeneous>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @gtk_table_set_homogeneous() {
ret void
}

LLVM IR (-O2):
define void @gtk_table_set_homogeneous() {
ret void
}
/* Type definitions */
struct winsize {
  int ws_col;
};

/* Variables and functions */
int /*<<< orphan*/ TIOCGWINSZ;
int /*<<< orphan*/ ioctl(int /*<<< orphan*/, int /*<<< orphan*/,
                         struct winsize *);
int detectTerminalwidth(void) {
  struct winsize termwinsize;
  ioctl(0, TIOCGWINSZ, &termwinsize);
  return termwinsize.ws_col;
}


x86 assembly (clang, -O0):
<detectTerminalwidth>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb9(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
lea    -0x8(%rbp),%rdx
call   1030 <ioctl@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<detectTerminalwidth>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdx
xor    %edi,%edi
call   1030 <ioctl@plt>
mov    (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.winsize = type { i32 }
@TIOCGWINSZ = global i32 0
define i32 @detectTerminalwidth() {
%1 = alloca %struct.winsize
%2 = load i32, i32* @TIOCGWINSZ
%3 = call i32 @ioctl(i32 0, i32 %2, %struct.winsize* %1)
%4 = getelementptr inbounds %struct.winsize, %struct.winsize* %1, i32 0, i32 0
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
%struct.winsize = type { i32 }
@TIOCGWINSZ = global i32 0
define i32 @detectTerminalwidth() {
%1 = alloca %struct.winsize
%2 = bitcast %struct.winsize* %1 to i8*
%3 = load i32, i32* @TIOCGWINSZ
%4 = call i32 @ioctl(i32 0, i32 %3, %struct.winsize* %1)
%5 = getelementptr inbounds %struct.winsize, %struct.winsize* %1, i64 0, i32 0
%6 = load i32, i32* %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int M_f(char *s) {
  debug("M_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<M_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xef7(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf03(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [44 x i8] c"M_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [44 x i8] c"M_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ test_assert(int);
int main(void) {
  int a, b, c = 7;
  if (c > 7)
    a = 7;
  else
    a = 8;
  b = a;
  test_assert(c == 7);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x7,-0x10(%rbp)
cmpl   $0x7,-0x10(%rbp)
jle    113c <main+0x2c>
movl   $0x7,-0x8(%rbp)
jmp    1143 <main+0x33>
movl   $0x8,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x7,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <test_assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <test_assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 7, i32* %4
%5 = load i32, i32* %4
%6 = icmp sgt i32 %5, 7
br i1 %6, label %7, label %8
7: ; preds = %0
store i32 7, i32* %2
br label %9
8: ; preds = %0
store i32 8, i32* %2
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %2
store i32 %10, i32* %3
%11 = load i32, i32* %4
%12 = icmp eq i32 %11, 7
%13 = zext i1 %12 to i32
%14 = call i32 @test_assert(i32 %13)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @test_assert(i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0x78() {
  Assert_real((ispunct(120) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_ispunct.c",
              605, ("ispunct should be 0 for x"));
}


x86 assembly (clang, -O0):
<t_ispunct_0x78>:
push   %rbp
mov    %rsp,%rbp
mov    $0x78,%edi
call   1030 <ispunct@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x25d,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_ispunct_0x78>:
push   %rax
mov    $0x78,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x25d,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 0 for x\00"
define void @t_ispunct_0x78() {
%1 = call i64 @ispunct(i32 120)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 605, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 0 for x\00"
define void @t_ispunct_0x78() {
%1 = tail call i64 @ispunct(i32 120)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 605, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void mwrite(fd, address, bytes) int fd;
char *address;
register int bytes;
{
  if (write(fd, address, bytes) != bytes && bytes != 0)
    error(1, "Write error", ((char *)0));
}


x86 assembly (clang, -O0):
<mwrite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    $0x0,%al
call   1030 <write@plt>
cmp    -0x14(%rbp),%eax
je     116d <mwrite+0x4d>
cmpl   $0x0,-0x14(%rbp)
je     116d <mwrite+0x4d>
mov    $0x1,%edi
lea    0xe9e(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edx
mov    $0x0,%al
call   1040 <error@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mwrite>:
push   %rbx
mov    %edx,%ebx
xor    %eax,%eax
call   1030 <write@plt>
test   %ebx,%ebx
je     1148 <mwrite+0x28>
cmp    %ebx,%eax
je     1148 <mwrite+0x28>
lea    0xec7(%rip),%rsi
mov    $0x1,%edi
xor    %edx,%edx
xor    %eax,%eax
pop    %rbx
jmp    1040 <error@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"Write error\00"
define void @mwrite(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i32, ...)*)(i32 %7, i8* %8, i32 %9)
%11 = load i32, i32* %6
%12 = icmp ne i32 %10, %11
br i1 %12, label %13, label %18
13: ; preds = %3
%14 = load i32, i32* %6
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %13
%17 = call i32 (i32, i8*, i8*, ...) bitcast (i32 (...)* @error to i32 (i32, i8*, i8*, ...)*)(i32 1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* null)
br label %18
18: ; preds = %16, %13, %3
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"Write error\00"
define void @mwrite(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i32, ...)*)(i32 %0, i8* %1, i32 %2)
%5 = icmp ne i32 %4, %2
%6 = icmp ne i32 %2, 0
%7 = and i1 %6, %5
br i1 %7, label %8, label %10
8: ; preds = %3
%9 = tail call i32 (i32, i8*, i8*, ...) bitcast (i32 (...)* @error to i32 (i32, i8*, i8*, ...)*)(i32 1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* null)
br label %10
10: ; preds = %8, %3
ret void
}
int test_imm_6Cuint32_reg(unsigned int val) {
  return ((val) & (0x6C << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_6Cuint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x6c,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_6Cuint32_reg>:
test   $0x6c,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_6Cuint32_reg(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 108
%5 = icmp ne i32 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 -20, i32 -40
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_imm_6Cuint32_reg(i32 %0) {
%2 = and i32 %0, 108
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ set_gpio(int /*<<< orphan*/, int);
void gpio_output(uint8_t pin) { set_gpio(pin, 1); }


x86 assembly (clang, -O0):
<gpio_output>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <set_gpio@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gpio_output>:
mov    $0x1,%esi
jmp    1030 <set_gpio@plt>

LLVM IR (-O0):
define void @gpio_output(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @set_gpio(i32 %3, i32 1)
ret void
}

LLVM IR (-O2):
define void @gpio_output(i32 %0) {
%2 = tail call i32 @set_gpio(i32 %0, i32 1)
ret void
}
void finalize_cache_write_response(
    struct cache_write_response *write_response) {
  (void)0;
  (void)0;
}


x86 assembly (clang, -O0):
<finalize_cache_write_response>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.cache_write_response = type opaque
define void @finalize_cache_write_response(%struct.cache_write_response* %0) {
%2 = alloca %struct.cache_write_response*
store %struct.cache_write_response* %0, %struct.cache_write_response** %2
ret void
}

LLVM IR (-O2):
%struct.cache_write_response = type opaque
define void @finalize_cache_write_response(%struct.cache_write_response* nocapture %0) {
ret void
}
int main(void) {
  unsigned i, j = 0;
  for (i = 0; i < 15; i++)
    j++;
  for (; i < j;) {
    i++;
    j--;
  }
  for (i = 0; i < 15;) {
    i++;
    j++;
  }
  for (; i < j; i++) {
    j--;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xf,-0x8(%rbp)
jae    113a <main+0x3a>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1119 <main+0x19>
jmp    113f <main+0x3f>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    1162 <main+0x62>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    113f <main+0x3f>
movl   $0x0,-0x8(%rbp)
cmpl   $0xf,-0x8(%rbp)
jae    118a <main+0x8a>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1169 <main+0x69>
jmp    118f <main+0x8f>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    11b2 <main+0xb2>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    118f <main+0x8f>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
store i32 0, i32* %2
br label %4
4: ; preds = %10, %0
%5 = load i32, i32* %2
%6 = icmp ult i32 %5, 15
br i1 %6, label %7, label %13
7: ; preds = %4
%8 = load i32, i32* %3
%9 = add i32 %8, 1
store i32 %9, i32* %3
br label %10
10: ; preds = %7
%11 = load i32, i32* %2
%12 = add i32 %11, 1
store i32 %12, i32* %2
br label %4
13: ; preds = %4
br label %14
14: ; preds = %18, %13
%15 = load i32, i32* %2
%16 = load i32, i32* %3
%17 = icmp ult i32 %15, %16
br i1 %17, label %18, label %23
18: ; preds = %14
%19 = load i32, i32* %2
%20 = add i32 %19, 1
store i32 %20, i32* %2
%21 = load i32, i32* %3
%22 = add i32 %21, -1
store i32 %22, i32* %3
br label %14
23: ; preds = %14
store i32 0, i32* %2
br label %24
24: ; preds = %27, %23
%25 = load i32, i32* %2
%26 = icmp ult i32 %25, 15
br i1 %26, label %27, label %32
27: ; preds = %24
%28 = load i32, i32* %2
%29 = add i32 %28, 1
store i32 %29, i32* %2
%30 = load i32, i32* %3
%31 = add i32 %30, 1
store i32 %31, i32* %3
br label %24
32: ; preds = %24
br label %33
33: ; preds = %40, %32
%34 = load i32, i32* %2
%35 = load i32, i32* %3
%36 = icmp ult i32 %34, %35
br i1 %36, label %37, label %43
37: ; preds = %33
%38 = load i32, i32* %3
%39 = add i32 %38, -1
store i32 %39, i32* %3
br label %40
40: ; preds = %37
%41 = load i32, i32* %2
%42 = add i32 %41, 1
store i32 %42, i32* %2
br label %33
43: ; preds = %33
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
char readpixel(void *s) { return (*((char *)(s))); }


x86 assembly (clang, -O0):
<readpixel>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<readpixel>:
mov    (%rdi),%al
ret

LLVM IR (-O0):
define signext i8 @readpixel(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
ret i8 %4
}

LLVM IR (-O2):
define signext i8 @readpixel(i8* nocapture %0) {
%2 = load i8, i8* %0
ret i8 %2
}
/* Variables and functions */
long isnan(float);
long ismissing_(float *number) { return isnan(*number); }


x86 assembly (clang, -O0):
<ismissing_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
call   1030 <isnan@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ismissing_>:
movss  (%rdi),%xmm0
jmp    1030 <isnan@plt>

LLVM IR (-O0):
define i64 @ismissing_(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = load float, float* %3
%5 = call i64 @isnan(float %4)
ret i64 %5
}

LLVM IR (-O2):
define i64 @ismissing_(float* nocapture %0) {
%2 = load float, float* %0
%3 = tail call i64 @isnan(float %2)
ret i64 %3
}
/* Variables and functions */
int conv2d(char const *);
int CompilerDay(const char *date) { return conv2d(date + 4); }


x86 assembly (clang, -O0):
<CompilerDay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x4,%rdi
call   1030 <conv2d@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CompilerDay>:
add    $0x4,%rdi
jmp    1030 <conv2d@plt>

LLVM IR (-O0):
define i32 @CompilerDay(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 4
%5 = call i32 @conv2d(i8* %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @CompilerDay(i8* %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 4
%3 = tail call i32 @conv2d(i8* %2)
ret i32 %3
}
int test_imm_12int8_reg(signed char val) {
  return ((val) & (-0x12 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_12int8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xffffffee,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_12int8_reg>:
test   $0xee,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_12int8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, -18
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_12int8_reg(i8 signext %0) {
%2 = and i8 %0, -18
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ get_string(char *);
scalar_t__ killSrv(int /*<<< orphan*/);
char *s_let(char *, char *);
char *mackillServer(char *arg) {
  if (killSrv(get_string(arg)))
    return s_let("ok", arg);
  return s_let("", arg);
}


x86 assembly (clang, -O0):
<mackillServer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <get_string@plt>
mov    %eax,%edi
call   1050 <killSrv@plt>
cmp    $0x0,%rax
je     116f <mackillServer+0x3f>
mov    -0x10(%rbp),%rsi
lea    0xe9f(%rip),%rdi
call   1030 <s_let@plt>
mov    %rax,-0x8(%rbp)
jmp    1183 <mackillServer+0x53>
mov    -0x10(%rbp),%rsi
lea    0xe88(%rip),%rdi
call   1030 <s_let@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mackillServer>:
push   %rbx
mov    %rdi,%rbx
call   1040 <get_string@plt>
mov    %eax,%edi
call   1050 <killSrv@plt>
test   %rax,%rax
lea    0xeb8(%rip),%rax
lea    0xeaf(%rip),%rdi
cmove  %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <s_let@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"ok\00"
@.str.1 = [1 x i8] zeroinitializer
define i8* @mackillServer(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 @get_string(i8* %4)
%6 = call i64 @killSrv(i32 %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i8* @s_let(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %9)
store i8* %10, i8** %2
br label %14
11: ; preds = %1
%12 = load i8*, i8** %3
%13 = call i8* @s_let(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* %12)
store i8* %13, i8** %2
br label %14
14: ; preds = %11, %8
%15 = load i8*, i8** %2
ret i8* %15
}

LLVM IR (-O2):
@.str = [3 x i8] c"ok\00"
@.str.1 = [1 x i8] zeroinitializer
define i8* @mackillServer(i8* %0) {
%2 = tail call i32 @get_string(i8* %0)
%3 = tail call i64 @killSrv(i32 %2)
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0)
%6 = tail call i8* @s_let(i8* %5, i8* %0)
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ T_WAIT_UNTIL(int);
void op_0x00(void) {
  T_WAIT_UNTIL(4);
  return;
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    $0x4,%edi
call   1030 <T_WAIT_UNTIL@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
mov    $0x4,%edi
jmp    1030 <T_WAIT_UNTIL@plt>

LLVM IR (-O0):
define void @op_0x00() {
%1 = call i32 @T_WAIT_UNTIL(i32 4)
ret void
}

LLVM IR (-O2):
define void @op_0x00() {
%1 = tail call i32 @T_WAIT_UNTIL(i32 4)
ret void
}
/* Variables and functions */
int rand();
char randchar() { return rand() % 26 + 'a'; }


x86 assembly (clang, -O0):
<randchar>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0x1a,%ecx
cltd
idiv   %ecx
add    $0x61,%edx
mov    %dl,%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<randchar>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cltq
imul   $0x4ec4ec4f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x23,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%edx
lea    (%rdx,%rdx,4),%edx
add    %ecx,%edx
sub    %edx,%eax
add    $0x61,%al
pop    %rcx
ret

LLVM IR (-O0):
define signext i8 @randchar() {
%1 = call i32 (...) @rand()
%2 = srem i32 %1, 26
%3 = add nsw i32 %2, 97
%4 = trunc i32 %3 to i8
ret i8 %4
}

LLVM IR (-O2):
define signext i8 @randchar() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 26
%3 = trunc i32 %2 to i8
%4 = add nsw i8 %3, 97
ret i8 %4
}
/* Variables and functions */
int /*<<< orphan*/ precondtest(int);
void test() { precondtest(1); }


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <precondtest@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
mov    $0x1,%edi
jmp    1030 <precondtest@plt>

LLVM IR (-O0):
define void @test() {
%1 = call i32 @precondtest(i32 1)
ret void
}

LLVM IR (-O2):
define void @test() {
%1 = tail call i32 @precondtest(i32 1)
ret void
}
/* Variables and functions */
int GCD(int, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  printf("Enter two numbers\n");
  int a, b;
  scanf("%d%d", &a, &b);
  printf("GCD of the two numbers %d\n", GCD(a, b));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebf(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1050 <GCD@plt>
mov    %eax,%esi
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xeac(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
mov    (%rsp),%esi
call   1060 <GCD@plt>
lea    0xe91(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Enter two numbers\0A\00"
@.str.1 = [5 x i8] c"%d%d\00"
@.str.2 = [27 x i8] c"GCD of the two numbers %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3)
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = call i32 @GCD(i32 %6, i32 %7)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [5 x i8] c"%d%d\00"
@.str.2 = [27 x i8] c"GCD of the two numbers %d\0A\00"
@str = [18 x i8] c"Enter two numbers\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 @GCD(i32 %7, i32 %8)
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i32 %9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, double *);
double gDouble() {
  double i;
  scanf("%lf", &i);
  return i;
}


x86 assembly (clang, -O0):
<gDouble>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <scanf@plt>
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gDouble>:
push   %rax
lea    0xee8(%rip),%rdi
mov    %rsp,%rsi
call   1030 <scanf@plt>
movsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%lf\00"
define double @gDouble() {
%1 = alloca double
%2 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %1)
%3 = load double, double* %1
ret double %3
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
define double @gDouble() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %1)
%4 = load double, double* %1
ret double %4
}
int fun665() { return 665; }


x86 assembly (clang, -O0):
<fun665>:
push   %rbp
mov    %rsp,%rbp
mov    $0x299,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun665>:
mov    $0x299,%eax
ret

LLVM IR (-O0):
define i32 @fun665() {
ret i32 665
}

LLVM IR (-O2):
define i32 @fun665() {
ret i32 665
}
/* Variables and functions */
int /*<<< orphan*/ force_radiation();
void additional_forces() { force_radiation(); }


x86 assembly (clang, -O0):
<additional_forces>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <force_radiation@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<additional_forces>:
xor    %eax,%eax
jmp    1030 <force_radiation@plt>

LLVM IR (-O0):
define void @additional_forces() {
%1 = call i32 (...) @force_radiation()
ret void
}

LLVM IR (-O2):
define void @additional_forces() {
%1 = tail call i32 (...) @force_radiation()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ net_cleanup();
void cleanup_exit(int err) {
  net_cleanup();
  exit(err);
}


x86 assembly (clang, -O0):
<cleanup_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <net_cleanup@plt>
mov    -0x4(%rbp),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<cleanup_exit>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <net_cleanup@plt>
mov    %ebx,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @cleanup_exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @net_cleanup()
%4 = load i32, i32* %2
%5 = call i32 @exit(i32 %4)
unreachable
}

LLVM IR (-O2):
define void @cleanup_exit(i32 %0) {
%2 = tail call i32 (...) @net_cleanup()
%3 = tail call i32 @exit(i32 %0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Hello from deeper.c\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Hello from deeper.c\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [20 x i8] c"Hello from deeper.c\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
scalar_t__ mem_assign(unsigned char *, scalar_t__);
scalar_t__ strlen(char const *);
char *str_assign(const char *value) {
  return (char *)mem_assign((unsigned char *)value, strlen(value) + 1);
}


x86 assembly (clang, -O0):
<str_assign>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x10(%rbp),%rdi
mov    %rax,%rsi
add    $0x1,%rsi
call   1040 <mem_assign@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_assign>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
lea    0x1(%rax),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <mem_assign@plt>

LLVM IR (-O0):
define i8* @str_assign(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i64 @mem_assign(i8* %3, i64 %6)
%8 = inttoptr i64 %7 to i8*
ret i8* %8
}

LLVM IR (-O2):
define i8* @str_assign(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i64 @mem_assign(i8* %0, i64 %3)
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}
int feclearexcept(int mask) { return 0; }


x86 assembly (clang, -O0):
<feclearexcept>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<feclearexcept>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @feclearexcept(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @feclearexcept(i32 %0) {
ret i32 0
}
char *strlwr(char *s) {
  char *p = s;
  while (*s) {
    if ((*s >= 'A') && (*s <= 'Z'))
      *s += 'a' - 'A';
    s++;
  }
  return p;
}


x86 assembly (clang, -O0):
<strlwr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     115a <strlwr+0x5a>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x41,%eax
jl     1149 <strlwr+0x49>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5a,%eax
jg     1149 <strlwr+0x49>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
add    $0x20,%ecx
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1110 <strlwr+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlwr>:
mov    %rdi,%rax
mov    (%rdi),%cl
test   %cl,%cl
je     112c <strlwr+0x2c>
lea    0x1(%rax),%rdx
jmp    111b <strlwr+0x1b>
nop
movzbl (%rdx),%ecx
add    $0x1,%rdx
test   %cl,%cl
je     112c <strlwr+0x2c>
lea    -0x41(%rcx),%esi
cmp    $0x19,%sil
ja     1110 <strlwr+0x10>
add    $0x20,%cl
mov    %cl,-0x1(%rdx)
jmp    1110 <strlwr+0x10>
ret

LLVM IR (-O0):
define i8* @strlwr(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
br label %5
5: ; preds = %25, %1
%6 = load i8*, i8** %2
%7 = load i8, i8* %6
%8 = icmp ne i8 %7, 0
br i1 %8, label %9, label %28
9: ; preds = %5
%10 = load i8*, i8** %2
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp sge i32 %12, 65
br i1 %13, label %14, label %25
14: ; preds = %9
%15 = load i8*, i8** %2
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = icmp sle i32 %17, 90
br i1 %18, label %19, label %25
19: ; preds = %14
%20 = load i8*, i8** %2
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = add nsw i32 %22, 32
%24 = trunc i32 %23 to i8
store i8 %24, i8* %20
br label %25
25: ; preds = %19, %14, %9
%26 = load i8*, i8** %2
%27 = getelementptr inbounds i8, i8* %26, i32 1
store i8* %27, i8** %2
br label %5
28: ; preds = %5
%29 = load i8*, i8** %3
ret i8* %29
}

LLVM IR (-O2):
define i8* @strlwr(i8* returned %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %11
%5 = phi i8 [ %13, %11 ], [ %2, %1 ]
%6 = phi i8* [ %12, %11 ], [ %0, %1 ]
%7 = add i8 %5, -65
%8 = icmp ult i8 %7, 26
br i1 %8, label %9, label %11
9: ; preds = %4
%10 = add nuw nsw i8 %5, 32
store i8 %10, i8* %6
br label %11
11: ; preds = %9, %4
%12 = getelementptr inbounds i8, i8* %6, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %11, %1
ret i8* %0
}
/* Variables and functions */
scalar_t__ strcmp(void *, void *);
int ht_compare_string(void *key1, void *key2) {
  return (strcmp(key1, key2) == 0) ? 1 : 0;
}


x86 assembly (clang, -O0):
<ht_compare_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
mov    %rax,%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmove  %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ht_compare_string>:
push   %rax
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @ht_compare_string(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i64 @strcmp(i8* %5, i8* %6)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 1, i32 0
ret i32 %10
}

LLVM IR (-O2):
define i32 @ht_compare_string(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
int bar(void *p) { return 1; }


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @bar(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret i32 1
}

LLVM IR (-O2):
define i32 @bar(i8* nocapture readnone %0) {
ret i32 1
}
/* Type definitions */
struct vec2 {
  int dummy;
};

/* Variables and functions */
float vec2_length(float *);
__attribute__((always_)) float psvec2_length(struct vec2 *a) {
  return vec2_length((float *)a);
}


x86 assembly (clang, -O0):
<psvec2_length>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <vec2_length@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<psvec2_length>:
jmp    1030 <vec2_length@plt>

LLVM IR (-O0):
%struct.vec2 = type { i32 }
define float @psvec2_length(%struct.vec2* %0) {
%2 = alloca %struct.vec2*
store %struct.vec2* %0, %struct.vec2** %2
%3 = load %struct.vec2*, %struct.vec2** %2
%4 = bitcast %struct.vec2* %3 to float*
%5 = call float @vec2_length(float* %4)
ret float %5
}

LLVM IR (-O2):
%struct.vec2 = type { i32 }
define float @psvec2_length(%struct.vec2* %0) {
%2 = bitcast %struct.vec2* %0 to float*
%3 = tail call float @vec2_length(float* %2)
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int sum(int);
main() {
  int x, z;
  printf("Enter the value of x:\n");
  scanf("%d", &x);
  z = sum(x);
  printf("The sum of x numbers is:%d.\n", x, z);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeca(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x4(%rbp),%edi
call   1040 <sum@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xeac(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1060 <scanf@plt>
mov    0x4(%rsp),%edi
call   1050 <sum@plt>
mov    0x4(%rsp),%esi
lea    0xe91(%rip),%rdi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"Enter the value of x:\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [29 x i8] c"The sum of x numbers is:%d.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @sum(i32 %5)
store i32 %6, i32* %2
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i32 %7, i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [29 x i8] c"The sum of x numbers is:%d.\0A\00"
@str = [22 x i8] c"Enter the value of x:\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @sum(i32 %5)
%7 = load i32, i32* %1
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i32 %7, i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, long);
void *realloc(void *, long);
void *SCRealloc(void *buffer, long int length) {
  void *address = 0;
  address = realloc(buffer, length);
  if (address)
    memset(address, 0, length);
  return address;
}


x86 assembly (clang, -O0):
<SCRealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1163 <SCRealloc+0x43>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SCRealloc>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1040 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1141 <SCRealloc+0x21>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @SCRealloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
store i8* null, i8** %5
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %15
11: ; preds = %2
%12 = load i8*, i8** %5
%13 = load i64, i64* %4
%14 = call i32 @memset(i8* %12, i32 0, i64 %13)
br label %15
15: ; preds = %11, %2
%16 = load i8*, i8** %5
ret i8* %16
}

LLVM IR (-O2):
define i8* @SCRealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @memset(i8* %3, i32 0, i64 %1)
br label %7
7: ; preds = %5, %2
ret i8* %3
}