xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ ap_log_get_lock();
int /*<<< orphan*/ ap_log_release_lock();
int is_debug_handle_internal(int);
int ap_log_is_debug_handle(int fd) {
  int retcode;
  if (!ap_log_get_lock())
    return 0;
  retcode = is_debug_handle_internal(fd);
  ap_log_release_lock();
  return retcode;
}


x86 assembly (clang, -O0):
<ap_log_is_debug_handle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <ap_log_get_lock@plt>
cmp    $0x0,%eax
jne    1157 <ap_log_is_debug_handle+0x27>
movl   $0x0,-0x4(%rbp)
jmp    116f <ap_log_is_debug_handle+0x3f>
mov    -0x8(%rbp),%edi
call   1050 <is_debug_handle_internal@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <ap_log_release_lock@plt>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ap_log_is_debug_handle>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <ap_log_get_lock@plt>
test   %eax,%eax
je     1152 <ap_log_is_debug_handle+0x22>
mov    %ebx,%edi
call   1050 <is_debug_handle_internal@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <ap_log_release_lock@plt>
mov    %ebx,%eax
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @ap_log_is_debug_handle(i32 %0) {
%2 = tail call i32 (...) @ap_log_get_lock()
%3 = icmp eq i32 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i32 @is_debug_handle_internal(i32 %0)
%6 = tail call i32 (...) @ap_log_release_lock()
br label %7
7: ; preds = %1, %4
%8 = phi i32 [ %5, %4 ], [ 0, %1 ]
ret i32 %8
}
long testReturn(long a, float b) { return a + b; }


x86 assembly (clang, -O0):
<testReturn>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
cvtsi2ssq -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
cvttss2si %xmm0,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<testReturn>:
cvtsi2ss %rdi,%xmm1
addss  %xmm0,%xmm1
cvttss2si %xmm1,%rax
ret

LLVM IR (-O0):
define i64 @testReturn(i64 %0, float %1) {
%3 = alloca i64
%4 = alloca float
store i64 %0, i64* %3
store float %1, float* %4
%5 = load i64, i64* %3
%6 = sitofp i64 %5 to float
%7 = load float, float* %4
%8 = fadd float %6, %7
%9 = fptosi float %8 to i64
ret i64 %9
}

LLVM IR (-O2):
define i64 @testReturn(i64 %0, float %1) {
%3 = sitofp i64 %0 to float
%4 = fadd float %3, %1
%5 = fptosi float %4 to i64
ret i64 %5
}
/* Variables and functions */
double cos(double);
double sin(double);
double test(double f) { return sin(f) + cos(f); }


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
sub    $0x18,%rsp
movsd  %xmm0,0x8(%rsp)
call   1030 <sin@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1040 <cos@plt>
addsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @test(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @sin(double %3)
%5 = load double, double* %2
%6 = call double @cos(double %5)
%7 = fadd double %4, %6
ret double %7
}

LLVM IR (-O2):
define double @test(double %0) {
%2 = tail call double @sin(double %0)
%3 = tail call double @cos(double %0)
%4 = fadd double %2, %3
ret double %4
}
int VerificaData(int gg) { return (gg <= 0 || gg > 31) ? 0 : gg; }


x86 assembly (clang, -O0):
<VerificaData>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    111b <VerificaData+0x1b>
cmpl   $0x1f,-0x4(%rbp)
jle    1125 <VerificaData+0x25>
xor    %eax,%eax
mov    %eax,-0x8(%rbp)
jmp    112b <VerificaData+0x2b>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<VerificaData>:
lea    -0x20(%rdi),%ecx
xor    %eax,%eax
cmp    $0xffffffe1,%ecx
cmovae %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @VerificaData(i32 %0) {
%2 = add i32 %0, -32
%3 = icmp ult i32 %2, -31
%4 = select i1 %3, i32 0, i32 %0
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ __assert_fail(char const *, char const *, int, char const *);
scalar_t__ strcmp(char const *, char const *);
void assertstreq_impl(const char *str1, const char *str2, const char *assertion,
                      const char *file, int line, const char *function) {
  if (strcmp(str1, str2) != 0)
    __assert_fail(assertion, file, line, function);
}


x86 assembly (clang, -O0):
<assertstreq_impl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
je     116b <assertstreq_impl+0x4b>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x24(%rbp),%edx
mov    -0x30(%rbp),%rcx
call   1030 <__assert_fail@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assertstreq_impl>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %r9,%r14
mov    %r8d,%r15d
mov    %rcx,%rbx
mov    %rdx,%rbp
call   1040 <strcmp@plt>
test   %rax,%rax
je     1158 <assertstreq_impl+0x38>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r15d,%edx
mov    %r14,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <__assert_fail@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @assertstreq_impl(i8* %0, i8* %1, i8* %2, i8* %3, i32 %4, i8* %5) {
%7 = tail call i64 @strcmp(i8* %0, i8* %1)
%8 = icmp eq i64 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %6
%10 = tail call i32 @__assert_fail(i8* %2, i8* %3, i32 %4, i8* %5)
br label %11
11: ; preds = %9, %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ sleep(int);
void *does_not() {
  int i = 0;
  for (i = 0; i < 5; i++) {
    sleep(1);
    puts("Does not!");
  }
  return NULL;
}


x86 assembly (clang, -O0):
<does_not>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0x5,-0x4(%rbp)
jge    1164 <does_not+0x44>
mov    $0x1,%edi
call   1040 <sleep@plt>
lea    0xeaf(%rip),%rdi
call   1030 <puts@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1136 <does_not+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<does_not>:
push   %rbx
mov    $0x1,%edi
call   1040 <sleep@plt>
lea    0xece(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"Does not!\00"
define i8* @does_not() {
%1 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %1
br label %2
2: ; preds = %8, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 5
br i1 %4, label %5, label %11
5: ; preds = %2
%6 = call i32 @sleep(i32 1)
%7 = call i32 @puts(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %5
%9 = load i32, i32* %1
%10 = add nsw i32 %9, 1
store i32 %10, i32* %1
br label %2
11: ; preds = %2
ret i8* null
}

LLVM IR (-O2):
@.str = [10 x i8] c"Does not!\00"
define noalias i8* @does_not() {
%1 = tail call i32 @sleep(i32 1)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @sleep(i32 1)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @sleep(i32 1)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @sleep(i32 1)
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 @sleep(i32 1)
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_help() {
  printf("\nUsage: Sbsa [-v <n>] | [-l <n>] | [--skip <n>]\n"
         "Options:\n"
         "-v      Verbosity of the Prints\n"
         "        1 shows all prints, 5 shows Errors\n"
         "-l      Level of compliance to be tested for\n"
         "        As per SBSA spec, 0 to 6\n"
         "--skip  Test(s) to be skipped\n"
         "        Refer to section 4 of SBSA_ACS_User_Guide\n"
         "        To skip a module, use Model_ID as mentioned in user guide\n"
         "        To skip a particular test within a module, use the exact "
         "testcase number\n");
}


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

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

LLVM IR (-O0):
@.str = [438 x i8] c"\0AUsage: Sbsa [-v <n>] | [-l <n>] | [--skip <n>]\0AOptions:\0A-v Verbosity of the Prints\0A 1 shows all prints, 5 shows Errors\0A-l Level of compliance to be tested for\0A As per SBSA spec, 0 to 6\0A--skip Test(s) to be skipped\0A Refer to section 4 of SBSA_ACS_User_Guide\0A To skip a module, use Model_ID as mentioned in user guide\0A To skip a particular test within a module, use the exact testcase number\0A\00"
define void @print_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([438 x i8], [438 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [437 x i8] c"\0AUsage: Sbsa [-v <n>] | [-l <n>] | [--skip <n>]\0AOptions:\0A-v Verbosity of the Prints\0A 1 shows all prints, 5 shows Errors\0A-l Level of compliance to be tested for\0A As per SBSA spec, 0 to 6\0A--skip Test(s) to be skipped\0A Refer to section 4 of SBSA_ACS_User_Guide\0A To skip a module, use Model_ID as mentioned in user guide\0A To skip a particular test within a module, use the exact testcase number\00"
define void @print_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([437 x i8], [437 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
uint16_t rot16r8(uint16_t x) { return (x >> 8) | (x << 8); }


x86 assembly (clang, -O0):
<rot16r8>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
mov    -0x4(%rbp),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @rot16r8(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 8
%5 = load i32, i32* %2
%6 = shl i32 %5, 8
%7 = or i32 %4, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @rot16r8(i32 %0) {
%2 = ashr i32 %0, 8
%3 = shl i32 %0, 8
%4 = or i32 %2, %3
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ value;

/* Variables and functions */
int gui_window_get_height();
int /*<<< orphan*/ snprintf(char *, int, char *, int);
const char *plugin_api_info_term_height_cb(void *data, const char *info_name,
                                           const char *arguments) {
  static char value[32];
  (void)data;
  (void)info_name;
  (void)arguments;
  snprintf(value, sizeof(value), "%d", gui_window_get_height());
  return value;
}


x86 assembly (clang, -O0):
<plugin_api_info_term_height_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x0,%al
call   1030 <gui_window_get_height@plt>
mov    %eax,%ecx
lea    0x2efc(%rip),%rdi
mov    $0x20,%esi
lea    0xeb0(%rip),%rdx
call   1040 <snprintf@plt>
lea    0x2ee4(%rip),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<plugin_api_info_term_height_cb>:
push   %rbx
xor    %eax,%eax
call   1030 <gui_window_get_height@plt>
lea    0x2f11(%rip),%rbx
lea    0xeca(%rip),%rdx
mov    %rbx,%rdi
mov    $0x20,%esi
mov    %eax,%ecx
call   1040 <snprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@plugin_api_info_term_height_cb.value = internal global [32 x i8] zeroinitializer
@.str = [3 x i8] c"%d\00"
define i8* @plugin_api_info_term_height_cb(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call i32 (...) @gui_window_get_height()
%11 = call i32 @snprintf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @plugin_api_info_term_height_cb.value, i64 0, i64 0), i32 32, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %10)
ret i8* getelementptr inbounds ([32 x i8], [32 x i8]* @plugin_api_info_term_height_cb.value, i64 0, i64 0)
}

LLVM IR (-O2):
@plugin_api_info_term_height_cb.value = internal global [32 x i8] zeroinitializer
@.str = [3 x i8] c"%d\00"
define i8* @plugin_api_info_term_height_cb(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = tail call i32 (...) @gui_window_get_height()
%5 = tail call i32 @snprintf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @plugin_api_info_term_height_cb.value, i64 0, i64 0), i32 32, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i8* getelementptr inbounds ([32 x i8], [32 x i8]* @plugin_api_info_term_height_cb.value, i64 0, i64 0)
}
int letraNaPalavra(char a, char *palavra) {
  int i = 0;
  while (palavra[i] != '\0') {
    if (palavra[i] == a)
      return 1;
    i++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<letraNaPalavra>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     115c <letraNaPalavra+0x5c>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
movsbl -0x5(%rbp),%ecx
cmp    %ecx,%eax
jne    114e <letraNaPalavra+0x4e>
movl   $0x1,-0x4(%rbp)
jmp    1163 <letraNaPalavra+0x63>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1115 <letraNaPalavra+0x15>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<letraNaPalavra>:
mov    (%rsi),%cl
xor    %eax,%eax
test   %cl,%cl
je     1120 <letraNaPalavra+0x20>
add    $0x1,%rsi
nopl   0x0(%rax)
cmp    %dil,%cl
je     1121 <letraNaPalavra+0x21>
movzbl (%rsi),%ecx
add    $0x1,%rsi
test   %cl,%cl
jne    1110 <letraNaPalavra+0x10>
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @letraNaPalavra(i8 signext %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %14, label %9
5: ; preds = %9
%6 = getelementptr inbounds i8, i8* %1, i64 %13
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %14, label %9
9: ; preds = %2, %5
%10 = phi i64 [ %13, %5 ], [ 0, %2 ]
%11 = phi i8 [ %7, %5 ], [ %3, %2 ]
%12 = icmp eq i8 %11, %0
%13 = add nuw i64 %10, 1
br i1 %12, label %14, label %5
14: ; preds = %9, %5, %2
%15 = phi i32 [ 0, %2 ], [ 0, %5 ], [ 1, %9 ]
ret i32 %15
}
unsigned short int lendianWriteShort(unsigned char b[]) {
  unsigned short int i;
  i = (b[1] << 8) | (b[0]);
  return i;
}


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

x86 assembly (clang, -O2):
<lendianWriteShort>:
movzwl (%rdi),%eax
ret

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

LLVM IR (-O2):
define zeroext i16 @lendianWriteShort(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %2
%4 = zext i8 %3 to i16
%5 = shl nuw i16 %4, 8
%6 = load i8, i8* %0
%7 = zext i8 %6 to i16
%8 = or i16 %5, %7
ret i16 %8
}
/* Type definitions */
struct js_value {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ js_print(struct js_value *);
int /*<<< orphan*/ printf(char *);
void js_println(struct js_value *obj) {
  js_print(obj);
  printf("\n");
}


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

x86 assembly (clang, -O2):
<js_println>:
push   %rax
call   1040 <js_print@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
%struct.js_value = type { i32 }
define void @js_println(%struct.js_value* %0) {
%2 = tail call i32 @js_print(%struct.js_value* %0)
%3 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int Degree(unsigned int *);
void Initialize(unsigned c[]) {
  int i, t;
  t = Degree(c);
  for (i = 0; i <= t; i++)
    c[i] = 0;
}


x86 assembly (clang, -O0):
<Initialize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <Degree@plt>
mov    %eax,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     1158 <Initialize+0x48>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112f <Initialize+0x1f>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Initialize>:
push   %rbx
mov    %rdi,%rbx
call   1040 <Degree@plt>
test   %eax,%eax
js     1141 <Initialize+0x21>
mov    %eax,%eax
lea    0x4(,%rax,4),%rdx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @Initialize(i32* %0) {
%2 = tail call i32 @Degree(i32* %0)
%3 = icmp slt i32 %2, 0
br i1 %3, label %9, label %4
4: ; preds = %1
%5 = bitcast i32* %0 to i8*
%6 = zext i32 %2 to i64
%7 = shl nuw nsw i64 %6, 2
%8 = add nuw nsw i64 %7, 4
br label %9
9: ; preds = %4, %1
ret void
}
void gtk_arrow_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_arrow_get_type() {
ret void
}
int getPositionInAlphabet_DoWhile(char c) {
  int offset = -1;
  do {
    offset++;
  } while (offset < 26 && 'a' + offset != c);
  if (offset == 26) {
    return -1;
  }
  return offset + 1;
}


x86 assembly (clang, -O0):
<getPositionInAlphabet_DoWhile>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movl   $0xffffffff,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x1a,-0xc(%rbp)
mov    %al,-0xd(%rbp)
jge    113b <getPositionInAlphabet_DoWhile+0x3b>
mov    -0xc(%rbp),%eax
add    $0x61,%eax
movsbl -0x5(%rbp),%ecx
cmp    %ecx,%eax
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1111 <getPositionInAlphabet_DoWhile+0x11>
cmpl   $0x1a,-0xc(%rbp)
jne    115c <getPositionInAlphabet_DoWhile+0x5c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1165 <getPositionInAlphabet_DoWhile+0x65>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getPositionInAlphabet_DoWhile>:
add    $0xffffff9f,%edi
cmp    $0x1a,%edi
mov    $0x1a,%ecx
cmovb  %edi,%ecx
add    $0x1,%ecx
cmp    $0x1a,%edi
mov    $0xffffffff,%eax
cmovb  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @getPositionInAlphabet_DoWhile(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add nsw i32 %2, -97
%4 = call i32 @llvm.umin.i32(i32 %3, i32 26)
%5 = icmp ugt i32 %3, 25
%6 = add nuw nsw i32 %4, 1
%7 = select i1 %5, i32 -1, i32 %6
ret i32 %7
}
int test_imm_65uint64_midword_mem(unsigned long long *val) {
  return ((*val >> 16) & (0x65 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_65uint64_midword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = lshr i64 %4, 16
%6 = and i64 %5, 101
%7 = icmp ne i64 %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_65uint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 6619136
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
main(argc, argv) char *argv[];
{
  if (argc <= 1) {
    printf("Usage: %s .boardrc\n", argv[0]);
  } else {
    brc_initial(argv[1]);
  }
}


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)
cmpl   $0x1,-0x8(%rbp)
jg     115a <main+0x3a>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xeb2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1169 <main+0x49>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    $0x0,%al
call   1030 <brc_initial@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x1,%edi
jg     1139 <main+0x19>
mov    (%rsi),%rsi
lea    0xed0(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1144 <main+0x24>
mov    0x8(%rsi),%rdi
xor    %eax,%eax
call   1030 <brc_initial@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Usage: %s .boardrc\0A\00"
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 = load i32, i32* %4
%7 = icmp sle i32 %6, 1
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 0
%11 = load i8*, i8** %10
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %11)
br label %18
13: ; preds = %2
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = call i32 (i8*, ...) bitcast (i32 (...)* @brc_initial to i32 (i8*, ...)*)(i8* %16)
br label %18
18: ; preds = %13, %8
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
@.str = [20 x i8] c"Usage: %s .boardrc\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %5)
br label %11
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 (i8*, ...) bitcast (i32 (...)* @brc_initial to i32 (i8*, ...)*)(i8* %9)
br label %11
11: ; preds = %7, %4
ret i32 0
}
/* Variables and functions */
int version_compare(char const *const, char const *const);
int compar_version(const void *va, const void *vb) {
  const char *const *a = va;
  const char *const *b = vb;
  return version_compare(*a, *b);
}


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

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

LLVM IR (-O0):
define i32 @compar_version(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i8**
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i8**
store i8** %8, i8*** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i8**
store i8** %10, i8*** %6
%11 = load i8**, i8*** %5
%12 = load i8*, i8** %11
%13 = load i8**, i8*** %6
%14 = load i8*, i8** %13
%15 = call i32 @version_compare(i8* %12, i8* %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @compar_version(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = bitcast i8* %1 to i8**
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = tail call i32 @version_compare(i8* %5, i8* %6)
ret i32 %7
}
void print_game_servers(struct ssgl_game_server *game_server,
                        int game_server_count) {}


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

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

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

LLVM IR (-O2):
%struct.ssgl_game_server = type opaque
define void @print_game_servers(%struct.ssgl_game_server* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_105() {
  Assert_real((isqrt(105) == 10),
              "/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/stdlib/isqrt.c",
              530, ("Integer square root of 105 should be 10"));
}


x86 assembly (clang, -O0):
<t_sqrt_105>:
push   %rbp
mov    %rsp,%rbp
mov    $0x69,%edi
call   1030 <isqrt@plt>
cmp    $0xa,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x212,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_105>:
push   %rax
mov    $0x69,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0xa,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x212,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 105 should be 10\00"
define void @t_sqrt_105() {
%1 = call i32 @isqrt(i32 105)
%2 = icmp eq i32 %1, 10
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 530, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 105 should be 10\00"
define void @t_sqrt_105() {
%1 = tail call i32 @isqrt(i32 105)
%2 = icmp eq i32 %1, 10
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 530, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}
signed long signedlong_ignoring_longlong(signed long x, long long y) {
  return x;
}


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

x86 assembly (clang, -O2):
<signedlong_ignoring_longlong>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @signedlong_ignoring_longlong(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
ret i64 %5
}

LLVM IR (-O2):
define i64 @signedlong_ignoring_longlong(i64 returned %0, i64 %1) {
ret i64 %0
}
/* Variables and functions */
int /*<<< orphan*/ _hmt_count_cover(char *, int);
float tanf(float);
float HMM_TanF(float Radians) {
  { _hmt_count_cover("HMM_TanF", 442); };
  float Result = tanf(Radians);
  return (Result);
}


x86 assembly (clang, -O0):
<HMM_TanF>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
lea    0xecc(%rip),%rdi
mov    $0x1ba,%esi
call   1030 <_hmt_count_cover@plt>
movss  -0x4(%rbp),%xmm0
call   1040 <tanf@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HMM_TanF>:
push   %rax
movss  %xmm0,0x4(%rsp)
lea    0xed2(%rip),%rdi
mov    $0x1ba,%esi
call   1030 <_hmt_count_cover@plt>
movss  0x4(%rsp),%xmm0
pop    %rax
jmp    1040 <tanf@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"HMM_TanF\00"
define float @HMM_TanF(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = call i32 @_hmt_count_cover(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 442)
%5 = load float, float* %2
%6 = call float @tanf(float %5)
store float %6, float* %3
%7 = load float, float* %3
ret float %7
}

LLVM IR (-O2):
@.str = [9 x i8] c"HMM_TanF\00"
define float @HMM_TanF(float %0) {
%2 = tail call i32 @_hmt_count_cover(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 442)
%3 = tail call float @tanf(float %0)
ret float %3
}
int is_integer(const char *value) {
  const char *p = value;
  while (*p != '\0') {
    if (*p > 47 && *p < 58) {
      p++;
    } else {
      return 0;
    }
  }
  return 1;
}


x86 assembly (clang, -O0):
<is_integer>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1162 <is_integer+0x62>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
jle    1151 <is_integer+0x51>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3a,%eax
jge    1151 <is_integer+0x51>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    115d <is_integer+0x5d>
movl   $0x0,-0x4(%rbp)
jmp    1169 <is_integer+0x69>
jmp    1110 <is_integer+0x10>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_integer>:
mov    (%rdi),%cl
mov    $0x1,%eax
test   %cl,%cl
je     1123 <is_integer+0x23>
add    $0x1,%rdi
nop
add    $0xd0,%cl
cmp    $0xa,%cl
jae    1124 <is_integer+0x24>
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <is_integer+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @is_integer(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %7
4: ; preds = %7
%5 = load i8, i8* %12
%6 = icmp eq i8 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %1, %4
%8 = phi i8 [ %5, %4 ], [ %2, %1 ]
%9 = phi i8* [ %12, %4 ], [ %0, %1 ]
%10 = add i8 %8, -48
%11 = icmp ult i8 %10, 10
%12 = getelementptr inbounds i8, i8* %9, i64 1
br i1 %11, label %4, label %13
13: ; preds = %7, %4, %1
%14 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %7 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
main() {
  int tmp;
  unsigned long long utmp1, utmp2;
  tmp = 16;
  utmp1 = (~((unsigned long long)0)) >> tmp;
  utmp2 = (~((unsigned long long)0)) >> 16;
  if (utmp1 != utmp2)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x10,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
mov    $0xffffffffffffffff,%rax
shr    %cl,%rax
mov    %rax,-0x10(%rbp)
movabs $0xffffffffffff,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
je     116c <main+0x4c>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i64
%4 = alloca i64
store i32 0, i32* %1
store i32 16, i32* %2
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
%7 = lshr i64 -1, %6
store i64 %7, i64* %3
store i64 281474976710655, i64* %4
%8 = load i64, i64* %3
%9 = load i64, i64* %4
%10 = icmp ne i64 %8, %9
br i1 %10, label %11, label %13
11: ; preds = %0
%12 = call i32 (...) @abort()
unreachable
13: ; preds = %0
%14 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
scalar_t__ bitpack_setu(scalar_t__, unsigned int, unsigned int, scalar_t__);
int /*<<< orphan*/ printf(char *);
void test_bitpack_setu(uint64_t vec, unsigned lsb, unsigned width, uint64_t val,
                       uint64_t expected) {
  if (bitpack_setu(vec, lsb, width, val) == expected) {
    printf("Successfully packed bits.\n");
  } else {
    printf("Error packing bits.\n");
  }
}


x86 assembly (clang, -O0):
<test_bitpack_setu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x18(%rbp),%rcx
call   1040 <bitpack_setu@plt>
cmp    -0x20(%rbp),%rax
jne    1168 <test_bitpack_setu+0x48>
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
jmp    1174 <test_bitpack_setu+0x54>
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_bitpack_setu>:
push   %rbx
mov    %r8,%rbx
call   1040 <bitpack_setu@plt>
cmp    %rbx,%rax
lea    0xee1(%rip),%rax
lea    0xec6(%rip),%rdi
cmove  %rax,%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"Successfully packed bits.\0A\00"
@.str.1 = [21 x i8] c"Error packing bits.\0A\00"
define void @test_bitpack_setu(i64 %0, i32 %1, i32 %2, i64 %3, i64 %4) {
%6 = alloca i64
%7 = alloca i32
%8 = alloca i32
%9 = alloca i64
%10 = alloca i64
store i64 %0, i64* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i64 %3, i64* %9
store i64 %4, i64* %10
%11 = load i64, i64* %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i64, i64* %9
%15 = call i64 @bitpack_setu(i64 %11, i32 %12, i32 %13, i64 %14)
%16 = load i64, i64* %10
%17 = icmp eq i64 %15, %16
br i1 %17, label %18, label %20
18: ; preds = %5
%19 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
br label %22
20: ; preds = %5
%21 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
br label %22
22: ; preds = %20, %18
ret void
}

LLVM IR (-O2):
@str = [20 x i8] c"Error packing bits.\00"
@str.2 = [26 x i8] c"Successfully packed bits.\00"
define void @test_bitpack_setu(i64 %0, i32 %1, i32 %2, i64 %3, i64 %4) {
%6 = tail call i64 @bitpack_setu(i64 %0, i32 %1, i32 %2, i64 %3)
%7 = icmp eq i64 %6, %4
%8 = select i1 %7, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @str.2, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0)
%9 = tail call i32 @puts(i8* dereferenceable(1) %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int a = 10e3;
  printf("a = %d\n", a);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"a = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 10000)
ret i32 0
}
float dact_pct(float x) { return 1; }


x86 assembly (clang, -O0):
<dact_pct>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define float @dact_pct(float %0) {
%2 = alloca float
store float %0, float* %2
ret float 1.000000e+00
}

LLVM IR (-O2):
define float @dact_pct(float %0) {
ret float 1.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ boardCoordsOperationResults(int /*<<< orphan*/, int, int);
int /*<<< orphan*/ createBoardCoord(int, int);
int /*<<< orphan*/ subBoardCoords(int /*<<< orphan*/, int /*<<< orphan*/);
void boardCoordSubtractionWorksInRange(void) {
  boardCoordsOperationResults(
      subBoardCoords(createBoardCoord(7, 9), createBoardCoord(5, 6)), 7 - 5,
      9 - 6);
}


x86 assembly (clang, -O0):
<boardCoordSubtractionWorksInRange>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x7,%edi
mov    $0x9,%esi
call   1030 <createBoardCoord@plt>
mov    %eax,-0x4(%rbp)
mov    $0x5,%edi
mov    $0x6,%esi
call   1030 <createBoardCoord@plt>
mov    -0x4(%rbp),%edi
mov    %eax,%esi
call   1050 <subBoardCoords@plt>
mov    %eax,%edi
mov    $0x2,%esi
mov    $0x3,%edx
call   1040 <boardCoordsOperationResults@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<boardCoordSubtractionWorksInRange>:
push   %rbx
mov    $0x7,%edi
mov    $0x9,%esi
call   1030 <createBoardCoord@plt>
mov    %eax,%ebx
mov    $0x5,%edi
mov    $0x6,%esi
call   1030 <createBoardCoord@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1050 <subBoardCoords@plt>
mov    %eax,%edi
mov    $0x2,%esi
mov    $0x3,%edx
pop    %rbx
jmp    1040 <boardCoordsOperationResults@plt>

LLVM IR (-O0):
define void @boardCoordSubtractionWorksInRange() {
%1 = call i32 @createBoardCoord(i32 7, i32 9)
%2 = call i32 @createBoardCoord(i32 5, i32 6)
%3 = call i32 @subBoardCoords(i32 %1, i32 %2)
%4 = call i32 @boardCoordsOperationResults(i32 %3, i32 2, i32 3)
ret void
}

LLVM IR (-O2):
define void @boardCoordSubtractionWorksInRange() {
%1 = tail call i32 @createBoardCoord(i32 7, i32 9)
%2 = tail call i32 @createBoardCoord(i32 5, i32 6)
%3 = tail call i32 @subBoardCoords(i32 %1, i32 %2)
%4 = tail call i32 @boardCoordsOperationResults(i32 %3, i32 2, i32 3)
ret void
}
void exec_queue_argv_free(char **argv) {
  int i;
  for (i = 0; argv[i]; i++) {
    free(argv[i]);
  }
  free(argv);
}


x86 assembly (clang, -O0):
<exec_queue_argv_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1155 <exec_queue_argv_free+0x45>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <exec_queue_argv_free+0x13>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exec_queue_argv_free>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1141 <exec_queue_argv_free+0x31>
lea    0x8(%r14),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
call   1030 <free@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1130 <exec_queue_argv_free+0x20>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @exec_queue_argv_free(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %7, %4 ], [ 0, %1 ]
%6 = phi i8* [ %9, %4 ], [ %2, %1 ]
tail call void @free(i8* %6)
%7 = add nuw nsw i64 %5, 1
%8 = getelementptr inbounds i8*, i8** %0, i64 %7
%9 = load i8*, i8** %8
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = bitcast i8** %0 to i8*
tail call void @free(i8* %12)
ret void
}
void __attribute__((visibility("default"))) mcount(void) {}


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

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

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

LLVM IR (-O2):
define void @mcount() {
ret void
}
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
int getpid();
int /*<<< orphan*/ printf(char *, int);
int main() {
  pid_t pid;
  pid = getpid();
  printf("pid : %d\n", pid);
  while (1)
    ;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xebd(%rip),%rdi
call   1040 <printf@plt>
jmp    1148 <main+0x28>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <getpid@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
cs nopw 0x0(%rax,%rax,1)
jmp    1140 <main+0x20>

LLVM IR (-O0):
@.str = [10 x i8] c"pid : %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @getpid()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %4)
br label %6
6: ; preds = %0, %6
br label %6
}

LLVM IR (-O2):
@.str = [10 x i8] c"pid : %d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @getpid()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %1)
br label %3
3: ; preds = %3, %0
br label %3
}