xunge/DecIR huggingface dataset:
int comp(void *s1, void *s2, unsigned int n) {
  char *us1 = (char *)s1;
  char *us2 = (char *)s2;
  if (us1[0] != us2[0]) {
    return -1;
  }
  if (us1[1] != us2[1]) {
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<comp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rax
movsbl (%rax),%eax
mov    -0x30(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     1141 <comp+0x41>
movl   $0xffffffff,-0x4(%rbp)
jmp    116c <comp+0x6c>
mov    -0x28(%rbp),%rax
movsbl 0x1(%rax),%eax
mov    -0x30(%rbp),%rcx
movsbl 0x1(%rcx),%ecx
cmp    %ecx,%eax
je     1165 <comp+0x65>
movl   $0xffffffff,-0x4(%rbp)
jmp    116c <comp+0x6c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<comp>:
mov    (%rdi),%cl
mov    $0xffffffff,%eax
cmp    (%rsi),%cl
jne    1118 <comp+0x18>
mov    0x1(%rdi),%cl
xor    %eax,%eax
cmp    0x1(%rsi),%cl
setne  %al
neg    %eax
ret

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

LLVM IR (-O2):
define i32 @comp(i8* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = load i8, i8* %0
%5 = load i8, i8* %1
%6 = icmp eq i8 %4, %5
br i1 %6, label %7, label %14
7: ; preds = %3
%8 = getelementptr inbounds i8, i8* %0, i64 1
%9 = load i8, i8* %8
%10 = getelementptr inbounds i8, i8* %1, i64 1
%11 = load i8, i8* %10
%12 = icmp ne i8 %9, %11
%13 = sext i1 %12 to i32
br label %14
14: ; preds = %7, %3
%15 = phi i32 [ -1, %3 ], [ %13, %7 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ raioEsfera(int);
main() {
  printf("Um esfera com 5 de raio tem volume igual a: %lf", raioEsfera(5));
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [48 x i8] c"Um esfera com 5 de raio tem volume igual a: %lf\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @raioEsfera(i32 5)
%3 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [48 x i8] c"Um esfera com 5 de raio tem volume igual a: %lf\00"
define i32 @main() {
%1 = tail call i32 @raioEsfera(i32 5)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
int radeon_bo_map(struct radeon_bo *bo, int write) { return 0; }


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

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

LLVM IR (-O0):
%struct.radeon_bo = type opaque
define i32 @radeon_bo_map(%struct.radeon_bo* %0, i32 %1) {
%3 = alloca %struct.radeon_bo*
%4 = alloca i32
store %struct.radeon_bo* %0, %struct.radeon_bo** %3
store i32 %1, i32* %4
ret i32 0
}

LLVM IR (-O2):
%struct.radeon_bo = type opaque
define i32 @radeon_bo_map(%struct.radeon_bo* nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  char t[3];
  printf("%d", sizeof(t) - sizeof(t[0]));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ bar(int);
int foo(int n) {
  int b;
  b = n;
  b *= 2;
  bar(b);
  return b;
}


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

x86 assembly (clang, -O2):
<foo>:
push   %rbx
lea    (%rdi,%rdi,1),%ebx
mov    %ebx,%edi
call   1030 <bar@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = shl nsw i32 %0, 1
%3 = tail call i32 @bar(i32 %2)
ret i32 %2
}