xunge/DecIR huggingface dataset:
int gmx_node_id(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @gmx_node_id() {
ret i32 0
}
void Error(sz, wArg) char *sz;
unsigned wArg;
{
  printf("mergeelx: ");
  printf(sz, wArg);
  printf("\n");
  exit(1);
}


x86 assembly (clang, -O0):
<Error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<Error>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0xec1(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"mergeelx: \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @Error(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 (i8*, ...) @printf(i8* %6, i32 %7)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
unreachable
}

LLVM IR (-O2):
@.str = [11 x i8] c"mergeelx: \00"
define void @Error(i8* nocapture %0, i32 %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %0, i32 %1)
%5 = tail call i32 @putchar(i32 10)
tail call void @exit(i32 1)
unreachable
}
/* Variables and functions */
int shft_l(int *, int *);
int intr_wrap_554(int p1, int p2) { return shft_l(&p1, &p2); }


x86 assembly (clang, -O0):
<intr_wrap_554>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    -0x4(%rbp),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <shft_l@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intr_wrap_554>:
push   %rax
mov    %edi,0x4(%rsp)
mov    %esi,(%rsp)
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <shft_l@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @intr_wrap_554(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @shft_l(i32* %3, i32* %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @intr_wrap_554(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @shft_l(i32* %3, i32* %4)
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
int /*<<< orphan*/ free(char *);
char *test_json_escape(char const *);
void test_print_header_json(FILE *output, const char *suite_name) {
  char *escaped_suite_name;
  escaped_suite_name = test_json_escape(suite_name);
  fprintf(output,
          "{\n"
          "  \"name\": \"%s\",\n"
          "  \"tests\": {\n",
          escaped_suite_name);
  free(escaped_suite_name);
}


x86 assembly (clang, -O0):
<test_print_header_json>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <test_json_escape@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    0xea4(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   1040 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_print_header_json>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <test_json_escape@plt>
mov    %rax,%rbx
lea    0xeb7(%rip),%rsi
mov    %r14,%rdi
mov    %rax,%rdx
call   1050 <fprintf@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <free@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"{\0A \22name\22: \22%s\22,\0A \22tests\22: {\0A\00"
define void @test_print_header_json(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
%5 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call i8* @test_json_escape(i8* %6)
store i8* %7, i8** %5
%8 = load i32*, i32** %3
%9 = load i8*, i8** %5
%10 = call i32 @fprintf(i32* %8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = load i8*, i8** %5
%12 = call i32 @free(i8* %11)
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"{\0A \22name\22: \22%s\22,\0A \22tests\22: {\0A\00"
define void @test_print_header_json(i32* nocapture %0, i8* %1) {
%3 = tail call i8* @test_json_escape(i8* %1)
%4 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = tail call i32 @free(i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(int argc, char **argv) {
  puts("I'm currently just a placeholder. Bye!");
  return 0;
}


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)
lea    0xed3(%rip),%rdi
call   1030 <puts@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 = [39 x i8] c"I'm currently just a placeholder. Bye!\00"
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 = call i32 @puts(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [39 x i8] c"I'm currently just a placeholder. Bye!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ putc(char, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void test_fp_fmt(char *fmt, double val) {
  fputs(fmt, stdout);
  putc(':', stdout);
  printf(fmt, val);
  putc('\n', stdout);
}


x86 assembly (clang, -O0):
<test_fp_fmt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e94(%rip),%rax
mov    (%rax),%esi
call   1040 <fputs@plt>
mov    0x2e86(%rip),%rax
mov    (%rax),%esi
mov    $0x3a,%edi
call   1050 <putc@plt>
mov    -0x8(%rbp),%rdi
movsd  -0x10(%rbp),%xmm0
call   1030 <printf@plt>
mov    0x2e65(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
call   1050 <putc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_fp_fmt>:
push   %r14
push   %rbx
push   %rax
movsd  %xmm0,(%rsp)
mov    %rdi,%rbx
mov    0x2e9d(%rip),%r14
mov    (%r14),%esi
call   1040 <fputs@plt>
mov    (%r14),%esi
mov    $0x3a,%edi
call   1050 <putc@plt>
mov    %rbx,%rdi
movsd  (%rsp),%xmm0
call   1030 <printf@plt>
mov    (%r14),%esi
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <putc@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @test_fp_fmt(i8* %0, double %1) {
%3 = alloca i8*
%4 = alloca double
store i8* %0, i8** %3
store double %1, double* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* @stdout
%7 = call i32 @fputs(i8* %5, i32 %6)
%8 = load i32, i32* @stdout
%9 = call i32 @putc(i8 signext 58, i32 %8)
%10 = load i8*, i8** %3
%11 = load double, double* %4
%12 = call i32 @printf(i8* %10, double %11)
%13 = load i32, i32* @stdout
%14 = call i32 @putc(i8 signext 10, i32 %13)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @test_fp_fmt(i8* %0, double %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @fputs(i8* %0, i32 %3)
%5 = load i32, i32* @stdout
%6 = tail call i32 @putc(i8 signext 58, i32 %5)
%7 = tail call i32 @printf(i8* %0, double %1)
%8 = load i32, i32* @stdout
%9 = tail call i32 @putc(i8 signext 10, i32 %8)
ret void
}
int digit(const char c) { return (unsigned)(c - '0') <= 9; }


x86 assembly (clang, -O0):
<digit>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
sub    $0x30,%eax
cmp    $0x9,%eax
setbe  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<digit>:
add    $0xffffffd0,%edi
xor    %eax,%eax
cmp    $0xa,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @digit(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = sub nsw i32 %4, 48
%6 = icmp ule i32 %5, 9
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @digit(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add nsw i32 %2, -48
%4 = icmp ult i32 %3, 10
%5 = zext i1 %4 to i32
ret i32 %5
}
void lockdep_off(void) {}


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

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

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

LLVM IR (-O2):
define void @lockdep_off() {
ret void
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMR3D_get(void) { return U_WMRCORENONE_get("U_WMR3D"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMR3D\00"
define i32 @U_WMR3D_get() {
%1 = call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMR3D\00"
define i32 @U_WMR3D_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
void user_rf_pre_init(void) {}


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

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

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

LLVM IR (-O2):
define void @user_rf_pre_init() {
ret void
}
/* Type definitions */
struct aeEventLoop {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ activeExpireCycle(int);
int /*<<< orphan*/ flushAppendOnlyFile(int /*<<< orphan*/);
void beforeSleep(struct aeEventLoop *eventLoop) {
  ((void)eventLoop);
  activeExpireCycle(1);
  flushAppendOnlyFile(0);
}


x86 assembly (clang, -O0):
<beforeSleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%edi
call   1040 <activeExpireCycle@plt>
xor    %edi,%edi
call   1030 <flushAppendOnlyFile@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<beforeSleep>:
push   %rax
mov    $0x1,%edi
call   1040 <activeExpireCycle@plt>
xor    %edi,%edi
pop    %rax
jmp    1030 <flushAppendOnlyFile@plt>

LLVM IR (-O0):
%struct.aeEventLoop = type { i32 }
define void @beforeSleep(%struct.aeEventLoop* %0) {
%2 = alloca %struct.aeEventLoop*
store %struct.aeEventLoop* %0, %struct.aeEventLoop** %2
%3 = load %struct.aeEventLoop*, %struct.aeEventLoop** %2
%4 = call i32 @activeExpireCycle(i32 1)
%5 = call i32 @flushAppendOnlyFile(i32 0)
ret void
}

LLVM IR (-O2):
%struct.aeEventLoop = type { i32 }
define void @beforeSleep(%struct.aeEventLoop* nocapture readnone %0) {
%2 = tail call i32 @activeExpireCycle(i32 1)
%3 = tail call i32 @flushAppendOnlyFile(i32 0)
ret void
}
/* Variables and functions */
void *calloc(size_t, size_t);
int /*<<< orphan*/ error(char *);
void *scalloc(size_t nmemb, size_t size) {
  void *p;
  p = calloc(nmemb, size);
  if (p == NULL)
    error("cannot calloc()");
  return (p);
}


x86 assembly (clang, -O0):
<scalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <calloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1158 <scalloc+0x38>
lea    0xead(%rip),%rdi
call   1040 <error@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scalloc>:
push   %rbx
call   1030 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <scalloc+0x1a>
lea    0xecb(%rip),%rdi
call   1040 <error@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [16 x i8] c"cannot calloc()\00"
define noalias i8* @scalloc(i64 %0, i64 %1) {
%3 = tail call i8* @calloc(i64 %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @error(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ KIONIX_ACCEL_enable_int();
void KIONIX_ACCEL_enable_interrupt(void) { KIONIX_ACCEL_enable_int(); }


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

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

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

LLVM IR (-O2):
define void @KIONIX_ACCEL_enable_interrupt() {
%1 = tail call i32 (...) @KIONIX_ACCEL_enable_int()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ releaseInstructorLock();
scalar_t__ takeInstructorLock();
void forceInstructorLock(void) {
  while (takeInstructorLock()) {
    releaseInstructorLock();
  }
  releaseInstructorLock();
}


x86 assembly (clang, -O0):
<forceInstructorLock>:
push   %rbp
mov    %rsp,%rbp
jmp    1129 <forceInstructorLock+0x9>
mov    $0x0,%al
call   1040 <takeInstructorLock@plt>
cmp    $0x0,%rax
je     1146 <forceInstructorLock+0x26>
mov    $0x0,%al
call   1030 <releaseInstructorLock@plt>
jmp    1129 <forceInstructorLock+0x9>
mov    $0x0,%al
call   1030 <releaseInstructorLock@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<forceInstructorLock>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <takeInstructorLock@plt>
test   %rax,%rax
je     1145 <forceInstructorLock+0x25>
xor    %eax,%eax
call   1030 <releaseInstructorLock@plt>
jmp    1130 <forceInstructorLock+0x10>
xor    %eax,%eax
pop    %rcx
jmp    1030 <releaseInstructorLock@plt>

LLVM IR (-O0):
define void @forceInstructorLock() {
br label %1
1: ; preds = %4, %0
%2 = call i64 (...) @takeInstructorLock()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = call i32 (...) @releaseInstructorLock()
br label %1
6: ; preds = %1
%7 = call i32 (...) @releaseInstructorLock()
ret void
}

LLVM IR (-O2):
define void @forceInstructorLock() {
%1 = tail call i64 (...) @takeInstructorLock()
%2 = icmp eq i64 %1, 0
br i1 %2, label %7, label %3
3: ; preds = %0, %3
%4 = tail call i32 (...) @releaseInstructorLock()
%5 = tail call i64 (...) @takeInstructorLock()
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %3
7: ; preds = %3, %0
%8 = tail call i32 (...) @releaseInstructorLock()
ret void
}
int main1(int a) {
  int k = 0;
  ;
  while (a < 5) {
    k++;
  }
}


x86 assembly (clang, -O0):
<main1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    1126 <main1+0x26>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110e <main1+0xe>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main1>:
cmp    $0x4,%edi
jg     1112 <main1+0x12>
cs nopw 0x0(%rax,%rax,1)
nop
jmp    1110 <main1+0x10>
ret

LLVM IR (-O0):
define i32 @main1(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 0, i32* %4
br label %5
5: ; preds = %8, %1
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 5
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = load i32, i32* %4
%10 = add nsw i32 %9, 1
store i32 %10, i32* %4
br label %5
11: ; preds = %5
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @main1(i32 %0) {
%2 = icmp slt i32 %0, 5
br i1 %2, label %3, label %4
3: ; preds = %1, %3
br label %3
4: ; preds = %1
ret i32 undef
}
long blargg_max(long x, long y) {
  if (x < y)
    x = y;
  return x;
}


x86 assembly (clang, -O0):
<blargg_max>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1122 <blargg_max+0x22>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<blargg_max>:
mov    %rdi,%rax
cmp    %rsi,%rdi
cmovl  %rsi,%rax
ret

LLVM IR (-O0):
define i64 @blargg_max(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 = icmp slt i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %4
store i64 %9, i64* %3
br label %10
10: ; preds = %8, %2
%11 = load i64, i64* %3
ret i64 %11
}

LLVM IR (-O2):
define i64 @blargg_max(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = select i1 %3, i64 %1, i64 %0
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_error();
int __VERIFIER_nondet_int();
int id(int);
int main(void) {
  int input = __VERIFIER_nondet_int();
  int result = id(input);
  if (result == 3) {
  ERROR:
    __VERIFIER_error();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1050 <id@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x3,-0xc(%rbp)
jne    116a <main+0x3a>
jmp    1163 <main+0x33>
mov    $0x0,%al
call   1040 <__VERIFIER_error@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,%edi
call   1050 <id@plt>
cmp    $0x3,%eax
jne    114b <main+0x1b>
xor    %eax,%eax
call   1040 <__VERIFIER_error@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 @id(i32 %1)
%3 = icmp eq i32 %2, 3
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 (...) @__VERIFIER_error()
br label %6
6: ; preds = %4, %0
ret i32 0
}
void bnxt_vf_reps_close(struct bnxt *bp) {}


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

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

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

LLVM IR (-O2):
%struct.bnxt = type opaque
define void @bnxt_vf_reps_close(%struct.bnxt* nocapture %0) {
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  unsigned long serial;
};
struct TYPE_4__ {
  TYPE_1__ xexpose;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xexpose_serial(void *_p, unsigned long _v) {
  ((XEvent *)_p)->xexpose.serial = (unsigned long)_v;
}


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

x86 assembly (clang, -O2):
<set_XEvent_xexpose_serial>:
mov    %rsi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define void @set_XEvent_xexpose_serial(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i64 %5, i64* %9
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xexpose_serial(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
int main(void) {
  int i;
  int t;
  switch (i) {
  case 0:
    t = 1;
    break;
  case 1:
    if (i == 1)
      t = 2;
    else
      t = 3;
    break;
  case 2:
    t = 4;
  default:
    t = 5;
    break;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
test   %eax,%eax
je     1140 <main+0x40>
jmp    111e <main+0x1e>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
je     114c <main+0x4c>
jmp    112f <main+0x2f>
mov    -0x10(%rbp),%eax
sub    $0x2,%eax
je     116e <main+0x6e>
jmp    1175 <main+0x75>
movl   $0x1,-0xc(%rbp)
jmp    117c <main+0x7c>
cmpl   $0x1,-0x8(%rbp)
jne    1162 <main+0x62>
movl   $0x2,-0xc(%rbp)
jmp    1169 <main+0x69>
movl   $0x3,-0xc(%rbp)
jmp    117c <main+0x7c>
movl   $0x4,-0xc(%rbp)
movl   $0x5,-0xc(%rbp)
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
%4 = load i32, i32* %2
switch i32 %4, label %13 [
i32 0, label %5
i32 1, label %6
i32 2, label %12
]
5: ; preds = %0
store i32 1, i32* %3
br label %14
6: ; preds = %0
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 1
br i1 %8, label %9, label %10
9: ; preds = %6
store i32 2, i32* %3
br label %11
10: ; preds = %6
store i32 3, i32* %3
br label %11
11: ; preds = %10, %9
br label %14
12: ; preds = %0
store i32 4, i32* %3
br label %13
13: ; preds = %0, %12
store i32 5, i32* %3
br label %14
14: ; preds = %13, %11, %5
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void gtk_range_set_update_policy() {}


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

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

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

LLVM IR (-O2):
define void @gtk_range_set_update_policy() {
ret void
}
int Bematech_FI_ContadoresTotalizadoresNaoFiscais(Var, Retorno) {
  return Formata("\x1b|35|24|\x1b", Var, Retorno);
}


x86 assembly (clang, -O0):
<Bematech_FI_ContadoresTotalizadoresNaoFiscais>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <Formata@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Bematech_FI_ContadoresTotalizadoresNaoFiscais>:
mov    %esi,%edx
mov    %edi,%esi
lea    0xee5(%rip),%rdi
xor    %eax,%eax
jmp    1030 <Formata@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"\1B|35|24|\1B\00"
define i32 @Bematech_FI_ContadoresTotalizadoresNaoFiscais(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 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @Formata to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
@.str = [10 x i8] c"\1B|35|24|\1B\00"
define i32 @Bematech_FI_ContadoresTotalizadoresNaoFiscais(i32 %0, i32 %1) {
%3 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @Formata to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int a, b;
  scanf("%d", &a);
  scanf("%d", &b);
  printf("%d\n", a + b);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0x8(%rsp),%esi
add    0xc(%rsp),%esi
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = add nsw i32 %8, %7
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %9)
ret i32 0
}
double test_remainder(double x, double y) { return __builtin_remainder(x, y); }


x86 assembly (clang, -O0):
<test_remainder>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <remainder@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_remainder>:
jmp    1030 <remainder@plt>

LLVM IR (-O0):
define double @test_remainder(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 = call double @remainder(double %5, double %6)
ret double %7
}

LLVM IR (-O2):
define double @test_remainder(double %0, double %1) {
%3 = tail call double @remainder(double %0, double %1)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ vrp_keep();
void f4(unsigned int s, unsigned int b) {
  s |= ~(0xffU);
  b = (b & 1) + 1;
  b = s << b;
  if (b == ~0x3ffU)
    vrp_keep();
  if (b == ~0x1U)
    vrp_keep();
}


x86 assembly (clang, -O0):
<f4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
or     $0xffffff00,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
and    $0x1,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0xfffffc00,-0x8(%rbp)
jne    1154 <f4+0x44>
mov    $0x0,%al
call   1030 <vrp_keep@plt>
cmpl   $0xfffffffe,-0x8(%rbp)
jne    1165 <f4+0x55>
mov    $0x0,%al
call   1030 <vrp_keep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4>:
or     $0xffffff00,%edi
and    $0x1,%sil
lea    0x1(%rsi),%ecx
shl    %cl,%edi
cmp    $0xfffffffe,%edi
je     112c <f4+0x1c>
cmp    $0xfffffc00,%edi
jne    1133 <f4+0x23>
xor    %eax,%eax
jmp    1030 <vrp_keep@plt>
ret

LLVM IR (-O0):
define void @f4(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 = or i32 %5, -256
store i32 %6, i32* %3
%7 = load i32, i32* %4
%8 = and i32 %7, 1
%9 = add i32 %8, 1
store i32 %9, i32* %4
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = shl i32 %10, %11
store i32 %12, i32* %4
%13 = load i32, i32* %4
%14 = icmp eq i32 %13, -1024
br i1 %14, label %15, label %17
15: ; preds = %2
%16 = call i32 (...) @vrp_keep()
br label %17
17: ; preds = %15, %2
%18 = load i32, i32* %4
%19 = icmp eq i32 %18, -2
br i1 %19, label %20, label %22
20: ; preds = %17
%21 = call i32 (...) @vrp_keep()
br label %22
22: ; preds = %20, %17
ret void
}

LLVM IR (-O2):
define void @f4(i32 %0, i32 %1) {
%3 = or i32 %0, -256
%4 = and i32 %1, 1
%5 = add nuw nsw i32 %4, 1
%6 = shl nsw i32 %3, %5
switch i32 %6, label %9 [
i32 -1024, label %7
i32 -2, label %7
]
7: ; preds = %2, %2
%8 = tail call i32 (...) @vrp_keep()
br label %9
9: ; preds = %7, %2
ret void
}
/* Variables and functions */
int O_CREAT;
int O_RDWR;
int /*<<< orphan*/ close(int);
int open(char *, int, int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  int fd = open("/tmp/tmpdir/blah", O_RDWR | O_CREAT, 0);
  if (fd != -1) {
    close(fd);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea3(%rip),%rax
mov    (%rax),%esi
mov    0x2eb2(%rip),%rax
or     (%rax),%esi
lea    0xeb1(%rip),%rdi
xor    %edx,%edx
call   1040 <open@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
je     116b <main+0x4b>
mov    -0x14(%rbp),%edi
call   1030 <close@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    0x2ec9(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
lea    0xec6(%rip),%rdi
xor    %edx,%edx
call   1040 <open@plt>
cmp    $0xffffffff,%eax
je     114d <main+0x2d>
mov    %eax,%edi
call   1030 <close@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"/tmp/tmpdir/blah\00"
@O_RDWR = global i32 0
@O_CREAT = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* @O_RDWR
%8 = load i32, i32* @O_CREAT
%9 = or i32 %7, %8
%10 = call i32 @open(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %9, i32 0)
store i32 %10, i32* %6
%11 = load i32, i32* %6
%12 = icmp ne i32 %11, -1
br i1 %12, label %13, label %16
13: ; preds = %2
%14 = load i32, i32* %6
%15 = call i32 @close(i32 %14)
br label %16
16: ; preds = %13, %2
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"/tmp/tmpdir/blah\00"
@O_RDWR = global i32 0
@O_CREAT = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @O_RDWR
%4 = load i32, i32* @O_CREAT
%5 = or i32 %4, %3
%6 = tail call i32 @open(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %5, i32 0)
%7 = icmp eq i32 %6, -1
br i1 %7, label %10, label %8
8: ; preds = %2
%9 = tail call i32 @close(i32 %6)
br label %10
10: ; preds = %8, %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void Help(char *p) {
  fprintf(stderr,
          "%s\n\t-i <interface>\n\t-s <start-ip-address>\n\t-e "
          "<end-ip-address>\n\t-m <netmask>\n\t[-h help]"
          "\n\t[-v] increase verbose level\n\t-a Add interfaces\n\t-d Delete "
          "interfaces\n\t-a and -d are mutually exclusive, defaults to 'add'\n",
          p);
  exit(-1);
}


x86 assembly (clang, -O0):
<Help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<Help>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [212 x i8] c"%s\0A\09-i <interface>\0A\09-s <start-ip-address>\0A\09-e <end-ip-address>\0A\09-m <netmask>\0A\09[-h help]\0A\09[-v] increase verbose level\0A\09-a Add interfaces\0A\09-d Delete interfaces\0A\09-a and -d are mutually exclusive, defaults to 'add'\0A\00"
define void @Help(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([212 x i8], [212 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [212 x i8] c"%s\0A\09-i <interface>\0A\09-s <start-ip-address>\0A\09-e <end-ip-address>\0A\09-m <netmask>\0A\09[-h help]\0A\09[-v] increase verbose level\0A\09-a Add interfaces\0A\09-d Delete interfaces\0A\09-a and -d are mutually exclusive, defaults to 'add'\0A\00"
define void @Help(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([212 x i8], [212 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ memset(unsigned char *, int, unsigned int);
int cust_hash(unsigned char *data_buf, unsigned int data_len,
              unsigned char *hash_buf, unsigned int hash_len) {
  memset(hash_buf, 0x00, hash_len);
  if ((20) == hash_len) {
    return -1;
  } else if ((32) == hash_len) {
    return -1;
  } else {
    return -1;
  }
}


x86 assembly (clang, -O0):
<cust_hash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    $0x14,%eax
cmp    -0x24(%rbp),%eax
jne    114e <cust_hash+0x3e>
movl   $0xffffffff,-0x4(%rbp)
jmp    116f <cust_hash+0x5f>
mov    $0x20,%eax
cmp    -0x24(%rbp),%eax
jne    1168 <cust_hash+0x58>
movl   $0xffffffff,-0x4(%rbp)
jmp    116f <cust_hash+0x5f>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cust_hash>:
push   %rax
mov    %rdx,%rdi
xor    %esi,%esi
mov    %ecx,%edx
call   1030 <memset@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @cust_hash(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32
store i8* %0, i8** %6
store i32 %1, i32* %7
store i8* %2, i8** %8
store i32 %3, i32* %9
%10 = load i8*, i8** %8
%11 = load i32, i32* %9
%12 = call i32 @memset(i8* %10, i32 0, i32 %11)
%13 = load i32, i32* %9
%14 = icmp eq i32 20, %13
br i1 %14, label %15, label %16
15: ; preds = %4
store i32 -1, i32* %5
br label %21
16: ; preds = %4
%17 = load i32, i32* %9
%18 = icmp eq i32 32, %17
br i1 %18, label %19, label %20
19: ; preds = %16
store i32 -1, i32* %5
br label %21
20: ; preds = %16
store i32 -1, i32* %5
br label %21
21: ; preds = %20, %19, %15
%22 = load i32, i32* %5
ret i32 %22
}

LLVM IR (-O2):
define i32 @cust_hash(i8* nocapture readnone %0, i32 %1, i8* %2, i32 %3) {
%5 = tail call i32 @memset(i8* %2, i32 0, i32 %3)
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isascii(int);
void t_isascii_0xff() {
  Assert_real((isascii(255) == 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_isascii.c",
              1280, ("isascii should be 0 for 0xff"));
}


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

x86 assembly (clang, -O2):
<t_isascii_0xff>:
push   %rax
mov    $0xff,%edi
call   1030 <isascii@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x500,%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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xff\00"
define void @t_isascii_0xff() {
%1 = call i64 @isascii(i32 255)
%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 1280, i8* getelementptr inbounds ([29 x i8], [29 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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xff\00"
define void @t_isascii_0xff() {
%1 = tail call i64 @isascii(i32 255)
%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 1280, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
void feupdateenv() {}


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

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

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

LLVM IR (-O2):
define void @feupdateenv() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ SYS_getpid;
int /*<<< orphan*/ syscall(int /*<<< orphan*/);
pid_t gotcha_getpid() { return syscall(SYS_getpid); }


x86 assembly (clang, -O0):
<gotcha_getpid>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
mov    (%rax),%edi
call   1030 <syscall@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gotcha_getpid>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
@SYS_getpid = global i32 0
define i32 @gotcha_getpid() {
%1 = load i32, i32* @SYS_getpid
%2 = call i32 @syscall(i32 %1)
ret i32 %2
}

LLVM IR (-O2):
@SYS_getpid = global i32 0
define i32 @gotcha_getpid() {
%1 = load i32, i32* @SYS_getpid
%2 = tail call i32 @syscall(i32 %1)
ret i32 %2
}
/* Variables and functions */
void *mxml_get_sibling(void *);
void *cfg_io_get_gpio_next_pin(void *pin) {
  void *next_pin = ((void *)0);
  if (((void *)0) != pin) {
    next_pin = mxml_get_sibling(pin);
  }
  return next_pin;
}


x86 assembly (clang, -O0):
<cfg_io_get_gpio_next_pin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
xor    %eax,%eax
cmp    -0x8(%rbp),%rax
je     113d <cfg_io_get_gpio_next_pin+0x2d>
mov    -0x8(%rbp),%rdi
call   1030 <mxml_get_sibling@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cfg_io_get_gpio_next_pin>:
test   %rdi,%rdi
je     111a <cfg_io_get_gpio_next_pin+0xa>
jmp    1030 <mxml_get_sibling@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @cfg_io_get_gpio_next_pin(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
store i8* null, i8** %3
%4 = load i8*, i8** %2
%5 = icmp ne i8* null, %4
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i8* @mxml_get_sibling(i8* %7)
store i8* %8, i8** %3
br label %9
9: ; preds = %6, %1
%10 = load i8*, i8** %3
ret i8* %10
}

LLVM IR (-O2):
define i8* @cfg_io_get_gpio_next_pin(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i8* @mxml_get_sibling(i8* %0)
br label %5
5: ; preds = %3, %1
%6 = phi i8* [ %4, %3 ], [ null, %1 ]
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ des_ecb_encrypt(void *, void *, void *, int);
void kcglue_des_ecb_encrypt(void *asrc, void *adest, void *asched,
                            int direction) {
  des_ecb_encrypt(asrc, adest, asched, direction);
}


x86 assembly (clang, -O0):
<kcglue_des_ecb_encrypt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1030 <des_ecb_encrypt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kcglue_des_ecb_encrypt>:
jmp    1030 <des_ecb_encrypt@plt>

LLVM IR (-O0):
define void @kcglue_des_ecb_encrypt(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = load i32, i32* %8
%13 = call i32 @des_ecb_encrypt(i8* %9, i8* %10, i8* %11, i32 %12)
ret void
}

LLVM IR (-O2):
define void @kcglue_des_ecb_encrypt(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = tail call i32 @des_ecb_encrypt(i8* %0, i8* %1, i8* %2, i32 %3)
ret void
}
int main() {
  char Array[20] = {"A B BB\n \t A"};
  printf("%d", palindrome(Array));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec5(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x0,%al
call   1040 <palindrome@plt>
mov    %eax,%esi
lea    0xeb2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movaps 0xed5(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x0,0x10(%rsp)
mov    %rsp,%rdi
xor    %eax,%eax
call   1040 <palindrome@plt>
lea    0xecc(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.Array = [20 x i8] c"A B BB\0A \09 A\00\00\00\00\00\00\00\00\00"
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [20 x i8]
store i32 0, i32* %1
%3 = bitcast [20 x i8]* %2 to i8*
%4 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @palindrome to i32 (i8*, ...)*)(i8* %4)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@__const.main.Array = [20 x i8] c"A B BB\0A \09 A\00\00\00\00\00\00\00\00\00"
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca [20 x i8]
%2 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @palindrome to i32 (i8*, ...)*)(i8* %2)
%4 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ drv_generic_serial_close();
int drv_D4D_close(void) {
  drv_generic_serial_close();
  return 0;
}


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

x86 assembly (clang, -O2):
<drv_D4D_close>:
push   %rax
xor    %eax,%eax
call   1030 <drv_generic_serial_close@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @drv_D4D_close() {
%1 = call i32 (...) @drv_generic_serial_close()
ret i32 0
}

LLVM IR (-O2):
define i32 @drv_D4D_close() {
%1 = tail call i32 (...) @drv_generic_serial_close()
ret i32 0
}
/* Variables and functions */
void cleanup_tests(void) {}


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

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

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

LLVM IR (-O2):
define void @cleanup_tests() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int get_second_value(int *vector) {
  printf("input vector: ");
  scanf("%d", vector);
  return (*vector);
}


x86 assembly (clang, -O0):
<get_second_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xecc(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_second_value>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xed8(%rip),%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    (%rbx),%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"input vector: \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @get_second_value(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = load i32*, i32** %2
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%6 = load i32*, i32** %2
%7 = load i32, i32* %6
ret i32 %7
}

LLVM IR (-O2):
@.str = [15 x i8] c"input vector: \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @get_second_value(i32* %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %0)
%4 = load i32, i32* %0
ret i32 %4
}
boo() {}


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

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

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

LLVM IR (-O2):
define i32 @boo() {
ret i32 undef
}
/* Variables and functions */
int ENXIO;
int arch_timer_of_register(void) { return -ENXIO; }


x86 assembly (clang, -O0):
<arch_timer_of_register>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    0x2ed3(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<arch_timer_of_register>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@ENXIO = global i32 0
define i32 @arch_timer_of_register() {
%1 = load i32, i32* @ENXIO
%2 = sub nsw i32 0, %1
ret i32 %2
}

LLVM IR (-O2):
@ENXIO = global i32 0
define i32 @arch_timer_of_register() {
%1 = load i32, i32* @ENXIO
%2 = sub nsw i32 0, %1
ret i32 %2
}