xunge/DecIR huggingface dataset:
/* Type definitions */
struct rdr_ds_s {
  int dummy;
};

/* Variables and functions */
struct rdr_ds_s *parsePrefixTerm(int /*<<< orphan*/, char **);
struct rdr_ds_s *rpc_cli2rdr(char *cmd) {
  char *cp = cmd;
  struct rdr_ds_s *e;
  e = parsePrefixTerm(0, &cp);
  return e;
}


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

x86 assembly (clang, -O2):
<rpc_cli2rdr>:
push   %rax
mov    %rdi,(%rsp)
mov    %rsp,%rsi
xor    %edi,%edi
call   1030 <parsePrefixTerm@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.rdr_ds_s = type { i32 }
define %struct.rdr_ds_s* @rpc_cli2rdr(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca %struct.rdr_ds_s*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
store i8* %5, i8** %3
%6 = call %struct.rdr_ds_s* @parsePrefixTerm(i32 0, i8** %3)
store %struct.rdr_ds_s* %6, %struct.rdr_ds_s** %4
%7 = load %struct.rdr_ds_s*, %struct.rdr_ds_s** %4
ret %struct.rdr_ds_s* %7
}

LLVM IR (-O2):
%struct.rdr_ds_s = type { i32 }
define %struct.rdr_ds_s* @rpc_cli2rdr(i8* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
store i8* %0, i8** %2
%4 = call %struct.rdr_ds_s* @parsePrefixTerm(i32 0, i8** %2)
ret %struct.rdr_ds_s* %4
}
void endspent() {}


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

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

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

LLVM IR (-O2):
define void @endspent() {
ret void
}
/* Variables and functions */
char *strrchr(char *, char);
char *extension(char *filename) {
  char *s = strrchr(filename, '.');
  return s ? s + 1 : "";
}


x86 assembly (clang, -O0):
<extension>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2e,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     114a <extension+0x3a>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    115a <extension+0x4a>
lea    0xeaf(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    115a <extension+0x4a>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<extension>:
push   %rax
mov    $0x2e,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
lea    0xed7(%rip),%rax
cmovne %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @extension(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strrchr(i8* %4, i8 signext 46)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 1
br label %12
11: ; preds = %1
br label %12
12: ; preds = %11, %8
%13 = phi i8* [ %10, %8 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), %11 ]
ret i8* %13
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @extension(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 46)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* %4
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ fprint_udecimal(int, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void print_udecimal(int decimal) { fprint_udecimal(decimal, stdout); }


x86 assembly (clang, -O0):
<print_udecimal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ebb(%rip),%rax
mov    (%rax),%esi
call   1030 <fprint_udecimal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_udecimal>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
jmp    1030 <fprint_udecimal@plt>

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

LLVM IR (-O2):
@stdout = global i32 0
define void @print_udecimal(i32 %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprint_udecimal(i32 %0, i32 %2)
ret void
}
/* Variables and functions */
int get_file_size(int);
int get_num_file_blocks(int);
int get_end_char(int i_node_number) {
  int size = get_file_size(i_node_number);
  int end = size % 1024;
  if (!end)
    if (size == get_num_file_blocks(i_node_number) * 1024)
      end = 1024;
  return end;
}


x86 assembly (clang, -O0):
<get_end_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <get_file_size@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x400,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1178 <get_end_char+0x58>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <get_num_file_blocks@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
shl    $0xa,%ecx
cmp    %ecx,%eax
jne    1173 <get_end_char+0x53>
movl   $0x400,-0xc(%rbp)
jmp    1178 <get_end_char+0x58>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_end_char>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
call   1030 <get_file_size@plt>
mov    %eax,%ebx
lea    0x3ff(%rbx),%ecx
test   %eax,%eax
cmovns %eax,%ecx
and    $0xfffffc00,%ecx
sub    %ecx,%eax
jne    1157 <get_end_char+0x37>
mov    %ebp,%edi
call   1040 <get_num_file_blocks@plt>
mov    %eax,%ecx
shl    $0xa,%ecx
xor    %eax,%eax
cmp    %ecx,%ebx
sete   %al
shl    $0xa,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @get_end_char(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = call i32 @get_file_size(i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = srem i32 %7, 1024
store i32 %8, i32* %4
%9 = load i32, i32* %4
%10 = icmp ne i32 %9, 0
br i1 %10, label %19, label %11
11: ; preds = %1
%12 = load i32, i32* %3
%13 = load i32, i32* %2
%14 = call i32 @get_num_file_blocks(i32 %13)
%15 = mul nsw i32 %14, 1024
%16 = icmp eq i32 %12, %15
br i1 %16, label %17, label %18
17: ; preds = %11
store i32 1024, i32* %4
br label %18
18: ; preds = %17, %11
br label %19
19: ; preds = %18, %1
%20 = load i32, i32* %4
ret i32 %20
}

LLVM IR (-O2):
define i32 @get_end_char(i32 %0) {
%2 = tail call i32 @get_file_size(i32 %0)
%3 = srem i32 %2, 1024
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = tail call i32 @get_num_file_blocks(i32 %0)
%7 = shl nsw i32 %6, 10
%8 = icmp eq i32 %2, %7
%9 = select i1 %8, i32 1024, i32 0
br label %10
10: ; preds = %5, %1
%11 = phi i32 [ %3, %1 ], [ %9, %5 ]
ret i32 %11
}
void sys_reopen_midi(void) {}


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

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

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

LLVM IR (-O2):
define void @sys_reopen_midi() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ __builtin_add_overflow_p(int /*<<< orphan*/,
                                            int /*<<< orphan*/,
                                            int /*<<< orphan*/);
uint64_t __hsail_carry_u64(uint64_t a, uint64_t b) {
  return __builtin_add_overflow_p(a, b, a);
}


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

x86 assembly (clang, -O2):
<__hsail_carry_u64>:
mov    %edi,%edx
jmp    1030 <__builtin_add_overflow_p@plt>

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

LLVM IR (-O2):
define i32 @__hsail_carry_u64(i32 %0, i32 %1) {
%3 = tail call i32 @__builtin_add_overflow_p(i32 %0, i32 %1, i32 %0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Broker_recordFFDC(char *);
int take_FFDC(char *symptoms) {
  Broker_recordFFDC(symptoms);
  return 0;
}


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

x86 assembly (clang, -O2):
<take_FFDC>:
push   %rax
call   1030 <Broker_recordFFDC@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @take_FFDC(i8* %0) {
%2 = tail call i32 @Broker_recordFFDC(i8* %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ f(int /*<<< orphan*/, int, int);
int /*<<< orphan*/ g(int);
int fseek(int a, int b, int c) { f(g(a), b, c); }


x86 assembly (clang, -O0):
<fseek>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <g@plt>
mov    %eax,%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <f@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fseek>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%ebp
call   1040 <g@plt>
mov    %eax,%edi
mov    %ebp,%esi
mov    %ebx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <f@plt>

LLVM IR (-O0):
define i32 @fseek(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%8 = load i32, i32* %5
%9 = call i32 @g(i32 %8)
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = call i32 @f(i32 %9, i32 %10, i32 %11)
%13 = load i32, i32* %4
ret i32 %13
}

LLVM IR (-O2):
define i32 @fseek(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @g(i32 %0)
%5 = tail call i32 @f(i32 %4, i32 %1, i32 %2)
ret i32 undef
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int popcount_byte(uint8_t b) {
  int c = 0;
  while (b) {
    b &= (uint8_t)(b - 1U);
    c++;
  }
  return c;
}


x86 assembly (clang, -O0):
<popcount_byte>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1132 <popcount_byte+0x32>
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
and    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <popcount_byte+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<popcount_byte>:
xor    %eax,%eax
test   %edi,%edi
je     111c <popcount_byte+0x1c>
cs nopw 0x0(%rax,%rax,1)
lea    -0x1(%rdi),%ecx
add    $0x1,%eax
and    %edi,%ecx
mov    %ecx,%edi
jne    1110 <popcount_byte+0x10>
ret

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

LLVM IR (-O2):
define i32 @popcount_byte(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ 0, %1 ]
%5 = phi i32 [ %7, %3 ], [ %0, %1 ]
%6 = add i32 %5, -1
%7 = and i32 %6, %5
%8 = add nuw nsw i32 %4, 1
%9 = icmp eq i32 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %8, %3 ]
ret i32 %11
}
/* Variables and functions */
scalar_t__ isspace(char);
int strlen(char *);
char *String_rtrim(char *s) {
  char *back = s + strlen(s);
  while (isspace(*--back))
    ;
  *(back + 1) = '\0';
  return s;
}


x86 assembly (clang, -O0):
<String_rtrim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x10(%rbp)
movsbl -0x1(%rax),%edi
call   1040 <isspace@plt>
cmp    $0x0,%rax
je     1174 <String_rtrim+0x54>
jmp    114d <String_rtrim+0x2d>
mov    -0x10(%rbp),%rax
movb   $0x0,0x1(%rax)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<String_rtrim>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <strlen@plt>
cltq
lea    (%rax,%r14,1),%rbx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
movsbl -0x2(%rbx),%edi
call   1040 <isspace@plt>
add    $0xffffffffffffffff,%rbx
test   %rax,%rax
jne    1140 <String_rtrim+0x20>
movb   $0x0,(%rbx)
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @String_rtrim(i8* returned %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = sext i32 %2 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
br label %5
5: ; preds = %5, %1
%6 = phi i8* [ %4, %1 ], [ %7, %5 ]
%7 = getelementptr inbounds i8, i8* %6, i64 -1
%8 = load i8, i8* %7
%9 = tail call i64 @isspace(i8 signext %8)
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %5
11: ; preds = %5
store i8 0, i8* %6
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  assert(1 == 2);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _hmt_register_covercase(char *, char *);
void _hmt_covercase_HMM_FastNormalizeVec2_init(void) {
  _hmt_register_covercase("HMM_FastNormalizeVec2", "1");
}


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

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

LLVM IR (-O0):
@.str = [22 x i8] c"HMM_FastNormalizeVec2\00"
@.str.1 = [2 x i8] c"1\00"
define void @_hmt_covercase_HMM_FastNormalizeVec2_init() {
%1 = call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"HMM_FastNormalizeVec2\00"
@.str.1 = [2 x i8] c"1\00"
define void @_hmt_covercase_HMM_FastNormalizeVec2_init() {
%1 = tail call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char *argv[]) {
  printf("%s: start\n", "/scratch/repos/new/home/jordi_armengol_estape/"
                        "c-scraper/outputs/2022-01-22/02-19-57/repos/cantora/"
                        "mozz/refs/heads/master/test/addr_basic_test.c");
  printf("%s: exit\n", "/scratch/repos/new/home/jordi_armengol_estape/"
                       "c-scraper/outputs/2022-01-22/02-19-57/repos/cantora/"
                       "mozz/refs/heads/master/test/addr_basic_test.c");
  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)
lea    0xed3(%rip),%rdi
lea    0xed7(%rip),%rsi
call   1030 <printf@plt>
lea    0xf5b(%rip),%rdi
lea    0xec4(%rip),%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rdi
lea    0xeec(%rip),%rbx
mov    %rbx,%rsi
call   1030 <printf@plt>
lea    0xf6d(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"%s: start\0A\00"
@.str.1 = [144 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/cantora/mozz/refs/heads/master/test/addr_basic_test.c\00"
@.str.2 = [10 x i8] c"%s: exit\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 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"%s: start\0A\00"
@.str.1 = [144 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/cantora/mozz/refs/heads/master/test/addr_basic_test.c\00"
@.str.2 = [10 x i8] c"%s: exit\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
char const *tchdberrmsg(int);
const char *tcidberrmsg(int ecode) { return tchdberrmsg(ecode); }


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

x86 assembly (clang, -O2):
<tcidberrmsg>:
jmp    1030 <tchdberrmsg@plt>

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

LLVM IR (-O2):
define i8* @tcidberrmsg(i32 %0) {
%2 = tail call i8* @tchdberrmsg(i32 %0)
ret i8* %2
}
/* Type definitions */
struct iovec {
  int dummy;
};
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ syscall_cp(int, int, struct iovec const *, int);
ssize_t writev(int fd, const struct iovec *iov, int count) {
  return syscall_cp(146, fd, iov, count);
}


x86 assembly (clang, -O0):
<writev>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    $0x92,%edi
call   1030 <syscall_cp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writev>:
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %edi,%esi
mov    $0x92,%edi
jmp    1030 <syscall_cp@plt>

LLVM IR (-O0):
%struct.iovec = type { i32 }
define i32 @writev(i32 %0, %struct.iovec* %1, i32 %2) {
%4 = alloca i32
%5 = alloca %struct.iovec*
%6 = alloca i32
store i32 %0, i32* %4
store %struct.iovec* %1, %struct.iovec** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load %struct.iovec*, %struct.iovec** %5
%9 = load i32, i32* %6
%10 = call i32 @syscall_cp(i32 146, i32 %7, %struct.iovec* %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.iovec = type { i32 }
define i32 @writev(i32 %0, %struct.iovec* %1, i32 %2) {
%4 = tail call i32 @syscall_cp(i32 146, i32 %0, %struct.iovec* %1, i32 %2)
ret i32 %4
}
void genbc1tl_out() {}


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

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

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

LLVM IR (-O2):
define void @genbc1tl_out() {
ret void
}
/* Variables and functions */
double time(int /*<<< orphan*/ *);
double seconds_(void) { return time(NULL); }


x86 assembly (clang, -O0):
<seconds_>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1030 <time@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define double @seconds_() {
%1 = call double @time(i32* null)
ret double %1
}

LLVM IR (-O2):
define double @seconds_() {
%1 = tail call double @time(i32* null)
ret double %1
}
/* Variables and functions */
int /*<<< orphan*/ PIT3_DriverIRQHandler();
__attribute__((weak)) void PIT3_IRQHandler(void) { PIT3_DriverIRQHandler(); }


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

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

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

LLVM IR (-O2):
define weak void @PIT3_IRQHandler() {
%1 = tail call i32 (...) @PIT3_DriverIRQHandler()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
main() {
  printf("Howdy, neighbor! This is my first C program.\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [46 x i8] c"Howdy, neighbor! This is my first C program.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [45 x i8] c"Howdy, neighbor! This is my first C program.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
double log(double);
double inverseSigmoid(double z) {
  if (z == 1)
    return 10000;
  if (z == 0)
    return -10000;
  return log(z / (1.0 - z));
}


x86 assembly (clang, -O0):
<inverseSigmoid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xed6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    114c <inverseSigmoid+0x3c>
jp     114c <inverseSigmoid+0x3c>
movsd  0xece(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1196 <inverseSigmoid+0x86>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1176 <inverseSigmoid+0x66>
jp     1176 <inverseSigmoid+0x66>
movsd  0xe9c(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1196 <inverseSigmoid+0x86>
movsd  -0x10(%rbp),%xmm0
movsd  0xe7d(%rip),%xmm1
subsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1030 <log@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inverseSigmoid>:
ucomisd 0xef0(%rip),%xmm0
jne    1125 <inverseSigmoid+0x15>
jp     1125 <inverseSigmoid+0x15>
movsd  0xedc(%rip),%xmm0
ret
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    113a <inverseSigmoid+0x2a>
jp     113a <inverseSigmoid+0x2a>
movsd  0xed7(%rip),%xmm0
ret
movsd  0xec6(%rip),%xmm1
subsd  %xmm0,%xmm1
divsd  %xmm1,%xmm0
jmp    1030 <log@plt>

LLVM IR (-O0):
define double @inverseSigmoid(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp oeq double %4, 1.000000e+00
br i1 %5, label %6, label %7
6: ; preds = %1
store double 1.000000e+04, double* %2
br label %17
7: ; preds = %1
%8 = load double, double* %3
%9 = fcmp oeq double %8, 0.000000e+00
br i1 %9, label %10, label %11
10: ; preds = %7
store double -1.000000e+04, double* %2
br label %17
11: ; preds = %7
%12 = load double, double* %3
%13 = load double, double* %3
%14 = fsub double 1.000000e+00, %13
%15 = fdiv double %12, %14
%16 = call double @log(double %15)
store double %16, double* %2
br label %17
17: ; preds = %11, %10, %6
%18 = load double, double* %2
ret double %18
}

LLVM IR (-O2):
define double @inverseSigmoid(double %0) {
%2 = fcmp oeq double %0, 1.000000e+00
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = fcmp oeq double %0, 0.000000e+00
br i1 %4, label %9, label %5
5: ; preds = %3
%6 = fsub double 1.000000e+00, %0
%7 = fdiv double %0, %6
%8 = tail call double @log(double %7)
br label %9
9: ; preds = %3, %1, %5
%10 = phi double [ %8, %5 ], [ 1.000000e+04, %1 ], [ -1.000000e+04, %3 ]
ret double %10
}
int str_len(char str[], int size) {
  int i = 0;
  while (str[i] != '\0')
    i++;
  return i;
}


x86 assembly (clang, -O0):
<str_len>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1135 <str_len+0x35>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <str_len+0x12>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_len>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <str_len+0x10>
ret

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

LLVM IR (-O2):
define i32 @str_len(i8* nocapture %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i64 [ %8, %3 ], [ 0, %2 ]
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
%8 = add nuw i64 %4, 1
br i1 %7, label %9, label %3
9: ; preds = %3
%10 = trunc i64 %4 to i32
ret i32 %10
}
int _avg2(int src1, int src2) {
  int low = (((int)1 + (short)src1 + (short)src2) >> 1) & 0XFFFF;
  int high1 = src1 >> 16;
  int high2 = src2 >> 16;
  int high = ((high1 + high2 + 1) >> 1) << 16;
  return high | low;
}


x86 assembly (clang, -O0):
<_avg2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cwtl
add    $0x1,%eax
mov    -0x8(%rbp),%ecx
movswl %cx,%ecx
add    %ecx,%eax
sar    $0x1,%eax
and    $0xffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x10,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
sar    $0x10,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
add    $0x1,%eax
sar    $0x1,%eax
shl    $0x10,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
or     -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_avg2>:
movswl %di,%eax
movswl %si,%ecx
add    %ecx,%eax
add    $0x1,%eax
shr    %eax
movzwl %ax,%ecx
sar    $0x10,%edi
sar    $0x10,%esi
lea    (%rsi,%rdi,1),%eax
shl    $0xf,%eax
add    $0x8000,%eax
and    $0xffff0000,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @_avg2(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%9 = load i32, i32* %3
%10 = trunc i32 %9 to i16
%11 = sext i16 %10 to i32
%12 = add nsw i32 1, %11
%13 = load i32, i32* %4
%14 = trunc i32 %13 to i16
%15 = sext i16 %14 to i32
%16 = add nsw i32 %12, %15
%17 = ashr i32 %16, 1
%18 = and i32 %17, 65535
store i32 %18, i32* %5
%19 = load i32, i32* %3
%20 = ashr i32 %19, 16
store i32 %20, i32* %6
%21 = load i32, i32* %4
%22 = ashr i32 %21, 16
store i32 %22, i32* %7
%23 = load i32, i32* %6
%24 = load i32, i32* %7
%25 = add nsw i32 %23, %24
%26 = add nsw i32 %25, 1
%27 = ashr i32 %26, 1
%28 = shl i32 %27, 16
store i32 %28, i32* %8
%29 = load i32, i32* %8
%30 = load i32, i32* %5
%31 = or i32 %29, %30
ret i32 %31
}

LLVM IR (-O2):
define i32 @_avg2(i32 %0, i32 %1) {
%3 = shl i32 %0, 16
%4 = ashr exact i32 %3, 16
%5 = add nsw i32 %4, 1
%6 = shl i32 %1, 16
%7 = ashr exact i32 %6, 16
%8 = add nsw i32 %5, %7
%9 = lshr i32 %8, 1
%10 = and i32 %9, 65535
%11 = ashr i32 %0, 16
%12 = ashr i32 %1, 16
%13 = add nsw i32 %12, %11
%14 = shl nsw i32 %13, 15
%15 = add i32 %14, 32768
%16 = and i32 %15, -65536
%17 = or i32 %16, %10
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ err(int, char *);
void *malloc(size_t);
void *null_check_malloc(size_t size) {
  void *tmp = malloc(size);
  if (tmp == NULL) {
    err(1, "Error alocating memmory");
  } else {
    return tmp;
  }
}


x86 assembly (clang, -O0):
<null_check_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    115a <null_check_malloc+0x3a>
mov    $0x1,%edi
lea    0xeb0(%rip),%rsi
call   1030 <err@plt>
jmp    1162 <null_check_malloc+0x42>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<null_check_malloc>:
push   %rbx
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113f <null_check_malloc+0x1f>
lea    0xecb(%rip),%rsi
mov    $0x1,%edi
call   1030 <err@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Error alocating memmory\00"
define i8* @null_check_malloc(i64 %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i8*
store i64 %0, i64* %3
%5 = load i64, i64* %3
%6 = call i8* @malloc(i64 %5)
store i8* %6, i8** %4
%7 = load i8*, i8** %4
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = call i32 @err(i32 1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %13
11: ; preds = %1
%12 = load i8*, i8** %4
store i8* %12, i8** %2
br label %13
13: ; preds = %11, %9
%14 = load i8*, i8** %2
ret i8* %14
}

LLVM IR (-O2):
@.str = [24 x i8] c"Error alocating memmory\00"
define noalias i8* @null_check_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @err(i32 1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %1, %4
ret i8* %2
}
void DEBUG_init(int baud) {}


x86 assembly (clang, -O0):
<DEBUG_init>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @DEBUG_init(i32 %0) {
ret void
}
/* Variables and functions */
int strcmp(char const *, char const *);
int cmp(const void *a, const void *b) {
  const char **ia = (const char **)a;
  const char **ib = (const char **)b;
  return strcmp(*ia, *ib);
}


x86 assembly (clang, -O0):
<cmp>:
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 <strcmp@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @cmp(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 @strcmp(i8* %12, i8* %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @cmp(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 @strcmp(i8* dereferenceable(1) %5, i8* dereferenceable(1) %6)
ret i32 %7
}
char *skip_whitespace(char *pnt) {
  while (*pnt && (*pnt == ' ' || *pnt == '\t'))
    pnt++;
  return pnt;
}


x86 assembly (clang, -O0):
<skip_whitespace>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     1148 <skip_whitespace+0x48>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0xa(%rbp)
je     1142 <skip_whitespace+0x42>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1158 <skip_whitespace+0x58>
jmp    1169 <skip_whitespace+0x69>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <skip_whitespace+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i8* @skip_whitespace(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 9, label %5
i8 32, 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*/ nguraConsoleInit();
void nguraInitialize() { nguraConsoleInit(); }


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

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

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

LLVM IR (-O2):
define void @nguraInitialize() {
%1 = tail call i32 (...) @nguraConsoleInit()
ret void
}
/* Variables and functions */
int ENXIO;
int pm8921_bms_get_simultaneous_battery_voltage_and_current(int *ibat_ua,
                                                            int *vbat_uv) {
  return -ENXIO;
}


x86 assembly (clang, -O0):
<pm8921_bms_get_simultaneous_battery_voltage_and_current>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    0x2ecb(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pm8921_bms_get_simultaneous_battery_voltage_and_current>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@ENXIO = global i32 0
define i32 @pm8921_bms_get_simultaneous_battery_voltage_and_current(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32, i32* @ENXIO
%6 = sub nsw i32 0, %5
ret i32 %6
}

LLVM IR (-O2):
@ENXIO = global i32 0
define i32 @pm8921_bms_get_simultaneous_battery_voltage_and_current(i32* nocapture readnone %0, i32* nocapture readnone %1) {
%3 = load i32, i32* @ENXIO
%4 = sub nsw i32 0, %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ dxl_write_byte(unsigned char, int, unsigned char);
void setHighestVoltageLimit(unsigned char id, unsigned char limit) {
  dxl_write_byte(id, (13), limit);
}


x86 assembly (clang, -O0):
<setHighestVoltageLimit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    -0x1(%rbp),%al
mov    $0xd,%esi
movzbl %al,%edi
movzbl -0x2(%rbp),%edx
call   1030 <dxl_write_byte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setHighestVoltageLimit>:
mov    %esi,%edx
mov    $0xd,%esi
jmp    1030 <dxl_write_byte@plt>

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

LLVM IR (-O2):
define void @setHighestVoltageLimit(i8 zeroext %0, i8 zeroext %1) {
%3 = tail call i32 @dxl_write_byte(i8 zeroext %0, i32 13, i8 zeroext %1)
ret void
}
/* Variables and functions */
double atan(double);
double min_caml_atan(void *fv, double f) { return atan(f); }


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

x86 assembly (clang, -O2):
<min_caml_atan>:
jmp    1030 <atan@plt>

LLVM IR (-O0):
define double @min_caml_atan(i8* %0, double %1) {
%3 = alloca i8*
%4 = alloca double
store i8* %0, i8** %3
store double %1, double* %4
%5 = load double, double* %4
%6 = call double @atan(double %5)
ret double %6
}

LLVM IR (-O2):
define double @min_caml_atan(i8* nocapture readnone %0, double %1) {
%3 = tail call double @atan(double %1)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ foo(int);
int main(void) {
  foo(0);
  foo(1);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 0)
%2 = tail call i32 @foo(i32 1)
ret i32 0
}
/* Variables and functions */
int mod1();
int mod2();
int mod3();
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char const *argv[]) {
  printf("\t%d\n", mod1());
  printf("\t%d\n", mod2());
  printf("\t%d\n", mod3());
  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    $0x0,%al
call   1050 <mod1@plt>
mov    %eax,%esi
lea    0xe9a(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <mod2@plt>
mov    %eax,%esi
lea    0xe85(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1060 <mod3@plt>
mov    %eax,%esi
lea    0xe70(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1050 <mod1@plt>
lea    0xeb1(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <mod2@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
call   1060 <mod3@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"\09%d\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 = call i32 (...) @mod1()
%7 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = call i32 (...) @mod2()
%9 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = call i32 (...) @mod3()
%11 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"\09%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @mod1()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 (...) @mod2()
%6 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = tail call i32 (...) @mod3()
%8 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ sort_big_arrays();
int /*<<< orphan*/ sort_medium_arrays();
int /*<<< orphan*/ sort_small_arrays();
int main(__attribute__((unused)) int ac, __attribute__((unused)) char **av) {
  sort_small_arrays();
  sort_medium_arrays();
  sort_big_arrays();
  return (EXIT_SUCCESS);
}


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    $0x0,%al
call   1050 <sort_small_arrays@plt>
mov    $0x0,%al
call   1030 <sort_medium_arrays@plt>
mov    $0x0,%al
call   1040 <sort_big_arrays@plt>
mov    0x2e7e(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <sort_small_arrays@plt>
xor    %eax,%eax
call   1030 <sort_medium_arrays@plt>
xor    %eax,%eax
call   1040 <sort_big_arrays@plt>
mov    0x2e93(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
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 (...) @sort_small_arrays()
%7 = call i32 (...) @sort_medium_arrays()
%8 = call i32 (...) @sort_big_arrays()
%9 = load i32, i32* @EXIT_SUCCESS
ret i32 %9
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @sort_small_arrays()
%4 = tail call i32 (...) @sort_medium_arrays()
%5 = tail call i32 (...) @sort_big_arrays()
%6 = load i32, i32* @EXIT_SUCCESS
ret i32 %6
}
/* Variables and functions */
int SIGHUP;
int /*<<< orphan*/ update_widget();
void sig_handler(int signo) {
  if (signo == SIGHUP) {
    update_widget();
  }
}


x86 assembly (clang, -O0):
<sig_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2ecb(%rip),%rcx
cmp    (%rcx),%eax
jne    1134 <sig_handler+0x24>
mov    $0x0,%al
call   1030 <update_widget@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_handler>:
mov    0x2ed9(%rip),%rax
cmp    %edi,(%rax)
jne    1122 <sig_handler+0x12>
xor    %eax,%eax
jmp    1030 <update_widget@plt>
ret

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

LLVM IR (-O2):
@SIGHUP = global i32 0
define void @sig_handler(i32 %0) {
%2 = load i32, i32* @SIGHUP
%3 = icmp eq i32 %2, %0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @update_widget()
br label %6
6: ; preds = %4, %1
ret void
}
void rewind(void) {}


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

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

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

LLVM IR (-O2):
define void @rewind() {
ret void
}
/* Variables and functions */
char getchar();
int /*<<< orphan*/ printf(char *);
int queryContinue() {
  printf("Select one of the following options:\n");
  printf("(enter) Step\n");
  printf("(any) Exit\n");
  return (getchar() == '\n');
}


x86 assembly (clang, -O0):
<queryContinue>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xeef(%rip),%rdi
call   1030 <printf@plt>
lea    0xef1(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
movsbl %al,%eax
cmp    $0xa,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<queryContinue>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xef1(%rip),%rdi
call   1030 <puts@plt>
lea    0xef2(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %ecx,%ecx
cmp    $0xa,%al
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [38 x i8] c"Select one of the following options:\0A\00"
@.str.1 = [14 x i8] c"(enter) Step\0A\00"
@.str.2 = [12 x i8] c"(any) Exit\0A\00"
define i32 @queryContinue() {
%1 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
%4 = call signext i8 (...) @getchar()
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 10
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
@str = [37 x i8] c"Select one of the following options:\00"
@str.3 = [13 x i8] c"(enter) Step\00"
@str.4 = [11 x i8] c"(any) Exit\00"
define i32 @queryContinue() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.4, i64 0, i64 0))
%4 = tail call signext i8 (...) @getchar()
%5 = icmp eq i8 %4, 10
%6 = zext i1 %5 to i32
ret i32 %6
}
int usb_comm_init() { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @usb_comm_init() {
ret i32 1
}