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

/* Variables and functions */
struct Node *delete (struct Node *ToDelete) {
  return NULL;
}


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

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

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

LLVM IR (-O2):
%struct.Node = type { i32 }
define noalias %struct.Node* @delete(%struct.Node* nocapture readnone %0) {
ret %struct.Node* null
}
void set_number(char *bit_vector, unsigned int number) {
  bit_vector[number / 8] = bit_vector[number / 8] | (1 << (number % 8));
}


x86 assembly (clang, -O0):
<set_number>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
shr    $0x3,%ecx
mov    %ecx,%ecx
movsbl (%rax,%rcx,1),%eax
mov    -0xc(%rbp),%ecx
and    $0x7,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    %al,%dl
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
shr    $0x3,%ecx
mov    %ecx,%ecx
mov    %dl,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_number>:
mov    %esi,%ecx
mov    %esi,%eax
and    $0x7,%cl
mov    $0x1,%edx
shl    %cl,%edx
shr    $0x3,%rax
or     %dl,(%rdi,%rax,1)
ret

LLVM IR (-O0):
define void @set_number(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = udiv i32 %6, 8
%8 = zext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %5, i64 %8
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = load i32, i32* %4
%13 = urem i32 %12, 8
%14 = shl i32 1, %13
%15 = or i32 %11, %14
%16 = trunc i32 %15 to i8
%17 = load i8*, i8** %3
%18 = load i32, i32* %4
%19 = udiv i32 %18, 8
%20 = zext i32 %19 to i64
%21 = getelementptr inbounds i8, i8* %17, i64 %20
store i8 %16, i8* %21
ret void
}

LLVM IR (-O2):
define void @set_number(i8* nocapture %0, i32 %1) {
%3 = lshr i32 %1, 3
%4 = zext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = and i32 %1, 7
%8 = shl nuw nsw i32 1, %7
%9 = trunc i32 %8 to i8
%10 = or i8 %6, %9
store i8 %10, i8* %5
ret void
}
int _my_wcslen(signed short *str) {
  int len = 0;
  while (*str++ != 0)
    len++;
  return len;
}


x86 assembly (clang, -O0):
<_my_wcslen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x2,%rcx
mov    %rcx,-0x8(%rbp)
movswl (%rax),%eax
cmp    $0x0,%eax
je     1138 <_my_wcslen+0x38>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <_my_wcslen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_my_wcslen>:
cmpw   $0x0,(%rdi)
je     111d <_my_wcslen+0x1d>
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
cmpw   $0x0,0x2(%rdi,%rax,2)
lea    0x1(%rax),%rax
jne    1110 <_my_wcslen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @_my_wcslen(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = icmp eq i16 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 0, %1 ]
%6 = phi i16* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i16, i16* %6, i64 1
%8 = add nuw nsw i32 %5, 1
%9 = load i16, i16* %7
%10 = icmp eq i16 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %12
}
__attribute__((visibility("hidden"))) int size_of_wait_event(void) { return 0; }


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

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

LLVM IR (-O0):
define hidden i32 @size_of_wait_event() {
ret i32 0
}

LLVM IR (-O2):
define hidden i32 @size_of_wait_event() {
ret i32 0
}
void mfld_hsu_port1_switch(int on) {}


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

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

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

LLVM IR (-O2):
define void @mfld_hsu_port1_switch(i32 %0) {
ret void
}
/* Variables and functions */
char *getcwd(int /*<<< orphan*/ *, int /*<<< orphan*/);
char *get_caminho_atual() {
  char *str = getcwd(NULL, 0);
  return str;
}


x86 assembly (clang, -O0):
<get_caminho_atual>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
mov    %eax,%edi
xor    %esi,%esi
call   1030 <getcwd@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @get_caminho_atual() {
%1 = alloca i8*
%2 = call i8* @getcwd(i32* null, i32 0)
store i8* %2, i8** %1
%3 = load i8*, i8** %1
ret i8* %3
}

LLVM IR (-O2):
define i8* @get_caminho_atual() {
%1 = tail call i8* @getcwd(i32* null, i32 0)
ret i8* %1
}
/* Variables and functions */
int compute_factorial(char);
int main(int argc, char **argv) {
  if (argc < 2)
    return -1;
  char firstletter = argv[1][0];
  int result = compute_factorial(firstletter - '0');
  return result;
}


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)
cmpl   $0x2,-0x8(%rbp)
jge    113c <main+0x2c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1161 <main+0x51>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
movsbl -0x11(%rbp),%eax
sub    $0x30,%eax
movsbl %al,%edi
call   1030 <compute_factorial@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
cmp    $0x2,%edi
jge    111b <main+0xb>
mov    $0xffffffff,%eax
ret
mov    0x8(%rsi),%rax
mov    (%rax),%al
add    $0xd0,%al
movsbl %al,%edi
jmp    1030 <compute_factorial@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = load i8, i8* %6
%8 = add i8 %7, -48
%9 = tail call i32 @compute_factorial(i8 signext %8)
br label %10
10: ; preds = %2, %4
%11 = phi i32 [ %9, %4 ], [ -1, %2 ]
ret i32 %11
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int _write(int32_t file, uint8_t *ptr, int32_t len) { return -1; }


x86 assembly (clang, -O0):
<_write>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @_write(i32 %0, i32* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32
store i32 %0, i32* %4
store i32* %1, i32** %5
store i32 %2, i32* %6
ret i32 -1
}

LLVM IR (-O2):
define i32 @_write(i32 %0, i32* nocapture readnone %1, i32 %2) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int ilt(int x, int y, int ok) {
  if ((x < y) && (x != y)) {
    if (!ok)
      abort();
  } else if (ok)
    abort();
}


x86 assembly (clang, -O0):
<ilt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    114f <ilt+0x3f>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     114f <ilt+0x3f>
cmpl   $0x0,-0x10(%rbp)
jne    114a <ilt+0x3a>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    1165 <ilt+0x55>
cmpl   $0x0,-0x10(%rbp)
je     1160 <ilt+0x50>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    1165 <ilt+0x55>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ilt>:
push   %rax
cmp    %esi,%edi
jge    1120 <ilt+0x10>
test   %edx,%edx
jne    1124 <ilt+0x14>
xor    %eax,%eax
call   1030 <abort@plt>
test   %edx,%edx
jne    1119 <ilt+0x9>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @ilt(i32 %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %0, %1
%5 = icmp eq i32 %2, 0
br i1 %4, label %6, label %9
6: ; preds = %3
br i1 %5, label %7, label %12
7: ; preds = %6
%8 = tail call i32 (...) @abort()
unreachable
9: ; preds = %3
br i1 %5, label %12, label %10
10: ; preds = %9
%11 = tail call i32 (...) @abort()
unreachable
12: ; preds = %9, %6
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ close_device();
int /*<<< orphan*/ stop_capturing();
int /*<<< orphan*/ uninit_device();
void capture_close() {
  stop_capturing();
  uninit_device();
  close_device();
}


x86 assembly (clang, -O0):
<capture_close>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <stop_capturing@plt>
mov    $0x0,%al
call   1040 <uninit_device@plt>
mov    $0x0,%al
call   1050 <close_device@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<capture_close>:
push   %rax
xor    %eax,%eax
call   1030 <stop_capturing@plt>
xor    %eax,%eax
call   1040 <uninit_device@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <close_device@plt>

LLVM IR (-O0):
define void @capture_close() {
%1 = call i32 (...) @stop_capturing()
%2 = call i32 (...) @uninit_device()
%3 = call i32 (...) @close_device()
ret void
}

LLVM IR (-O2):
define void @capture_close() {
%1 = tail call i32 (...) @stop_capturing()
%2 = tail call i32 (...) @uninit_device()
%3 = tail call i32 (...) @close_device()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pmm_free(void *);
void free(void *data) { pmm_free(data); }


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

x86 assembly (clang, -O2):
<free>:
jmp    1030 <pmm_free@plt>

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

LLVM IR (-O2):
define void @free(i8* %0) {
%2 = tail call i32 @pmm_free(i8* %0)
ret void
}
/* Variables and functions */
void *malloc(size_t);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void *calloc(size_t nitems, size_t size) {
  size_t totalSize = nitems * size;
  void *ret = malloc(totalSize);
  memset(ret, 0, totalSize);
  return ret;
}


x86 assembly (clang, -O0):
<calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
imul   -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
imul   %rsi,%rbx
mov    %rbx,%rdi
call   1040 <malloc@plt>
mov    %rax,%r14
mov    %rax,%rdi
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <memset@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @calloc(i64 %0, i64 %1) {
%3 = mul i64 %1, %0
%4 = tail call i8* @malloc(i64 %3)
%5 = tail call i32 @memset(i8* %4, i32 0, i64 %3)
ret i8* %4
}
void SteamAPI_ISteamMatchmakingRulesResponse_RulesResponded(
    void *self, const char *pchRule, const char *pchValue) {
  xlogf("%s(self = %p, pchRule = %s, pchValue = %s)\n", __func__, self, pchRule,
        pchValue);
}


x86 assembly (clang, -O0):
<SteamAPI_ISteamMatchmakingRulesResponse_RulesResponded>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
lea    0xec9(%rip),%rdi
lea    0xeee(%rip),%rsi
mov    $0x0,%al
call   1030 <xlogf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SteamAPI_ISteamMatchmakingRulesResponse_RulesResponded>:
mov    %rdx,%r8
mov    %rsi,%rcx
mov    %rdi,%rdx
lea    0xee0(%rip),%rdi
lea    0xf05(%rip),%rsi
xor    %eax,%eax
jmp    1030 <xlogf@plt>

LLVM IR (-O0):
@.str = [44 x i8] c"%s(self = %p, pchRule = %s, pchValue = %s)\0A\00"
@__func__.SteamAPI_ISteamMatchmakingRulesResponse_RulesResponded = [55 x i8] c"SteamAPI_ISteamMatchmakingRulesResponse_RulesResponded\00"
define void @SteamAPI_ISteamMatchmakingRulesResponse_RulesResponded(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call i32 (i8*, i8*, i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([55 x i8], [55 x i8]* @__func__.SteamAPI_ISteamMatchmakingRulesResponse_RulesResponded, i64 0, i64 0), i8* %7, i8* %8, i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [44 x i8] c"%s(self = %p, pchRule = %s, pchValue = %s)\0A\00"
@__func__.SteamAPI_ISteamMatchmakingRulesResponse_RulesResponded = [55 x i8] c"SteamAPI_ISteamMatchmakingRulesResponse_RulesResponded\00"
define void @SteamAPI_ISteamMatchmakingRulesResponse_RulesResponded(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 (i8*, i8*, i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([55 x i8], [55 x i8]* @__func__.SteamAPI_ISteamMatchmakingRulesResponse_RulesResponded, i64 0, i64 0), i8* %0, i8* %1, i8* %2)
ret void
}
/* Variables and functions */
double f(double);
double calculaC(double a, double b) {
  return (a - ((f(a) * (b - a)) / (f(b) - f(a))));
}


x86 assembly (clang, -O0):
<calculaC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <f@plt>
movsd  -0x10(%rbp),%xmm1
subsd  -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <f@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <f@plt>
movsd  -0x28(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm1
movaps %xmm0,%xmm3
movsd  -0x18(%rbp),%xmm0
subsd  %xmm3,%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculaC>:
sub    $0x18,%rsp
movsd  %xmm1,(%rsp)
movsd  %xmm0,0x8(%rsp)
call   1030 <f@plt>
movsd  (%rsp),%xmm2
movapd %xmm2,%xmm1
subsd  0x8(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
movapd %xmm2,%xmm0
call   1030 <f@plt>
movsd  %xmm0,(%rsp)
movsd  0x8(%rsp),%xmm0
call   1030 <f@plt>
movsd  (%rsp),%xmm2
subsd  %xmm0,%xmm2
movsd  0x10(%rsp),%xmm1
divsd  %xmm2,%xmm1
movsd  0x8(%rsp),%xmm0
subsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @calculaC(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 = load double, double* %3
%7 = call double @f(double %6)
%8 = load double, double* %4
%9 = load double, double* %3
%10 = fsub double %8, %9
%11 = fmul double %7, %10
%12 = load double, double* %4
%13 = call double @f(double %12)
%14 = load double, double* %3
%15 = call double @f(double %14)
%16 = fsub double %13, %15
%17 = fdiv double %11, %16
%18 = fsub double %5, %17
ret double %18
}

LLVM IR (-O2):
define double @calculaC(double %0, double %1) {
%3 = tail call double @f(double %0)
%4 = fsub double %1, %0
%5 = fmul double %4, %3
%6 = tail call double @f(double %1)
%7 = tail call double @f(double %0)
%8 = fsub double %6, %7
%9 = fdiv double %5, %8
%10 = fsub double %0, %9
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, void *);
int /*<<< orphan*/ read(int, void *, int);
int gpio_get(int gpio_value_dir_fd, int pin_num) {
  void *pin_val;
  read(gpio_value_dir_fd, pin_val, 1);
  printf("GPIO%d: %d", pin_num, pin_val);
}


x86 assembly (clang, -O0):
<gpio_get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    $0x1,%edx
call   1040 <read@plt>
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gpio_get>:
push   %rbx
mov    %esi,%ebx
mov    $0x1,%edx
call   1040 <read@plt>
lea    0xecc(%rip),%rdi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"GPIO%d: %d\00"
define i32 @gpio_get(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store i32 %0, i32* %4
store i32 %1, i32* %5
%7 = load i32, i32* %4
%8 = load i8*, i8** %6
%9 = call i32 @read(i32 %7, i8* %8, i32 1)
%10 = load i32, i32* %5
%11 = load i8*, i8** %6
%12 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %10, i8* %11)
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
@.str = [11 x i8] c"GPIO%d: %d\00"
define i32 @gpio_get(i32 %0, i32 %1) {
%3 = tail call i32 @read(i32 %0, i8* undef, i32 1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %1, i8* undef)
ret i32 undef
}
/* Variables and functions */
int strcmp(char *, char *);
int ast_hashtab_compare_strings(const void *a, const void *b) {
  return strcmp((char *)a, (char *)b);
}


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

x86 assembly (clang, -O2):
<ast_hashtab_compare_strings>:
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @ast_hashtab_compare_strings(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ ipod_get_setting(int);
int /*<<< orphan*/ ipod_set_setting(int, int);
void toggle_piezo(void) { ipod_set_setting(10, !ipod_get_setting(10)); }


x86 assembly (clang, -O0):
<toggle_piezo>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa,%edi
call   1030 <ipod_get_setting@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%esi
mov    $0xa,%edi
call   1040 <ipod_set_setting@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<toggle_piezo>:
push   %rax
mov    $0xa,%edi
call   1030 <ipod_get_setting@plt>
xor    %esi,%esi
test   %eax,%eax
sete   %sil
mov    $0xa,%edi
pop    %rax
jmp    1040 <ipod_set_setting@plt>

LLVM IR (-O0):
define void @toggle_piezo() {
%1 = call i32 @ipod_get_setting(i32 10)
%2 = icmp ne i32 %1, 0
%3 = xor i1 %2, true
%4 = zext i1 %3 to i32
%5 = call i32 @ipod_set_setting(i32 10, i32 %4)
ret void
}

LLVM IR (-O2):
define void @toggle_piezo() {
%1 = tail call i32 @ipod_get_setting(i32 10)
%2 = icmp eq i32 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @ipod_set_setting(i32 10, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void print_error_1() {
  printf("error: wrong run parameters\n use: [executable] [time origine "
         "(CNES:0,CTO:1,ESA:2)] [input file] [Nb CPU dispo]\nexit");
  exit(101);
}


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

x86 assembly (clang, -O2):
<print_error_1>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
mov    $0x65,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [116 x i8] c"error: wrong run parameters\0A use: [executable] [time origine (CNES:0,CTO:1,ESA:2)] [input file] [Nb CPU dispo]\0Aexit\00"
define void @print_error_1() {
%1 = call i32 @printf(i8* getelementptr inbounds ([116 x i8], [116 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 101)
unreachable
}

LLVM IR (-O2):
@.str = [116 x i8] c"error: wrong run parameters\0A use: [executable] [time origine (CNES:0,CTO:1,ESA:2)] [input file] [Nb CPU dispo]\0Aexit\00"
define void @print_error_1() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([116 x i8], [116 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 101)
unreachable
}
void blk_throtl_release(struct request_queue *q) {}


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

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

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

LLVM IR (-O2):
%struct.request_queue = type opaque
define void @blk_throtl_release(%struct.request_queue* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ initial(int /*<<< orphan*/ *);
int /*<<< orphan*/ parsing();
int main(int argc, char *argv[]) {
  FILE *fp;
  fp = fopen(argv[1], "r");
  initial(fp);
  parsing();
  fclose(fp);
  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)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe9b(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <initial@plt>
mov    $0x0,%al
call   1030 <parsing@plt>
mov    -0x18(%rbp),%rdi
call   1040 <fclose@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x8(%rsi),%rdi
lea    0xeb4(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <initial@plt>
xor    %eax,%eax
call   1030 <parsing@plt>
mov    %rbx,%rdi
call   1040 <fclose@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
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
%7 = load i8**, i8*** %5
%8 = getelementptr inbounds i8*, i8** %7, i64 1
%9 = load i8*, i8** %8
%10 = call i32* @fopen(i8* %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %10, i32** %6
%11 = load i32*, i32** %6
%12 = call i32 @initial(i32* %11)
%13 = call i32 (...) @parsing()
%14 = load i32*, i32** %6
%15 = call i32 @fclose(i32* %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32* @fopen(i8* %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @initial(i32* %5)
%7 = tail call i32 (...) @parsing()
%8 = tail call i32 @fclose(i32* %5)
ret i32 0
}
/* Type definitions */
struct semaphore {
  int dummy;
};

/* Variables and functions */
int __down_trylock(struct semaphore *);
int down_trylock(struct semaphore *sem) {
  int ret;
  ret = __down_trylock(sem);
  return ret;
}


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

x86 assembly (clang, -O2):
<down_trylock>:
jmp    1030 <__down_trylock@plt>

LLVM IR (-O0):
%struct.semaphore = type { i32 }
define i32 @down_trylock(%struct.semaphore* %0) {
%2 = alloca %struct.semaphore*
%3 = alloca i32
store %struct.semaphore* %0, %struct.semaphore** %2
%4 = load %struct.semaphore*, %struct.semaphore** %2
%5 = call i32 @__down_trylock(%struct.semaphore* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
%struct.semaphore = type { i32 }
define i32 @down_trylock(%struct.semaphore* %0) {
%2 = tail call i32 @__down_trylock(%struct.semaphore* %0)
ret i32 %2
}
/* Type definitions */
typedef scalar_t__ wint_t;

/* Variables and functions */
int isalpha(scalar_t__);
int iswalpha(wint_t wc) { return ((wc < (wint_t)0x100 ? isalpha(wc) : 0)); }


x86 assembly (clang, -O0):
<iswalpha>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x100,-0x8(%rbp)
jge    113b <iswalpha+0x2b>
mov    -0x8(%rbp),%rdi
call   1030 <isalpha@plt>
mov    %eax,-0xc(%rbp)
jmp    1145 <iswalpha+0x35>
xor    %eax,%eax
mov    %eax,-0xc(%rbp)
jmp    1145 <iswalpha+0x35>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iswalpha>:
cmp    $0xff,%rdi
jg     111e <iswalpha+0xe>
jmp    1030 <isalpha@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @iswalpha(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp slt i64 %3, 256
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i64, i64* %2
%7 = call i32 @isalpha(i64 %6)
br label %9
8: ; preds = %1
br label %9
9: ; preds = %8, %5
%10 = phi i32 [ %7, %5 ], [ 0, %8 ]
ret i32 %10
}

LLVM IR (-O2):
define i32 @iswalpha(i64 %0) {
%2 = icmp slt i64 %0, 256
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @isalpha(i64 %0)
br label %5
5: ; preds = %1, %3
%6 = phi i32 [ %4, %3 ], [ 0, %1 ]
ret i32 %6
}
unsigned char f63(unsigned char x, int y) {
  return (x << ((-y) & (8 * sizeof(unsigned char) - 1))) ^ (x >> y);
}


x86 assembly (clang, -O0):
<f63>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
xor    %ecx,%ecx
sub    -0x8(%rbp),%ecx
movslq %ecx,%rcx
and    $0x7,%rcx
shl    %cl,%eax
movzbl -0x1(%rbp),%edx
mov    -0x8(%rbp),%ecx
sar    %cl,%edx
mov    %edx,%ecx
xor    %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f63>:
mov    %esi,%ecx
neg    %cl
and    $0x7,%cl
mov    %edi,%eax
shl    %cl,%eax
mov    %esi,%ecx
shr    %cl,%edi
xor    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i8 @f63(i8 zeroext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
store i8 %0, i8* %3
store i32 %1, i32* %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = load i32, i32* %4
%8 = sub nsw i32 0, %7
%9 = sext i32 %8 to i64
%10 = and i64 %9, 7
%11 = trunc i64 %10 to i32
%12 = shl i32 %6, %11
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = load i32, i32* %4
%16 = ashr i32 %14, %15
%17 = xor i32 %12, %16
%18 = trunc i32 %17 to i8
ret i8 %18
}

LLVM IR (-O2):
define zeroext i8 @f63(i8 zeroext %0, i32 %1) {
%3 = zext i8 %0 to i32
%4 = sub nsw i32 0, %1
%5 = and i32 %4, 7
%6 = shl nuw nsw i32 %3, %5
%7 = lshr i32 %3, %1
%8 = xor i32 %6, %7
%9 = trunc i32 %8 to i8
ret i8 %9
}
/* Variables and functions */
int /*<<< orphan*/ print_number(int *);
int main(void) {
  int a = 10;
  int *b = NULL;
  int *c = NULL;
  b = &a;
  print_number(b);
  print_number(c);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <print_number@plt>
mov    -0x18(%rbp),%rdi
call   1030 <print_number@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0xa,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <print_number@plt>
xor    %edi,%edi
call   1030 <print_number@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 10, i32* %1
%3 = call i32 @print_number(i32* %1)
%4 = call i32 @print_number(i32* null)
ret i32 0
}
double nsl_diff_first_central(double xm, double fm, double xp, double fp) {
  return (fp - fm) / (xp - xm);
}


x86 assembly (clang, -O0):
<nsl_diff_first_central>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
subsd  -0x8(%rbp),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<nsl_diff_first_central>:
subsd  %xmm1,%xmm3
subsd  %xmm0,%xmm2
divsd  %xmm2,%xmm3
movapd %xmm3,%xmm0
ret

LLVM IR (-O0):
define double @nsl_diff_first_central(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* %8
%10 = load double, double* %6
%11 = fsub double %9, %10
%12 = load double, double* %7
%13 = load double, double* %5
%14 = fsub double %12, %13
%15 = fdiv double %11, %14
ret double %15
}

LLVM IR (-O2):
define double @nsl_diff_first_central(double %0, double %1, double %2, double %3) {
%5 = fsub double %3, %1
%6 = fsub double %2, %0
%7 = fdiv double %5, %6
ret double %7
}
/* Variables and functions */
int sscanf(char *, char *);
int _check_ThreadRef(char *string) {
  return ((sscanf(string, "%d") == 1) ? 1 : 0);
}


x86 assembly (clang, -O0):
<_check_ThreadRef>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <sscanf@plt>
mov    %eax,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x1,%edx
cmove  %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_check_ThreadRef>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <sscanf@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @_check_ThreadRef(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @sscanf(i8* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i32 %4, 1
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 1, i32 0
ret i32 %7
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @_check_ThreadRef(i8* nocapture %0) {
%2 = tail call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32 %2, 1
%4 = zext i1 %3 to i32
ret i32 %4
}
int d_lt_rm2(double a1, double *a2) { return !(((a1) < (*a2))); }


x86 assembly (clang, -O0):
<d_lt_rm2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
seta   %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_lt_rm2>:
movsd  (%rdi),%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
setbe  %al
ret

LLVM IR (-O0):
define i32 @d_lt_rm2(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 = load double*, double** %4
%7 = load double, double* %6
%8 = fcmp olt double %5, %7
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @d_lt_rm2(double %0, double* nocapture %1) {
%3 = load double, double* %1
%4 = fcmp ule double %3, %0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ hal_mag3110_init();
void hal_compass_init(void) { hal_mag3110_init(); }


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

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

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

LLVM IR (-O2):
define void @hal_compass_init() {
%1 = tail call i32 (...) @hal_mag3110_init()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
int __write_node_value_char(FILE *fout, void *value) {
  char *s = (char *)value;
  fprintf(fout, "%s", s);
  return (1);
}


x86 assembly (clang, -O0):
<__write_node_value_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    0xec9(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__write_node_value_char>:
push   %rax
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
call   1030 <fputs@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @__write_node_value_char(i32* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @fputs(i8* %1, i32* %0)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
char getchar();
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ stdin;
main() {
  char c;
  c = getchar();
  fflush(stdin);
  putchar(c);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %al,-0x1(%rbp)
mov    0x2e9f(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
movsbl -0x1(%rbp),%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %eax,%ebx
mov    0x2ea7(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
movsbl %bl,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stdin = global i32 0
define i32 @main() {
%1 = alloca i8
%2 = call signext i8 (...) @getchar()
store i8 %2, i8* %1
%3 = load i32, i32* @stdin
%4 = call i32 @fflush(i32 %3)
%5 = load i8, i8* %1
%6 = call i32 @putchar(i8 signext %5)
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
define i32 @main() {
%1 = tail call signext i8 (...) @getchar()
%2 = load i32, i32* @stdin
%3 = tail call i32 @fflush(i32 %2)
%4 = tail call i32 @putchar(i8 signext %1)
ret i32 0
}
/* Type definitions */
typedef int uint64_t;
typedef scalar_t__ uint32_t;
struct MultiStageMonotoneList {
  int dummy;
};

/* Variables and functions */
int MultiStageMonotoneList_get(struct MultiStageMonotoneList *, scalar_t__);
uint64_t MultiStageMonotoneList_getPair(struct MultiStageMonotoneList *this,
                                        uint32_t i) {
  return ((uint64_t)MultiStageMonotoneList_get(this, i) << 32) |
         (MultiStageMonotoneList_get(this, i + 1));
}


x86 assembly (clang, -O0):
<MultiStageMonotoneList_getPair>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <MultiStageMonotoneList_get@plt>
mov    $0x20,%ecx
shl    %cl,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
add    $0x1,%rsi
call   1030 <MultiStageMonotoneList_get@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
or     %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MultiStageMonotoneList_getPair>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
call   1030 <MultiStageMonotoneList_get@plt>
add    $0x1,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <MultiStageMonotoneList_get@plt>

LLVM IR (-O0):
%struct.MultiStageMonotoneList = type { i32 }
define i32 @MultiStageMonotoneList_getPair(%struct.MultiStageMonotoneList* %0, i64 %1) {
%3 = alloca %struct.MultiStageMonotoneList*
%4 = alloca i64
store %struct.MultiStageMonotoneList* %0, %struct.MultiStageMonotoneList** %3
store i64 %1, i64* %4
%5 = load %struct.MultiStageMonotoneList*, %struct.MultiStageMonotoneList** %3
%6 = load i64, i64* %4
%7 = call i32 @MultiStageMonotoneList_get(%struct.MultiStageMonotoneList* %5, i64 %6)
%8 = shl i32 %7, 32
%9 = load %struct.MultiStageMonotoneList*, %struct.MultiStageMonotoneList** %3
%10 = load i64, i64* %4
%11 = add nsw i64 %10, 1
%12 = call i32 @MultiStageMonotoneList_get(%struct.MultiStageMonotoneList* %9, i64 %11)
%13 = or i32 %8, %12
ret i32 %13
}

LLVM IR (-O2):
%struct.MultiStageMonotoneList = type { i32 }
define i32 @MultiStageMonotoneList_getPair(%struct.MultiStageMonotoneList* %0, i64 %1) {
%3 = tail call i32 @MultiStageMonotoneList_get(%struct.MultiStageMonotoneList* %0, i64 %1)
%4 = add nsw i64 %1, 1
%5 = tail call i32 @MultiStageMonotoneList_get(%struct.MultiStageMonotoneList* %0, i64 %4)
ret i32 poison
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
int /*<<< orphan*/ execl(char *, char *, int /*<<< orphan*/ *);
scalar_t__ fork();
int /*<<< orphan*/ printf(char *);
main() {
  pid_t pidFils = fork();
  if (pidFils != 0) {
    printf("je lance un terminal\n");
  } else {
    execl("/usr/bin/xterm", "mon terminal", NULL);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <fork@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1166 <main+0x36>
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
jmp    117d <main+0x4d>
lea    0xea9(%rip),%rdi
lea    0xeb1(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1040 <execl@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <fork@plt>
test   %rax,%rax
je     114b <main+0x1b>
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
jmp    1160 <main+0x30>
lea    0xeae(%rip),%rdi
lea    0xeb6(%rip),%rsi
xor    %edx,%edx
call   1040 <execl@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"je lance un terminal\0A\00"
@.str.1 = [15 x i8] c"/usr/bin/xterm\00"
@.str.2 = [13 x i8] c"mon terminal\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
%3 = call i64 (...) @fork()
store i64 %3, i64* %2
%4 = load i64, i64* %2
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
br label %10
8: ; preds = %0
%9 = call i32 @execl(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32* null)
br label %10
10: ; preds = %8, %6
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
@.str.1 = [15 x i8] c"/usr/bin/xterm\00"
@.str.2 = [13 x i8] c"mon terminal\00"
@str = [21 x i8] c"je lance un terminal\00"
define i32 @main() {
%1 = tail call i64 (...) @fork()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
br label %7
5: ; preds = %0
%6 = tail call i32 @execl(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32* null)
br label %7
7: ; preds = %5, %3
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ drfti1(int, float *, int *);
void __ogg_fdrffti(int n, float *wsave, int *ifac) {
  if (n == 1)
    return;
  drfti1(n, wsave + n, ifac);
}


x86 assembly (clang, -O0):
<__ogg_fdrffti>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    1132 <__ogg_fdrffti+0x22>
jmp    114d <__ogg_fdrffti+0x3d>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
movslq -0x4(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
mov    -0x18(%rbp),%rdx
call   1030 <drfti1@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ogg_fdrffti>:
cmp    $0x1,%edi
jne    1116 <__ogg_fdrffti+0x6>
ret
movslq %edi,%rax
lea    (%rsi,%rax,4),%rsi
jmp    1030 <drfti1@plt>

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

LLVM IR (-O2):
define void @__ogg_fdrffti(i32 %0, float* %1, i32* %2) {
%4 = icmp eq i32 %0, 1
br i1 %4, label %9, label %5
5: ; preds = %3
%6 = sext i32 %0 to i64
%7 = getelementptr inbounds float, float* %1, i64 %6
%8 = tail call i32 @drfti1(i32 %0, float* %7, i32* %2)
br label %9
9: ; preds = %3, %5
ret void
}
int CRYPTO_set_mem_debug_functions(
    void (*m)(void *, int, const char *, int, int),
    void (*r)(void *, void *, int, const char *, int, int),
    void (*f)(void *, int), void (*so)(long), long (*go)(void)) {
  return 0;
}


x86 assembly (clang, -O0):
<CRYPTO_set_mem_debug_functions>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @CRYPTO_set_mem_debug_functions(void (i8*, i32, i8*, i32, i32)* %0, void (i8*, i8*, i32, i8*, i32, i32)* %1, void (i8*, i32)* %2, void (i64)* %3, i64 ()* %4) {
%6 = alloca void (i8*, i32, i8*, i32, i32)*
%7 = alloca void (i8*, i8*, i32, i8*, i32, i32)*
%8 = alloca void (i8*, i32)*
%9 = alloca void (i64)*
%10 = alloca i64 ()*
store void (i8*, i32, i8*, i32, i32)* %0, void (i8*, i32, i8*, i32, i32)** %6
store void (i8*, i8*, i32, i8*, i32, i32)* %1, void (i8*, i8*, i32, i8*, i32, i32)** %7
store void (i8*, i32)* %2, void (i8*, i32)** %8
store void (i64)* %3, void (i64)** %9
store i64 ()* %4, i64 ()** %10
ret i32 0
}

LLVM IR (-O2):
define i32 @CRYPTO_set_mem_debug_functions(void (i8*, i32, i8*, i32, i32)* nocapture readnone %0, void (i8*, i8*, i32, i8*, i32, i32)* nocapture readnone %1, void (i8*, i32)* nocapture readnone %2, void (i64)* nocapture readnone %3, i64 ()* nocapture readnone %4) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
int /*<<< orphan*/ scanf(char *, int *);
int promptValue(const char *prompt) {
  printf("%s:\n", prompt);
  int result;
  scanf("%d", &result);
  return result;
}


x86 assembly (clang, -O0):
<promptValue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
lea    0xec2(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<promptValue>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xece(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%s:\0A\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @promptValue(i8* %0) {
%2 = alloca i32
%3 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
ret i32 %6
}
/* Variables and functions */
void *malloc(int);
void *allocate(int size) { return malloc(size); }


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

x86 assembly (clang, -O2):
<allocate>:
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define noalias i8* @allocate(i32 %0) {
%2 = tail call i8* @malloc(i32 %0)
ret i8* %2
}
void ScaleRowUp2_16_NEON() {}


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

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

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

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