xunge/DecIR huggingface dataset:
void foo(int i) {
  int j;
  switch (i) {
#pragma omp parallel
    { case 0:; }
#pragma omp for
    for (j = 0; j < 10; ++j) {
    case 1:;
    }
#pragma omp critical
    { case 2:; }
#pragma omp master
    { case 3:; }
#pragma omp sections
    {
    case 4:;
#pragma omp section
      { case 5:; }
    }
#pragma omp ordered
    { default:; }
  }
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0x5,%rax
ja     116e <foo+0x6e>
mov    -0x10(%rbp),%rax
lea    0xedd(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1155 <foo+0x55>
jmp    1142 <foo+0x42>
jmp    1147 <foo+0x47>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1133 <foo+0x33>
jmp    115a <foo+0x5a>
jmp    115f <foo+0x5f>
jmp    1164 <foo+0x64>
jmp    1169 <foo+0x69>
jmp    116e <foo+0x6e>
jmp    1173 <foo+0x73>
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
cmp    $0x1,%edi
je     110e <foo+0xe>
test   %edi,%edi
jne    1113 <foo+0x13>
cmp    $0x9,%edi
jg     1113 <foo+0x13>
add    $0x1,%edi
jmp    1109 <foo+0x9>
ret

LLVM IR (-O0):
define void @foo(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
switch i32 %4, label %19 [
i32 0, label %5
i32 1, label %10
i32 2, label %15
i32 3, label %16
i32 4, label %17
i32 5, label %18
]
5: ; preds = %1
store i32 0, i32* %3
br label %6
6: ; preds = %11, %5
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 10
br i1 %8, label %9, label %14
9: ; preds = %6
br label %10
10: ; preds = %1, %9
br label %11
11: ; preds = %10
%12 = load i32, i32* %3
%13 = add nsw i32 %12, 1
store i32 %13, i32* %3
br label %6
14: ; preds = %6
br label %15
15: ; preds = %1, %14
br label %16
16: ; preds = %1, %15
br label %17
17: ; preds = %1, %16
br label %18
18: ; preds = %1, %17
br label %19
19: ; preds = %1, %18
br label %20
20: ; preds = %19
ret void
}

LLVM IR (-O2):
define void @foo(i32 %0) {
switch i32 %0, label %8 [
i32 0, label %2
i32 1, label %5
]
2: ; preds = %1, %5
%3 = phi i32 [ %7, %5 ], [ %0, %1 ]
%4 = icmp slt i32 %3, 10
br i1 %4, label %5, label %8
5: ; preds = %1, %2
%6 = phi i32 [ undef, %1 ], [ %3, %2 ]
%7 = add nsw i32 %6, 1
br label %2
8: ; preds = %1, %2
ret void
}
void null_func(void *a) {}


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

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

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

LLVM IR (-O2):
define void @null_func(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ arrow11(double, double, double, double, double);
int /*<<< orphan*/ default_line_gwt();
int /*<<< orphan*/ linewidth(double);
int /*<<< orphan*/ setgray(double);
void arrow01(double x1, double y1, double x2, double y2, double d, double g,
             double w) {
  linewidth(w);
  setgray(g);
  arrow11(x1, y1, x2, y2, d);
  default_line_gwt();
  return;
}


x86 assembly (clang, -O0):
<arrow01>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  %xmm6,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
call   1030 <linewidth@plt>
movsd  -0x30(%rbp),%xmm0
call   1060 <setgray@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
movsd  -0x28(%rbp),%xmm4
call   1050 <arrow11@plt>
mov    $0x0,%al
call   1040 <default_line_gwt@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arrow01>:
sub    $0x38,%rsp
movsd  %xmm5,0x10(%rsp)
movsd  %xmm4,0x30(%rsp)
movsd  %xmm3,0x28(%rsp)
movsd  %xmm2,0x20(%rsp)
movsd  %xmm1,0x18(%rsp)
movsd  %xmm0,0x8(%rsp)
movaps %xmm6,%xmm0
call   1030 <linewidth@plt>
movsd  0x10(%rsp),%xmm0
call   1060 <setgray@plt>
movsd  0x8(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
movsd  0x20(%rsp),%xmm2
movsd  0x28(%rsp),%xmm3
movsd  0x30(%rsp),%xmm4
call   1050 <arrow11@plt>
xor    %eax,%eax
add    $0x38,%rsp
jmp    1040 <default_line_gwt@plt>

LLVM IR (-O0):
define void @arrow01(double %0, double %1, double %2, double %3, double %4, double %5, double %6) {
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
store double %0, double* %8
store double %1, double* %9
store double %2, double* %10
store double %3, double* %11
store double %4, double* %12
store double %5, double* %13
store double %6, double* %14
%15 = load double, double* %14
%16 = call i32 @linewidth(double %15)
%17 = load double, double* %13
%18 = call i32 @setgray(double %17)
%19 = load double, double* %8
%20 = load double, double* %9
%21 = load double, double* %10
%22 = load double, double* %11
%23 = load double, double* %12
%24 = call i32 @arrow11(double %19, double %20, double %21, double %22, double %23)
%25 = call i32 (...) @default_line_gwt()
ret void
}

LLVM IR (-O2):
define void @arrow01(double %0, double %1, double %2, double %3, double %4, double %5, double %6) {
%8 = tail call i32 @linewidth(double %6)
%9 = tail call i32 @setgray(double %5)
%10 = tail call i32 @arrow11(double %0, double %1, double %2, double %3, double %4)
%11 = tail call i32 (...) @default_line_gwt()
ret void
}
void SwapShort(short *p) {
  char temp, *q;
  q = (char *)p;
  temp = *q;
  *q = *(q + 1);
  *(q + 1) = temp;
}


x86 assembly (clang, -O0):
<SwapShort>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x9(%rbp)
mov    -0x18(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x9(%rbp),%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x1(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SwapShort>:
rolw   $0x8,(%rdi)
ret

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

LLVM IR (-O2):
define void @SwapShort(i16* nocapture %0) {
%2 = bitcast i16* %0 to i8*
%3 = load i8, i8* %2
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = load i8, i8* %4
store i8 %5, i8* %2
store i8 %3, i8* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gpio_output(int, int, int);
void led_on(void) { gpio_output(9, 10, 1); }


x86 assembly (clang, -O0):
<led_on>:
push   %rbp
mov    %rsp,%rbp
mov    $0x9,%edi
mov    $0xa,%esi
mov    $0x1,%edx
call   1030 <gpio_output@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<led_on>:
mov    $0x9,%edi
mov    $0xa,%esi
mov    $0x1,%edx
jmp    1030 <gpio_output@plt>

LLVM IR (-O0):
define void @led_on() {
%1 = call i32 @gpio_output(i32 9, i32 10, i32 1)
ret void
}

LLVM IR (-O2):
define void @led_on() {
%1 = tail call i32 @gpio_output(i32 9, i32 10, i32 1)
ret void
}
/* Variables and functions */
bool is_path_absolute(const char *p) { return *p == '/'; }


x86 assembly (clang, -O0):
<is_path_absolute>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_path_absolute>:
xor    %eax,%eax
cmpb   $0x2f,(%rdi)
sete   %al
ret

LLVM IR (-O0):
define i32 @is_path_absolute(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 47
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @is_path_absolute(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 47
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
char **leseGrafikKartenGammaCG(const char *display_name, double ***g,
                               unsigned int *size_) {
  char **texte = NULL;
  return texte;
}


x86 assembly (clang, -O0):
<leseGrafikKartenGammaCG>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i8** @leseGrafikKartenGammaCG(i8* %0, double*** %1, i32* %2) {
%4 = alloca i8*
%5 = alloca double***
%6 = alloca i32*
%7 = alloca i8**
store i8* %0, i8** %4
store double*** %1, double**** %5
store i32* %2, i32** %6
store i8** null, i8*** %7
%8 = load i8**, i8*** %7
ret i8** %8
}

LLVM IR (-O2):
define noalias i8** @leseGrafikKartenGammaCG(i8* nocapture readnone %0, double*** nocapture readnone %1, i32* nocapture readnone %2) {
ret i8** null
}
/* Variables and functions */
int /*<<< orphan*/ bar();
void foo(int a) {
  switch (a) {
  case 4:
    if (a >= 3)
      if (a <= 5)
        bar();
  }
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x4,%eax
jne    1151 <foo+0x41>
jmp    112c <foo+0x1c>
cmpl   $0x3,-0x4(%rbp)
jl     114c <foo+0x3c>
cmpl   $0x5,-0x4(%rbp)
jg     1147 <foo+0x37>
mov    $0x0,%al
call   1030 <bar@plt>
jmp    114c <foo+0x3c>
jmp    1151 <foo+0x41>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
cmp    $0x4,%edi
jne    111c <foo+0xc>
xor    %eax,%eax
jmp    1030 <bar@plt>
ret

LLVM IR (-O0):
define void @foo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %14 [
i32 4, label %4
]
4: ; preds = %1
%5 = load i32, i32* %2
%6 = icmp sge i32 %5, 3
br i1 %6, label %7, label %13
7: ; preds = %4
%8 = load i32, i32* %2
%9 = icmp sle i32 %8, 5
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = call i32 (...) @bar()
br label %12
12: ; preds = %10, %7
br label %13
13: ; preds = %12, %4
br label %14
14: ; preds = %13, %1
ret void
}

LLVM IR (-O2):
define void @foo(i32 %0) {
%2 = icmp eq i32 %0, 4
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @bar()
br label %5
5: ; preds = %3, %1
ret void
}
void dd_pbl_ios_fb_app_become_active() {}


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

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

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

LLVM IR (-O2):
define void @dd_pbl_ios_fb_app_become_active() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ F_GETFD;
int /*<<< orphan*/ F_SETFD;
int O_NONBLOCK;
int fcntl(int, int /*<<< orphan*/, ...);
int io_nonblock(int fd) {
  int flags = fcntl(fd, F_GETFD);
  if (flags == -1)
    return -1;
  return fcntl(fd, F_SETFD, flags | O_NONBLOCK);
}


x86 assembly (clang, -O0):
<io_nonblock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
mov    $0x0,%al
call   1030 <fcntl@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0xffffffff,-0xc(%rbp)
jne    1147 <io_nonblock+0x37>
movl   $0xffffffff,-0x4(%rbp)
jmp    1169 <io_nonblock+0x59>
mov    -0x8(%rbp),%edi
mov    0x2e87(%rip),%rax
mov    (%rax),%esi
mov    -0xc(%rbp),%edx
mov    0x2e8b(%rip),%rax
or     (%rax),%edx
mov    $0x0,%al
call   1030 <fcntl@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<io_nonblock>:
push   %rbx
mov    %edi,%ebx
mov    0x2eb6(%rip),%rax
mov    (%rax),%esi
xor    %eax,%eax
call   1030 <fcntl@plt>
cmp    $0xffffffff,%eax
je     1146 <io_nonblock+0x36>
mov    0x2ea9(%rip),%rcx
mov    (%rcx),%esi
mov    0x2eb0(%rip),%rcx
or     (%rcx),%eax
mov    %ebx,%edi
mov    %eax,%edx
xor    %eax,%eax
pop    %rbx
jmp    1030 <fcntl@plt>
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
@F_GETFD = global i32 0
@F_SETFD = global i32 0
@O_NONBLOCK = global i32 0
define i32 @io_nonblock(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = load i32, i32* @F_GETFD
%7 = call i32 (i32, i32, ...) @fcntl(i32 %5, i32 %6)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = icmp eq i32 %8, -1
br i1 %9, label %10, label %11
10: ; preds = %1
store i32 -1, i32* %2
br label %18
11: ; preds = %1
%12 = load i32, i32* %3
%13 = load i32, i32* @F_SETFD
%14 = load i32, i32* %4
%15 = load i32, i32* @O_NONBLOCK
%16 = or i32 %14, %15
%17 = call i32 (i32, i32, ...) @fcntl(i32 %12, i32 %13, i32 %16)
store i32 %17, i32* %2
br label %18
18: ; preds = %11, %10
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
@F_GETFD = global i32 0
@F_SETFD = global i32 0
@O_NONBLOCK = global i32 0
define i32 @io_nonblock(i32 %0) {
%2 = load i32, i32* @F_GETFD
%3 = tail call i32 (i32, i32, ...) @fcntl(i32 %0, i32 %2)
%4 = icmp eq i32 %3, -1
br i1 %4, label %10, label %5
5: ; preds = %1
%6 = load i32, i32* @F_SETFD
%7 = load i32, i32* @O_NONBLOCK
%8 = or i32 %7, %3
%9 = tail call i32 (i32, i32, ...) @fcntl(i32 %0, i32 %6, i32 %8)
br label %10
10: ; preds = %1, %5
%11 = phi i32 [ %9, %5 ], [ -1, %1 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int i, j;
  for (i = 5, j = i - 1; i > 0, j > 0; --i, j = i - 1) {
    printf("%d ", i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    115f <main+0x4f>
mov    -0x8(%rbp),%esi
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112f <main+0x1f>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 5)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 4)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ getenv(char *);
char *s_asprintf(char *, int /*<<< orphan*/);
char *sosc_get_config_directory() {
  return s_asprintf("%s/Library/Preferences/org.monome.serialosc",
                    getenv("HOME"));
}


x86 assembly (clang, -O0):
<sosc_get_config_directory>:
push   %rbp
mov    %rsp,%rbp
lea    0xf01(%rip),%rdi
call   1030 <getenv@plt>
mov    %eax,%esi
lea    0xec7(%rip),%rdi
call   1040 <s_asprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sosc_get_config_directory>:
push   %rax
lea    0xf04(%rip),%rdi
call   1030 <getenv@plt>
lea    0xecc(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1040 <s_asprintf@plt>

LLVM IR (-O0):
@.str = [44 x i8] c"%s/Library/Preferences/org.monome.serialosc\00"
@.str.1 = [5 x i8] c"HOME\00"
define i8* @sosc_get_config_directory() {
%1 = call i32 @getenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%2 = call i8* @s_asprintf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i8* %2
}

LLVM IR (-O2):
@.str = [44 x i8] c"%s/Library/Preferences/org.monome.serialosc\00"
@.str.1 = [5 x i8] c"HOME\00"
define i8* @sosc_get_config_directory() {
%1 = tail call i32 @getenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i8* @s_asprintf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ malloc_helper_fake_free(int *);
scalar_t__ malloc_helper_fake_malloc(int);
void soru_1() {
  int *pA = (int *)malloc_helper_fake_malloc(sizeof(int));
  *pA = 1234;
  malloc_helper_fake_free(pA);
}


x86 assembly (clang, -O0):
<soru_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1030 <malloc_helper_fake_malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x4d2,(%rax)
mov    -0x8(%rbp),%rdi
call   1040 <malloc_helper_fake_free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<soru_1>:
push   %rax
mov    $0x4,%edi
call   1030 <malloc_helper_fake_malloc@plt>
movl   $0x4d2,(%rax)
mov    %rax,%rdi
pop    %rax
jmp    1040 <malloc_helper_fake_free@plt>

LLVM IR (-O0):
define void @soru_1() {
%1 = alloca i32*
%2 = call i64 @malloc_helper_fake_malloc(i32 4)
%3 = inttoptr i64 %2 to i32*
store i32* %3, i32** %1
%4 = load i32*, i32** %1
store i32 1234, i32* %4
%5 = load i32*, i32** %1
%6 = call i32 @malloc_helper_fake_free(i32* %5)
ret void
}

LLVM IR (-O2):
define void @soru_1() {
%1 = tail call i64 @malloc_helper_fake_malloc(i32 4)
%2 = inttoptr i64 %1 to i32*
store i32 1234, i32* %2
%3 = tail call i32 @malloc_helper_fake_free(i32* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
void what_i_do(char *name, char *text) {
  fprintf(stderr,
          "\nTISEAN 3.0.1 (C) R. Hegger, H. Kantz,"
          " T. Schreiber (1998-2007)\n\n"
          "%s: %s\n\n",
          name, text);
}


x86 assembly (clang, -O0):
<what_i_do>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xec8(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<what_i_do>:
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2ec3(%rip),%rax
mov    (%rax),%edi
lea    0xeda(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [74 x i8] c"\0ATISEAN 3.0.1 (C) R. Hegger, H. Kantz, T. Schreiber (1998-2007)\0A\0A%s: %s\0A\0A\00"
define void @what_i_do(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str, i64 0, i64 0), i8* %6, i8* %7)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [74 x i8] c"\0ATISEAN 3.0.1 (C) R. Hegger, H. Kantz, T. Schreiber (1998-2007)\0A\0A%s: %s\0A\0A\00"
define void @what_i_do(i8* %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sgen(char *, char *, char *);
void cgincgw(char *s) { sgen("%s\t%s", "incl", s); }


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

x86 assembly (clang, -O2):
<cgincgw>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xee5(%rip),%rsi
jmp    1030 <sgen@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"%s\09%s\00"
@.str.1 = [5 x i8] c"incl\00"
define void @cgincgw(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @sgen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s\09%s\00"
@.str.1 = [5 x i8] c"incl\00"
define void @cgincgw(i8* %0) {
%2 = tail call i32 @sgen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
double sqrt(double const);
double normVect(const double *x) {
  return (sqrt(x[0] * x[0] + x[1] * x[1] + x[2] * x[2]));
}


x86 assembly (clang, -O0):
<normVect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<normVect>:
movsd  (%rdi),%xmm1
movsd  0x8(%rdi),%xmm0
mulsd  %xmm0,%xmm0
mulsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
movsd  0x10(%rdi),%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1141 <normVect+0x31>
sqrtsd %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define double @normVect(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
%5 = load double, double* %4
%6 = load double*, double** %2
%7 = getelementptr inbounds double, double* %6, i64 0
%8 = load double, double* %7
%9 = load double*, double** %2
%10 = getelementptr inbounds double, double* %9, i64 1
%11 = load double, double* %10
%12 = load double*, double** %2
%13 = getelementptr inbounds double, double* %12, i64 1
%14 = load double, double* %13
%15 = fmul double %11, %14
%16 = call double @llvm.fmuladd.f64(double %5, double %8, double %15)
%17 = load double*, double** %2
%18 = getelementptr inbounds double, double* %17, i64 2
%19 = load double, double* %18
%20 = load double*, double** %2
%21 = getelementptr inbounds double, double* %20, i64 2
%22 = load double, double* %21
%23 = call double @llvm.fmuladd.f64(double %19, double %22, double %16)
%24 = call double @sqrt(double %23)
ret double %24
}

LLVM IR (-O2):
define double @normVect(double* nocapture %0) {
%2 = load double, double* %0
%3 = getelementptr inbounds double, double* %0, i64 1
%4 = load double, double* %3
%5 = fmul double %4, %4
%6 = tail call double @llvm.fmuladd.f64(double %2, double %2, double %5)
%7 = getelementptr inbounds double, double* %0, i64 2
%8 = load double, double* %7
%9 = tail call double @llvm.fmuladd.f64(double %8, double %8, double %6)
%10 = tail call double @sqrt(double %9)
ret double %10
}
/* Variables and functions */
double sqrt(double const);
double glmComputeVectorLength2d(const double v[2]) {
  return sqrt(v[0] * v[0] + v[1] * v[1]);
}


x86 assembly (clang, -O0):
<glmComputeVectorLength2d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x8(%rbp),%rax
mulsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmComputeVectorLength2d>:
movsd  (%rdi),%xmm0
movsd  0x8(%rdi),%xmm1
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1134 <glmComputeVectorLength2d+0x24>
sqrtsd %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define double @glmComputeVectorLength2d(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
%5 = load double, double* %4
%6 = load double*, double** %2
%7 = getelementptr inbounds double, double* %6, i64 0
%8 = load double, double* %7
%9 = load double*, double** %2
%10 = getelementptr inbounds double, double* %9, i64 1
%11 = load double, double* %10
%12 = load double*, double** %2
%13 = getelementptr inbounds double, double* %12, i64 1
%14 = load double, double* %13
%15 = fmul double %11, %14
%16 = call double @llvm.fmuladd.f64(double %5, double %8, double %15)
%17 = call double @sqrt(double %16)
ret double %17
}

LLVM IR (-O2):
define double @glmComputeVectorLength2d(double* nocapture %0) {
%2 = load double, double* %0
%3 = getelementptr inbounds double, double* %0, i64 1
%4 = load double, double* %3
%5 = fmul double %4, %4
%6 = tail call double @llvm.fmuladd.f64(double %2, double %2, double %5)
%7 = tail call double @sqrt(double %6)
ret double %7
}
int diffsign(float a, float b) { return (a > 0 && b < 0) || (a < 0 && b > 0); }


x86 assembly (clang, -O0):
<diffsign>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    1131 <diffsign+0x31>
mov    $0x1,%al
xorps  %xmm0,%xmm0
ucomiss -0x8(%rbp),%xmm0
mov    %al,-0x9(%rbp)
ja     115a <diffsign+0x5a>
xor    %eax,%eax
xorps  %xmm0,%xmm0
ucomiss -0x4(%rbp),%xmm0
mov    %al,-0xa(%rbp)
jbe    1154 <diffsign+0x54>
movss  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
seta   %al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<diffsign>:
xorps  %xmm2,%xmm2
ucomiss %xmm2,%xmm0
seta   %al
ucomiss %xmm1,%xmm2
seta   %cl
and    %al,%cl
ucomiss %xmm0,%xmm2
seta   %al
ucomiss %xmm2,%xmm1
seta   %dl
and    %al,%dl
or     %cl,%dl
movzbl %dl,%eax
ret

LLVM IR (-O0):
define i32 @diffsign(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = fcmp ogt float %5, 0.000000e+00
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load float, float* %4
%9 = fcmp olt float %8, 0.000000e+00
br i1 %9, label %18, label %10
10: ; preds = %7, %2
%11 = load float, float* %3
%12 = fcmp olt float %11, 0.000000e+00
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = load float, float* %4
%15 = fcmp ogt float %14, 0.000000e+00
br label %16
16: ; preds = %13, %10
%17 = phi i1 [ false, %10 ], [ %15, %13 ]
br label %18
18: ; preds = %16, %7
%19 = phi i1 [ true, %7 ], [ %17, %16 ]
%20 = zext i1 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @diffsign(float %0, float %1) {
%3 = fcmp ogt float %0, 0.000000e+00
%4 = fcmp olt float %1, 0.000000e+00
%5 = and i1 %3, %4
%6 = fcmp olt float %0, 0.000000e+00
%7 = fcmp ogt float %1, 0.000000e+00
%8 = and i1 %6, %7
%9 = or i1 %5, %8
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ task_assert_flag(int, int);
void task_assert_active(int id) { task_assert_flag(id, (1 << 2)); }


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

x86 assembly (clang, -O2):
<task_assert_active>:
mov    $0x4,%esi
jmp    1030 <task_assert_flag@plt>

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

LLVM IR (-O2):
define void @task_assert_active(i32 %0) {
%2 = tail call i32 @task_assert_flag(i32 %0, i32 4)
ret void
}
/* Variables and functions */
int *malloc(int);
int *intPtrFromInt(int i) {
  int *ip = malloc(sizeof(int));
  *ip = i;
  return ip;
}


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

x86 assembly (clang, -O2):
<intPtrFromInt>:
push   %rbx
mov    %edi,%ebx
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %ebx,(%rax)
pop    %rbx
ret

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

LLVM IR (-O2):
define noalias i32* @intPtrFromInt(i32 %0) {
%2 = tail call i32* @malloc(i32 4)
store i32 %0, i32* %2
ret i32* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int i = 1;
  do {
    printf("%i\n", i);
    i++;
  } while (i < 10);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x9,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%i\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 2)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 4)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 5)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 6)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 7)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 8)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdout;
int main(int argc, char *argv[]) {
  while (1) {
    fprintf(stdout, "Hello World!\n");
    fflush(stdout);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea3(%rip),%rax
mov    (%rax),%edi
lea    0xeba(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e8e(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
jmp    1136 <main+0x16>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    0x2eb5(%rip),%rbx
lea    0xece(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%rbx),%edi
mov    %r14,%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
call   1040 <fflush@plt>
jmp    1140 <main+0x20>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [14 x i8] c"Hello World!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
br label %6
6: ; preds = %2, %6
%7 = load i32, i32* @stdout
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* @stdout
%10 = call i32 @fflush(i32 %9)
br label %6
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [14 x i8] c"Hello World!\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %2, %3
%4 = load i32, i32* @stdout
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @stdout
%7 = tail call i32 @fflush(i32 %6)
br label %3
}
XUnloadFont() {}


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

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

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

LLVM IR (-O2):
define i32 @XUnloadFont() {
ret i32 undef
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned int button;
};
typedef TYPE_1__ XButtonEvent;

/* Variables and functions */
void set_XButtonEvent_button(void *_p, unsigned _v) {
  ((XButtonEvent *)_p)->button = (unsigned)_v;
}


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

x86 assembly (clang, -O2):
<set_XButtonEvent_button>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XButtonEvent_button(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XButtonEvent_button(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Type definitions */
struct qqclient {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ prot_group_download_labels(struct qqclient *,
                                              int /*<<< orphan*/);
void group_update_list(struct qqclient *qq) {
  prot_group_download_labels(qq, 0);
}


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

x86 assembly (clang, -O2):
<group_update_list>:
xor    %esi,%esi
jmp    1030 <prot_group_download_labels@plt>

LLVM IR (-O0):
%struct.qqclient = type { i32 }
define void @group_update_list(%struct.qqclient* %0) {
%2 = alloca %struct.qqclient*
store %struct.qqclient* %0, %struct.qqclient** %2
%3 = load %struct.qqclient*, %struct.qqclient** %2
%4 = call i32 @prot_group_download_labels(%struct.qqclient* %3, i32 0)
ret void
}

LLVM IR (-O2):
%struct.qqclient = type { i32 }
define void @group_update_list(%struct.qqclient* %0) {
%2 = tail call i32 @prot_group_download_labels(%struct.qqclient* %0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Test();
int main(int argc, char *argv[]) { Test(); }


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

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 (...) @Test()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @Test()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint32_t get_cycle_count(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @get_cycle_count() {
ret i32 0
}
void foo_radar12278788() { return; }


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @radio_df_ant_switch_spacing_set_4us() {
ret void
}
OP(fd, dd) {
  illegal_1();
  op_dd();
}


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_dd@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_dd@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_dd()
%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_dd()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ print(char *);
int /*<<< orphan*/ printid(int);
int main() {
  int i = 0;
lbl:
  if (i != 10) {
    i++;
    goto lbl;
  }
  print("i  10");
  printid(i);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
je     114e <main+0x2e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
lea    0xeab(%rip),%rdi
call   1030 <print@plt>
mov    -0x8(%rbp),%edi
call   1040 <printid@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <print@plt>
mov    $0xa,%edi
call   1040 <printid@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"i 10\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %6, %0
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 10
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 1
store i32 %8, i32* %2
br label %3
9: ; preds = %3
%10 = call i32 @print(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%11 = load i32, i32* %2
%12 = call i32 @printid(i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"i 10\00"
define i32 @main() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printid(i32 10)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ socklen_t;

/* Variables and functions */
int socketcall(int (*)(int, int, int, void *, int /*<<< orphan*/ *), int, int,
               int, void *, int /*<<< orphan*/ *, int /*<<< orphan*/);
int getsockopt(int fd, int level, int optname, void *optval,
               socklen_t *optlen) {
  return socketcall(getsockopt, fd, level, optname, optval, optlen, 0);
}


x86 assembly (clang, -O0):
<getsockopt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%r8
mov    -0x20(%rbp),%r9
mov    0x2eaf(%rip),%rdi
xor    %eax,%eax
movl   $0x0,(%rsp)
call   1030 <socketcall@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getsockopt>:
push   %rax
mov    %r8,%r9
mov    %rcx,%r8
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
movl   $0x0,(%rsp)
mov    0x2ec5(%rip),%rdi
call   1030 <socketcall@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @getsockopt(i32 %0, i32 %1, i32 %2, i8* %3, i32* %4) {
%6 = tail call i32 @socketcall(i32 (i32, i32, i32, i8*, i32*)* @getsockopt, i32 %0, i32 %1, i32 %2, i8* %3, i32* %4, i32 0)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) { printf("\nHallo Welt!\n"); }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"\0AHallo Welt!\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [13 x i8] c"\0AHallo Welt!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_close() {
  printf("NOT IMPLEMENTED:"
         "pa_close"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [26 x i8] c"NOT IMPLEMENTED:pa_close\0A\00"
define i32 @pa_close() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [25 x i8] c"NOT IMPLEMENTED:pa_close\00"
define i32 @pa_close() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ assert_equal_int(int, int, char *, int);
void list_func(void *data, void *user_data) {
  assert_equal_int(*(int *)data, ++*(int *)user_data,
                   "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                   "outputs/2022-01-22/02-19-57/repos/kichikuou/xsystem35-sdl2/"
                   "refs/heads/master/modules/lib/list_test.c",
                   24);
}


x86 assembly (clang, -O0):
<list_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
add    $0x1,%esi
mov    %esi,(%rax)
lea    0xec8(%rip),%rdx
mov    $0x18,%ecx
call   1030 <assert_equal_int@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<list_func>:
mov    (%rdi),%edi
mov    (%rsi),%eax
add    $0x1,%eax
mov    %eax,(%rsi)
lea    0xee0(%rip),%rdx
mov    %eax,%esi
mov    $0x18,%ecx
jmp    1030 <assert_equal_int@plt>

LLVM IR (-O0):
@.str = [157 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/kichikuou/xsystem35-sdl2/refs/heads/master/modules/lib/list_test.c\00"
define void @list_func(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 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = add nsw i32 %10, 1
store i32 %11, i32* %9
%12 = call i32 @assert_equal_int(i32 %7, i32 %11, i8* getelementptr inbounds ([157 x i8], [157 x i8]* @.str, i64 0, i64 0), i32 24)
ret void
}

LLVM IR (-O2):
@.str = [157 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/kichikuou/xsystem35-sdl2/refs/heads/master/modules/lib/list_test.c\00"
define void @list_func(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = add nsw i32 %6, 1
store i32 %7, i32* %5
%8 = tail call i32 @assert_equal_int(i32 %4, i32 %7, i8* getelementptr inbounds ([157 x i8], [157 x i8]* @.str, i64 0, i64 0), i32 24)
ret void
}
/* Variables and functions */
int fptr_capi20_get_message(unsigned int, unsigned char **);
scalar_t__ loadlib();
unsigned capi20_get_message(unsigned ApplID, unsigned char **Buf) {
  if (loadlib() < 0)
    return 0x1009;
  return fptr_capi20_get_message(ApplID, Buf);
}


x86 assembly (clang, -O0):
<capi20_get_message>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <loadlib@plt>
cmp    $0x0,%rax
jge    114c <capi20_get_message+0x2c>
movl   $0x1009,-0x4(%rbp)
jmp    115b <capi20_get_message+0x3b>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <fptr_capi20_get_message@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<capi20_get_message>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %eax,%eax
call   1040 <loadlib@plt>
test   %rax,%rax
js     1144 <capi20_get_message+0x24>
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <fptr_capi20_get_message@plt>
mov    $0x1009,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @capi20_get_message(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i64 (...) @loadlib()
%7 = icmp slt i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 4105, i32* %3
br label %13
9: ; preds = %2
%10 = load i32, i32* %4
%11 = load i8**, i8*** %5
%12 = call i32 @fptr_capi20_get_message(i32 %10, i8** %11)
store i32 %12, i32* %3
br label %13
13: ; preds = %9, %8
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @capi20_get_message(i32 %0, i8** %1) {
%3 = tail call i64 (...) @loadlib()
%4 = icmp slt i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @fptr_capi20_get_message(i32 %0, i8** %1)
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ %6, %5 ], [ 4105, %2 ]
ret i32 %8
}