xunge/DecIR huggingface dataset:
int test_imm_FFint8_mem(signed char *val) {
  return ((*val) & (0xFF << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_FFint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
and    $0xff,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_FFint8_mem>:
cmpb   $0x0,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_FFint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ _i2c_set(int, int);
int /*<<< orphan*/ usleep(int);
void _i2c_stop(void) {
  _i2c_set(0x7d30, (1 << 0) | (1 << 1) | (1 << 2));
  usleep(1000);
  _i2c_set(0x7d34, 1);
  usleep(1000);
  _i2c_set(0x7d34, 0);
  usleep(1000);
  _i2c_set(0x7d38, 0);
}


x86 assembly (clang, -O0):
<_i2c_stop>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7d30,%edi
mov    $0x7,%esi
call   1030 <_i2c_set@plt>
mov    $0x3e8,%edi
call   1040 <usleep@plt>
mov    $0x7d34,%edi
mov    $0x1,%esi
call   1030 <_i2c_set@plt>
mov    $0x3e8,%edi
call   1040 <usleep@plt>
mov    $0x7d34,%edi
xor    %esi,%esi
call   1030 <_i2c_set@plt>
mov    $0x3e8,%edi
call   1040 <usleep@plt>
mov    $0x7d38,%edi
xor    %esi,%esi
call   1030 <_i2c_set@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_i2c_stop>:
push   %rax
mov    $0x7d30,%edi
mov    $0x7,%esi
call   1030 <_i2c_set@plt>
mov    $0x3e8,%edi
call   1040 <usleep@plt>
mov    $0x7d34,%edi
mov    $0x1,%esi
call   1030 <_i2c_set@plt>
mov    $0x3e8,%edi
call   1040 <usleep@plt>
mov    $0x7d34,%edi
xor    %esi,%esi
call   1030 <_i2c_set@plt>
mov    $0x3e8,%edi
call   1040 <usleep@plt>
mov    $0x7d38,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <_i2c_set@plt>

LLVM IR (-O0):
define void @_i2c_stop() {
%1 = call i32 @_i2c_set(i32 32048, i32 7)
%2 = call i32 @usleep(i32 1000)
%3 = call i32 @_i2c_set(i32 32052, i32 1)
%4 = call i32 @usleep(i32 1000)
%5 = call i32 @_i2c_set(i32 32052, i32 0)
%6 = call i32 @usleep(i32 1000)
%7 = call i32 @_i2c_set(i32 32056, i32 0)
ret void
}

LLVM IR (-O2):
define void @_i2c_stop() {
%1 = tail call i32 @_i2c_set(i32 32048, i32 7)
%2 = tail call i32 @usleep(i32 1000)
%3 = tail call i32 @_i2c_set(i32 32052, i32 1)
%4 = tail call i32 @usleep(i32 1000)
%5 = tail call i32 @_i2c_set(i32 32052, i32 0)
%6 = tail call i32 @usleep(i32 1000)
%7 = tail call i32 @_i2c_set(i32 32056, i32 0)
ret void
}
char *strcpy(char *dest, const char *src) {
  char *tmp = dest;
  while ((*dest++ = *src++) != '\0') {
    ;
  }
  return tmp;
}


x86 assembly (clang, -O0):
<strcpy>:
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,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
je     1147 <strcpy+0x47>
jmp    1114 <strcpy+0x14>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rsi,%rcx,1),%edx
mov    %dl,(%rax,%rcx,1)
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <strcpy+0x10>
ret

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

LLVM IR (-O2):
define i8* @strcpy(i8* returned writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %1, %2 ], [ %6, %3 ]
%5 = phi i8* [ %0, %2 ], [ %8, %3 ]
%6 = getelementptr inbounds i8, i8* %4, i64 1
%7 = load i8, i8* %4
%8 = getelementptr inbounds i8, i8* %5, i64 1
store i8 %7, i8* %5
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3
ret i8* %0
}
int compare(const void *a, const void *b) {
  double da = *(double *)a;
  double db = *(double *)b;
  return da == db ? 0 : (da > db ? 1 : -1);
}


x86 assembly (clang, -O0):
<compare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
ucomisd -0x20(%rbp),%xmm0
jne    1146 <compare+0x46>
jp     1146 <compare+0x46>
xor    %eax,%eax
mov    %eax,-0x24(%rbp)
jmp    1164 <compare+0x64>
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
mov    $0xffffffff,%eax
mov    $0x1,%ecx
ucomisd %xmm1,%xmm0
cmova  %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare>:
movsd  (%rdi),%xmm0
xor    %eax,%eax
xor    %ecx,%ecx
ucomisd (%rsi),%xmm0
seta   %cl
lea    -0x1(%rcx,%rcx,1),%ecx
cmovne %ecx,%eax
cmovp  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @compare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = load double, double* %3
%5 = bitcast i8* %1 to double*
%6 = load double, double* %5
%7 = fcmp oeq double %4, %6
%8 = fcmp ogt double %4, %6
%9 = select i1 %8, i32 1, i32 -1
%10 = select i1 %7, i32 0, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ get_tile_filename(int, int, int /*<<< orphan*/);
int /*<<< orphan*/ roadmap_file_remove(int /*<<< orphan*/ *,
                                       int /*<<< orphan*/);
void roadmap_tile_remove(int fips, int tile_index) {
  roadmap_file_remove(NULL, get_tile_filename(fips, tile_index, 0));
}


x86 assembly (clang, -O0):
<roadmap_tile_remove>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
xor    %edx,%edx
call   1030 <get_tile_filename@plt>
mov    %eax,%esi
xor    %eax,%eax
mov    %eax,%edi
call   1040 <roadmap_file_remove@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<roadmap_tile_remove>:
push   %rax
xor    %edx,%edx
call   1030 <get_tile_filename@plt>
xor    %edi,%edi
mov    %eax,%esi
pop    %rax
jmp    1040 <roadmap_file_remove@plt>

LLVM IR (-O0):
define void @roadmap_tile_remove(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 = call i32 @get_tile_filename(i32 %5, i32 %6, i32 0)
%8 = call i32 @roadmap_file_remove(i32* null, i32 %7)
ret void
}

LLVM IR (-O2):
define void @roadmap_tile_remove(i32 %0, i32 %1) {
%3 = tail call i32 @get_tile_filename(i32 %0, i32 %1, i32 0)
%4 = tail call i32 @roadmap_file_remove(i32* null, i32 %3)
ret void
}
/* Variables and functions */
size_t tpu_get_random();
size_t tpu_get_random_index(size_t max) { return tpu_get_random() % max; }


x86 assembly (clang, -O0):
<tpu_get_random_index>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <tpu_get_random@plt>
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x8(%rbp)
mov    %rdx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tpu_get_random_index>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <tpu_get_random@plt>
mov    %rax,%rcx
or     %rbx,%rcx
shr    $0x20,%rcx
je     1131 <tpu_get_random_index+0x21>
xor    %edx,%edx
div    %rbx
mov    %rdx,%rax
pop    %rbx
ret
xor    %edx,%edx
div    %ebx
mov    %edx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @tpu_get_random_index(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i64 (...) @tpu_get_random()
%4 = load i64, i64* %2
%5 = urem i64 %3, %4
ret i64 %5
}

LLVM IR (-O2):
define i64 @tpu_get_random_index(i64 %0) {
%2 = tail call i64 (...) @tpu_get_random()
%3 = urem i64 %2, %0
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ end_or_comment(char);
int /*<<< orphan*/ isspace(char);
char *skip_over_nonblanks(char *cp) {
  while (!end_or_comment(*cp) && !isspace(*cp))
    cp++;
  return cp;
}


x86 assembly (clang, -O0):
<skip_over_nonblanks>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1040 <end_or_comment@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
jne    115f <skip_over_nonblanks+0x3f>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    116f <skip_over_nonblanks+0x4f>
jmp    1180 <skip_over_nonblanks+0x60>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    112c <skip_over_nonblanks+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_over_nonblanks>:
push   %rbx
mov    %rdi,%rbx
movsbl (%rdi),%edi
nopw   0x0(%rax,%rax,1)
call   1040 <end_or_comment@plt>
test   %eax,%eax
jne    114f <skip_over_nonblanks+0x2f>
movsbl (%rbx),%edi
call   1030 <isspace@plt>
test   %eax,%eax
jne    114f <skip_over_nonblanks+0x2f>
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
jmp    1130 <skip_over_nonblanks+0x10>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @skip_over_nonblanks(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %16, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = call i32 @end_or_comment(i8 signext %5)
%7 = icmp ne i32 %6, 0
br i1 %7, label %14, label %8
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = call i32 @isspace(i8 signext %10)
%12 = icmp ne i32 %11, 0
%13 = xor i1 %12, true
br label %14
14: ; preds = %8, %3
%15 = phi i1 [ false, %3 ], [ %13, %8 ]
br i1 %15, label %16, label %19
16: ; preds = %14
%17 = load i8*, i8** %2
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %2
br label %3
19: ; preds = %14
%20 = load i8*, i8** %2
ret i8* %20
}

LLVM IR (-O2):
define i8* @skip_over_nonblanks(i8* %0) {
%2 = load i8, i8* %0
%3 = tail call i32 @end_or_comment(i8 signext %2)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %15
5: ; preds = %1, %10
%6 = phi i8* [ %11, %10 ], [ %0, %1 ]
%7 = load i8, i8* %6
%8 = tail call i32 @isspace(i8 signext %7)
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %15
10: ; preds = %5
%11 = getelementptr inbounds i8, i8* %6, i64 1
%12 = load i8, i8* %11
%13 = tail call i32 @end_or_comment(i8 signext %12)
%14 = icmp eq i32 %13, 0
br i1 %14, label %5, label %15
15: ; preds = %5, %10, %1
%16 = phi i8* [ %0, %1 ], [ %11, %10 ], [ %6, %5 ]
ret i8* %16
}
int handle_quick_access_menu_items(struct event *event) { return 1; }


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

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

LLVM IR (-O0):
%struct.event = type opaque
define i32 @handle_quick_access_menu_items(%struct.event* %0) {
%2 = alloca %struct.event*
store %struct.event* %0, %struct.event** %2
ret i32 1
}

LLVM IR (-O2):
%struct.event = type opaque
define i32 @handle_quick_access_menu_items(%struct.event* nocapture readnone %0) {
ret i32 1
}
int maior_int(int a, int b, int c) {
  int res;
  res = a;
  if (b > res)
    res = b;
  if (c > res)
    res = c;
  return res;
}


x86 assembly (clang, -O0):
<maior_int>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    1125 <maior_int+0x25>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    1137 <maior_int+0x37>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<maior_int>:
mov    %edi,%eax
cmp    %edi,%esi
cmovg  %esi,%eax
cmp    %edx,%eax
cmovl  %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @maior_int(i32 %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, %0
%5 = select i1 %4, i32 %1, i32 %0
%6 = icmp slt i32 %5, %2
%7 = select i1 %6, i32 %2, i32 %5
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128d;

/* Variables and functions */
int /*<<< orphan*/ __builtin_ia32_loadupd(double const *);
__m128d __attribute__((__always___, __nodebug__))
_mm_loadu_pd(double const *dp) {
  return __builtin_ia32_loadupd(dp);
}


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

x86 assembly (clang, -O2):
<_mm_loadu_pd>:
jmp    1030 <__builtin_ia32_loadupd@plt>

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

LLVM IR (-O2):
define i32 @_mm_loadu_pd(double* %0) {
%2 = tail call i32 @__builtin_ia32_loadupd(double* %0)
ret i32 %2
}
void gdk_draw_layout_line_with_colors() {}


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

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

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

LLVM IR (-O2):
define void @gdk_draw_layout_line_with_colors() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gen(char *);
void cgshl(void) { gen("shll\t%cl,%eax"); }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"shll\09%cl,%eax\00"
define void @cgshl() {
%1 = call i32 @gen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"shll\09%cl,%eax\00"
define void @cgshl() {
%1 = tail call i32 @gen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}
int security_inode_setattr(struct dentry *dentry, struct iattr *attr) {
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.dentry = type opaque
%struct.iattr = type opaque
define i32 @security_inode_setattr(%struct.dentry* nocapture readnone %0, %struct.iattr* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int cpp();
int main() { return cpp(); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <cpp@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @cpp()
ret i32 %1
}
int my_comma(struct jslex *lexer) { return 1; }


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

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

LLVM IR (-O0):
%struct.jslex = type opaque
define i32 @my_comma(%struct.jslex* %0) {
%2 = alloca %struct.jslex*
store %struct.jslex* %0, %struct.jslex** %2
ret i32 1
}

LLVM IR (-O2):
%struct.jslex = type opaque
define i32 @my_comma(%struct.jslex* nocapture readnone %0) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, short, short *);
short foo_short(short i, short j) {
  printf("foo_short: i: %hd, address: %p\n", i, &i);
  printf("foo_short: j: %hd, address: %p\n", j, &j);
  return i * j;
}


x86 assembly (clang, -O0):
<foo_short>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
lea    0xed3(%rip),%rdi
lea    -0x2(%rbp),%rdx
movswl -0x2(%rbp),%esi
call   1030 <printf@plt>
lea    0xedf(%rip),%rdi
lea    -0x4(%rbp),%rdx
movswl -0x4(%rbp),%esi
call   1030 <printf@plt>
movswl -0x2(%rbp),%eax
movswl -0x4(%rbp),%ecx
imul   %ecx,%eax
cwtl
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo_short>:
push   %rbx
sub    $0x10,%rsp
mov    %esi,%ebx
mov    %edi,%esi
mov    %si,0xe(%rsp)
mov    %bx,0xc(%rsp)
lea    0xed6(%rip),%rdi
lea    0xe(%rsp),%rdx
call   1030 <printf@plt>
lea    0xee5(%rip),%rdi
lea    0xc(%rsp),%rdx
mov    %ebx,%esi
call   1030 <printf@plt>
movzwl 0xc(%rsp),%eax
imul   0xe(%rsp),%ax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [32 x i8] c"foo_short: i: %hd, address: %p\0A\00"
@.str.1 = [32 x i8] c"foo_short: j: %hd, address: %p\0A\00"
define signext i16 @foo_short(i16 signext %0, i16 signext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %3
%6 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i16 signext %5, i16* %3)
%7 = load i16, i16* %4
%8 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i16 signext %7, i16* %4)
%9 = load i16, i16* %3
%10 = sext i16 %9 to i32
%11 = load i16, i16* %4
%12 = sext i16 %11 to i32
%13 = mul nsw i32 %10, %12
%14 = trunc i32 %13 to i16
ret i16 %14
}

LLVM IR (-O2):
@.str = [32 x i8] c"foo_short: i: %hd, address: %p\0A\00"
@.str.1 = [32 x i8] c"foo_short: j: %hd, address: %p\0A\00"
define signext i16 @foo_short(i16 signext %0, i16 signext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i16 signext %0, i16* %3)
%6 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i16 signext %1, i16* %4)
%7 = load i16, i16* %3
%8 = load i16, i16* %4
%9 = mul i16 %8, %7
ret i16 %9
}
void ff_hevc_put_hevc_bi_epel_hv16_10_avx2() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @avcodec_get_hw_config() {
ret void
}
/* Variables and functions */
int RAND_MAX;
scalar_t__ rand();
float _random_0_1() { return (float)rand() / (float)(RAND_MAX / 1); }


x86 assembly (clang, -O0):
<_random_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2ss %rax,%xmm0
mov    0x2ec1(%rip),%rax
mov    (%rax),%eax
mov    $0x1,%ecx
cltd
idiv   %ecx
cvtsi2ss %eax,%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<_random_0_1>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2ss %rax,%xmm0
mov    0x2ec4(%rip),%rax
cvtsi2ssl (%rax),%xmm1
divss  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global i32 0
define float @_random_0_1() {
%1 = call i64 (...) @rand()
%2 = sitofp i64 %1 to float
%3 = load i32, i32* @RAND_MAX
%4 = sdiv i32 %3, 1
%5 = sitofp i32 %4 to float
%6 = fdiv float %2, %5
ret float %6
}

LLVM IR (-O2):
@RAND_MAX = global i32 0
define float @_random_0_1() {
%1 = tail call i64 (...) @rand()
%2 = sitofp i64 %1 to float
%3 = load i32, i32* @RAND_MAX
%4 = sitofp i32 %3 to float
%5 = fdiv float %2, %4
ret float %5
}
int duplicate_func() { return -4; }


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

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

LLVM IR (-O0):
define i32 @duplicate_func() {
ret i32 -4
}

LLVM IR (-O2):
define i32 @duplicate_func() {
ret i32 -4
}
void mm_cpu_backoff(void) { asm volatile("pause" ::: "memory"); }


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

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

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

LLVM IR (-O2):
define void @mm_cpu_backoff() {
tail call void asm sideeffect "pause", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int setfsuid(int);
int main(void) { return setfsuid(-1); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xffffffff,%edi
call   1030 <setfsuid@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0xffffffff,%edi
jmp    1030 <setfsuid@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @setfsuid(i32 -1)
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, long, int /*<<< orphan*/);
int ftell(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, const char *argv[]) {
  FILE *file = fopen(argv[1], "r");
  fseek(file, 0L, SEEK_END);
  printf("%i", ftell(file));
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe9b(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    0x2e6f(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
call   1050 <fseek@plt>
mov    -0x18(%rbp),%rdi
call   1040 <ftell@plt>
mov    %eax,%esi
lea    0xe6c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x8(%rsi),%rdi
lea    0xeb4(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,%rbx
mov    0x2e8d(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1050 <fseek@plt>
mov    %rbx,%rdi
call   1040 <ftell@plt>
lea    0xe8c(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
@SEEK_END = global i32 0
@.str.1 = [3 x i8] c"%i\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i8**, i8*** %5
%8 = getelementptr inbounds i8*, i8** %7, i64 1
%9 = load i8*, i8** %8
%10 = call i32* @fopen(i8* %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %10, i32** %6
%11 = load i32*, i32** %6
%12 = load i32, i32* @SEEK_END
%13 = call i32 @fseek(i32* %11, i64 0, i32 %12)
%14 = load i32*, i32** %6
%15 = call i32 @ftell(i32* %14)
%16 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %15)
ret i32 0
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
@SEEK_END = global i32 0
@.str.1 = [3 x i8] c"%i\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32* @fopen(i8* %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @SEEK_END
%7 = tail call i32 @fseek(i32* %5, i64 0, i32 %6)
%8 = tail call i32 @ftell(i32* %5)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ WARN_ON(int);
int /*<<< orphan*/ might_sleep();
void _gpio_free(unsigned gpio) {
  might_sleep();
  WARN_ON(1);
}


x86 assembly (clang, -O0):
<_gpio_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <might_sleep@plt>
mov    $0x1,%edi
call   1030 <WARN_ON@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @_gpio_free(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @might_sleep()
%4 = call i32 @WARN_ON(i32 1)
ret void
}

LLVM IR (-O2):
define void @_gpio_free(i32 %0) {
%2 = tail call i32 (...) @might_sleep()
%3 = tail call i32 @WARN_ON(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ usleep(unsigned long);
int usleep_(unsigned long *microsec) {
  usleep(*microsec);
  return (0);
}


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

x86 assembly (clang, -O2):
<usleep_>:
push   %rax
mov    (%rdi),%rdi
call   1030 <usleep@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @usleep_(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = tail call i32 @usleep(i64 %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x76() {
  Assert_real((isodigit(118) == 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_isodigit.c",
              595, ("isodigit should be 0 for v"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0x76>:
push   %rax
mov    $0x76,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x253,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for v\00"
define void @t_isodigit_0x76() {
%1 = call i64 @isodigit(i32 118)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 595, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for v\00"
define void @t_isodigit_0x76() {
%1 = tail call i64 @isodigit(i32 118)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 595, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ border_width;
};
typedef TYPE_1__ XConfigureRequestEvent;

/* Variables and functions */
int get_XConfigureRequestEvent_border_width(void *_p) {
  return (int)((XConfigureRequestEvent *)_p)->border_width;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XConfigureRequestEvent_border_width(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_XConfigureRequestEvent_border_width(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
void audiohw_set_aux_vol(int vol_l, int vol_r) {}


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

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

LLVM IR (-O0):
define void @audiohw_set_aux_vol(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
define void @audiohw_set_aux_vol(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
scalar_t__ Mem_Malloc(scalar_t__, char *);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *Str_Dup(const char *s) {
  char *p;
  p = (char *)Mem_Malloc(strlen(s) + 1, "Str_Dup()");
  strcpy(p, s);
  return p;
}


x86 assembly (clang, -O0):
<Str_Dup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
lea    0xead(%rip),%rsi
call   1050 <Mem_Malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Str_Dup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
lea    0xeb9(%rip),%rsi
call   1050 <Mem_Malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [10 x i8] c"Str_Dup()\00"
define i8* @Str_Dup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i64 @Mem_Malloc(i64 %6, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%8 = inttoptr i64 %7 to i8*
store i8* %8, i8** %3
%9 = load i8*, i8** %3
%10 = load i8*, i8** %2
%11 = call i32 @strcpy(i8* %9, i8* %10)
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
@.str = [10 x i8] c"Str_Dup()\00"
define i8* @Str_Dup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i64 @Mem_Malloc(i64 %3, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @strcpy(i8* %5, i8* %0)
ret i8* %5
}
/* Variables and functions */
int socket(int, int, int);
int socket_create(int domain, int type, int protocol) {
  return socket(domain, type, protocol);
}


x86 assembly (clang, -O0):
<socket_create>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <socket@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<socket_create>:
jmp    1030 <socket@plt>

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

LLVM IR (-O2):
define i32 @socket_create(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @socket(i32 %0, i32 %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int main() {
  int a = 1;
  int b = 101;
  int c = 1001;
  printf("%d \n%d \n%d \n", a, b, c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x65,-0xc(%rbp)
movl   $0x3e9,-0x10(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [13 x i8] c"%d \0A%d \0A%d \0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 1, i32 101, i32 1001)
ret i32 0
}
/* Variables and functions */
int GetYearFromUser();
int /*<<< orphan*/ GiveInstructions();
int /*<<< orphan*/ PrintCalendar(int);
main() {
  int year;
  GiveInstructions();
  year = GetYearFromUser();
  PrintCalendar(year);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <GiveInstructions@plt>
mov    $0x0,%al
call   1040 <GetYearFromUser@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <PrintCalendar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @GiveInstructions()
%2 = tail call i32 (...) @GetYearFromUser()
%3 = tail call i32 @PrintCalendar(i32 %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ eset(int);
int system(char *);
int Msystem(int nargs, int *argsv) {
  if (nargs < 1) {
    eset(21);
    return -1;
  }
  char *cmd = (char *)argsv[0];
  return system(cmd);
}


x86 assembly (clang, -O0):
<Msystem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jge    114f <Msystem+0x2f>
mov    $0x15,%edi
call   1030 <eset@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1166 <Msystem+0x46>
mov    -0x10(%rbp),%rax
movslq (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <system@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Msystem>:
push   %rax
test   %edi,%edi
jle    112e <Msystem+0xe>
movslq (%rsi),%rdi
pop    %rax
jmp    1040 <system@plt>
mov    $0x15,%edi
call   1030 <eset@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @Msystem(i32 %0, i32* nocapture %1) {
%3 = icmp slt i32 %0, 1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @eset(i32 21)
br label %11
6: ; preds = %2
%7 = load i32, i32* %1
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i8*
%10 = tail call i32 @system(i8* %9)
br label %11
11: ; preds = %6, %4
%12 = phi i32 [ -1, %4 ], [ %10, %6 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  int i = 0;
  i++;
  printf("Hello, World.\n");
  return i;
}


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"Hello, World.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
%7 = load i32, i32* %6
%8 = add nsw i32 %7, 1
store i32 %8, i32* %6
%9 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%10 = load i32, i32* %6
ret i32 %10
}

LLVM IR (-O2):
@str = [14 x i8] c"Hello, World.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ add_array_number(double *, double *, double, int, int);
void subtract_array_number(double *out, double *a, double f, int ncol,
                           int nlns) {
  add_array_number(out, a, -f, ncol, nlns);
}


x86 assembly (clang, -O0):
<subtract_array_number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %ecx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%ecx
call   1030 <add_array_number@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<subtract_array_number>:
xorps  0xee9(%rip),%xmm0
jmp    1030 <add_array_number@plt>

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

LLVM IR (-O2):
define void @subtract_array_number(double* %0, double* %1, double %2, i32 %3, i32 %4) {
%6 = fneg double %2
%7 = tail call i32 @add_array_number(double* %0, double* %1, double %6, i32 %3, i32 %4)
ret void
}
/* Variables and functions */
double __floor(double);
double Floor(double x) { return __floor(x); }


x86 assembly (clang, -O0):
<Floor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <__floor@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Floor>:
jmp    1030 <__floor@plt>

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

LLVM IR (-O2):
define double @Floor(double %0) {
%2 = tail call double @__floor(double %0)
ret double %2
}
void f_acc_data(void) {
#pragma acc data
  {
    int i;
#pragma omp atomic write
    i = 0;
  }
}


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

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

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

LLVM IR (-O2):
define void @f_acc_data() {
ret void
}
/* Variables and functions */
char *btostr(unsigned int, int);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ printf(char *, char *);
void bitPrint(unsigned int n, int numBits) {
  char *tmp;
  printf("%s ", tmp = btostr(n, numBits));
  free(tmp);
}


x86 assembly (clang, -O0):
<bitPrint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1050 <btostr@plt>
mov    %rax,%rsi
mov    %rsi,-0x10(%rbp)
lea    0xea9(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitPrint>:
push   %rbx
call   1050 <btostr@plt>
mov    %rax,%rbx
lea    0xec0(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s \00"
define void @bitPrint(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = call i8* @btostr(i32 %6, i32 %7)
store i8* %8, i8** %5
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = load i8*, i8** %5
%11 = call i32 @free(i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s \00"
define void @bitPrint(i32 %0, i32 %1) {
%3 = tail call i8* @btostr(i32 %0, i32 %1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = tail call i32 @free(i8* %3)
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
int f() {
  int x = 1;
  int *p = (int *)malloc(sizeof(int));
  if (x > 0) {
    *p = x;
  } else {
    *p = 2;
  }
  return *p;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1145 <f+0x35>
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
jmp    114f <f+0x3f>
mov    -0x10(%rbp),%rax
movl   $0x2,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rax
mov    $0x4,%edi
call   1030 <malloc@plt>
movl   $0x1,(%rax)
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @f() {
%1 = alloca i32
%2 = alloca i32*
store i32 1, i32* %1
%3 = call i64 @malloc(i32 4)
%4 = inttoptr i64 %3 to i32*
store i32* %4, i32** %2
%5 = load i32, i32* %1
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = load i32, i32* %1
%9 = load i32*, i32** %2
store i32 %8, i32* %9
br label %12
10: ; preds = %0
%11 = load i32*, i32** %2
store i32 2, i32* %11
br label %12
12: ; preds = %10, %7
%13 = load i32*, i32** %2
%14 = load i32, i32* %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @f() {
%1 = tail call i64 @malloc(i32 4)
%2 = inttoptr i64 %1 to i32*
store i32 1, i32* %2
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ GenPrintInstr3Operands(int, int /*<<< orphan*/, int,
                                          int /*<<< orphan*/, int,
                                          int /*<<< orphan*/, int, int);
int /*<<< orphan*/ printf2(char *);
void GenJumpIfNotZero(int label) {
  printf2(" # JumpIfNotZero\n");
  GenPrintInstr3Operands(0x22, 0, 0x02, 0, 0x00, 0, 0x82, label);
}


x86 assembly (clang, -O0):
<GenJumpIfNotZero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf2@plt>
mov    -0x4(%rbp),%eax
mov    $0x22,%edi
xor    %r9d,%r9d
mov    $0x2,%edx
mov    %r9d,%esi
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x82,(%rsp)
mov    %eax,0x8(%rsp)
call   1040 <GenPrintInstr3Operands@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GenJumpIfNotZero>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
call   1030 <printf2@plt>
mov    $0x22,%edi
xor    %esi,%esi
mov    $0x2,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   %rbx
push   $0x82
call   1040 <GenPrintInstr3Operands@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [18 x i8] c" # JumpIfNotZero\0A\00"
define void @GenJumpIfNotZero(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf2(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = call i32 @GenPrintInstr3Operands(i32 34, i32 0, i32 2, i32 0, i32 0, i32 0, i32 130, i32 %4)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c" # JumpIfNotZero\0A\00"
define void @GenJumpIfNotZero(i32 %0) {
%2 = tail call i32 @printf2(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @GenPrintInstr3Operands(i32 34, i32 0, i32 2, i32 0, i32 0, i32 0, i32 130, i32 %0)
ret void
}