xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ eprintf(char *, char *);
scalar_t__ malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
char *estrdup(char *s) {
  char *t;
  t = (char *)malloc(strlen(s) + 1);
  if (t == NULL) {
    eprintf("Fatal error!  estrdup(\"%.20s\") failed:", s);
  }
  strcpy(t, s);
  return t;
}


x86 assembly (clang, -O0):
<estrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1180 <estrdup+0x40>
mov    -0x8(%rbp),%rsi
lea    0xe85(%rip),%rdi
call   1060 <eprintf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<estrdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    116c <estrdup+0x2c>
lea    0xe9c(%rip),%rdi
mov    %r14,%rsi
call   1060 <eprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [39 x i8] c"Fatal error! estrdup(\22%.20s\22) failed:\00"
define i8* @estrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i64 @malloc(i64 %6)
%8 = inttoptr i64 %7 to i8*
store i8* %8, i8** %3
%9 = load i8*, i8** %3
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %14
11: ; preds = %1
%12 = load i8*, i8** %2
%13 = call i32 @eprintf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %12)
br label %14
14: ; preds = %11, %1
%15 = load i8*, i8** %3
%16 = load i8*, i8** %2
%17 = call i32 @strcpy(i8* %15, i8* %16)
%18 = load i8*, i8** %3
ret i8* %18
}

LLVM IR (-O2):
@.str = [39 x i8] c"Fatal error! estrdup(\22%.20s\22) failed:\00"
define i8* @estrdup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i64 @malloc(i64 %3)
%5 = inttoptr i64 %4 to i8*
%6 = icmp eq i64 %4, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = tail call i32 @eprintf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %9
9: ; preds = %7, %1
%10 = tail call i32 @strcpy(i8* %5, i8* %0)
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ get_string(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strcar(char *, char *);
int main(void) {
  char string_1[100];
  char string_2[100 + 100];
  get_string(string_1, 100);
  get_string(string_2, 100 + 100);
  strcar(string_1, string_2);
  printf("%s\n", string_1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x140,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
mov    $0x64,%esi
call   1030 <get_string@plt>
lea    -0x140(%rbp),%rdi
mov    $0xc8,%esi
call   1030 <get_string@plt>
lea    -0x70(%rbp),%rdi
lea    -0x140(%rbp),%rsi
call   1050 <strcar@plt>
lea    -0x70(%rbp),%rsi
lea    0xe84(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x140,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x138,%rsp
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x64,%esi
call   1030 <get_string@plt>
lea    0x70(%rsp),%rbx
mov    %rbx,%rdi
mov    $0xc8,%esi
call   1030 <get_string@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <strcar@plt>
lea    0xe92(%rip),%rdi
mov    %r14,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x138,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
%3 = alloca [200 x i8]
store i32 0, i32* %1
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%5 = call i32 @get_string(i8* %4, i32 100)
%6 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%7 = call i32 @get_string(i8* %6, i32 200)
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%9 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%10 = call i32 @strcar(i8* %8, i8* %9)
%11 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = alloca [200 x i8]
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%5 = call i32 @get_string(i8* %3, i32 100)
%6 = call i32 @get_string(i8* %4, i32 200)
%7 = call i32 @strcar(i8* %3, i8* %4)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}
int cli_quit(param)
char *param;
{ return (0); }


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

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

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

LLVM IR (-O2):
define i32 @cli_quit(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ MIDI_RerouteMidiChannel(int, int (*)(int, int, int));
void MUSIC_RerouteMidiChannel(int channel,
                              int (*function)(int event, int c1, int c2)) {
  MIDI_RerouteMidiChannel(channel, function);
}


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

x86 assembly (clang, -O2):
<MUSIC_RerouteMidiChannel>:
jmp    1030 <MIDI_RerouteMidiChannel@plt>

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

LLVM IR (-O2):
define void @MUSIC_RerouteMidiChannel(i32 %0, i32 (i32, i32, i32)* %1) {
%3 = tail call i32 @MIDI_RerouteMidiChannel(i32 %0, i32 (i32, i32, i32)* %1)
ret void
}
/* Type definitions */
struct virtual_item {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ reiserfs_warning(char *);
int errcatch_check_right(struct virtual_item *vi, int free) {
  reiserfs_warning("green-16008: Invalid item type observed, run fsck ASAP\n");
  return -1;
}


x86 assembly (clang, -O0):
<errcatch_check_right>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <reiserfs_warning@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<errcatch_check_right>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <reiserfs_warning@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.virtual_item = type { i32 }
@.str = [56 x i8] c"green-16008: Invalid item type observed, run fsck ASAP\0A\00"
define i32 @errcatch_check_right(%struct.virtual_item* %0, i32 %1) {
%3 = alloca %struct.virtual_item*
%4 = alloca i32
store %struct.virtual_item* %0, %struct.virtual_item** %3
store i32 %1, i32* %4
%5 = call i32 @reiserfs_warning(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
%struct.virtual_item = type { i32 }
@.str = [56 x i8] c"green-16008: Invalid item type observed, run fsck ASAP\0A\00"
define i32 @errcatch_check_right(%struct.virtual_item* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @reiserfs_warning(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}
void AUTHORITY_INFO_ACCESS_free(void) {}


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

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

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

LLVM IR (-O2):
define void @AUTHORITY_INFO_ACCESS_free() {
ret void
}
OP(fd, a2) {
  illegal_1();
  op_a2();
}


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <illegal_1@plt>
mov    $0x0,%al
call   1040 <op_a2@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OP>:
push   %rax
xor    %eax,%eax
call   1030 <illegal_1@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <op_a2@plt>

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_1()
%4 = tail call i32 (...) @op_a2()
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ StubBug(char *);
int sigsuspend(const sigset_t *mask) {
  (void)mask;
  StubBug("STUB:"
          "sigsuspend");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [16 x i8] c"STUB:sigsuspend\00"
define i32 @sigsuspend(i32* nocapture readnone %0) {
%2 = tail call i32 @StubBug(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int main() {
  int i, sum = 0, sumk = 0;
  for (i = 1; i <= 20; i++) {
    sumk = i * i;
    sum = i * i * i;
    printf(" %d %d %d \n", i, sumk, sum);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x14,-0x8(%rbp)
jg     1179 <main+0x69>
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1134 <main+0x24>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x1,%ebx
lea    0xee0(%rip),%r14
mov    %ebx,%edx
imul   %ebx,%edx
mov    %edx,%ecx
imul   %ebx,%ecx
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x15,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c" %d %d %d \0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 1, %0 ], [ %6, %1 ]
%3 = mul nuw nsw i32 %2, %2
%4 = mul nuw nsw i32 %3, %2
%5 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %3, i32 %4)
%6 = add nuw nsw i32 %2, 1
%7 = icmp eq i32 %6, 21
br i1 %7, label %8, label %1
8: ; preds = %1
ret i32 0
}
/* Variables and functions */
int printf(char *, int, int, int);
int test(int, double, ...);
int main(void) {
  return printf("%d, %d, %d\n", test(1, 4.0), test(3, 4567.0f, 124.6f, 5368.5f),
                test(4, 123.5, 2356.4, 5678.6, 2769.1));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
movsd  0xefc(%rip),%xmm0
mov    $0x1,%al
call   1040 <test@plt>
mov    %eax,-0xc(%rbp)
mov    $0x3,%edi
movsd  0xecd(%rip),%xmm0
movsd  0xecd(%rip),%xmm1
movsd  0xecd(%rip),%xmm2
mov    $0x3,%al
call   1040 <test@plt>
mov    %eax,-0x8(%rbp)
mov    $0x4,%edi
movsd  0xe86(%rip),%xmm0
movsd  0xe86(%rip),%xmm1
movsd  0xe86(%rip),%xmm2
movsd  0xe86(%rip),%xmm3
mov    $0x4,%al
call   1040 <test@plt>
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    %eax,%ecx
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
movsd  0xed5(%rip),%xmm0
mov    $0x1,%edi
mov    $0x1,%al
call   1040 <test@plt>
mov    %eax,%ebx
movsd  0xec7(%rip),%xmm0
movsd  0xec7(%rip),%xmm1
movsd  0xec7(%rip),%xmm2
mov    $0x3,%edi
mov    $0x3,%al
call   1040 <test@plt>
mov    %eax,%ebp
movsd  0xeb9(%rip),%xmm0
movsd  0xeb9(%rip),%xmm1
movsd  0xeb9(%rip),%xmm2
movsd  0xeb9(%rip),%xmm3
mov    $0x4,%edi
mov    $0x4,%al
call   1040 <test@plt>
lea    0xeae(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %eax,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"%d, %d, %d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i32, double, ...) @test(i32 1, double 4.000000e+00)
%3 = call i32 (i32, double, ...) @test(i32 3, double 4.567000e+03, double 0x405F266660000000, double 5.368500e+03)
%4 = call i32 (i32, double, ...) @test(i32 4, double 1.235000e+02, double 2.356400e+03, double 5.678600e+03, double 2.769100e+03)
%5 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
@.str = [12 x i8] c"%d, %d, %d\0A\00"
define i32 @main() {
%1 = tail call i32 (i32, double, ...) @test(i32 1, double 4.000000e+00)
%2 = tail call i32 (i32, double, ...) @test(i32 3, double 4.567000e+03, double 0x405F266660000000, double 5.368500e+03)
%3 = tail call i32 (i32, double, ...) @test(i32 4, double 1.235000e+02, double 2.356400e+03, double 5.678600e+03, double 2.769100e+03)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2, i32 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void print_usage(char *str) {
  printf("Program usage:\n    %s <message>\n", str);
}


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

x86 assembly (clang, -O2):
<print_usage>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"Program usage:\0A %s <message>\0A\00"
define void @print_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"Program usage:\0A %s <message>\0A\00"
define void @print_usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
scalar_t__ coco_allocate_memory(size_t const);
double *coco_allocate_vector(const size_t number_of_elements) {
  const size_t block_size = number_of_elements * sizeof(double);
  return (double *)coco_allocate_memory(block_size);
}


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

x86 assembly (clang, -O2):
<coco_allocate_vector>:
shl    $0x3,%rdi
jmp    1030 <coco_allocate_memory@plt>

LLVM IR (-O0):
define double* @coco_allocate_vector(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = mul i64 %4, 8
store i64 %5, i64* %3
%6 = load i64, i64* %3
%7 = call i64 @coco_allocate_memory(i64 %6)
%8 = inttoptr i64 %7 to double*
ret double* %8
}

LLVM IR (-O2):
define double* @coco_allocate_vector(i64 %0) {
%2 = shl i64 %0, 3
%3 = tail call i64 @coco_allocate_memory(i64 %2)
%4 = inttoptr i64 %3 to double*
ret double* %4
}
/* Variables and functions */
int strlen(char const *);
int sizeOfXML(void *msg) { return strlen((const char *)msg); }


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

x86 assembly (clang, -O2):
<sizeOfXML>:
jmp    1030 <strlen@plt>

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

LLVM IR (-O2):
define i32 @sizeOfXML(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
ret i32 %2
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
void convert_spec_16_bit_to_byte_array(uint16_t value, uint8_t *data) {
  data[0] = value & 0xFF;
  data[1] = (value >> 8) & 0xFF;
}


x86 assembly (clang, -O0):
<convert_spec_16_bit_to_byte_array>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
and    $0xff,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert_spec_16_bit_to_byte_array>:
mov    %edi,%eax
movzbl %al,%ecx
mov    %ecx,(%rsi)
movzbl %ah,%eax
mov    %eax,0x4(%rsi)
ret

LLVM IR (-O0):
define void @convert_spec_16_bit_to_byte_array(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 = and i32 %5, 255
%7 = load i32*, i32** %4
%8 = getelementptr inbounds i32, i32* %7, i64 0
store i32 %6, i32* %8
%9 = load i32, i32* %3
%10 = ashr i32 %9, 8
%11 = and i32 %10, 255
%12 = load i32*, i32** %4
%13 = getelementptr inbounds i32, i32* %12, i64 1
store i32 %11, i32* %13
ret void
}

LLVM IR (-O2):
define void @convert_spec_16_bit_to_byte_array(i32 %0, i32* nocapture writeonly %1) {
%3 = and i32 %0, 255
store i32 %3, i32* %1
%4 = lshr i32 %0, 8
%5 = and i32 %4, 255
%6 = getelementptr inbounds i32, i32* %1, i64 1
store i32 %5, i32* %6
ret void
}
/* Variables and functions */
double pow(double, int);
double hypot(double x, double y) { return pow(x, 2) + pow(y, 2); }


x86 assembly (clang, -O0):
<hypot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hypot>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
mov    $0x2,%edi
call   1030 <pow@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
addsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define double @hypot(double %0, double %1) {
%3 = tail call double @pow(double %0, i32 2)
%4 = tail call double @pow(double %1, i32 2)
%5 = fadd double %3, %4
ret double %5
}
int bit_test(int offset, unsigned int *addr) {
  return ((*(addr + offset / 32)) & (1U << (offset % 32))) ? 1 : 0;
}


x86 assembly (clang, -O0):
<bit_test>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x20,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x20,%ecx
cltd
idiv   %ecx
mov    %edx,%ecx
mov    -0x14(%rbp),%edx
mov    $0x1,%eax
shl    %cl,%eax
and    %eax,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit_test>:
mov    %edi,%ecx
lea    0x1f(%rcx),%eax
test   %edi,%edi
cmovns %edi,%eax
sar    $0x5,%eax
cltq
mov    (%rsi,%rax,4),%eax
shr    %cl,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @bit_test(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
store i32* %1, i32** %4
%5 = load i32*, i32** %4
%6 = load i32, i32* %3
%7 = sdiv i32 %6, 32
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i32, i32* %5, i64 %8
%10 = load i32, i32* %9
%11 = load i32, i32* %3
%12 = srem i32 %11, 32
%13 = shl i32 1, %12
%14 = and i32 %10, %13
%15 = icmp ne i32 %14, 0
%16 = zext i1 %15 to i64
%17 = select i1 %15, i32 1, i32 0
ret i32 %17
}

LLVM IR (-O2):
define i32 @bit_test(i32 %0, i32* nocapture %1) {
%3 = sdiv i32 %0, 32
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i32, i32* %1, i64 %4
%6 = load i32, i32* %5
%7 = and i32 %0, 31
%8 = lshr i32 %6, %7
%9 = and i32 %8, 1
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void unexpected_hd_intr() { printf("Unexpected HD interrupt\n\r"); }


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

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

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

LLVM IR (-O2):
@.str = [26 x i8] c"Unexpected HD interrupt\0A\0D\00"
define void @unexpected_hd_intr() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}
int test_imm_CBuint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0xCB << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_CBuint64_highword_reg>:
movabs $0xcb00000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_CBuint64_highword_reg(i64 %0) {
%2 = and i64 %0, 871878361088
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int to_int(char x) { return x == ' ' ? 26 : x == '\'' ? 27 : x - 'A'; }


x86 assembly (clang, -O0):
<to_int>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x20,%eax
jne    1124 <to_int+0x24>
mov    $0x1a,%eax
mov    %eax,-0x8(%rbp)
jmp    114e <to_int+0x4e>
movsbl -0x1(%rbp),%eax
cmp    $0x27,%eax
jne    113e <to_int+0x3e>
mov    $0x1b,%eax
mov    %eax,-0xc(%rbp)
jmp    1148 <to_int+0x48>
movsbl -0x1(%rbp),%eax
sub    $0x41,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_int>:
lea    -0x41(%rdi),%eax
cmp    $0x27,%dil
mov    $0x1b,%ecx
cmovne %eax,%ecx
cmp    $0x20,%dil
mov    $0x1a,%eax
cmovne %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @to_int(i8 signext %0) {
%2 = icmp eq i8 %0, 32
%3 = sext i8 %0 to i32
%4 = icmp eq i8 %0, 39
%5 = add nsw i32 %3, -65
%6 = select i1 %4, i32 27, i32 %5
%7 = select i1 %2, i32 26, i32 %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ log_f(char *, unsigned int);
unsigned char target_readb(unsigned addr) {
  log_f("ERROR:linux: read at address 0x%x not allowed in this architecture\n",
        addr);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [68 x i8] c"ERROR:linux: read at address 0x%x not allowed in this architecture\0A\00"
define zeroext i8 @target_readb(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @log_f(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i8 0
}

LLVM IR (-O2):
@.str = [68 x i8] c"ERROR:linux: read at address 0x%x not allowed in this architecture\0A\00"
define zeroext i8 @target_readb(i32 %0) {
%2 = tail call i32 @log_f(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i8 0
}
void rop3_186_0_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = ~S;
  stk2 = T & stk3;
  stk1 = *D | stk2;
  *D = (stk1 & S) | (stk1 & (~T)) | (T & (~S) & *D);
}


x86 assembly (clang, -O0):
<rop3_186_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0x9(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xd(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xd(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xc(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
movzbl -0xb(%rbp),%ecx
movzbl -0xa(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
movzbl -0xa(%rbp),%ecx
movzbl -0x9(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
mov    -0x8(%rbp),%rdx
movzbl (%rdx),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_186_0_1>:
mov    %esi,%eax
not    %eax
movzbl (%rdi),%r8d
and    %edx,%eax
mov    %r8d,%ecx
or     %eax,%ecx
and    %ecx,%esi
not    %edx
and    %ecx,%edx
and    %r8d,%eax
or     %esi,%eax
or     %edx,%eax
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_186_0_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8, i8* %5
%11 = zext i8 %10 to i32
%12 = xor i32 %11, -1
%13 = trunc i32 %12 to i8
store i8 %13, i8* %9
%14 = load i8, i8* %6
%15 = zext i8 %14 to i32
%16 = load i8, i8* %9
%17 = zext i8 %16 to i32
%18 = and i32 %15, %17
%19 = trunc i32 %18 to i8
store i8 %19, i8* %8
%20 = load i8*, i8** %4
%21 = load i8, i8* %20
%22 = zext i8 %21 to i32
%23 = load i8, i8* %8
%24 = zext i8 %23 to i32
%25 = or i32 %22, %24
%26 = trunc i32 %25 to i8
store i8 %26, i8* %7
%27 = load i8, i8* %7
%28 = zext i8 %27 to i32
%29 = load i8, i8* %5
%30 = zext i8 %29 to i32
%31 = and i32 %28, %30
%32 = load i8, i8* %7
%33 = zext i8 %32 to i32
%34 = load i8, i8* %6
%35 = zext i8 %34 to i32
%36 = xor i32 %35, -1
%37 = and i32 %33, %36
%38 = or i32 %31, %37
%39 = load i8, i8* %6
%40 = zext i8 %39 to i32
%41 = load i8, i8* %5
%42 = zext i8 %41 to i32
%43 = xor i32 %42, -1
%44 = and i32 %40, %43
%45 = load i8*, i8** %4
%46 = load i8, i8* %45
%47 = zext i8 %46 to i32
%48 = and i32 %44, %47
%49 = or i32 %38, %48
%50 = trunc i32 %49 to i8
%51 = load i8*, i8** %4
store i8 %50, i8* %51
ret void
}

LLVM IR (-O2):
define void @rop3_186_0_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = zext i8 %1 to i32
%5 = xor i32 %4, -1
%6 = zext i8 %2 to i32
%7 = trunc i32 %5 to i8
%8 = and i8 %7, %2
%9 = load i8, i8* %0
%10 = zext i8 %9 to i32
%11 = or i8 %9, %8
%12 = zext i8 %11 to i32
%13 = and i8 %11, %1
%14 = zext i8 %13 to i32
%15 = xor i32 %6, -1
%16 = and i32 %12, %15
%17 = and i32 %6, %5
%18 = and i32 %17, %10
%19 = or i32 %18, %14
%20 = or i32 %19, %16
%21 = trunc i32 %20 to i8
store i8 %21, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ svz_interface_check();
int /*<<< orphan*/ svz_server_reset();
int svz_reset(void) {
  svz_server_reset();
  svz_interface_check();
  return 0;
}


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

x86 assembly (clang, -O2):
<svz_reset>:
push   %rax
xor    %eax,%eax
call   1030 <svz_server_reset@plt>
xor    %eax,%eax
call   1040 <svz_interface_check@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @svz_reset() {
%1 = call i32 (...) @svz_server_reset()
%2 = call i32 (...) @svz_interface_check()
ret i32 0
}

LLVM IR (-O2):
define i32 @svz_reset() {
%1 = tail call i32 (...) @svz_server_reset()
%2 = tail call i32 (...) @svz_interface_check()
ret i32 0
}
/* Variables and functions */
scalar_t__ islower(int);
scalar_t__ isupper(int);
int isalpha(int c) { return (isupper(c) || islower(c)) ? 1 : 0; }


x86 assembly (clang, -O0):
<isalpha>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <isupper@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    1157 <isalpha+0x37>
mov    -0x4(%rbp),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isalpha>:
push   %rbx
mov    %edi,%ebx
call   1040 <isupper@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <isalpha+0x17>
pop    %rbx
ret
mov    %ebx,%edi
call   1030 <islower@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @isalpha(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @isupper(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i64 @islower(i32 %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 i64
%13 = select i1 %11, i32 1, i32 0
ret i32 %13
}

LLVM IR (-O2):
define i32 @isalpha(i32 %0) {
%2 = tail call i64 @isupper(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @islower(i32 %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
}
/* Type definitions */
typedef int /*<<< orphan*/ sem_t;

/* Variables and functions */
scalar_t__ sem_wait(int /*<<< orphan*/ *);
int /*<<< orphan*/ unix_error(char *);
void P(sem_t *sem) {
  if (sem_wait(sem) < 0)
    unix_error("P error");
}


x86 assembly (clang, -O0):
<P>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <sem_wait@plt>
cmp    $0x0,%rax
jge    114b <P+0x2b>
lea    0xeba(%rip),%rdi
call   1040 <unix_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<P>:
push   %rax
call   1030 <sem_wait@plt>
test   %rax,%rax
js     112d <P+0xd>
pop    %rax
ret
lea    0xecc(%rip),%rdi
pop    %rax
jmp    1040 <unix_error@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"P error\00"
define void @P(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i64 @sem_wait(i32* %3)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @unix_error(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"P error\00"
define void @P(i32* %0) {
%2 = tail call i64 @sem_wait(i32* %0)
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @unix_error(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret void
}
void foo532(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo532(i32 %0) {
ret void
}
void gtk_window_unstick() {}


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

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

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

LLVM IR (-O2):
define void @gtk_window_unstick() {
ret void
}
/* Variables and functions */
long toupper(int a, int b) { return (long)(a + b); }


x86 assembly (clang, -O0):
<toupper>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<toupper>:
add    %esi,%edi
movslq %edi,%rax
ret

LLVM IR (-O0):
define i64 @toupper(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 = add nsw i32 %5, %6
%8 = sext i32 %7 to i64
ret i64 %8
}

LLVM IR (-O2):
define i64 @toupper(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
%4 = sext i32 %3 to i64
ret i64 %4
}
signed long long
signedlonglong_ignoring_unsignedlonglongint(signed long long x,
                                            unsigned long long int y) {
  return x;
}


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

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

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

LLVM IR (-O2):
define i64 @signedlonglong_ignoring_unsignedlonglongint(i64 returned %0, i64 %1) {
ret i64 %0
}
unsigned int __current_sp(void) {
  register unsigned sp asm("sp");
  return sp;
}


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

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

LLVM IR (-O0):
define i32 @__current_sp() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @__current_sp() {
ret i32 undef
}
/* Variables and functions */
scalar_t__ medmeddev_double(int, double *);
double MAD_double(int n, double *data) {
  return (double)(1.483 * ((double)medmeddev_double(n, data)));
}


x86 assembly (clang, -O0):
<MAD_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <medmeddev_double@plt>
cvtsi2sd %rax,%xmm1
movsd  0xec8(%rip),%xmm0
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MAD_double>:
push   %rax
call   1030 <medmeddev_double@plt>
cvtsi2sd %rax,%xmm0
mulsd  0xedd(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @MAD_double(i32 %0, double* %1) {
%3 = alloca i32
%4 = alloca double*
store i32 %0, i32* %3
store double* %1, double** %4
%5 = load i32, i32* %3
%6 = load double*, double** %4
%7 = call i64 @medmeddev_double(i32 %5, double* %6)
%8 = sitofp i64 %7 to double
%9 = fmul double 1.483000e+00, %8
ret double %9
}

LLVM IR (-O2):
define double @MAD_double(i32 %0, double* %1) {
%3 = tail call i64 @medmeddev_double(i32 %0, double* %1)
%4 = sitofp i64 %3 to double
%5 = fmul double %4, 1.483000e+00
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ IntEnable(int);
int /*<<< orphan*/ IntRegister(int, void (*)());
void CameraIntRegister(unsigned long ulBase, void (*pfnHandler)(void)) {
  IntRegister(179, pfnHandler);
  IntEnable(179);
}


x86 assembly (clang, -O0):
<CameraIntRegister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
mov    $0xb3,%edi
call   1040 <IntRegister@plt>
mov    $0xb3,%edi
call   1030 <IntEnable@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CameraIntRegister>:
push   %rax
mov    $0xb3,%edi
call   1040 <IntRegister@plt>
mov    $0xb3,%edi
pop    %rax
jmp    1030 <IntEnable@plt>

LLVM IR (-O0):
define void @CameraIntRegister(i64 %0, void ()* %1) {
%3 = alloca i64
%4 = alloca void ()*
store i64 %0, i64* %3
store void ()* %1, void ()** %4
%5 = load void ()*, void ()** %4
%6 = bitcast void ()* %5 to void (...)*
%7 = call i32 @IntRegister(i32 179, void (...)* %6)
%8 = call i32 @IntEnable(i32 179)
ret void
}

LLVM IR (-O2):
define void @CameraIntRegister(i64 %0, void ()* %1) {
%3 = bitcast void ()* %1 to void (...)*
%4 = tail call i32 @IntRegister(i32 179, void (...)* %3)
%5 = tail call i32 @IntEnable(i32 179)
ret void
}
/* Variables and functions */
int cbuf(int, int, int);
cbuf11(int f, int n) { return (cbuf(f, n, 11)); }


x86 assembly (clang, -O0):
<cbuf11>:
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    $0xb,%edx
call   1030 <cbuf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbuf11>:
mov    $0xb,%edx
jmp    1030 <cbuf@plt>

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

LLVM IR (-O2):
define i32 @cbuf11(i32 %0, i32 %1) {
%3 = tail call i32 @cbuf(i32 %0, i32 %1, i32 11)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ strncat(char *, char const *, size_t);
void strlcat(char *dest, const char *src, size_t size) {
  strncat(dest, src, size);
  dest[size - 1] = 0;
}


x86 assembly (clang, -O0):
<strlcat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <strncat@plt>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    $0x1,%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlcat>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
call   1030 <strncat@plt>
movb   $0x0,-0x1(%r14,%rbx,1)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @strlcat(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i32 @strncat(i8* %7, i8* %8, i64 %9)
%11 = load i8*, i8** %4
%12 = load i64, i64* %6
%13 = sub i64 %12, 1
%14 = getelementptr inbounds i8, i8* %11, i64 %13
store i8 0, i8* %14
ret void
}

LLVM IR (-O2):
define void @strlcat(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @strncat(i8* %0, i8* %1, i64 %2)
%5 = add i64 %2, -1
%6 = getelementptr inbounds i8, i8* %0, i64 %5
store i8 0, i8* %6
ret void
}
int cw1200_debug_init(struct cw1200_common *priv) { return 0; }


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.cw1200_common = type opaque
define i32 @cw1200_debug_init(%struct.cw1200_common* %0) {
%2 = alloca %struct.cw1200_common*
store %struct.cw1200_common* %0, %struct.cw1200_common** %2
ret i32 0
}

LLVM IR (-O2):
%struct.cw1200_common = type opaque
define i32 @cw1200_debug_init(%struct.cw1200_common* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ arm_arith_add(int /*<<< orphan*/, int);
int /*<<< orphan*/ arm_data_regr_op();
void arm_adc_regr() { arm_arith_add(arm_data_regr_op(), 1); }


x86 assembly (clang, -O0):
<arm_adc_regr>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <arm_data_regr_op@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1040 <arm_arith_add@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<arm_adc_regr>:
push   %rax
xor    %eax,%eax
call   1030 <arm_data_regr_op@plt>
mov    %eax,%edi
mov    $0x1,%esi
pop    %rax
jmp    1040 <arm_arith_add@plt>

LLVM IR (-O0):
define void @arm_adc_regr() {
%1 = call i32 (...) @arm_data_regr_op()
%2 = call i32 @arm_arith_add(i32 %1, i32 1)
ret void
}

LLVM IR (-O2):
define void @arm_adc_regr() {
%1 = tail call i32 (...) @arm_data_regr_op()
%2 = tail call i32 @arm_arith_add(i32 %1, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fill_outgoing_packet_header(unsigned char *, int, int);
int /*<<< orphan*/ memset(unsigned char *, int /*<<< orphan*/, int);
int fill_mac_lowlevel_req(unsigned char *buf) {
  fill_outgoing_packet_header(buf, 0x50, 0x14);
  buf += 4;
  memset(buf, 0, 0x14);
  buf[0x0c] = 0x15;
  buf[0x0d] = 0x0a;
  return 4 + 0x14;
}


x86 assembly (clang, -O0):
<fill_mac_lowlevel_req>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x50,%esi
mov    $0x14,%edx
call   1040 <fill_outgoing_packet_header@plt>
mov    -0x8(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x14,%edx
call   1030 <memset@plt>
mov    -0x8(%rbp),%rax
movb   $0x15,0xc(%rax)
mov    -0x8(%rbp),%rax
movb   $0xa,0xd(%rax)
mov    $0x18,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fill_mac_lowlevel_req>:
push   %rbx
mov    %rdi,%rbx
mov    $0x50,%esi
mov    $0x14,%edx
call   1040 <fill_outgoing_packet_header@plt>
lea    0x4(%rbx),%rdi
xor    %esi,%esi
mov    $0x14,%edx
call   1030 <memset@plt>
movw   $0xa15,0x10(%rbx)
mov    $0x18,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @fill_mac_lowlevel_req(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @fill_outgoing_packet_header(i8* %3, i32 80, i32 20)
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i64 4
store i8* %6, i8** %2
%7 = load i8*, i8** %2
%8 = call i32 @memset(i8* %7, i32 0, i32 20)
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 12
store i8 21, i8* %10
%11 = load i8*, i8** %2
%12 = getelementptr inbounds i8, i8* %11, i64 13
store i8 10, i8* %12
ret i32 24
}

LLVM IR (-O2):
define i32 @fill_mac_lowlevel_req(i8* %0) {
%2 = tail call i32 @fill_outgoing_packet_header(i8* %0, i32 80, i32 20)
%3 = getelementptr inbounds i8, i8* %0, i64 4
%4 = tail call i32 @memset(i8* %3, i32 0, i32 20)
%5 = getelementptr inbounds i8, i8* %0, i64 16
store i8 21, i8* %5
%6 = getelementptr inbounds i8, i8* %0, i64 17
store i8 10, i8* %6
ret i32 24
}
/* Variables and functions */
int /*<<< orphan*/ do_statfs(char *);
int main(int argc, char *argv[]) {
  int i;
  for (i = 1; i < argc; i++)
    do_statfs(argv[i]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1158 <main+0x48>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <do_statfs@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
cmp    $0x2,%edi
jl     1142 <main+0x32>
mov    %rsi,%r14
mov    %edi,%r15d
mov    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r14,%rbx,8),%rdi
call   1030 <do_statfs@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 1, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = load i8*, i8** %8
%10 = tail call i32 @do_statfs(i8* %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
ret i32 0
}
void foo_2_1_2_2_2_1_2_1_1() {}


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

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

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

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