xunge/DecIR huggingface dataset:
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ printf(char *);
int main() {
  int c;
  while ((c = getchar()) != EOF) {
  }
  printf("getchar() != EOF :%d\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2ea8(%rip),%rcx
cmp    (%rcx),%eax
je     114d <main+0x2d>
jmp    112f <main+0xf>
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x2ec0(%rip),%rbx
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%rbx),%eax
jne    1130 <main+0x10>
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i32 0
@.str = [22 x i8] c"getchar() != EOF :%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %7, %0
%4 = call i32 (...) @getchar()
store i32 %4, i32* %2
%5 = load i32, i32* @EOF
%6 = icmp ne i32 %4, %5
br i1 %6, label %7, label %8
7: ; preds = %3
br label %3
8: ; preds = %3
%9 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@EOF = global i32 0
@.str = [22 x i8] c"getchar() != EOF :%d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @getchar()
%3 = load i32, i32* @EOF
%4 = icmp eq i32 %2, %3
br i1 %4, label %5, label %1
5: ; preds = %1
%6 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void const *, size_t);
void *Memcpy(void *dest, const void *src, size_t n) { memcpy(dest, src, n); }


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

x86 assembly (clang, -O2):
<Memcpy>:
jmp    1030 <memcpy@plt>

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

LLVM IR (-O2):
define noalias i8* @Memcpy(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @memcpy(i8* %0, i8* %1, i64 %2)
ret i8* undef
}
/* Variables and functions */
void *realloc(void *, size_t);
void *mpack_realloc(void *old_ptr, size_t used_size, size_t new_size) {
  ((void)(used_size));
  return realloc(old_ptr, new_size);
}


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

x86 assembly (clang, -O2):
<mpack_realloc>:
mov    %rdx,%rsi
jmp    1030 <realloc@plt>

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

LLVM IR (-O2):
define noalias i8* @mpack_realloc(i8* nocapture %0, i64 %1, i64 %2) {
%4 = tail call i8* @realloc(i8* %0, i64 %2)
ret i8* %4
}
/* Type definitions */
struct fi_provider {
  int dummy;
};

/* Variables and functions */
int fi_param_get(struct fi_provider *, char const *, int *);
int fi_param_get_int(struct fi_provider *provider, const char *param_name,
                     int *value) {
  return fi_param_get(provider, param_name, value);
}


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

x86 assembly (clang, -O2):
<fi_param_get_int>:
jmp    1030 <fi_param_get@plt>

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

LLVM IR (-O2):
%struct.fi_provider = type { i32 }
define i32 @fi_param_get_int(%struct.fi_provider* %0, i8* %1, i32* %2) {
%4 = tail call i32 @fi_param_get(%struct.fi_provider* %0, i8* %1, i32* %2)
ret i32 %4
}
/* Variables and functions */
char *getDate();
int sprintf(char *, char *, char *, char *, char *);
int printReportHeader(char *text) {
  return sprintf(text, "%s %s %s", "Expenses", getDate(), "\n");
}


x86 assembly (clang, -O0):
<printReportHeader>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <getDate@plt>
mov    -0x10(%rbp),%rdi
mov    %rax,%rcx
lea    0xeb7(%rip),%rsi
lea    0xeb9(%rip),%rdx
lea    0xebb(%rip),%r8
call   1040 <sprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printReportHeader>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <getDate@plt>
lea    0xece(%rip),%rsi
lea    0xed0(%rip),%rdx
lea    0xed2(%rip),%r8
mov    %rbx,%rdi
mov    %rax,%rcx
pop    %rbx
jmp    1040 <sprintf@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"%s %s %s\00"
@.str.1 = [9 x i8] c"Expenses\00"
@.str.2 = [2 x i8] c"\0A\00"
define i32 @printReportHeader(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* (...) @getDate()
%5 = call i32 @sprintf(i8* %3, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret i32 %5
}

LLVM IR (-O2):
@.str = [9 x i8] c"%s %s %s\00"
@.str.1 = [9 x i8] c"Expenses\00"
@.str.2 = [2 x i8] c"\0A\00"
define i32 @printReportHeader(i8* nocapture writeonly %0) {
%2 = tail call i8* (...) @getDate()
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
int fgetc(int /*<<< orphan*/ *);
scalar_t__ isspace(int);
int /*<<< orphan*/ ungetc(int, int /*<<< orphan*/ *);
void skipWhiteSpace(FILE *fp) {
  int ch;
  while ((ch = fgetc(fp)) != EOF && isspace(ch))
    continue;
  ungetc(ch, fp);
}


x86 assembly (clang, -O0):
<skipWhiteSpace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,%ecx
mov    %ecx,-0xc(%rbp)
xor    %eax,%eax
mov    0x2e95(%rip),%rdx
cmp    (%rdx),%ecx
mov    %al,-0xd(%rbp)
je     1170 <skipWhiteSpace+0x40>
mov    -0xc(%rbp),%edi
call   1040 <isspace@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1180 <skipWhiteSpace+0x50>
jmp    1185 <skipWhiteSpace+0x55>
jmp    113c <skipWhiteSpace+0xc>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%rsi
call   1050 <ungetc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skipWhiteSpace>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
mov    0x2eaa(%rip),%r14
xchg   %ax,%ax
mov    %rbx,%rdi
call   1030 <fgetc@plt>
mov    %eax,%ebp
cmp    (%r14),%eax
je     115b <skipWhiteSpace+0x2b>
mov    %ebp,%edi
call   1040 <isspace@plt>
test   %rax,%rax
jne    1140 <skipWhiteSpace+0x10>
mov    %ebp,%edi
mov    %rbx,%rsi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1050 <ungetc@plt>

LLVM IR (-O0):
@EOF = global i32 0
define void @skipWhiteSpace(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
br label %4
4: ; preds = %15, %1
%5 = load i32*, i32** %2
%6 = call i32 @fgetc(i32* %5)
store i32 %6, i32* %3
%7 = load i32, i32* @EOF
%8 = icmp ne i32 %6, %7
br i1 %8, label %9, label %13
9: ; preds = %4
%10 = load i32, i32* %3
%11 = call i64 @isspace(i32 %10)
%12 = icmp ne i64 %11, 0
br label %13
13: ; preds = %9, %4
%14 = phi i1 [ false, %4 ], [ %12, %9 ]
br i1 %14, label %15, label %16
15: ; preds = %13
br label %4
16: ; preds = %13
%17 = load i32, i32* %3
%18 = load i32*, i32** %2
%19 = call i32 @ungetc(i32 %17, i32* %18)
ret void
}

LLVM IR (-O2):
@EOF = global i32 0
define void @skipWhiteSpace(i32* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = tail call i32 @fgetc(i32* %0)
%4 = load i32, i32* @EOF
%5 = icmp eq i32 %3, %4
br i1 %5, label %9, label %6
6: ; preds = %2
%7 = tail call i64 @isspace(i32 %3)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %2
9: ; preds = %2, %6
%10 = tail call i32 @ungetc(i32 %3, i32* %0)
ret void
}
/* Type definitions */
typedef scalar_t__ uint16_t;
typedef scalar_t__ const int32_t;

/* Variables and functions */
int32_t uint16p_comparator(const void *pl, const void *pr) {
  return *(const uint16_t *)pl - *(const uint16_t *)pr;
}


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

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

LLVM IR (-O0):
define i64 @uint16p_comparator(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 = bitcast i8* %5 to i64*
%7 = load i64, i64* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i64*
%10 = load i64, i64* %9
%11 = sub nsw i64 %7, %10
ret i64 %11
}

LLVM IR (-O2):
define i64 @uint16p_comparator(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = sub nsw i64 %4, %6
ret i64 %7
}
/* Variables and functions */
size_t utilities_multiply_round_up(size_t s, double ratio) {
  double d = s * ratio;
  if (d != (int)d)
    return (int)d + 1;
  else
    return (int)d;
}


x86 assembly (clang, -O0):
<utilities_multiply_round_up>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
movaps 0xeec(%rip),%xmm1
movq   -0x10(%rbp),%xmm0
punpckldq %xmm1,%xmm0
movapd 0xeeb(%rip),%xmm1
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
cvttsd2si -0x20(%rbp),%eax
cvtsi2sd %eax,%xmm1
ucomisd %xmm1,%xmm0
jne    1161 <utilities_multiply_round_up+0x61>
jp     1161 <utilities_multiply_round_up+0x61>
jmp    1174 <utilities_multiply_round_up+0x74>
cvttsd2si -0x20(%rbp),%eax
add    $0x1,%eax
cltq
mov    %rax,-0x8(%rbp)
jmp    117f <utilities_multiply_round_up+0x7f>
cvttsd2si -0x20(%rbp),%eax
cltq
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<utilities_multiply_round_up>:
movq   %rdi,%xmm1
punpckldq 0xef3(%rip),%xmm1
subpd  0xefb(%rip),%xmm1
movapd %xmm1,%xmm2
unpckhpd %xmm1,%xmm2
addsd  %xmm1,%xmm2
mulsd  %xmm0,%xmm2
cvttsd2si %xmm2,%eax
cvttpd2dq %xmm2,%xmm0
cvtdq2pd %xmm0,%xmm0
cmpneqsd %xmm2,%xmm0
movq   %xmm0,%rcx
sub    %ecx,%eax
cltq
ret

LLVM IR (-O0):
define i64 @utilities_multiply_round_up(i64 %0, double %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca double
%6 = alloca double
store i64 %0, i64* %4
store double %1, double* %5
%7 = load i64, i64* %4
%8 = uitofp i64 %7 to double
%9 = load double, double* %5
%10 = fmul double %8, %9
store double %10, double* %6
%11 = load double, double* %6
%12 = load double, double* %6
%13 = fptosi double %12 to i32
%14 = sitofp i32 %13 to double
%15 = fcmp une double %11, %14
br i1 %15, label %16, label %21
16: ; preds = %2
%17 = load double, double* %6
%18 = fptosi double %17 to i32
%19 = add nsw i32 %18, 1
%20 = sext i32 %19 to i64
store i64 %20, i64* %3
br label %25
21: ; preds = %2
%22 = load double, double* %6
%23 = fptosi double %22 to i32
%24 = sext i32 %23 to i64
store i64 %24, i64* %3
br label %25
25: ; preds = %21, %16
%26 = load i64, i64* %3
ret i64 %26
}

LLVM IR (-O2):
define i64 @utilities_multiply_round_up(i64 %0, double %1) {
%3 = uitofp i64 %0 to double
%4 = fmul double %3, %1
%5 = fptosi double %4 to i32
%6 = sitofp i32 %5 to double
%7 = fcmp une double %4, %6
%8 = zext i1 %7 to i32
%9 = add nsw i32 %8, %5
%10 = sext i32 %9 to i64
ret i64 %10
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Hello, world!\n");
  return EXIT_SUCCESS;
}


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"Hello, world!\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [14 x i8] c"Hello, world!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_SUCCESS
ret i32 %2
}
void anotherheaderfunc(void) {}


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

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

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

LLVM IR (-O2):
define void @anotherheaderfunc() {
ret void
}
/* Variables and functions */
int print(int /*<<< orphan*/, int *);
int sml_printf(const char *format, ...) {
  register int *varg = (int *)(&format);
  return print(0, varg);
}


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

x86 assembly (clang, -O2):
<sml_printf>:
push   %rax
mov    %rdi,(%rsp)
mov    %rsp,%rsi
xor    %edi,%edi
call   1030 <print@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @sml_printf(i8* %0, ...) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = bitcast i8** %2 to i32*
store i32* %4, i32** %3
%5 = load i32*, i32** %3
%6 = call i32 @print(i32 0, i32* %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @sml_printf(i8* %0, ...) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = bitcast i8** %2 to i32*
%4 = call i32 @print(i32 0, i32* %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, int);
int getHashEstranhoParaEMails(char const *);
int /*<<< orphan*/ stderr;
int main(void) {
  const char email[] = "helton.marx@gmail.com";
  int ret;
  ret = getHashEstranhoParaEMails(email);
  fprintf(stderr, "%s -> hash: %d\n", email, ret);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec5(%rip),%eax
mov    %eax,-0x10(%rbp)
mov    0xebf(%rip),%ax
mov    %ax,-0xc(%rbp)
lea    -0x20(%rbp),%rdi
call   1040 <getHashEstranhoParaEMails@plt>
mov    %eax,-0x24(%rbp)
mov    0x2e74(%rip),%rax
mov    (%rax),%edi
lea    -0x20(%rbp),%rdx
mov    -0x24(%rbp),%ecx
lea    0xe9a(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
movaps 0xed4(%rip),%xmm0
movaps %xmm0,(%rsp)
movabs $0x6d6f632e6c6961,%rax
mov    %rax,0xe(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <getHashEstranhoParaEMails@plt>
mov    0x2e8f(%rip),%rcx
mov    (%rcx),%edi
lea    0xebc(%rip),%rsi
mov    %rbx,%rdx
mov    %eax,%ecx
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.email = [22 x i8] c"helton.marx@gmail.com\00"
@stderr = global i32 0
@.str = [16 x i8] c"%s -> hash: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [22 x i8]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [22 x i8]* %2 to i8*
%5 = getelementptr inbounds [22 x i8], [22 x i8]* %2, i64 0, i64 0
%6 = call i32 @getHashEstranhoParaEMails(i8* %5)
store i32 %6, i32* %3
%7 = load i32, i32* @stderr
%8 = getelementptr inbounds [22 x i8], [22 x i8]* %2, i64 0, i64 0
%9 = load i32, i32* %3
%10 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %8, i32 %9)
ret i32 0
}

LLVM IR (-O2):
@__const.main.email = [22 x i8] c"helton.marx@gmail.com\00"
@stderr = global i32 0
@.str = [16 x i8] c"%s -> hash: %d\0A\00"
define i32 @main() {
%1 = alloca [22 x i8]
%2 = getelementptr inbounds [22 x i8], [22 x i8]* %1, i64 0, i64 0
%3 = call i32 @getHashEstranhoParaEMails(i8* %2)
%4 = load i32, i32* @stderr
%5 = call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %2, i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ eat_space(char **);
int read_separator(char **message) {
  int result = 0;
  eat_space(message);
  if ((**message) == ',') {
    result++;
    ++(*message);
  }
  eat_space(message);
  return result;
}


x86 assembly (clang, -O0):
<read_separator>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <eat_space@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x2c,%eax
jne    1156 <read_separator+0x46>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rdi
call   1030 <eat_space@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_separator>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <eat_space@plt>
mov    (%rbx),%rax
xor    %ebp,%ebp
cmpb   $0x2c,(%rax)
jne    1131 <read_separator+0x21>
add    $0x1,%rax
mov    %rax,(%rbx)
mov    $0x1,%ebp
mov    %rbx,%rdi
call   1030 <eat_space@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @read_separator(i8** %0) {
%2 = tail call i32 @eat_space(i8** %0)
%3 = load i8*, i8** %0
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 44
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = getelementptr inbounds i8, i8* %3, i64 1
store i8* %7, i8** %0
br label %8
8: ; preds = %6, %1
%9 = phi i32 [ 1, %6 ], [ 0, %1 ]
%10 = tail call i32 @eat_space(i8** %0)
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
void tft_rect(uint32_t xpos, uint32_t ypos, uint32_t width, uint32_t height,
              uint16_t color) {
  (void)xpos;
  (void)ypos;
  (void)width;
  (void)height;
  (void)color;
}


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

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

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

LLVM IR (-O2):
define void @tft_rect(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
ret void
}
int foo2(int d) { return d * d; }


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

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

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

LLVM IR (-O2):
define i32 @foo2(i32 %0) {
%2 = mul nsw i32 %0, %0
ret i32 %2
}
unsigned long resource_fixup(struct pci_dev *dev, struct resource *res,
                             unsigned long start, unsigned long size) {
  return start;
}


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

x86 assembly (clang, -O2):
<resource_fixup>:
mov    %rdx,%rax
ret

LLVM IR (-O0):
%struct.pci_dev = type opaque
%struct.resource = type opaque
define i64 @resource_fixup(%struct.pci_dev* %0, %struct.resource* %1, i64 %2, i64 %3) {
%5 = alloca %struct.pci_dev*
%6 = alloca %struct.resource*
%7 = alloca i64
%8 = alloca i64
store %struct.pci_dev* %0, %struct.pci_dev** %5
store %struct.resource* %1, %struct.resource** %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%9 = load i64, i64* %7
ret i64 %9
}

LLVM IR (-O2):
%struct.pci_dev = type opaque
%struct.resource = type opaque
define i64 @resource_fixup(%struct.pci_dev* nocapture readnone %0, %struct.resource* nocapture readnone %1, i64 returned %2, i64 %3) {
ret i64 %2
}
void foo_1_1_2_1_2_2_1_2_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_1_2_1_2_2_1_2_2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0xf8() {
  Assert_real((isalnum(248) == 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_isalnum.c",
              1245, ("isalnum should be 0 for 0xf8"));
}


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

x86 assembly (clang, -O2):
<t_isalnum_0xf8>:
push   %rax
mov    $0xf8,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4dd,%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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xf8\00"
define void @t_isalnum_0xf8() {
%1 = call i64 @isalnum(i32 248)
%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 1245, 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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xf8\00"
define void @t_isalnum_0xf8() {
%1 = tail call i64 @isalnum(i32 248)
%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 1245, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
sfuncA12345678901234567890(int a, int b) { return a * b + 1; }


x86 assembly (clang, -O0):
<sfuncA12345678901234567890>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sfuncA12345678901234567890>:
imul   %esi,%edi
lea    0x1(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @sfuncA12345678901234567890(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 %5, %6
%8 = add nsw i32 %7, 1
ret i32 %8
}

LLVM IR (-O2):
define i32 @sfuncA12345678901234567890(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
%4 = add nsw i32 %3, 1
ret i32 %4
}
void alternatives_smp_module_del(struct module *mod) {}


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

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

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

LLVM IR (-O2):
%struct.module = type opaque
define void @alternatives_smp_module_del(%struct.module* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ die(int, char *, int /*<<< orphan*/);
scalar_t__ errno;
int /*<<< orphan*/ strerror(scalar_t__);
void check_errno(int exit_code) {
  if (errno != 0)
    die(exit_code, "Unexpected error: %s\n", strerror(errno));
}


x86 assembly (clang, -O0):
<check_errno>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
cmpq   $0x0,(%rax)
je     1162 <check_errno+0x42>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    0x2e97(%rip),%rax
mov    (%rax),%rdi
call   1040 <strerror@plt>
mov    -0x8(%rbp),%edi
mov    %eax,%edx
lea    0xea3(%rip),%rsi
call   1030 <die@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_errno>:
push   %rbx
mov    %edi,%ebx
mov    0x2eb6(%rip),%rax
mov    (%rax),%rdi
test   %rdi,%rdi
je     1148 <check_errno+0x28>
call   1040 <strerror@plt>
lea    0xec2(%rip),%rsi
mov    %ebx,%edi
mov    %eax,%edx
pop    %rbx
jmp    1030 <die@plt>
pop    %rbx
ret

LLVM IR (-O0):
@errno = global i64 0
@.str = [22 x i8] c"Unexpected error: %s\0A\00"
define void @check_errno(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i64, i64* @errno
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load i32, i32* %2
%7 = load i64, i64* @errno
%8 = call i32 @strerror(i64 %7)
%9 = call i32 @die(i32 %6, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %8)
br label %10
10: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
@errno = global i64 0
@.str = [22 x i8] c"Unexpected error: %s\0A\00"
define void @check_errno(i32 %0) {
%2 = load i64, i64* @errno
%3 = icmp eq i64 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i32 @strerror(i64 %2)
%6 = tail call i32 @die(i32 %0, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %5)
br label %7
7: ; preds = %4, %1
ret void
}
void glGetInteger64v(void) { return; }


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

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

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

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

/* Variables and functions */
uint64_t load_64(const void *p) {
  const uint8_t *p8 = p;
  uint64_t result = 0;
  size_t i;
  for (i = 0; i < sizeof(uint64_t); i++) {
    result <<= 8;
    result |= p8[sizeof(uint64_t) - i - 1];
  }
  return result;
}


x86 assembly (clang, -O0):
<load_64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movq   $0x0,-0x20(%rbp)
cmpq   $0x4,-0x20(%rbp)
jae    115e <load_64+0x5e>
mov    -0x14(%rbp),%eax
shl    $0x8,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    $0x4,%ecx
sub    -0x20(%rbp),%rcx
sub    $0x1,%rcx
mov    (%rax,%rcx,4),%eax
or     -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    111f <load_64+0x1f>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<load_64>:
mov    0x8(%rdi),%eax
mov    0xc(%rdi),%ecx
shl    $0x10,%ecx
shl    $0x8,%eax
or     %ecx,%eax
or     0x4(%rdi),%eax
shl    $0x8,%eax
or     (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @load_64(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = getelementptr inbounds i8, i8* %0, i64 12
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
%6 = getelementptr inbounds i8, i8* %0, i64 8
%7 = bitcast i8* %6 to i32*
%8 = load i32, i32* %7
%9 = shl i32 %5, 16
%10 = shl i32 %8, 8
%11 = or i32 %9, %10
%12 = getelementptr inbounds i8, i8* %0, i64 4
%13 = bitcast i8* %12 to i32*
%14 = load i32, i32* %13
%15 = or i32 %14, %11
%16 = shl i32 %15, 8
%17 = load i32, i32* %2
%18 = or i32 %17, %16
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *, double *);
int main() {
  int a, b;
  double c;
  scanf("%d %d %lf", &a, &b, &c);
  printf("NUMBER = %d\n", a);
  printf("SALARY = U$ %.2lf\n", b * c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x18(%rbp),%rcx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%esi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
cvtsi2sdl -0xc(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
cvttsd2si %xmm0,%esi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
lea    0x10(%rsp),%rcx
call   1040 <scanf@plt>
mov    0xc(%rsp),%esi
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
cvtsi2sdl 0x8(%rsp),%xmm0
mulsd  0x10(%rsp),%xmm0
cvttsd2si %xmm0,%esi
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"%d %d %lf\00"
@.str.1 = [13 x i8] c"NUMBER = %d\0A\00"
@.str.2 = [19 x i8] c"SALARY = U$ %.2lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3, double* %4)
%6 = load i32, i32* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = load i32, i32* %3
%9 = sitofp i32 %8 to double
%10 = load double, double* %4
%11 = fmul double %9, %10
%12 = fptosi double %11 to i32
%13 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"%d %d %lf\00"
@.str.1 = [13 x i8] c"NUMBER = %d\0A\00"
@.str.2 = [19 x i8] c"SALARY = U$ %.2lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca double
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast double* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, double* %3)
%8 = load i32, i32* %1
%9 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = load i32, i32* %2
%11 = sitofp i32 %10 to double
%12 = load double, double* %3
%13 = fmul double %12, %11
%14 = fptosi double %13 to i32
%15 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32 %14)
ret i32 0
}
int __ocl_all_short(short src) { return (src >> (16 - 1)) & 0x1; }


x86 assembly (clang, -O0):
<__ocl_all_short>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
sar    $0xf,%eax
and    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ocl_all_short>:
movzwl %di,%eax
shr    $0xf,%eax
ret

LLVM IR (-O0):
define i32 @__ocl_all_short(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = ashr i32 %4, 15
%6 = and i32 %5, 1
ret i32 %6
}

LLVM IR (-O2):
define i32 @__ocl_all_short(i16 signext %0) {
%2 = lshr i16 %0, 15
%3 = zext i16 %2 to i32
ret i32 %3
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int type;
};
struct TYPE_4__ {
  TYPE_1__ xcreatewindow;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xcreatewindow_type(void *_p, int _v) {
  ((XEvent *)_p)->xcreatewindow.type = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XEvent_xcreatewindow_type>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XEvent_xcreatewindow_type(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ vectorSet(float *, float const, float const, float const);
void vectorMult(float dest[3], const float a[3], const float b[3]) {
  vectorSet(dest, a[0] * b[0], a[1] * b[1], a[2] * b[2]);
}


x86 assembly (clang, -O0):
<vectorMult>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x18(%rbp),%rax
mulss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm1
mov    -0x18(%rbp),%rax
mulss  0x4(%rax),%xmm1
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm2
mov    -0x18(%rbp),%rax
mulss  0x8(%rax),%xmm2
call   1030 <vectorSet@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vectorMult>:
movss  (%rsi),%xmm0
movss  0x4(%rsi),%xmm1
mulss  (%rdx),%xmm0
mulss  0x4(%rdx),%xmm1
movss  0x8(%rsi),%xmm2
mulss  0x8(%rdx),%xmm2
jmp    1030 <vectorSet@plt>

LLVM IR (-O0):
define void @vectorMult(float* %0, float* %1, float* %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca float*
store float* %0, float** %4
store float* %1, float** %5
store float* %2, float** %6
%7 = load float*, float** %4
%8 = load float*, float** %5
%9 = getelementptr inbounds float, float* %8, i64 0
%10 = load float, float* %9
%11 = load float*, float** %6
%12 = getelementptr inbounds float, float* %11, i64 0
%13 = load float, float* %12
%14 = fmul float %10, %13
%15 = load float*, float** %5
%16 = getelementptr inbounds float, float* %15, i64 1
%17 = load float, float* %16
%18 = load float*, float** %6
%19 = getelementptr inbounds float, float* %18, i64 1
%20 = load float, float* %19
%21 = fmul float %17, %20
%22 = load float*, float** %5
%23 = getelementptr inbounds float, float* %22, i64 2
%24 = load float, float* %23
%25 = load float*, float** %6
%26 = getelementptr inbounds float, float* %25, i64 2
%27 = load float, float* %26
%28 = fmul float %24, %27
%29 = call i32 @vectorSet(float* %7, float %14, float %21, float %28)
ret void
}

LLVM IR (-O2):
define void @vectorMult(float* %0, float* nocapture %1, float* nocapture %2) {
%4 = load float, float* %1
%5 = load float, float* %2
%6 = fmul float %4, %5
%7 = getelementptr inbounds float, float* %1, i64 1
%8 = load float, float* %7
%9 = getelementptr inbounds float, float* %2, i64 1
%10 = load float, float* %9
%11 = fmul float %8, %10
%12 = getelementptr inbounds float, float* %1, i64 2
%13 = load float, float* %12
%14 = getelementptr inbounds float, float* %2, i64 2
%15 = load float, float* %14
%16 = fmul float %13, %15
%17 = tail call i32 @vectorSet(float* %0, float %6, float %11, float %16)
ret void
}
/* Type definitions */
struct UPnPService {
  int dummy;
};

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


x86 assembly (clang, -O0):
<RNDResponseSink_RenderingControl_GetContrast>:
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_GetContrast>:
lea    0xee9(%rip),%rdi
mov    %ecx,%edx
jmp    1030 <printf@plt>

LLVM IR (-O0):
%struct.UPnPService = type { i32 }
@.str = [70 x i8] c"RND Invoke Response: RenderingControl/GetContrast[ErrorCode:%d](%u)\0D\0A\00"
define void @RNDResponseSink_RenderingControl_GetContrast(%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 ([70 x i8], [70 x i8]* @.str, i64 0, i64 0), i32 %9, i16 zeroext %10)
ret void
}

LLVM IR (-O2):
%struct.UPnPService = type { i32 }
@.str = [70 x i8] c"RND Invoke Response: RenderingControl/GetContrast[ErrorCode:%d](%u)\0D\0A\00"
define void @RNDResponseSink_RenderingControl_GetContrast(%struct.UPnPService* nocapture readnone %0, i32 %1, i8* nocapture readnone %2, i16 zeroext %3) {
%5 = tail call i32 @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0), i32 %1, i16 zeroext %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sscanf(char *, char *, double *);
double string2float(char *s) {
  double f;
  sscanf(s, "%lf", &f);
  return f;
}


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

x86 assembly (clang, -O2):
<string2float>:
push   %rax
lea    0xee8(%rip),%rsi
mov    %rsp,%rdx
call   1030 <sscanf@plt>
movsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%lf\00"
define double @string2float(i8* %0) {
%2 = alloca i8*
%3 = alloca double
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @sscanf(i8* %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %3)
%6 = load double, double* %3
ret double %6
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
define double @string2float(i8* nocapture %0) {
%2 = alloca double
%3 = bitcast double* %2 to i8*
%4 = call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %2)
%5 = load double, double* %2
ret double %5
}
int foobar(void) { return 1477; }


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

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

LLVM IR (-O0):
define i32 @foobar() {
ret i32 1477
}

LLVM IR (-O2):
define i32 @foobar() {
ret i32 1477
}
/* Variables and functions */
int add(int, int);
int /*<<< orphan*/ printf(char *, int);
int main() { printf("1 + 1 = %d\n", add(1, 1)); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%esi
mov    %esi,%edi
call   1030 <add@plt>
mov    %eax,%esi
lea    0xec7(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x1,%esi
call   1030 <add@plt>
lea    0xec9(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"1 + 1 = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @add(i32 1, i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
int ValArrayDefaultCompareFn(const void *pleft, const void *pright) {
  const float *left = pleft, *right = pright;
  return *left < *right ? -1 : (*left > *right ? 1 : 0);
}


x86 assembly (clang, -O0):
<ValArrayDefaultCompareFn>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movss  (%rax),%xmm0
ucomiss %xmm1,%xmm0
jbe    1142 <ValArrayDefaultCompareFn+0x42>
mov    $0xffffffff,%eax
mov    %eax,-0x24(%rbp)
jmp    1162 <ValArrayDefaultCompareFn+0x62>
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x20(%rbp),%rax
movss  (%rax),%xmm1
xor    %eax,%eax
mov    $0x1,%ecx
ucomiss %xmm1,%xmm0
cmova  %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @ValArrayDefaultCompareFn(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to float*
%4 = bitcast i8* %1 to float*
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp olt float %5, %6
%8 = fcmp ogt float %5, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
void selinux_audit_rule_free(struct selinux_audit_rule *rule) { return; }


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

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

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

LLVM IR (-O2):
%struct.selinux_audit_rule = type opaque
define void @selinux_audit_rule_free(%struct.selinux_audit_rule* nocapture %0) {
ret void
}
int main() {
  int a;
  int b;
  a = 3;
  b = a;
  return b;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 3
}
void print_statistics(void) {}


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

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

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

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