xunge/DecIR huggingface dataset:
int test_imm_1Eint16_mem(short *val) {
  return ((*val) & (-0x1E << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_1Eint16_mem>:
movzwl (%rdi),%eax
test   $0xffe2,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_1Eint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -30
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int squares_up_to(int x) {
  int i, count;
  for (i = 1, count = 0; i * i <= x; i++, count++) {
  }
  return count;
}


x86 assembly (clang, -O0):
<squares_up_to>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1141 <squares_up_to+0x41>
jmp    112a <squares_up_to+0x2a>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1115 <squares_up_to+0x15>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<squares_up_to>:
xor    %eax,%eax
test   %edi,%edi
jle    111d <squares_up_to+0x1d>
cs nopw 0x0(%rax,%rax,1)
lea    0x2(%rax),%ecx
add    $0x1,%eax
imul   %ecx,%ecx
cmp    %edi,%ecx
jle    1110 <squares_up_to+0x10>
ret

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

LLVM IR (-O2):
define i32 @squares_up_to(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %6, %3 ], [ 1, %1 ]
%6 = add nuw nsw i32 %5, 1
%7 = add nuw nsw i32 %4, 1
%8 = mul nsw i32 %6, %6
%9 = icmp sgt i32 %8, %0
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %11
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int copy_target_system_to_container(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(1, a, b, c, 0);
  return fail;
}


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

x86 assembly (clang, -O2):
<copy_target_system_to_container>:
mov    $0x1,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

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

LLVM IR (-O2):
define i32 @copy_target_system_to_container() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 1, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Variables and functions */
int cos(float);
int main(int argc, char **argv) {
  float a = 3.0;
  return cos(a);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  0xed2(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
call   1030 <cos@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
movss  0xee8(%rip),%xmm0
jmp    1030 <cos@plt>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store float 3.000000e+00, float* %6
%7 = load float, float* %6
%8 = call i32 @cos(float %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @cos(float 3.000000e+00)
ret i32 %3
}
/* Type definitions */
struct processor_explicatory_state {
  int dummy;
};

/* Variables and functions */
void processor_explicatory_extend_buffer(
    struct processor_explicatory_state *process_state, size_t desired_size) {}


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

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

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

LLVM IR (-O2):
%struct.processor_explicatory_state = type { i32 }
define void @processor_explicatory_extend_buffer(%struct.processor_explicatory_state* nocapture %0, i64 %1) {
ret void
}
int *return_int_ptr() { return (int *)1234; }


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

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

LLVM IR (-O0):
define i32* @return_int_ptr() {
ret i32* inttoptr (i64 1234 to i32*)
}

LLVM IR (-O2):
define i32* @return_int_ptr() {
ret i32* inttoptr (i64 1234 to i32*)
}
/* Variables and functions */
int /*<<< orphan*/ free(int /*<<< orphan*/);
int /*<<< orphan*/ malloc(int);
int child(void *arg) {
  do {
  } while (0);
  free(malloc(456));
  do {
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<child>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
jmp    1131 <child+0x11>
mov    $0x1c8,%edi
call   1040 <malloc@plt>
mov    %eax,%edi
call   1030 <free@plt>
jmp    1147 <child+0x27>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<child>:
push   %rax
mov    $0x1c8,%edi
call   1040 <malloc@plt>
mov    %eax,%edi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @child(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %1
br label %4
4: ; preds = %3
%5 = call i32 @malloc(i32 456)
%6 = call i32 @free(i32 %5)
br label %7
7: ; preds = %4
br label %8
8: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
define i32 @child(i8* nocapture readnone %0) {
%2 = tail call i32 @malloc(i32 456)
%3 = tail call i32 @free(i32 %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ctest_assert_true(int, char *);
int test_ctest_assert_true() {
  int value = 1;
  ctest_assert_true(value, "TRUE value PASS the test of assert_true..");
  return 0;
}


x86 assembly (clang, -O0):
<test_ctest_assert_true>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    0xed7(%rip),%rsi
call   1030 <ctest_assert_true@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_ctest_assert_true>:
push   %rax
lea    0xee8(%rip),%rsi
mov    $0x1,%edi
call   1030 <ctest_assert_true@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [42 x i8] c"TRUE value PASS the test of assert_true..\00"
define i32 @test_ctest_assert_true() {
%1 = alloca i32
store i32 1, i32* %1
%2 = load i32, i32* %1
%3 = call i32 @ctest_assert_true(i32 %2, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [42 x i8] c"TRUE value PASS the test of assert_true..\00"
define i32 @test_ctest_assert_true() {
%1 = tail call i32 @ctest_assert_true(i32 1, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(unsigned char *, unsigned char *, int);
void stbhw__draw_pixel(unsigned char *output, int stride, int x, int y,
                       unsigned char c[3]) {
  memcpy(output + y * stride + x * 3, c, 3);
}


x86 assembly (clang, -O0):
<stbhw__draw_pixel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%eax
imul   -0xc(%rbp),%eax
cltq
add    %rax,%rdi
imul   $0x3,-0x10(%rbp),%eax
cltq
add    %rax,%rdi
mov    -0x20(%rbp),%rsi
mov    $0x3,%edx
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stbhw__draw_pixel>:
imul   %ecx,%esi
movslq %esi,%rax
add    %rax,%rdi
lea    (%rdx,%rdx,2),%eax
cltq
add    %rax,%rdi
mov    %r8,%rsi
mov    $0x3,%edx
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @stbhw__draw_pixel(i8* %0, i32 %1, i32 %2, i32 %3, i8* %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8*
store i8* %0, i8** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i8* %4, i8** %10
%11 = load i8*, i8** %6
%12 = load i32, i32* %9
%13 = load i32, i32* %7
%14 = mul nsw i32 %12, %13
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %11, i64 %15
%17 = load i32, i32* %8
%18 = mul nsw i32 %17, 3
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i8, i8* %16, i64 %19
%21 = load i8*, i8** %10
%22 = call i32 @memcpy(i8* %20, i8* %21, i32 3)
ret void
}

LLVM IR (-O2):
define void @stbhw__draw_pixel(i8* %0, i32 %1, i32 %2, i32 %3, i8* %4) {
%6 = mul nsw i32 %3, %1
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = mul nsw i32 %2, 3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %8, i64 %10
%12 = tail call i32 @memcpy(i8* %11, i8* %4, i32 3)
ret void
}
/* Type definitions */
typedef int int32_t;
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int16_t ct_clamp16(const int32_t x) {
  return (int16_t)((x < -0x7fff) ? -0x8000 : (x > 0x7fff ? 0x7fff : x));
}


x86 assembly (clang, -O0):
<ct_clamp16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0xffff8001,-0x4(%rbp)
jge    1121 <ct_clamp16+0x21>
mov    $0xffff8000,%eax
mov    %eax,-0x8(%rbp)
jmp    1147 <ct_clamp16+0x47>
cmpl   $0x7fff,-0x4(%rbp)
jle    113b <ct_clamp16+0x3b>
mov    $0x7fff,%eax
mov    %eax,-0xc(%rbp)
jmp    1141 <ct_clamp16+0x41>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ct_clamp16>:
cmp    $0x7fff,%edi
mov    $0x7fff,%ecx
cmovl  %edi,%ecx
cmp    $0xffff8001,%ecx
mov    $0xffff8000,%eax
cmovge %ecx,%eax
ret

LLVM IR (-O0):
define i32 @ct_clamp16(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, -32767
br i1 %4, label %5, label %6
5: ; preds = %1
br label %14
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp sgt i32 %7, 32767
br i1 %8, label %9, label %10
9: ; preds = %6
br label %12
10: ; preds = %6
%11 = load i32, i32* %2
br label %12
12: ; preds = %10, %9
%13 = phi i32 [ 32767, %9 ], [ %11, %10 ]
br label %14
14: ; preds = %12, %5
%15 = phi i32 [ -32768, %5 ], [ %13, %12 ]
ret i32 %15
}

LLVM IR (-O2):
define i32 @ct_clamp16(i32 %0) {
%2 = icmp slt i32 %0, 32767
%3 = select i1 %2, i32 %0, i32 32767
%4 = icmp sgt i32 %3, -32768
%5 = select i1 %4, i32 %3, i32 -32768
ret i32 %5
}
int main() {
  unsigned long long x;
  x = 0;
  x = x + 1;
  if (x != 1)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
cmpq   $0x1,-0x10(%rbp)
je     1136 <main+0x36>
movl   $0x1,-0x4(%rbp)
jmp    113d <main+0x3d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void argorder(int ix1, int ix2, int *ox1, int *ox2) {
  if (ix1 > ix2) {
    int tmp;
    tmp = ix1;
    ix1 = ix2;
    ix2 = tmp;
  }
  *ox1 = ix1;
  *ox2 = ix2;
}


x86 assembly (clang, -O0):
<argorder>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1130 <argorder+0x30>
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @argorder(i32 %0, i32 %1, i32* nocapture writeonly %2, i32* nocapture writeonly %3) {
%5 = icmp sgt i32 %0, %1
%6 = select i1 %5, i32 %0, i32 %1
%7 = select i1 %5, i32 %1, i32 %0
store i32 %7, i32* %2
store i32 %6, i32* %3
ret void
}
void RTStrSpaceGet(void) {}


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

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

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

LLVM IR (-O2):
define void @RTStrSpaceGet() {
ret void
}
/* Variables and functions */
char *findExt(char *);
int /*<<< orphan*/ strcat(char *, char const *);
int /*<<< orphan*/ strcpy(char *, char const *);
void create_name(char *out, const char *in, const char *newExt) {
  char *ext;
  strcpy(out, in);
  ext = findExt(out);
  if (ext != NULL)
    *ext = '\0';
  strcat(out, newExt);
}


x86 assembly (clang, -O0):
<create_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rdi
call   1050 <findExt@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1170 <create_name+0x40>
mov    -0x20(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <strcat@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_name>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
call   1030 <strcpy@plt>
mov    %rbx,%rdi
call   1050 <findExt@plt>
test   %rax,%rax
je     114f <create_name+0x1f>
movb   $0x0,(%rax)
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <strcat@plt>

LLVM IR (-O0):
define void @create_name(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = load i8*, i8** %4
%9 = load i8*, i8** %5
%10 = call i32 @strcpy(i8* %8, i8* %9)
%11 = load i8*, i8** %4
%12 = call i8* @findExt(i8* %11)
store i8* %12, i8** %7
%13 = load i8*, i8** %7
%14 = icmp ne i8* %13, null
br i1 %14, label %15, label %17
15: ; preds = %3
%16 = load i8*, i8** %7
store i8 0, i8* %16
br label %17
17: ; preds = %15, %3
%18 = load i8*, i8** %4
%19 = load i8*, i8** %6
%20 = call i32 @strcat(i8* %18, i8* %19)
ret void
}

LLVM IR (-O2):
define void @create_name(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @strcpy(i8* %0, i8* %1)
%5 = tail call i8* @findExt(i8* %0)
%6 = icmp eq i8* %5, null
br i1 %6, label %8, label %7
7: ; preds = %3
store i8 0, i8* %5
br label %8
8: ; preds = %7, %3
%9 = tail call i32 @strcat(i8* %0, i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ debug_warning(char *);
int /*<<< orphan*/ h_free(void *);
void component_health_free(void *handle) {
  if (!handle) {
    debug_warning("[component_health_free] handle cannot be NULL");
    return;
  }
  h_free(handle);
}


x86 assembly (clang, -O0):
<component_health_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1148 <component_health_free+0x28>
lea    0xec2(%rip),%rdi
call   1040 <debug_warning@plt>
jmp    1151 <component_health_free+0x31>
mov    -0x8(%rbp),%rdi
call   1030 <h_free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<component_health_free>:
test   %rdi,%rdi
je     112a <component_health_free+0xa>
jmp    1030 <h_free@plt>
lea    0xecf(%rip),%rdi
jmp    1040 <debug_warning@plt>

LLVM IR (-O0):
@.str = [46 x i8] c"[component_health_free] handle cannot be NULL\00"
define void @component_health_free(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = call i32 @debug_warning(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
br label %10
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = call i32 @h_free(i8* %8)
br label %10
10: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
@.str = [46 x i8] c"[component_health_free] handle cannot be NULL\00"
define void @component_health_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @debug_warning(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
br label %7
5: ; preds = %1
%6 = tail call i32 @h_free(i8* %0)
br label %7
7: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int put_char(int c) {
  printf("%c", c);
  return 0;
}


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

x86 assembly (clang, -O2):
<put_char>:
push   %rax
mov    %edi,%esi
lea    0xee6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define i32 @put_char(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 0
}
void _parser_setup() {}


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

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

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

LLVM IR (-O2):
define void @_parser_setup() {
ret void
}
void abcde3fghijklmnopqrstuvwxzy() {}


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

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

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

LLVM IR (-O2):
define void @abcde3fghijklmnopqrstuvwxzy() {
ret void
}
/* Variables and functions */
scalar_t__ strchr(char const *, char);
int GIB_Regex_Translate_Options(const char *opstr) {
  int options = 0;
  if (strchr(opstr, 'i'))
    options |= (1 << 1);
  if (strchr(opstr, 'n'))
    options |= ((1 << 1) << 1);
  return options;
}


x86 assembly (clang, -O0):
<GIB_Regex_Translate_Options>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x69,%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
je     1144 <GIB_Regex_Translate_Options+0x34>
mov    -0xc(%rbp),%eax
or     $0x2,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x6e,%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
je     1165 <GIB_Regex_Translate_Options+0x55>
mov    -0xc(%rbp),%eax
or     $0x4,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GIB_Regex_Translate_Options>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%r14
mov    $0x69,%esi
call   1030 <strchr@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
lea    (%rbx,%rbx,1),%ebp
mov    %r14,%rdi
mov    $0x6e,%esi
call   1030 <strchr@plt>
test   %rax,%rax
lea    0x4(%rbx,%rbx,1),%eax
cmove  %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @GIB_Regex_Translate_Options(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
%4 = load i8*, i8** %2
%5 = call i64 @strchr(i8* %4, i8 signext 105)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* %3
%9 = or i32 %8, 2
store i32 %9, i32* %3
br label %10
10: ; preds = %7, %1
%11 = load i8*, i8** %2
%12 = call i64 @strchr(i8* %11, i8 signext 110)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %10
%15 = load i32, i32* %3
%16 = or i32 %15, 4
store i32 %16, i32* %3
br label %17
17: ; preds = %14, %10
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @GIB_Regex_Translate_Options(i8* %0) {
%2 = tail call i64 @strchr(i8* %0, i8 signext 105)
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 0, i32 2
%5 = tail call i64 @strchr(i8* %0, i8 signext 110)
%6 = icmp eq i64 %5, 0
%7 = or i32 %4, 4
%8 = select i1 %6, i32 %4, i32 %7
ret i32 %8
}
/* 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 exists(const char *path) {
  struct stat st;
  return stat(path, &st) != 0 ? 0 : S_ISDIR(st.st_mode) == 0 ? 1 : 2;
}


x86 assembly (clang, -O0):
<exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <stat@plt>
cmp    $0x0,%rax
je     114d <exists+0x2d>
xor    %eax,%eax
mov    %eax,-0x14(%rbp)
jmp    116c <exists+0x4c>
mov    -0x10(%rbp),%edi
call   1030 <S_ISDIR@plt>
mov    %rax,%rdx
mov    $0x2,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmove  %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exists>:
push   %rax
mov    %rsp,%rsi
call   1040 <stat@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     1135 <exists+0x15>
pop    %rcx
ret
mov    (%rsp),%edi
call   1030 <S_ISDIR@plt>
cmp    $0x1,%rax
mov    $0x2,%eax
sbb    $0x0,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @exists(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %12
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 eq i64 %9, 0
%11 = select i1 %10, i32 1, i32 2
br label %12
12: ; preds = %1, %6
%13 = phi i32 [ %11, %6 ], [ 0, %1 ]
ret i32 %13
}
void swi_handle(void) {}


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

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

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

LLVM IR (-O2):
define void @swi_handle() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int sigma(int);
int main() {
  int num;
  printf("\nEntre com um numero interiro: ");
  scanf("%d", &num);
  printf("\n Sigma de %d = %d \n", num, sigma(num));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xecc(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <sigma@plt>
mov    -0xc(%rbp),%esi
mov    %eax,%edx
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed6(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%ebx
mov    %ebx,%edi
call   1030 <sigma@plt>
lea    0xebd(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [32 x i8] c"\0AEntre com um numero interiro: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [21 x i8] c"\0A Sigma de %d = %d \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = load i32, i32* %2
%7 = call i32 @sigma(i32 %6)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32 %5, i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [32 x i8] c"\0AEntre com um numero interiro: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [21 x i8] c"\0A Sigma de %d = %d \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @sigma(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32 %5, i32 %6)
ret i32 0
}
int rgb_min(unsigned char r, unsigned char g, unsigned char b) {
  int min = r;
  if (g < min)
    min = g;
  if (b < min)
    min = b;
  return min;
}


x86 assembly (clang, -O0):
<rgb_min>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %dil,%dl
mov    %dl,-0x1(%rbp)
mov    %cl,-0x2(%rbp)
mov    %al,-0x3(%rbp)
movzbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
movzbl -0x2(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1130 <rgb_min+0x30>
movzbl -0x2(%rbp),%eax
mov    %eax,-0x8(%rbp)
movzbl -0x3(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1144 <rgb_min+0x44>
movzbl -0x3(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rgb_min>:
mov    %edi,%eax
cmp    %al,%sil
cmovb  %esi,%eax
cmp    %dl,%al
cmova  %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @rgb_min(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2) {
%4 = icmp ult i8 %1, %0
%5 = select i1 %4, i8 %1, i8 %0
%6 = icmp ugt i8 %5, %2
%7 = select i1 %6, i8 %2, i8 %5
%8 = zext i8 %7 to i32
ret i32 %8
}
/* Variables and functions */
char *malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *str_duplicate(const char *str) {
  char *copy = malloc(strlen(str) + 1);
  strcpy(copy, str);
  return copy;
}


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

x86 assembly (clang, -O2):
<str_duplicate>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <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* @str_duplicate(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i8* @malloc(i64 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = load i8*, i8** %2
%10 = call i32 @strcpy(i8* %8, i8* %9)
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
define i8* @str_duplicate(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @malloc(i64 %3)
%5 = tail call i32 @strcpy(i8* %4, i8* %0)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("\n"
         "usage: wilqvnc [parameters] host[:display]\n"
         "\n"
         "parameters:\n"
         "  -fs|-fullscreen         - full screen mode\n"
         "  -p |-passwd     <fname> - password file for authentication\n"
         "  -v |-verbose            - print some debug info\n"
         "  -x |-hextile            - enable Hextile encoding\n"
         "  -Z |-zrle               - enable ZRLE encoding\n"
         "  -fp|-freqperiod         - print refresh frequency periodically\n"
         "  -h |-help               - print this help\n"
         "\n");
  exit(0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [425 x i8] c"\0Ausage: wilqvnc [parameters] host[:display]\0A\0Aparameters:\0A -fs|-fullscreen - full screen mode\0A -p |-passwd <fname> - password file for authentication\0A -v |-verbose - print some debug info\0A -x |-hextile - enable Hextile encoding\0A -Z |-zrle - enable ZRLE encoding\0A -fp|-freqperiod - print refresh frequency periodically\0A -h |-help - print this help\0A\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([425 x i8], [425 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [424 x i8] c"\0Ausage: wilqvnc [parameters] host[:display]\0A\0Aparameters:\0A -fs|-fullscreen - full screen mode\0A -p |-passwd <fname> - password file for authentication\0A -v |-verbose - print some debug info\0A -x |-hextile - enable Hextile encoding\0A -Z |-zrle - enable ZRLE encoding\0A -fp|-freqperiod - print refresh frequency periodically\0A -h |-help - print this help\0A\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([424 x i8], [424 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ _Factor();
int /*<<< orphan*/ advance();
scalar_t__ match(int);
void _Term_prime(void) {
  if (match(3)) {
    advance();
    _Factor();
    _Term_prime();
  }
}


x86 assembly (clang, -O0):
<_Term_prime>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
call   1050 <match@plt>
cmp    $0x0,%rax
je     116b <_Term_prime+0x2b>
mov    $0x0,%al
call   1040 <advance@plt>
mov    $0x0,%al
call   1060 <_Factor@plt>
call   1030 <_Term_prime@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_Term_prime>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x3,%edi
call   1040 <match@plt>
test   %rax,%rax
je     115f <_Term_prime+0x2f>
xor    %eax,%eax
call   1030 <advance@plt>
xor    %eax,%eax
call   1050 <_Factor@plt>
jmp    1140 <_Term_prime+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @_Term_prime() {
%1 = call i64 @match(i32 3)
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = call i32 (...) @advance()
%5 = call i32 (...) @_Factor()
br label %6
6: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
define void @_Term_prime() {
%1 = tail call i64 @match(i32 3)
%2 = icmp eq i64 %1, 0
br i1 %2, label %8, label %3
3: ; preds = %0, %3
%4 = tail call i32 (...) @advance()
%5 = tail call i32 (...) @_Factor()
%6 = tail call i64 @match(i32 3)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %3
8: ; preds = %3, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/ *);
int /*<<< orphan*/ getchar();
void waitnext() {
  fflush(NULL);
  getchar();
}


x86 assembly (clang, -O0):
<waitnext>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1040 <fflush@plt>
mov    $0x0,%al
call   1030 <getchar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<waitnext>:
push   %rax
xor    %edi,%edi
call   1040 <fflush@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <getchar@plt>

LLVM IR (-O0):
define void @waitnext() {
%1 = call i32 @fflush(i32* null)
%2 = call i32 (...) @getchar()
ret void
}

LLVM IR (-O2):
define void @waitnext() {
%1 = tail call i32 @fflush(i32* null)
%2 = tail call i32 (...) @getchar()
ret void
}
int __libc_current_sigrtmax() { return -1; }


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

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

LLVM IR (-O0):
define i32 @__libc_current_sigrtmax() {
ret i32 -1
}

LLVM IR (-O2):
define i32 @__libc_current_sigrtmax() {
ret i32 -1
}
char *hash_plugin_detailed(void) {
  return ("keyring - GNOME Keyring passphrase plugin\n"
          "------------------------------------------------\n"
          "Use this module to crack GNOME Keyring files\n"
          "Input should be a GNOME Keyring (specified with -f)\n"
          "\nAuthor: Dhiru Kholia <dhiru at openwall.com>\n");
}


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

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

LLVM IR (-O0):
@.str = [235 x i8] c"keyring - GNOME Keyring passphrase plugin\0A------------------------------------------------\0AUse this module to crack GNOME Keyring files\0AInput should be a GNOME Keyring (specified with -f)\0A\0AAuthor: Dhiru Kholia <dhiru at openwall.com>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([235 x i8], [235 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [235 x i8] c"keyring - GNOME Keyring passphrase plugin\0A------------------------------------------------\0AUse this module to crack GNOME Keyring files\0AInput should be a GNOME Keyring (specified with -f)\0A\0AAuthor: Dhiru Kholia <dhiru at openwall.com>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([235 x i8], [235 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ bcopy(char *, char *, int);
scalar_t__ ck_malloc(int);
int strlen(char *);
char *ck_savestr(char *str) {
  char *newstr = 0;
  if (str) {
    int len = strlen(str) + 1;
    newstr = (char *)ck_malloc(len);
    bcopy(str, newstr, len);
  }
  return newstr;
}


x86 assembly (clang, -O0):
<ck_savestr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     117a <ck_savestr+0x4a>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <ck_malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1050 <bcopy@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ck_savestr>:
push   %r15
push   %r14
push   %rbx
test   %rdi,%rdi
je     1161 <ck_savestr+0x31>
mov    %rdi,%rbx
call   1030 <strlen@plt>
lea    0x1(%rax),%r15d
mov    %r15d,%edi
call   1040 <ck_malloc@plt>
mov    %rax,%r14
mov    %rax,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
call   1050 <memmove@plt>
jmp    1164 <ck_savestr+0x34>
xor    %r14d,%r14d
mov    %r14,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @ck_savestr(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %2
store i8* null, i8** %3
%5 = load i8*, i8** %2
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %18
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = call i32 @strlen(i8* %8)
%10 = add nsw i32 %9, 1
store i32 %10, i32* %4
%11 = load i32, i32* %4
%12 = call i64 @ck_malloc(i32 %11)
%13 = inttoptr i64 %12 to i8*
store i8* %13, i8** %3
%14 = load i8*, i8** %2
%15 = load i8*, i8** %3
%16 = load i32, i32* %4
%17 = call i32 @bcopy(i8* %14, i8* %15, i32 %16)
br label %18
18: ; preds = %7, %1
%19 = load i8*, i8** %3
ret i8* %19
}

LLVM IR (-O2):
define i8* @ck_savestr(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i32 @strlen(i8* %0)
%5 = add nsw i32 %4, 1
%6 = tail call i64 @ck_malloc(i32 %5)
%7 = inttoptr i64 %6 to i8*
tail call void @llvm.memmove.p0i8.p0i8.i32(i8* align 1 %7, i8* align 1 %0, i32 %5, i1 false)
br label %8
8: ; preds = %3, %1
%9 = phi i8* [ %7, %3 ], [ null, %1 ]
ret i8* %9
}
int convert_bgr2rgb(int rgb) {
  int r, g, b, bgr;
  r = ((rgb >> 16) >> 3) & 0x1f;
  g = ((rgb >> 8) >> 3) & 0x1f;
  b = (rgb >> 3) & 0x1f;
  bgr = (b << 10) | (g << 5) | r;
  return bgr;
}


x86 assembly (clang, -O0):
<convert_bgr2rgb>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x10,%eax
sar    $0x3,%eax
and    $0x1f,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
sar    $0x3,%eax
and    $0x1f,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x3,%eax
and    $0x1f,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
shl    $0xa,%eax
mov    -0xc(%rbp),%ecx
shl    $0x5,%ecx
or     %ecx,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert_bgr2rgb>:
mov    %edi,%ecx
shr    $0x13,%ecx
and    $0x1f,%ecx
mov    %edi,%eax
shl    $0x7,%eax
and    $0x7c00,%eax
shr    $0x6,%edi
and    $0x3e0,%edi
or     %edi,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @convert_bgr2rgb(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %2
%7 = load i32, i32* %2
%8 = ashr i32 %7, 16
%9 = ashr i32 %8, 3
%10 = and i32 %9, 31
store i32 %10, i32* %3
%11 = load i32, i32* %2
%12 = ashr i32 %11, 8
%13 = ashr i32 %12, 3
%14 = and i32 %13, 31
store i32 %14, i32* %4
%15 = load i32, i32* %2
%16 = ashr i32 %15, 3
%17 = and i32 %16, 31
store i32 %17, i32* %5
%18 = load i32, i32* %5
%19 = shl i32 %18, 10
%20 = load i32, i32* %4
%21 = shl i32 %20, 5
%22 = or i32 %19, %21
%23 = load i32, i32* %3
%24 = or i32 %22, %23
store i32 %24, i32* %6
%25 = load i32, i32* %6
ret i32 %25
}

LLVM IR (-O2):
define i32 @convert_bgr2rgb(i32 %0) {
%2 = lshr i32 %0, 19
%3 = and i32 %2, 31
%4 = shl i32 %0, 7
%5 = and i32 %4, 31744
%6 = lshr i32 %0, 6
%7 = and i32 %6, 992
%8 = or i32 %5, %7
%9 = or i32 %8, %3
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ d;

/* Variables and functions */
int /*<<< orphan*/ oled_SendCommand(unsigned char *, int);
void SetDisplayStartLine(char x) {
  unsigned char d[] = {0x40 | (x & 0x3F)};
  oled_SendCommand(d, sizeof(d));
}


x86 assembly (clang, -O0):
<SetDisplayStartLine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
and    $0x3f,%eax
or     $0x40,%eax
mov    %al,-0x2(%rbp)
lea    -0x2(%rbp),%rdi
mov    $0x1,%esi
call   1030 <oled_SendCommand@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SetDisplayStartLine>:
push   %rax
and    $0x3f,%dil
or     $0x40,%dil
mov    %dil,0x7(%rsp)
lea    0x7(%rsp),%rdi
mov    $0x1,%esi
call   1030 <oled_SendCommand@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @SetDisplayStartLine(i8 signext %0) {
%2 = alloca i8
%3 = alloca [1 x i8]
store i8 %0, i8* %2
%4 = getelementptr inbounds [1 x i8], [1 x i8]* %3, i64 0, i64 0
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = and i32 %6, 63
%8 = or i32 64, %7
%9 = trunc i32 %8 to i8
store i8 %9, i8* %4
%10 = getelementptr inbounds [1 x i8], [1 x i8]* %3, i64 0, i64 0
%11 = call i32 @oled_SendCommand(i8* %10, i32 1)
ret void
}

LLVM IR (-O2):
define void @SetDisplayStartLine(i8 signext %0) {
%2 = alloca [1 x i8]
%3 = getelementptr inbounds [1 x i8], [1 x i8]* %2, i64 0, i64 0
%4 = and i8 %0, 63
%5 = or i8 %4, 64
store i8 %5, i8* %3
%6 = call i32 @oled_SendCommand(i8* %3, i32 1)
ret void
}
char *ft_whitespaces(char *ch) {
  while (*ch == ' ' || *ch == '\t')
    ch++;
  return (ch);
}


x86 assembly (clang, -O0):
<ft_whitespaces>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x9(%rbp)
je     112d <ft_whitespaces+0x2d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    113d <ft_whitespaces+0x3d>
jmp    114e <ft_whitespaces+0x4e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <ft_whitespaces+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_whitespaces>:
mov    %rdi,%rax
jmp    1114 <ft_whitespaces+0x14>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%rax
movzbl (%rax),%ecx
cmp    $0x20,%cl
je     1110 <ft_whitespaces+0x10>
cmp    $0x9,%cl
je     1110 <ft_whitespaces+0x10>
ret

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

LLVM IR (-O2):
define i8* @ft_whitespaces(i8* %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %7 [
i8 32, label %5
i8 9, label %5
]
5: ; preds = %2, %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ string(char *);
void oid_0003(void) { string("Hardware version"); }


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"Hardware version\00"
define void @oid_0003() {
%1 = call i32 @string(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"Hardware version\00"
define void @oid_0003() {
%1 = tail call i32 @string(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
void do_tests(FILE *chardev) {}


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

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

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

LLVM IR (-O2):
define void @do_tests(i32* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Extrae_user_function(int);
int /*<<< orphan*/ fA();
int /*<<< orphan*/ fB();
int main(int argc, char *argv[]) {
  Extrae_user_function(1);
  fA();
  fB();
  Extrae_user_function(0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%edi
call   1040 <Extrae_user_function@plt>
mov    $0x0,%al
call   1050 <fA@plt>
mov    $0x0,%al
call   1030 <fB@plt>
xor    %edi,%edi
call   1040 <Extrae_user_function@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1040 <Extrae_user_function@plt>
xor    %eax,%eax
call   1050 <fA@plt>
xor    %eax,%eax
call   1030 <fB@plt>
xor    %edi,%edi
call   1040 <Extrae_user_function@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @Extrae_user_function(i32 1)
%7 = call i32 (...) @fA()
%8 = call i32 (...) @fB()
%9 = call i32 @Extrae_user_function(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @Extrae_user_function(i32 1)
%4 = tail call i32 (...) @fA()
%5 = tail call i32 (...) @fB()
%6 = tail call i32 @Extrae_user_function(i32 0)
ret i32 0
}
/* Variables and functions */
scalar_t__ mock(char *);
char *cf_s_toss_bad(char *s) { return (char *)mock(s); }


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

x86 assembly (clang, -O2):
<cf_s_toss_bad>:
jmp    1030 <mock@plt>

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

LLVM IR (-O2):
define i8* @cf_s_toss_bad(i8* %0) {
%2 = tail call i64 @mock(i8* %0)
%3 = inttoptr i64 %2 to i8*
ret i8* %3
}
void mouseReset() {}


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

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

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

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