xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ test42_TestMod_test__E();
void test42_TestProg_pollen__run__E() { test42_TestMod_test__E(); }


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

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

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

LLVM IR (-O2):
define void @test42_TestProg_pollen__run__E() {
%1 = tail call i32 (...) @test42_TestMod_test__E()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ writeLog(char *, char *, char *);
void logInternal(char *ip, char *get) {
  writeLog(ip, get, "500 Internal Server Error");
}


x86 assembly (clang, -O0):
<logInternal>:
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 <writeLog@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [26 x i8] c"500 Internal Server Error\00"
define void @logInternal(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 @writeLog(i8* %5, i8* %6, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"500 Internal Server Error\00"
define void @logInternal(i8* %0, i8* %1) {
%3 = tail call i32 @writeLog(i8* %0, i8* %1, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}
int lowbit(int n) { return n & (-n); }


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

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

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

LLVM IR (-O2):
define i32 @lowbit(i32 %0) {
%2 = sub nsw i32 0, %0
%3 = and i32 %2, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, unsigned int);
char *Encode_String(char *str, char *buff) {
  while (*str) {
    sprintf(buff, "%02X", (unsigned)(unsigned char)*str);
    str++;
    buff += 2;
  }
  return buff;
}


x86 assembly (clang, -O0):
<Encode_String>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1161 <Encode_String+0x51>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
lea    0xec1(%rip),%rsi
call   1030 <sprintf@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x10(%rbp)
jmp    1120 <Encode_String+0x10>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Encode_String>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    (%rdi),%al
test   %al,%al
je     114d <Encode_String+0x3d>
mov    %rdi,%rbx
add    $0x1,%rbx
lea    0xed4(%rip),%r15
nopl   0x0(%rax)
movzbl %al,%edx
mov    %r14,%rdi
mov    %r15,%rsi
call   1030 <sprintf@plt>
add    $0x2,%r14
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <Encode_String+0x20>
mov    %r14,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%02X\00"
define i8* @Encode_String(i8* nocapture %0, i8* writeonly %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %13, %5 ], [ %3, %2 ]
%7 = phi i8* [ %12, %5 ], [ %1, %2 ]
%8 = phi i8* [ %11, %5 ], [ %0, %2 ]
%9 = zext i8 %6 to i32
%10 = tail call i32 @sprintf(i8* dereferenceable(1) %7, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = getelementptr inbounds i8, i8* %8, i64 1
%12 = getelementptr inbounds i8, i8* %7, i64 2
%13 = load i8, i8* %11
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %5
15: ; preds = %5, %2
%16 = phi i8* [ %1, %2 ], [ %12, %5 ]
ret i8* %16
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ h_puts(char const *);
int /*<<< orphan*/ stdout;
void h_button_reset(const char *title) {
  fputs("<input type=\"reset\" value=\"", stdout);
  h_puts(title);
  fputs("\">\n", stdout);
}


x86 assembly (clang, -O0):
<h_button_reset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%esi
lea    0xec4(%rip),%rdi
call   1040 <fputs@plt>
mov    -0x8(%rbp),%rdi
call   1030 <h_puts@plt>
mov    0x2e8f(%rip),%rax
mov    (%rax),%esi
lea    0xec2(%rip),%rdi
call   1040 <fputs@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h_button_reset>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eb2(%rip),%r14
mov    (%r14),%esi
lea    0xec8(%rip),%rdi
call   1040 <fputs@plt>
mov    %rbx,%rdi
call   1030 <h_puts@plt>
mov    (%r14),%esi
lea    0xecd(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <fputs@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"<input type=\22reset\22 value=\22\00"
@stdout = global i32 0
@.str.1 = [4 x i8] c"\22>\0A\00"
define void @h_button_reset(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stdout
%4 = call i32 @fputs(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i8*, i8** %2
%6 = call i32 @h_puts(i8* %5)
%7 = load i32, i32* @stdout
%8 = call i32 @fputs(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"<input type=\22reset\22 value=\22\00"
@stdout = global i32 0
@.str.1 = [4 x i8] c"\22>\0A\00"
define void @h_button_reset(i8* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fputs(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = tail call i32 @h_puts(i8* %0)
%5 = load i32, i32* @stdout
%6 = tail call i32 @fputs(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret void
}
/* Variables and functions */
char *strchr(char *, char);
char *stripcomment(char *str) {
  char *ptr = strchr(str, ';');
  if (ptr != NULL) {
    *ptr++ = '\n';
    *ptr = '\0';
  }
  return str;
}


x86 assembly (clang, -O0):
<stripcomment>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x3b,%esi
call   1030 <strchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1152 <stripcomment+0x42>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movb   $0xa,(%rax)
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stripcomment>:
push   %rbx
mov    %rdi,%rbx
mov    $0x3b,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1128 <stripcomment+0x18>
movw   $0xa,(%rax)
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @stripcomment(i8* returned %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 59)
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = getelementptr inbounds i8, i8* %2, i64 1
store i8 10, i8* %2
store i8 0, i8* %5
br label %6
6: ; preds = %4, %1
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *, int const);
void print_out(const char *p, const int x) {
  printf("p is\"%s\" and x is %i\n", p, x);
}


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

x86 assembly (clang, -O2):
<print_out>:
mov    %esi,%edx
mov    %rdi,%rsi
lea    0xee4(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"p is\22%s\22 and x is %i\0A\00"
define void @print_out(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 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"p is\22%s\22 and x is %i\0A\00"
define void @print_out(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
ret void
}
void ISRUsageFault(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<ISRUsageFault>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <ISRUsageFault+0x9>
jmp    1109 <ISRUsageFault+0x9>

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

LLVM IR (-O0):
define void @ISRUsageFault() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @ISRUsageFault() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isprint(int);
void t_isprint_0xc5() {
  Assert_real((isprint(197) == 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_isprint.c",
              990, ("isprint should be 0 for 0xc5"));
}


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

x86 assembly (clang, -O2):
<t_isprint_0xc5>:
push   %rax
mov    $0xc5,%edi
call   1030 <isprint@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3de,%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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xc5\00"
define void @t_isprint_0xc5() {
%1 = call i64 @isprint(i32 197)
%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 990, 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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xc5\00"
define void @t_isprint_0xc5() {
%1 = tail call i64 @isprint(i32 197)
%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 990, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void foo780() {}


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

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

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

LLVM IR (-O2):
define void @foo780() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ calc_pscf_parameters();
void change_pscf_scaling(void) {
  ;
  calc_pscf_parameters();
}


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

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

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

LLVM IR (-O2):
define void @change_pscf_scaling() {
%1 = tail call i32 (...) @calc_pscf_parameters()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cmd_8042(int);
int /*<<< orphan*/ write_8042(char);
void write_8042_cmd_byte(char b) {
  cmd_8042(0x60);
  write_8042(b);
  return;
}


x86 assembly (clang, -O0):
<write_8042_cmd_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x60,%edi
call   1030 <cmd_8042@plt>
movsbl -0x1(%rbp),%edi
call   1040 <write_8042@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_8042_cmd_byte>:
push   %rbx
mov    %edi,%ebx
mov    $0x60,%edi
call   1030 <cmd_8042@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <write_8042@plt>

LLVM IR (-O0):
define void @write_8042_cmd_byte(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @cmd_8042(i32 96)
%4 = load i8, i8* %2
%5 = call i32 @write_8042(i8 signext %4)
ret void
}

LLVM IR (-O2):
define void @write_8042_cmd_byte(i8 signext %0) {
%2 = tail call i32 @cmd_8042(i32 96)
%3 = tail call i32 @write_8042(i8 signext %0)
ret void
}
int is_leap(int y) {
  return (y % 4) == 0 && ((y % 100) != 0 || (y % 400) == 0);
}


x86 assembly (clang, -O0):
<is_leap>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
xor    %eax,%eax
cmp    $0x0,%edx
mov    %al,-0x5(%rbp)
jne    1153 <is_leap+0x53>
mov    -0x4(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    $0x1,%al
cmp    $0x0,%edx
mov    %al,-0x6(%rbp)
jne    114d <is_leap+0x4d>
mov    -0x4(%rbp),%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
sete   %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_leap>:
xor    %eax,%eax
test   $0x3,%dil
je     1109 <is_leap+0x9>
ret
imul   $0xc28f5c29,%edi,%ecx
add    $0x51eb850,%ecx
mov    %ecx,%edx
ror    $0x2,%edx
mov    $0x1,%eax
cmp    $0x28f5c28,%edx
ja     1108 <is_leap+0x8>
ror    $0x4,%ecx
xor    %eax,%eax
cmp    $0xa3d70b,%ecx
setb   %al
ret

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

LLVM IR (-O2):
define i32 @is_leap(i32 %0) {
%2 = and i32 %0, 3
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %11
4: ; preds = %1
%5 = srem i32 %0, 100
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = srem i32 %0, 400
%9 = icmp eq i32 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %4, %7, %1
%12 = phi i32 [ 0, %1 ], [ 1, %4 ], [ %10, %7 ]
ret i32 %12
}
int fahr2celsius(int degree) { return 5 * (degree - 32) / 9; }


x86 assembly (clang, -O0):
<fahr2celsius>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x20,%eax
imul   $0x5,%eax,%eax
mov    $0x9,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<fahr2celsius>:
lea    (%rdi,%rdi,4),%eax
add    $0xffffff60,%eax
cltq
imul   $0x38e38e39,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x21,%rax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @fahr2celsius(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 %3, 32
%5 = mul nsw i32 5, %4
%6 = sdiv i32 %5, 9
ret i32 %6
}

LLVM IR (-O2):
define i32 @fahr2celsius(i32 %0) {
%2 = mul i32 %0, 5
%3 = add i32 %2, -160
%4 = sdiv i32 %3, 9
ret i32 %4
}
char *f(char *x) { return x; }


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

x86 assembly (clang, -O2):
<f>:
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define i8* @f(i8* readnone returned %0) {
ret i8* %0
}
/* Variables and functions */
float powf(float, double);
float gamma_plain_f(float a, float g) { return powf(a, 1.0 / g); }


x86 assembly (clang, -O0):
<gamma_plain_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
movsd  0xec8(%rip),%xmm1
divsd  %xmm2,%xmm1
call   1030 <powf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gamma_plain_f>:
cvtss2sd %xmm1,%xmm2
movsd  0xee4(%rip),%xmm1
divsd  %xmm2,%xmm1
jmp    1030 <powf@plt>

LLVM IR (-O0):
define float @gamma_plain_f(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fpext float %6 to double
%8 = fdiv double 1.000000e+00, %7
%9 = call float @powf(float %5, double %8)
ret float %9
}

LLVM IR (-O2):
define float @gamma_plain_f(float %0, float %1) {
%3 = fpext float %1 to double
%4 = fdiv double 1.000000e+00, %3
%5 = tail call float @powf(float %0, double %4)
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ setSignals();
scalar_t__ system(char *);
bool initTerminal() {
  setSignals();
  return system("stty -icanon -echo") == 0;
}


x86 assembly (clang, -O0):
<initTerminal>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <setSignals@plt>
lea    0xece(%rip),%rdi
call   1040 <system@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<initTerminal>:
push   %rax
xor    %eax,%eax
call   1030 <setSignals@plt>
lea    0xed1(%rip),%rdi
call   1040 <system@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"stty -icanon -echo\00"
define i32 @initTerminal() {
%1 = call i32 (...) @setSignals()
%2 = call i64 @system(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}

LLVM IR (-O2):
@.str = [19 x i8] c"stty -icanon -echo\00"
define i32 @initTerminal() {
%1 = tail call i32 (...) @setSignals()
%2 = tail call i64 @system(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ clock_t;

/* Variables and functions */
int /*<<< orphan*/ gptrtp(char *, char *);
int /*<<< orphan*/ guitp(char *, int);
void g_clock_t() {
  guitp("clock_t", sizeof(clock_t));
  gptrtp("clock_t", "clock_t");
}


x86 assembly (clang, -O0):
<g_clock_t>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
mov    $0x4,%esi
call   1040 <guitp@plt>
lea    0xec4(%rip),%rsi
mov    %rsi,%rdi
call   1030 <gptrtp@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<g_clock_t>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x4,%esi
call   1040 <guitp@plt>
mov    %rbx,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <gptrtp@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"clock_t\00"
define void @g_clock_t() {
%1 = call i32 @guitp(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 4)
%2 = call i32 @gptrtp(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"clock_t\00"
define void @g_clock_t() {
%1 = tail call i32 @guitp(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 4)
%2 = tail call i32 @gptrtp(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ runASM(int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int main() { runASM(stdin); }


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

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

LLVM IR (-O0):
@stdin = global i32 0
define i32 @main() {
%1 = load i32, i32* @stdin
%2 = call i32 @runASM(i32 %1)
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
define i32 @main() {
%1 = load i32, i32* @stdin
%2 = tail call i32 @runASM(i32 %1)
ret i32 0
}
const int (*x3(int x[3][3]))[3] { return x; }


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

x86 assembly (clang, -O2):
<x3>:
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define [3 x i32]* @x3([3 x i32]* readnone returned %0) {
ret [3 x i32]* %0
}
int callbackHandler(char *caller, char *message_name, long msg_id,
                    char *arguments) {
  return 1;
}


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

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

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

LLVM IR (-O2):
define i32 @callbackHandler(i8* nocapture readnone %0, i8* nocapture readnone %1, i64 %2, i8* nocapture readnone %3) {
ret i32 1
}
void menu_print_crime_data() {}


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

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

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

LLVM IR (-O2):
define void @menu_print_crime_data() {
ret void
}
int get_field_len(const char *s, int n) {
  while (n > 0 && s[n - 1] == ' ')
    n--;
  return n;
}


x86 assembly (clang, -O0):
<get_field_len>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0xc(%rbp)
mov    %al,-0xd(%rbp)
jle    1134 <get_field_len+0x34>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1144 <get_field_len+0x44>
jmp    1152 <get_field_len+0x52>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    110b <get_field_len+0xb>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_field_len>:
mov    %esi,%ecx
xor    %eax,%eax
test   %esi,%esi
cmovs  %esi,%eax
nopl   0x0(%rax)
test   %ecx,%ecx
jle    1127 <get_field_len+0x27>
lea    -0x1(%rcx),%rdx
cmpb   $0x20,-0x1(%rdi,%rcx,1)
mov    %rdx,%rcx
je     1110 <get_field_len+0x10>
add    $0x1,%edx
mov    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @get_field_len(i8* nocapture %0, i32 %1) {
%3 = zext i32 %1 to i64
%4 = call i32 @llvm.smin.i32(i32 %1, i32 0)
br label %5
5: ; preds = %9, %2
%6 = phi i64 [ %10, %9 ], [ %3, %2 ]
%7 = trunc i64 %6 to i32
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %16
9: ; preds = %5
%10 = add nsw i64 %6, -1
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 32
br i1 %13, label %5, label %14
14: ; preds = %9
%15 = trunc i64 %6 to i32
br label %16
16: ; preds = %5, %14
%17 = phi i32 [ %15, %14 ], [ %4, %5 ]
ret i32 %17
}
void nulldev(void) {}


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

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

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

LLVM IR (-O2):
define void @nulldev() {
ret void
}
/* Variables and functions */
int bdd_memsize_limit();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stderr;
void my_memfull_handler(void) {
  fprintf(stderr, "BDD Package Memory Limit (%d Kb) Exceeded.\n",
          bdd_memsize_limit() >> 10);
  exit(1);
}


x86 assembly (clang, -O0):
<my_memfull_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ea1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <bdd_memsize_limit@plt>
mov    -0x4(%rbp),%edi
mov    %eax,%edx
sar    $0xa,%edx
lea    0xea6(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<my_memfull_handler>:
push   %rbx
mov    0x2ea8(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1030 <bdd_memsize_limit@plt>
sar    $0xa,%eax
lea    0xeb5(%rip),%rsi
mov    %ebx,%edi
mov    %eax,%edx
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [44 x i8] c"BDD Package Memory Limit (%d Kb) Exceeded.\0A\00"
define void @my_memfull_handler() {
%1 = load i32, i32* @stderr
%2 = call i32 (...) @bdd_memsize_limit()
%3 = ashr i32 %2, 10
%4 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [44 x i8] c"BDD Package Memory Limit (%d Kb) Exceeded.\0A\00"
define void @my_memfull_handler() {
%1 = load i32, i32* @stderr
%2 = tail call i32 (...) @bdd_memsize_limit()
%3 = ashr i32 %2, 10
%4 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
struct UPnPService {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, unsigned short);
void RNDResponseSink_RenderingControl_GetSharpness(
    struct UPnPService *Service, int ErrorCode, void *User,
    unsigned short CurrentSharpness) {
  printf("RND Invoke Response: "
         "RenderingControl/GetSharpness[ErrorCode:%d](%u)\r\n",
         ErrorCode, CurrentSharpness);
}


x86 assembly (clang, -O0):
<RNDResponseSink_RenderingControl_GetSharpness>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %cx,%ax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ax,-0x1a(%rbp)
mov    -0xc(%rbp),%esi
lea    0xecc(%rip),%rdi
movzwl -0x1a(%rbp),%edx
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RNDResponseSink_RenderingControl_GetSharpness>:
lea    0xee9(%rip),%rdi
mov    %ecx,%edx
jmp    1030 <printf@plt>

LLVM IR (-O0):
%struct.UPnPService = type { i32 }
@.str = [71 x i8] c"RND Invoke Response: RenderingControl/GetSharpness[ErrorCode:%d](%u)\0D\0A\00"
define void @RNDResponseSink_RenderingControl_GetSharpness(%struct.UPnPService* %0, i32 %1, i8* %2, i16 zeroext %3) {
%5 = alloca %struct.UPnPService*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i16
store %struct.UPnPService* %0, %struct.UPnPService** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i16 %3, i16* %8
%9 = load i32, i32* %6
%10 = load i16, i16* %8
%11 = call i32 @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0), i32 %9, i16 zeroext %10)
ret void
}

LLVM IR (-O2):
%struct.UPnPService = type { i32 }
@.str = [71 x i8] c"RND Invoke Response: RenderingControl/GetSharpness[ErrorCode:%d](%u)\0D\0A\00"
define void @RNDResponseSink_RenderingControl_GetSharpness(%struct.UPnPService* nocapture readnone %0, i32 %1, i8* nocapture readnone %2, i16 zeroext %3) {
%5 = tail call i32 @printf(i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0), i32 %1, i16 zeroext %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) { printf("Hello, world\n"); }


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

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

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

LLVM IR (-O2):
@str = [13 x i8] c"Hello, world\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int otherfunction() { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @otherfunction() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int ac, char *av[]) {
  (void)ac;
  (void)av;
  printf("Program of the project4\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [25 x i8] c"Program of the project4\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
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [24 x i8] c"Program of the project4\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ SIGABRT;
int /*<<< orphan*/ _exit(int);
int /*<<< orphan*/ raise(int /*<<< orphan*/);
void abort(void) {
  while (1) {
    raise(SIGABRT);
    _exit(1);
  }
}


x86 assembly (clang, -O0):
<abort>:
push   %rbp
mov    %rsp,%rbp
jmp    1129 <abort+0x9>
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
call   1030 <raise@plt>
mov    $0x1,%edi
call   1040 <_exit@plt>

x86 assembly (clang, -O2):
<abort>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
call   1030 <raise@plt>
mov    $0x1,%edi
call   1040 <_exit@plt>

LLVM IR (-O0):
@SIGABRT = global i32 0
define void @abort() {
br label %1
1: ; preds = %0
%2 = load i32, i32* @SIGABRT
%3 = call i32 @raise(i32 %2)
%4 = call i32 @_exit(i32 1)
unreachable
}

LLVM IR (-O2):
@SIGABRT = global i32 0
define void @abort() {
%1 = load i32, i32* @SIGABRT
%2 = tail call i32 @raise(i32 %1)
%3 = tail call i32 @_exit(i32 1)
unreachable
}
/* Type definitions */
struct hda_codec {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ alc269_lifebook_mic_autoswitch(struct hda_codec *);
int /*<<< orphan*/ alc269_quanta_fl1_speaker_automute(struct hda_codec *);
void alc269_lifebook_init_hook(struct hda_codec *codec) {
  alc269_quanta_fl1_speaker_automute(codec);
  alc269_lifebook_mic_autoswitch(codec);
}


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

x86 assembly (clang, -O2):
<alc269_lifebook_init_hook>:
push   %rbx
mov    %rdi,%rbx
call   1040 <alc269_quanta_fl1_speaker_automute@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <alc269_lifebook_mic_autoswitch@plt>

LLVM IR (-O0):
%struct.hda_codec = type { i32 }
define void @alc269_lifebook_init_hook(%struct.hda_codec* %0) {
%2 = alloca %struct.hda_codec*
store %struct.hda_codec* %0, %struct.hda_codec** %2
%3 = load %struct.hda_codec*, %struct.hda_codec** %2
%4 = call i32 @alc269_quanta_fl1_speaker_automute(%struct.hda_codec* %3)
%5 = load %struct.hda_codec*, %struct.hda_codec** %2
%6 = call i32 @alc269_lifebook_mic_autoswitch(%struct.hda_codec* %5)
ret void
}

LLVM IR (-O2):
%struct.hda_codec = type { i32 }
define void @alc269_lifebook_init_hook(%struct.hda_codec* %0) {
%2 = tail call i32 @alc269_quanta_fl1_speaker_automute(%struct.hda_codec* %0)
%3 = tail call i32 @alc269_lifebook_mic_autoswitch(%struct.hda_codec* %0)
ret void
}
/* Variables and functions */
void do_preload_rhtbl(int r) {}


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

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

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

LLVM IR (-O2):
define void @do_preload_rhtbl(i32 %0) {
ret void
}
/* Variables and functions */
int strlen(char const *);
int /*<<< orphan*/ vlistDefAttTxt(int, int, char const *, int, char const *);
void defineVarAttText(int vlistID2, int varID, const char *attname,
                      const char *atttext) {
  int len = strlen(atttext);
  vlistDefAttTxt(vlistID2, varID, attname, len, atttext);
}


x86 assembly (clang, -O0):
<defineVarAttText>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x18(%rbp),%r8
call   1030 <vlistDefAttTxt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<defineVarAttText>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rcx,%rbx
mov    %rdx,%r14
mov    %esi,%r15d
mov    %edi,%ebp
mov    %rcx,%rdi
call   1040 <strlen@plt>
mov    %ebp,%edi
mov    %r15d,%esi
mov    %r14,%rdx
mov    %eax,%ecx
mov    %rbx,%r8
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <vlistDefAttTxt@plt>

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

LLVM IR (-O2):
define void @defineVarAttText(i32 %0, i32 %1, i8* %2, i8* %3) {
%5 = tail call i32 @strlen(i8* %3)
%6 = tail call i32 @vlistDefAttTxt(i32 %0, i32 %1, i8* %2, i32 %5, i8* %3)
ret void
}
unsigned short le2ushort(unsigned char *buf) {
  unsigned short res = (buf[1] << 8) | buf[0];
  return res;
}


x86 assembly (clang, -O0):
<le2ushort>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
or     %ecx,%eax
mov    %ax,-0xa(%rbp)
movzwl -0xa(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<le2ushort>:
movzwl (%rdi),%eax
ret

LLVM IR (-O0):
define zeroext i16 @le2ushort(i8* %0) {
%2 = alloca i8*
%3 = alloca i16
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = shl i32 %7, 8
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 0
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = or i32 %8, %12
%14 = trunc i32 %13 to i16
store i16 %14, i16* %3
%15 = load i16, i16* %3
ret i16 %15
}

LLVM IR (-O2):
define zeroext i16 @le2ushort(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %2
%4 = zext i8 %3 to i16
%5 = shl nuw i16 %4, 8
%6 = load i8, i8* %0
%7 = zext i8 %6 to i16
%8 = or i16 %5, %7
ret i16 %8
}
/* Variables and functions */
double floor(double);
char quantize3bit(double D, double x) {
  double qxd;
  qxd = floor(x / D);
  if (qxd <= -4)
    qxd = -4;
  else if (qxd > 3)
    qxd = 3;
  return ((char)qxd);
}


x86 assembly (clang, -O0):
<quantize3bit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
divsd  -0x8(%rbp),%xmm0
call   1030 <floor@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  0xec2(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
jb     115b <quantize3bit+0x4b>
movsd  0xeaf(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1184 <quantize3bit+0x74>
movsd  -0x18(%rbp),%xmm0
movsd  0xea0(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    117f <quantize3bit+0x6f>
movsd  0xe8e(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1184 <quantize3bit+0x74>
movsd  -0x18(%rbp),%xmm0
cvttsd2si %xmm0,%eax
movsbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quantize3bit>:
push   %rax
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1030 <floor@plt>
movsd  0xeda(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    1142 <quantize3bit+0x32>
ucomisd 0xed4(%rip),%xmm0
movapd %xmm0,%xmm1
jbe    1142 <quantize3bit+0x32>
movsd  0xec6(%rip),%xmm1
cvttsd2si %xmm1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define signext i8 @quantize3bit(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %4
%7 = load double, double* %3
%8 = fdiv double %6, %7
%9 = call double @llvm.floor.f64(double %8)
store double %9, double* %5
%10 = load double, double* %5
%11 = fcmp ole double %10, -4.000000e+00
br i1 %11, label %12, label %13
12: ; preds = %2
store double -4.000000e+00, double* %5
br label %18
13: ; preds = %2
%14 = load double, double* %5
%15 = fcmp ogt double %14, 3.000000e+00
br i1 %15, label %16, label %17
16: ; preds = %13
store double 3.000000e+00, double* %5
br label %17
17: ; preds = %16, %13
br label %18
18: ; preds = %17, %12
%19 = load double, double* %5
%20 = fptosi double %19 to i8
ret i8 %20
}

LLVM IR (-O2):
define signext i8 @quantize3bit(double %0, double %1) {
%3 = fdiv double %1, %0
%4 = tail call double @llvm.floor.f64(double %3)
%5 = fcmp ugt double %4, -4.000000e+00
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = fcmp ogt double %4, 3.000000e+00
br i1 %7, label %8, label %9
8: ; preds = %6
br label %9
9: ; preds = %2, %6, %8
%10 = phi double [ 3.000000e+00, %8 ], [ %4, %6 ], [ -4.000000e+00, %2 ]
%11 = fptosi double %10 to i8
ret i8 %11
}
void SPIM_1_SaveConfig(void) {}


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

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

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

LLVM IR (-O2):
define void @SPIM_1_SaveConfig() {
ret void
}
/* Variables and functions */
scalar_t__ is_space(char const);
int __space_len(const char *s) {
  int l;
  for (l = 0; is_space(*s); l++)
    s++;
  return l;
}


x86 assembly (clang, -O0):
<__space_len>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <is_space@plt>
cmp    $0x0,%rax
je     1153 <__space_len+0x43>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <__space_len+0x13>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__space_len>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
movsbl (%rdi),%edi
call   1030 <is_space@plt>
xor    %ebx,%ebx
test   %rax,%rax
je     1144 <__space_len+0x34>
cs nopw 0x0(%rax,%rax,1)
movsbl 0x1(%r14,%rbx,1),%edi
call   1030 <is_space@plt>
add    $0x1,%rbx
test   %rax,%rax
jne    1130 <__space_len+0x20>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @__space_len(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = tail call i64 @is_space(i8 signext %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %1, %5
%6 = phi i32 [ %9, %5 ], [ 0, %1 ]
%7 = phi i8* [ %8, %5 ], [ %0, %1 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = add nuw nsw i32 %6, 1
%10 = load i8, i8* %8
%11 = tail call i64 @is_space(i8 signext %10)
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %1
%14 = phi i32 [ 0, %1 ], [ %9, %5 ]
ret i32 %14
}
float fma_test1(float a, float b, float c) {
  float x = a * b;
  float y = x + c;
  return y;
}


x86 assembly (clang, -O0):
<fma_test1>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fma_test1>:
mulss  %xmm1,%xmm0
addss  %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @fma_test1(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%9 = load float, float* %4
%10 = load float, float* %5
%11 = fmul float %9, %10
store float %11, float* %7
%12 = load float, float* %7
%13 = load float, float* %6
%14 = fadd float %12, %13
store float %14, float* %8
%15 = load float, float* %8
ret float %15
}

LLVM IR (-O2):
define float @fma_test1(float %0, float %1, float %2) {
%4 = fmul float %0, %1
%5 = fadd float %4, %2
ret float %5
}
/* Variables and functions */
int INT_MIN;
int /*<<< orphan*/ itoa(int, char *);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  int n = INT_MIN;
  char str[20] = {0};
  itoa(n, str);
  printf("%s\n", str);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2ea2(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
lea    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x14,%edx
call   1040 <memset@plt>
mov    -0x8(%rbp),%edi
lea    -0x20(%rbp),%rsi
call   1050 <itoa@plt>
lea    -0x20(%rbp),%rsi
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
mov    0x2ebc(%rip),%rax
mov    (%rax),%edi
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
movl   $0x0,0x10(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1040 <itoa@plt>
lea    0xeb1(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@INT_MIN = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [20 x i8]
store i32 0, i32* %1
%4 = load i32, i32* @INT_MIN
store i32 %4, i32* %2
%5 = bitcast [20 x i8]* %3 to i8*
%6 = load i32, i32* %2
%7 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%8 = call i32 @itoa(i32 %6, i8* %7)
%9 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %9)
ret i32 0
}

LLVM IR (-O2):
@INT_MIN = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [20 x i8]
%2 = load i32, i32* @INT_MIN
%3 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%4 = call i32 @itoa(i32 %2, i8* %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}
/* Type definitions */
typedef scalar_t__ int16_t;

/* Variables and functions */
bool SHAREMIND_SET_KEY_EQUALS_int16_t(int16_t const k1, int16_t const k2) {
  return k1 == k2;
}


x86 assembly (clang, -O0):
<SHAREMIND_SET_KEY_EQUALS_int16_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHAREMIND_SET_KEY_EQUALS_int16_t>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @SHAREMIND_SET_KEY_EQUALS_int16_t(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 eq i64 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @SHAREMIND_SET_KEY_EQUALS_int16_t(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}