xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ output_line(char *);
void gen_ret(void) { output_line("rts"); }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"rts\00"
define void @gen_ret() {
%1 = call i32 @output_line(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"rts\00"
define void @gen_ret() {
%1 = tail call i32 @output_line(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int fputc(int, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int stub1(int, int /*<<< orphan*/);
int putchar(int c) { return (*fputc)(c, stdout); }


x86 assembly (clang, -O0):
<putchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ebb(%rip),%rax
mov    (%rax),%esi
call   1030 <fputc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putchar>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
jmp    1030 <fputc@plt>

LLVM IR (-O0):
@stdout = global i32 0
define i32 @putchar(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @stdout
%5 = call i32 @fputc(i32 %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
@stdout = global i32 0
define i32 @putchar(i32 %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fputc(i32 %0, i32 %2)
ret i32 %3
}
void curs_echo(void) {}


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

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

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

LLVM IR (-O2):
define void @curs_echo() {
ret void
}
unsigned char mult(unsigned char x, unsigned char pol) { return x * pol; }


x86 assembly (clang, -O0):
<mult>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
movzbl -0x2(%rbp),%ecx
imul   %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mult>:
mov    %esi,%eax
mul    %dil
ret

LLVM IR (-O0):
define zeroext i8 @mult(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = load i8, i8* %4
%8 = zext i8 %7 to i32
%9 = mul nsw i32 %6, %8
%10 = trunc i32 %9 to i8
ret i8 %10
}

LLVM IR (-O2):
define zeroext i8 @mult(i8 zeroext %0, i8 zeroext %1) {
%3 = mul i8 %1, %0
ret i8 %3
}
/* Variables and functions */
int /*<<< orphan*/ show_textbox(char const *, char const *, int /*<<< orphan*/,
                                int /*<<< orphan*/);
void show_helptext(const char *title, const char *text) {
  show_textbox(title, text, 0, 0);
}


x86 assembly (clang, -O0):
<show_helptext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1030 <show_textbox@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_helptext>:
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <show_textbox@plt>

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

LLVM IR (-O2):
define void @show_helptext(i8* %0, i8* %1) {
%3 = tail call i32 @show_textbox(i8* %0, i8* %1, i32 0, i32 0)
ret void
}
void fd163(int n) {
P0A:
  goto P0A;
  {
    typedef int(*b)[n];
  P01A:
    goto P01A;
    {
      typedef int(*c)[n];
    P012A:
      goto P012A;
      0;
    }
  P01B:
    goto P01B;
    {
      typedef int(*d)[n];
    P013A:
      goto P013A;
      0;
    }
  P01C:
    goto P01C;
    ;
    typedef int(*e)[n];
  P014A:
    goto P014A;
    0;
  };
P0B:
  goto P0B;
  {
    typedef int(*f)[n];
  P02A:
    goto P02A;
    {
      typedef int(*g)[n];
    p024A:
      goto p024A;
      goto a;
    P024A:
      goto P024A;
      0;
    };
  a : {
    typedef int(*h)[n];
  P025A:
    goto P025A;
    0;
  };
  P02C:
    goto P02C;
    ;
    typedef int(*i)[n];
  P026A:
    goto P026A;
    0;
  };
P0C:
  goto P0C;
  ;
  typedef int(*j)[n];
P03A:
  goto P03A;
  0;
P03B:
  goto P03B;
}


x86 assembly (clang, -O0):
<fd163>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fd163+0x7>

x86 assembly (clang, -O2):
<fd163>:
jmp    1100 <fd163>

LLVM IR (-O0):
define void @fd163(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %3, %1
br label %3
4: ; No predecessors!
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
br label %7
7: ; preds = %7, %4
br label %7
8: ; No predecessors!
%9 = load i32, i32* %2
%10 = zext i32 %9 to i64
br label %11
11: ; preds = %11, %8
br label %11
12: ; preds = %12
br label %12
13: ; No predecessors!
%14 = load i32, i32* %2
%15 = zext i32 %14 to i64
br label %16
16: ; preds = %16, %13
br label %16
17: ; preds = %17
br label %17
18: ; No predecessors!
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
br label %21
21: ; preds = %21, %18
br label %21
22: ; preds = %22
br label %22
23: ; No predecessors!
%24 = load i32, i32* %2
%25 = zext i32 %24 to i64
br label %26
26: ; preds = %26, %23
br label %26
27: ; No predecessors!
%28 = load i32, i32* %2
%29 = zext i32 %28 to i64
br label %30
30: ; preds = %30, %27
br label %30
31: ; preds = %31
br label %31
32: ; No predecessors!
%33 = load i32, i32* %2
%34 = zext i32 %33 to i64
br label %35
35: ; preds = %35, %32
br label %35
36: ; preds = %36
br label %36
37: ; No predecessors!
%38 = load i32, i32* %2
%39 = zext i32 %38 to i64
br label %40
40: ; preds = %40, %37
br label %40
41: ; preds = %41
br label %41
42: ; No predecessors!
%43 = load i32, i32* %2
%44 = zext i32 %43 to i64
br label %45
45: ; preds = %45, %42
br label %45
46: ; preds = %46
br label %46
}

LLVM IR (-O2):
define void @fd163(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ boki(int);
int /*<<< orphan*/ podstawa(int);
void prostokat(int szerokosc, int wysokosc) {
  podstawa(szerokosc);
  boki(wysokosc - 2);
  podstawa(szerokosc);
}


x86 assembly (clang, -O0):
<prostokat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <podstawa@plt>
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <boki@plt>
mov    -0x4(%rbp),%edi
call   1040 <podstawa@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prostokat>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1040 <podstawa@plt>
add    $0xfffffffe,%ebx
mov    %ebx,%edi
call   1030 <boki@plt>
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <podstawa@plt>

LLVM IR (-O0):
define void @prostokat(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 = call i32 @podstawa(i32 %5)
%7 = load i32, i32* %4
%8 = sub nsw i32 %7, 2
%9 = call i32 @boki(i32 %8)
%10 = load i32, i32* %3
%11 = call i32 @podstawa(i32 %10)
ret void
}

LLVM IR (-O2):
define void @prostokat(i32 %0, i32 %1) {
%3 = tail call i32 @podstawa(i32 %0)
%4 = add nsw i32 %1, -2
%5 = tail call i32 @boki(i32 %4)
%6 = tail call i32 @podstawa(i32 %0)
ret void
}
void foo250() {}


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

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

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

LLVM IR (-O2):
define void @foo250() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep(int);
int main(int argc, char **argv) {
  for (;;) {
    sleep(1);
    printf("a syscall is required\n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%edi
call   1040 <sleep@plt>
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
jmp    1136 <main+0x16>

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    $0x1,%edi
call   1040 <sleep@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
jmp    1130 <main+0x10>

LLVM IR (-O0):
@.str = [23 x i8] c"a syscall is required\0A\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
br label %6
6: ; preds = %6, %2
%7 = call i32 @sleep(i32 1)
%8 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
br label %6
}

LLVM IR (-O2):
@str = [22 x i8] c"a syscall is required\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %3, %2
%4 = tail call i32 @sleep(i32 1)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
br label %3
}
/* Variables and functions */
int digitalRead(int);
bool pcd8544_backlight_state(void) { return digitalRead(48); }


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

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

LLVM IR (-O0):
define i32 @pcd8544_backlight_state() {
%1 = call i32 @digitalRead(i32 48)
ret i32 %1
}

LLVM IR (-O2):
define i32 @pcd8544_backlight_state() {
%1 = tail call i32 @digitalRead(i32 48)
ret i32 %1
}
int cairo_code_draw_casFLabel_get_height() { return 10; }


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

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

LLVM IR (-O0):
define i32 @cairo_code_draw_casFLabel_get_height() {
ret i32 10
}

LLVM IR (-O2):
define i32 @cairo_code_draw_casFLabel_get_height() {
ret i32 10
}
main() { return __alignof(char *) + _Alignof(int) + __alignof__ 5 * 2; }


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 20
}
/* Variables and functions */
int get32();
int psd_test(void) {
  if (get32() != 0x38425053)
    return 0;
  else
    return 1;
}


x86 assembly (clang, -O0):
<psd_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <get32@plt>
cmp    $0x38425053,%eax
je     1136 <psd_test+0x26>
movl   $0x0,-0x4(%rbp)
jmp    113d <psd_test+0x2d>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<psd_test>:
push   %rax
xor    %eax,%eax
call   1030 <get32@plt>
xor    %ecx,%ecx
cmp    $0x38425053,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @psd_test() {
%1 = alloca i32
%2 = call i32 (...) @get32()
%3 = icmp ne i32 %2, 943870035
br i1 %3, label %4, label %5
4: ; preds = %0
store i32 0, i32* %1
br label %6
5: ; preds = %0
store i32 1, i32* %1
br label %6
6: ; preds = %5, %4
%7 = load i32, i32* %1
ret i32 %7
}

LLVM IR (-O2):
define i32 @psd_test() {
%1 = tail call i32 (...) @get32()
%2 = icmp eq i32 %1, 943870035
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
char bg(char);
int strlen(char *);
char *sbg(char *str) {
  int len = strlen(str);
  for (int i = 0; i < len; i++)
    str[i] = bg(str[i]);
  return str;
}


x86 assembly (clang, -O0):
<sbg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1177 <sbg+0x57>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <bg@plt>
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    113f <sbg+0x1f>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sbg>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
call   1040 <strlen@plt>
test   %eax,%eax
jle    1157 <sbg+0x37>
mov    %eax,%r14d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
movsbl (%r15,%rbx,1),%edi
call   1030 <bg@plt>
mov    %al,(%r15,%rbx,1)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1140 <sbg+0x20>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @sbg(i8* returned %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = zext i32 %2 to i64
br label %7
6: ; preds = %7, %1
ret i8* %0
7: ; preds = %4, %7
%8 = phi i64 [ 0, %4 ], [ %12, %7 ]
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = tail call signext i8 @bg(i8 signext %10)
store i8 %11, i8* %9
%12 = add nuw nsw i64 %8, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %6, label %7
}
/* Variables and functions */
int /*<<< orphan*/ panic(char *, char *, int /*<<< orphan*/);
void int_12(void) { panic("Stack Segment Fault", "#SS", 0); }


x86 assembly (clang, -O0):
<int_12>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xef2(%rip),%rsi
xor    %edx,%edx
call   1030 <panic@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_12>:
lea    0xee9(%rip),%rdi
lea    0xef6(%rip),%rsi
xor    %edx,%edx
jmp    1030 <panic@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"Stack Segment Fault\00"
@.str.1 = [4 x i8] c"#SS\00"
define void @int_12() {
%1 = call i32 @panic(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"Stack Segment Fault\00"
@.str.1 = [4 x i8] c"#SS\00"
define void @int_12() {
%1 = tail call i32 @panic(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 0)
ret void
}
unsigned int test_07(unsigned int a) { return a >= 65535 ? 65535 : a; }


x86 assembly (clang, -O0):
<test_07>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0xffff,-0x4(%rbp)
jb     1121 <test_07+0x21>
mov    $0xffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1127 <test_07+0x27>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_07>:
cmp    $0xffff,%edi
mov    $0xffff,%eax
cmovb  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @test_07(i32 %0) {
%2 = icmp ult i32 %0, 65535
%3 = select i1 %2, i32 %0, i32 65535
ret i32 %3
}
unsigned int add_offset(void *ptr, unsigned int offset) {
  return ((unsigned int)ptr + offset);
}


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

x86 assembly (clang, -O2):
<add_offset>:
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @add_offset(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 = ptrtoint i8* %5 to i32
%7 = load i32, i32* %4
%8 = add i32 %6, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @add_offset(i8* %0, i32 %1) {
%3 = ptrtoint i8* %0 to i64
%4 = trunc i64 %3 to i32
%5 = add i32 %4, %1
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ UsingStdC();
int /*<<< orphan*/ freeFDTD();
int /*<<< orphan*/ initFDTD();
void RunCalculation() {
  initFDTD();
  UsingStdC();
  freeFDTD();
}


x86 assembly (clang, -O0):
<RunCalculation>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <initFDTD@plt>
mov    $0x0,%al
call   1050 <UsingStdC@plt>
mov    $0x0,%al
call   1040 <freeFDTD@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<RunCalculation>:
push   %rax
xor    %eax,%eax
call   1030 <initFDTD@plt>
xor    %eax,%eax
call   1050 <UsingStdC@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <freeFDTD@plt>

LLVM IR (-O0):
define void @RunCalculation() {
%1 = call i32 (...) @initFDTD()
%2 = call i32 (...) @UsingStdC()
%3 = call i32 (...) @freeFDTD()
ret void
}

LLVM IR (-O2):
define void @RunCalculation() {
%1 = tail call i32 (...) @initFDTD()
%2 = tail call i32 (...) @UsingStdC()
%3 = tail call i32 (...) @freeFDTD()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char const *);
void cpy_arg(const char *s) {
  if (s) {
    char text[20];
    strcpy(text, s);
  }
}


x86 assembly (clang, -O0):
<cpy_arg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1134 <cpy_arg+0x24>
lea    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpy_arg>:
test   %rdi,%rdi
je     1128 <cpy_arg+0x18>
sub    $0x18,%rsp
mov    %rdi,%rsi
mov    %rsp,%rdi
call   1030 <strcpy@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @cpy_arg(i8* %0) {
%2 = alloca i8*
%3 = alloca [20 x i8]
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%8 = load i8*, i8** %2
%9 = call i32 @strcpy(i8* %7, i8* %8)
br label %10
10: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
define void @cpy_arg(i8* %0) {
%2 = alloca [20 x i8]
%3 = icmp eq i8* %0, null
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%6 = call i32 @strcpy(i8* %5, i8* %0)
br label %7
7: ; preds = %4, %1
ret void
}
int test_imm_20uint64_midword_mem(unsigned long long *val) {
  return ((*val >> 16) & (0x20 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_20uint64_midword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
shr    $0x10,%rdx
and    $0x20,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_20uint64_midword_mem>:
testb  $0x20,0x2(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_20uint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 2097152
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ http_err(int, int, char *, char const *);
void http_serve_none(int fd, const char *pn) {
  http_err(fd, 404, "File does not exist: %s", pn);
}


x86 assembly (clang, -O0):
<http_serve_none>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rcx
mov    $0x194,%esi
lea    0xece(%rip),%rdx
call   1030 <http_err@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<http_serve_none>:
mov    %rsi,%rcx
lea    0xee6(%rip),%rdx
mov    $0x194,%esi
jmp    1030 <http_err@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"File does not exist: %s\00"
define void @http_serve_none(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = call i32 @http_err(i32 %5, i32 404, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"File does not exist: %s\00"
define void @http_serve_none(i32 %0, i8* %1) {
%3 = tail call i32 @http_err(i32 %0, i32 404, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
/* Variables and functions */
int read_i2c_byte_data(int *, int);
int get_firmware_version(int *fd) { return read_i2c_byte_data(fd, 0x00); }


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

x86 assembly (clang, -O2):
<get_firmware_version>:
xor    %esi,%esi
jmp    1030 <read_i2c_byte_data@plt>

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

LLVM IR (-O2):
define i32 @get_firmware_version(i32* %0) {
%2 = tail call i32 @read_i2c_byte_data(i32* %0, i32 0)
ret i32 %2
}
int right(int x) {
  const int z = 0;
  const int o = 1;
  const int m = -1;
  int r = 0;
  r += z >> x;
  r += o >> x;
  r += m >> x;
  r += 0 >> x;
  r += 1 >> x;
  r += -1 >> x;
  r += -1U >> x;
  return r;
}


x86 assembly (clang, -O0):
<right>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0xffffffff,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x4(%rbp),%ecx
xor    %eax,%eax
sar    %cl,%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x1,%eax
sar    %cl,%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0xffffffff,%eax
sar    %cl,%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%ecx
xor    %eax,%eax
sar    %cl,%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x1,%eax
sar    %cl,%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0xffffffff,%eax
sar    %cl,%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0xffffffff,%eax
shr    %cl,%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<right>:
mov    %edi,%ecx
mov    $0x1,%eax
shr    %cl,%eax
mov    $0xffffffff,%edx
shr    %cl,%edx
lea    (%rdx,%rax,2),%eax
add    $0xfffffffe,%eax
ret

LLVM IR (-O0):
define i32 @right(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
store i32 1, i32* %4
store i32 -1, i32* %5
store i32 0, i32* %6
%7 = load i32, i32* %2
%8 = ashr i32 0, %7
%9 = load i32, i32* %6
%10 = add nsw i32 %9, %8
store i32 %10, i32* %6
%11 = load i32, i32* %2
%12 = ashr i32 1, %11
%13 = load i32, i32* %6
%14 = add nsw i32 %13, %12
store i32 %14, i32* %6
%15 = load i32, i32* %2
%16 = ashr i32 -1, %15
%17 = load i32, i32* %6
%18 = add nsw i32 %17, %16
store i32 %18, i32* %6
%19 = load i32, i32* %2
%20 = ashr i32 0, %19
%21 = load i32, i32* %6
%22 = add nsw i32 %21, %20
store i32 %22, i32* %6
%23 = load i32, i32* %2
%24 = ashr i32 1, %23
%25 = load i32, i32* %6
%26 = add nsw i32 %25, %24
store i32 %26, i32* %6
%27 = load i32, i32* %2
%28 = ashr i32 -1, %27
%29 = load i32, i32* %6
%30 = add nsw i32 %29, %28
store i32 %30, i32* %6
%31 = load i32, i32* %2
%32 = lshr i32 -1, %31
%33 = load i32, i32* %6
%34 = add i32 %33, %32
store i32 %34, i32* %6
%35 = load i32, i32* %6
ret i32 %35
}

LLVM IR (-O2):
define i32 @right(i32 %0) {
%2 = lshr i32 1, %0
%3 = shl nuw nsw i32 %2, 1
%4 = lshr i32 -1, %0
%5 = add i32 %4, -2
%6 = add i32 %5, %3
ret i32 %6
}
/* Type definitions */
typedef int u_int8_t;
struct sockaddr_in6 {
  int dummy;
};
struct sockaddr_in {
  int dummy;
};
struct sockaddr {
  int sa_family;
};

/* Variables and functions */
#define AF_INET 129
#define AF_INET6 128
u_int8_t sysdep_sa_len(struct sockaddr *sa) {
  switch (sa->sa_family) {
  case AF_INET:
    return sizeof(struct sockaddr_in);
  case AF_INET6:
    return sizeof(struct sockaddr_in6);
  }
  return sizeof(struct sockaddr_in);
}


x86 assembly (clang, -O0):
<sysdep_sa_len>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
sub    $0x80,%eax
je     1140 <sysdep_sa_len+0x40>
jmp    1121 <sysdep_sa_len+0x21>
mov    -0x14(%rbp),%eax
sub    $0x81,%eax
jne    114c <sysdep_sa_len+0x4c>
jmp    1134 <sysdep_sa_len+0x34>
movl   $0x4,-0x4(%rbp)
jmp    1153 <sysdep_sa_len+0x53>
movl   $0x4,-0x4(%rbp)
jmp    1153 <sysdep_sa_len+0x53>
movl   $0x4,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
define i32 @sysdep_sa_len(%struct.sockaddr* %0) {
%2 = alloca i32
%3 = alloca %struct.sockaddr*
store %struct.sockaddr* %0, %struct.sockaddr** %3
%4 = load %struct.sockaddr*, %struct.sockaddr** %3
%5 = getelementptr inbounds %struct.sockaddr, %struct.sockaddr* %4, i32 0, i32 0
%6 = load i32, i32* %5
switch i32 %6, label %9 [
i32 129, label %7
i32 128, label %8
]
7: ; preds = %1
store i32 4, i32* %2
br label %10
8: ; preds = %1
store i32 4, i32* %2
br label %10
9: ; preds = %1
store i32 4, i32* %2
br label %10
10: ; preds = %9, %8, %7
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
define i32 @sysdep_sa_len(%struct.sockaddr* nocapture %0) {
ret i32 4
}
int init_pkg_mallocs() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @init_pkg_mallocs() {
ret i32 0
}
int string_length(char *str) {
  int size = 0;
  char c = str[0];
  while (c != '\0') {
    size++;
    c = str[size];
  }
  return size;
}


x86 assembly (clang, -O0):
<string_length>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0xd(%rbp)
movsbl -0xd(%rbp),%eax
cmp    $0x0,%eax
je     1141 <string_length+0x41>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0xd(%rbp)
jmp    1118 <string_length+0x18>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_length>:
cmpb   $0x0,(%rdi)
je     111c <string_length+0x1c>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <string_length+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @string_length(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %6, %4 ], [ 0, %1 ]
%6 = add nuw nsw i64 %5, 1
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 0
br i1 %9, label %10, label %4
10: ; preds = %4
%11 = trunc i64 %6 to i32
br label %12
12: ; preds = %10, %1
%13 = phi i32 [ 0, %1 ], [ %11, %10 ]
ret i32 %13
}
void ConvertPathCharacters(char *Path) {
  int i;
  i = 0;
  while (Path[i] != 0) {
    if (Path[i] == '\\' || Path[i] == '/') {
      Path[i] = '/';
    }
    i++;
  }
}


x86 assembly (clang, -O0):
<ConvertPathCharacters>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1168 <ConvertPathCharacters+0x68>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x5c,%eax
je     114e <ConvertPathCharacters+0x4e>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2f,%eax
jne    115a <ConvertPathCharacters+0x5a>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x2f,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <ConvertPathCharacters+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ConvertPathCharacters>:
jmp    1117 <ConvertPathCharacters+0x17>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movb   $0x2f,(%rdi)
add    $0x1,%rdi
movzbl (%rdi),%eax
cmp    $0x2f,%al
je     1110 <ConvertPathCharacters+0x10>
cmp    $0x5c,%al
je     1110 <ConvertPathCharacters+0x10>
test   %al,%al
jne    1113 <ConvertPathCharacters+0x13>
ret

LLVM IR (-O0):
define void @ConvertPathCharacters(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %33, %1
%5 = load i8*, i8** %2
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %36
12: ; preds = %4
%13 = load i8*, i8** %2
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp eq i32 %18, 92
br i1 %19, label %28, label %20
20: ; preds = %12
%21 = load i8*, i8** %2
%22 = load i32, i32* %3
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i8, i8* %21, i64 %23
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = icmp eq i32 %26, 47
br i1 %27, label %28, label %33
28: ; preds = %20, %12
%29 = load i8*, i8** %2
%30 = load i32, i32* %3
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds i8, i8* %29, i64 %31
store i8 47, i8* %32
br label %33
33: ; preds = %28, %20
%34 = load i32, i32* %3
%35 = add nsw i32 %34, 1
store i32 %35, i32* %3
br label %4
36: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @ConvertPathCharacters(i8* nocapture %0) {
br label %2
2: ; preds = %7, %1
%3 = phi i64 [ %8, %7 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
switch i8 %5, label %7 [
i8 0, label %9
i8 92, label %6
i8 47, label %6
]
6: ; preds = %2, %2
store i8 47, i8* %4
br label %7
7: ; preds = %2, %6
%8 = add nuw i64 %3, 1
br label %2
9: ; preds = %2
ret void
}
void av_opt_set_dict_val() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
float stdlib_strided_sdsnansum(int, float *, int);
int main() {
  float x[] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 0.0 / 0.0, 0.0 / 0.0};
  int64_t N = 5;
  int64_t stride = 2;
  float v = stdlib_strided_sdsnansum(N, x, stride);
  printf("sum: %f\n", v);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    -0x30(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x28,%edx
call   1040 <memcpy@plt>
movl   $0x5,-0x34(%rbp)
movl   $0x2,-0x38(%rbp)
mov    -0x34(%rbp),%edi
lea    -0x30(%rbp),%rsi
mov    -0x38(%rbp),%edx
call   1050 <stdlib_strided_sdsnansum@plt>
movss  %xmm0,-0x3c(%rbp)
movss  -0x3c(%rbp),%xmm0
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
mov    0xef5(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xebd(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rsi
mov    $0x5,%edi
mov    $0x2,%edx
call   1040 <stdlib_strided_sdsnansum@plt>
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.x = [10 x float] [float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00, float 8.000000e+00, float 0x7FF8000000000000, float 0x7FF8000000000000]
@.str = [9 x i8] c"sum: %f\0A\00"
define i32 @main() {
%1 = alloca [10 x float]
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
%5 = bitcast [10 x float]* %1 to i8*
store i32 5, i32* %2
store i32 2, i32* %3
%6 = load i32, i32* %2
%7 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 0
%8 = load i32, i32* %3
%9 = call float @stdlib_strided_sdsnansum(i32 %6, float* %7, i32 %8)
store float %9, float* %4
%10 = load float, float* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), float %10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.x = [10 x float] [float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00, float 8.000000e+00, float 0x7FF8000000000000, float 0x7FF8000000000000]
@.str = [9 x i8] c"sum: %f\0A\00"
define i32 @main() {
%1 = alloca [10 x float]
%2 = bitcast [10 x float]* %1 to i8*
%3 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 0
%4 = call float @stdlib_strided_sdsnansum(i32 5, float* %3, i32 2)
%5 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), float %4)
ret i32 0
}
void test86_Test_11_targetInit__I() {}


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

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

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

LLVM IR (-O2):
define void @test86_Test_11_targetInit__I() {
ret void
}
/* Variables and functions */
size_t max(size_t nb1, size_t nb2) { return nb1 > nb2 ? nb1 : nb2; }


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jbe    1127 <max+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <max+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @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 ugt i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %3
br label %12
10: ; preds = %2
%11 = load i64, i64* %4
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
ret i64 %13
}

LLVM IR (-O2):
define i64 @max(i64 %0, i64 %1) {
%3 = icmp ugt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
double to_degrees(const double x) { return ((x)*180.0) / (3.141592653589793); }


x86 assembly (clang, -O0):
<to_degrees>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xef7(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xee2(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_degrees>:
mulsd  0xef8(%rip),%xmm0
divsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @to_degrees(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 1.800000e+02
%5 = fdiv double %4, 0x400921FB54442D18
ret double %5
}

LLVM IR (-O2):
define double @to_degrees(double %0) {
%2 = fmul double %0, 1.800000e+02
%3 = fdiv double %2, 0x400921FB54442D18
ret double %3
}
int concreteOffsetBindingIsInvalidatedBySymbolicOffsetAssignment(int length,
                                                                 int i) {
  int values[length];
  values[i] = 4;
  return values[0];
}


x86 assembly (clang, -O0):
<concreteOffsetBindingIsInvalidatedBySymbolicOffsetAssignment>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
mov    %rsp,%rax
mov    %rax,-0x10(%rbp)
lea    0xf(,%rcx,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rax
sub    %rdx,%rax
mov    %rax,%rsp
mov    %rcx,-0x18(%rbp)
movslq -0x8(%rbp),%rcx
movl   $0x4,(%rax,%rcx,4)
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<concreteOffsetBindingIsInvalidatedBySymbolicOffsetAssignment>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,%eax
mov    %rsp,%rcx
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
mov    %rcx,%rdx
sub    %rax,%rdx
mov    %rdx,%rsp
neg    %rax
movslq %esi,%rsi
movl   $0x4,(%rdx,%rsi,4)
mov    (%rcx,%rax,1),%eax
mov    %rbp,%rsp
pop    %rbp
ret

LLVM IR (-O0):
define i32 @concreteOffsetBindingIsInvalidatedBySymbolicOffsetAssignment(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = zext i32 %7 to i64
%9 = call i8* @llvm.stacksave()
store i8* %9, i8** %5
%10 = alloca i32, i64 %8
store i64 %8, i64* %6
%11 = load i32, i32* %4
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i32, i32* %10, i64 %12
store i32 4, i32* %13
%14 = getelementptr inbounds i32, i32* %10, i64 0
%15 = load i32, i32* %14
%16 = load i8*, i8** %5
ret i32 %15
}

LLVM IR (-O2):
define i32 @concreteOffsetBindingIsInvalidatedBySymbolicOffsetAssignment(i32 %0, i32 %1) {
%3 = zext i32 %0 to i64
%4 = alloca i32, i64 %3
%5 = sext i32 %1 to i64
%6 = getelementptr inbounds i32, i32* %4, i64 %5
store i32 4, i32* %6
%7 = load i32, i32* %4
ret i32 %7
}
void SNDWavMuteAudio() {}


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

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

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

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

/* Variables and functions */
int iswascii(wint_t c) { return (c <= 0x7f); }


x86 assembly (clang, -O0):
<iswascii>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x7f,-0x4(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iswascii>:
xor    %eax,%eax
cmp    $0x80,%edi
setl   %al
ret

LLVM IR (-O0):
define i32 @iswascii(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sle i32 %3, 127
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @iswascii(i32 %0) {
%2 = icmp slt i32 %0, 128
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
scalar_t__ g2_open_vd();
float g2_open_vd_(void) { return (float)g2_open_vd(); }


x86 assembly (clang, -O0):
<g2_open_vd_>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <g2_open_vd@plt>
cvtsi2ss %rax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<g2_open_vd_>:
push   %rax
xor    %eax,%eax
call   1030 <g2_open_vd@plt>
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @g2_open_vd_() {
%1 = call i64 (...) @g2_open_vd()
%2 = sitofp i64 %1 to float
ret float %2
}

LLVM IR (-O2):
define float @g2_open_vd_() {
%1 = tail call i64 (...) @g2_open_vd()
%2 = sitofp i64 %1 to float
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ interrupt(int);
int /*<<< orphan*/ next_instruction();
void trap_1(void) {
  next_instruction();
  interrupt(1);
}


x86 assembly (clang, -O0):
<trap_1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <next_instruction@plt>
mov    $0x1,%edi
call   1030 <interrupt@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<trap_1>:
push   %rax
xor    %eax,%eax
call   1040 <next_instruction@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <interrupt@plt>

LLVM IR (-O0):
define void @trap_1() {
%1 = call i32 (...) @next_instruction()
%2 = call i32 @interrupt(i32 1)
ret void
}

LLVM IR (-O2):
define void @trap_1() {
%1 = tail call i32 (...) @next_instruction()
%2 = tail call i32 @interrupt(i32 1)
ret void
}
void __set_bit(int nr, void *addr) {
  ((unsigned long *)(addr))[(nr) / (sizeof(unsigned long) * 8)] |=
      (1UL << ((nr) % (sizeof(unsigned long) * 8)));
}


x86 assembly (clang, -O0):
<__set_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movslq -0x4(%rbp),%rcx
and    $0x3f,%rcx
mov    $0x1,%edx
shl    %cl,%rdx
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
shr    $0x6,%rcx
or     (%rax,%rcx,8),%rdx
mov    %rdx,(%rax,%rcx,8)
pop    %rbp
ret

x86 assembly (clang, -O2):
<__set_bit>:
movslq %edi,%rcx
mov    $0x1,%eax
shl    %cl,%rax
shr    $0x6,%rcx
or     %rax,(%rsi,%rcx,8)
ret

LLVM IR (-O0):
define void @__set_bit(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = sext i32 %5 to i64
%7 = urem i64 %6, 64
%8 = shl i64 1, %7
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i64*
%11 = load i32, i32* %3
%12 = sext i32 %11 to i64
%13 = udiv i64 %12, 64
%14 = getelementptr inbounds i64, i64* %10, i64 %13
%15 = load i64, i64* %14
%16 = or i64 %15, %8
store i64 %16, i64* %14
ret void
}

LLVM IR (-O2):
define void @__set_bit(i32 %0, i8* nocapture %1) {
%3 = sext i32 %0 to i64
%4 = and i64 %3, 63
%5 = shl nuw i64 1, %4
%6 = bitcast i8* %1 to i64*
%7 = lshr i64 %3, 6
%8 = getelementptr inbounds i64, i64* %6, i64 %7
%9 = load i64, i64* %8
%10 = or i64 %9, %5
store i64 %10, i64* %8
ret void
}
void btd_backtrace_init(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ SYS_gettid;
int /*<<< orphan*/ syscall(int /*<<< orphan*/);
pid_t sys_gettid(void) { return syscall(SYS_gettid); }


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

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

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

LLVM IR (-O2):
@SYS_gettid = global i32 0
define i32 @sys_gettid() {
%1 = load i32, i32* @SYS_gettid
%2 = tail call i32 @syscall(i32 %1)
ret i32 %2
}
void br_multicast_disable_port(struct net_bridge_port *port) {}


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

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

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

LLVM IR (-O2):
%struct.net_bridge_port = type opaque
define void @br_multicast_disable_port(%struct.net_bridge_port* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
char digit2uppercase_hex(unsigned char digit) {
  assert(digit < 16);
  return "0123456789ABCDEF"[digit];
}


x86 assembly (clang, -O0):
<digit2uppercase_hex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x10,%eax
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movzbl -0x1(%rbp),%eax
mov    %eax,%ecx
lea    0xec1(%rip),%rax
movsbl (%rax,%rcx,1),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<digit2uppercase_hex>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
cmp    $0x10,%bl
setb   %dil
call   1030 <assert@plt>
mov    %ebx,%eax
lea    0xed6(%rip),%rcx
mov    (%rax,%rcx,1),%al
pop    %rbx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"0123456789ABCDEF\00"
define signext i8 @digit2uppercase_hex(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = icmp slt i32 %4, 16
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = load i8, i8* %2
%9 = zext i8 %8 to i64
%10 = getelementptr inbounds [17 x i8], [17 x i8]* @.str, i64 0, i64 %9
%11 = load i8, i8* %10
ret i8 %11
}

LLVM IR (-O2):
@.str = [17 x i8] c"0123456789ABCDEF\00"
define signext i8 @digit2uppercase_hex(i8 zeroext %0) {
%2 = icmp ult i8 %0, 16
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = zext i8 %0 to i64
%6 = getelementptr inbounds [17 x i8], [17 x i8]* @.str, i64 0, i64 %5
%7 = load i8, i8* %6
ret i8 %7
}
void foo_2_1_1_2_2_1_1_1_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_1_1_2_2_1_1_1_2() {
ret void
}
/* Variables and functions */
scalar_t__ isupper(int);
int tolower(int c) {
  if (isupper(c))
    return c + 'a' - 'A';
  else
    return c;
}


x86 assembly (clang, -O0):
<tolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <isupper@plt>
cmp    $0x0,%rax
je     113e <tolower+0x2e>
mov    -0x8(%rbp),%eax
add    $0x61,%eax
sub    $0x41,%eax
mov    %eax,-0x4(%rbp)
jmp    1144 <tolower+0x34>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tolower>:
push   %rbx
mov    %edi,%ebx
call   1030 <isupper@plt>
lea    0x20(%rbx),%ecx
test   %rax,%rax
cmove  %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @tolower(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i64 @isupper(i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i32, i32* %3
%9 = add nsw i32 %8, 97
%10 = sub nsw i32 %9, 65
store i32 %10, i32* %2
br label %13
11: ; preds = %1
%12 = load i32, i32* %3
store i32 %12, i32* %2
br label %13
13: ; preds = %11, %7
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @tolower(i32 %0) {
%2 = tail call i64 @isupper(i32 %0)
%3 = icmp eq i64 %2, 0
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %0, i32 %4
ret i32 %5
}