xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ I2Cstart();
int /*<<< orphan*/ I2Cstop();
int /*<<< orphan*/ I2Cwrite(char);
int /*<<< orphan*/ delay(int);
void LCDputc(char c) {
  I2Cstart();
  if (I2Cwrite(0x7c))
    goto err;
  I2Cwrite(0b11000000);
  I2Cwrite(c);
err:
  I2Cstop();
  delay(30);
}


x86 assembly (clang, -O0):
<LCDputc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x0,%al
call   1030 <I2Cstart@plt>
mov    $0x7c,%edi
call   1050 <I2Cwrite@plt>
cmp    $0x0,%eax
je     116d <LCDputc+0x2d>
jmp    1180 <LCDputc+0x40>
mov    $0xffffffc0,%edi
call   1050 <I2Cwrite@plt>
movsbl -0x1(%rbp),%edi
call   1050 <I2Cwrite@plt>
mov    $0x0,%al
call   1060 <I2Cstop@plt>
mov    $0x1e,%edi
call   1040 <delay@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LCDputc>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <I2Cstart@plt>
mov    $0x7c,%edi
call   1050 <I2Cwrite@plt>
test   %eax,%eax
jne    116a <LCDputc+0x2a>
mov    $0xffffffc0,%edi
call   1050 <I2Cwrite@plt>
movsbl %bl,%edi
call   1050 <I2Cwrite@plt>
xor    %eax,%eax
call   1060 <I2Cstop@plt>
mov    $0x1e,%edi
pop    %rbx
jmp    1040 <delay@plt>

LLVM IR (-O0):
define void @LCDputc(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 (...) @I2Cstart()
%4 = call i32 @I2Cwrite(i8 signext 124)
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
br label %11
7: ; preds = %1
%8 = call i32 @I2Cwrite(i8 signext -64)
%9 = load i8, i8* %2
%10 = call i32 @I2Cwrite(i8 signext %9)
br label %11
11: ; preds = %7, %6
%12 = call i32 (...) @I2Cstop()
%13 = call i32 @delay(i32 30)
ret void
}

LLVM IR (-O2):
define void @LCDputc(i8 signext %0) {
%2 = tail call i32 (...) @I2Cstart()
%3 = tail call i32 @I2Cwrite(i8 signext 124)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = tail call i32 @I2Cwrite(i8 signext -64)
%7 = tail call i32 @I2Cwrite(i8 signext %0)
br label %8
8: ; preds = %1, %5
%9 = tail call i32 (...) @I2Cstop()
%10 = tail call i32 @delay(i32 30)
ret void
}
int main() {
  int a = 1;
  if (a)
    ;
  if (a)
    ;
  else if (a) {
  } else
    ;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1121 <main+0x21>
jmp    1121 <main+0x21>
cmpl   $0x0,-0x8(%rbp)
je     1130 <main+0x30>
jmp    1149 <main+0x49>
cmpl   $0x0,-0x8(%rbp)
je     113f <main+0x3f>
jmp    1144 <main+0x44>
jmp    1144 <main+0x44>
jmp    1149 <main+0x49>
mov    -0x4(%rbp),%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
store i32 0, i32* %1
store i32 1, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %0
br label %6
6: ; preds = %5, %0
%7 = load i32, i32* %2
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %6
br label %16
10: ; preds = %6
%11 = load i32, i32* %2
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %10
br label %15
14: ; preds = %10
br label %15
15: ; preds = %14, %13
br label %16
16: ; preds = %15, %9
%17 = load i32, i32* %1
ret i32 %17
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
struct timeval {
  double tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double stoptime(void) {
  struct timeval t;
  gettimeofday(&t, NULL);
  return (double)t.tv_sec + t.tv_usec / 1000000.0;
}


x86 assembly (clang, -O0):
<stoptime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdq -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xec8(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stoptime>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdq 0x10(%rsp),%xmm1
movsd  0x8(%rsp),%xmm0
divsd  0xecb(%rip),%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { double, i64 }
define double @stoptime() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%4 = load i64, i64* %3
%5 = sitofp i64 %4 to double
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%7 = load double, double* %6
%8 = fdiv double %7, 1.000000e+06
%9 = fadd double %5, %8
ret double %9
}

LLVM IR (-O2):
%struct.timeval = type { double, i64 }
define double @stoptime() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%5 = load i64, i64* %4
%6 = sitofp i64 %5 to double
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%8 = load double, double* %7
%9 = fdiv double %8, 1.000000e+06
%10 = fadd double %9, %6
ret double %10
}
void wsay(char *dafilename, long dafreq, long volume1, long volume2) {}


x86 assembly (clang, -O0):
<wsay>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @wsay(i8* %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i64 %3, i64* %8
ret void
}

LLVM IR (-O2):
define void @wsay(i8* nocapture %0, i64 %1, i64 %2, i64 %3) {
ret void
}
/* Variables and functions */
int system(char *);
int main(void) { return system("x64.exe -sounddev dummy"); }


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

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

LLVM IR (-O0):
@.str = [24 x i8] c"x64.exe -sounddev dummy\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @system(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}

LLVM IR (-O2):
@.str = [24 x i8] c"x64.exe -sounddev dummy\00"
define i32 @main() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
float abs(float);
float helpFindMaxAbsFloat(float a, float b) {
  float aAbs = abs(a);
  float bAbs = abs(b);
  if (aAbs > bAbs) {
    return aAbs;
  } else {
    return bAbs;
  }
}


x86 assembly (clang, -O0):
<helpFindMaxAbsFloat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
call   1030 <abs@plt>
movss  %xmm0,-0x10(%rbp)
movss  -0xc(%rbp),%xmm0
call   1030 <abs@plt>
movss  %xmm0,-0x14(%rbp)
movss  -0x10(%rbp),%xmm0
ucomiss -0x14(%rbp),%xmm0
jbe    115e <helpFindMaxAbsFloat+0x4e>
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1168 <helpFindMaxAbsFloat+0x58>
movss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<helpFindMaxAbsFloat>:
push   %rax
movss  %xmm1,0x4(%rsp)
call   1030 <abs@plt>
movss  %xmm0,(%rsp)
movss  0x4(%rsp),%xmm0
call   1030 <abs@plt>
movss  (%rsp),%xmm1
maxss  %xmm0,%xmm1
movaps %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @helpFindMaxAbsFloat(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %4
store float %1, float* %5
%8 = load float, float* %4
%9 = call float @abs(float %8)
store float %9, float* %6
%10 = load float, float* %5
%11 = call float @abs(float %10)
store float %11, float* %7
%12 = load float, float* %6
%13 = load float, float* %7
%14 = fcmp ogt float %12, %13
br i1 %14, label %15, label %17
15: ; preds = %2
%16 = load float, float* %6
store float %16, float* %3
br label %19
17: ; preds = %2
%18 = load float, float* %7
store float %18, float* %3
br label %19
19: ; preds = %17, %15
%20 = load float, float* %3
ret float %20
}

LLVM IR (-O2):
define float @helpFindMaxAbsFloat(float %0, float %1) {
%3 = tail call float @abs(float %0)
%4 = tail call float @abs(float %1)
%5 = fcmp ogt float %3, %4
%6 = select i1 %5, float %3, float %4
ret float %6
}
/* Variables and functions */
int strcmp(char *, char *);
int string_compare(const void *op1, const void *op2) {
  return strcmp(*(char **)op1, *(char **)op2);
}


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

x86 assembly (clang, -O2):
<string_compare>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @string_compare(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 = bitcast i8* %5 to i8**
%7 = load i8*, i8** %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i8**
%10 = load i8*, i8** %9
%11 = call i32 @strcmp(i8* %7, i8* %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @string_compare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
ret i32 %7
}
void __attribute__((__always___, __nodebug__)) _mm_empty(void) {
  __builtin_ia32_emms();
}


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

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

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

LLVM IR (-O2):
define void @_mm_empty() {
tail call void @llvm.x86.mmx.emms()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void usage(char *name) {
  printf(
      "Usage: %s [OPTION] NOMBRE [DIRECCION] [TEL]\n"
      "  -m, --msgid=MSGID\t\tEspecificar el msgid a usar, si no se generara.\n"
      "  -s, --select\t\tSelect, solo se debe especificar nombre\n"
      "  -d, --delete\t\tDelete, solo se debe especificar nombre\n"
      "  -i, --insert\t\tInsert, se debe especificar nombre direccion y "
      "telefono\n"
      "  -u, --update\t\tUpdate, se debe especificar nombre direccion y "
      "telefono\n",
      name);
}


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

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [370 x i8] c"Usage: %s [OPTION] NOMBRE [DIRECCION] [TEL]\0A -m, --msgid=MSGID\09\09Especificar el msgid a usar, si no se generara.\0A -s, --select\09\09Select, solo se debe especificar nombre\0A -d, --delete\09\09Delete, solo se debe especificar nombre\0A -i, --insert\09\09Insert, se debe especificar nombre direccion y telefono\0A -u, --update\09\09Update, se debe especificar nombre direccion y telefono\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([370 x i8], [370 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [370 x i8] c"Usage: %s [OPTION] NOMBRE [DIRECCION] [TEL]\0A -m, --msgid=MSGID\09\09Especificar el msgid a usar, si no se generara.\0A -s, --select\09\09Select, solo se debe especificar nombre\0A -d, --delete\09\09Delete, solo se debe especificar nombre\0A -i, --insert\09\09Insert, se debe especificar nombre direccion y telefono\0A -u, --update\09\09Update, se debe especificar nombre direccion y telefono\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([370 x i8], [370 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
__attribute__((gnu_)) int range_ptrinbuf2(const void *Min, const void *Max,
                                          const void *ptr) {
  return __builtin_expect((long)((Min && ptr >= Min && ptr < Max)), 1);
}


x86 assembly (clang, -O0):
<range_ptrinbuf2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x19(%rbp)
je     1141 <range_ptrinbuf2+0x41>
mov    -0x18(%rbp),%rcx
xor    %eax,%eax
cmp    -0x8(%rbp),%rcx
mov    %al,-0x19(%rbp)
jb     1141 <range_ptrinbuf2+0x41>
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
setb   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<range_ptrinbuf2>:
test   %rdi,%rdi
setne  %al
cmp    %rdi,%rdx
setae  %cl
cmp    %rsi,%rdx
setb   %dl
and    %al,%cl
and    %dl,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @range_ptrinbuf2(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %17
9: ; preds = %3
%10 = load i8*, i8** %6
%11 = load i8*, i8** %4
%12 = icmp uge i8* %10, %11
br i1 %12, label %13, label %17
13: ; preds = %9
%14 = load i8*, i8** %6
%15 = load i8*, i8** %5
%16 = icmp ult i8* %14, %15
br label %17
17: ; preds = %13, %9, %3
%18 = phi i1 [ false, %9 ], [ false, %3 ], [ %16, %13 ]
%19 = zext i1 %18 to i32
%20 = sext i32 %19 to i64
%21 = trunc i64 %20 to i32
ret i32 %21
}

LLVM IR (-O2):
define i32 @range_ptrinbuf2(i8* readnone %0, i8* readnone %1, i8* readnone %2) {
%4 = icmp ne i8* %0, null
%5 = icmp uge i8* %2, %0
%6 = icmp ult i8* %2, %1
%7 = and i1 %4, %5
%8 = and i1 %6, %7
%9 = zext i1 %8 to i32
ret i32 %9
}
int main(int argc, char **argv) {
  char **x = argc > 1 ? (void *)0 : argv;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    1127 <main+0x27>
xor    %eax,%eax
mov    %rax,-0x20(%rbp)
jmp    112f <main+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp sgt i32 %7, 1
br i1 %8, label %9, label %10
9: ; preds = %2
br label %12
10: ; preds = %2
%11 = load i8**, i8*** %5
br label %12
12: ; preds = %10, %9
%13 = phi i8** [ null, %9 ], [ %11, %10 ]
store i8** %13, i8*** %6
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
void reverse(char str[], size_t n) {}


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

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

LLVM IR (-O0):
define void @reverse(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
ret void
}

LLVM IR (-O2):
define void @reverse(i8* nocapture %0, i64 %1) {
ret void
}
int sub(int f, int s) { return (f - s); }


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

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

LLVM IR (-O0):
define i32 @sub(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = sub nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @sub(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ jmp_buf;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int setjmp(jmp_buf env) {
  fprintf(stderr, "WARNING: "
                  "setjmp"
                  " is unsupported!\n");
  return 0;
}


x86 assembly (clang, -O0):
<setjmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
lea    0xed5(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setjmp>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [33 x i8] c"WARNING: setjmp is unsupported!\0A\00"
define i32 @setjmp(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [33 x i8] c"WARNING: setjmp is unsupported!\0A\00"
define i32 @setjmp(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int PR21643() {
  return __atomic_or_fetch((int __attribute__((address_space(257))) *)0x308, 1,
                           0);
}


x86 assembly (clang, -O0):
<PR21643>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    %fs:0x308,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%edx
mov    %eax,%ecx
or     %edx,%ecx
lock cmpxchg %ecx,%fs:0x308
sete   %cl
mov    %eax,-0x14(%rbp)
test   $0x1,%cl
mov    %eax,-0xc(%rbp)
jne    1147 <PR21643+0x47>
jmp    111c <PR21643+0x1c>
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%eax
or     %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<PR21643>:
mov    %fs:0x308,%eax
nopl   0x0(%rax,%rax,1)
mov    %eax,%ecx
or     $0x1,%ecx
lock cmpxchg %ecx,%fs:0x308
jne    1110 <PR21643+0x10>
or     $0x1,%eax
ret

LLVM IR (-O0):
define i32 @PR21643() {
%1 = alloca i32
%2 = alloca i32
store i32 1, i32* %1
%3 = load i32, i32* %1
%4 = atomicrmw or i32 addrspace(257)* inttoptr (i64 776 to i32 addrspace(257)*), i32 %3 monotonic
%5 = or i32 %4, %3
store i32 %5, i32* %2
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
define i32 @PR21643() {
%1 = atomicrmw or i32 addrspace(257)* inttoptr (i64 776 to i32 addrspace(257)*), i32 1 monotonic
%2 = or i32 %1, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void segfault(int dummy) {
  printf("Help!\n");
  exit(1);
}


x86 assembly (clang, -O0):
<segfault>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<segfault>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"Help!\0A\00"
define void @segfault(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [6 x i8] c"Help!\00"
define void @segfault(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
scalar_t__ close(int);
int /*<<< orphan*/ warn(char *);
void dasd_close_device(int fd) {
  if (close(fd) != 0)
    warn("Unable to close device");
}


x86 assembly (clang, -O0):
<dasd_close_device>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <close@plt>
cmp    $0x0,%rax
je     1149 <dasd_close_device+0x29>
lea    0xebc(%rip),%rdi
call   1030 <warn@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dasd_close_device>:
push   %rax
call   1040 <close@plt>
test   %rax,%rax
je     1138 <dasd_close_device+0x18>
lea    0xece(%rip),%rdi
pop    %rax
jmp    1030 <warn@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [23 x i8] c"Unable to close device\00"
define void @dasd_close_device(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @close(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @warn(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"Unable to close device\00"
define void @dasd_close_device(i32 %0) {
%2 = tail call i64 @close(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @warn(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ vcall(float *, int);
void v2s(short int *vec) {
  float v[2];
  v[0] = vec[0];
  v[1] = vec[1];
  vcall(v, 2);
}


x86 assembly (clang, -O0):
<v2s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movswl (%rax),%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movswl 0x2(%rax),%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0xc(%rbp)
lea    -0x10(%rbp),%rdi
mov    $0x2,%esi
call   1030 <vcall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<v2s>:
push   %rax
movswl (%rdi),%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,(%rsp)
movswl 0x2(%rdi),%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  %xmm0,0x4(%rsp)
mov    %rsp,%rdi
mov    $0x2,%esi
call   1030 <vcall@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @v2s(i16* %0) {
%2 = alloca i16*
%3 = alloca [2 x float]
store i16* %0, i16** %2
%4 = load i16*, i16** %2
%5 = getelementptr inbounds i16, i16* %4, i64 0
%6 = load i16, i16* %5
%7 = sitofp i16 %6 to float
%8 = getelementptr inbounds [2 x float], [2 x float]* %3, i64 0, i64 0
store float %7, float* %8
%9 = load i16*, i16** %2
%10 = getelementptr inbounds i16, i16* %9, i64 1
%11 = load i16, i16* %10
%12 = sitofp i16 %11 to float
%13 = getelementptr inbounds [2 x float], [2 x float]* %3, i64 0, i64 1
store float %12, float* %13
%14 = getelementptr inbounds [2 x float], [2 x float]* %3, i64 0, i64 0
%15 = call i32 @vcall(float* %14, i32 2)
ret void
}

LLVM IR (-O2):
define void @v2s(i16* nocapture %0) {
%2 = alloca [2 x float]
%3 = bitcast [2 x float]* %2 to i8*
%4 = load i16, i16* %0
%5 = sitofp i16 %4 to float
%6 = getelementptr inbounds [2 x float], [2 x float]* %2, i64 0, i64 0
store float %5, float* %6
%7 = getelementptr inbounds i16, i16* %0, i64 1
%8 = load i16, i16* %7
%9 = sitofp i16 %8 to float
%10 = getelementptr inbounds [2 x float], [2 x float]* %2, i64 0, i64 1
store float %9, float* %10
%11 = call i32 @vcall(float* %6, i32 2)
ret void
}
void dead_test10(int *data) {
  int k = 0;
  int j;
  for (j = 0; j < data[0]; j++)
    k++;
  j = data[2];
  data[j] = 2;
}


x86 assembly (clang, -O0):
<dead_test10>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x8(%rbp),%rcx
cmp    (%rcx),%eax
jge    113c <dead_test10+0x3c>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1116 <dead_test10+0x16>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movl   $0x2,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<dead_test10>:
movslq 0x8(%rdi),%rax
movl   $0x2,(%rdi,%rax,4)
ret

LLVM IR (-O0):
define void @dead_test10(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
store i32 0, i32* %3
store i32 0, i32* %4
br label %5
5: ; preds = %14, %1
%6 = load i32, i32* %4
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 0
%9 = load i32, i32* %8
%10 = icmp slt i32 %6, %9
br i1 %10, label %11, label %17
11: ; preds = %5
%12 = load i32, i32* %3
%13 = add nsw i32 %12, 1
store i32 %13, i32* %3
br label %14
14: ; preds = %11
%15 = load i32, i32* %4
%16 = add nsw i32 %15, 1
store i32 %16, i32* %4
br label %5
17: ; preds = %5
%18 = load i32*, i32** %2
%19 = getelementptr inbounds i32, i32* %18, i64 2
%20 = load i32, i32* %19
store i32 %20, i32* %4
%21 = load i32*, i32** %2
%22 = load i32, i32* %4
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i32, i32* %21, i64 %23
store i32 2, i32* %24
ret void
}

LLVM IR (-O2):
define void @dead_test10(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
store i32 2, i32* %5
ret void
}
long pcount_goto_jtm(unsigned long x) {
  long result = 0;
  goto test;
loop:
  result += x & 0x1;
  x >>= 1;
test:
  if (x)
    goto loop;
  return result;
}


x86 assembly (clang, -O0):
<pcount_goto_jtm>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
jmp    1131 <pcount_goto_jtm+0x31>
mov    -0x8(%rbp),%rax
and    $0x1,%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x1,%rax
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1141 <pcount_goto_jtm+0x41>
jmp    1115 <pcount_goto_jtm+0x15>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pcount_goto_jtm>:
xor    %eax,%eax
test   %rdi,%rdi
je     1124 <pcount_goto_jtm+0x24>
mov    %rdi,%rcx
nopw   0x0(%rax,%rax,1)
mov    %edi,%edx
and    $0x1,%edx
add    %rdx,%rax
shr    %rcx
cmp    $0x1,%rdi
mov    %rcx,%rdi
ja     1110 <pcount_goto_jtm+0x10>
ret

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

LLVM IR (-O2):
define i64 @pcount_goto_jtm(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %7, %3 ], [ 0, %1 ]
%5 = phi i64 [ %8, %3 ], [ %0, %1 ]
%6 = and i64 %5, 1
%7 = add i64 %4, %6
%8 = lshr i64 %5, 1
%9 = icmp ult i64 %5, 2
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i64 [ 0, %1 ], [ %7, %3 ]
ret i64 %11
}
int handle_debug_loc(void) {
  int retval = -1;
  return retval;
}


x86 assembly (clang, -O0):
<handle_debug_loc>:
push   %rbp
mov    %rsp,%rbp
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @handle_debug_loc() {
ret i32 -1
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int syscall(int, int /*<<< orphan*/ *, int);
int sigpending(sigset_t *set) { return syscall(176, set, 8); }


x86 assembly (clang, -O0):
<sigpending>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0xb0,%edi
mov    $0x8,%edx
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigpending>:
mov    %rdi,%rsi
mov    $0xb0,%edi
mov    $0x8,%edx
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i32 @sigpending(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @syscall(i32 176, i32* %3, i32 8)
ret i32 %4
}

LLVM IR (-O2):
define i32 @sigpending(i32* %0) {
%2 = tail call i32 @syscall(i32 176, i32* %0, i32 8)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ set_io_bit(int, int);
void TOSH_SET_RED_LED_PIN() { set_io_bit(0x37, 7); }


x86 assembly (clang, -O0):
<TOSH_SET_RED_LED_PIN>:
push   %rbp
mov    %rsp,%rbp
mov    $0x37,%edi
mov    $0x7,%esi
call   1030 <set_io_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_SET_RED_LED_PIN>:
mov    $0x37,%edi
mov    $0x7,%esi
jmp    1030 <set_io_bit@plt>

LLVM IR (-O0):
define void @TOSH_SET_RED_LED_PIN() {
%1 = call i32 @set_io_bit(i32 55, i32 7)
ret void
}

LLVM IR (-O2):
define void @TOSH_SET_RED_LED_PIN() {
%1 = tail call i32 @set_io_bit(i32 55, i32 7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ direxists(char *);
int /*<<< orphan*/ eFree(char *);
char *popString();
int /*<<< orphan*/ pushNumber(int /*<<< orphan*/);
void basDirExists() {
  char *path;
  path = popString();
  pushNumber(direxists(path));
  eFree(path);
}


x86 assembly (clang, -O0):
<basDirExists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <popString@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <direxists@plt>
mov    %eax,%edi
call   1060 <pushNumber@plt>
mov    -0x8(%rbp),%rdi
call   1030 <eFree@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basDirExists>:
push   %rbx
xor    %eax,%eax
call   1050 <popString@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <direxists@plt>
mov    %eax,%edi
call   1060 <pushNumber@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <eFree@plt>

LLVM IR (-O0):
define void @basDirExists() {
%1 = alloca i8*
%2 = call i8* (...) @popString()
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @direxists(i8* %3)
%5 = call i32 @pushNumber(i32 %4)
%6 = load i8*, i8** %1
%7 = call i32 @eFree(i8* %6)
ret void
}

LLVM IR (-O2):
define void @basDirExists() {
%1 = tail call i8* (...) @popString()
%2 = tail call i32 @direxists(i8* %1)
%3 = tail call i32 @pushNumber(i32 %2)
%4 = tail call i32 @eFree(i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void foo() {
  static int count;
  count++;
  if (count > 1)
    abort();
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f12(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2f09(%rip)
cmpl   $0x1,0x2f02(%rip)
jle    1137 <foo+0x27>
mov    $0x0,%al
call   1030 <abort@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rax
mov    0x2f15(%rip),%eax
lea    0x1(%rax),%ecx
mov    %ecx,0x2f0c(%rip)
test   %eax,%eax
jg     1126 <foo+0x16>
pop    %rax
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@foo.count = internal global i32 0
define void @foo() {
%1 = load i32, i32* @foo.count
%2 = add nsw i32 %1, 1
store i32 %2, i32* @foo.count
%3 = load i32, i32* @foo.count
%4 = icmp sgt i32 %3, 1
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %0
ret void
}

LLVM IR (-O2):
@foo.count = internal unnamed_addr global i32 0
define void @foo() {
%1 = load i32, i32* @foo.count
%2 = add nsw i32 %1, 1
store i32 %2, i32* @foo.count
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EIO;
int /*<<< orphan*/ errno;
int li_getentropy(void *buf, size_t buflen) {
  ((void)(buf));
  ((void)(buflen));
  errno = EIO;
  return -1;
}


x86 assembly (clang, -O0):
<li_getentropy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ecd(%rip),%rax
mov    (%rax),%ecx
mov    0x2ebc(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<li_getentropy>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@EIO = global i32 0
@errno = global i32 0
define i32 @li_getentropy(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = load i32, i32* @EIO
store i32 %7, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@EIO = global i32 0
@errno = global i32 0
define i32 @li_getentropy(i8* nocapture readnone %0, i64 %1) {
%3 = load i32, i32* @EIO
store i32 %3, i32* @errno
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
scalar_t__ nondet();
void main() {
  int x;
  int y;
  int flag;
  flag = 1;
  while (nondet() || flag) {
    flag = 0;
    x = 0;
  }
  assert(x == 0);
  return;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0xc(%rbp)
mov    $0x0,%al
call   1030 <nondet@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0xd(%rbp)
jne    1152 <main+0x32>
cmpl   $0x0,-0xc(%rbp)
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1162 <main+0x42>
jmp    1175 <main+0x55>
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x4(%rbp)
jmp    112f <main+0xf>
cmpl   $0x0,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <nondet@plt>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <nondet@plt>
test   %rax,%rax
jne    1130 <main+0x10>
mov    $0x1,%edi
pop    %rax
jmp    1040 <assert@plt>

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 1, i32* %3
br label %4
4: ; preds = %12, %0
%5 = call i64 (...) @nondet()
%6 = icmp ne i64 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %4
%8 = load i32, i32* %3
%9 = icmp ne i32 %8, 0
br label %10
10: ; preds = %7, %4
%11 = phi i1 [ true, %4 ], [ %9, %7 ]
br i1 %11, label %12, label %13
12: ; preds = %10
store i32 0, i32* %3
store i32 0, i32* %1
br label %4
13: ; preds = %10
%14 = load i32, i32* %1
%15 = icmp eq i32 %14, 0
%16 = zext i1 %15 to i32
%17 = call i32 @assert(i32 %16)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i64 (...) @nondet()
br label %2
2: ; preds = %2, %0
%3 = tail call i64 (...) @nondet()
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %2
5: ; preds = %2
%6 = tail call i32 @assert(i32 1)
ret void
}
int fun() { return 0; }


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

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

LLVM IR (-O0):
define i32 @fun() {
ret i32 0
}

LLVM IR (-O2):
define i32 @fun() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
void pack_header(FILE *fp, char *extension) {
  fprintf(fp, "HTTP/1.1 200 OK\r\n");
  if (extension)
    fprintf(fp, "Content-type: %s\r\n", extension);
}


x86 assembly (clang, -O0):
<pack_header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed5(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
cmpq   $0x0,-0x10(%rbp)
je     1153 <pack_header+0x43>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xec6(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pack_header>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xecf(%rip),%rdi
mov    $0x11,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
test   %r14,%r14
je     1163 <pack_header+0x43>
lea    0xec3(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fprintf@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [18 x i8] c"HTTP/1.1 200 OK\0D\0A\00"
@.str.1 = [19 x i8] c"Content-type: %s\0D\0A\00"
define void @pack_header(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i32*, i32** %3
%6 = call i32 (i32*, i8*, ...) @fprintf(i32* %5, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%7 = load i8*, i8** %4
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = load i32*, i32** %3
%11 = load i8*, i8** %4
%12 = call i32 (i32*, i8*, ...) @fprintf(i32* %10, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %11)
br label %13
13: ; preds = %9, %2
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"HTTP/1.1 200 OK\0D\0A\00"
@.str.1 = [19 x i8] c"Content-type: %s\0D\0A\00"
define void @pack_header(i32* nocapture %0, i8* %1) {
%3 = tail call i64 @fwrite(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i64 17, i64 1, i32* %0)
%4 = icmp eq i8* %1, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %1)
br label %7
7: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gmvwrite_tracers_endtrace();
void fgmvwrite_tracers_endtrace_() { gmvwrite_tracers_endtrace(); }


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

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

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

LLVM IR (-O2):
define void @fgmvwrite_tracers_endtrace_() {
%1 = tail call i32 (...) @gmvwrite_tracers_endtrace()
ret void
}
void deleteGlobalTimers() {}


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

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

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

LLVM IR (-O2):
define void @deleteGlobalTimers() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ addbyte(int);
void MMX_SUBUSW(int dst_reg, int src_reg) {
  addbyte(0x66);
  addbyte(0x0f);
  addbyte(0xd9);
  addbyte(0xc0 | (dst_reg << 3) | src_reg);
}


x86 assembly (clang, -O0):
<MMX_SUBUSW>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x66,%edi
call   1030 <addbyte@plt>
mov    $0xf,%edi
call   1030 <addbyte@plt>
mov    $0xd9,%edi
call   1030 <addbyte@plt>
mov    -0x4(%rbp),%edi
shl    $0x3,%edi
or     $0xc0,%edi
or     -0x8(%rbp),%edi
call   1030 <addbyte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MMX_SUBUSW>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x66,%edi
call   1030 <addbyte@plt>
mov    $0xf,%edi
call   1030 <addbyte@plt>
mov    $0xd9,%edi
call   1030 <addbyte@plt>
shl    $0x3,%ebp
or     %ebx,%ebp
or     $0xc0,%ebp
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <addbyte@plt>

LLVM IR (-O0):
define void @MMX_SUBUSW(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @addbyte(i32 102)
%6 = call i32 @addbyte(i32 15)
%7 = call i32 @addbyte(i32 217)
%8 = load i32, i32* %3
%9 = shl i32 %8, 3
%10 = or i32 192, %9
%11 = load i32, i32* %4
%12 = or i32 %10, %11
%13 = call i32 @addbyte(i32 %12)
ret void
}

LLVM IR (-O2):
define void @MMX_SUBUSW(i32 %0, i32 %1) {
%3 = tail call i32 @addbyte(i32 102)
%4 = tail call i32 @addbyte(i32 15)
%5 = tail call i32 @addbyte(i32 217)
%6 = shl i32 %0, 3
%7 = or i32 %6, %1
%8 = or i32 %7, 192
%9 = tail call i32 @addbyte(i32 %8)
ret void
}
/* Variables and functions */
scalar_t__ lgammal(long double);
int /*<<< orphan*/ link_failure_lgammal();
void test_lgammal(long double ld) {
  if (lgammal(ld) != lgammal(ld))
    link_failure_lgammal();
}


x86 assembly (clang, -O0):
<test_lgammal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <lgammal@plt>
mov    %rax,-0x18(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <lgammal@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
je     1163 <test_lgammal+0x43>
mov    $0x0,%al
call   1030 <link_failure_lgammal@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_lgammal>:
push   %rbx
sub    $0x20,%rsp
fldt   0x30(%rsp)
fld    %st(0)
fstpt  0x14(%rsp)
fstpt  (%rsp)
call   1040 <lgammal@plt>
mov    %rax,%rbx
fldt   0x14(%rsp)
fstpt  (%rsp)
call   1040 <lgammal@plt>
cmp    %rax,%rbx
jne    1151 <test_lgammal+0x31>
add    $0x20,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
jmp    1030 <link_failure_lgammal@plt>

LLVM IR (-O0):
define void @test_lgammal(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = call i64 @lgammal(x86_fp80 %3)
%5 = load x86_fp80, x86_fp80* %2
%6 = call i64 @lgammal(x86_fp80 %5)
%7 = icmp ne i64 %4, %6
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (...) @link_failure_lgammal()
br label %10
10: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
define void @test_lgammal(x86_fp80 %0) {
%2 = tail call i64 @lgammal(x86_fp80 %0)
%3 = tail call i64 @lgammal(x86_fp80 %0)
%4 = icmp eq i64 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @link_failure_lgammal()
br label %7
7: ; preds = %5, %1
ret void
}
int LZ4_compressBound(int isize) { return ((isize) + ((isize) / 255) + 16); }


x86 assembly (clang, -O0):
<LZ4_compressBound>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xff,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
add    %ecx,%eax
add    $0x10,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<LZ4_compressBound>:
movslq %edi,%rax
imul   $0xffffffff80808081,%rax,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
sar    $0x7,%ecx
add    %edx,%ecx
add    %ecx,%eax
add    $0x10,%eax
ret

LLVM IR (-O0):
define i32 @LZ4_compressBound(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = sdiv i32 %4, 255
%6 = add nsw i32 %3, %5
%7 = add nsw i32 %6, 16
ret i32 %7
}

LLVM IR (-O2):
define i32 @LZ4_compressBound(i32 %0) {
%2 = sdiv i32 %0, 255
%3 = add i32 %0, 16
%4 = add i32 %3, %2
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printSnakeInstructions(void) {
  printf((("Configure game: c\nQuit: q\nPause: space\n")));
}


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

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

LLVM IR (-O0):
@.str = [40 x i8] c"Configure game: c\0AQuit: q\0APause: space\0A\00"
define void @printSnakeInstructions() {
%1 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [39 x i8] c"Configure game: c\0AQuit: q\0APause: space\00"
define void @printSnakeInstructions() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
size_t sas_subheader_remainder(size_t len, size_t signature_len) {
  return len - (4 + 2 * signature_len);
}


x86 assembly (clang, -O0):
<sas_subheader_remainder>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
shl    $0x1,%rcx
add    $0x4,%rcx
sub    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sas_subheader_remainder>:
add    %rsi,%rsi
sub    %rsi,%rdi
lea    -0x4(%rdi),%rax
ret

LLVM IR (-O0):
define i64 @sas_subheader_remainder(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = mul i64 2, %6
%8 = add i64 4, %7
%9 = sub i64 %5, %8
ret i64 %9
}

LLVM IR (-O2):
define i64 @sas_subheader_remainder(i64 %0, i64 %1) {
%3 = mul i64 %1, -2
%4 = add i64 %0, -4
%5 = add i64 %4, %3
ret i64 %5
}
/* Type definitions */
typedef double time_t;

/* Variables and functions */
double difftime(time_t time1, time_t time0) { return time1 - time0; }


x86 assembly (clang, -O0):
<difftime>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<difftime>:
subsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @difftime(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fsub double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @difftime(double %0, double %1) {
%3 = fsub double %0, %1
ret double %3
}
/* Variables and functions */
bool nrf53_errata_44(void) { return false; }


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

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

LLVM IR (-O0):
define i32 @nrf53_errata_44() {
ret i32 0
}

LLVM IR (-O2):
define i32 @nrf53_errata_44() {
ret i32 0
}
int ti_atr_start(double const *options) { return (int)options[0] - 1; }


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

x86 assembly (clang, -O2):
<ti_atr_start>:
cvttsd2si (%rdi),%eax
add    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @ti_atr_start(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
%5 = load double, double* %4
%6 = fptosi double %5 to i32
%7 = sub nsw i32 %6, 1
ret i32 %7
}

LLVM IR (-O2):
define i32 @ti_atr_start(double* nocapture %0) {
%2 = load double, double* %0
%3 = fptosi double %2 to i32
%4 = add nsw i32 %3, -1
ret i32 %4
}
/* Variables and functions */
scalar_t__ BemFormada(char *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ system(char *);
int main(void) {
  char expr[10] = "([(){()}])";
  printf("%s\n", BemFormada(expr) ? "Bem formada" : "Mal formada");
  system("pause");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xec1(%rip),%rax
mov    %rax,-0xa(%rbp)
mov    0xebe(%rip),%ax
mov    %ax,-0x2(%rbp)
lea    -0xa(%rbp),%rdi
call   1050 <BemFormada@plt>
mov    %rax,%rcx
lea    0xeb9(%rip),%rsi
lea    0xea6(%rip),%rax
cmp    $0x0,%rcx
cmovne %rax,%rsi
lea    0xe93(%rip),%rdi
call   1040 <printf@plt>
lea    0xea3(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movabs $0x7d29287b29285b28,%rax
28 29 7d
mov    %rax,0x8(%rsp)
movw   $0x295d,0x10(%rsp)
lea    0x8(%rsp),%rdi
call   1050 <BemFormada@plt>
test   %rax,%rax
lea    0xebc(%rip),%rax
lea    0xea9(%rip),%rsi
cmove  %rax,%rsi
lea    0xe9a(%rip),%rdi
call   1040 <printf@plt>
lea    0xeaa(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.expr = [10 x i8] c"([(){()}])"
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [12 x i8] c"Bem formada\00"
@.str.2 = [12 x i8] c"Mal formada\00"
@.str.3 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca [10 x i8]
%2 = bitcast [10 x i8]* %1 to i8*
%3 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%4 = call i64 @BemFormada(i8* %3)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@__const.main.expr = [10 x i8] c"([(){()}])"
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [12 x i8] c"Bem formada\00"
@.str.2 = [12 x i8] c"Mal formada\00"
@.str.3 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca [10 x i8]
%2 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%3 = call i64 @BemFormada(i8* %2)
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}