xunge/DecIR huggingface dataset:
int copyString(char *str1, char *out) {
  if (!str1 || !out)
    return -1;
  while (*str1 != '\0') {
    *out++ = *str1++;
  }
  *out = '\0';
  return 0;
}


x86 assembly (clang, -O0):
<copyString>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1122 <copyString+0x22>
cmpq   $0x0,-0x18(%rbp)
jne    112e <copyString+0x2e>
movl   $0xffffffff,-0x4(%rbp)
jmp    1178 <copyString+0x78>
jmp    1133 <copyString+0x33>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     116a <copyString+0x6a>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
jmp    1133 <copyString+0x33>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<copyString>:
mov    $0xffffffff,%eax
test   %rdi,%rdi
je     1136 <copyString+0x36>
test   %rsi,%rsi
je     1136 <copyString+0x36>
mov    (%rdi),%al
test   %al,%al
je     1131 <copyString+0x31>
add    $0x1,%rdi
nopl   0x0(%rax)
mov    %al,(%rsi)
add    $0x1,%rsi
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
jne    1120 <copyString+0x20>
movb   $0x0,(%rsi)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @copyString(i8* %0, i8* writeonly %1) {
%3 = icmp ne i8* %0, null
%4 = icmp ne i8* %1, null
%5 = and i1 %3, %4
br i1 %5, label %6, label %19
6: ; preds = %2
%7 = load i8, i8* %0
%8 = icmp eq i8 %7, 0
br i1 %8, label %17, label %9
9: ; preds = %6, %9
%10 = phi i8 [ %15, %9 ], [ %7, %6 ]
%11 = phi i8* [ %14, %9 ], [ %1, %6 ]
%12 = phi i8* [ %13, %9 ], [ %0, %6 ]
%13 = getelementptr inbounds i8, i8* %12, i64 1
%14 = getelementptr inbounds i8, i8* %11, i64 1
store i8 %10, i8* %11
%15 = load i8, i8* %13
%16 = icmp eq i8 %15, 0
br i1 %16, label %17, label %9
17: ; preds = %9, %6
%18 = phi i8* [ %1, %6 ], [ %14, %9 ]
store i8 0, i8* %18
br label %19
19: ; preds = %2, %17
%20 = phi i32 [ 0, %17 ], [ -1, %2 ]
ret i32 %20
}
/* Variables and functions */
int /*<<< orphan*/ klucz(int);
int /*<<< orphan*/ printf(char *);
int scanf(char *, int *);
int /*<<< orphan*/ wypisz(int /*<<< orphan*/);
int main() {
  int n, m;
  m = scanf("%i", &n);
  while (m == 1) {
    wypisz(klucz(n));
    m = scanf("%i", &n);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jne    1193 <main+0x53>
mov    -0x8(%rbp),%edi
call   1030 <klucz@plt>
mov    %eax,%edi
call   1060 <wypisz@plt>
lea    0xe7e(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    %eax,-0xc(%rbp)
jmp    1162 <main+0x22>
lea    0xe69(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xeb5(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
cmp    $0x1,%eax
jne    1190 <main+0x50>
lea    0xe9f(%rip),%r14
lea    0x4(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
mov    0x4(%rsp),%edi
call   1040 <klucz@plt>
mov    %eax,%edi
call   1060 <wypisz@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
cmp    $0x1,%eax
je     1170 <main+0x30>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%i\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %5, label %11
5: ; preds = %0, %5
%6 = load i32, i32* %1
%7 = call i32 @klucz(i32 %6)
%8 = call i32 @wypisz(i32 %7)
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%10 = icmp eq i32 %9, 1
br i1 %10, label %5, label %11
11: ; preds = %5, %0
%12 = call i32 @putchar(i32 10)
ret i32 0
}
/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ vecMatrixMult(int);
int main(int argc, char *argv[]) {
  int n = atoi(argv[1]);
  vecMatrixMult(n);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <vecMatrixMult@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
call   1040 <atoi@plt>
mov    %eax,%edi
call   1030 <vecMatrixMult@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = load i8**, i8*** %4
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = call i32 @atoi(i8* %8)
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = call i32 @vecMatrixMult(i32 %10)
ret i32 0
}

LLVM IR (-O2):
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 @atoi(i8* %4)
%6 = tail call i32 @vecMatrixMult(i32 %5)
ret i32 0
}
/* Variables and functions */
char *strpbrk(char *, char const *);
char *strcutpbrk(char *str, const char *accept) {
  if (str == NULL)
    return NULL;
  if (accept == NULL)
    return str;
  char *at = strpbrk(str, accept);
  if (at != NULL)
    *at = '\0';
  return str;
}


x86 assembly (clang, -O0):
<strcutpbrk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1138 <strcutpbrk+0x28>
movq   $0x0,-0x8(%rbp)
jmp    117b <strcutpbrk+0x6b>
cmpq   $0x0,-0x18(%rbp)
jne    1150 <strcutpbrk+0x40>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    117b <strcutpbrk+0x6b>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strpbrk@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1173 <strcutpbrk+0x63>
mov    -0x20(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcutpbrk>:
push   %rbx
mov    %rdi,%rbx
test   %rdi,%rdi
je     112e <strcutpbrk+0x1e>
test   %rsi,%rsi
je     112e <strcutpbrk+0x1e>
mov    %rbx,%rdi
call   1030 <strpbrk@plt>
test   %rax,%rax
je     112e <strcutpbrk+0x1e>
movb   $0x0,(%rax)
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @strcutpbrk(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, null
%4 = icmp eq i8* %1, null
%5 = or i1 %3, %4
br i1 %5, label %10, label %6
6: ; preds = %2
%7 = tail call i8* @strpbrk(i8* %0, i8* %1)
%8 = icmp eq i8* %7, null
br i1 %8, label %10, label %9
9: ; preds = %6
store i8 0, i8* %7
br label %10
10: ; preds = %6, %9, %2
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ _stan_cfg_add_pair(int /*<<< orphan*/);
int /*<<< orphan*/ _stan_cfg_pair_new(char *, char *);
int stan_cfg_init() {
  _stan_cfg_add_pair(_stan_cfg_pair_new("color", "1"));
  _stan_cfg_add_pair(_stan_cfg_pair_new("syntax", "Intel"));
  return 0;
}


x86 assembly (clang, -O0):
<stan_cfg_init>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed4(%rip),%rsi
call   1040 <_stan_cfg_pair_new@plt>
mov    %eax,%edi
call   1030 <_stan_cfg_add_pair@plt>
lea    0xec3(%rip),%rdi
lea    0xec3(%rip),%rsi
call   1040 <_stan_cfg_pair_new@plt>
mov    %eax,%edi
call   1030 <_stan_cfg_add_pair@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stan_cfg_init>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed7(%rip),%rsi
call   1040 <_stan_cfg_pair_new@plt>
mov    %eax,%edi
call   1030 <_stan_cfg_add_pair@plt>
lea    0xec6(%rip),%rdi
lea    0xec6(%rip),%rsi
call   1040 <_stan_cfg_pair_new@plt>
mov    %eax,%edi
call   1030 <_stan_cfg_add_pair@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"color\00"
@.str.1 = [2 x i8] c"1\00"
@.str.2 = [7 x i8] c"syntax\00"
@.str.3 = [6 x i8] c"Intel\00"
define i32 @stan_cfg_init() {
%1 = call i32 @_stan_cfg_pair_new(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @_stan_cfg_add_pair(i32 %1)
%3 = call i32 @_stan_cfg_pair_new(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%4 = call i32 @_stan_cfg_add_pair(i32 %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"color\00"
@.str.1 = [2 x i8] c"1\00"
@.str.2 = [7 x i8] c"syntax\00"
@.str.3 = [6 x i8] c"Intel\00"
define i32 @stan_cfg_init() {
%1 = tail call i32 @_stan_cfg_pair_new(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @_stan_cfg_add_pair(i32 %1)
%3 = tail call i32 @_stan_cfg_pair_new(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%4 = tail call i32 @_stan_cfg_add_pair(i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
void myprintf(char *message) {
  while ((*message) != '\0') {
    char c = *message;
    printf("%c", c);
    message = message + 1;
  }
}


x86 assembly (clang, -O0):
<myprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1156 <myprintf+0x46>
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x9(%rbp)
lea    0xec4(%rip),%rdi
movsbl -0x9(%rbp),%esi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <myprintf+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myprintf>:
push   %r14
push   %rbx
push   %rax
mov    (%rdi),%al
test   %al,%al
je     1146 <myprintf+0x36>
mov    %rdi,%rbx
add    $0x1,%rbx
lea    0xed8(%rip),%r14
nopl   0x0(%rax,%rax,1)
movsbl %al,%esi
mov    %r14,%rdi
call   1030 <printf@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <myprintf+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define void @myprintf(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %5)
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
/* Type definitions */
typedef unsigned int uint8_t;

/* Variables and functions */
unsigned int mput3l(unsigned int value, uint8_t *data) {
  data[0] = value & 0xff;
  data[1] = (value >> 8) & 0xff;
  data[2] = (value >> 16) & 0xff;
  return data[2];
}


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

x86 assembly (clang, -O2):
<mput3l>:
mov    %edi,%eax
movzbl %al,%ecx
mov    %ecx,(%rsi)
movzbl %ah,%ecx
mov    %ecx,0x4(%rsi)
shr    $0x10,%eax
movzbl %al,%eax
mov    %eax,0x8(%rsi)
ret

LLVM IR (-O0):
define i32 @mput3l(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
store i32* %1, i32** %4
%5 = load i32, i32* %3
%6 = and i32 %5, 255
%7 = load i32*, i32** %4
%8 = getelementptr inbounds i32, i32* %7, i64 0
store i32 %6, i32* %8
%9 = load i32, i32* %3
%10 = lshr i32 %9, 8
%11 = and i32 %10, 255
%12 = load i32*, i32** %4
%13 = getelementptr inbounds i32, i32* %12, i64 1
store i32 %11, i32* %13
%14 = load i32, i32* %3
%15 = lshr i32 %14, 16
%16 = and i32 %15, 255
%17 = load i32*, i32** %4
%18 = getelementptr inbounds i32, i32* %17, i64 2
store i32 %16, i32* %18
%19 = load i32*, i32** %4
%20 = getelementptr inbounds i32, i32* %19, i64 2
%21 = load i32, i32* %20
ret i32 %21
}

LLVM IR (-O2):
define i32 @mput3l(i32 %0, i32* nocapture writeonly %1) {
%3 = and i32 %0, 255
store i32 %3, i32* %1
%4 = lshr i32 %0, 8
%5 = and i32 %4, 255
%6 = getelementptr inbounds i32, i32* %1, i64 1
store i32 %5, i32* %6
%7 = lshr i32 %0, 16
%8 = and i32 %7, 255
%9 = getelementptr inbounds i32, i32* %1, i64 2
store i32 %8, i32* %9
ret i32 %8
}
float u2f(unsigned u) {
  union {
    unsigned u;
    float f;
  } a;
  a.u = u;
  return a.f;
}


x86 assembly (clang, -O0):
<u2f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<u2f>:
movd   %edi,%xmm0
ret

LLVM IR (-O0):
%union.anon = type { i32 }
define float @u2f(i32 %0) {
%2 = alloca i32
%3 = alloca %union.anon
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = bitcast %union.anon* %3 to i32*
store i32 %4, i32* %5
%6 = bitcast %union.anon* %3 to float*
%7 = load float, float* %6
ret float %7
}

LLVM IR (-O2):
define float @u2f(i32 %0) {
%2 = bitcast i32 %0 to float
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ refresh();
void ncurses_display_refresh(void) { refresh(); }


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

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

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

LLVM IR (-O2):
define void @ncurses_display_refresh() {
%1 = tail call i32 (...) @refresh()
ret void
}
int wario_panel_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @wario_panel_init() {
ret i32 0
}
/* Variables and functions */
int Send_Sample();
int main(void) { return Send_Sample(); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @Send_Sample()
ret i32 %1
}
/* Type definitions */
typedef char *__u64;

/* Variables and functions */
__u64 ___arch__swab64(__u64 x) {
  asm("bswapq %0" : "=r"(x) : "0"(x));
  return x;
}


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

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

LLVM IR (-O0):
define i8* @___arch__swab64(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* asm "bswapq $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i8* %3)
store i8* %4, i8** %2
%5 = load i8*, i8** %2
ret i8* %5
}

LLVM IR (-O2):
define i8* @___arch__swab64(i8* readnone %0) {
%2 = tail call i8* asm "bswapq $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret i8* %2
}
void extension_version(const unsigned char *x) {
  (void)("Extension version: %d\n", x[1]);
}


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

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

LLVM IR (-O0):
@.str = [23 x i8] c"Extension version: %d\0A\00"
define void @extension_version(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = load i8, i8* %4
ret void
}

LLVM IR (-O2):
define void @extension_version(i8* nocapture %0) {
ret void
}
void f41(void) {
  ({
    ({
      a:
        goto a;
        0;
    });
    ({ 0; });
    0;
  });
  ({
    ({ 0; });
    ({ 0; });
    0;
  });
  0;
}


x86 assembly (clang, -O0):
<f41>:
push   %rbp
mov    %rsp,%rbp
jmp    1104 <f41+0x4>

x86 assembly (clang, -O2):
<f41>:
jmp    1100 <f41>

LLVM IR (-O0):
define void @f41() {
%1 = alloca i32
%2 = alloca i32
br label %3
3: ; preds = %3, %0
br label %3
}

LLVM IR (-O2):
define void @f41() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ functionA();
void __attribute((always_)) functionB(void) { functionA(); }


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

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

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

LLVM IR (-O2):
define void @functionB() {
%1 = tail call i32 (...) @functionA()
ret void
}
int __compare(const void *v1, const void *v2) {
  return *(int *)v1 > *(int *)v2;
}


x86 assembly (clang, -O0):
<__compare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__compare>:
mov    (%rdi),%ecx
xor    %eax,%eax
cmp    (%rsi),%ecx
setg   %al
ret

LLVM IR (-O0):
define i32 @__compare(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 = icmp sgt i32 %7, %10
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @__compare(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 = icmp sgt i32 %4, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
const char *__malidrv_build_info(void) {
  return "malidrv:  CONFIG=ux500 USING_OS_MEMORY=1 API_VERSION=9 REPO_URL= "
         "REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=pią, 22 lut "
         "2013, 21:16:27 CET BUILD=DEBUG CPU=ux500 USING_UMP=1 USING_HWMEM=1 "
         "USING_PMM=1 USING_MALI200=0 USING_MALI400=3 USING_MALI400_L2_CACHE=1 "
         "USING_GP2=0 KDIR= MALI_PLATFORM_FILE=platform/ux500/mali_platform.c "
         "OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=6 USING_PROFILING=1 "
         "USING_INTERNAL_PROFILING=0 USING_GPU_UTILIZATION=1 "
         "USING_MALI_RUN_TIME_PM=1";
}


x86 assembly (clang, -O0):
<__malidrv_build_info>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__malidrv_build_info>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [465 x i8] c"malidrv: CONFIG=ux500 USING_OS_MEMORY=1 API_VERSION=9 REPO_URL= REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=pi\C4\85, 22 lut 2013, 21:16:27 CET BUILD=DEBUG CPU=ux500 USING_UMP=1 USING_HWMEM=1 USING_PMM=1 USING_MALI200=0 USING_MALI400=3 USING_MALI400_L2_CACHE=1 USING_GP2=0 KDIR= MALI_PLATFORM_FILE=platform/ux500/mali_platform.c OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=6 USING_PROFILING=1 USING_INTERNAL_PROFILING=0 USING_GPU_UTILIZATION=1 USING_MALI_RUN_TIME_PM=1\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([465 x i8], [465 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [465 x i8] c"malidrv: CONFIG=ux500 USING_OS_MEMORY=1 API_VERSION=9 REPO_URL= REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=pi\C4\85, 22 lut 2013, 21:16:27 CET BUILD=DEBUG CPU=ux500 USING_UMP=1 USING_HWMEM=1 USING_PMM=1 USING_MALI200=0 USING_MALI400=3 USING_MALI400_L2_CACHE=1 USING_GP2=0 KDIR= MALI_PLATFORM_FILE=platform/ux500/mali_platform.c OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=6 USING_PROFILING=1 USING_INTERNAL_PROFILING=0 USING_GPU_UTILIZATION=1 USING_MALI_RUN_TIME_PM=1\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([465 x i8], [465 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
double _nextafter(double, double);
double nextafter(double x, double y) { return _nextafter(x, y); }


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

x86 assembly (clang, -O2):
<nextafter>:
jmp    1030 <_nextafter@plt>

LLVM IR (-O0):
define double @nextafter(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 = call double @_nextafter(double %5, double %6)
ret double %7
}

LLVM IR (-O2):
define double @nextafter(double %0, double %1) {
%3 = tail call double @_nextafter(double %0, double %1)
ret double %3
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ squeeze(char *, char *);
int main(void) {
  char s1[] = "hello";
  char s2[] = "world";
  squeeze(s1, s2);
  printf("%s\n", s1);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xecb(%rip),%eax
mov    %eax,-0xa(%rbp)
mov    0xec5(%rip),%ax
mov    %ax,-0x6(%rbp)
mov    0xebd(%rip),%eax
mov    %eax,-0x10(%rbp)
mov    0xeb7(%rip),%ax
mov    %ax,-0xc(%rbp)
lea    -0xa(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <squeeze@plt>
lea    -0xa(%rbp),%rsi
lea    0xe9d(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e65(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movw   $0x6f,0xc(%rsp)
movl   $0x6c6c6568,0x8(%rsp)
6c
movw   $0x64,0x4(%rsp)
movl   $0x6c726f77,(%rsp)
lea    0x8(%rsp),%rbx
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1030 <squeeze@plt>
lea    0xeb3(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    0x2e78(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.s1 = [6 x i8] c"hello\00"
@__const.main.s2 = [6 x i8] c"world\00"
@.str = [4 x i8] c"%s\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca [6 x i8]
%3 = alloca [6 x i8]
store i32 0, i32* %1
%4 = bitcast [6 x i8]* %2 to i8*
%5 = bitcast [6 x i8]* %3 to i8*
%6 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%7 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
%8 = call i32 @squeeze(i8* %6, i8* %7)
%9 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = load i32, i32* @EXIT_SUCCESS
ret i32 %11
}

LLVM IR (-O2):
@__const.main.s1 = [6 x i8] c"hello\00"
@__const.main.s2 = [6 x i8] c"world\00"
@.str = [4 x i8] c"%s\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca [6 x i8]
%2 = alloca [6 x i8]
%3 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%5 = call i32 @squeeze(i8* %3, i8* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}
int finitef(float x) { return __builtin_isfinite(x); }


x86 assembly (clang, -O0):
<finitef>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movaps 0xefb(%rip),%xmm1
pand   %xmm1,%xmm0
movss  0xedf(%rip),%xmm1
ucomiss %xmm1,%xmm0
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<finitef>:
andps  0xef9(%rip),%xmm0
xor    %eax,%eax
ucomiss 0xf00(%rip),%xmm0
setne  %al
ret

LLVM IR (-O0):
define i32 @finitef(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @llvm.fabs.f32(float %3)
%5 = fcmp one float %4, 0x7FF0000000000000
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @finitef(float %0) {
%2 = tail call float @llvm.fabs.f32(float %0)
%3 = fcmp one float %2, 0x7FF0000000000000
%4 = zext i1 %3 to i32
ret i32 %4
}
void fill_in_probability(float *dest, char *token) {
  char *end_ptr;
  assert(token);
  *dest = strtof(token, &end_ptr);
  assert(0.0f <= *dest);
  assert(1.0f >= *dest);
}


x86 assembly (clang, -O0):
<fill_in_probability>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1040 <assert@plt>
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <strtof@plt>
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1040 <assert@plt>
mov    -0x8(%rbp),%rax
movss  0xe87(%rip),%xmm0
ucomiss (%rax),%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1040 <assert@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fill_in_probability>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
xor    %eax,%eax
call   1040 <assert@plt>
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1030 <strtof@plt>
movss  %xmm0,(%r14)
xorps  %xmm1,%xmm1
xor    %edi,%edi
ucomiss %xmm1,%xmm0
setae  %dil
xor    %eax,%eax
call   1040 <assert@plt>
movss  0xea1(%rip),%xmm0
xor    %edi,%edi
ucomiss (%r14),%xmm0
setae  %dil
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <assert@plt>

LLVM IR (-O0):
define void @fill_in_probability(float* %0, i8* %1) {
%3 = alloca float*
%4 = alloca i8*
%5 = alloca i8*
store float* %0, float** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call i32 (i8*, ...) bitcast (i32 (...)* @assert to i32 (i8*, ...)*)(i8* %6)
%8 = load i8*, i8** %4
%9 = call float @strtof(i8* %8, i8** %5)
%10 = load float*, float** %3
store float %9, float* %10
%11 = load float*, float** %3
%12 = load float, float* %11
%13 = fcmp ole float 0.000000e+00, %12
%14 = zext i1 %13 to i32
%15 = call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %14)
%16 = load float*, float** %3
%17 = load float, float* %16
%18 = fcmp oge float 1.000000e+00, %17
%19 = zext i1 %18 to i32
%20 = call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %19)
ret void
}

LLVM IR (-O2):
define void @fill_in_probability(float* nocapture %0, i8* %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
%5 = tail call i32 (i8*, ...) bitcast (i32 (...)* @assert to i32 (i8*, ...)*)(i8* %1)
%6 = call float @strtof(i8* %1, i8** %3)
store float %6, float* %0
%7 = fcmp oge float %6, 0.000000e+00
%8 = zext i1 %7 to i32
%9 = tail call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %8)
%10 = load float, float* %0
%11 = fcmp ole float %10, 1.000000e+00
%12 = zext i1 %11 to i32
%13 = tail call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %12)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void clearScreen() { printf("\033[2J"); }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"\1B[2J\00"
define void @clearScreen() {
%1 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"\1B[2J\00"
define void @clearScreen() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ countdown(int);
int main() {
  countdown(5);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @countdown(i32 5)
ret i32 0
}
/* Variables and functions */
double SFMSanitizeRadians(double);
double SFMDegreesToRadians(double d) {
  return (SFMSanitizeRadians(d * (3.14159265 / 180)));
}


x86 assembly (clang, -O0):
<SFMDegreesToRadians>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1030 <SFMSanitizeRadians@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SFMDegreesToRadians>:
mulsd  0xee8(%rip),%xmm0
jmp    1030 <SFMSanitizeRadians@plt>

LLVM IR (-O0):
define double @SFMDegreesToRadians(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 0x3F91DF46A1FAE712
%5 = call double @SFMSanitizeRadians(double %4)
ret double %5
}

LLVM IR (-O2):
define double @SFMDegreesToRadians(double %0) {
%2 = fmul double %0, 0x3F91DF46A1FAE712
%3 = tail call double @SFMSanitizeRadians(double %2)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, size_t);
void *malloc(size_t);
int /*<<< orphan*/ stderr;
void *ts_malloc(size_t size) {
  void *result = malloc(size);
  if (size > 0 && !result) {
    fprintf(stderr, "tree-sitter failed to allocate %lu bytes", size);
    exit(1);
  }
  return result;
}


x86 assembly (clang, -O0):
<ts_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
jbe    1182 <ts_malloc+0x52>
cmpq   $0x0,-0x10(%rbp)
jne    1182 <ts_malloc+0x52>
mov    0x2e7a(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe8d(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ts_malloc>:
push   %rbx
mov    %rdi,%rbx
call   1040 <malloc@plt>
test   %rbx,%rbx
je     1143 <ts_malloc+0x13>
test   %rax,%rax
je     1145 <ts_malloc+0x15>
pop    %rbx
ret
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
lea    0xeab(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [41 x i8] c"tree-sitter failed to allocate %lu bytes\00"
define i8* @ts_malloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i64, i64* %2
%7 = icmp ugt i64 %6, 0
br i1 %7, label %8, label %16
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = icmp ne i8* %9, null
br i1 %10, label %16, label %11
11: ; preds = %8
%12 = load i32, i32* @stderr
%13 = load i64, i64* %2
%14 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i64 %13)
%15 = call i32 @exit(i32 1)
unreachable
16: ; preds = %8, %1
%17 = load i8*, i8** %3
ret i8* %17
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [41 x i8] c"tree-sitter failed to allocate %lu bytes\00"
define noalias i8* @ts_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i64 %0, 0
%4 = icmp ne i8* %2, null
%5 = or i1 %3, %4
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i64 %0)
%9 = tail call i32 @exit(i32 1)
unreachable
10: ; preds = %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0xa0() {
  Assert_real((ispunct(160) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_ispunct.c",
              805, ("ispunct should be 0 for 0xa0"));
}


x86 assembly (clang, -O0):
<t_ispunct_0xa0>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa0,%edi
call   1030 <ispunct@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x325,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_ispunct_0xa0>:
push   %rax
mov    $0xa0,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x325,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xa0\00"
define void @t_ispunct_0xa0() {
%1 = call i64 @ispunct(i32 160)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 805, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xa0\00"
define void @t_ispunct_0xa0() {
%1 = tail call i64 @ispunct(i32 160)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 805, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128d;

/* Variables and functions */
long long _mm_cvtsd_si64(int /*<<< orphan*/);
long long test_mm_cvtsd_si64(__m128d A) { return _mm_cvtsd_si64(A); }


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

x86 assembly (clang, -O2):
<test_mm_cvtsd_si64>:
jmp    1030 <_mm_cvtsd_si64@plt>

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

LLVM IR (-O2):
define i64 @test_mm_cvtsd_si64(i32 %0) {
%2 = tail call i64 @_mm_cvtsd_si64(i32 %0)
ret i64 %2
}
void attach_power_plant(struct building *bldng, struct powerplant *pplant) {}


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

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

LLVM IR (-O0):
%struct.building = type opaque
%struct.powerplant = type opaque
define void @attach_power_plant(%struct.building* %0, %struct.powerplant* %1) {
%3 = alloca %struct.building*
%4 = alloca %struct.powerplant*
store %struct.building* %0, %struct.building** %3
store %struct.powerplant* %1, %struct.powerplant** %4
ret void
}

LLVM IR (-O2):
%struct.building = type opaque
%struct.powerplant = type opaque
define void @attach_power_plant(%struct.building* nocapture %0, %struct.powerplant* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void o_print(char *p_o) { printf("->%s\n", p_o); }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"->%s\0A\00"
define void @o_print(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
scalar_t__ RAND_MAX;
double fabs(int /*<<< orphan*/);
int /*<<< orphan*/ init_rand();
int /*<<< orphan*/ rand();
double frand() {
  init_rand();
  return fabs(rand()) / (double)RAND_MAX;
}


x86 assembly (clang, -O0):
<frand>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <init_rand@plt>
mov    $0x0,%al
call   1050 <rand@plt>
mov    %eax,%edi
call   1030 <fabs@plt>
mov    0x2e98(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<frand>:
push   %rax
xor    %eax,%eax
call   1040 <init_rand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
mov    %eax,%edi
call   1030 <fabs@plt>
mov    0x2e9b(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global i64 0
define double @frand() {
%1 = call i32 (...) @init_rand()
%2 = call i32 (...) @rand()
%3 = call double @fabs(i32 %2)
%4 = load i64, i64* @RAND_MAX
%5 = sitofp i64 %4 to double
%6 = fdiv double %3, %5
ret double %6
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define double @frand() {
%1 = tail call i32 (...) @init_rand()
%2 = tail call i32 (...) @rand()
%3 = tail call double @fabs(i32 %2)
%4 = load i64, i64* @RAND_MAX
%5 = sitofp i64 %4 to double
%6 = fdiv double %3, %5
ret double %6
}
int case_insensitive_paths(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @case_insensitive_paths() {
ret i32 0
}
int _calc_filter_delay(int width, int ntaps) {
  int delay;
  ntaps /= 2;
  delay = (ntaps + width - 1) / width;
  delay = width * delay - ntaps;
  return (delay);
}


x86 assembly (clang, -O0):
<_calc_filter_delay>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    -0x4(%rbp),%eax
sub    $0x1,%eax
cltd
idivl  -0x4(%rbp)
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
imul   -0xc(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_calc_filter_delay>:
mov    %esi,%eax
shr    $0x1f,%eax
add    %esi,%eax
sar    %eax
add    %edi,%eax
add    $0xffffffff,%eax
cltd
idiv   %edi
neg    %edx
lea    (%rdi,%rdx,1),%eax
add    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @_calc_filter_delay(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = sdiv i32 %6, 2
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = load i32, i32* %3
%10 = add nsw i32 %8, %9
%11 = sub nsw i32 %10, 1
%12 = load i32, i32* %3
%13 = sdiv i32 %11, %12
store i32 %13, i32* %5
%14 = load i32, i32* %3
%15 = load i32, i32* %5
%16 = mul nsw i32 %14, %15
%17 = load i32, i32* %4
%18 = sub nsw i32 %16, %17
store i32 %18, i32* %5
%19 = load i32, i32* %5
ret i32 %19
}

LLVM IR (-O2):
define i32 @_calc_filter_delay(i32 %0, i32 %1) {
%3 = sdiv i32 %1, 2
%4 = add i32 %0, -1
%5 = add i32 %4, %3
%6 = srem i32 %5, %0
%7 = sub i32 %4, %6
ret i32 %7
}
/* Variables and functions */
char *malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
char *strset(char *str) {
  char *result = malloc(strlen(str) + 1);
  strcpy(result, str);
  return result;
}


x86 assembly (clang, -O0):
<strset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strset>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @strset(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i8* @malloc(i64 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = load i8*, i8** %2
%10 = call i32 @strcpy(i8* %8, i8* %9)
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
define i8* @strset(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @malloc(i64 %3)
%5 = tail call i32 @strcpy(i8* %4, i8* %0)
ret i8* %4
}
/* Variables and functions */
scalar_t__ __timezone;
double JDUTCToLocalTime(double utcJD) {
  return utcJD - (double)__timezone / 86400.0;
}


x86 assembly (clang, -O0):
<JDUTCToLocalTime>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    0x2ed3(%rip),%rax
cvtsi2sdq (%rax),%xmm1
movsd  0xede(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<JDUTCToLocalTime>:
mov    0x2ee1(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  0xeec(%rip),%xmm1
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
@__timezone = global i64 0
define double @JDUTCToLocalTime(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load i64, i64* @__timezone
%5 = sitofp i64 %4 to double
%6 = fdiv double %5, 8.640000e+04
%7 = fsub double %3, %6
ret double %7
}

LLVM IR (-O2):
@__timezone = global i64 0
define double @JDUTCToLocalTime(double %0) {
%2 = load i64, i64* @__timezone
%3 = sitofp i64 %2 to double
%4 = fdiv double %3, 8.640000e+04
%5 = fsub double %0, %4
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage() {
  extern char *__progname;
  fprintf(stderr, "usage: %s <ServerPORT> <RequestedFilePath> <LogFilePath>\n",
          __progname);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
mov    0x2e94(%rip),%rax
mov    (%rax),%rdx
lea    0xec2(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e8e(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [58 x i8] c"usage: %s <ServerPORT> <RequestedFilePath> <LogFilePath>\0A\00"
@__progname = external global i8*
@EXIT_FAILURE = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = load i8*, i8** @__progname
%3 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = load i32, i32* @EXIT_FAILURE
%5 = call i32 @exit(i32 %4)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [58 x i8] c"usage: %s <ServerPORT> <RequestedFilePath> <LogFilePath>\0A\00"
@__progname = external global i8*
@EXIT_FAILURE = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = load i8*, i8** @__progname
%3 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}