xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ pr_inf(char *, char const *);
int /*<<< orphan*/ stress_check_capability(int /*<<< orphan*/);
int stress_rawudp_supported(const char *name) {
  if (!stress_check_capability((0))) {
    pr_inf("%s stressor will be skipped, "
           "need to be running with CAP_NET_RAW "
           "rights for this stressor\n",
           name);
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<stress_rawudp_supported>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
xor    %edi,%edi
call   1030 <stress_check_capability@plt>
cmp    $0x0,%eax
jne    1158 <stress_rawudp_supported+0x38>
mov    -0x10(%rbp),%rsi
lea    0xeb9(%rip),%rdi
call   1040 <pr_inf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    115f <stress_rawudp_supported+0x3f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stress_rawudp_supported>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %ebp,%ebp
xor    %edi,%edi
call   1030 <stress_check_capability@plt>
test   %eax,%eax
jne    1147 <stress_rawudp_supported+0x27>
lea    0xec6(%rip),%rdi
mov    %rbx,%rsi
call   1040 <pr_inf@plt>
mov    $0xffffffff,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [91 x i8] c"%s stressor will be skipped, need to be running with CAP_NET_RAW rights for this stressor\0A\00"
define i32 @stress_rawudp_supported(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = call i32 @stress_check_capability(i32 0)
%5 = icmp ne i32 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = load i8*, i8** %3
%8 = call i32 @pr_inf(i8* getelementptr inbounds ([91 x i8], [91 x i8]* @.str, i64 0, i64 0), i8* %7)
store i32 -1, i32* %2
br label %10
9: ; preds = %1
store i32 0, i32* %2
br label %10
10: ; preds = %9, %6
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
@.str = [91 x i8] c"%s stressor will be skipped, need to be running with CAP_NET_RAW rights for this stressor\0A\00"
define i32 @stress_rawudp_supported(i8* %0) {
%2 = tail call i32 @stress_check_capability(i32 0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @pr_inf(i8* getelementptr inbounds ([91 x i8], [91 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ -1, %4 ], [ 0, %1 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ cdiDecodeDate(int, int *, int *, int *);
int encode_julday(int, int, int, int);
int date_to_julday(int calendar, int date) {
  int julday;
  int year, month, day;
  cdiDecodeDate(date, &year, &month, &day);
  julday = encode_julday(calendar, year, month, day);
  return (julday);
}


x86 assembly (clang, -O0):
<date_to_julday>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
lea    -0x18(%rbp),%rcx
call   1040 <cdiDecodeDate@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
call   1030 <encode_julday@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<date_to_julday>:
push   %rbx
sub    $0x10,%rsp
mov    %esi,%eax
mov    %edi,%ebx
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
lea    0x4(%rsp),%rcx
mov    %eax,%edi
call   1040 <cdiDecodeDate@plt>
mov    0xc(%rsp),%esi
mov    0x8(%rsp),%edx
mov    0x4(%rsp),%ecx
mov    %ebx,%edi
call   1030 <encode_julday@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @date_to_julday(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%9 = load i32, i32* %4
%10 = call i32 @cdiDecodeDate(i32 %9, i32* %6, i32* %7, i32* %8)
%11 = load i32, i32* %3
%12 = load i32, i32* %6
%13 = load i32, i32* %7
%14 = load i32, i32* %8
%15 = call i32 @encode_julday(i32 %11, i32 %12, i32 %13, i32 %14)
store i32 %15, i32* %5
%16 = load i32, i32* %5
ret i32 %16
}

LLVM IR (-O2):
define i32 @date_to_julday(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = bitcast i32* %3 to i8*
%7 = bitcast i32* %4 to i8*
%8 = bitcast i32* %5 to i8*
%9 = call i32 @cdiDecodeDate(i32 %1, i32* %3, i32* %4, i32* %5)
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = load i32, i32* %5
%13 = call i32 @encode_julday(i32 %0, i32 %10, i32 %11, i32 %12)
ret i32 %13
}
/* Variables and functions */
scalar_t__ _FNV_(char *, int, int);
unsigned long fnv1a_32(char *raw) { return (unsigned long)_FNV_(raw, 1, 1); }


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

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

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

LLVM IR (-O2):
define i64 @fnv1a_32(i8* %0) {
%2 = tail call i64 @_FNV_(i8* %0, i32 1, i32 1)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void usage(char *prog) {
  printf("usage: %s [-m] file.grib\n", prog);
  exit(1);
}


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

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

LLVM IR (-O0):
@.str = [26 x i8] c"usage: %s [-m] file.grib\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [26 x i8] c"usage: %s [-m] file.grib\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ Main_Wrapper(int, char **);
int /*<<< orphan*/ Pl_Exit_With_Value(int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  Pl_Exit_With_Value(Main_Wrapper(argc, argv));
  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)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <Main_Wrapper@plt>
mov    %eax,%edi
call   1030 <Pl_Exit_With_Value@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1040 <Main_Wrapper@plt>
mov    %eax,%edi
call   1030 <Pl_Exit_With_Value@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
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 @Main_Wrapper(i32 %6, i8** %7)
%9 = call i32 @Pl_Exit_With_Value(i32 %8)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @Main_Wrapper(i32 %0, i8** %1)
%4 = tail call i32 @Pl_Exit_With_Value(i32 %3)
ret i32 0
}
int update_io_ticks(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @update_io_ticks() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ outportb(int, int);
void init_serial() {
  outportb(0x3F8 + 1, 0x00);
  outportb(0x3F8 + 3, 0x80);
  outportb(0x3F8 + 0, 0x03);
  outportb(0x3F8 + 1, 0x00);
  outportb(0x3F8 + 3, 0x03);
  outportb(0x3F8 + 2, 0xC7);
  outportb(0x3F8 + 4, 0x0B);
}


x86 assembly (clang, -O0):
<init_serial>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3f9,%edi
xor    %esi,%esi
call   1030 <outportb@plt>
mov    $0x3fb,%edi
mov    $0x80,%esi
call   1030 <outportb@plt>
mov    $0x3f8,%edi
mov    $0x3,%esi
call   1030 <outportb@plt>
mov    $0x3f9,%edi
xor    %esi,%esi
call   1030 <outportb@plt>
mov    $0x3fb,%edi
mov    $0x3,%esi
call   1030 <outportb@plt>
mov    $0x3fa,%edi
mov    $0xc7,%esi
call   1030 <outportb@plt>
mov    $0x3fc,%edi
mov    $0xb,%esi
call   1030 <outportb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_serial>:
push   %rax
mov    $0x3f9,%edi
xor    %esi,%esi
call   1030 <outportb@plt>
mov    $0x3fb,%edi
mov    $0x80,%esi
call   1030 <outportb@plt>
mov    $0x3f8,%edi
mov    $0x3,%esi
call   1030 <outportb@plt>
mov    $0x3f9,%edi
xor    %esi,%esi
call   1030 <outportb@plt>
mov    $0x3fb,%edi
mov    $0x3,%esi
call   1030 <outportb@plt>
mov    $0x3fa,%edi
mov    $0xc7,%esi
call   1030 <outportb@plt>
mov    $0x3fc,%edi
mov    $0xb,%esi
pop    %rax
jmp    1030 <outportb@plt>

LLVM IR (-O0):
define void @init_serial() {
%1 = call i32 @outportb(i32 1017, i32 0)
%2 = call i32 @outportb(i32 1019, i32 128)
%3 = call i32 @outportb(i32 1016, i32 3)
%4 = call i32 @outportb(i32 1017, i32 0)
%5 = call i32 @outportb(i32 1019, i32 3)
%6 = call i32 @outportb(i32 1018, i32 199)
%7 = call i32 @outportb(i32 1020, i32 11)
ret void
}

LLVM IR (-O2):
define void @init_serial() {
%1 = tail call i32 @outportb(i32 1017, i32 0)
%2 = tail call i32 @outportb(i32 1019, i32 128)
%3 = tail call i32 @outportb(i32 1016, i32 3)
%4 = tail call i32 @outportb(i32 1017, i32 0)
%5 = tail call i32 @outportb(i32 1019, i32 3)
%6 = tail call i32 @outportb(i32 1018, i32 199)
%7 = tail call i32 @outportb(i32 1020, i32 11)
ret void
}
void replace_char(char *str, char from, char to) {
  while (*str != 0) {
    if (*str == from)
      *str = to;
    ++str;
  }
}


x86 assembly (clang, -O0):
<replace_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1150 <replace_char+0x50>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x9(%rbp),%ecx
cmp    %ecx,%eax
jne    113f <replace_char+0x3f>
mov    -0xa(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1113 <replace_char+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<replace_char>:
mov    (%rdi),%al
test   %al,%al
je     1125 <replace_char+0x25>
add    $0x1,%rdi
jmp    111b <replace_char+0x1b>
nopl   0x0(%rax)
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
je     1125 <replace_char+0x25>
cmp    %sil,%al
jne    1110 <replace_char+0x10>
mov    %dl,-0x1(%rdi)
jmp    1110 <replace_char+0x10>
ret

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

LLVM IR (-O2):
define void @replace_char(i8* nocapture %0, i8 signext %1, i8 signext %2) {
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %15, label %6
6: ; preds = %3, %11
%7 = phi i8 [ %13, %11 ], [ %4, %3 ]
%8 = phi i8* [ %12, %11 ], [ %0, %3 ]
%9 = icmp eq i8 %7, %1
br i1 %9, label %10, label %11
10: ; preds = %6
store i8 %2, i8* %8
br label %11
11: ; preds = %10, %6
%12 = getelementptr inbounds i8, i8* %8, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %6
15: ; preds = %11, %3
ret void
}
/* Variables and functions */
int foo2(int);
int bar(int x) { return foo2(x) * 3; }


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

x86 assembly (clang, -O2):
<bar>:
push   %rax
call   1030 <foo2@plt>
lea    (%rax,%rax,2),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @bar(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @foo2(i32 %3)
%5 = mul nsw i32 %4, 3
ret i32 %5
}

LLVM IR (-O2):
define i32 @bar(i32 %0) {
%2 = tail call i32 @foo2(i32 %0)
%3 = mul nsw i32 %2, 3
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
int getc(int /*<<< orphan*/ *);
int /*<<< orphan*/ putc(int, int /*<<< orphan*/ *);
void filecpy(FILE *from, FILE *to) {
  int c;
  while ((c = getc(from)) != EOF) {
    putc(c, to);
  }
}


x86 assembly (clang, -O0):
<filecpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <getc@plt>
mov    %eax,-0x14(%rbp)
mov    0x2ea5(%rip),%rcx
cmp    (%rcx),%eax
je     115c <filecpy+0x3c>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <putc@plt>
jmp    1130 <filecpy+0x10>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<filecpy>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <getc@plt>
mov    0x2eb1(%rip),%r15
cmp    (%r15),%eax
je     1157 <filecpy+0x37>
nopl   0x0(%rax)
mov    %eax,%edi
mov    %r14,%rsi
call   1030 <putc@plt>
mov    %rbx,%rdi
call   1040 <getc@plt>
cmp    (%r15),%eax
jne    1140 <filecpy+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@EOF = global i32 0
define void @filecpy(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
br label %6
6: ; preds = %11, %2
%7 = load i32*, i32** %3
%8 = call i32 @getc(i32* %7)
store i32 %8, i32* %5
%9 = load i32, i32* @EOF
%10 = icmp ne i32 %8, %9
br i1 %10, label %11, label %15
11: ; preds = %6
%12 = load i32, i32* %5
%13 = load i32*, i32** %4
%14 = call i32 @putc(i32 %12, i32* %13)
br label %6
15: ; preds = %6
ret void
}

LLVM IR (-O2):
@EOF = global i32 0
define void @filecpy(i32* nocapture %0, i32* nocapture %1) {
%3 = tail call i32 @getc(i32* %0)
%4 = load i32, i32* @EOF
%5 = icmp eq i32 %3, %4
br i1 %5, label %12, label %6
6: ; preds = %2, %6
%7 = phi i32 [ %9, %6 ], [ %3, %2 ]
%8 = tail call i32 @putc(i32 %7, i32* %1)
%9 = tail call i32 @getc(i32* %0)
%10 = load i32, i32* @EOF
%11 = icmp eq i32 %9, %10
br i1 %11, label %12, label %6
12: ; preds = %6, %2
ret void
}
int c031(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @c031() {
ret i32 0
}
int pixelComparator(const void *aV, const void *bV) {
  const double *a = (const double *)aV;
  const double *b = (const double *)bV;
  if (*a < *b)
    return -1;
  if (*a > *b)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<pixelComparator>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jbe    1142 <pixelComparator+0x42>
movl   $0xffffffff,-0x4(%rbp)
jmp    116b <pixelComparator+0x6b>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x28(%rbp),%rax
ucomisd (%rax),%xmm0
jbe    1164 <pixelComparator+0x64>
movl   $0x1,-0x4(%rbp)
jmp    116b <pixelComparator+0x6b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pixelComparator>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
xor    %ecx,%ecx
ucomisd %xmm1,%xmm0
seta   %cl
ucomisd %xmm0,%xmm1
mov    $0xffffffff,%eax
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define i32 @pixelComparator(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca double*
%7 = alloca double*
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to double*
store double* %9, double** %6
%10 = load i8*, i8** %5
%11 = bitcast i8* %10 to double*
store double* %11, double** %7
%12 = load double*, double** %6
%13 = load double, double* %12
%14 = load double*, double** %7
%15 = load double, double* %14
%16 = fcmp olt double %13, %15
br i1 %16, label %17, label %18
17: ; preds = %2
store i32 -1, i32* %3
br label %26
18: ; preds = %2
%19 = load double*, double** %6
%20 = load double, double* %19
%21 = load double*, double** %7
%22 = load double, double* %21
%23 = fcmp ogt double %20, %22
br i1 %23, label %24, label %25
24: ; preds = %18
store i32 1, i32* %3
br label %26
25: ; preds = %18
store i32 0, i32* %3
br label %26
26: ; preds = %25, %24, %17
%27 = load i32, i32* %3
ret i32 %27
}

LLVM IR (-O2):
define i32 @pixelComparator(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = bitcast i8* %1 to double*
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp olt double %5, %6
%8 = fcmp ogt double %5, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
int Hash(char *name, int nEntries) {
  register int val = 0;
  while (*name)
    val += *name++;
  if (val < 0)
    val = -val;
  return (val % nEntries);
}


x86 assembly (clang, -O0):
<Hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     113c <Hash+0x3c>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <Hash+0x12>
cmpl   $0x0,-0x10(%rbp)
jge    114e <Hash+0x4e>
xor    %eax,%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Hash>:
mov    (%rdi),%al
test   %al,%al
je     1122 <Hash+0x22>
add    $0x1,%rdi
xor    %ecx,%ecx
nopl   0x0(%rax)
movsbl %al,%eax
add    %eax,%ecx
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
jne    1110 <Hash+0x10>
jmp    1124 <Hash+0x24>
xor    %ecx,%ecx
mov    %ecx,%eax
neg    %eax
cmovs  %ecx,%eax
cltd
idiv   %esi
mov    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @Hash(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %14, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %12, %5 ], [ %3, %2 ]
%7 = phi i32 [ %11, %5 ], [ 0, %2 ]
%8 = phi i8* [ %9, %5 ], [ %0, %2 ]
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = sext i8 %6 to i32
%11 = add nsw i32 %7, %10
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %5
14: ; preds = %5, %2
%15 = phi i32 [ 0, %2 ], [ %11, %5 ]
%16 = tail call i32 @llvm.abs.i32(i32 %15, i1 true)
%17 = srem i32 %16, %1
ret i32 %17
}
/* Variables and functions */
scalar_t__ atan2(double, double);
long double atan2l(long double x, long double y) {
  return (long double)atan2((double)x, (double)y);
}


x86 assembly (clang, -O0):
<atan2l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fstpl  -0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
fldt   -0x20(%rbp)
fstpl  -0x30(%rbp)
movsd  -0x30(%rbp),%xmm1
call   1030 <atan2@plt>
mov    %rax,-0x28(%rbp)
fildll -0x28(%rbp)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atan2l>:
sub    $0x18,%rsp
fldt   0x30(%rsp)
fldt   0x20(%rsp)
fstpl  0x8(%rsp)
movsd  0x8(%rsp),%xmm0
fstpl  (%rsp)
movsd  (%rsp),%xmm1
call   1030 <atan2@plt>
mov    %rax,0x10(%rsp)
fildll 0x10(%rsp)
add    $0x18,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @atan2l(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load x86_fp80, x86_fp80* %3
%6 = fptrunc x86_fp80 %5 to double
%7 = load x86_fp80, x86_fp80* %4
%8 = fptrunc x86_fp80 %7 to double
%9 = call i64 @atan2(double %6, double %8)
%10 = sitofp i64 %9 to x86_fp80
ret x86_fp80 %10
}

LLVM IR (-O2):
define x86_fp80 @atan2l(x86_fp80 %0, x86_fp80 %1) {
%3 = fptrunc x86_fp80 %0 to double
%4 = fptrunc x86_fp80 %1 to double
%5 = tail call i64 @atan2(double %3, double %4)
%6 = sitofp i64 %5 to x86_fp80
ret x86_fp80 %6
}
void gtk_combo_box_get_row_separator_func() {}


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

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

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

LLVM IR (-O2):
define void @gtk_combo_box_get_row_separator_func() {
ret void
}
void foo508() {}


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

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

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

LLVM IR (-O2):
define void @foo508() {
ret void
}
int test_imm_D3uint8_reg(unsigned char val) {
  return ((val) & (-0xD3 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_D3uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 45
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
char *ce_gen_creation_time(int /*<<< orphan*/);
int /*<<< orphan*/ current_time();
char *ce_gen_current_time(void) { return ce_gen_creation_time(current_time()); }


x86 assembly (clang, -O0):
<ce_gen_current_time>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <current_time@plt>
mov    %eax,%edi
call   1030 <ce_gen_creation_time@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ce_gen_current_time>:
push   %rax
xor    %eax,%eax
call   1040 <current_time@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <ce_gen_creation_time@plt>

LLVM IR (-O0):
define i8* @ce_gen_current_time() {
%1 = call i32 (...) @current_time()
%2 = call i8* @ce_gen_creation_time(i32 %1)
ret i8* %2
}

LLVM IR (-O2):
define i8* @ce_gen_current_time() {
%1 = tail call i32 (...) @current_time()
%2 = tail call i8* @ce_gen_creation_time(i32 %1)
ret i8* %2
}
/* Type definitions */
struct vecbool {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ vecbool_resize__(struct vecbool *, size_t,
                                    int /*<<< orphan*/);
void vecbool_resize(struct vecbool *v, size_t new_count) {
  vecbool_resize__(v, new_count, 0);
}


x86 assembly (clang, -O0):
<vecbool_resize>:
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    %edx,%edx
call   1030 <vecbool_resize__@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vecbool_resize>:
xor    %edx,%edx
jmp    1030 <vecbool_resize__@plt>

LLVM IR (-O0):
%struct.vecbool = type { i32 }
define void @vecbool_resize(%struct.vecbool* %0, i64 %1) {
%3 = alloca %struct.vecbool*
%4 = alloca i64
store %struct.vecbool* %0, %struct.vecbool** %3
store i64 %1, i64* %4
%5 = load %struct.vecbool*, %struct.vecbool** %3
%6 = load i64, i64* %4
%7 = call i32 @vecbool_resize__(%struct.vecbool* %5, i64 %6, i32 0)
ret void
}

LLVM IR (-O2):
%struct.vecbool = type { i32 }
define void @vecbool_resize(%struct.vecbool* %0, i64 %1) {
%3 = tail call i32 @vecbool_resize__(%struct.vecbool* %0, i64 %1, i32 0)
ret void
}
int device_probe(struct device *dev) { int err; }


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

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

LLVM IR (-O0):
%struct.device = type opaque
define i32 @device_probe(%struct.device* %0) {
%2 = alloca i32
%3 = alloca %struct.device*
%4 = alloca i32
store %struct.device* %0, %struct.device** %3
%5 = load i32, i32* %2
ret i32 %5
}

LLVM IR (-O2):
%struct.device = type opaque
define i32 @device_probe(%struct.device* nocapture readnone %0) {
ret i32 undef
}
/* Variables and functions */
long utilSendMailByProfileID(int, char *, char *, char *);
long utilSendMail(char *toAccount, char *subject, char *context) {
  return utilSendMailByProfileID(-1, toAccount, subject, context);
}


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

x86 assembly (clang, -O2):
<utilSendMail>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0xffffffff,%edi
jmp    1030 <utilSendMailByProfileID@plt>

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

LLVM IR (-O2):
define i64 @utilSendMail(i8* %0, i8* %1, i8* %2) {
%4 = tail call i64 @utilSendMailByProfileID(i32 -1, i8* %0, i8* %1, i8* %2)
ret i64 %4
}
int xtensa_uimm8(v)
int v;
{ return v >= 0 && v <= 255; }


x86 assembly (clang, -O0):
<xtensa_uimm8>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1123 <xtensa_uimm8+0x23>
cmpl   $0xff,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xtensa_uimm8>:
xor    %eax,%eax
cmp    $0x100,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @xtensa_uimm8(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 255
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @xtensa_uimm8(i32 %0) {
%2 = icmp ult i32 %0, 256
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ newline();
int /*<<< orphan*/ output_with_tab(char *);
void gen_jump_case(void) {
  output_with_tab("jmp _case");
  newline();
}


x86 assembly (clang, -O0):
<gen_jump_case>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <output_with_tab@plt>
mov    $0x0,%al
call   1030 <newline@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_jump_case>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <output_with_tab@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <newline@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"jmp _case\00"
define void @gen_jump_case() {
%1 = call i32 @output_with_tab(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @newline()
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"jmp _case\00"
define void @gen_jump_case() {
%1 = tail call i32 @output_with_tab(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @newline()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ put_fork(int);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ take_fork(int);
void *philospher(void *num) {
  while (1) {
    int *i = num;
    sleep(1);
    take_fork(*i);
    sleep(0);
    put_fork(*i);
  }
}


x86 assembly (clang, -O0):
<philospher>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x1,%edi
call   1050 <sleep@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
call   1040 <take_fork@plt>
xor    %edi,%edi
call   1050 <sleep@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
call   1030 <put_fork@plt>
jmp    113c <philospher+0xc>

x86 assembly (clang, -O2):
<philospher>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0x1,%edi
call   1050 <sleep@plt>
mov    (%rbx),%edi
call   1040 <take_fork@plt>
xor    %edi,%edi
call   1050 <sleep@plt>
mov    (%rbx),%edi
call   1030 <put_fork@plt>
jmp    1140 <philospher+0x10>

LLVM IR (-O0):
define i8* @philospher(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
br label %4
4: ; preds = %1, %4
%5 = load i8*, i8** %2
%6 = bitcast i8* %5 to i32*
store i32* %6, i32** %3
%7 = call i32 @sleep(i32 1)
%8 = load i32*, i32** %3
%9 = load i32, i32* %8
%10 = call i32 @take_fork(i32 %9)
%11 = call i32 @sleep(i32 0)
%12 = load i32*, i32** %3
%13 = load i32, i32* %12
%14 = call i32 @put_fork(i32 %13)
br label %4
}

LLVM IR (-O2):
define noalias i8* @philospher(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
br label %3
3: ; preds = %1, %3
%4 = tail call i32 @sleep(i32 1)
%5 = load i32, i32* %2
%6 = tail call i32 @take_fork(i32 %5)
%7 = tail call i32 @sleep(i32 0)
%8 = load i32, i32* %2
%9 = tail call i32 @put_fork(i32 %8)
br label %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0x97() {
  Assert_real((isgraph(151) == 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_isgraph.c",
              760, ("isgraph should be 0 for 0x97"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0x97>:
push   %rax
mov    $0x97,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2f8,%edx
pop    %rax
jmp    1030 <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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0x97\00"
define void @t_isgraph_0x97() {
%1 = call i64 @isgraph(i32 151)
%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 760, 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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0x97\00"
define void @t_isgraph_0x97() {
%1 = tail call i64 @isgraph(i32 151)
%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 760, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(unsigned long);
int /*<<< orphan*/ printf(char *, int, unsigned long);
__attribute__((__noreturn__)) void exitfunc9(int status, void *arg) {
  printf("Executing exitfunc"
         "9"
         " (status=%d, arg=%lu)\n",
         status, (unsigned long)arg);
  exit((unsigned long)arg);
}


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

x86 assembly (clang, -O2):
<exitfunc9>:
push   %rbx
mov    %rsi,%rbx
mov    %edi,%esi
lea    0xed3(%rip),%rdi
mov    %rbx,%rdx
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"Executing exitfunc9 (status=%d, arg=%lu)\0A\00"
define void @exitfunc9(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 = ptrtoint i8* %6 to i64
%8 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %5, i64 %7)
%9 = load i8*, i8** %4
%10 = ptrtoint i8* %9 to i64
%11 = call i32 @exit(i64 %10)
unreachable
}

LLVM IR (-O2):
@.str = [42 x i8] c"Executing exitfunc9 (status=%d, arg=%lu)\0A\00"
define void @exitfunc9(i32 %0, i8* %1) {
%3 = ptrtoint i8* %1 to i64
%4 = tail call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %0, i64 %3)
%5 = tail call i32 @exit(i64 %3)
unreachable
}
int query_drive(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @query_drive() {
ret i32 0
}
int foo3(int *A, int N) { return A[3 * N]; }


x86 assembly (clang, -O0):
<foo3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
imul   $0x3,-0xc(%rbp),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo3>:
lea    (%rsi,%rsi,2),%eax
cltq
mov    (%rdi,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @foo3(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = load i32, i32* %4
%7 = mul nsw i32 3, %6
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i32, i32* %5, i64 %8
%10 = load i32, i32* %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @foo3(i32* nocapture %0, i32 %1) {
%3 = mul nsw i32 %1, 3
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
ret i32 %6
}
/* Variables and functions */
int iotapi_queue_command(char *);
int iotapi_handler_restart(void) {
  char command[3] = "rs";
  int ret = iotapi_queue_command(command);
  if (ret < 0) {
    ;
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<iotapi_handler_restart>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xee1(%rip),%ax
mov    %ax,-0x7(%rbp)
mov    0xed9(%rip),%al
mov    %al,-0x5(%rbp)
lea    -0x7(%rbp),%rdi
call   1030 <iotapi_queue_command@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    114e <iotapi_handler_restart+0x3e>
movl   $0xffffffff,-0x4(%rbp)
jmp    1155 <iotapi_handler_restart+0x45>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iotapi_handler_restart>:
push   %rax
movb   $0x0,0x6(%rsp)
movw   $0x7372,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <iotapi_queue_command@plt>
sar    $0x1f,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.iotapi_handler_restart.command = [3 x i8] c"rs\00"
define i32 @iotapi_handler_restart() {
%1 = alloca i32
%2 = alloca [3 x i8]
%3 = alloca i32
%4 = bitcast [3 x i8]* %2 to i8*
%5 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 0
%6 = call i32 @iotapi_queue_command(i8* %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %0
store i32 -1, i32* %1
br label %11
10: ; preds = %0
store i32 0, i32* %1
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
@__const.iotapi_handler_restart.command = [3 x i8] c"rs\00"
define i32 @iotapi_handler_restart() {
%1 = alloca [3 x i8]
%2 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 0
%3 = call i32 @iotapi_queue_command(i8* %2)
%4 = ashr i32 %3, 31
ret i32 %4
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ icon_y;
};
typedef TYPE_1__ XWMHints;

/* Variables and functions */
int get_XWMHints_icon_y(void *_p) { return (int)((XWMHints *)_p)->icon_y; }


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

x86 assembly (clang, -O2):
<get_XWMHints_icon_y>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XWMHints_icon_y(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_XWMHints_icon_y(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
int strcmp(const char *l, const char *r) {
  for (; *l == *r && *l; l++, r++) {
  }
  return *(unsigned char *)l - *(unsigned char *)r;
}


x86 assembly (clang, -O0):
<strcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    -0x10(%rbp),%rax
movsbl (%rax),%edx
xor    %eax,%eax
cmp    %edx,%ecx
mov    %al,-0x11(%rbp)
jne    1137 <strcmp+0x37>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1147 <strcmp+0x47>
jmp    1169 <strcmp+0x69>
jmp    114c <strcmp+0x4c>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110c <strcmp+0xc>
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movzbl (%rcx),%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp>:
mov    (%rdi),%al
mov    (%rsi),%cl
test   %al,%al
je     1134 <strcmp+0x34>
cmp    %cl,%al
jne    1134 <strcmp+0x34>
mov    $0x1,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movzbl (%rdi,%rdx,1),%eax
movzbl (%rsi,%rdx,1),%ecx
test   %al,%al
je     1134 <strcmp+0x34>
add    $0x1,%rdx
cmp    %cl,%al
je     1120 <strcmp+0x20>
movzbl %al,%eax
movzbl %cl,%ecx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @strcmp(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 = %21, %2
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = load i8*, i8** %4
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %8, %11
br i1 %12, label %13, label %18
13: ; preds = %5
%14 = load i8*, i8** %3
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp ne i32 %16, 0
br label %18
18: ; preds = %13, %5
%19 = phi i1 [ false, %5 ], [ %17, %13 ]
br i1 %19, label %20, label %26
20: ; preds = %18
br label %21
21: ; preds = %20
%22 = load i8*, i8** %3
%23 = getelementptr inbounds i8, i8* %22, i32 1
store i8* %23, i8** %3
%24 = load i8*, i8** %4
%25 = getelementptr inbounds i8, i8* %24, i32 1
store i8* %25, i8** %4
br label %5
26: ; preds = %18
%27 = load i8*, i8** %3
%28 = load i8, i8* %27
%29 = zext i8 %28 to i32
%30 = load i8*, i8** %4
%31 = load i8, i8* %30
%32 = zext i8 %31 to i32
%33 = sub nsw i32 %29, %32
ret i32 %33
}

LLVM IR (-O2):
define i32 @strcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
%5 = icmp ne i8 %3, %4
%6 = icmp eq i8 %3, 0
%7 = or i1 %6, %5
br i1 %7, label %18, label %8
8: ; preds = %2, %8
%9 = phi i8* [ %12, %8 ], [ %1, %2 ]
%10 = phi i8* [ %11, %8 ], [ %0, %2 ]
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = getelementptr inbounds i8, i8* %9, i64 1
%13 = load i8, i8* %11
%14 = load i8, i8* %12
%15 = icmp ne i8 %13, %14
%16 = icmp eq i8 %13, 0
%17 = or i1 %16, %15
br i1 %17, label %18, label %8
18: ; preds = %8, %2
%19 = phi i8 [ %3, %2 ], [ %13, %8 ]
%20 = phi i8 [ %4, %2 ], [ %14, %8 ]
%21 = zext i8 %19 to i32
%22 = zext i8 %20 to i32
%23 = sub nsw i32 %21, %22
ret i32 %23
}
int main01(void) {
  int a1;
  int a2;
  int a3;
  int a4;
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main01() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
ret i32 0
}

LLVM IR (-O2):
define i32 @main01() {
ret i32 0
}
void construct_path(const char *path, int proc_id, char *rest) {
  char str_temp[100];
  sprintf(str_temp, "%s%d%s", path, proc_id, rest);
  strcpy(rest, str_temp);
}


x86 assembly (clang, -O0):
<construct_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x80(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%r8
lea    0xeb4(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
mov    -0x18(%rbp),%rdi
lea    -0x80(%rbp),%rsi
call   1030 <strcpy@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<construct_path>:
push   %r14
push   %rbx
sub    $0x68,%rsp
mov    %rdx,%rbx
mov    %esi,%ecx
mov    %rdi,%rdx
lea    0xeca(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
mov    %rbx,%r8
xor    %eax,%eax
call   1040 <sprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
add    $0x68,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%s%d%s\00"
define void @construct_path(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
%7 = alloca [100 x i8]
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %7, i64 0, i64 0
%9 = load i8*, i8** %4
%10 = load i32, i32* %5
%11 = load i8*, i8** %6
%12 = call i32 (i8*, i8*, ...) @sprintf(i8* %8, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %9, i32 %10, i8* %11)
%13 = load i8*, i8** %6
%14 = getelementptr inbounds [100 x i8], [100 x i8]* %7, i64 0, i64 0
%15 = call i8* @strcpy(i8* %13, i8* %14)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%s%d%s\00"
define void @construct_path(i8* %0, i32 %1, i8* %2) {
%4 = alloca [100 x i8]
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%6 = call i32 (i8*, i8*, ...) @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1, i8* %2)
%7 = call i8* @strcpy(i8* dereferenceable(1) %2, i8* %5)
ret void
}
length(line) register char *line;
{
  register int i = 1;
  while (*line++ != '\n')
    i++;
  return i;
}


x86 assembly (clang, -O0):
<length>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
cmp    $0xa,%eax
je     1138 <length+0x38>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <length+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<length>:
mov    $0x1,%eax
cmpb   $0xa,(%rdi)
je     111a <length+0x1a>
mov    $0x1,%eax
nop
cmpb   $0xa,(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <length+0x10>
ret

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

LLVM IR (-O2):
define i32 @length(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 10
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 1, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add nuw nsw i32 %5, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 10
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 1, %1 ], [ %8, %4 ]
ret i32 %12
}
void devo_setbuf(void *stream, char *buf) {
  (void)stream;
  (void)buf;
}


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

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

LLVM IR (-O0):
define void @devo_setbuf(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
ret void
}

LLVM IR (-O2):
define void @devo_setbuf(i8* nocapture %0, i8* nocapture %1) {
ret void
}
void foo593(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo593(i32 %0) {
ret void
}
int distanciaPercorrida(int rotation) {
  float pi = 3.14;
  float radius = 5.75;
  int holes = 608;
  int distance = (2 * pi * (radius / holes) * rotation);
  return distance;
}


x86 assembly (clang, -O0):
<distanciaPercorrida>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movss  0xef9(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xee8(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movl   $0x260,-0x10(%rbp)
movss  0xed0(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
cvtsi2ssl -0x10(%rbp),%xmm2
divss  %xmm2,%xmm1
mulss  %xmm1,%xmm0
cvtsi2ssl -0x4(%rbp),%xmm1
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<distanciaPercorrida>:
cvtsi2ss %edi,%xmm0
mulss  0xef4(%rip),%xmm0
cvttss2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @distanciaPercorrida(i32 %0) {
%2 = alloca i32
%3 = alloca float
%4 = alloca float
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %2
store float 0x40091EB860000000, float* %3
store float 5.750000e+00, float* %4
store i32 608, i32* %5
%7 = load float, float* %3
%8 = fmul float 2.000000e+00, %7
%9 = load float, float* %4
%10 = load i32, i32* %5
%11 = sitofp i32 %10 to float
%12 = fdiv float %9, %11
%13 = fmul float %8, %12
%14 = load i32, i32* %2
%15 = sitofp i32 %14 to float
%16 = fmul float %13, %15
%17 = fptosi float %16 to i32
store i32 %17, i32* %6
%18 = load i32, i32* %6
ret i32 %18
}

LLVM IR (-O2):
define i32 @distanciaPercorrida(i32 %0) {
%2 = sitofp i32 %0 to float
%3 = fmul float %2, 0x3FAE688E60000000
%4 = fptosi float %3 to i32
ret i32 %4
}