xunge/DecIR huggingface dataset:
void iommu_debug_attach_device(struct iommu_domain *domain,
                               struct device *dev) {}


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

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

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

LLVM IR (-O2):
%struct.iommu_domain = type opaque
%struct.device = type opaque
define void @iommu_debug_attach_device(%struct.iommu_domain* nocapture %0, %struct.device* nocapture %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ mintaka_record3_at(int, int /*<<< orphan*/,
                                      int /*<<< orphan*/, int /*<<< orphan*/);
void mintaka_record1_at(int state, uint64_t ts) {
  mintaka_record3_at(state, 0, 0, ts);
}


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

x86 assembly (clang, -O2):
<mintaka_record1_at>:
mov    %esi,%ecx
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <mintaka_record3_at@plt>

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

LLVM IR (-O2):
define void @mintaka_record1_at(i32 %0, i32 %1) {
%3 = tail call i32 @mintaka_record3_at(i32 %0, i32 0, i32 0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr, "Usage: chmod [-R] mode file...\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [32 x i8] c"Usage: chmod [-R] mode file...\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [32 x i8] c"Usage: chmod [-R] mode file...\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
size_t get_data_tag_in_NewOrderSingle(size_t __tag) {
  switch (__tag) {
  case 354:
    return 355;
  case 348:
    return 349;
  case 350:
    return 351;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<get_data_tag_in_NewOrderSingle>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
sub    $0x15c,%rax
je     1158 <get_data_tag_in_NewOrderSingle+0x58>
jmp    1121 <get_data_tag_in_NewOrderSingle+0x21>
mov    -0x18(%rbp),%rax
sub    $0x15e,%rax
je     1165 <get_data_tag_in_NewOrderSingle+0x65>
jmp    1136 <get_data_tag_in_NewOrderSingle+0x36>
mov    -0x18(%rbp),%rax
sub    $0x162,%rax
jne    1172 <get_data_tag_in_NewOrderSingle+0x72>
jmp    114b <get_data_tag_in_NewOrderSingle+0x4b>
movq   $0x163,-0x8(%rbp)
jmp    117a <get_data_tag_in_NewOrderSingle+0x7a>
movq   $0x15d,-0x8(%rbp)
jmp    117a <get_data_tag_in_NewOrderSingle+0x7a>
movq   $0x15f,-0x8(%rbp)
jmp    117a <get_data_tag_in_NewOrderSingle+0x7a>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_data_tag_in_NewOrderSingle>:
lea    -0x15c(%rdi),%rax
cmp    $0x6,%rax
ja     111d <get_data_tag_in_NewOrderSingle+0x1d>
lea    0xeec(%rip),%rax
mov    -0xae0(%rax,%rdi,8),%rax
ff
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i64 @get_data_tag_in_NewOrderSingle(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
switch i64 %4, label %8 [
i64 354, label %5
i64 348, label %6
i64 350, label %7
]
5: ; preds = %1
store i64 355, i64* %2
br label %9
6: ; preds = %1
store i64 349, i64* %2
br label %9
7: ; preds = %1
store i64 351, i64* %2
br label %9
8: ; preds = %1
store i64 0, i64* %2
br label %9
9: ; preds = %8, %7, %6, %5
%10 = load i64, i64* %2
ret i64 %10
}

LLVM IR (-O2):
@switch.table.get_data_tag_in_NewOrderSingle = [7 x i64] [i64 349, i64 0, i64 351, i64 0, i64 0, i64 0, i64 355]
define i64 @get_data_tag_in_NewOrderSingle(i64 %0) {
%2 = add i64 %0, -348
%3 = icmp ult i64 %2, 7
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = getelementptr inbounds [7 x i64], [7 x i64]* @switch.table.get_data_tag_in_NewOrderSingle, i64 0, i64 %2
%6 = load i64, i64* %5
br label %7
7: ; preds = %1, %4
%8 = phi i64 [ %6, %4 ], [ 0, %1 ]
ret i64 %8
}
void jumpfunc(int copy, void *p) {
  void *l = &&jumplabel;
  if (copy)
    __builtin___memcpy_chk(p, l, 128, __builtin_object_size(p, 0));
jumplabel:
  return;
}


x86 assembly (clang, -O0):
<jumpfunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0x2c(%rip),%rax
mov    %rax,-0x18(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     114d <jumpfunc+0x3d>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x80,%edx
mov    $0xffffffffffffffff,%rcx
call   1030 <__memcpy_chk@plt>
jmp    1152 <jumpfunc+0x42>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jumpfunc>:
test   %edi,%edi
je     115b <jumpfunc+0x5b>
movups 0xc0(%rip),%xmm0
movups %xmm0,0x70(%rsi)
movups 0xa5(%rip),%xmm0
movups %xmm0,0x60(%rsi)
movups 0x8a(%rip),%xmm0
movups %xmm0,0x50(%rsi)
movups 0x6f(%rip),%xmm0
movups %xmm0,0x40(%rsi)
movups 0x54(%rip),%xmm0
movups %xmm0,0x30(%rsi)
movups 0x39(%rip),%xmm0
movups %xmm0,0x20(%rsi)
movups 0x1e(%rip),%xmm0
movups %xmm0,0x10(%rsi)
movups 0x3(%rip),%xmm0
movups %xmm0,(%rsi)
ret

LLVM IR (-O0):
define void @jumpfunc(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
store i8* blockaddress(@jumpfunc, %15), i8** %5
%6 = load i32, i32* %3
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %2
%9 = load i8*, i8** %4
%10 = load i8*, i8** %5
%11 = load i8*, i8** %4
%12 = call i64 @llvm.objectsize.i64.p0i8(i8* %11, i1 false, i1 true, i1 false)
%13 = call i8* @__memcpy_chk(i8* %9, i8* %10, i64 128, i64 %12)
br label %14
14: ; preds = %8, %2
br label %15
15: ; preds = %14, %16
ret void
16: ; No predecessors!
indirectbr i8* undef, [label %15]
}

LLVM IR (-O2):
define void @jumpfunc(i32 %0, i8* %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %5, label %4
4: ; preds = %2
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 dereferenceable(128) %1, i8* align 1 dereferenceable(128) blockaddress(@jumpfunc, %5), i64 128, i1 false)
br label %5
5: ; preds = %2, %4
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int solcon_retrieve_next_multprec_initialize(void) {
  int a, *b, fail;
  double *c;
  a = 0;
  fail = _ada_use_c2phc(279, &a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<solcon_retrieve_next_multprec_initialize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x117,%edi
lea    -0x4(%rbp),%rsi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solcon_retrieve_next_multprec_initialize>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x117,%edi
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @solcon_retrieve_next_multprec_initialize() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = call i32 @_ada_use_c2phc(i32 279, i32* %1, i32* undef, double* undef)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ NoFunction();
void ThreeFunction() { NoFunction(); }


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

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

LLVM IR (-O0):
define void @ThreeFunction() {
%1 = call i32 (...) @NoFunction()
ret void
}

LLVM IR (-O2):
define void @ThreeFunction() {
%1 = tail call i32 (...) @NoFunction()
ret void
}
/* Variables and functions */
scalar_t__ getdetabline(char *);
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char *argv[]) {
  char line[1000000];
  while (getdetabline(line) > 0) {
    printf("%s", line);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf4250,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0xf4250(%rbp),%rdi
call   1040 <getdetabline@plt>
cmp    $0x0,%rax
jle    1167 <main+0x47>
lea    -0xf4250(%rbp),%rsi
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
jmp    1139 <main+0x19>
xor    %eax,%eax
add    $0xf4250,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0xf4248,%rsp
mov    %rsp,%rdi
call   1040 <getdetabline@plt>
test   %rax,%rax
jle    1168 <main+0x48>
lea    0xec2(%rip),%r14
mov    %rsp,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1040 <getdetabline@plt>
test   %rax,%rax
jg     1150 <main+0x30>
xor    %eax,%eax
add    $0xf4248,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [1000000 x i8]
%4 = getelementptr inbounds [1000000 x i8], [1000000 x i8]* %3, i64 0, i64 0
%5 = call i64 @getdetabline(i8* %4)
%6 = icmp sgt i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %2, %7
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%9 = call i64 @getdetabline(i8* %4)
%10 = icmp sgt i64 %9, 0
br i1 %10, label %7, label %11
11: ; preds = %7, %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double, double);
int /*<<< orphan*/ stat(double *, double *, double *, unsigned int);
int main() {
  double ave, max;
  double a[] = {1, 2, 3, 4};
  unsigned els = 4;
  stat(&ave, &max, a, els);
  printf("%lf %lf\n", ave, max);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xec4(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xec1(%rip),%rax
mov    %rax,-0x28(%rbp)
movl   $0x4,-0x44(%rbp)
lea    -0x40(%rbp),%rdx
mov    -0x44(%rbp),%ecx
lea    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <stat@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x38,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
lea    0x8(%rsp),%rdi
mov    %rsp,%rsi
lea    0x10(%rsp),%rdx
mov    $0x4,%ecx
call   1040 <stat@plt>
movsd  (%rsp),%xmm1
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x38,%rsp
ret

LLVM IR (-O0):
@__const.main.a = [4 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 4.000000e+00]
@.str = [9 x i8] c"%lf %lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca [4 x double]
%5 = alloca i32
store i32 0, i32* %1
%6 = bitcast [4 x double]* %4 to i8*
store i32 4, i32* %5
%7 = getelementptr inbounds [4 x double], [4 x double]* %4, i64 0, i64 0
%8 = load i32, i32* %5
%9 = call i32 @stat(double* %2, double* %3, double* %7, i32 %8)
%10 = load double, double* %2
%11 = load double, double* %3
%12 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), double %10, double %11)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [4 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 4.000000e+00]
@.str = [9 x i8] c"%lf %lf\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca [4 x double]
%4 = bitcast double* %1 to i8*
%5 = bitcast double* %2 to i8*
%6 = bitcast [4 x double]* %3 to i8*
%7 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 0
%8 = call i32 @stat(double* %1, double* %2, double* %7, i32 4)
%9 = load double, double* %2
%10 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), double undef, double %9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ RegWriteA_Ofilm(int, int);
void GyOutSignalCont_OFILM(void) { RegWriteA_Ofilm(0x0280, 0x04); }


x86 assembly (clang, -O0):
<GyOutSignalCont_OFILM>:
push   %rbp
mov    %rsp,%rbp
mov    $0x280,%edi
mov    $0x4,%esi
call   1030 <RegWriteA_Ofilm@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<GyOutSignalCont_OFILM>:
mov    $0x280,%edi
mov    $0x4,%esi
jmp    1030 <RegWriteA_Ofilm@plt>

LLVM IR (-O0):
define void @GyOutSignalCont_OFILM() {
%1 = call i32 @RegWriteA_Ofilm(i32 640, i32 4)
ret void
}

LLVM IR (-O2):
define void @GyOutSignalCont_OFILM() {
%1 = tail call i32 @RegWriteA_Ofilm(i32 640, i32 4)
ret void
}
/* Variables and functions */
scalar_t__ config_module();
scalar_t__ config_port();
scalar_t__ config_service();
int config(void) {
  if (config_module())
    return -1;
  if (config_port())
    return -1;
  if (config_service())
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<config>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <config_module@plt>
cmp    $0x0,%rax
je     1155 <config+0x25>
movl   $0xffffffff,-0x4(%rbp)
jmp    1196 <config+0x66>
mov    $0x0,%al
call   1040 <config_port@plt>
cmp    $0x0,%rax
je     1172 <config+0x42>
movl   $0xffffffff,-0x4(%rbp)
jmp    1196 <config+0x66>
mov    $0x0,%al
call   1030 <config_service@plt>
cmp    $0x0,%rax
je     118f <config+0x5f>
movl   $0xffffffff,-0x4(%rbp)
jmp    1196 <config+0x66>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<config>:
push   %rbx
xor    %eax,%eax
call   1050 <config_module@plt>
mov    $0xffffffff,%ebx
test   %rax,%rax
jne    115a <config+0x2a>
xor    %eax,%eax
call   1040 <config_port@plt>
test   %rax,%rax
jne    115a <config+0x2a>
xor    %eax,%eax
call   1030 <config_service@plt>
neg    %rax
sbb    %ebx,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @config() {
%1 = alloca i32
%2 = call i64 (...) @config_module()
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
store i32 -1, i32* %1
br label %14
5: ; preds = %0
%6 = call i64 (...) @config_port()
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %5
store i32 -1, i32* %1
br label %14
9: ; preds = %5
%10 = call i64 (...) @config_service()
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %9
store i32 -1, i32* %1
br label %14
13: ; preds = %9
store i32 0, i32* %1
br label %14
14: ; preds = %13, %12, %8, %4
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
define i32 @config() {
%1 = tail call i64 (...) @config_module()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %10
3: ; preds = %0
%4 = tail call i64 (...) @config_port()
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = tail call i64 (...) @config_service()
%8 = icmp ne i64 %7, 0
%9 = sext i1 %8 to i32
br label %10
10: ; preds = %6, %3, %0
%11 = phi i32 [ -1, %0 ], [ -1, %3 ], [ %9, %6 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ assert(char *);
scalar_t__ calloc(size_t const, int);
char *cvector(const size_t n) {
  char *v = (char *)calloc(n, sizeof(char));
  assert(v);
  return v;
}


x86 assembly (clang, -O0):
<cvector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1030 <calloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <assert@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cvector>:
push   %rbx
mov    $0x1,%esi
call   1030 <calloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <assert@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @cvector(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i64 @calloc(i64 %4, i32 1)
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = call i32 @assert(i8* %7)
%9 = load i8*, i8** %3
ret i8* %9
}

LLVM IR (-O2):
define i8* @cvector(i64 %0) {
%2 = tail call i64 @calloc(i64 %0, i32 1)
%3 = inttoptr i64 %2 to i8*
%4 = tail call i32 @assert(i8* %3)
ret i8* %3
}
/* Type definitions */
struct jx_parser {
  int dummy;
};
struct jx {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ jx_delete(struct jx *);
struct jx *jx_parse(struct jx_parser *);
scalar_t__ jx_parser_errors(struct jx_parser *);
struct jx *jx_parser_yield(struct jx_parser *p) {
  struct jx *j = jx_parse(p);
  if (jx_parser_errors(p)) {
    jx_delete(j);
    return 0;
  }
  return j;
}


x86 assembly (clang, -O0):
<jx_parser_yield>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <jx_parse@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <jx_parser_errors@plt>
cmp    $0x0,%rax
je     1172 <jx_parser_yield+0x42>
mov    -0x18(%rbp),%rdi
call   1050 <jx_delete@plt>
movq   $0x0,-0x8(%rbp)
jmp    117a <jx_parser_yield+0x4a>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jx_parser_yield>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <jx_parse@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <jx_parser_errors@plt>
test   %rax,%rax
je     1157 <jx_parser_yield+0x27>
mov    %r14,%rdi
call   1050 <jx_delete@plt>
xor    %r14d,%r14d
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.jx = type { i32 }
%struct.jx_parser = type { i32 }
define %struct.jx* @jx_parser_yield(%struct.jx_parser* %0) {
%2 = alloca %struct.jx*
%3 = alloca %struct.jx_parser*
%4 = alloca %struct.jx*
store %struct.jx_parser* %0, %struct.jx_parser** %3
%5 = load %struct.jx_parser*, %struct.jx_parser** %3
%6 = call %struct.jx* @jx_parse(%struct.jx_parser* %5)
store %struct.jx* %6, %struct.jx** %4
%7 = load %struct.jx_parser*, %struct.jx_parser** %3
%8 = call i64 @jx_parser_errors(%struct.jx_parser* %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = load %struct.jx*, %struct.jx** %4
%12 = call i32 @jx_delete(%struct.jx* %11)
store %struct.jx* null, %struct.jx** %2
br label %15
13: ; preds = %1
%14 = load %struct.jx*, %struct.jx** %4
store %struct.jx* %14, %struct.jx** %2
br label %15
15: ; preds = %13, %10
%16 = load %struct.jx*, %struct.jx** %2
ret %struct.jx* %16
}

LLVM IR (-O2):
%struct.jx = type { i32 }
%struct.jx_parser = type { i32 }
define %struct.jx* @jx_parser_yield(%struct.jx_parser* %0) {
%2 = tail call %struct.jx* @jx_parse(%struct.jx_parser* %0)
%3 = tail call i64 @jx_parser_errors(%struct.jx_parser* %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 @jx_delete(%struct.jx* %2)
br label %7
7: ; preds = %1, %5
%8 = phi %struct.jx* [ null, %5 ], [ %2, %1 ]
ret %struct.jx* %8
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0xc6() {
  Assert_real((iscntrl(198) == 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_iscntrl.c",
              995, ("iscntrl should be 0 for 0xc6"));
}


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

x86 assembly (clang, -O2):
<t_iscntrl_0xc6>:
push   %rax
mov    $0xc6,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3e3,%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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xc6\00"
define void @t_iscntrl_0xc6() {
%1 = call i64 @iscntrl(i32 198)
%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 995, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xc6\00"
define void @t_iscntrl_0xc6() {
%1 = tail call i64 @iscntrl(i32 198)
%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 995, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
extern void le32enc(void *buf, unsigned long u) {
  unsigned char *p = (unsigned char *)buf;
  p[0] = u & 0xff;
  p[1] = (u >> 8) & 0xff;
  p[2] = (u >> 16) & 0xff;
  p[3] = (u >> 24) & 0xff;
}


x86 assembly (clang, -O0):
<le32enc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
shr    $0x8,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x10(%rbp),%rax
shr    $0x10,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x10(%rbp),%rax
shr    $0x18,%rax
and    $0xff,%rax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x3(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @le32enc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
store i8* %6, i8** %5
%7 = load i64, i64* %4
%8 = and i64 %7, 255
%9 = trunc i64 %8 to i8
%10 = load i8*, i8** %5
%11 = getelementptr inbounds i8, i8* %10, i64 0
store i8 %9, i8* %11
%12 = load i64, i64* %4
%13 = lshr i64 %12, 8
%14 = and i64 %13, 255
%15 = trunc i64 %14 to i8
%16 = load i8*, i8** %5
%17 = getelementptr inbounds i8, i8* %16, i64 1
store i8 %15, i8* %17
%18 = load i64, i64* %4
%19 = lshr i64 %18, 16
%20 = and i64 %19, 255
%21 = trunc i64 %20 to i8
%22 = load i8*, i8** %5
%23 = getelementptr inbounds i8, i8* %22, i64 2
store i8 %21, i8* %23
%24 = load i64, i64* %4
%25 = lshr i64 %24, 24
%26 = and i64 %25, 255
%27 = trunc i64 %26 to i8
%28 = load i8*, i8** %5
%29 = getelementptr inbounds i8, i8* %28, i64 3
store i8 %27, i8* %29
ret void
}

LLVM IR (-O2):
define void @le32enc(i8* nocapture writeonly %0, i64 %1) {
%3 = trunc i64 %1 to i8
store i8 %3, i8* %0
%4 = lshr i64 %1, 8
%5 = trunc i64 %4 to i8
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %5, i8* %6
%7 = lshr i64 %1, 16
%8 = trunc i64 %7 to i8
%9 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %8, i8* %9
%10 = lshr i64 %1, 24
%11 = trunc i64 %10 to i8
%12 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %11, i8* %12
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, void *);
int /*<<< orphan*/ stderr;
void rtpp_stream_handle_play_fin(void *pub) {
  fprintf(stderr,
          "Method rtpp_stream@%p::handle_play (rtpp_stream_handle_play) is "
          "invoked after destruction\x0a",
          pub);
  abort();
}


x86 assembly (clang, -O0):
<rtpp_stream_handle_play_fin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<rtpp_stream_handle_play_fin>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [91 x i8] c"Method rtpp_stream@%p::handle_play (rtpp_stream_handle_play) is invoked after destruction\0A\00"
define void @rtpp_stream_handle_play_fin(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([91 x i8], [91 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [91 x i8] c"Method rtpp_stream@%p::handle_play (rtpp_stream_handle_play) is invoked after destruction\0A\00"
define void @rtpp_stream_handle_play_fin(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([91 x i8], [91 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @abort()
unreachable
}
/* Type definitions */
struct tcb {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ CDE_begin_standard_fileop(struct tcb *, char *);
void CDE_begin_chdir(struct tcb *tcp) {
  CDE_begin_standard_fileop(tcp, "chdir");
}


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

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

LLVM IR (-O0):
%struct.tcb = type { i32 }
@.str = [6 x i8] c"chdir\00"
define void @CDE_begin_chdir(%struct.tcb* %0) {
%2 = alloca %struct.tcb*
store %struct.tcb* %0, %struct.tcb** %2
%3 = load %struct.tcb*, %struct.tcb** %2
%4 = call i32 @CDE_begin_standard_fileop(%struct.tcb* %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.tcb = type { i32 }
@.str = [6 x i8] c"chdir\00"
define void @CDE_begin_chdir(%struct.tcb* %0) {
%2 = tail call i32 @CDE_begin_standard_fileop(%struct.tcb* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
void unsigned_char_add_signed_char_signed_char(unsigned char *LHS,
                                               signed char RHS) {
  (*LHS) += RHS;
}


x86 assembly (clang, -O0):
<unsigned_char_add_signed_char_signed_char>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%edx
mov    -0x8(%rbp),%rax
movzbl (%rax),%ecx
add    %edx,%ecx
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<unsigned_char_add_signed_char_signed_char>:
add    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @unsigned_char_add_signed_char_signed_char(i8* %0, i8 signext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = load i8*, i8** %3
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
%10 = add nsw i32 %9, %6
%11 = trunc i32 %10 to i8
store i8 %11, i8* %7
ret void
}

LLVM IR (-O2):
define void @unsigned_char_add_signed_char_signed_char(i8* nocapture %0, i8 signext %1) {
%3 = load i8, i8* %0
%4 = add i8 %3, %1
store i8 %4, i8* %0
ret void
}
/* Variables and functions */
char *safe_malloc(long);
int /*<<< orphan*/ strcpy(char *, char const *);
long strlen(char const *);
char *_string_clone(const char *in_string) {
  char *result;
  long length;
  length = strlen(in_string);
  result = safe_malloc(length + 1);
  strcpy(result, in_string);
  return result;
}


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

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

LLVM IR (-O0):
define i8* @_string_clone(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i64 @strlen(i8* %5)
store i64 %6, i64* %4
%7 = load i64, i64* %4
%8 = add nsw i64 %7, 1
%9 = call i8* @safe_malloc(i64 %8)
store i8* %9, i8** %3
%10 = load i8*, i8** %3
%11 = load i8*, i8** %2
%12 = call i32 @strcpy(i8* %10, i8* %11)
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
define i8* @_string_clone(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @safe_malloc(i64 %3)
%5 = tail call i32 @strcpy(i8* %4, i8* %0)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ nrf_write(int, unsigned char *, int);
void __attribute__((unused)) nrf_set_dynpd(unsigned char dynpd) {
  nrf_write(0x20 | 0x1C, &dynpd, 1);
}


x86 assembly (clang, -O0):
<nrf_set_dynpd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x3c,%edi
lea    -0x1(%rbp),%rsi
mov    $0x1,%edx
call   1030 <nrf_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nrf_set_dynpd>:
push   %rax
mov    %dil,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    $0x3c,%edi
mov    $0x1,%edx
call   1030 <nrf_write@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @nrf_set_dynpd(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @nrf_write(i32 60, i8* %2, i32 1)
ret void
}

LLVM IR (-O2):
define void @nrf_set_dynpd(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @nrf_write(i32 60, i8* %2, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ kernel_dgemv_n_4_vs_lib4(int, int, double *, double *,
                                            double *, double *, int);
void kernel_dgemv_n_4_lib4(int kmax, double *A, double *x, double *y, double *z,
                           int alg) {
  if (kmax <= 0)
    return;
  kernel_dgemv_n_4_vs_lib4(4, kmax, A, x, y, z, alg);
}


x86 assembly (clang, -O0):
<kernel_dgemv_n_4_lib4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
cmpl   $0x0,-0x4(%rbp)
jg     113e <kernel_dgemv_n_4_lib4+0x2e>
jmp    1161 <kernel_dgemv_n_4_lib4+0x51>
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    -0x2c(%rbp),%eax
mov    $0x4,%edi
mov    %eax,(%rsp)
call   1030 <kernel_dgemv_n_4_vs_lib4@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kernel_dgemv_n_4_lib4>:
test   %edi,%edi
jle    1135 <kernel_dgemv_n_4_lib4+0x25>
push   %rax
mov    %r8,%rax
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %edi,%esi
mov    %r9d,(%rsp)
mov    $0x4,%edi
mov    %rax,%r9
call   1030 <kernel_dgemv_n_4_vs_lib4@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @kernel_dgemv_n_4_lib4(i32 %0, double* %1, double* %2, double* %3, double* %4, i32 %5) {
%7 = icmp slt i32 %0, 1
br i1 %7, label %10, label %8
8: ; preds = %6
%9 = tail call i32 @kernel_dgemv_n_4_vs_lib4(i32 4, i32 %0, double* %1, double* %2, double* %3, double* %4, i32 %5)
br label %10
10: ; preds = %6, %8
ret void
}
/* Variables and functions */
size_t strlen(char *);
char *tmpnam(int /*<<< orphan*/ *);
char *tmpnam_wrap(size_t *len) {
  char *str;
  str = tmpnam(NULL);
  *len = strlen(str);
  return (str);
}


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

x86 assembly (clang, -O2):
<tmpnam_wrap>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %edi,%edi
call   1040 <tmpnam@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <strlen@plt>
mov    %rax,(%r14)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @tmpnam_wrap(i64* %0) {
%2 = alloca i64*
%3 = alloca i8*
store i64* %0, i64** %2
%4 = call i8* @tmpnam(i32* null)
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @strlen(i8* %5)
%7 = load i64*, i64** %2
store i64 %6, i64* %7
%8 = load i8*, i8** %3
ret i8* %8
}

LLVM IR (-O2):
define i8* @tmpnam_wrap(i64* nocapture writeonly %0) {
%2 = tail call i8* @tmpnam(i32* null)
%3 = tail call i64 @strlen(i8* dereferenceable(1) %2)
store i64 %3, i64* %0
ret i8* %2
}
int goodRound(double x) {
  double ax = x;
  if (ax < 0)
    ax = -ax;
  int i = ax;
  if (ax - i > 0.5)
    i++;
  if (x < 0)
    return -i;
  return i;
}


x86 assembly (clang, -O0):
<goodRound>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    1142 <goodRound+0x42>
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x18(%rbp)
cvttsd2si -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
movsd  -0x18(%rbp),%xmm0
cvtsi2sdl -0x1c(%rbp),%xmm1
subsd  %xmm1,%xmm0
movsd  0xea0(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1173 <goodRound+0x73>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    118e <goodRound+0x8e>
xor    %eax,%eax
sub    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1194 <goodRound+0x94>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<goodRound>:
movapd 0xef8(%rip),%xmm1
xorpd  %xmm0,%xmm1
xorpd  %xmm2,%xmm2
movapd %xmm0,%xmm3
cmpltsd %xmm2,%xmm3
andpd  %xmm3,%xmm1
andnpd %xmm0,%xmm3
orpd   %xmm1,%xmm3
cvttsd2si %xmm3,%eax
cvttpd2dq %xmm3,%xmm1
cvtdq2pd %xmm1,%xmm1
subsd  %xmm1,%xmm3
xor    %ecx,%ecx
ucomisd 0xed1(%rip),%xmm3
seta   %cl
add    %eax,%ecx
mov    %ecx,%eax
neg    %eax
ucomisd %xmm0,%xmm2
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define i32 @goodRound(double %0) {
%2 = alloca i32
%3 = alloca double
%4 = alloca double
%5 = alloca i32
store double %0, double* %3
%6 = load double, double* %3
store double %6, double* %4
%7 = load double, double* %4
%8 = fcmp olt double %7, 0.000000e+00
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load double, double* %4
%11 = fneg double %10
store double %11, double* %4
br label %12
12: ; preds = %9, %1
%13 = load double, double* %4
%14 = fptosi double %13 to i32
store i32 %14, i32* %5
%15 = load double, double* %4
%16 = load i32, i32* %5
%17 = sitofp i32 %16 to double
%18 = fsub double %15, %17
%19 = fcmp ogt double %18, 5.000000e-01
br i1 %19, label %20, label %23
20: ; preds = %12
%21 = load i32, i32* %5
%22 = add nsw i32 %21, 1
store i32 %22, i32* %5
br label %23
23: ; preds = %20, %12
%24 = load double, double* %3
%25 = fcmp olt double %24, 0.000000e+00
br i1 %25, label %26, label %29
26: ; preds = %23
%27 = load i32, i32* %5
%28 = sub nsw i32 0, %27
store i32 %28, i32* %2
br label %31
29: ; preds = %23
%30 = load i32, i32* %5
store i32 %30, i32* %2
br label %31
31: ; preds = %29, %26
%32 = load i32, i32* %2
ret i32 %32
}

LLVM IR (-O2):
define i32 @goodRound(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = fneg double %0
%4 = select i1 %2, double %3, double %0
%5 = fptosi double %4 to i32
%6 = sitofp i32 %5 to double
%7 = fsub double %4, %6
%8 = fcmp ogt double %7, 5.000000e-01
%9 = zext i1 %8 to i32
%10 = add nsw i32 %9, %5
%11 = sub nsw i32 0, %10
%12 = select i1 %2, i32 %11, i32 %10
ret i32 %12
}
__attribute__((no)) int loop(int zero) {
  int t1 = 1 + zero;
  int i;
  for (i = zero; i < 4096; i += 1) {
    t1 *= t1;
  }
  return t1;
}


x86 assembly (clang, -O0):
<loop>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x1000,-0xc(%rbp)
jge    113b <loop+0x3b>
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1116 <loop+0x16>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<loop>:
lea    0x1(%rdi),%eax
cmp    $0xfff,%edi
jg     116d <loop+0x6d>
mov    %edi,%ecx
neg    %ecx
and    $0x7,%ecx
je     1130 <loop+0x30>
neg    %ecx
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
imul   %eax,%eax
add    $0xffffffff,%edx
cmp    %edx,%ecx
jne    1120 <loop+0x20>
mov    %edi,%ecx
sub    %edx,%ecx
jmp    1132 <loop+0x32>
mov    %edi,%ecx
add    $0xfffff007,%edi
cmp    $0x7,%edi
jb     116d <loop+0x6d>
add    $0xfffff000,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
imul   %eax,%eax
imul   %eax,%eax
imul   %eax,%eax
imul   %eax,%eax
imul   %eax,%eax
imul   %eax,%eax
imul   %eax,%eax
imul   %eax,%eax
add    $0x8,%ecx
jne    1150 <loop+0x50>
ret

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

LLVM IR (-O2):
define i32 @loop(i32 %0) {
%2 = add nsw i32 %0, 1
%3 = icmp slt i32 %0, 4096
br i1 %3, label %4, label %35
4: ; preds = %1
%5 = sub i32 0, %0
%6 = and i32 %5, 7
%7 = icmp eq i32 %6, 0
br i1 %7, label %16, label %8
8: ; preds = %4, %8
%9 = phi i32 [ %13, %8 ], [ %0, %4 ]
%10 = phi i32 [ %12, %8 ], [ %2, %4 ]
%11 = phi i32 [ %14, %8 ], [ 0, %4 ]
%12 = mul nsw i32 %10, %10
%13 = add i32 %9, 1
%14 = add i32 %11, 1
%15 = icmp eq i32 %14, %6
br i1 %15, label %16, label %8
16: ; preds = %8, %4
%17 = phi i32 [ undef, %4 ], [ %12, %8 ]
%18 = phi i32 [ %0, %4 ], [ %13, %8 ]
%19 = phi i32 [ %2, %4 ], [ %12, %8 ]
%20 = add i32 %0, -4089
%21 = icmp ult i32 %20, 7
br i1 %21, label %35, label %22
22: ; preds = %16, %22
%23 = phi i32 [ %33, %22 ], [ %18, %16 ]
%24 = phi i32 [ %32, %22 ], [ %19, %16 ]
%25 = mul nsw i32 %24, %24
%26 = mul nsw i32 %25, %25
%27 = mul nsw i32 %26, %26
%28 = mul nsw i32 %27, %27
%29 = mul nsw i32 %28, %28
%30 = mul nsw i32 %29, %29
%31 = mul nsw i32 %30, %30
%32 = mul nsw i32 %31, %31
%33 = add i32 %23, 8
%34 = icmp eq i32 %33, 4096
br i1 %34, label %35, label %22
35: ; preds = %16, %22, %1
%36 = phi i32 [ %2, %1 ], [ %17, %16 ], [ %32, %22 ]
ret i32 %36
}
/* Variables and functions */
int /*<<< orphan*/ i2c_EnableNoiseFilter(int);
void i2c1_EnableNoiseFilter(void) { i2c_EnableNoiseFilter(1); }


x86 assembly (clang, -O0):
<i2c1_EnableNoiseFilter>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <i2c_EnableNoiseFilter@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2c1_EnableNoiseFilter>:
mov    $0x1,%edi
jmp    1030 <i2c_EnableNoiseFilter@plt>

LLVM IR (-O0):
define void @i2c1_EnableNoiseFilter() {
%1 = call i32 @i2c_EnableNoiseFilter(i32 1)
ret void
}

LLVM IR (-O2):
define void @i2c1_EnableNoiseFilter() {
%1 = tail call i32 @i2c_EnableNoiseFilter(i32 1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ flush(void *);
int /*<<< orphan*/ maccess(void *);
size_t rdtscp_noaux();
size_t flushandreload(void *addr) {
  uint32_t aux;
  size_t time = rdtscp_noaux();
  maccess(addr);
  size_t delta = rdtscp_noaux() - time;
  flush(addr);
  return delta;
}


x86 assembly (clang, -O0):
<flushandreload>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1050 <rdtscp_noaux@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <maccess@plt>
mov    $0x0,%al
call   1050 <rdtscp_noaux@plt>
sub    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <flush@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<flushandreload>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
xor    %eax,%eax
call   1050 <rdtscp_noaux@plt>
mov    %rax,%r14
mov    %r15,%rdi
call   1040 <maccess@plt>
xor    %eax,%eax
call   1050 <rdtscp_noaux@plt>
mov    %rax,%rbx
sub    %r14,%rbx
mov    %r15,%rdi
call   1030 <flush@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i64 @flushandreload(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i64
%5 = alloca i64
store i8* %0, i8** %2
%6 = call i64 (...) @rdtscp_noaux()
store i64 %6, i64* %4
%7 = load i8*, i8** %2
%8 = call i32 @maccess(i8* %7)
%9 = call i64 (...) @rdtscp_noaux()
%10 = load i64, i64* %4
%11 = sub i64 %9, %10
store i64 %11, i64* %5
%12 = load i8*, i8** %2
%13 = call i32 @flush(i8* %12)
%14 = load i64, i64* %5
ret i64 %14
}

LLVM IR (-O2):
define i64 @flushandreload(i8* %0) {
%2 = tail call i64 (...) @rdtscp_noaux()
%3 = tail call i32 @maccess(i8* %0)
%4 = tail call i64 (...) @rdtscp_noaux()
%5 = sub i64 %4, %2
%6 = tail call i32 @flush(i8* %0)
ret i64 %5
}
int minimum(int a, int b) {
  if (a <= b) {
    return a;
  } else {
    return b;
  }
}


x86 assembly (clang, -O0):
<minimum>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     1121 <minimum+0x21>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1127 <minimum+0x27>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @minimum(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
void pthread_getschedparam() {}


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

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

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

LLVM IR (-O2):
define void @pthread_getschedparam() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lt_fatal(char *, int, char *);
scalar_t__ malloc(size_t);
void *xmalloc(size_t num) {
  void *p = (void *)malloc(num);
  if (!p)
    lt_fatal("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/filip-be/ImageComparer/refs/heads/"
             "master/exiv2/expat/examples/.libs/lt-elements.c",
             311, "memory exhausted");
  return p;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115c <xmalloc+0x3c>
lea    0xeb5(%rip),%rdi
mov    $0x137,%esi
lea    0xf55(%rip),%rdx
call   1030 <lt_fatal@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbx
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1146 <xmalloc+0x26>
lea    0xecb(%rip),%rdi
lea    0xf70(%rip),%rdx
mov    $0x137,%esi
call   1030 <lt_fatal@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [172 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/filip-be/ImageComparer/refs/heads/master/exiv2/expat/examples/.libs/lt-elements.c\00"
@.str.1 = [17 x i8] c"memory exhausted\00"
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i64 @malloc(i64 %4)
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = icmp ne i8* %7, null
br i1 %8, label %11, label %9
9: ; preds = %1
%10 = call i32 @lt_fatal(i8* getelementptr inbounds ([172 x i8], [172 x i8]* @.str, i64 0, i64 0), i32 311, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
br label %11
11: ; preds = %9, %1
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
@.str = [172 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/filip-be/ImageComparer/refs/heads/master/exiv2/expat/examples/.libs/lt-elements.c\00"
@.str.1 = [17 x i8] c"memory exhausted\00"
define i8* @xmalloc(i64 %0) {
%2 = tail call i64 @malloc(i64 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @lt_fatal(i8* getelementptr inbounds ([172 x i8], [172 x i8]* @.str, i64 0, i64 0), i32 311, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
%7 = inttoptr i64 %2 to i8*
ret i8* %7
}