xunge/DecIR huggingface dataset:
int llib_led_utils_euclid(int a, int b) {
  if (!a)
    return b;
  while (b)
    if (a > b)
      a -= b;
    else
      b -= a;
  return a;
}


x86 assembly (clang, -O0):
<llib_led_utils_euclid>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    111f <llib_led_utils_euclid+0x1f>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1160 <llib_led_utils_euclid+0x60>
jmp    1124 <llib_led_utils_euclid+0x24>
cmpl   $0x0,-0xc(%rbp)
je     115a <llib_led_utils_euclid+0x5a>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    114a <llib_led_utils_euclid+0x4a>
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x8(%rbp)
jmp    1155 <llib_led_utils_euclid+0x55>
mov    -0x8(%rbp),%ecx
mov    -0xc(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0xc(%rbp)
jmp    1124 <llib_led_utils_euclid+0x24>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<llib_led_utils_euclid>:
test   %edi,%edi
je     1126 <llib_led_utils_euclid+0x26>
mov    %edi,%eax
test   %esi,%esi
je     1125 <llib_led_utils_euclid+0x25>
xor    %ecx,%ecx
nopl   0x0(%rax)
cmp    %eax,%esi
mov    $0x0,%edx
cmovl  %esi,%edx
mov    %eax,%edi
cmovl  %ecx,%edi
sub    %edx,%eax
sub    %edi,%esi
jne    1110 <llib_led_utils_euclid+0x10>
ret
mov    %esi,%eax
ret

LLVM IR (-O0):
define i32 @llib_led_utils_euclid(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = icmp ne i32 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %2
%9 = load i32, i32* %5
store i32 %9, i32* %3
br label %29
10: ; preds = %2
br label %11
11: ; preds = %26, %10
%12 = load i32, i32* %5
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %27
14: ; preds = %11
%15 = load i32, i32* %4
%16 = load i32, i32* %5
%17 = icmp sgt i32 %15, %16
br i1 %17, label %18, label %22
18: ; preds = %14
%19 = load i32, i32* %5
%20 = load i32, i32* %4
%21 = sub nsw i32 %20, %19
store i32 %21, i32* %4
br label %26
22: ; preds = %14
%23 = load i32, i32* %4
%24 = load i32, i32* %5
%25 = sub nsw i32 %24, %23
store i32 %25, i32* %5
br label %26
26: ; preds = %22, %18
br label %11
27: ; preds = %11
%28 = load i32, i32* %4
store i32 %28, i32* %3
br label %29
29: ; preds = %27, %8
%30 = load i32, i32* %3
ret i32 %30
}

LLVM IR (-O2):
define i32 @llib_led_utils_euclid(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %15, label %4
4: ; preds = %2
%5 = icmp eq i32 %1, 0
br i1 %5, label %15, label %6
6: ; preds = %4, %6
%7 = phi i32 [ %13, %6 ], [ %1, %4 ]
%8 = phi i32 [ %11, %6 ], [ %0, %4 ]
%9 = icmp slt i32 %7, %8
%10 = select i1 %9, i32 %7, i32 0
%11 = sub nsw i32 %8, %10
%12 = select i1 %9, i32 0, i32 %8
%13 = sub nsw i32 %7, %12
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %6
15: ; preds = %6, %4, %2
%16 = phi i32 [ %1, %2 ], [ %0, %4 ], [ %11, %6 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ io_recenter_cur_win();
void recenter_window(void) { io_recenter_cur_win(); }


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

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

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

LLVM IR (-O2):
define void @recenter_window() {
%1 = tail call i32 (...) @io_recenter_cur_win()
ret void
}
int test_nested3(int FOObar) { return FOObar; }


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

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

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

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


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xcc\00"
define void @t_ispunct_0xcc() {
%1 = call i64 @ispunct(i32 204)
%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 1025, 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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xcc\00"
define void @t_ispunct_0xcc() {
%1 = tail call i64 @ispunct(i32 204)
%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 1025, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Msp430TimerCapComP__3__Control__enableEvents();
void Msp430AlarmC__0__Msp430TimerControl__enableEvents(void) {
  Msp430TimerCapComP__3__Control__enableEvents();
}


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

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

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

LLVM IR (-O2):
define void @Msp430AlarmC__0__Msp430TimerControl__enableEvents() {
%1 = tail call i32 (...) @Msp430TimerCapComP__3__Control__enableEvents()
ret void
}
/* Type definitions */
struct libgamma_crtc_information {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct libgamma_crtc_information *);
int /*<<< orphan*/
libgamma_crtc_information_destroy(struct libgamma_crtc_information *);
__attribute__((__nonnull__)) void libgamma_crtc_information_free(
    struct libgamma_crtc_information *restrict this__) {
  libgamma_crtc_information_destroy(this__);
  free(this__);
}


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

x86 assembly (clang, -O2):
<libgamma_crtc_information_free>:
push   %rbx
mov    %rdi,%rbx
call   1040 <libgamma_crtc_information_destroy@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.libgamma_crtc_information = type { i32 }
define void @libgamma_crtc_information_free(%struct.libgamma_crtc_information* noalias %0) {
%2 = alloca %struct.libgamma_crtc_information*
store %struct.libgamma_crtc_information* %0, %struct.libgamma_crtc_information** %2
%3 = load %struct.libgamma_crtc_information*, %struct.libgamma_crtc_information** %2
%4 = call i32 @libgamma_crtc_information_destroy(%struct.libgamma_crtc_information* %3)
%5 = load %struct.libgamma_crtc_information*, %struct.libgamma_crtc_information** %2
%6 = call i32 @free(%struct.libgamma_crtc_information* %5)
ret void
}

LLVM IR (-O2):
%struct.libgamma_crtc_information = type { i32 }
define void @libgamma_crtc_information_free(%struct.libgamma_crtc_information* noalias %0) {
%2 = tail call i32 @libgamma_crtc_information_destroy(%struct.libgamma_crtc_information* %0)
%3 = tail call i32 @free(%struct.libgamma_crtc_information* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ intr_reset();
void evt_cleanup(void) { intr_reset(); }


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

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

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

LLVM IR (-O2):
define void @evt_cleanup() {
%1 = tail call i32 (...) @intr_reset()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int main() {
  for (; 0;) {
    abort();
  label:
    return 0;
  }
  goto label;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
test   $0x1,%al
jne    112e <main+0x1e>
jmp    113d <main+0x2d>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret
jmp    1135 <main+0x25>

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0
br i1 false, label %3, label %6
3: ; preds = %2
%4 = call i32 (...) @abort()
unreachable
5: ; preds = %6
ret i32 0
6: ; preds = %2
br label %5
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, int,
                           char const *, char const *);
int /*<<< orphan*/ stderr;
void util_warn_(const char *file, int line, const char *func, const char *msg) {
  fprintf(stderr, "%s, %i (%s):\n%s\n", file, line, func, msg);
}


x86 assembly (clang, -O0):
<util_warn_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%r8
mov    -0x20(%rbp),%r9
lea    0xeba(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<util_warn_>:
mov    %rcx,%r9
mov    %rdx,%r8
mov    %esi,%ecx
mov    %rdi,%rdx
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
lea    0xed5(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [17 x i8] c"%s, %i (%s):\0A%s\0A\00"
define void @util_warn_(i8* %0, i32 %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %5
%11 = load i32, i32* %6
%12 = load i8*, i8** %7
%13 = load i8*, i8** %8
%14 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %10, i32 %11, i8* %12, i8* %13)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [17 x i8] c"%s, %i (%s):\0A%s\0A\00"
define void @util_warn_(i8* %0, i32 %1, i8* %2, i8* %3) {
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1, i8* %2, i8* %3)
ret void
}
void print(const char *format, ...) { return; }


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

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

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

LLVM IR (-O2):
define void @print(i8* nocapture %0, ...) {
ret void
}
int neg(int x, int y, int z) { return -x; }


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

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

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

LLVM IR (-O2):
define i32 @neg(i32 %0, i32 %1, i32 %2) {
%4 = sub nsw i32 0, %0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ key(unsigned char, int /*<<< orphan*/, int /*<<< orphan*/);
void domenu(int value) { key((unsigned char)value, 0, 0); }


x86 assembly (clang, -O0):
<domenu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    %edx,%edx
movzbl %al,%edi
mov    %edx,%esi
call   1030 <key@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<domenu>:
movzbl %dil,%edi
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <key@plt>

LLVM IR (-O0):
define void @domenu(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = trunc i32 %3 to i8
%5 = call i32 @key(i8 zeroext %4, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @domenu(i32 %0) {
%2 = trunc i32 %0 to i8
%3 = tail call i32 @key(i8 zeroext %2, i32 0, i32 0)
ret void
}
void d2i_X509_SIG(void) {}


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

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

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

LLVM IR (-O2):
define void @d2i_X509_SIG() {
ret void
}
/* Variables and functions */
int close(int);
int mongo_close_socket(int socket) { return close(socket); }


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

x86 assembly (clang, -O2):
<mongo_close_socket>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define i32 @mongo_close_socket(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 %2
}
/* Variables and functions */
char *rfc1738_do_escape(char const *, int);
char *rfc1738_escape_part(const char *url) { return rfc1738_do_escape(url, 1); }


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

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

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

LLVM IR (-O2):
define i8* @rfc1738_escape_part(i8* %0) {
%2 = tail call i8* @rfc1738_do_escape(i8* %0, i32 1)
ret i8* %2
}
int BitSize(int n) {
  register i;
  for (i = 1; i <= 8; i++)
    if ((1 << i) >= n)
      break;
  return (i);
}


x86 assembly (clang, -O0):
<BitSize>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jg     1143 <BitSize+0x43>
mov    -0x8(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
cmp    -0x4(%rbp),%eax
jl     1130 <BitSize+0x30>
jmp    1143 <BitSize+0x43>
jmp    1135 <BitSize+0x35>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <BitSize+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<BitSize>:
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%ecx
mov    $0x1,%eax
shl    %cl,%eax
cmp    $0x8,%ecx
ja     1123 <BitSize+0x23>
cmp    %edi,%eax
jl     1110 <BitSize+0x10>
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @BitSize(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 1, i32* %3
br label %4
4: ; preds = %14, %1
%5 = load i32, i32* %3
%6 = icmp sle i32 %5, 8
br i1 %6, label %7, label %17
7: ; preds = %4
%8 = load i32, i32* %3
%9 = shl i32 1, %8
%10 = load i32, i32* %2
%11 = icmp sge i32 %9, %10
br i1 %11, label %12, label %13
12: ; preds = %7
br label %17
13: ; preds = %7
br label %14
14: ; preds = %13
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
store i32 %16, i32* %3
br label %4
17: ; preds = %12, %4
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @BitSize(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 1, %1 ], [ %8, %2 ]
%4 = icmp ult i32 %3, 9
%5 = shl nuw nsw i32 1, %3
%6 = icmp slt i32 %5, %0
%7 = select i1 %4, i1 %6, i1 false
%8 = add nuw nsw i32 %3, 1
br i1 %7, label %2, label %9
9: ; preds = %2
ret i32 %3
}
void rcu_irq_exit_irqson(void) {}


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

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

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

LLVM IR (-O2):
define void @rcu_irq_exit_irqson() {
ret void
}
void os_net_init(void) {}


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

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

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

LLVM IR (-O2):
define void @os_net_init() {
ret void
}
/* Variables and functions */
int f377(int *);
int f378(int *p) { return f377(p); }


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

x86 assembly (clang, -O2):
<f378>:
jmp    1030 <f377@plt>

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

LLVM IR (-O2):
define i32 @f378(i32* %0) {
%2 = tail call i32 @f377(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ term_init();
void kernel_main() { term_init(); }


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

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

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

LLVM IR (-O2):
define void @kernel_main() {
%1 = tail call i32 (...) @term_init()
ret void
}
void _papi_hwd_unlock(void) {}


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

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

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

LLVM IR (-O2):
define void @_papi_hwd_unlock() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void sigquit(int sig) {
  fprintf(stderr, "W:\t%s\n", "trapped SIGQUIT and exit abnormally");
  exit(3);
}


x86 assembly (clang, -O0):
<sigquit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
lea    0xec5(%rip),%rdx
call   1030 <fprintf@plt>
mov    $0x3,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<sigquit>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
lea    0xecf(%rip),%rdx
call   1030 <fprintf@plt>
mov    $0x3,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [7 x i8] c"W:\09%s\0A\00"
@.str.1 = [36 x i8] c"trapped SIGQUIT and exit abnormally\00"
define void @sigquit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @exit(i32 3)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [7 x i8] c"W:\09%s\0A\00"
@.str.1 = [36 x i8] c"trapped SIGQUIT and exit abnormally\00"
define void @sigquit(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @exit(i32 3)
unreachable
}
unsigned short _le2(unsigned short i) {
  static short d = 0x1122;
  return *((char *)&d) == 0x22 ? i : (i << 8 & 0xff00) | (i >> 8 & 0x00ff);
}


x86 assembly (clang, -O0):
<_le2>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movsbl 0x2f0e(%rip),%eax
cmp    $0x22,%eax
jne    1127 <_le2+0x27>
movzwl -0x2(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1145 <_le2+0x45>
movzwl -0x2(%rbp),%eax
shl    $0x8,%eax
and    $0xff00,%eax
movzwl -0x2(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff,%ecx
or     %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movzwl %ax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@_le2.d = internal global i16 4386
define zeroext i16 @_le2(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i8, i8* bitcast (i16* @_le2.d to i8*)
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 34
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i16, i16* %2
%8 = zext i16 %7 to i32
br label %19
9: ; preds = %1
%10 = load i16, i16* %2
%11 = zext i16 %10 to i32
%12 = shl i32 %11, 8
%13 = and i32 %12, 65280
%14 = load i16, i16* %2
%15 = zext i16 %14 to i32
%16 = ashr i32 %15, 8
%17 = and i32 %16, 255
%18 = or i32 %13, %17
br label %19
19: ; preds = %9, %6
%20 = phi i32 [ %8, %6 ], [ %18, %9 ]
%21 = trunc i32 %20 to i16
ret i16 %21
}

LLVM IR (-O2):
define zeroext i16 @_le2(i16 returned zeroext %0) {
ret i16 %0
}
/* Variables and functions */
bool nrf52_errata_11(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf52_errata_11() {
ret i32 0
}
int test_imm_2Dint8_reg(signed char val) {
  return ((val) & (0x2D << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_2Dint8_reg(i8 signext %0) {
%2 = and i8 %0, 45
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
scalar_t__ errno;
int /*<<< orphan*/ getlogin_r(char *, size_t);
void c_getlogin_(char *name, int maxlen) {
  getlogin_r(name, (size_t)maxlen);
  errno = 0;
}


x86 assembly (clang, -O0):
<c_getlogin_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rsi
call   1030 <getlogin_r@plt>
mov    0x2ead(%rip),%rax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_getlogin_>:
push   %rax
movslq %esi,%rsi
call   1030 <getlogin_r@plt>
mov    0x2ec0(%rip),%rax
movq   $0x0,(%rax)
pop    %rax
ret

LLVM IR (-O0):
@errno = global i64 0
define void @c_getlogin_(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = sext i32 %6 to i64
%8 = call i32 @getlogin_r(i8* %5, i64 %7)
store i64 0, i64* @errno
ret void
}

LLVM IR (-O2):
@errno = global i64 0
define void @c_getlogin_(i8* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = tail call i32 @getlogin_r(i8* %0, i64 %3)
store i64 0, i64* @errno
ret void
}
void mymseq(num) int num;
{
  prtime();
  printf("SeqNr %d\n", num);
}


x86 assembly (clang, -O0):
<mymseq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <prtime@plt>
mov    -0x4(%rbp),%esi
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mymseq>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <prtime@plt>
lea    0xecf(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"SeqNr %d\0A\00"
define void @mymseq(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @prtime()
%4 = load i32, i32* %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %4)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"SeqNr %d\0A\00"
define void @mymseq(i32 %0) {
%2 = tail call i32 (...) @prtime()
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ get_localtime_str(char *, size_t, char *);
void get_localtime_stamp(char *cur_time_str, size_t cur_time_str_len) {
  get_localtime_str(cur_time_str, cur_time_str_len, "%Y-%m-%d %H:%M:%S");
}


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

x86 assembly (clang, -O2):
<get_localtime_stamp>:
lea    0xee9(%rip),%rdx
jmp    1030 <get_localtime_str@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"%Y-%m-%d %H:%M:%S\00"
define void @get_localtime_stamp(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 = call i32 @get_localtime_str(i8* %5, i64 %6, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"%Y-%m-%d %H:%M:%S\00"
define void @get_localtime_stamp(i8* %0, i64 %1) {
%3 = tail call i32 @get_localtime_str(i8* %0, i64 %1, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret void
}
void g_unichar_islower() {}


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

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

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

LLVM IR (-O2):
define void @g_unichar_islower() {
ret void
}
void initsigs() {}


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

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

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

LLVM IR (-O2):
define void @initsigs() {
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void QEIVelocityEnable(uint32_t ui32Base) {
  ;
  (*((volatile uint32_t *)(ui32Base + 0x00000000))) |= 0x00000020;
}


x86 assembly (clang, -O0):
<QEIVelocityEnable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x0,%eax
cltq
mov    (%rax),%ecx
or     $0x20,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<QEIVelocityEnable>:
movslq %edi,%rax
orl    $0x20,(%rax)
ret

LLVM IR (-O0):
define void @QEIVelocityEnable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 0
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
%8 = or i32 %7, 32
store volatile i32 %8, i32* %6
ret void
}

LLVM IR (-O2):
define void @QEIVelocityEnable(i32 %0) {
%2 = sext i32 %0 to i64
%3 = inttoptr i64 %2 to i32*
%4 = load volatile i32, i32* %3
%5 = or i32 %4, 32
store volatile i32 %5, i32* %3
ret void
}
void yy_5_InternalLinkAutoCorrect(char *yytext, int yyleng) {
  ;
  ;
}


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

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

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

LLVM IR (-O2):
define void @yy_5_InternalLinkAutoCorrect(i8* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
scalar_t__ VIM_USER_MallocMemory(unsigned long);
void *Avi_Malloc(unsigned long nbyte) {
  void *mem;
  mem = (void *)VIM_USER_MallocMemory(nbyte);
  return mem;
}


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

x86 assembly (clang, -O2):
<Avi_Malloc>:
jmp    1030 <VIM_USER_MallocMemory@plt>

LLVM IR (-O0):
define i8* @Avi_Malloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i64 @VIM_USER_MallocMemory(i64 %4)
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %3
%7 = load i8*, i8** %3
ret i8* %7
}

LLVM IR (-O2):
define i8* @Avi_Malloc(i64 %0) {
%2 = tail call i64 @VIM_USER_MallocMemory(i64 %0)
%3 = inttoptr i64 %2 to i8*
ret i8* %3
}
/* Variables and functions */
double gsl_ran_dirichlet_pdf(long, double *, double *);
double pdf_Dirichlet(long n, double *a, double *x) {
  return gsl_ran_dirichlet_pdf(n, a, x);
}


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

x86 assembly (clang, -O2):
<pdf_Dirichlet>:
jmp    1030 <gsl_ran_dirichlet_pdf@plt>

LLVM IR (-O0):
define double @pdf_Dirichlet(i64 %0, double* %1, double* %2) {
%4 = alloca i64
%5 = alloca double*
%6 = alloca double*
store i64 %0, i64* %4
store double* %1, double** %5
store double* %2, double** %6
%7 = load i64, i64* %4
%8 = load double*, double** %5
%9 = load double*, double** %6
%10 = call double @gsl_ran_dirichlet_pdf(i64 %7, double* %8, double* %9)
ret double %10
}

LLVM IR (-O2):
define double @pdf_Dirichlet(i64 %0, double* %1, double* %2) {
%4 = tail call double @gsl_ran_dirichlet_pdf(i64 %0, double* %1, double* %2)
ret double %4
}
int test_imm_03int32_reg(int val) { return ((val) & (0x03 << 0)) ? -20 : -40; }


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

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

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

LLVM IR (-O2):
define i32 @test_imm_03int32_reg(i32 %0) {
%2 = and i32 %0, 3
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
scalar_t__ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int strlen(char *);
void fgets_null_check_Good() {
  char line[100];
  while (fgets(line, 100, stdin)) {
    line[strlen(line) - 1] = 0;
  }
}


x86 assembly (clang, -O0):
<fgets_null_check_Good>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
lea    -0x70(%rbp),%rdi
mov    0x2eb5(%rip),%rax
mov    (%rax),%edx
mov    $0x64,%esi
call   1040 <fgets@plt>
cmp    $0x0,%rax
je     1161 <fgets_null_check_Good+0x41>
lea    -0x70(%rbp),%rdi
call   1030 <strlen@plt>
sub    $0x1,%eax
cltq
movb   $0x0,-0x70(%rbp,%rax,1)
jmp    1128 <fgets_null_check_Good+0x8>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fgets_null_check_Good>:
push   %r14
push   %rbx
sub    $0x68,%rsp
mov    0x2eba(%rip),%r14
mov    (%r14),%edx
mov    %rsp,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
mov    $0x64,%esi
call   1040 <fgets@plt>
test   %rax,%rax
je     1166 <fgets_null_check_Good+0x46>
mov    %rbx,%rdi
call   1030 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%rbx,1)
mov    (%r14),%edx
jmp    1140 <fgets_null_check_Good+0x20>
add    $0x68,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stdin = global i32 0
define void @fgets_null_check_Good() {
%1 = alloca [100 x i8]
br label %2
2: ; preds = %7, %0
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%4 = load i32, i32* @stdin
%5 = call i64 @fgets(i8* %3, i32 100, i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %2
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%9 = call i32 @strlen(i8* %8)
%10 = sub nsw i32 %9, 1
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %11
store i8 0, i8* %12
br label %2
13: ; preds = %2
ret void
}

LLVM IR (-O2):
@stdin = global i32 0
define void @fgets_null_check_Good() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stdin
%4 = call i64 @fgets(i8* %2, i32 100, i32 %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %14, label %6
6: ; preds = %0, %6
%7 = call i32 @strlen(i8* %2)
%8 = add nsw i32 %7, -1
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %9
store i8 0, i8* %10
%11 = load i32, i32* @stdin
%12 = call i64 @fgets(i8* %2, i32 100, i32 %11)
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %6
14: ; preds = %6, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _SC_NPROCESSORS_ONLN;
unsigned int sysconf(int /*<<< orphan*/);
unsigned int T3D_GetNumberOfCPUs(void) { return sysconf(_SC_NPROCESSORS_ONLN); }


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

x86 assembly (clang, -O2):
<T3D_GetNumberOfCPUs>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <sysconf@plt>

LLVM IR (-O0):
@_SC_NPROCESSORS_ONLN = global i32 0
define i32 @T3D_GetNumberOfCPUs() {
%1 = load i32, i32* @_SC_NPROCESSORS_ONLN
%2 = call i32 @sysconf(i32 %1)
ret i32 %2
}

LLVM IR (-O2):
@_SC_NPROCESSORS_ONLN = global i32 0
define i32 @T3D_GetNumberOfCPUs() {
%1 = load i32, i32* @_SC_NPROCESSORS_ONLN
%2 = tail call i32 @sysconf(i32 %1)
ret i32 %2
}
__attribute__((always_)) int nohz_ratelimit(int cpu) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @nohz_ratelimit(i32 %0) {
ret i32 0
}
void halt(void) {
  *((volatile unsigned char *)(((signed int)0x80000000) + 0x10000000 +
                               0x0010)) = 0;
}


x86 assembly (clang, -O0):
<halt>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffffffff90000010,%rax
movb   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<halt>:
movb   $0x0,0xffffffff90000010
ret

LLVM IR (-O0):
define void @halt() {
store volatile i8 0, i8* inttoptr (i64 -1879048176 to i8*)
ret void
}

LLVM IR (-O2):
define void @halt() {
store volatile i8 0, i8* inttoptr (i64 -1879048176 to i8*)
ret void
}
/* Variables and functions */
int __sys_read(int, char *, int);
int read(int file, char *ptr, int len) { return __sys_read(file, ptr, len); }


x86 assembly (clang, -O0):
<read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <__sys_read@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read>:
jmp    1030 <__sys_read@plt>

LLVM IR (-O0):
define i32 @read(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @__sys_read(i32 %7, i8* %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @read(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @__sys_read(i32 %0, i8* %1, i32 %2)
ret i32 %4
}
void free_array(char **din_array) {
  char **tmp;
  for (tmp = din_array; din_array; din_array++)
    free(*din_array);
  free(tmp);
}


x86 assembly (clang, -O0):
<free_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     114c <free_array+0x3c>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x8(%rbp)
jmp    1124 <free_array+0x14>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_array>:
push   %rbx
mov    %rdi,%rbx
test   %rdi,%rdi
je     112e <free_array+0x1e>
nopl   0x0(%rax)
mov    (%rbx),%rdi
call   1030 <free@plt>
add    $0x8,%rbx
jmp    1120 <free_array+0x10>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @free_array(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %7, label %3
3: ; preds = %1, %3
%4 = phi i8** [ %6, %3 ], [ %0, %1 ]
%5 = load i8*, i8** %4
tail call void @free(i8* %5)
%6 = getelementptr inbounds i8*, i8** %4, i64 1
br label %3
7: ; preds = %1
%8 = bitcast i8** %0 to i8*
tail call void @free(i8* %8)
ret void
}
/* Variables and functions */
int SEGGER_RTT_Write(unsigned int, char const *, unsigned int);
unsigned int strlen(char const *);
unsigned SEGGER_RTT_WriteString(unsigned BufferIndex, const char *s) {
  unsigned Len;
  Len = strlen((s));
  return SEGGER_RTT_Write(BufferIndex, s, Len);
}


x86 assembly (clang, -O0):
<SEGGER_RTT_WriteString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <SEGGER_RTT_Write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SEGGER_RTT_WriteString>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <SEGGER_RTT_Write@plt>

LLVM IR (-O0):
define i32 @SEGGER_RTT_WriteString(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call i32 @strlen(i8* %6)
store i32 %7, i32* %5
%8 = load i32, i32* %3
%9 = load i8*, i8** %4
%10 = load i32, i32* %5
%11 = call i32 @SEGGER_RTT_Write(i32 %8, i8* %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @SEGGER_RTT_WriteString(i32 %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @SEGGER_RTT_Write(i32 %0, i8* %1, i32 %3)
ret i32 %4
}
int x37_process_syn(struct mypacket *packet) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.mypacket = type opaque
define i32 @x37_process_syn(%struct.mypacket* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
double sin(double);
double sin_dec(double dec_sun) { return sin(dec_sun); }


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

x86 assembly (clang, -O2):
<sin_dec>:
jmp    1030 <sin@plt>

LLVM IR (-O0):
define double @sin_dec(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @sin(double %3)
ret double %4
}

LLVM IR (-O2):
define double @sin_dec(double %0) {
%2 = tail call double @sin(double %0)
ret double %2
}
extern int Argless() { return 2; }


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

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

LLVM IR (-O0):
define i32 @Argless() {
ret i32 2
}

LLVM IR (-O2):
define i32 @Argless() {
ret i32 2
}
int simulated_robot(void) { return (1); }


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

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

LLVM IR (-O0):
define i32 @simulated_robot() {
ret i32 1
}

LLVM IR (-O2):
define i32 @simulated_robot() {
ret i32 1
}
/* Variables and functions */
scalar_t__ coordinatesOutOfBounds(int, int);
int getAbsoluteX(int);
int getAbsoluteY(int);
int /*<<< orphan*/ printf(char *, int, int, char);
void printCharXY(char c, int x, int y) {
  if (coordinatesOutOfBounds(x, y))
    return;
  printf("\033[%d;%dH%c", getAbsoluteY(y), getAbsoluteX(x), c);
}


x86 assembly (clang, -O0):
<printCharXY>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1050 <coordinatesOutOfBounds@plt>
cmp    $0x0,%rax
je     116e <printCharXY+0x2e>
jmp    1196 <printCharXY+0x56>
mov    -0xc(%rbp),%edi
call   1040 <getAbsoluteY@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
call   1060 <getAbsoluteX@plt>
mov    -0x10(%rbp),%esi
mov    %eax,%edx
lea    0xe73(%rip),%rdi
movsbl -0x1(%rbp),%ecx
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printCharXY>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %esi,%ebp
mov    %edi,%r14d
mov    %esi,%edi
mov    %edx,%esi
call   1050 <coordinatesOutOfBounds@plt>
test   %rax,%rax
je     115e <printCharXY+0x1e>
pop    %rbx
pop    %r14
pop    %rbp
ret
mov    %ebx,%edi
call   1040 <getAbsoluteY@plt>
mov    %eax,%ebx
mov    %ebp,%edi
call   1060 <getAbsoluteX@plt>
movsbl %r14b,%ecx
lea    0xe87(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"\1B[%d;%dH%c\00"
define void @printCharXY(i8 signext %0, i32 %1, i32 %2) {
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
store i8 %0, i8* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %5
%8 = load i32, i32* %6
%9 = call i64 @coordinatesOutOfBounds(i32 %7, i32 %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %3
br label %19
12: ; preds = %3
%13 = load i32, i32* %6
%14 = call i32 @getAbsoluteY(i32 %13)
%15 = load i32, i32* %5
%16 = call i32 @getAbsoluteX(i32 %15)
%17 = load i8, i8* %4
%18 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %14, i32 %16, i8 signext %17)
br label %19
19: ; preds = %12, %11
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"\1B[%d;%dH%c\00"
define void @printCharXY(i8 signext %0, i32 %1, i32 %2) {
%4 = tail call i64 @coordinatesOutOfBounds(i32 %1, i32 %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = tail call i32 @getAbsoluteY(i32 %2)
%8 = tail call i32 @getAbsoluteX(i32 %1)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8, i8 signext %0)
br label %10
10: ; preds = %3, %6
ret void
}
int greater_than_zero(int number) {
  if (number < 0) {
    return 0;
  } else {
    return 1;
  }
}


x86 assembly (clang, -O0):
<greater_than_zero>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    111d <greater_than_zero+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    1124 <greater_than_zero+0x24>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<greater_than_zero>:
mov    %edi,%eax
not    %eax
shr    $0x1f,%eax
ret

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

LLVM IR (-O2):
define i32 @greater_than_zero(i32 %0) {
%2 = xor i32 %0, -1
%3 = lshr i32 %2, 31
ret i32 %3
}
void SystemInit() {}


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

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

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

LLVM IR (-O2):
define void @SystemInit() {
ret void
}
/* Variables and functions */
char const *dlopen_pong();
const char *dlopen_ping(void) { return dlopen_pong(); }


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

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

LLVM IR (-O0):
define i8* @dlopen_ping() {
%1 = call i8* (...) @dlopen_pong()
ret i8* %1
}

LLVM IR (-O2):
define i8* @dlopen_ping() {
%1 = tail call i8* (...) @dlopen_pong()
ret i8* %1
}
void foo_2_2_1_2_1_2_2_2_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_2_1_2_1_2_2_2_2() {
ret void
}
unsigned sum(unsigned a, unsigned b, unsigned c, unsigned d, unsigned e) {
  return a + b + c + d + e;
}


x86 assembly (clang, -O0):
<sum>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sum>:
lea    (%rdi,%rsi,1),%eax
add    %edx,%eax
add    %ecx,%eax
add    %r8d,%eax
ret

LLVM IR (-O0):
define i32 @sum(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = add i32 %11, %12
%14 = load i32, i32* %8
%15 = add i32 %13, %14
%16 = load i32, i32* %9
%17 = add i32 %15, %16
%18 = load i32, i32* %10
%19 = add i32 %17, %18
ret i32 %19
}

LLVM IR (-O2):
define i32 @sum(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = add i32 %1, %0
%7 = add i32 %6, %2
%8 = add i32 %7, %3
%9 = add i32 %8, %4
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ bit_hl(int);
void opcb_4e() { bit_hl(1); }


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

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

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

LLVM IR (-O2):
define void @opcb_4e() {
%1 = tail call i32 @bit_hl(i32 1)
ret void
}