xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fgetc(int /*<<< orphan*/ *);
unsigned long read32(FILE *file) {
  return fgetc(file) | (fgetc(file) << 8) | (fgetc(file) << 16) |
         (fgetc(file) << 24);
}


x86 assembly (clang, -O0):
<read32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
shl    $0x8,%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
shl    $0x10,%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
shl    $0x18,%ecx
or     %ecx,%eax
cltq
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read32>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r15
call   1030 <fgetc@plt>
mov    %eax,%r14d
mov    %r15,%rdi
call   1030 <fgetc@plt>
mov    %eax,%ebp
shl    $0x8,%ebp
or     %r14d,%ebp
mov    %r15,%rdi
call   1030 <fgetc@plt>
mov    %eax,%ebx
shl    $0x10,%ebx
mov    %r15,%rdi
call   1030 <fgetc@plt>
shl    $0x18,%eax
or     %ebx,%eax
or     %ebp,%eax
cltq
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i64 @read32(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fgetc(i32* %3)
%5 = load i32*, i32** %2
%6 = call i32 @fgetc(i32* %5)
%7 = shl i32 %6, 8
%8 = or i32 %4, %7
%9 = load i32*, i32** %2
%10 = call i32 @fgetc(i32* %9)
%11 = shl i32 %10, 16
%12 = or i32 %8, %11
%13 = load i32*, i32** %2
%14 = call i32 @fgetc(i32* %13)
%15 = shl i32 %14, 24
%16 = or i32 %12, %15
%17 = sext i32 %16 to i64
ret i64 %17
}

LLVM IR (-O2):
define i64 @read32(i32* nocapture %0) {
%2 = tail call i32 @fgetc(i32* %0)
%3 = tail call i32 @fgetc(i32* %0)
%4 = shl i32 %3, 8
%5 = or i32 %4, %2
%6 = tail call i32 @fgetc(i32* %0)
%7 = shl i32 %6, 16
%8 = or i32 %5, %7
%9 = tail call i32 @fgetc(i32* %0)
%10 = shl i32 %9, 24
%11 = or i32 %8, %10
%12 = sext i32 %11 to i64
ret i64 %12
}
int mlx5_fpga_ipsec_init(struct mlx5_core_dev *mdev) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.mlx5_core_dev = type opaque
define i32 @mlx5_fpga_ipsec_init(%struct.mlx5_core_dev* nocapture readnone %0) {
ret i32 0
}
const char *String_Definition(void) {
  return "struct String {\n"
         "  char* val;\n"
         "};\n";
}


x86 assembly (clang, -O0):
<String_Definition>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<String_Definition>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [33 x i8] c"struct String {\0A char* val;\0A};\0A\00"
define i8* @String_Definition() {
ret i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [33 x i8] c"struct String {\0A char* val;\0A};\0A\00"
define i8* @String_Definition() {
ret i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0)
}
int sumStallChanges(int *changes, int length) {
  int sum = 0;
  for (int i = 0; i < length; i++) {
    int value = changes[i];
    if (value < 0)
      return -1;
    sum += value;
  }
  return sum;
}


x86 assembly (clang, -O0):
<sumStallChanges>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1160 <sumStallChanges+0x60>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
jge    1149 <sumStallChanges+0x49>
movl   $0xffffffff,-0x4(%rbp)
jmp    1166 <sumStallChanges+0x66>
mov    -0x20(%rbp),%eax
add    -0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1119 <sumStallChanges+0x19>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sumStallChanges>:
test   %esi,%esi
jle    1123 <sumStallChanges+0x23>
mov    %esi,%ecx
xor    %edx,%edx
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
mov    (%rdi,%rdx,4),%esi
test   %esi,%esi
js     1126 <sumStallChanges+0x26>
add    %esi,%eax
add    $0x1,%rdx
cmp    %rdx,%rcx
jne    1110 <sumStallChanges+0x10>
ret
xor    %eax,%eax
ret
mov    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @sumStallChanges(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %16
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %12
%7 = phi i64 [ 0, %4 ], [ %14, %12 ]
%8 = phi i32 [ 0, %4 ], [ %13, %12 ]
%9 = getelementptr inbounds i32, i32* %0, i64 %7
%10 = load i32, i32* %9
%11 = icmp slt i32 %10, 0
br i1 %11, label %16, label %12
12: ; preds = %6
%13 = add nsw i32 %10, %8
%14 = add nuw nsw i64 %7, 1
%15 = icmp eq i64 %14, %5
br i1 %15, label %16, label %6
16: ; preds = %6, %12, %2
%17 = phi i32 [ 0, %2 ], [ %13, %12 ], [ -1, %6 ]
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_truncate_utf8() {
  printf("NOT IMPLEMENTED:"
         "pa_truncate_utf8"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [33 x i8] c"NOT IMPLEMENTED:pa_truncate_utf8\00"
define i32 @pa_truncate_utf8() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ addr_to_str(int /*<<< orphan*/ const *, int /*<<< orphan*/);
int connect_to(int /*<<< orphan*/, int);
int connect_to_addr(const uint8_t *addr, int port) {
  return connect_to(addr_to_str(addr, 0), port);
}


x86 assembly (clang, -O0):
<connect_to_addr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1040 <addr_to_str@plt>
mov    %eax,%edi
mov    -0xc(%rbp),%esi
call   1030 <connect_to@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<connect_to_addr>:
push   %rbx
mov    %esi,%ebx
xor    %esi,%esi
call   1040 <addr_to_str@plt>
mov    %eax,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <connect_to@plt>

LLVM IR (-O0):
define i32 @connect_to_addr(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 = call i32 @addr_to_str(i32* %5, i32 0)
%7 = load i32, i32* %4
%8 = call i32 @connect_to(i32 %6, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @connect_to_addr(i32* %0, i32 %1) {
%3 = tail call i32 @addr_to_str(i32* %0, i32 0)
%4 = tail call i32 @connect_to(i32 %3, i32 %1)
ret i32 %4
}
void port_power(const char *port, int state) {
  printf("(DD) %s(%s, %d)\n", __func__, port, state);
  printf("(WW) %s() Port %s not implemented\n", __func__, port);
}


x86 assembly (clang, -O0):
<port_power>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
lea    0xed3(%rip),%rdi
lea    0xedd(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdx
lea    0xed6(%rip),%rdi
lea    0xec4(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<port_power>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ecx
mov    %rdi,%rbx
lea    0xee0(%rip),%rdi
lea    0xeea(%rip),%r14
mov    %r14,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"(DD) %s(%s, %d)\0A\00"
@__func__.port_power = [11 x i8] c"port_power\00"
@.str.1 = [35 x i8] c"(WW) %s() Port %s not implemented\0A\00"
define void @port_power(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @__func__.port_power, i64 0, i64 0), i8* %5, i32 %6)
%8 = load i8*, i8** %3
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @__func__.port_power, i64 0, i64 0), i8* %8)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"(DD) %s(%s, %d)\0A\00"
@__func__.port_power = [11 x i8] c"port_power\00"
@.str.1 = [35 x i8] c"(WW) %s() Port %s not implemented\0A\00"
define void @port_power(i8* %0, i32 %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @__func__.port_power, i64 0, i64 0), i8* %0, i32 %1)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @__func__.port_power, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
float __s_powf(float, float);
float xy__s_powf(float x) { return __s_powf(x, x); }


x86 assembly (clang, -O0):
<xy__s_powf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x4(%rbp),%xmm1
call   1030 <__s_powf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xy__s_powf>:
movaps %xmm0,%xmm1
jmp    1030 <__s_powf@plt>

LLVM IR (-O0):
define float @xy__s_powf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* %2
%5 = call float @__s_powf(float %3, float %4)
ret float %5
}

LLVM IR (-O2):
define float @xy__s_powf(float %0) {
%2 = tail call float @__s_powf(float %0, float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void destroy(const void *data) {
  void *_data = (void *)data;
  do {
    free(_data);
    _data = NULL;
  } while (0);
}


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

x86 assembly (clang, -O2):
<destroy>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @destroy(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 = %1
%6 = load i8*, i8** %3
%7 = call i32 @free(i8* %6)
store i8* null, i8** %3
br label %8
8: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @destroy(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ genericError(char *, int, char const *, int const,
                                char const *);
void __errorFile(const char *file, const int line, const char *filePath) {
  genericError("%s:%d An error occured while handling the file \"%s\"", 5, file,
               line, filePath);
}


x86 assembly (clang, -O0):
<__errorFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%r8
lea    0xecb(%rip),%rdi
mov    $0x5,%esi
call   1030 <genericError@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__errorFile>:
mov    %rdx,%r8
mov    %esi,%ecx
mov    %rdi,%rdx
lea    0xee1(%rip),%rdi
mov    $0x5,%esi
jmp    1030 <genericError@plt>

LLVM IR (-O0):
@.str = [52 x i8] c"%s:%d An error occured while handling the file \22%s\22\00"
define void @__errorFile(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 @genericError(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i32 5, i8* %7, i32 %8, i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [52 x i8] c"%s:%d An error occured while handling the file \22%s\22\00"
define void @__errorFile(i8* %0, i32 %1, i8* %2) {
%4 = tail call i32 @genericError(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i32 5, i8* %0, i32 %1, i8* %2)
ret void
}
void g_object_set_qdata() {}


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

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

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

LLVM IR (-O2):
define void @g_object_set_qdata() {
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *, int /*<<< orphan*/);
int copy_quaddobl_Laurent_target_system_to_container(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(788, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<copy_quaddobl_Laurent_target_system_to_container>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x314,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_quaddobl_Laurent_target_system_to_container>:
mov    $0x314,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @copy_quaddobl_Laurent_target_system_to_container() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 788, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @copy_quaddobl_Laurent_target_system_to_container() {
%1 = tail call i32 @_ada_use_c2phc(i32 788, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
double gsl_coerce_double(const double x) {
  volatile double y;
  y = x;
  return y;
}


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

x86 assembly (clang, -O2):
<gsl_coerce_double>:
movsd  %xmm0,-0x8(%rsp)
movsd  -0x8(%rsp),%xmm0
ret

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

LLVM IR (-O2):
define double @gsl_coerce_double(double %0) {
%2 = alloca double
%3 = bitcast double* %2 to i8*
store volatile double %0, double* %2
%4 = load volatile double, double* %2
ret double %4
}
/* Variables and functions */
int zero_or_ten(int /*<<< orphan*/);
void l3_concrete_underrun_Bad() {
  int a[10];
  a[zero_or_ten(0) - 1] = 0;
}


x86 assembly (clang, -O0):
<l3_concrete_underrun_Bad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
xor    %edi,%edi
call   1030 <zero_or_ten@plt>
sub    $0x1,%eax
cltq
movl   $0x0,-0x30(%rbp,%rax,4)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<l3_concrete_underrun_Bad>:
xor    %edi,%edi
jmp    1030 <zero_or_ten@plt>

LLVM IR (-O0):
define void @l3_concrete_underrun_Bad() {
%1 = alloca [10 x i32]
%2 = call i32 @zero_or_ten(i32 0)
%3 = sub nsw i32 %2, 1
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 %4
store i32 0, i32* %5
ret void
}

LLVM IR (-O2):
define void @l3_concrete_underrun_Bad() {
%1 = tail call i32 @zero_or_ten(i32 0)
ret void
}
unsigned char scif_getchar(void) {
  unsigned char foo;
  *(volatile unsigned int *)0xa05f8040 =
      ~(*(volatile unsigned int *)0xa05f8040 & 0x00ffffff);
  while (!(*(volatile unsigned short *)0xffe80010 & 0x2))
    ;
  foo = *(volatile unsigned char *)0xffe80014;
  *(volatile unsigned short *)0xffe80010 &= 0xfffd;
  return foo;
}


x86 assembly (clang, -O0):
<scif_getchar>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa05f8040,%eax
mov    (%rax),%ecx
and    $0xffffff,%ecx
xor    $0xffffffff,%ecx
mov    $0xa05f8040,%eax
mov    %ecx,(%rax)
mov    $0xffe80010,%eax
mov    (%rax),%ax
movzwl %ax,%eax
and    $0x2,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    113e <scif_getchar+0x3e>
jmp    1143 <scif_getchar+0x43>
jmp    111b <scif_getchar+0x1b>
mov    $0xffe80014,%eax
mov    (%rax),%al
mov    %al,-0x1(%rbp)
mov    $0xffe80010,%eax
mov    (%rax),%ax
movzwl %ax,%eax
and    $0xfffd,%eax
mov    %ax,%cx
mov    $0xffe80010,%eax
mov    %cx,(%rax)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<scif_getchar>:
mov    $0xffe80010,%ecx
mov    -0x5f887fd0(%rcx),%eax
not    %eax
or     $0xff000000,%eax
mov    %eax,-0x5f887fd0(%rcx)
nopl   0x0(%rax,%rax,1)
movzwl (%rcx),%eax
test   $0x2,%al
je     1120 <scif_getchar+0x20>
mov    0x4(%rcx),%al
andw   $0xfffd,(%rcx)
ret

LLVM IR (-O0):
define zeroext i8 @scif_getchar() {
%1 = alloca i8
%2 = load volatile i32, i32* inttoptr (i64 2690613312 to i32*)
%3 = and i32 %2, 16777215
%4 = xor i32 %3, -1
store volatile i32 %4, i32* inttoptr (i64 2690613312 to i32*)
br label %5
5: ; preds = %11, %0
%6 = load volatile i16, i16* inttoptr (i64 4293394448 to i16*)
%7 = zext i16 %6 to i32
%8 = and i32 %7, 2
%9 = icmp ne i32 %8, 0
%10 = xor i1 %9, true
br i1 %10, label %11, label %12
11: ; preds = %5
br label %5
12: ; preds = %5
%13 = load volatile i8, i8* inttoptr (i64 4293394452 to i8*)
store i8 %13, i8* %1
%14 = load volatile i16, i16* inttoptr (i64 4293394448 to i16*)
%15 = zext i16 %14 to i32
%16 = and i32 %15, 65533
%17 = trunc i32 %16 to i16
store volatile i16 %17, i16* inttoptr (i64 4293394448 to i16*)
%18 = load i8, i8* %1
ret i8 %18
}

LLVM IR (-O2):
define zeroext i8 @scif_getchar() {
%1 = load volatile i32, i32* inttoptr (i64 2690613312 to i32*)
%2 = and i32 %1, 16777215
%3 = xor i32 %2, -1
store volatile i32 %3, i32* inttoptr (i64 2690613312 to i32*)
br label %4
4: ; preds = %4, %0
%5 = load volatile i16, i16* inttoptr (i64 4293394448 to i16*)
%6 = and i16 %5, 2
%7 = icmp eq i16 %6, 0
br i1 %7, label %4, label %8
8: ; preds = %4
%9 = load volatile i8, i8* inttoptr (i64 4293394452 to i8*)
%10 = load volatile i16, i16* inttoptr (i64 4293394448 to i16*)
%11 = and i16 %10, -3
store volatile i16 %11, i16* inttoptr (i64 4293394448 to i16*)
ret i8 %9
}
/* Variables and functions */
int av_log2(int);
int av_ceil_log2_c(int x) { return av_log2((x - 1) << 1); }


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

x86 assembly (clang, -O2):
<av_ceil_log2_c>:
add    %edi,%edi
add    $0xfffffffe,%edi
jmp    1030 <av_log2@plt>

LLVM IR (-O0):
define i32 @av_ceil_log2_c(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 %3, 1
%5 = shl i32 %4, 1
%6 = call i32 @av_log2(i32 %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @av_ceil_log2_c(i32 %0) {
%2 = shl i32 %0, 1
%3 = add i32 %2, -2
%4 = tail call i32 @av_log2(i32 %3)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int procfs_generic_open(int /*<<< orphan*/, char *);
int procfs_map_open(pid_t pid) { return procfs_generic_open(pid, "map"); }


x86 assembly (clang, -O0):
<procfs_map_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    0xedb(%rip),%rsi
call   1030 <procfs_generic_open@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<procfs_map_open>:
lea    0xee9(%rip),%rsi
jmp    1030 <procfs_generic_open@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"map\00"
define i32 @procfs_map_open(i32 %0) {
%2 = tail call i32 @procfs_generic_open(i32 %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
int __check_stack_integrity(unsigned int *canary) {
  if (*canary != 0x1B1B1B1B)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<__check_stack_integrity>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0x1b1b1b1b,(%rax)
je     1124 <__check_stack_integrity+0x24>
movl   $0xffffffff,-0x4(%rbp)
jmp    112b <__check_stack_integrity+0x2b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__check_stack_integrity>:
xor    %eax,%eax
cmpl   $0x1b1b1b1b,(%rdi)
setne  %al
neg    %eax
ret

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

LLVM IR (-O2):
define i32 @__check_stack_integrity(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp ne i32 %2, 454761243
%4 = sext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
unsigned int GET32(int);
int /*<<< orphan*/ PUT32(int, unsigned int);
void sda_output(void) {
  unsigned int ra;
  ra = GET32(0x20200000);
  ra &= ~(7 << (2 * 3));
  ra |= 1 << (2 * 3);
  PUT32(0x20200000, ra);
}


x86 assembly (clang, -O0):
<sda_output>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x20200000,%edi
call   1040 <GET32@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xfffffe3f,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
or     $0x40,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x20200000,%edi
call   1030 <PUT32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sda_output>:
push   %rax
mov    $0x20200000,%edi
call   1040 <GET32@plt>
and    $0xfffffe3f,%eax
lea    0x40(%rax),%esi
mov    $0x20200000,%edi
pop    %rax
jmp    1030 <PUT32@plt>

LLVM IR (-O0):
define void @sda_output() {
%1 = alloca i32
%2 = call i32 @GET32(i32 538968064)
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = and i32 %3, -449
store i32 %4, i32* %1
%5 = load i32, i32* %1
%6 = or i32 %5, 64
store i32 %6, i32* %1
%7 = load i32, i32* %1
%8 = call i32 @PUT32(i32 538968064, i32 %7)
ret void
}

LLVM IR (-O2):
define void @sda_output() {
%1 = tail call i32 @GET32(i32 538968064)
%2 = and i32 %1, -449
%3 = or i32 %2, 64
%4 = tail call i32 @PUT32(i32 538968064, i32 %3)
ret void
}
void gtk_tree_view_new_with_model() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_view_new_with_model() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Hello from program.c\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [21 x i8] c"Hello from program.c\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
void delay_ms(unsigned int tempo) {
  for (int cont = 0; cont < tempo; cont++)
    usleep(1000);
}


x86 assembly (clang, -O0):
<delay_ms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jae    1146 <delay_ms+0x36>
mov    $0x3e8,%edi
call   1030 <usleep@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <delay_ms+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay_ms>:
push   %rbx
test   %edi,%edi
je     112f <delay_ms+0x1f>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x3e8,%edi
call   1030 <usleep@plt>
add    $0xffffffff,%ebx
jne    1120 <delay_ms+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @delay_ms(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %10, %1
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = icmp ult i32 %5, %6
br i1 %7, label %8, label %13
8: ; preds = %4
%9 = call i32 @usleep(i32 1000)
br label %10
10: ; preds = %8
%11 = load i32, i32* %3
%12 = add nsw i32 %11, 1
store i32 %12, i32* %3
br label %4
13: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @delay_ms(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %4
3: ; preds = %4, %1
ret void
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ 0, %1 ]
%6 = tail call i32 @usleep(i32 1000)
%7 = add nuw i32 %5, 1
%8 = icmp eq i32 %7, %0
br i1 %8, label %3, label %4
}
void sme_deinit(struct wpa_supplicant *wpa_s) {}


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

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

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

LLVM IR (-O2):
%struct.wpa_supplicant = type opaque
define void @sme_deinit(%struct.wpa_supplicant* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0x45() {
  Assert_real((ispunct(69) == 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_ispunct.c",
              350, ("ispunct should be 0 for E"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0x45>:
push   %rax
mov    $0x45,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x15e,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 0 for E\00"
define void @t_ispunct_0x45() {
%1 = call i64 @ispunct(i32 69)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 350, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 0 for E\00"
define void @t_ispunct_0x45() {
%1 = tail call i64 @ispunct(i32 69)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 350, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int /*<<< orphan*/ pthread_mutex_unlock(int /*<<< orphan*/ *);
void real_unlockb(pthread_mutex_t *a, pthread_mutex_t *b) {
  pthread_mutex_unlock(b);
  return;
}


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

x86 assembly (clang, -O2):
<real_unlockb>:
mov    %rsi,%rdi
jmp    1030 <pthread_mutex_unlock@plt>

LLVM IR (-O0):
define void @real_unlockb(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %4
%6 = call i32 @pthread_mutex_unlock(i32* %5)
ret void
}

LLVM IR (-O2):
define void @real_unlockb(i32* nocapture readnone %0, i32* %1) {
%3 = tail call i32 @pthread_mutex_unlock(i32* %1)
ret void
}
void inithooks() {}


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

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

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

LLVM IR (-O2):
define void @inithooks() {
ret void
}
void rsvp_put(struct tcf_proto *tp, unsigned long f) {}


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

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

LLVM IR (-O0):
%struct.tcf_proto = type opaque
define void @rsvp_put(%struct.tcf_proto* %0, i64 %1) {
%3 = alloca %struct.tcf_proto*
%4 = alloca i64
store %struct.tcf_proto* %0, %struct.tcf_proto** %3
store i64 %1, i64* %4
ret void
}

LLVM IR (-O2):
%struct.tcf_proto = type opaque
define void @rsvp_put(%struct.tcf_proto* nocapture %0, i64 %1) {
ret void
}
/* Variables and functions */
float UI_Text_Width(char *, float, int /*<<< orphan*/);
float UI_Text_EmWidth(float scale) { return UI_Text_Width("M", scale, 0); }


x86 assembly (clang, -O0):
<UI_Text_EmWidth>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
lea    0xed7(%rip),%rdi
xor    %esi,%esi
call   1030 <UI_Text_Width@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UI_Text_EmWidth>:
lea    0xee9(%rip),%rdi
xor    %esi,%esi
jmp    1030 <UI_Text_Width@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"M\00"
define float @UI_Text_EmWidth(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @UI_Text_Width(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), float %3, i32 0)
ret float %4
}

LLVM IR (-O2):
@.str = [2 x i8] c"M\00"
define float @UI_Text_EmWidth(float %0) {
%2 = tail call float @UI_Text_Width(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), float %0, i32 0)
ret float %2
}
/* Type definitions */
struct rb3_tree {
  int dummy;
};
struct rb3_head {
  int dummy;
};

/* Variables and functions */
struct rb3_head *rb3_get_minmax_in_subtree(int /*<<< orphan*/, int);
int /*<<< orphan*/ rb3_get_root(struct rb3_tree *);
struct rb3_head *rb3_get_minmax(struct rb3_tree *tree, int dir) {
  return rb3_get_minmax_in_subtree(rb3_get_root(tree), dir);
}


x86 assembly (clang, -O0):
<rb3_get_minmax>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <rb3_get_root@plt>
mov    %eax,%edi
mov    -0xc(%rbp),%esi
call   1030 <rb3_get_minmax_in_subtree@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rb3_get_minmax>:
push   %rbx
mov    %esi,%ebx
call   1040 <rb3_get_root@plt>
mov    %eax,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <rb3_get_minmax_in_subtree@plt>

LLVM IR (-O0):
%struct.rb3_head = type { i32 }
%struct.rb3_tree = type { i32 }
define %struct.rb3_head* @rb3_get_minmax(%struct.rb3_tree* %0, i32 %1) {
%3 = alloca %struct.rb3_tree*
%4 = alloca i32
store %struct.rb3_tree* %0, %struct.rb3_tree** %3
store i32 %1, i32* %4
%5 = load %struct.rb3_tree*, %struct.rb3_tree** %3
%6 = call i32 @rb3_get_root(%struct.rb3_tree* %5)
%7 = load i32, i32* %4
%8 = call %struct.rb3_head* @rb3_get_minmax_in_subtree(i32 %6, i32 %7)
ret %struct.rb3_head* %8
}

LLVM IR (-O2):
%struct.rb3_head = type { i32 }
%struct.rb3_tree = type { i32 }
define %struct.rb3_head* @rb3_get_minmax(%struct.rb3_tree* %0, i32 %1) {
%3 = tail call i32 @rb3_get_root(%struct.rb3_tree* %0)
%4 = tail call %struct.rb3_head* @rb3_get_minmax_in_subtree(i32 %3, i32 %1)
ret %struct.rb3_head* %4
}
char *strcat(char *s1, const char *s2) {
  register char *s = s1;
  while (*s++)
    ;
  --s;
  while ((*s++ = *s2++) != 0)
    ;
  return s1;
}


x86 assembly (clang, -O0):
<strcat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
cmpb   $0x0,(%rax)
je     1131 <strcat+0x31>
jmp    1114 <strcat+0x14>
mov    -0x18(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
je     1170 <strcat+0x70>
jmp    113d <strcat+0x3d>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcat>:
mov    %rdi,%rax
mov    %rdi,%rcx
cs nopw 0x0(%rax,%rax,1)
cmpb   $0x0,(%rcx)
lea    0x1(%rcx),%rcx
jne    1110 <strcat+0x10>
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
movzbl (%rsi,%rdx,1),%edi
mov    %dil,-0x1(%rcx,%rdx,1)
add    $0x1,%rdx
test   %dil,%dil
jne    1120 <strcat+0x20>
ret

LLVM IR (-O0):
define i8* @strcat(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 = %12, %2
%8 = load i8*, i8** %5
%9 = getelementptr inbounds i8, i8* %8, i32 1
store i8* %9, i8** %5
%10 = load i8, i8* %8
%11 = icmp ne i8 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %7
br label %7
13: ; preds = %7
%14 = load i8*, i8** %5
%15 = getelementptr inbounds i8, i8* %14, i32 -1
store i8* %15, i8** %5
br label %16
16: ; preds = %24, %13
%17 = load i8*, i8** %4
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %4
%19 = load i8, i8* %17
%20 = load i8*, i8** %5
%21 = getelementptr inbounds i8, i8* %20, i32 1
store i8* %21, i8** %5
store i8 %19, i8* %20
%22 = sext i8 %19 to i32
%23 = icmp ne i32 %22, 0
br i1 %23, label %24, label %25
24: ; preds = %16
br label %16
25: ; preds = %16
%26 = load i8*, i8** %3
ret i8* %26
}

LLVM IR (-O2):
define i8* @strcat(i8* returned %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %5, %3 ]
%5 = getelementptr inbounds i8, i8* %4, i64 1
%6 = load i8, i8* %4
%7 = icmp eq i8 %6, 0
br i1 %7, label %8, label %3
8: ; preds = %3, %8
%9 = phi i8* [ %11, %8 ], [ %1, %3 ]
%10 = phi i8* [ %13, %8 ], [ %4, %3 ]
%11 = getelementptr inbounds i8, i8* %9, i64 1
%12 = load i8, i8* %9
%13 = getelementptr inbounds i8, i8* %10, i64 1
store i8 %12, i8* %10
%14 = icmp eq i8 %12, 0
br i1 %14, label %15, label %8
15: ; preds = %8
ret i8* %0
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_t;

/* Variables and functions */
int payload(int /*<<< orphan*/ *);
int /*<<< orphan*/ pthread_join(int /*<<< orphan*/, int /*<<< orphan*/ *);
void *func(void *data) {
  int rv;
  pthread_t thread;
  rv = payload(&thread);
  if (rv == 1)
    pthread_join(thread, NULL);
  return NULL;
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x10(%rbp),%rdi
call   1030 <payload@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jne    114e <func+0x2e>
mov    -0x10(%rbp),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <pthread_join@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func>:
push   %rax
lea    0x4(%rsp),%rdi
call   1030 <payload@plt>
cmp    $0x1,%eax
jne    113b <func+0x1b>
mov    0x4(%rsp),%edi
xor    %esi,%esi
call   1040 <pthread_join@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @func(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
%5 = call i32 @payload(i32* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i32, i32* %4
%10 = call i32 @pthread_join(i32 %9, i32* null)
br label %11
11: ; preds = %8, %1
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @func(i8* nocapture readnone %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @payload(i32* %2)
%5 = icmp eq i32 %4, 1
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i32 @pthread_join(i32 %7, i32* null)
br label %9
9: ; preds = %6, %1
ret i8* null
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ PTRACE_CONT;
int /*<<< orphan*/ ptrace(int /*<<< orphan*/, int /*<<< orphan*/,
                          int /*<<< orphan*/ *, int /*<<< orphan*/ *);
void target_go_on(pid_t pid) { ptrace(PTRACE_CONT, pid, NULL, NULL); }


x86 assembly (clang, -O0):
<target_go_on>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
xor    %eax,%eax
mov    %eax,%ecx
mov    %rcx,%rdx
call   1030 <ptrace@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<target_go_on>:
mov    %edi,%esi
mov    0x2ec7(%rip),%rax
mov    (%rax),%edi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <ptrace@plt>

LLVM IR (-O0):
@PTRACE_CONT = global i32 0
define void @target_go_on(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @PTRACE_CONT
%4 = load i32, i32* %2
%5 = call i32 @ptrace(i32 %3, i32 %4, i32* null, i32* null)
ret void
}

LLVM IR (-O2):
@PTRACE_CONT = global i32 0
define void @target_go_on(i32 %0) {
%2 = load i32, i32* @PTRACE_CONT
%3 = tail call i32 @ptrace(i32 %2, i32 %0, i32* null, i32* null)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f11();
int /*<<< orphan*/ f12();
int /*<<< orphan*/ f21();
int /*<<< orphan*/ f22();
void main() {
  f11();
  f12();
  f21();
  f22();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <f11@plt>
mov    $0x0,%al
call   1050 <f12@plt>
mov    $0x0,%al
call   1060 <f21@plt>
mov    $0x0,%al
call   1030 <f22@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <f11@plt>
xor    %eax,%eax
call   1050 <f12@plt>
xor    %eax,%eax
call   1060 <f21@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <f22@plt>

LLVM IR (-O0):
define void @main() {
%1 = call i32 (...) @f11()
%2 = call i32 (...) @f12()
%3 = call i32 (...) @f21()
%4 = call i32 (...) @f22()
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @f11()
%2 = tail call i32 (...) @f12()
%3 = tail call i32 (...) @f21()
%4 = tail call i32 (...) @f22()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ACMP1_DriverIRQHandler();
__attribute__((weak)) void ACMP1_IRQHandler(void) { ACMP1_DriverIRQHandler(); }


x86 assembly (clang, -O0):
<ACMP1_IRQHandler>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <ACMP1_DriverIRQHandler@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define weak void @ACMP1_IRQHandler() {
%1 = call i32 (...) @ACMP1_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @ACMP1_IRQHandler() {
%1 = tail call i32 (...) @ACMP1_DriverIRQHandler()
ret void
}
void gdk_owner_change_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gdk_owner_change_get_type() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void dizi_eleman_basma(int dizimiz[], int dizi_boyut) {
  if (dizi_boyut > 0) {
    dizi_eleman_basma(&dizimiz[1], dizi_boyut - 1);
    printf("%d ", dizimiz[0]);
  }
}


x86 assembly (clang, -O0):
<dizi_eleman_basma>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    115e <dizi_eleman_basma+0x3e>
mov    -0x8(%rbp),%rdi
add    $0x4,%rdi
mov    -0xc(%rbp),%esi
sub    $0x1,%esi
call   1040 <dizi_eleman_basma@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dizi_eleman_basma>:
test   %esi,%esi
jle    1143 <dizi_eleman_basma+0x23>
push   %rbx
mov    %rdi,%rbx
add    $0x4,%rdi
add    $0xffffffff,%esi
call   1040 <dizi_eleman_basma@plt>
mov    (%rbx),%esi
lea    0xec3(%rip),%rdi
pop    %rbx
jmp    1030 <printf@plt>
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d \00"
define void @dizi_eleman_basma(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %16
7: ; preds = %2
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i64 1
%10 = load i32, i32* %4
%11 = sub nsw i32 %10, 1
%12 = load i32*, i32** %3
%13 = getelementptr inbounds i32, i32* %12, i64 0
%14 = load i32, i32* %13
%15 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %14)
br label %16
16: ; preds = %7, %2
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @dizi_eleman_basma(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %5, label %4
4: ; preds = %2, %5
ret void
5: ; preds = %2
%6 = getelementptr inbounds i32, i32* %0, i64 1
%7 = add nsw i32 %1, -1
tail call void @dizi_eleman_basma(i32* %6, i32 %7)
%8 = load i32, i32* %0
%9 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %8)
br label %4
}
/* Type definitions */
typedef int uint;
typedef int /*<<< orphan*/ cp;

/* Variables and functions */
unsigned int read4_little_endian(unsigned char *cp) {
  return (uint)(cp[0]) + ((uint)(cp[1]) << 8) + ((uint)(cp[2]) << 16) +
         ((uint)(cp[3]) << 24);
}


x86 assembly (clang, -O0):
<read4_little_endian>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x3(%rcx),%ecx
shl    $0x18,%ecx
add    %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @read4_little_endian(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 = zext i8 %5 to i32
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = shl i32 %10, 8
%12 = add nsw i32 %6, %11
%13 = load i8*, i8** %2
%14 = getelementptr inbounds i8, i8* %13, i64 2
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = shl i32 %16, 16
%18 = add nsw i32 %12, %17
%19 = load i8*, i8** %2
%20 = getelementptr inbounds i8, i8* %19, i64 3
%21 = load i8, i8* %20
%22 = zext i8 %21 to i32
%23 = shl i32 %22, 24
%24 = add nsw i32 %18, %23
ret i32 %24
}

LLVM IR (-O2):
define i32 @read4_little_endian(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = or i32 %7, %3
%9 = getelementptr inbounds i8, i8* %0, i64 2
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = shl nuw nsw i32 %11, 16
%13 = or i32 %8, %12
%14 = getelementptr inbounds i8, i8* %0, i64 3
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = shl nuw i32 %16, 24
%18 = or i32 %13, %17
ret i32 %18
}