xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0x95() {
  Assert_real((isupper(149) == 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_isupper.c",
              750, ("isupper should be 0 for 0x95"));
}


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

x86 assembly (clang, -O2):
<t_isupper_0x95>:
push   %rax
mov    $0x95,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2ee,%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_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0x95\00"
define void @t_isupper_0x95() {
%1 = call i64 @isupper(i32 149)
%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 750, 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_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0x95\00"
define void @t_isupper_0x95() {
%1 = tail call i64 @isupper(i32 149)
%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 750, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ abs(float);
int /*<<< orphan*/ max(float, scalar_t__);
float min(float, int /*<<< orphan*/);
float fOpTongue(float a, float b, float ra, float rb) {
  return min(a, max(a - ra, abs(b) - rb));
}


x86 assembly (clang, -O0):
<fOpTongue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x4(%rbp),%xmm0
subss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x8(%rbp),%xmm0
call   1030 <abs@plt>
movss  -0x18(%rbp),%xmm0
cvtsi2ss %rax,%xmm1
subss  -0x10(%rbp),%xmm1
cvttss2si %xmm1,%rdi
call   1050 <max@plt>
movss  -0x14(%rbp),%xmm0
mov    %eax,%edi
call   1040 <min@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fOpTongue>:
sub    $0x18,%rsp
movss  %xmm3,0x10(%rsp)
movss  %xmm0,0x14(%rsp)
subss  %xmm2,%xmm0
movss  %xmm0,0xc(%rsp)
movaps %xmm1,%xmm0
call   1030 <abs@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
subss  0x10(%rsp),%xmm0
cvttss2si %xmm0,%rdi
movss  0xc(%rsp),%xmm0
call   1050 <max@plt>
movss  0x14(%rsp),%xmm0
mov    %eax,%edi
add    $0x18,%rsp
jmp    1040 <min@plt>

LLVM IR (-O0):
define float @fOpTongue(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %5
%10 = load float, float* %5
%11 = load float, float* %7
%12 = fsub float %10, %11
%13 = load float, float* %6
%14 = call i64 @abs(float %13)
%15 = sitofp i64 %14 to float
%16 = load float, float* %8
%17 = fsub float %15, %16
%18 = fptosi float %17 to i64
%19 = call i32 @max(float %12, i64 %18)
%20 = call float @min(float %9, i32 %19)
ret float %20
}

LLVM IR (-O2):
define float @fOpTongue(float %0, float %1, float %2, float %3) {
%5 = fsub float %0, %2
%6 = tail call i64 @abs(float %1)
%7 = sitofp i64 %6 to float
%8 = fsub float %7, %3
%9 = fptosi float %8 to i64
%10 = tail call i32 @max(float %5, i64 %9)
%11 = tail call float @min(float %0, i32 %10)
ret float %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ pthread_exit(int /*<<< orphan*/ *);
void *print_hello_world(void *tid) {
  printf("Hello, world. Greeting from thread %d.\n", (int)tid);
  pthread_exit(NULL);
}


x86 assembly (clang, -O0):
<print_hello_world>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,%esi
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1040 <pthread_exit@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_hello_world>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <pthread_exit@plt>

LLVM IR (-O0):
@.str = [40 x i8] c"Hello, world. Greeting from thread %d.\0A\00"
define i8* @print_hello_world(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = ptrtoint i8* %4 to i32
%6 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = call i32 @pthread_exit(i32* null)
%8 = load i8*, i8** %2
ret i8* %8
}

LLVM IR (-O2):
@.str = [40 x i8] c"Hello, world. Greeting from thread %d.\0A\00"
define noalias i8* @print_hello_world(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
%4 = tail call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @pthread_exit(i32* null)
ret i8* undef
}
unsigned hash(unsigned char *s) {
  unsigned hashval;
  for (hashval = 0; *s != '\0'; s++)
    hashval = *s + 31 * hashval;
  return hashval % 200;
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
cmp    $0x0,%eax
je     1140 <hash+0x40>
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
imul   $0x1f,-0xc(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <hash+0xf>
mov    -0xc(%rbp),%eax
mov    $0xc8,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     113f <hash+0x3f>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movzbl %cl,%ecx
mov    %eax,%edx
shl    $0x5,%edx
sub    %eax,%edx
mov    %edx,%eax
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash+0x10>
mov    %eax,%ecx
imul   $0x51eb851f,%rcx,%rcx
shr    $0x26,%rcx
imul   $0xc8,%ecx,%ecx
sub    %ecx,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @hash(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %16, %1
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %19
9: ; preds = %4
%10 = load i8*, i8** %2
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = load i32, i32* %3
%14 = mul i32 31, %13
%15 = add i32 %12, %14
store i32 %15, i32* %3
br label %16
16: ; preds = %9
%17 = load i8*, i8** %2
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %2
br label %4
19: ; preds = %4
%20 = load i32, i32* %3
%21 = urem i32 %20, 200
ret i32 %21
}

LLVM IR (-O2):
define i32 @hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %10, %4 ], [ 0, %1 ]
%7 = phi i8* [ %11, %4 ], [ %0, %1 ]
%8 = zext i8 %5 to i32
%9 = mul i32 %6, 31
%10 = add i32 %9, %8
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4
%15 = urem i32 %10, 200
br label %16
16: ; preds = %14, %1
%17 = phi i32 [ 0, %1 ], [ %15, %14 ]
ret i32 %17
}
int foo(void) {
  int a[16] = {};
  return a[3];
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1030 <memset@plt>
mov    -0x34(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @foo() {
%1 = alloca [16 x i32]
%2 = bitcast [16 x i32]* %1 to i8*
%3 = getelementptr inbounds [16 x i32], [16 x i32]* %1, i64 0, i64 3
%4 = load i32, i32* %3
ret i32 %4
}

LLVM IR (-O2):
define i32 @foo() {
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint16_t r16le(const uint8_t *buf) {
  return (((uint16_t)buf[1]) << 8) | ((uint16_t)buf[0]);
}


x86 assembly (clang, -O0):
<r16le>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
mov    (%rcx),%rcx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<r16le>:
mov    0x8(%rdi),%eax
shl    $0x8,%eax
or     (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @r16le(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = getelementptr inbounds i64, i64* %3, i64 1
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = shl i32 %6, 8
%8 = load i64*, i64** %2
%9 = getelementptr inbounds i64, i64* %8, i64 0
%10 = load i64, i64* %9
%11 = trunc i64 %10 to i32
%12 = or i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @r16le(i64* nocapture %0) {
%2 = getelementptr inbounds i64, i64* %0, i64 1
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
%5 = shl i32 %4, 8
%6 = load i64, i64* %0
%7 = trunc i64 %6 to i32
%8 = or i32 %5, %7
ret i32 %8
}
int test_imm_C6int32_reg(int val) { return ((val) & (0xC6 << 0)) ? -20 : -40; }


x86 assembly (clang, -O0):
<test_imm_C6int32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0xc6,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_C6int32_reg>:
test   $0xc6,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_C6int32_reg(i32 %0) {
%2 = and i32 %0, 198
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int tileWest(int tileIndex) {
  int canCheckW =
      tileIndex != 0 && tileIndex != 4 && tileIndex != 8 && tileIndex != 12;
  return canCheckW ? tileIndex - 1 : -1;
}


x86 assembly (clang, -O0):
<tileWest>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x9(%rbp)
je     113e <tileWest+0x3e>
xor    %eax,%eax
cmpl   $0x4,-0x4(%rbp)
mov    %al,-0x9(%rbp)
je     113e <tileWest+0x3e>
xor    %eax,%eax
cmpl   $0x8,-0x4(%rbp)
mov    %al,-0x9(%rbp)
je     113e <tileWest+0x3e>
cmpl   $0xc,-0x4(%rbp)
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1161 <tileWest+0x61>
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    116e <tileWest+0x6e>
mov    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    116e <tileWest+0x6e>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tileWest>:
lea    -0x1(%rdi),%ecx
mov    %edi,%eax
rol    $0x1e,%eax
cmp    $0x4,%eax
mov    $0xffffffff,%eax
cmovae %ecx,%eax
ret

LLVM IR (-O0):
define i32 @tileWest(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %15
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp ne i32 %7, 4
br i1 %8, label %9, label %15
9: ; preds = %6
%10 = load i32, i32* %2
%11 = icmp ne i32 %10, 8
br i1 %11, label %12, label %15
12: ; preds = %9
%13 = load i32, i32* %2
%14 = icmp ne i32 %13, 12
br label %15
15: ; preds = %12, %9, %6, %1
%16 = phi i1 [ false, %9 ], [ false, %6 ], [ false, %1 ], [ %14, %12 ]
%17 = zext i1 %16 to i32
store i32 %17, i32* %3
%18 = load i32, i32* %3
%19 = icmp ne i32 %18, 0
br i1 %19, label %20, label %23
20: ; preds = %15
%21 = load i32, i32* %2
%22 = sub nsw i32 %21, 1
br label %24
23: ; preds = %15
br label %24
24: ; preds = %23, %20
%25 = phi i32 [ %22, %20 ], [ -1, %23 ]
ret i32 %25
}

LLVM IR (-O2):
define i32 @tileWest(i32 %0) {
%2 = tail call i32 @llvm.fshl.i32(i32 %0, i32 %0, i32 30)
%3 = icmp ugt i32 %2, 3
%4 = add nsw i32 %0, -1
%5 = select i1 %3, i32 %4, i32 -1
ret i32 %5
}
void foo492() {}


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

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

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

LLVM IR (-O2):
define void @foo492() {
ret void
}
/* Variables and functions */
scalar_t__ ascii_numeric_cmp(char const *, char const *);
int num_gt(const char *pat, const char *text) {
  return (ascii_numeric_cmp(text, pat) > 0);
}


x86 assembly (clang, -O0):
<num_gt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <ascii_numeric_cmp@plt>
cmp    $0x0,%rax
setg   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<num_gt>:
push   %rax
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
call   1030 <ascii_numeric_cmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
setg   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @num_gt(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i8*, i8** %3
%7 = call i64 @ascii_numeric_cmp(i8* %5, i8* %6)
%8 = icmp sgt i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @num_gt(i8* %0, i8* %1) {
%3 = tail call i64 @ascii_numeric_cmp(i8* %1, i8* %0)
%4 = icmp sgt i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
struct cc_context {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __rk_allreduce_alg_v_no_loopback(struct cc_context *,
                                                    double *);
int __rk_allreduce_alg_no_loopback(void *context) {
  double v = 1.1;
  struct cc_context *ctx = context;
  __rk_allreduce_alg_v_no_loopback(ctx, &v);
  return 0;
}


x86 assembly (clang, -O0):
<__rk_allreduce_alg_no_loopback>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movsd  0xedc(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <__rk_allreduce_alg_v_no_loopback@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__rk_allreduce_alg_no_loopback>:
push   %rax
movabs $0x3ff199999999999a,%rax
99 f1 3f
mov    %rax,(%rsp)
mov    %rsp,%rsi
call   1030 <__rk_allreduce_alg_v_no_loopback@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.cc_context = type { i32 }
define i32 @__rk_allreduce_alg_no_loopback(i8* %0) {
%2 = alloca i8*
%3 = alloca double
%4 = alloca %struct.cc_context*
store i8* %0, i8** %2
store double 1.100000e+00, double* %3
%5 = load i8*, i8** %2
%6 = bitcast i8* %5 to %struct.cc_context*
store %struct.cc_context* %6, %struct.cc_context** %4
%7 = load %struct.cc_context*, %struct.cc_context** %4
%8 = call i32 @__rk_allreduce_alg_v_no_loopback(%struct.cc_context* %7, double* %3)
ret i32 0
}

LLVM IR (-O2):
%struct.cc_context = type { i32 }
define i32 @__rk_allreduce_alg_no_loopback(i8* %0) {
%2 = alloca double
%3 = bitcast double* %2 to i8*
store double 1.100000e+00, double* %2
%4 = bitcast i8* %0 to %struct.cc_context*
%5 = call i32 @__rk_allreduce_alg_v_no_loopback(%struct.cc_context* %4, double* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
void __attribute__((visibility("default"))) tsdrplugin_getName(char *name) {
  strcpy(name, "TSDR Raw File Source Plugin");
}


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

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

LLVM IR (-O0):
@.str = [28 x i8] c"TSDR Raw File Source Plugin\00"
define void @tsdrplugin_getName(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @strcpy(i8* %3, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"TSDR Raw File Source Plugin\00"
define void @tsdrplugin_getName(i8* %0) {
%2 = tail call i32 @strcpy(i8* %0, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret void
}
float UI_GetValue(int ownerDraw, int type) { return 0; }


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

x86 assembly (clang, -O2):
<UI_GetValue>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @UI_GetValue(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
ret float 0.000000e+00
}

LLVM IR (-O2):
define float @UI_GetValue(i32 %0, i32 %1) {
ret float 0.000000e+00
}
/* Variables and functions */
void *malloc(unsigned int);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, unsigned int);
void *c_mallocz(unsigned int size) {
  void *ptr = malloc(size);
  if (ptr) {
    memset(ptr, 0, size);
  }
  return ptr;
}


x86 assembly (clang, -O0):
<c_mallocz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1150 <c_mallocz+0x30>
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_mallocz>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     113e <c_mallocz+0x1e>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %ebp,%edx
call   1030 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i8* @c_mallocz(i32 %0) {
%2 = tail call i8* @malloc(i32 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @memset(i8* %2, i32 0, i32 %0)
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ HplAtm128GeneralIOPinP__20__IO__makeOutput();
void LedsP__Led2__makeOutput(void) {
  HplAtm128GeneralIOPinP__20__IO__makeOutput();
}


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

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

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

LLVM IR (-O2):
define void @LedsP__Led2__makeOutput() {
%1 = tail call i32 (...) @HplAtm128GeneralIOPinP__20__IO__makeOutput()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void decimalToReversedBinary(int number) {
  int remainder;
  char remainderChar;
  while (number >= 1) {
    remainder = number % 2;
    number = number / 2;
    remainderChar = remainder + '0';
    putchar(remainderChar);
  }
}


x86 assembly (clang, -O0):
<decimalToReversedBinary>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
jl     1158 <decimalToReversedBinary+0x48>
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x30,%eax
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%edi
call   1030 <putchar@plt>
jmp    111b <decimalToReversedBinary+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decimalToReversedBinary>:
push   %rbp
push   %rbx
push   %rax
test   %edi,%edi
jle    1137 <decimalToReversedBinary+0x27>
mov    %edi,%ebx
mov    %edi,%ebp
nopl   0x0(%rax,%rax,1)
shr    %ebp
mov    %ebx,%eax
and    $0x1,%al
or     $0x30,%al
movzbl %al,%edi
call   1030 <putchar@plt>
cmp    $0x1,%ebx
mov    %ebp,%ebx
ja     1120 <decimalToReversedBinary+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @decimalToReversedBinary(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8
store i32 %0, i32* %2
br label %5
5: ; preds = %8, %1
%6 = load i32, i32* %2
%7 = icmp sge i32 %6, 1
br i1 %7, label %8, label %18
8: ; preds = %5
%9 = load i32, i32* %2
%10 = srem i32 %9, 2
store i32 %10, i32* %3
%11 = load i32, i32* %2
%12 = sdiv i32 %11, 2
store i32 %12, i32* %2
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 48
%15 = trunc i32 %14 to i8
store i8 %15, i8* %4
%16 = load i8, i8* %4
%17 = call i32 @putchar(i8 signext %16)
br label %5
18: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @decimalToReversedBinary(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %11
3: ; preds = %1, %3
%4 = phi i32 [ %5, %3 ], [ %0, %1 ]
%5 = lshr i32 %4, 1
%6 = trunc i32 %4 to i8
%7 = and i8 %6, 1
%8 = or i8 %7, 48
%9 = tail call i32 @putchar(i8 signext %8)
%10 = icmp ult i32 %4, 2
br i1 %10, label %11, label %3
11: ; preds = %3, %1
ret void
}
/* Variables and functions */
int i2c_smbus_read_byte_data(int, int);
int raspberrypiI2CReadReg8(int fd, int reg) {
  return i2c_smbus_read_byte_data(fd, reg);
}


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

x86 assembly (clang, -O2):
<raspberrypiI2CReadReg8>:
jmp    1030 <i2c_smbus_read_byte_data@plt>

LLVM IR (-O0):
define i32 @raspberrypiI2CReadReg8(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 @i2c_smbus_read_byte_data(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @raspberrypiI2CReadReg8(i32 %0, i32 %1) {
%3 = tail call i32 @i2c_smbus_read_byte_data(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ register_indm_function_list();
void indm_init() { register_indm_function_list(); }


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

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

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

LLVM IR (-O2):
define void @indm_init() {
%1 = tail call i32 (...) @register_indm_function_list()
ret void
}
int get_bits(void) {
  return sizeof(long) == 8 && sizeof(void *) == 8 ? 64 : 32;
}


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

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

LLVM IR (-O0):
define i32 @get_bits() {
ret i32 64
}

LLVM IR (-O2):
define i32 @get_bits() {
ret i32 64
}
void gtk_text_iter_forward_word_ends() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_iter_forward_word_ends() {
ret void
}
int main() {
  return 0 + (3 * (3)) + 1;
  ;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 10
}
int test_imm_66uint64_lowword_mem(unsigned long long *val) {
  return ((*val) & (0x66 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_66uint64_lowword_mem>:
testb  $0x66,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_66uint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 102
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int a3(int a, int b, int c) { return a == 4 && b == 5 && c == 6; }


x86 assembly (clang, -O0):
<a3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x4,-0x4(%rbp)
mov    %al,-0xd(%rbp)
jne    1135 <a3+0x35>
xor    %eax,%eax
cmpl   $0x5,-0x8(%rbp)
mov    %al,-0xd(%rbp)
jne    1135 <a3+0x35>
cmpl   $0x6,-0xc(%rbp)
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<a3>:
xor    $0x4,%edi
xor    $0x5,%esi
or     %edi,%esi
xor    $0x6,%edx
xor    %eax,%eax
or     %esi,%edx
sete   %al
ret

LLVM IR (-O0):
define i32 @a3(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 4
br i1 %8, label %9, label %15
9: ; preds = %3
%10 = load i32, i32* %5
%11 = icmp eq i32 %10, 5
br i1 %11, label %12, label %15
12: ; preds = %9
%13 = load i32, i32* %6
%14 = icmp eq i32 %13, 6
br label %15
15: ; preds = %12, %9, %3
%16 = phi i1 [ false, %9 ], [ false, %3 ], [ %14, %12 ]
%17 = zext i1 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
define i32 @a3(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %0, 4
%5 = icmp eq i32 %1, 5
%6 = and i1 %4, %5
%7 = icmp eq i32 %2, 6
%8 = and i1 %6, %7
%9 = zext i1 %8 to i32
ret i32 %9
}
void __cdbgui_shutdown(void) {}


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

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

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

LLVM IR (-O2):
define void @__cdbgui_shutdown() {
ret void
}
/* Variables and functions */
char *getenv(char *);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  char *env = getenv("PATH");
  if (env == NULL) {
    printf("cant get \"PATH\" var...\n");
  } else {
    printf("PATH = %s\n", env);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115d <main+0x3d>
lea    0xeb4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    116f <main+0x4f>
mov    -0x10(%rbp),%rsi
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
je     1155 <main+0x25>
lea    0xebc(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    1161 <main+0x31>
lea    0xeb4(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"PATH\00"
@.str.1 = [24 x i8] c"cant get \22PATH\22 var...\0A\00"
@.str.2 = [11 x i8] c"PATH = %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = call i8* @getenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
br label %11
8: ; preds = %0
%9 = load i8*, i8** %2
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %9)
br label %11
11: ; preds = %8, %6
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"PATH\00"
@.str.2 = [11 x i8] c"PATH = %s\0A\00"
@str = [23 x i8] c"cant get \22PATH\22 var...\00"
define i32 @main() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i8* %1, null
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
br label %7
5: ; preds = %0
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %1)
br label %7
7: ; preds = %5, %3
ret i32 0
}
/* Variables and functions */
double erfc1__(int, double);
double erfcx(double x) { return erfc1__(2, x); }


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

x86 assembly (clang, -O2):
<erfcx>:
mov    $0x2,%edi
jmp    1030 <erfc1__@plt>

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

LLVM IR (-O2):
define double @erfcx(double %0) {
%2 = tail call double @erfc1__(i32 2, double %0)
ret double %2
}
/* Variables and functions */
scalar_t__ _atomax(char const *);
int atoi(const char *s) { return (int)_atomax(s); }


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

x86 assembly (clang, -O2):
<atoi>:
jmp    1030 <_atomax@plt>

LLVM IR (-O0):
define i32 @atoi(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @_atomax(i8* %3)
%5 = trunc i64 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @atoi(i8* %0) {
%2 = tail call i64 @_atomax(i8* %0)
%3 = trunc i64 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fread(unsigned char *, int, int, int /*<<< orphan*/ *);
unsigned char getByte(FILE *fp) {
  unsigned char in = 0x00;
  if (fp)
    (void)fread(&in, 1, 1, fp);
  return (in);
}


x86 assembly (clang, -O0):
<getByte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movb   $0x0,-0x9(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     113f <getByte+0x2f>
mov    -0x8(%rbp),%rcx
lea    -0x9(%rbp),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <fread@plt>
movzbl -0x9(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getByte>:
push   %rax
movb   $0x0,0x7(%rsp)
test   %rdi,%rdi
je     1138 <getByte+0x28>
mov    %rdi,%rcx
lea    0x7(%rsp),%rdi
mov    $0x1,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
mov    0x7(%rsp),%al
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define zeroext i8 @getByte(i32* %0) {
%2 = alloca i8
store i8 0, i8* %2
%3 = icmp eq i32* %0, null
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = call i32 @fread(i8* %2, i32 1, i32 1, i32* %0)
%6 = load i8, i8* %2
br label %7
7: ; preds = %4, %1
%8 = phi i8 [ %6, %4 ], [ 0, %1 ]
ret i8 %8
}
/* Variables and functions */
int init_network_asm();
int kolibri_http_init(void) {
  int asm_init_status = init_network_asm();
  if (asm_init_status == 0)
    return 0;
  else
    return 1;
}


x86 assembly (clang, -O0):
<kolibri_http_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <init_network_asm@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1138 <kolibri_http_init+0x28>
movl   $0x0,-0x4(%rbp)
jmp    113f <kolibri_http_init+0x2f>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kolibri_http_init>:
push   %rax
xor    %eax,%eax
call   1030 <init_network_asm@plt>
xor    %ecx,%ecx
test   %eax,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @kolibri_http_init() {
%1 = tail call i32 (...) @init_network_asm()
%2 = icmp ne i32 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ glClearAccum(float, float, float, float);
void ClearAccum(float r, float g, float b, float a) {
  glClearAccum(r, g, b, a);
}


x86 assembly (clang, -O0):
<ClearAccum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
movss  -0x10(%rbp),%xmm3
call   1030 <glClearAccum@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ClearAccum>:
jmp    1030 <glClearAccum@plt>

LLVM IR (-O0):
define void @ClearAccum(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %5
%10 = load float, float* %6
%11 = load float, float* %7
%12 = load float, float* %8
%13 = call i32 @glClearAccum(float %9, float %10, float %11, float %12)
ret void
}

LLVM IR (-O2):
define void @ClearAccum(float %0, float %1, float %2, float %3) {
%5 = tail call i32 @glClearAccum(float %0, float %1, float %2, float %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, char const *, int);
int bus_extract_integer(const char *p_str) {
  int n_res = 0;
  memcpy((void *)&n_res, p_str, sizeof(int));
  return n_res;
}


x86 assembly (clang, -O0):
<bus_extract_integer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
lea    -0xc(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bus_extract_integer>:
push   %rax
mov    %rdi,%rsi
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @bus_extract_integer(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
%4 = bitcast i32* %3 to i8*
%5 = load i8*, i8** %2
%6 = call i32 @memcpy(i8* %4, i8* %5, i32 4)
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @bus_extract_integer(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = call i32 @memcpy(i8* %3, i8* %0, i32 4)
%5 = load i32, i32* %2
ret i32 %5
}
extern double _dtram_get_log_prior() { return -23.025850929940457; }


x86 assembly (clang, -O0):
<_dtram_get_log_prior>:
push   %rbp
mov    %rsp,%rbp
movsd  0xef4(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<_dtram_get_log_prior>:
movsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @_dtram_get_log_prior() {
ret double 0xC037069E2AA2AA5B
}

LLVM IR (-O2):
define double @_dtram_get_log_prior() {
ret double 0xC037069E2AA2AA5B
}
/* Variables and functions */
double sin(double);
double sinc(double x) { return (0. == x) ? 1. : (sin(x) / x); }


x86 assembly (clang, -O0):
<sinc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jne    1143 <sinc+0x33>
jp     1143 <sinc+0x33>
movsd  0xec7(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1157 <sinc+0x47>
movsd  -0x8(%rbp),%xmm0
call   1030 <sin@plt>
divsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sinc>:
push   %rax
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1127 <sinc+0x17>
jp     1127 <sinc+0x17>
movsd  0xedb(%rip),%xmm0
pop    %rax
ret
movsd  %xmm0,(%rsp)
call   1030 <sin@plt>
divsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @sinc(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp oeq double 0.000000e+00, %3
br i1 %4, label %5, label %6
5: ; preds = %1
br label %11
6: ; preds = %1
%7 = load double, double* %2
%8 = call double @sin(double %7)
%9 = load double, double* %2
%10 = fdiv double %8, %9
br label %11
11: ; preds = %6, %5
%12 = phi double [ 1.000000e+00, %5 ], [ %10, %6 ]
ret double %12
}

LLVM IR (-O2):
define double @sinc(double %0) {
%2 = fcmp oeq double %0, 0.000000e+00
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call double @sin(double %0)
%5 = fdiv double %4, %0
br label %6
6: ; preds = %1, %3
%7 = phi double [ %5, %3 ], [ 1.000000e+00, %1 ]
ret double %7
}
void av_hwdevice_find_type_by_name() {}


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

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

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

LLVM IR (-O2):
define void @av_hwdevice_find_type_by_name() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_cas();
int /*<<< orphan*/ test_fetch();
int /*<<< orphan*/ test_synchronize();
int /*<<< orphan*/ test_tas();
int main(void) {
  test_fetch();
  test_cas();
  test_synchronize();
  test_tas();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <test_fetch@plt>
xor    %eax,%eax
call   1060 <test_cas@plt>
xor    %eax,%eax
call   1050 <test_synchronize@plt>
xor    %eax,%eax
call   1040 <test_tas@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_fetch()
%3 = call i32 (...) @test_cas()
%4 = call i32 (...) @test_synchronize()
%5 = call i32 (...) @test_tas()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_fetch()
%2 = tail call i32 (...) @test_cas()
%3 = tail call i32 (...) @test_synchronize()
%4 = tail call i32 (...) @test_tas()
ret i32 0
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
scalar_t__ S_ISDIR(int /*<<< orphan*/);
scalar_t__ stat(char const *, struct stat *);
int is_dir(const char *filename) {
  struct stat buf;
  if (stat(filename, &buf) < 0) {
    return -1;
  }
  if (S_ISDIR(buf.st_mode)) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<is_dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <stat@plt>
cmp    $0x0,%rax
jge    114f <is_dir+0x2f>
movl   $0xffffffff,-0x4(%rbp)
jmp    1174 <is_dir+0x54>
mov    -0x18(%rbp),%edi
call   1030 <S_ISDIR@plt>
cmp    $0x0,%rax
je     116d <is_dir+0x4d>
movl   $0x1,-0x4(%rbp)
jmp    1174 <is_dir+0x54>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_dir>:
push   %rax
mov    %rsp,%rsi
call   1040 <stat@plt>
test   %rax,%rax
js     1143 <is_dir+0x23>
mov    (%rsp),%edi
call   1030 <S_ISDIR@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret
mov    $0xffffffff,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @is_dir(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp slt i64 %4, 0
br i1 %5, label %12, label %6
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = call i64 @S_ISDIR(i32 %8)
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %6, %1
%13 = phi i32 [ -1, %1 ], [ %11, %6 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ print(char *);
int main() { print("NOTHING"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"NOTHING\00"
define i32 @main() {
%1 = call i32 @print(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"NOTHING\00"
define i32 @main() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
scalar_t__ waitforkey(long *);
void clear_input_buffer(void) {
  long zerotime = 0L;
  while (waitforkey(&zerotime))
    ;
}


x86 assembly (clang, -O0):
<clear_input_buffer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
call   1030 <waitforkey@plt>
cmp    $0x0,%rax
je     1138 <clear_input_buffer+0x28>
jmp    1120 <clear_input_buffer+0x10>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_input_buffer>:
push   %rbx
sub    $0x10,%rsp
movq   $0x0,0x8(%rsp)
lea    0x8(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rbx,%rdi
call   1030 <waitforkey@plt>
test   %rax,%rax
jne    1130 <clear_input_buffer+0x20>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @clear_input_buffer() {
%1 = alloca i64
store i64 0, i64* %1
br label %2
2: ; preds = %5, %0
%3 = call i64 @waitforkey(i64* %1)
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %2
br label %2
6: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @clear_input_buffer() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
store i64 0, i64* %1
br label %3
3: ; preds = %3, %0
%4 = call i64 @waitforkey(i64* %1)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %3
6: ; preds = %3
ret void
}
struct Value *handle_suspend_command(args)
char *args;
{
  return newint_fl(suspend(),
                   "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                   "outputs/2022-01-22/02-19-57/repos/gary9872/tf40s1/refs/"
                   "heads/master/src/command.c",
                   337);
}


x86 assembly (clang, -O0):
<handle_suspend_command>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <suspend@plt>
mov    %eax,%edi
lea    0xec4(%rip),%rsi
mov    $0x151,%edx
mov    $0x0,%al
call   1040 <newint_fl@plt>
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_suspend_command>:
push   %rax
xor    %eax,%eax
call   1030 <suspend@plt>
lea    0xed1(%rip),%rsi
mov    %eax,%edi
mov    $0x151,%edx
xor    %eax,%eax
call   1040 <newint_fl@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
%struct.Value = type opaque
@.str = [138 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/gary9872/tf40s1/refs/heads/master/src/command.c\00"
define %struct.Value* @handle_suspend_command(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @suspend()
%4 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @newint_fl to i32 (i32, i8*, i32, ...)*)(i32 %3, i8* getelementptr inbounds ([138 x i8], [138 x i8]* @.str, i64 0, i64 0), i32 337)
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to %struct.Value*
ret %struct.Value* %6
}

LLVM IR (-O2):
%struct.Value = type opaque
@.str = [138 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/gary9872/tf40s1/refs/heads/master/src/command.c\00"
define %struct.Value* @handle_suspend_command(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @suspend()
%3 = tail call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @newint_fl to i32 (i32, i8*, i32, ...)*)(i32 %2, i8* getelementptr inbounds ([138 x i8], [138 x i8]* @.str, i64 0, i64 0), i32 337)
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to %struct.Value*
ret %struct.Value* %5
}