xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ *calloc(int, int);
uint64_t *bitmap_alloc(unsigned bits) {
  uint64_t *map = calloc(1, sizeof(uint64_t) * (bits + 63) / 64);
  return map;
}


x86 assembly (clang, -O0):
<bitmap_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x3f,%eax
mov    %eax,%eax
shl    $0x2,%rax
shr    $0x6,%rax
mov    %eax,%esi
mov    $0x1,%edi
call   1030 <calloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitmap_alloc>:
lea    0x3f(%rdi),%esi
shr    $0x4,%esi
mov    $0x1,%edi
jmp    1030 <calloc@plt>

LLVM IR (-O0):
define i32* @bitmap_alloc(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = add i32 %4, 63
%6 = zext i32 %5 to i64
%7 = mul i64 4, %6
%8 = udiv i64 %7, 64
%9 = trunc i64 %8 to i32
%10 = call i32* @calloc(i32 1, i32 %9)
store i32* %10, i32** %3
%11 = load i32*, i32** %3
ret i32* %11
}

LLVM IR (-O2):
define noalias i32* @bitmap_alloc(i32 %0) {
%2 = add i32 %0, 63
%3 = lshr i32 %2, 4
%4 = tail call i32* @calloc(i32 1, i32 %3)
ret i32* %4
}
/* Variables and functions */
int /*<<< orphan*/ roadmap_trip_load(int /*<<< orphan*/ *, int /*<<< orphan*/);
void roadmap_start_open_trip(void) { roadmap_trip_load(NULL, 0); }


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

x86 assembly (clang, -O2):
<roadmap_start_open_trip>:
xor    %edi,%edi
xor    %esi,%esi
jmp    1030 <roadmap_trip_load@plt>

LLVM IR (-O0):
define void @roadmap_start_open_trip() {
%1 = call i32 @roadmap_trip_load(i32* null, i32 0)
ret void
}

LLVM IR (-O2):
define void @roadmap_start_open_trip() {
%1 = tail call i32 @roadmap_trip_load(i32* null, i32 0)
ret void
}
char *Q_strchrnul(const char *s, int c) {
  while (*s && *s != c) {
    s++;
  }
  return (char *)s;
}


x86 assembly (clang, -O0):
<Q_strchrnul>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0xd(%rbp)
je     1130 <Q_strchrnul+0x30>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    -0xc(%rbp),%eax
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1140 <Q_strchrnul+0x40>
jmp    1151 <Q_strchrnul+0x51>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110b <Q_strchrnul+0xb>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Q_strchrnul>:
mov    %rdi,%rax
add    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
movsbl 0x1(%rax),%ecx
add    $0x1,%rax
test   %ecx,%ecx
je     1120 <Q_strchrnul+0x20>
cmp    %esi,%ecx
jne    1110 <Q_strchrnul+0x10>
ret

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

LLVM IR (-O2):
define i8* @Q_strchrnul(i8* %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %10, %3 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = sext i8 %5 to i32
%8 = icmp eq i32 %7, %1
%9 = or i1 %6, %8
%10 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %9, label %11, label %3
11: ; preds = %3
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ foo(int);
int main(void) {
  int i;
  for (i = 0, foo(1); i < 5; i++, foo(3))
    ;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x1,%edi
call   1030 <foo@plt>
cmpl   $0x5,-0x8(%rbp)
jge    1157 <main+0x47>
jmp    113f <main+0x2f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    $0x3,%edi
call   1030 <foo@plt>
jmp    1130 <main+0x20>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 1)
%2 = tail call i32 @foo(i32 3)
%3 = tail call i32 @foo(i32 3)
%4 = tail call i32 @foo(i32 3)
%5 = tail call i32 @foo(i32 3)
%6 = tail call i32 @foo(i32 3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(unsigned long);
int /*<<< orphan*/ printf(char *, int, unsigned long);
__attribute__((__noreturn__)) void exitfunc19(int status, void *arg) {
  printf("Executing exitfunc"
         "19"
         " (status=%d, arg=%lu)\n",
         status, (unsigned long)arg);
  exit((unsigned long)arg);
}


x86 assembly (clang, -O0):
<exitfunc19>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<exitfunc19>:
push   %rbx
mov    %rsi,%rbx
mov    %edi,%esi
lea    0xed3(%rip),%rdi
mov    %rbx,%rdx
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [43 x i8] c"Executing exitfunc19 (status=%d, arg=%lu)\0A\00"
define void @exitfunc19(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = ptrtoint i8* %6 to i64
%8 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i32 %5, i64 %7)
%9 = load i8*, i8** %4
%10 = ptrtoint i8* %9 to i64
%11 = call i32 @exit(i64 %10)
unreachable
}

LLVM IR (-O2):
@.str = [43 x i8] c"Executing exitfunc19 (status=%d, arg=%lu)\0A\00"
define void @exitfunc19(i32 %0, i8* %1) {
%3 = ptrtoint i8* %1 to i64
%4 = tail call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i32 %0, i64 %3)
%5 = tail call i32 @exit(i64 %3)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ spiSendReceive(char);
void sendColor(char col) { spiSendReceive(col); }


x86 assembly (clang, -O0):
<sendColor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <spiSendReceive@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendColor>:
jmp    1030 <spiSendReceive@plt>

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

LLVM IR (-O2):
define void @sendColor(i8 signext %0) {
%2 = tail call i32 @spiSendReceive(i8 signext %0)
ret void
}
void av_video_enc_params_create_side_data() {}


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

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

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

LLVM IR (-O2):
define void @av_video_enc_params_create_side_data() {
ret void
}
/* Variables and functions */
unsigned int f03(unsigned int);
unsigned int f04(unsigned int a) { return f03(f03(a)); }


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

x86 assembly (clang, -O2):
<f04>:
push   %rax
call   1030 <f03@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <f03@plt>

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

LLVM IR (-O2):
define i32 @f04(i32 %0) {
%2 = tail call i32 @f03(i32 %0)
%3 = tail call i32 @f03(i32 %2)
ret i32 %3
}
void RGBAToYRow_SSSE3() {}


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

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

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

LLVM IR (-O2):
define void @RGBAToYRow_SSSE3() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int foo(int **);
int main() {
  int a = 3;
  int *b = &a;
  assert(foo(&b) == 3);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x10(%rbp),%rdi
call   1040 <foo@plt>
cmp    $0x3,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movl   $0x3,0xc(%rsp)
lea    0xc(%rsp),%rax
mov    %rax,0x10(%rsp)
lea    0x10(%rsp),%rdi
call   1040 <foo@plt>
xor    %edi,%edi
cmp    $0x3,%eax
sete   %dil
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
store i32 0, i32* %1
store i32 3, i32* %2
store i32* %2, i32** %3
%4 = call i32 @foo(i32** %3)
%5 = icmp eq i32 %4, 3
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = bitcast i32* %1 to i8*
store i32 3, i32* %1
%4 = bitcast i32** %2 to i8*
store i32* %1, i32** %2
%5 = call i32 @foo(i32** %2)
%6 = icmp eq i32 %5, 3
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
ret i32 0
}
/* Type definitions */
struct chat_bare_entry {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct chat_bare_entry *);
void cbe_free(struct chat_bare_entry *c) {
  if (c == NULL) {
    return;
  }
  free(c);
}


x86 assembly (clang, -O0):
<cbe_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112c <cbe_free+0x1c>
jmp    1135 <cbe_free+0x25>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbe_free>:
test   %rdi,%rdi
je     111a <cbe_free+0xa>
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
%struct.chat_bare_entry = type { i32 }
define void @cbe_free(%struct.chat_bare_entry* %0) {
%2 = icmp eq %struct.chat_bare_entry* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(%struct.chat_bare_entry* %0)
br label %5
5: ; preds = %1, %3
ret void
}
/* Variables and functions */
int objects(int /*<<< orphan*/);
int /*<<< orphan*/ properties(unsigned int const);
unsigned object_closure(const unsigned set) { return objects(properties(set)); }


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

x86 assembly (clang, -O2):
<object_closure>:
push   %rax
call   1040 <properties@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <objects@plt>

LLVM IR (-O0):
define i32 @object_closure(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @properties(i32 %3)
%5 = call i32 @objects(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @object_closure(i32 %0) {
%2 = tail call i32 @properties(i32 %0)
%3 = tail call i32 @objects(i32 %2)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ check_ready();
int /*<<< orphan*/ check_unsat_state();
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void check_trace_support_and_execute(FILE *file, void (*f)(FILE *, int),
                                     int fmt) {
  check_ready();
  check_unsat_state();
  (void)file;
  (void)fmt;
  (void)f;
  do {
    fputs("*** picosat: "
          "compiled without trace support"
          "\n",
          stderr);
    abort();
  } while (0);
}


x86 assembly (clang, -O0):
<check_trace_support_and_execute>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    $0x0,%al
call   1060 <check_ready@plt>
mov    $0x0,%al
call   1050 <check_unsat_state@plt>
mov    0x2e78(%rip),%rax
mov    (%rax),%esi
lea    0xe8f(%rip),%rdi
call   1040 <fputs@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<check_trace_support_and_execute>:
push   %rax
xor    %eax,%eax
call   1060 <check_ready@plt>
xor    %eax,%eax
call   1050 <check_unsat_state@plt>
mov    0x2e8a(%rip),%rax
mov    (%rax),%esi
lea    0xea1(%rip),%rdi
call   1040 <fputs@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [45 x i8] c"*** picosat: compiled without trace support\0A\00"
@stderr = global i32 0
define void @check_trace_support_and_execute(i32* %0, void (i32*, i32)* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca void (i32*, i32)*
%6 = alloca i32
store i32* %0, i32** %4
store void (i32*, i32)* %1, void (i32*, i32)** %5
store i32 %2, i32* %6
%7 = call i32 (...) @check_ready()
%8 = call i32 (...) @check_unsat_state()
%9 = load i32*, i32** %4
%10 = load i32, i32* %6
%11 = load void (i32*, i32)*, void (i32*, i32)** %5
br label %12
12: ; preds = %3
%13 = load i32, i32* @stderr
%14 = call i32 @fputs(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 %13)
%15 = call i32 (...) @abort()
unreachable
16: ; No predecessors!
ret void
}

LLVM IR (-O2):
@.str = [45 x i8] c"*** picosat: compiled without trace support\0A\00"
@stderr = global i32 0
define void @check_trace_support_and_execute(i32* nocapture readnone %0, void (i32*, i32)* nocapture readnone %1, i32 %2) {
%4 = tail call i32 (...) @check_ready()
%5 = tail call i32 (...) @check_unsat_state()
%6 = load i32, i32* @stderr
%7 = tail call i32 @fputs(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = tail call i32 (...) @abort()
unreachable
}
int test_imm_B4uint16_mem(unsigned short *val) {
  return ((*val) & (-0xB4 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_B4uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -180
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ emptyBlock(int);
int /*<<< orphan*/ writeToDisk(int, scalar_t__);
int deleteOSCodeFromDisk() {
  emptyBlock(21);
  int i;
  for (i = 0; i < 1; i++)
    writeToDisk(21, 0 + i);
  return 0;
}


x86 assembly (clang, -O0):
<deleteOSCodeFromDisk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x15,%edi
call   1030 <emptyBlock@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
jge    1164 <deleteOSCodeFromDisk+0x44>
mov    -0x4(%rbp),%eax
add    $0x0,%eax
movslq %eax,%rsi
mov    $0x15,%edi
call   1040 <writeToDisk@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1139 <deleteOSCodeFromDisk+0x19>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deleteOSCodeFromDisk>:
push   %rax
mov    $0x15,%edi
call   1030 <emptyBlock@plt>
mov    $0x15,%edi
xor    %esi,%esi
call   1040 <writeToDisk@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @deleteOSCodeFromDisk() {
%1 = alloca i32
%2 = call i32 @emptyBlock(i32 21)
store i32 0, i32* %1
br label %3
3: ; preds = %11, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 1
br i1 %5, label %6, label %14
6: ; preds = %3
%7 = load i32, i32* %1
%8 = add nsw i32 0, %7
%9 = sext i32 %8 to i64
%10 = call i32 @writeToDisk(i32 21, i64 %9)
br label %11
11: ; preds = %6
%12 = load i32, i32* %1
%13 = add nsw i32 %12, 1
store i32 %13, i32* %1
br label %3
14: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
define i32 @deleteOSCodeFromDisk() {
%1 = tail call i32 @emptyBlock(i32 21)
%2 = tail call i32 @writeToDisk(i32 21, i64 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void func() { printf("a\n"); }


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

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

LLVM IR (-O0):
@.str = [3 x i8] c"a\0A\00"
define void @func() {
%1 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [2 x i8] c"a\00"
define void @func() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int UINT64_C(int);
uint64_t total_ram() {
  uint64_t ram = 0 * 0;
  if (ram == 0) {
    ram = UINT64_C(4) * (1024 * 1024 * 1024);
  }
  return ram;
}


x86 assembly (clang, -O0):
<total_ram>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1139 <total_ram+0x29>
mov    $0x4,%edi
call   1030 <UINT64_C@plt>
shl    $0x1e,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<total_ram>:
push   %rax
mov    $0x4,%edi
call   1030 <UINT64_C@plt>
shl    $0x1e,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @total_ram() {
%1 = tail call i32 @UINT64_C(i32 4)
%2 = shl nsw i32 %1, 30
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ SCOTCH_errorPrint(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stratParserRemain();
int stratParserError(const char *const errstr) {
  SCOTCH_errorPrint("stratParserParse: invalid strategy string, before \"%s\"",
                    stratParserRemain());
  return (1);
}


x86 assembly (clang, -O0):
<stratParserError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <stratParserRemain@plt>
mov    %eax,%esi
lea    0xec4(%rip),%rdi
call   1030 <SCOTCH_errorPrint@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stratParserError>:
push   %rax
xor    %eax,%eax
call   1040 <stratParserRemain@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
call   1030 <SCOTCH_errorPrint@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [55 x i8] c"stratParserParse: invalid strategy string, before \22%s\22\00"
define i32 @stratParserError(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @stratParserRemain()
%4 = call i32 @SCOTCH_errorPrint(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 1
}

LLVM IR (-O2):
@.str = [55 x i8] c"stratParserParse: invalid strategy string, before \22%s\22\00"
define i32 @stratParserError(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @stratParserRemain()
%3 = tail call i32 @SCOTCH_errorPrint(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 1
}
int main(int argc, const char *argv[]) {
  struct my_struct {
    int a;
    double b;
  };
  struct my_struct array[2];
  array[0].a = 1;
  array[0].b = 3.5;
  array[1].a = 2;
  array[1].b = 5.5;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x30(%rbp)
movsd  0xee7(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movl   $0x2,-0x20(%rbp)
movsd  0xecb(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.my_struct = type { i32, double }
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [2 x %struct.my_struct]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = getelementptr inbounds [2 x %struct.my_struct], [2 x %struct.my_struct]* %6, i64 0, i64 0
%8 = getelementptr inbounds %struct.my_struct, %struct.my_struct* %7, i32 0, i32 0
store i32 1, i32* %8
%9 = getelementptr inbounds [2 x %struct.my_struct], [2 x %struct.my_struct]* %6, i64 0, i64 0
%10 = getelementptr inbounds %struct.my_struct, %struct.my_struct* %9, i32 0, i32 1
store double 3.500000e+00, double* %10
%11 = getelementptr inbounds [2 x %struct.my_struct], [2 x %struct.my_struct]* %6, i64 0, i64 1
%12 = getelementptr inbounds %struct.my_struct, %struct.my_struct* %11, i32 0, i32 0
store i32 2, i32* %12
%13 = getelementptr inbounds [2 x %struct.my_struct], [2 x %struct.my_struct]* %6, i64 0, i64 1
%14 = getelementptr inbounds %struct.my_struct, %struct.my_struct* %13, i32 0, i32 1
store double 5.500000e+00, double* %14
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Type definitions */
struct expr {
  int dummy;
};

/* Variables and functions */
scalar_t__ isdigit(char const);
int find_int(const char *remain, struct expr *e) {
  return isdigit(*remain) || (*remain == '-' && isdigit(remain[1]));
}


x86 assembly (clang, -O0):
<find_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x11(%rbp)
jne    1170 <find_int+0x60>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x2d,%ecx
mov    %al,-0x12(%rbp)
jne    116a <find_int+0x5a>
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x12(%rbp)
mov    -0x12(%rbp),%al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_int>:
push   %rbx
mov    %rdi,%rbx
movsbl (%rdi),%edi
call   1030 <isdigit@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     112b <find_int+0x1b>
pop    %rbx
ret
xor    %eax,%eax
cmpb   $0x2d,(%rbx)
jne    1129 <find_int+0x19>
movsbl 0x1(%rbx),%edi
call   1030 <isdigit@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

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

LLVM IR (-O2):
%struct.expr = type { i32 }
define i32 @find_int(i8* nocapture %0, %struct.expr* nocapture readnone %1) {
%3 = load i8, i8* %0
%4 = tail call i64 @isdigit(i8 signext %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %15
6: ; preds = %2
%7 = load i8, i8* %0
%8 = icmp eq i8 %7, 45
br i1 %8, label %9, label %15
9: ; preds = %6
%10 = getelementptr inbounds i8, i8* %0, i64 1
%11 = load i8, i8* %10
%12 = tail call i64 @isdigit(i8 signext %11)
%13 = icmp ne i64 %12, 0
%14 = zext i1 %13 to i32
br label %15
15: ; preds = %6, %9, %2
%16 = phi i32 [ 1, %2 ], [ 0, %6 ], [ %14, %9 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long, int);
int /*<<< orphan*/ produire(int);
int /*<<< orphan*/ usleep(int);
long producteur(long thrdID) {
  while (1) {
    int donnee = (int)thrdID;
    produire(donnee);
    printf("(%ld) + %d\n", thrdID, donnee);
    usleep(1);
  }
  return thrdID;
}


x86 assembly (clang, -O0):
<producteur>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <produire@plt>
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <usleep@plt>
jmp    113c <producteur+0xc>

x86 assembly (clang, -O2):
<producteur>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xec2(%rip),%r14
xchg   %ax,%ax
mov    %ebx,%edi
call   1040 <produire@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %ebx,%edx
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <usleep@plt>
jmp    1140 <producteur+0x10>

LLVM IR (-O0):
@.str = [12 x i8] c"(%ld) + %d\0A\00"
define i64 @producteur(i64 %0) {
%2 = alloca i64
%3 = alloca i32
store i64 %0, i64* %2
br label %4
4: ; preds = %1, %4
%5 = load i64, i64* %2
%6 = trunc i64 %5 to i32
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = call i32 @produire(i32 %7)
%9 = load i64, i64* %2
%10 = load i32, i32* %3
%11 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i64 %9, i32 %10)
%12 = call i32 @usleep(i32 1)
br label %4
}

LLVM IR (-O2):
@.str = [12 x i8] c"(%ld) + %d\0A\00"
define i64 @producteur(i64 %0) {
%2 = trunc i64 %0 to i32
br label %3
3: ; preds = %1, %3
%4 = tail call i32 @produire(i32 %2)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i64 %0, i32 %2)
%6 = tail call i32 @usleep(i32 1)
br label %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ pthread_exit(int /*<<< orphan*/ *);
void *printHello(void *threadid) {
  int tid;
  tid = (int)threadid;
  printf("Hello World! It's me, thread #%d!\n", tid);
  pthread_exit(NULL);
}


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

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

LLVM IR (-O0):
@.str = [35 x i8] c"Hello World! It's me, thread #%d!\0A\00"
define i8* @printHello(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = ptrtoint i8* %5 to i32
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = call i32 @pthread_exit(i32* null)
%10 = load i8*, i8** %2
ret i8* %10
}

LLVM IR (-O2):
@.str = [35 x i8] c"Hello World! It's me, thread #%d!\0A\00"
define noalias i8* @printHello(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
%4 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @pthread_exit(i32* null)
ret i8* undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printVET(double vet[1000], int n) {
  int i;
  for (i = 0; i < n; i++)
    printf("%.3f  \n", vet[i]);
  printf("\n");
}


x86 assembly (clang, -O0):
<printVET>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115b <printVET+0x4b>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xeba(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <printVET+0x16>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printVET>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1159 <printVET+0x39>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xec5(%rip),%r14
nopl   0x0(%rax,%rax,1)
movsd  (%r15,%rbx,8),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <printVET+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"%.3f \0A\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @printVET(double* %0, i32 %1) {
%3 = alloca double*
%4 = alloca i32
%5 = alloca i32
store double* %0, double** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load double*, double** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds double, double* %11, i64 %13
%15 = load double, double* %14
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"%.3f \0A\00"
define void @printVET(double* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds double, double* %0, i64 %7
%9 = load double, double* %8
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usage() {
  const char *cmd = "t01proxysvr";
  fprintf(stderr,
          "Usage: %s [options]\n"
          "\nOptions:\n"
          "\t-d                  Run daemon or not\n"
          "\t-p port             Port number listening for proxy client\n"
          "\t-e engine           I/O engine for storing data\n"
          "\t-o opt              Engine connection options\n"
          "\t                    redis option: 127.0.0.1:6379:myqueue\n"
          "\t                    kafka option: 127.0.0.1:6667;mytopic\n"
          "\t-l log_file         Logger into file or screen\n"
          "\n",
          cmd);
  exit(0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec5(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [12 x i8] c"t01proxysvr\00"
@stderr = global i32 0
@.str.1 = [391 x i8] c"Usage: %s [options]\0A\0AOptions:\0A\09-d Run daemon or not\0A\09-p port Port number listening for proxy client\0A\09-e engine I/O engine for storing data\0A\09-o opt Engine connection options\0A\09 redis option: 127.0.0.1:6379:myqueue\0A\09 kafka option: 127.0.0.1:6667;mytopic\0A\09-l log_file Logger into file or screen\0A\0A\00"
define void @usage() {
%1 = alloca i8*
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i32, i32* @stderr
%3 = load i8*, i8** %1
%4 = call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([391 x i8], [391 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [12 x i8] c"t01proxysvr\00"
@stderr = global i32 0
@.str.1 = [391 x i8] c"Usage: %s [options]\0A\0AOptions:\0A\09-d Run daemon or not\0A\09-p port Port number listening for proxy client\0A\09-e engine I/O engine for storing data\0A\09-o opt Engine connection options\0A\09 redis option: 127.0.0.1:6379:myqueue\0A\09 kafka option: 127.0.0.1:6667;mytopic\0A\09-l log_file Logger into file or screen\0A\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([391 x i8], [391 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
scalar_t__ net_ipv4_address_is_valid(char const *);
scalar_t__ net_ipv6_address_is_valid(char const *);
int net_address_is_valid(const char *address) {
  return net_ipv4_address_is_valid(address) ||
         net_ipv6_address_is_valid(address);
}


x86 assembly (clang, -O0):
<net_address_is_valid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <net_ipv4_address_is_valid@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
jne    115a <net_address_is_valid+0x3a>
mov    -0x8(%rbp),%rdi
call   1030 <net_ipv6_address_is_valid@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<net_address_is_valid>:
push   %rbx
mov    %rdi,%rbx
call   1040 <net_ipv4_address_is_valid@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1138 <net_address_is_valid+0x18>
pop    %rbx
ret
mov    %rbx,%rdi
call   1030 <net_ipv6_address_is_valid@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @net_address_is_valid(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @net_ipv4_address_is_valid(i8* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i64 @net_ipv6_address_is_valid(i8* %7)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @net_address_is_valid(i8* %0) {
%2 = tail call i64 @net_ipv4_address_is_valid(i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @net_ipv6_address_is_valid(i8* %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ japi_drawpolyline(int, int, int *, int *);
void j_drawpolyline(int arg0, int arg1, int *arg2, int *arg3) {
  japi_drawpolyline(arg0, arg1, arg2, arg3);
}


x86 assembly (clang, -O0):
<j_drawpolyline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
call   1030 <japi_drawpolyline@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<j_drawpolyline>:
jmp    1030 <japi_drawpolyline@plt>

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

LLVM IR (-O2):
define void @j_drawpolyline(i32 %0, i32 %1, i32* %2, i32* %3) {
%5 = tail call i32 @japi_drawpolyline(i32 %0, i32 %1, i32* %2, i32* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_36() {
  Assert_real((isqrt(36) == 6),
              "/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",
              185, ("Integer square root of 36 should be 6"));
}


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

x86 assembly (clang, -O2):
<t_sqrt_36>:
push   %rax
mov    $0x24,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0x6,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0xb9,%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 = [38 x i8] c"Integer square root of 36 should be 6\00"
define void @t_sqrt_36() {
%1 = call i32 @isqrt(i32 36)
%2 = icmp eq i32 %1, 6
%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 185, i8* getelementptr inbounds ([38 x i8], [38 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 = [38 x i8] c"Integer square root of 36 should be 6\00"
define void @t_sqrt_36() {
%1 = tail call i32 @isqrt(i32 36)
%2 = icmp eq i32 %1, 6
%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 185, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int test_imm_C7uint16_reg(unsigned short val) {
  return ((val) & (-0xC7 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_C7uint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0xffffff39,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_C7uint16_reg>:
test   $0xff39,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_C7uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -199
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
__attribute__((no, noclone)) int f2(int x, int y) { return x % -y; }


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    %ecx,%ecx
sub    -0x8(%rbp),%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
mov    %edi,%eax
neg    %esi
cltd
idiv   %esi
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @f2(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 = sub nsw i32 0, %6
%8 = srem i32 %5, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @f2(i32 %0, i32 %1) {
%3 = sub nsw i32 0, %1
%4 = srem i32 %0, %3
ret i32 %4
}
int test_imm_93int64_highword_mem(long long *val) {
  return ((*val >> 32) & (0x93 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_93int64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = ashr i64 %4, 32
%6 = and i64 %5, 147
%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_93int64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 631360192512
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
_Bool not_b(_Bool v) { return !v; }


x86 assembly (clang, -O0):
<not_b>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
and    $0x1,%al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<not_b>:
mov    %edi,%eax
xor    $0x1,%al
ret

LLVM IR (-O0):
define zeroext i1 @not_b(i1 zeroext %0) {
%2 = alloca i8
%3 = zext i1 %0 to i8
store i8 %3, i8* %2
%4 = load i8, i8* %2
%5 = trunc i8 %4 to i1
%6 = xor i1 %5, true
ret i1 %6
}

LLVM IR (-O2):
define zeroext i1 @not_b(i1 zeroext %0) {
%2 = xor i1 %0, true
ret i1 %2
}
void generic_precision(void) {}


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

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

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

LLVM IR (-O2):
define void @generic_precision() {
ret void
}
/* Type definitions */
struct sqlConnection {
  int dummy;
};

/* Variables and functions */
char *stringFieldInSubmissionSet(struct sqlConnection *, int, char *);
char *visiGenePubUrl(struct sqlConnection *conn, int id) {
  return stringFieldInSubmissionSet(conn, id, "pubUrl");
}


x86 assembly (clang, -O0):
<visiGenePubUrl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    0xed3(%rip),%rdx
call   1030 <stringFieldInSubmissionSet@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.sqlConnection = type { i32 }
@.str = [7 x i8] c"pubUrl\00"
define i8* @visiGenePubUrl(%struct.sqlConnection* %0, i32 %1) {
%3 = alloca %struct.sqlConnection*
%4 = alloca i32
store %struct.sqlConnection* %0, %struct.sqlConnection** %3
store i32 %1, i32* %4
%5 = load %struct.sqlConnection*, %struct.sqlConnection** %3
%6 = load i32, i32* %4
%7 = call i8* @stringFieldInSubmissionSet(%struct.sqlConnection* %5, i32 %6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i8* %7
}

LLVM IR (-O2):
%struct.sqlConnection = type { i32 }
@.str = [7 x i8] c"pubUrl\00"
define i8* @visiGenePubUrl(%struct.sqlConnection* %0, i32 %1) {
%3 = tail call i8* @stringFieldInSubmissionSet(%struct.sqlConnection* %0, i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
char *itoa(int val, char *dest) {
  sprintf(dest, "%d", val);
  return dest;
}


x86 assembly (clang, -O0):
<itoa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xed3(%rip),%rsi
call   1030 <sprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<itoa>:
push   %rbx
mov    %rsi,%rbx
mov    %edi,%edx
lea    0xee3(%rip),%rsi
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i8* @itoa(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i32, i32* %3
%7 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i8*, i8** %4
ret i8* %8
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i8* @itoa(i32 %0, i8* returned writeonly %1) {
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %1, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i8* %1
}
/* Variables and functions */
int GCI_solve_Gaussian(float **, int, float *);
int GCI_solve(float **a, int n, float *b) {
  return GCI_solve_Gaussian(a, n, b);
}


x86 assembly (clang, -O0):
<GCI_solve>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1030 <GCI_solve_Gaussian@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GCI_solve>:
jmp    1030 <GCI_solve_Gaussian@plt>

LLVM IR (-O0):
define i32 @GCI_solve(float** %0, i32 %1, float* %2) {
%4 = alloca float**
%5 = alloca i32
%6 = alloca float*
store float** %0, float*** %4
store i32 %1, i32* %5
store float* %2, float** %6
%7 = load float**, float*** %4
%8 = load i32, i32* %5
%9 = load float*, float** %6
%10 = call i32 @GCI_solve_Gaussian(float** %7, i32 %8, float* %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @GCI_solve(float** %0, i32 %1, float* %2) {
%4 = tail call i32 @GCI_solve_Gaussian(float** %0, i32 %1, float* %2)
ret i32 %4
}
unsigned int inl_local(unsigned long port) {
  unsigned int value;
  __asm__ __volatile__("in"
                       "l"
                       " %w1, %"
                       ""
                       "0"
                       : "=a"(value)
                       : "Nd"(port));
  return value;
}


x86 assembly (clang, -O0):
<inl_local>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
in     (%dx),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inl_local>:
mov    %rdi,%rdx
in     (%dx),%eax
ret

LLVM IR (-O0):
define i32 @inl_local(i64 %0) {
%2 = alloca i64
%3 = alloca i32
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i32 asm sideeffect "inl ${1:w}, $0", "={ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i64 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @inl_local(i64 %0) {
%2 = tail call i32 asm sideeffect "inl ${1:w}, $0", "={ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i64 %0)
ret i32 %2
}