xunge/DecIR huggingface dataset:
/* Type definitions */
typedef unsigned long volatile uint32_t;

/* Variables and functions */
void DESDMAEnable(uint32_t ui32Base, uint32_t ui32Flags) {
  ;

  ;
  (*((volatile unsigned long *)(ui32Base + 0x00000034))) |= ui32Flags;
}


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

x86 assembly (clang, -O2):
<DESDMAEnable>:
mov    %rdi,-0x8(%rsp)
mov    %rsi,-0x10(%rsp)
mov    -0x10(%rsp),%rax
mov    -0x8(%rsp),%rcx
or     %rax,0x34(%rcx)
ret

LLVM IR (-O0):
define void @DESDMAEnable(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store volatile i64 %0, i64* %3
store volatile i64 %1, i64* %4
%5 = load volatile i64, i64* %4
%6 = load volatile i64, i64* %3
%7 = add i64 %6, 52
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
%10 = or i64 %9, %5
store volatile i64 %10, i64* %8
ret void
}

LLVM IR (-O2):
define void @DESDMAEnable(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store volatile i64 %0, i64* %3
store volatile i64 %1, i64* %4
%5 = load volatile i64, i64* %4
%6 = load volatile i64, i64* %3
%7 = add i64 %6, 52
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
%10 = or i64 %9, %5
store volatile i64 %10, i64* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void processa1(int w) {
  w = w + 10;
  printf("W = %d\n", w);
}


x86 assembly (clang, -O0):
<processa1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<processa1>:
lea    0xa(%rdi),%esi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"W = %d\0A\00"
define void @processa1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 10
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"W = %d\0A\00"
define void @processa1(i32 %0) {
%2 = add nsw i32 %0, 10
%3 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}
/* Variables and functions */
size_t strlen(const char *s) {
  size_t result = 0;
  while (*s++) {
    result++;
  }
  return result;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
cmpb   $0x0,(%rax)
je     1139 <strlen+0x39>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <strlen+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
cmpb   $0x0,(%rdi)
je     111f <strlen+0x1f>
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
lea    0x1(%rcx),%rax
cmpb   $0x0,0x1(%rdi,%rcx,1)
mov    %rax,%rcx
jne    1110 <strlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @strlen(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add i64 %5, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i64 [ 0, %1 ], [ %8, %4 ]
ret i64 %12
}
/* Variables and functions */
int rand();
void populate_array_parall(int *v, int n) {
#pragma omp parallel for
  for (int i = 0; i < n; ++i) {
    v[i] = rand() % n;
  }
}


x86 assembly (clang, -O0):
<populate_array_parall>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1156 <populate_array_parall+0x46>
mov    $0x0,%al
call   1030 <rand@plt>
cltd
idivl  -0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <populate_array_parall+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<populate_array_parall>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
test   %esi,%esi
jle    1148 <populate_array_parall+0x38>
mov    %esi,%r15d
mov    %rdi,%r14
mov    %esi,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
xor    %eax,%eax
call   1030 <rand@plt>
cltd
idiv   %r15d
mov    %edx,(%r14,%rbp,4)
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    1130 <populate_array_parall+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @populate_array_parall(i32* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %7
6: ; preds = %7, %2
ret void
7: ; preds = %4, %7
%8 = phi i64 [ 0, %4 ], [ %12, %7 ]
%9 = tail call i32 (...) @rand()
%10 = srem i32 %9, %1
%11 = getelementptr inbounds i32, i32* %0, i64 %8
store i32 %10, i32* %11
%12 = add nuw nsw i64 %8, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %6, label %7
}
void path_015_expected_3(int a, int b, int c) {
  int i;
  for (i = 0; i < 10; i++) {
    if (i > 5) {
      return;
    }
  }
}


x86 assembly (clang, -O0):
<path_015_expected_3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0xa,-0x10(%rbp)
jge    1140 <path_015_expected_3+0x40>
cmpl   $0x5,-0x10(%rbp)
jle    112d <path_015_expected_3+0x2d>
jmp    1140 <path_015_expected_3+0x40>
jmp    1132 <path_015_expected_3+0x32>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1114 <path_015_expected_3+0x14>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @path_015_expected_3(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
store i32 0, i32* %7
br label %8
8: ; preds = %16, %3
%9 = load i32, i32* %7
%10 = icmp slt i32 %9, 10
br i1 %10, label %11, label %19
11: ; preds = %8
%12 = load i32, i32* %7
%13 = icmp sgt i32 %12, 5
br i1 %13, label %14, label %15
14: ; preds = %11
br label %19
15: ; preds = %11
br label %16
16: ; preds = %15
%17 = load i32, i32* %7
%18 = add nsw i32 %17, 1
store i32 %18, i32* %7
br label %8
19: ; preds = %14, %8
ret void
}

LLVM IR (-O2):
define void @path_015_expected_3(i32 %0, i32 %1, i32 %2) {
ret void
}
void vec3_scale(float *dst, float b) {
  dst[0] = dst[0] * b;
  dst[1] = dst[1] * b;
  dst[2] = dst[2] * b;
}


x86 assembly (clang, -O0):
<vec3_scale>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mulss  -0xc(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
mulss  -0xc(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
mulss  -0xc(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<vec3_scale>:
movss  (%rdi),%xmm1
mulss  %xmm0,%xmm1
movss  %xmm1,(%rdi)
movss  0x4(%rdi),%xmm1
mulss  %xmm0,%xmm1
movss  %xmm1,0x4(%rdi)
mulss  0x8(%rdi),%xmm0
movss  %xmm0,0x8(%rdi)
ret

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

LLVM IR (-O2):
define void @vec3_scale(float* nocapture %0, float %1) {
%3 = load float, float* %0
%4 = fmul float %3, %1
store float %4, float* %0
%5 = getelementptr inbounds float, float* %0, i64 1
%6 = load float, float* %5
%7 = fmul float %6, %1
store float %7, float* %5
%8 = getelementptr inbounds float, float* %0, i64 2
%9 = load float, float* %8
%10 = fmul float %9, %1
store float %10, float* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ptr_list_append_check(void ***, int *, void *);
void ptr_list_append(void ***list, int *count, void *new) {
  (void)ptr_list_append_check(list, count, new);
}


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

x86 assembly (clang, -O2):
<ptr_list_append>:
jmp    1030 <ptr_list_append_check@plt>

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

LLVM IR (-O2):
define void @ptr_list_append(i8*** %0, i32* %1, i8* %2) {
%4 = tail call i32 @ptr_list_append_check(i8*** %0, i32* %1, i8* %2)
ret void
}
void port_word_out(unsigned short port, unsigned short data) {
  __asm__("out %%ax , %% dx" : : "a"(data), "d"(port));
}


x86 assembly (clang, -O0):
<port_word_out>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
mov    -0x4(%rbp),%ax
mov    -0x2(%rbp),%dx
out    %ax,(%dx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<port_word_out>:
mov    %esi,%eax
mov    %edi,%edx
out    %ax,(%dx)
ret

LLVM IR (-O0):
define void @port_word_out(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = load i16, i16* %3
ret void
}

LLVM IR (-O2):
define void @port_word_out(i16 zeroext %0, i16 zeroext %1) {
tail call void asm sideeffect "out %ax , % dx", "{ax},{dx},~{dirflag},~{fpsr},~{flags}"(i16 %1, i16 %0)
ret void
}
/* Variables and functions */
int f336(int *);
int f337(int *p) { return f336(p); }


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

x86 assembly (clang, -O2):
<f337>:
jmp    1030 <f336@plt>

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

LLVM IR (-O2):
define i32 @f337(i32* %0) {
%2 = tail call i32 @f336(i32* %0)
ret i32 %2
}
/* Type definitions */
struct wf_mtllib {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ wf_free_mtllib(struct wf_mtllib const *);
void unload_wf_mtllib(void const *key, size_t len, void *data, void *link) {
  (void)key;
  (void)len;
  (void)link;
  wf_free_mtllib(*(struct wf_mtllib const **)data);
}


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

x86 assembly (clang, -O2):
<unload_wf_mtllib>:
mov    (%rdx),%rdi
jmp    1030 <wf_free_mtllib@plt>

LLVM IR (-O0):
%struct.wf_mtllib = type { i32 }
define void @unload_wf_mtllib(i8* %0, i64 %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i64 %1, i64* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = load i8*, i8** %8
%12 = load i8*, i8** %7
%13 = bitcast i8* %12 to %struct.wf_mtllib**
%14 = load %struct.wf_mtllib*, %struct.wf_mtllib** %13
%15 = call i32 @wf_free_mtllib(%struct.wf_mtllib* %14)
ret void
}

LLVM IR (-O2):
%struct.wf_mtllib = type { i32 }
define void @unload_wf_mtllib(i8* nocapture readnone %0, i64 %1, i8* nocapture %2, i8* nocapture readnone %3) {
%5 = bitcast i8* %2 to %struct.wf_mtllib**
%6 = load %struct.wf_mtllib*, %struct.wf_mtllib** %5
%7 = tail call i32 @wf_free_mtllib(%struct.wf_mtllib* %6)
ret void
}
/* Variables and functions */
int inline_use_point_1(int, int);
int call_file_1() {
  int x = inline_use_point_1(5, 6);
  return 0;
}


x86 assembly (clang, -O0):
<call_file_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x5,%edi
mov    $0x6,%esi
call   1030 <inline_use_point_1@plt>
mov    %eax,-0x4(%rbp)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_file_1>:
push   %rax
mov    $0x5,%edi
mov    $0x6,%esi
call   1030 <inline_use_point_1@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @call_file_1() {
%1 = alloca i32
%2 = call i32 @inline_use_point_1(i32 5, i32 6)
store i32 %2, i32* %1
ret i32 0
}

LLVM IR (-O2):
define i32 @call_file_1() {
%1 = tail call i32 @inline_use_point_1(i32 5, i32 6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int, double);
char *gcvt(double x, int n, char *b) {
  sprintf(b, "%.*g", n, x);
  return b;
}


x86 assembly (clang, -O0):
<gcvt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0xc(%rbp),%edx
movsd  -0x8(%rbp),%xmm0
lea    0xec9(%rip),%rsi
call   1030 <sprintf@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcvt>:
push   %rbx
mov    %rsi,%rbx
mov    %edi,%edx
lea    0xee3(%rip),%rsi
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%.*g\00"
define i8* @gcvt(double %0, i32 %1, i8* %2) {
%4 = alloca double
%5 = alloca i32
%6 = alloca i8*
store double %0, double* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i8*, i8** %6
%8 = load i32, i32* %5
%9 = load double, double* %4
%10 = call i32 @sprintf(i8* %7, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %8, double %9)
%11 = load i8*, i8** %6
ret i8* %11
}

LLVM IR (-O2):
@.str = [5 x i8] c"%.*g\00"
define i8* @gcvt(double %0, i32 %1, i8* returned writeonly %2) {
%4 = tail call i32 @sprintf(i8* dereferenceable(1) %2, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %1, double %0)
ret i8* %2
}
struct tx1 {
  int a;
  int b;
} * *t1() {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.tx1 = type { i32, i32 }
define %struct.tx1** @t1() {
ret %struct.tx1** null
}

LLVM IR (-O2):
%struct.tx1 = type { i32, i32 }
define noalias %struct.tx1** @t1() {
ret %struct.tx1** null
}
/* Variables and functions */
int fc8080_data_deselect(void *, unsigned char, unsigned char);
int bbm_com_data_deselect(void *handle, unsigned char subch_id,
                          unsigned char buf_id) {
  int res;
  res = fc8080_data_deselect(handle, subch_id, buf_id);
  return res;
}


x86 assembly (clang, -O0):
<bbm_com_data_deselect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x9(%rbp),%al
movzbl %al,%esi
movzbl -0xa(%rbp),%edx
call   1030 <fc8080_data_deselect@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bbm_com_data_deselect>:
jmp    1030 <fc8080_data_deselect@plt>

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

LLVM IR (-O2):
define i32 @bbm_com_data_deselect(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = tail call i32 @fc8080_data_deselect(i8* %0, i8 zeroext %1, i8 zeroext %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ test_from_engineering_string();
int /*<<< orphan*/ test_to_engineering_string();
int /*<<< orphan*/ test_to_engineering_string_unit();
int main() {
  test_to_engineering_string();
  test_to_engineering_string_unit();
  test_from_engineering_string();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <test_to_engineering_string@plt>
xor    %eax,%eax
call   1040 <test_to_engineering_string_unit@plt>
xor    %eax,%eax
call   1030 <test_from_engineering_string@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_to_engineering_string()
%2 = tail call i32 (...) @test_to_engineering_string_unit()
%3 = tail call i32 (...) @test_from_engineering_string()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ do_cmd_pref_file_hack(int);
void macro_pref_load(void *unused, const char *title) {
  do_cmd_pref_file_hack(16);
}


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

x86 assembly (clang, -O2):
<macro_pref_load>:
mov    $0x10,%edi
jmp    1030 <do_cmd_pref_file_hack@plt>

LLVM IR (-O0):
define void @macro_pref_load(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = call i32 @do_cmd_pref_file_hack(i32 16)
ret void
}

LLVM IR (-O2):
define void @macro_pref_load(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i32 @do_cmd_pref_file_hack(i32 16)
ret void
}
int main(void) {
  void replaceString(char source[], const char s1[], const char s2[]);
  char text1[] = "the wrong person";
  char text2[] = "per";
  char text3[] = "";
  replaceString(text1, text2, text3);
  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),%al
mov    %al,-0x10(%rbp)
mov    0xebd(%rip),%eax
mov    %eax,-0x24(%rbp)
lea    -0x25(%rbp),%rdi
xor    %esi,%esi
mov    $0x1,%edx
call   1040 <memset@plt>
lea    -0x20(%rbp),%rdi
lea    -0x24(%rbp),%rsi
lea    -0x25(%rbp),%rdx
call   1030 <replaceString@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movb   $0x0,0x20(%rsp)
movl   $0x726570,0xc(%rsp)
movb   $0x0,0xb(%rsp)
lea    0x10(%rsp),%rdi
lea    0xc(%rsp),%rsi
lea    0xb(%rsp),%rdx
call   1030 <replaceString@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.text1 = [17 x i8] c"the wrong person\00"
@__const.main.text2 = [4 x i8] c"per\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [17 x i8]
%3 = alloca [4 x i8]
%4 = alloca [1 x i8]
store i32 0, i32* %1
%5 = bitcast [17 x i8]* %2 to i8*
%6 = bitcast [4 x i8]* %3 to i8*
%7 = bitcast [1 x i8]* %4 to i8*
%8 = getelementptr inbounds [17 x i8], [17 x i8]* %2, i64 0, i64 0
%9 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%10 = getelementptr inbounds [1 x i8], [1 x i8]* %4, i64 0, i64 0
ret i32 0
}

LLVM IR (-O2):
@__const.main.text1 = [17 x i8] c"the wrong person\00"
define i32 @main() {
%1 = alloca [17 x i8]
%2 = alloca i32
%3 = alloca [1 x i8]
%4 = getelementptr inbounds [17 x i8], [17 x i8]* %1, i64 0, i64 0
%5 = bitcast i32* %2 to i8*
store i32 7497072, i32* %2
%6 = getelementptr inbounds [1 x i8], [1 x i8]* %3, i64 0, i64 0
store i8 0, i8* %6
ret i32 0
}
/* Type definitions */
struct statfs {
  int dummy;
};

/* Variables and functions */
int syscall(int, int, struct statfs *);
int __fstatfs(int fd, struct statfs *buf) { return syscall(138, fd, buf); }


x86 assembly (clang, -O0):
<__fstatfs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    $0x8a,%edi
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__fstatfs>:
mov    %rsi,%rdx
mov    %edi,%esi
mov    $0x8a,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
%struct.statfs = type { i32 }
define i32 @__fstatfs(i32 %0, %struct.statfs* %1) {
%3 = alloca i32
%4 = alloca %struct.statfs*
store i32 %0, i32* %3
store %struct.statfs* %1, %struct.statfs** %4
%5 = load i32, i32* %3
%6 = load %struct.statfs*, %struct.statfs** %4
%7 = call i32 @syscall(i32 138, i32 %5, %struct.statfs* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.statfs = type { i32 }
define i32 @__fstatfs(i32 %0, %struct.statfs* %1) {
%3 = tail call i32 @syscall(i32 138, i32 %0, %struct.statfs* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ disp_int(int);
int /*<<< orphan*/ disp_str(char *);
int fat_next_tabent(int);
void test_ftab() {
  int res = fat_next_tabent(0x405);
  disp_str("\n===========\n");
  disp_int(res);
  disp_str("                 \n===========\n");
}


x86 assembly (clang, -O0):
<test_ftab>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x405,%edi
call   1040 <fat_next_tabent@plt>
mov    %eax,-0x4(%rbp)
lea    0xec5(%rip),%rdi
call   1030 <disp_str@plt>
mov    -0x4(%rbp),%edi
call   1050 <disp_int@plt>
lea    0xea0(%rip),%rdi
call   1030 <disp_str@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_ftab>:
push   %rbx
mov    $0x405,%edi
call   1040 <fat_next_tabent@plt>
mov    %eax,%ebx
lea    0xecd(%rip),%rdi
call   1030 <disp_str@plt>
mov    %ebx,%edi
call   1050 <disp_int@plt>
lea    0xea9(%rip),%rdi
pop    %rbx
jmp    1030 <disp_str@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"\0A===========\0A\00"
@.str.1 = [31 x i8] c" \0A===========\0A\00"
define void @test_ftab() {
%1 = alloca i32
%2 = call i32 @fat_next_tabent(i32 1029)
store i32 %2, i32* %1
%3 = call i32 @disp_str(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %1
%5 = call i32 @disp_int(i32 %4)
%6 = call i32 @disp_str(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"\0A===========\0A\00"
@.str.1 = [31 x i8] c" \0A===========\0A\00"
define void @test_ftab() {
%1 = tail call i32 @fat_next_tabent(i32 1029)
%2 = tail call i32 @disp_str(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @disp_int(i32 %1)
%4 = tail call i32 @disp_str(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print(char *, int);
int choose(int a, int b) {
  if (a >= b)
    print("The number1\n", 13);
  else
    print("The number2\n", 13);
  return 0;
}


x86 assembly (clang, -O0):
<choose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jl     1140 <choose+0x30>
lea    0xecf(%rip),%rdi
mov    $0xd,%esi
call   1030 <print@plt>
jmp    1151 <choose+0x41>
lea    0xec6(%rip),%rdi
mov    $0xd,%esi
call   1030 <print@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<choose>:
push   %rax
cmp    %esi,%edi
lea    0xef3(%rip),%rax
lea    0xedf(%rip),%rdi
cmovl  %rax,%rdi
mov    $0xd,%esi
call   1030 <print@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"The number1\0A\00"
@.str.1 = [13 x i8] c"The number2\0A\00"
define i32 @choose(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 = icmp sge i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @print(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 13)
br label %12
10: ; preds = %2
%11 = call i32 @print(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 13)
br label %12
12: ; preds = %10, %8
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"The number1\0A\00"
@.str.1 = [13 x i8] c"The number2\0A\00"
define i32 @choose(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0)
%5 = tail call i32 @print(i8* %4, i32 13)
ret i32 0
}
/* Variables and functions */
scalar_t__ islower(char);
char *to_uppercase(char *str) {
  char *p;
  for (p = str; *p; p++)
    if (islower(*p))
      *p -= 'a' - 'A';
  return str;
}


x86 assembly (clang, -O0):
<to_uppercase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1169 <to_uppercase+0x59>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
je     1153 <to_uppercase+0x43>
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
sub    $0x20,%ecx
mov    %cl,(%rax)
jmp    1158 <to_uppercase+0x48>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <to_uppercase+0x14>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_uppercase>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%al
test   %al,%al
je     114e <to_uppercase+0x3e>
mov    %r14,%rbx
jmp    113c <to_uppercase+0x2c>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
je     114e <to_uppercase+0x3e>
movsbl %al,%edi
call   1030 <islower@plt>
test   %rax,%rax
je     1130 <to_uppercase+0x20>
addb   $0xe0,(%rbx)
jmp    1130 <to_uppercase+0x20>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @to_uppercase(i8* returned %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %12
%5 = phi i8 [ %14, %12 ], [ %2, %1 ]
%6 = phi i8* [ %13, %12 ], [ %0, %1 ]
%7 = tail call i64 @islower(i8 signext %5)
%8 = icmp eq i64 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %4
%10 = load i8, i8* %6
%11 = add i8 %10, -32
store i8 %11, i8* %6
br label %12
12: ; preds = %4, %9
%13 = getelementptr inbounds i8, i8* %6, i64 1
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %4
16: ; preds = %12, %1
ret i8* %0
}
/* Variables and functions */
void __attribute__((__no__)) do_crash() {
  char *ptr = NULL;
  *ptr = 0;
}


x86 assembly (clang, -O0):
<do_crash>:
push   %rbp
mov    %rsp,%rbp
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
define void @do_crash() {
%1 = alloca i8*
store i8* null, i8** %1
%2 = load i8*, i8** %1
store i8 0, i8* %2
ret void
}

LLVM IR (-O2):
/* Variables and functions */
int existe(char *);
void remover(char nombre[255]) {
  if (existe(nombre) == 1) {
  }
}


x86 assembly (clang, -O0):
<remover>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <existe@plt>
cmp    $0x1,%eax
jne    1133 <remover+0x23>
jmp    1133 <remover+0x23>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<remover>:
jmp    1030 <existe@plt>

LLVM IR (-O0):
define void @remover(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @existe(i8* %3)
%5 = icmp eq i32 %4, 1
br i1 %5, label %6, label %7
6: ; preds = %1
br label %7
7: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
define void @remover(i8* %0) {
%2 = tail call i32 @existe(i8* %0)
ret void
}
/* Variables and functions */
int remove(char const *);
int unlink(const char *name) { return remove(name); }


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

x86 assembly (clang, -O2):
<unlink>:
jmp    1030 <remove@plt>

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

LLVM IR (-O2):
define i32 @unlink(i8* nocapture %0) {
%2 = tail call i32 @remove(i8* %0)
ret i32 %2
}
/* Variables and functions */
scalar_t__ IsCommandSeparator(char);
scalar_t__ IsEolnChar(char);
int IsDwEoln(char c) { return IsEolnChar(c) || IsCommandSeparator(c); }


x86 assembly (clang, -O0):
<IsDwEoln>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <IsEolnChar@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    115c <IsDwEoln+0x3c>
movsbl -0x1(%rbp),%edi
call   1040 <IsCommandSeparator@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsDwEoln>:
push   %rbx
mov    %edi,%ebx
call   1030 <IsEolnChar@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <IsDwEoln+0x17>
pop    %rbx
ret
movsbl %bl,%edi
call   1040 <IsCommandSeparator@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @IsDwEoln(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @IsEolnChar(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = call i64 @IsCommandSeparator(i8 signext %7)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @IsDwEoln(i8 signext %0) {
%2 = tail call i64 @IsEolnChar(i8 signext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @IsCommandSeparator(i8 signext %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
scalar_t__ halt3();
scalar_t__ unknown();
int test10() { (void)(unknown() || halt3()); }


x86 assembly (clang, -O0):
<test10>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <unknown@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    1152 <test10+0x32>
mov    $0x0,%al
call   1030 <halt3@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test10>:
push   %rax
xor    %eax,%eax
call   1040 <unknown@plt>
test   %rax,%rax
je     112f <test10+0xf>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <halt3@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @test10() {
%1 = alloca i32
%2 = call i64 (...) @unknown()
%3 = icmp ne i64 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %0
%5 = call i64 (...) @halt3()
%6 = icmp ne i64 %5, 0
br label %7
7: ; preds = %4, %0
%8 = phi i1 [ true, %0 ], [ %6, %4 ]
%9 = zext i1 %8 to i32
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
define i32 @test10() {
%1 = tail call i64 (...) @unknown()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i64 (...) @halt3()
br label %5
5: ; preds = %3, %0
ret i32 undef
}
/* Variables and functions */
int strlen(char const *);
bool is_single(const char *str) { return strlen(str) == 1; }


x86 assembly (clang, -O0):
<is_single>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_single>:
push   %rax
call   1030 <strlen@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @is_single(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @strlen(i8* %3)
%5 = icmp eq i32 %4, 1
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @is_single(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp eq i32 %2, 1
%4 = zext i1 %3 to i32
ret i32 %4
}
double addition(double zahl1, double zahl2) { return (zahl1 + zahl2); }


x86 assembly (clang, -O0):
<addition>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<addition>:
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @addition(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fadd double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @addition(double %0, double %1) {
%3 = fadd double %0, %1
ret double %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct bitstream {
  int dummy;
};

/* Variables and functions */
struct bitstream *create_bitstream(char *);
int /*<<< orphan*/ free_bitstream(struct bitstream *);
int main(void) {
  struct bitstream *bs = create_bitstream("babilon_amphi.jpg");
  uint32_t read = 0;
  free_bitstream(bs);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <create_bitstream@plt>
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <free_bitstream@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.bitstream = type { i32 }
@.str = [18 x i8] c"babilon_amphi.jpg\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.bitstream*
%3 = alloca i32
store i32 0, i32* %1
%4 = call %struct.bitstream* @create_bitstream(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
store %struct.bitstream* %4, %struct.bitstream** %2
store i32 0, i32* %3
%5 = load %struct.bitstream*, %struct.bitstream** %2
%6 = call i32 @free_bitstream(%struct.bitstream* %5)
ret i32 0
}

LLVM IR (-O2):
%struct.bitstream = type { i32 }
@.str = [18 x i8] c"babilon_amphi.jpg\00"
define i32 @main() {
%1 = tail call %struct.bitstream* @create_bitstream(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @free_bitstream(%struct.bitstream* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void usage(char **argv) { printf("Usage: %s PROGRAM [ARGS ...]\n", argv[0]); }


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

x86 assembly (clang, -O2):
<usage>:
mov    (%rdi),%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"Usage: %s PROGRAM [ARGS ...]\0A\00"
define void @usage(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = getelementptr inbounds i8*, i8** %3, i64 0
%5 = load i8*, i8** %4
%6 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %5)
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"Usage: %s PROGRAM [ARGS ...]\0A\00"
define void @usage(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ WriteStringToBuffer(char *);
void RecordWarningMessage(char *message) {
  WriteStringToBuffer("info.warn:W:");
  WriteStringToBuffer(message);
}


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

x86 assembly (clang, -O2):
<RecordWarningMessage>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
call   1030 <WriteStringToBuffer@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <WriteStringToBuffer@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"info.warn:W:\00"
define void @RecordWarningMessage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @WriteStringToBuffer(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 @WriteStringToBuffer(i8* %4)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"info.warn:W:\00"
define void @RecordWarningMessage(i8* %0) {
%2 = tail call i32 @WriteStringToBuffer(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @WriteStringToBuffer(i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
FILE *open_fastq(char *filename) {
  FILE *fd1 = fopen(filename, "r");
  if (fd1 == 0) {
    fprintf(stderr, "Unable to open %s\n", filename);
    exit(1);
  }
  return (fd1);
}


x86 assembly (clang, -O0):
<open_fastq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb9(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    117e <open_fastq+0x4e>
mov    0x2e7e(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe93(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<open_fastq>:
push   %rbx
mov    %rdi,%rbx
lea    0xec5(%rip),%rsi
call   1040 <fopen@plt>
test   %rax,%rax
je     1147 <open_fastq+0x17>
pop    %rbx
ret
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
lea    0xeab(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
@stderr = global i32 0
@.str.1 = [19 x i8] c"Unable to open %s\0A\00"
define i32* @open_fastq(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32* @fopen(i8* %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = icmp eq i32* %6, null
br i1 %7, label %8, label %13
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %2
%11 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %10)
%12 = call i32 @exit(i32 1)
unreachable
13: ; preds = %1
%14 = load i32*, i32** %3
ret i32* %14
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
@stderr = global i32 0
@.str.1 = [19 x i8] c"Unable to open %s\0A\00"
define noalias i32* @open_fastq(i8* %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %1
ret i32* %2
}
void hfree(void *ptr) {
  { (ptr) = (ptr); };
}


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

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

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

LLVM IR (-O2):
define void @hfree(i8* nocapture %0) {
ret void
}
/* Type definitions */
struct la2vcd {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ close_all_files(struct la2vcd *);
int /*<<< orphan*/ write_vcd_trailer(struct la2vcd *);
void close_la2vcd(struct la2vcd *l) {
  write_vcd_trailer(l);
  close_all_files(l);
}


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

x86 assembly (clang, -O2):
<close_la2vcd>:
push   %rbx
mov    %rdi,%rbx
call   1030 <write_vcd_trailer@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <close_all_files@plt>

LLVM IR (-O0):
%struct.la2vcd = type { i32 }
define void @close_la2vcd(%struct.la2vcd* %0) {
%2 = alloca %struct.la2vcd*
store %struct.la2vcd* %0, %struct.la2vcd** %2
%3 = load %struct.la2vcd*, %struct.la2vcd** %2
%4 = call i32 @write_vcd_trailer(%struct.la2vcd* %3)
%5 = load %struct.la2vcd*, %struct.la2vcd** %2
%6 = call i32 @close_all_files(%struct.la2vcd* %5)
ret void
}

LLVM IR (-O2):
%struct.la2vcd = type { i32 }
define void @close_la2vcd(%struct.la2vcd* %0) {
%2 = tail call i32 @write_vcd_trailer(%struct.la2vcd* %0)
%3 = tail call i32 @close_all_files(%struct.la2vcd* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print(int *, size_t);
int /*<<< orphan*/ sdsort(int *, size_t);
void test(int *a, size_t n) {
  sdsort(a, n);
  print(a, n);
}


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

x86 assembly (clang, -O2):
<test>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <sdsort@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <print@plt>

LLVM IR (-O0):
define void @test(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
store i32* %0, i32** %3
store i64 %1, i64* %4
%5 = load i32*, i32** %3
%6 = load i64, i64* %4
%7 = call i32 @sdsort(i32* %5, i64 %6)
%8 = load i32*, i32** %3
%9 = load i64, i64* %4
%10 = call i32 @print(i32* %8, i64 %9)
ret void
}

LLVM IR (-O2):
define void @test(i32* %0, i64 %1) {
%3 = tail call i32 @sdsort(i32* %0, i64 %1)
%4 = tail call i32 @print(i32* %0, i64 %1)
ret void
}
int test_00(int a) { return a >= 0 ? a : 0; }


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     111c <test_00+0x1c>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <test_00+0x26>
xor    %eax,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <test_00+0x26>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
xor    %eax,%eax
test   %edi,%edi
cmovns %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @test_00(i32 %0) {
%2 = icmp sgt i32 %0, 0
%3 = select i1 %2, i32 %0, i32 0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ getuid();
scalar_t__ setuid(int /*<<< orphan*/);
void drop_capabilities(void) {
  if (setuid(getuid()) < 0) {
    do {
      ;
    } while (0);
    exit(-1);
  }
}


x86 assembly (clang, -O0):
<drop_capabilities>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <getuid@plt>
mov    %eax,%edi
call   1050 <setuid@plt>
cmp    $0x0,%rax
jge    1160 <drop_capabilities+0x30>
jmp    1151 <drop_capabilities+0x21>
jmp    1156 <drop_capabilities+0x26>
mov    $0xffffffff,%edi
call   1040 <exit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<drop_capabilities>:
push   %rax
xor    %eax,%eax
call   1030 <getuid@plt>
mov    %eax,%edi
call   1050 <setuid@plt>
test   %rax,%rax
js     1146 <drop_capabilities+0x16>
pop    %rax
ret
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @drop_capabilities() {
%1 = call i32 (...) @getuid()
%2 = call i64 @setuid(i32 %1)
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %0
br label %5
5: ; preds = %4
br label %6
6: ; preds = %5
%7 = call i32 @exit(i32 -1)
unreachable
8: ; preds = %0
ret void
}

LLVM IR (-O2):
define void @drop_capabilities() {
%1 = tail call i32 (...) @getuid()
%2 = tail call i64 @setuid(i32 %1)
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 @exit(i32 -1)
unreachable
6: ; preds = %0
ret void
}