xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_licence_snmf() {
  printf(
      "TESS3 Copyright (C) 2015 K. Caye\n"
      "This program is free software: you can redistribute it and/or modify\n"
      "it under the terms of the GNU General Public License as published by\n"
      "the Free Software Foundation, either version 3 of the License, or\n"
      "(at your option) any later version.\n"
      "This program is distributed in the hope that it will be useful,\n"
      "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
      "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n"
      "GNU General Public License for more details.\n"
      "You should have received a copy of the GNU General Public License\n"
      "along with this program.  If not, see "
      "<http://www.gnu.org/licenses/>.\n");
}


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

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

LLVM IR (-O0):
@.str = [644 x i8] c"TESS3 Copyright (C) 2015 K. Caye\0AThis program is free software: you can redistribute it and/or modify\0Ait under the terms of the GNU General Public License as published by\0Athe Free Software Foundation, either version 3 of the License, or\0A(at your option) any later version.\0AThis program is distributed in the hope that it will be useful,\0Abut WITHOUT ANY WARRANTY; without even the implied warranty of\0AMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\0AGNU General Public License for more details.\0AYou should have received a copy of the GNU General Public License\0Aalong with this program. If not, see <http://www.gnu.org/licenses/>.\0A\00"
define void @print_licence_snmf() {
%1 = call i32 @printf(i8* getelementptr inbounds ([644 x i8], [644 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [643 x i8] c"TESS3 Copyright (C) 2015 K. Caye\0AThis program is free software: you can redistribute it and/or modify\0Ait under the terms of the GNU General Public License as published by\0Athe Free Software Foundation, either version 3 of the License, or\0A(at your option) any later version.\0AThis program is distributed in the hope that it will be useful,\0Abut WITHOUT ANY WARRANTY; without even the implied warranty of\0AMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\0AGNU General Public License for more details.\0AYou should have received a copy of the GNU General Public License\0Aalong with this program. If not, see <http://www.gnu.org/licenses/>.\00"
define void @print_licence_snmf() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([643 x i8], [643 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
unsigned int time(int /*<<< orphan*/ *);
unsigned int get_current_timestamp() { return time(NULL); }


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

x86 assembly (clang, -O2):
<get_current_timestamp>:
xor    %edi,%edi
jmp    1030 <time@plt>

LLVM IR (-O0):
define i32 @get_current_timestamp() {
%1 = call i32 @time(i32* null)
ret i32 %1
}

LLVM IR (-O2):
define i32 @get_current_timestamp() {
%1 = tail call i32 @time(i32* null)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ compileExpression();
void compileArgument(void) { compileExpression(); }


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

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

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

LLVM IR (-O2):
define void @compileArgument() {
%1 = tail call i32 (...) @compileExpression()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ isspace(unsigned char);
int empty_string(const char *string) {
  for (; *string; string++)
    if (!isspace((unsigned char)*string))
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<empty_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1160 <empty_string+0x50>
mov    -0x10(%rbp),%rax
movzbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%eax
jne    114a <empty_string+0x3a>
movl   $0x0,-0x4(%rbp)
jmp    1167 <empty_string+0x57>
jmp    114f <empty_string+0x3f>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    111c <empty_string+0xc>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<empty_string>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%al
mov    $0x1,%ebp
test   %al,%al
je     114b <empty_string+0x3b>
mov    %rdi,%rbx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nop
movzbl %al,%edi
call   1030 <isspace@plt>
test   %eax,%eax
je     1149 <empty_string+0x39>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <empty_string+0x20>
jmp    114b <empty_string+0x3b>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @empty_string(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
br label %4
4: ; preds = %15, %1
%5 = load i8*, i8** %3
%6 = load i8, i8* %5
%7 = icmp ne i8 %6, 0
br i1 %7, label %8, label %18
8: ; preds = %4
%9 = load i8*, i8** %3
%10 = load i8, i8* %9
%11 = call i32 @isspace(i8 zeroext %10)
%12 = icmp ne i32 %11, 0
br i1 %12, label %14, label %13
13: ; preds = %8
store i32 0, i32* %2
br label %19
14: ; preds = %8
br label %15
15: ; preds = %14
%16 = load i8*, i8** %3
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %3
br label %4
18: ; preds = %4
store i32 1, i32* %2
br label %19
19: ; preds = %18, %13
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
define i32 @empty_string(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %7
4: ; preds = %7
%5 = load i8, i8* %12
%6 = icmp eq i8 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %1, %4
%8 = phi i8 [ %5, %4 ], [ %2, %1 ]
%9 = phi i8* [ %12, %4 ], [ %0, %1 ]
%10 = tail call i32 @isspace(i8 zeroext %8)
%11 = icmp eq i32 %10, 0
%12 = getelementptr inbounds i8, i8* %9, i64 1
br i1 %11, label %13, label %4
13: ; preds = %7, %4, %1
%14 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %7 ]
ret i32 %14
}
int g(void) { return (2); }


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

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

LLVM IR (-O0):
define i32 @g() {
ret i32 2
}

LLVM IR (-O2):
define i32 @g() {
ret i32 2
}
void money(int total, int *dollars, int *cents) {
  *dollars = (total / 100);
  *cents = (total % 100);
}


x86 assembly (clang, -O0):
<money>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    -0x18(%rbp),%rax
mov    %edx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<money>:
movslq %edi,%rax
imul   $0x51eb851f,%rax,%rcx
mov    %rcx,%rdi
shr    $0x3f,%rdi
sar    $0x25,%rcx
add    %edi,%ecx
mov    %ecx,(%rsi)
imul   $0x64,%ecx,%ecx
sub    %ecx,%eax
mov    %eax,(%rdx)
ret

LLVM IR (-O0):
define void @money(i32 %0, i32* %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32*
store i32 %0, i32* %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%7 = load i32, i32* %4
%8 = sdiv i32 %7, 100
%9 = load i32*, i32** %5
store i32 %8, i32* %9
%10 = load i32, i32* %4
%11 = srem i32 %10, 100
%12 = load i32*, i32** %6
store i32 %11, i32* %12
ret void
}

LLVM IR (-O2):
define void @money(i32 %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2) {
%4 = sdiv i32 %0, 100
store i32 %4, i32* %1
%5 = srem i32 %0, 100
store i32 %5, i32* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMR52_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_WMR52_swap>:
jmp    1030 <U_WMRNOTIMPLEMENTED_swap@plt>

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

LLVM IR (-O2):
define void @U_WMR52_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ c(int);
int main() {
  c(123);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @c(i32 123)
ret i32 0
}
int DelayArg(int value) {
  unsigned int delayarg = 0;
  delayarg = value / 10;
  return (delayarg);
}


x86 assembly (clang, -O0):
<DelayArg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<DelayArg>:
movslq %edi,%rax
imul   $0x66666667,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @DelayArg(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = sdiv i32 %4, 10
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @DelayArg(i32 %0) {
%2 = sdiv i32 %0, 10
ret i32 %2
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
uint32_t addr_align_up(uint32_t addr, uint32_t align) {
  assert((align & (align - 1)) == 0);
  return (align > 0) ? (addr + align - 1) & (~(align - 1)) : addr;
}


x86 assembly (clang, -O0):
<addr_align_up>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x0,-0x8(%rbp)
jle    115f <addr_align_up+0x4f>
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    %eax,-0xc(%rbp)
jmp    1165 <addr_align_up+0x55>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<addr_align_up>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%r14d
lea    -0x1(%rbx),%eax
xor    %edi,%edi
test   %eax,%esi
sete   %dil
call   1030 <assert@plt>
lea    (%r14,%rbx,1),%ecx
add    $0xffffffff,%ecx
mov    %ebx,%eax
neg    %eax
and    %ecx,%eax
test   %ebx,%ebx
cmovle %r14d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @addr_align_up(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %4
%7 = sub nsw i32 %6, 1
%8 = and i32 %5, %7
%9 = icmp eq i32 %8, 0
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
%12 = load i32, i32* %4
%13 = icmp sgt i32 %12, 0
br i1 %13, label %14, label %23
14: ; preds = %2
%15 = load i32, i32* %3
%16 = load i32, i32* %4
%17 = add nsw i32 %15, %16
%18 = sub nsw i32 %17, 1
%19 = load i32, i32* %4
%20 = sub nsw i32 %19, 1
%21 = xor i32 %20, -1
%22 = and i32 %18, %21
br label %25
23: ; preds = %2
%24 = load i32, i32* %3
br label %25
25: ; preds = %23, %14
%26 = phi i32 [ %22, %14 ], [ %24, %23 ]
ret i32 %26
}

LLVM IR (-O2):
define i32 @addr_align_up(i32 %0, i32 %1) {
%3 = tail call i32 @llvm.ctpop.i32(i32 %1)
%4 = icmp ult i32 %3, 2
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = icmp sgt i32 %1, 0
%8 = add i32 %0, -1
%9 = add i32 %8, %1
%10 = sub i32 0, %1
%11 = and i32 %9, %10
%12 = select i1 %7, i32 %11, i32 %0
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int print_usage() {
  printf(" Usage: sor_signal [options]\n");
  printf(" Option:\n");
  printf(" \t[ -s <vector size> ] (default: %d)\n", 100);
  return 1;
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef1(%rip),%rdi
mov    $0x64,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
push   %rax
lea    0xefe(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0f(%rip),%rdi
call   1030 <puts@plt>
lea    0xec0(%rip),%rdi
mov    $0x64,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [30 x i8] c" Usage: sor_signal [options]\0A\00"
@.str.1 = [10 x i8] c" Option:\0A\00"
@.str.2 = [38 x i8] c" \09[ -s <vector size> ] (default: %d)\0A\00"
define i32 @print_usage() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i32 100)
ret i32 1
}

LLVM IR (-O2):
@.str.2 = [38 x i8] c" \09[ -s <vector size> ] (default: %d)\0A\00"
@str = [29 x i8] c" Usage: sor_signal [options]\00"
@str.3 = [9 x i8] c" Option:\00"
define i32 @print_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i32 100)
ret i32 1
}
unsigned int _check_times(unsigned x, unsigned y) {
  unsigned long long whole_ans =
      ((unsigned long long)x) * ((unsigned long long)y);
  unsigned word_ans = (unsigned)whole_ans;
  if (word_ans < whole_ans || word_ans > (1 << 28))
    (_throw_badalloc_fn("/scratch/repos/new/home/jordi_armengol_estape/"
                        "c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/"
                        "cyclone/refs/heads/master/bin/genfiles/rename_temps.c",
                        284));
  return word_ans;
}


x86 assembly (clang, -O0):
<_check_times>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
imul   %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%rax
jb     114d <_check_times+0x3d>
cmpl   $0x10000000,-0x14(%rbp)
jbe    1160 <_check_times+0x50>
lea    0xeac(%rip),%rdi
mov    $0x11c,%esi
mov    $0x0,%al
call   1030 <_throw_badalloc_fn@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_check_times>:
push   %rbx
mov    %edi,%eax
mul    %esi
mov    %eax,%ebx
jo     1121 <_check_times+0x11>
cmp    $0x10000001,%ebx
jb     1134 <_check_times+0x24>
lea    0xed8(%rip),%rdi
mov    $0x11c,%esi
xor    %eax,%eax
call   1030 <_throw_badalloc_fn@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [153 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/genfiles/rename_temps.c\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = zext i32 %7 to i64
%9 = load i32, i32* %4
%10 = zext i32 %9 to i64
%11 = mul i64 %8, %10
store i64 %11, i64* %5
%12 = load i64, i64* %5
%13 = trunc i64 %12 to i32
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = zext i32 %14 to i64
%16 = load i64, i64* %5
%17 = icmp ult i64 %15, %16
br i1 %17, label %21, label %18
18: ; preds = %2
%19 = load i32, i32* %6
%20 = icmp ugt i32 %19, 268435456
br i1 %20, label %21, label %23
21: ; preds = %18, %2
%22 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str, i64 0, i64 0), i32 284)
br label %23
23: ; preds = %21, %18
%24 = load i32, i32* %6
ret i32 %24
}

LLVM IR (-O2):
@.str = [153 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/genfiles/rename_temps.c\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = tail call { i32, i1 } @llvm.umul.with.overflow.i32(i32 %0, i32 %1)
%4 = extractvalue { i32, i1 } %3, 0
%5 = extractvalue { i32, i1 } %3, 1
%6 = icmp ugt i32 %4, 268435456
%7 = or i1 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str, i64 0, i64 0), i32 284)
br label %10
10: ; preds = %2, %8
ret i32 %4
}
int metadata_shutdown(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @metadata_shutdown() {
ret i32 0
}
/* Variables and functions */
char *strchr(char *, char);
char *hls_m3u_tag_get_content(char *tagstr) {
  char *temp = strchr(tagstr, ':');
  if (temp) {
    temp++;
  }
  return temp;
}


x86 assembly (clang, -O0):
<hls_m3u_tag_get_content>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x3a,%esi
call   1030 <strchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1145 <hls_m3u_tag_get_content+0x35>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hls_m3u_tag_get_content>:
push   %rax
mov    $0x3a,%esi
call   1030 <strchr@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
cmovne %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @hls_m3u_tag_get_content(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strchr(i8* %4, i8 signext 58)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %3
br label %11
11: ; preds = %8, %1
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
define i8* @hls_m3u_tag_get_content(i8* %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 58)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* null, i8* %4
ret i8* %5
}
/* Type definitions */
struct timeval {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double get_dtime(void) {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return ((double)(tv.tv_sec) + (double)(tv.tv_usec) * 0.001 * 0.001);
}


x86 assembly (clang, -O0):
<get_dtime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdq -0x8(%rbp),%xmm1
cvtsi2sdq -0x10(%rbp),%xmm0
movsd  0xec7(%rip),%xmm2
mulsd  %xmm2,%xmm0
movsd  0xebb(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_dtime>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdq 0x10(%rsp),%xmm1
cvtsi2sdq 0x8(%rsp),%xmm0
movsd  0xeca(%rip),%xmm2
mulsd  %xmm2,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define double @get_dtime() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%4 = load i64, i64* %3
%5 = sitofp i64 %4 to double
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%7 = load i64, i64* %6
%8 = sitofp i64 %7 to double
%9 = fmul double %8, 1.000000e-03
%10 = call double @llvm.fmuladd.f64(double %9, double 1.000000e-03, double %5)
ret double %10
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define double @get_dtime() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%5 = load i64, i64* %4
%6 = sitofp i64 %5 to double
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%8 = load i64, i64* %7
%9 = sitofp i64 %8 to double
%10 = fmul double %9, 1.000000e-03
%11 = tail call double @llvm.fmuladd.f64(double %10, double 1.000000e-03, double %6)
ret double %11
}
int precedence(char op) {
  switch (op) {
  case '^':
    return 3;
    break;
  case '/':
  case '*':
    return 2;
    break;
  default:
    return 1;
    break;
  }
}


x86 assembly (clang, -O0):
<precedence>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x2a,%eax
je     114d <precedence+0x4d>
jmp    111f <precedence+0x1f>
mov    -0xc(%rbp),%eax
sub    $0x2f,%eax
je     114d <precedence+0x4d>
jmp    1130 <precedence+0x30>
mov    -0xc(%rbp),%eax
sub    $0x5e,%eax
jne    1159 <precedence+0x59>
jmp    1141 <precedence+0x41>
movl   $0x3,-0x4(%rbp)
jmp    1160 <precedence+0x60>
movl   $0x2,-0x4(%rbp)
jmp    1160 <precedence+0x60>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<precedence>:
cmp    $0x2a,%edi
je     110f <precedence+0xf>
cmp    $0x5e,%edi
je     1115 <precedence+0x15>
cmp    $0x2f,%edi
jne    111b <precedence+0x1b>
mov    $0x2,%eax
ret
mov    $0x3,%eax
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @precedence(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %8 [
i32 94, label %6
i32 47, label %7
i32 42, label %7
]
6: ; preds = %1
store i32 3, i32* %2
br label %9
7: ; preds = %1, %1
store i32 2, i32* %2
br label %9
8: ; preds = %1
store i32 1, i32* %2
br label %9
9: ; preds = %8, %7, %6
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @precedence(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %4 [
i32 94, label %5
i32 47, label %3
i32 42, label %3
]
3: ; preds = %1, %1
br label %5
4: ; preds = %1
br label %5
5: ; preds = %1, %4, %3
%6 = phi i32 [ 1, %4 ], [ 2, %3 ], [ 3, %1 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ pthread_yield(int /*<<< orphan*/ *);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ sleep(int);
void *thread(void *arg) {
  while (1) {
    puts((char *)arg);
    pthread_yield(NULL);
    sleep(1);
  }
}


x86 assembly (clang, -O0):
<thread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1040 <pthread_yield@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
jmp    113c <thread+0xc>

x86 assembly (clang, -O2):
<thread>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <pthread_yield@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
jmp    1140 <thread+0x10>

LLVM IR (-O0):
define i8* @thread(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %1, %3
%4 = load i8*, i8** %2
%5 = call i32 @puts(i8* %4)
%6 = call i32 @pthread_yield(i32* null)
%7 = call i32 @sleep(i32 1)
br label %3
}

LLVM IR (-O2):
define noalias i8* @thread(i8* nocapture %0) {
br label %2
2: ; preds = %1, %2
%3 = tail call i32 @puts(i8* dereferenceable(1) %0)
%4 = tail call i32 @pthread_yield(i32* null)
%5 = tail call i32 @sleep(i32 1)
br label %2
}
int GetSocketInlineOutOfBandData(const int fd __attribute__((__unused__))) {
  ;
  return (-1);
}


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

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

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

LLVM IR (-O2):
define i32 @GetSocketInlineOutOfBandData(i32 %0) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ input();
scalar_t__ match();
int /*<<< orphan*/ printerror();
int /*<<< orphan*/ showLogin();
int tryLogin() {
  input();
  if (match())
    return 1;
  else {
    printerror();
    showLogin();
    return 0;
  }
}


x86 assembly (clang, -O0):
<tryLogin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <input@plt>
mov    $0x0,%al
call   1060 <match@plt>
cmp    $0x0,%rax
je     116c <tryLogin+0x2c>
movl   $0x1,-0x4(%rbp)
jmp    1181 <tryLogin+0x41>
mov    $0x0,%al
call   1030 <printerror@plt>
mov    $0x0,%al
call   1050 <showLogin@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tryLogin>:
push   %rax
xor    %eax,%eax
call   1040 <input@plt>
xor    %eax,%eax
call   1060 <match@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     115e <tryLogin+0x1e>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <printerror@plt>
xor    %eax,%eax
call   1050 <showLogin@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @tryLogin() {
%1 = alloca i32
%2 = call i32 (...) @input()
%3 = call i64 (...) @match()
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %0
store i32 1, i32* %1
br label %9
6: ; preds = %0
%7 = call i32 (...) @printerror()
%8 = call i32 (...) @showLogin()
store i32 0, i32* %1
br label %9
9: ; preds = %6, %5
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
define i32 @tryLogin() {
%1 = tail call i32 (...) @input()
%2 = tail call i64 (...) @match()
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %0
%5 = tail call i32 (...) @printerror()
%6 = tail call i32 (...) @showLogin()
br label %7
7: ; preds = %0, %4
%8 = phi i32 [ 0, %4 ], [ 1, %0 ]
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ __le32;

/* Variables and functions */
int /*<<< orphan*/ htole32(int /*<<< orphan*/);
__le32 cpu_to_le32(uint32_t x) { return htole32(x); }


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

x86 assembly (clang, -O2):
<cpu_to_le32>:
jmp    1030 <htole32@plt>

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

LLVM IR (-O2):
define i32 @cpu_to_le32(i32 %0) {
%2 = tail call i32 @htole32(i32 %0)
ret i32 %2
}
int VAR(int l) { return l >> 1; }


x86 assembly (clang, -O0):
<VAR>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<VAR>:
mov    %edi,%eax
sar    %eax
ret

LLVM IR (-O0):
define i32 @VAR(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 1
ret i32 %4
}

LLVM IR (-O2):
define i32 @VAR(i32 %0) {
%2 = ashr i32 %0, 1
ret i32 %2
}
int hpgov_default_level(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @hpgov_default_level() {
ret i32 0
}
/* Variables and functions */
void *musicnew(char const *);
void *musicload(const char *path, void *_ignrd) { return musicnew(path); }


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

x86 assembly (clang, -O2):
<musicload>:
jmp    1030 <musicnew@plt>

LLVM IR (-O0):
define i8* @musicload(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 = call i8* @musicnew(i8* %5)
ret i8* %6
}

LLVM IR (-O2):
define i8* @musicload(i8* %0, i8* nocapture readnone %1) {
%3 = tail call i8* @musicnew(i8* %0)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ tml_sr_vAdd1(float, float *, int);
int /*<<< orphan*/ tml_sr_vCopy(float const *, float *, int);
int /*<<< orphan*/ tml_sr_vMpy1(float, float *, int);
void tml_sr_vNormalize(const float *src, float *dst, int n, float offset,
                       float factor) {
  tml_sr_vCopy(src, dst, n);
  tml_sr_vAdd1(-offset, dst, n);
  tml_sr_vMpy1((float)(1 / factor), dst, n);
}


x86 assembly (clang, -O0):
<tml_sr_vNormalize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movss  %xmm0,-0x18(%rbp)
movss  %xmm1,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1050 <tml_sr_vCopy@plt>
movss  -0x18(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <tml_sr_vAdd1@plt>
movss  0xe7d(%rip),%xmm0
divss  -0x1c(%rbp),%xmm0
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <tml_sr_vMpy1@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tml_sr_vNormalize>:
push   %rbp
push   %rbx
sub    $0x28,%rsp
movss  %xmm1,0xc(%rsp)
movaps %xmm0,0x10(%rsp)
mov    %edx,%ebp
mov    %rsi,%rbx
call   1050 <tml_sr_vCopy@plt>
movaps 0x10(%rsp),%xmm0
xorps  0xea9(%rip),%xmm0
mov    %rbx,%rdi
mov    %ebp,%esi
call   1040 <tml_sr_vAdd1@plt>
movss  0xea7(%rip),%xmm0
divss  0xc(%rsp),%xmm0
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x28,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <tml_sr_vMpy1@plt>

LLVM IR (-O0):
define void @tml_sr_vNormalize(float* %0, float* %1, i32 %2, float %3, float %4) {
%6 = alloca float*
%7 = alloca float*
%8 = alloca i32
%9 = alloca float
%10 = alloca float
store float* %0, float** %6
store float* %1, float** %7
store i32 %2, i32* %8
store float %3, float* %9
store float %4, float* %10
%11 = load float*, float** %6
%12 = load float*, float** %7
%13 = load i32, i32* %8
%14 = call i32 @tml_sr_vCopy(float* %11, float* %12, i32 %13)
%15 = load float, float* %9
%16 = fneg float %15
%17 = load float*, float** %7
%18 = load i32, i32* %8
%19 = call i32 @tml_sr_vAdd1(float %16, float* %17, i32 %18)
%20 = load float, float* %10
%21 = fdiv float 1.000000e+00, %20
%22 = load float*, float** %7
%23 = load i32, i32* %8
%24 = call i32 @tml_sr_vMpy1(float %21, float* %22, i32 %23)
ret void
}

LLVM IR (-O2):
define void @tml_sr_vNormalize(float* %0, float* %1, i32 %2, float %3, float %4) {
%6 = tail call i32 @tml_sr_vCopy(float* %0, float* %1, i32 %2)
%7 = fneg float %3
%8 = tail call i32 @tml_sr_vAdd1(float %7, float* %1, i32 %2)
%9 = fdiv float 1.000000e+00, %4
%10 = tail call i32 @tml_sr_vMpy1(float %9, float* %1, i32 %2)
ret void
}
void test_five(int x, int y, int z) {
#pragma omp distribute parallel for simd collapse(2)
  for (int i = 0; i < x; i++)
    for (int i = 0; i < y; i++)
      for (int i = 0; i < z; i++)
        ;
}


x86 assembly (clang, -O0):
<test_five>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    117f <test_five+0x7f>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    116c <test_five+0x6c>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <test_five+0x59>
jmp    114b <test_five+0x4b>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    113a <test_five+0x3a>
jmp    115e <test_five+0x5e>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <test_five+0x27>
jmp    1171 <test_five+0x71>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1114 <test_five+0x14>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test_five(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store i32 0, i32* %7
br label %10
10: ; preds = %33, %3
%11 = load i32, i32* %7
%12 = load i32, i32* %4
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %36
14: ; preds = %10
store i32 0, i32* %8
br label %15
15: ; preds = %29, %14
%16 = load i32, i32* %8
%17 = load i32, i32* %5
%18 = icmp slt i32 %16, %17
br i1 %18, label %19, label %32
19: ; preds = %15
store i32 0, i32* %9
br label %20
20: ; preds = %25, %19
%21 = load i32, i32* %9
%22 = load i32, i32* %6
%23 = icmp slt i32 %21, %22
br i1 %23, label %24, label %28
24: ; preds = %20
br label %25
25: ; preds = %24
%26 = load i32, i32* %9
%27 = add nsw i32 %26, 1
store i32 %27, i32* %9
br label %20
28: ; preds = %20
br label %29
29: ; preds = %28
%30 = load i32, i32* %8
%31 = add nsw i32 %30, 1
store i32 %31, i32* %8
br label %15
32: ; preds = %15
br label %33
33: ; preds = %32
%34 = load i32, i32* %7
%35 = add nsw i32 %34, 1
store i32 %35, i32* %7
br label %10
36: ; preds = %10
ret void
}

LLVM IR (-O2):
define void @test_five(i32 %0, i32 %1, i32 %2) {
ret void
}
void XtCallCallbackList() {}


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

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

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

LLVM IR (-O2):
define void @XtCallCallbackList() {
ret void
}
__attribute__((optimize("-O0"))) void hl_breakpoint() { ; }


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

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

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

LLVM IR (-O2):
define void @hl_breakpoint() {
ret void
}
/* Variables and functions */
int bar(int);
int foo(int x) {
  if (x > 0) {
    return 1 + bar(x - 1);
  } else {
    return x;
  }
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    113b <foo+0x2b>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <bar@plt>
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1141 <foo+0x31>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
mov    %edi,%eax
test   %edi,%edi
jle    1128 <foo+0x18>
push   %rax
add    $0xffffffff,%eax
mov    %eax,%edi
call   1030 <bar@plt>
add    $0x1,%eax
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = add nsw i32 %0, -1
%5 = tail call i32 @bar(i32 %4)
%6 = add nsw i32 %5, 1
br label %7
7: ; preds = %1, %3
%8 = phi i32 [ %6, %3 ], [ %0, %1 ]
ret i32 %8
}
void flash_lock_option_bytes(void) {}


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

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

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

LLVM IR (-O2):
define void @flash_lock_option_bytes() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ XErrorEvent;
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int grab_error(Display *dpy, XErrorEvent *err) {
  fprintf(stderr, "frapix: key grabbing failed. some hotkeys will not work!\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<grab_error>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [58 x i8] c"frapix: key grabbing failed. some hotkeys will not work!\0A\00"
define i32 @grab_error(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32, i32* @stderr
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [58 x i8] c"frapix: key grabbing failed. some hotkeys will not work!\0A\00"
define i32 @grab_error(i32* nocapture readnone %0, i32* nocapture readnone %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
unsigned int test_06(unsigned int a) { return a > 65535 ? 65535 : a; }


x86 assembly (clang, -O0):
<test_06>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0xffff,-0x4(%rbp)
jbe    1121 <test_06+0x21>
mov    $0xffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1127 <test_06+0x27>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_06>:
cmp    $0xffff,%edi
mov    $0xffff,%eax
cmovb  %edi,%eax
ret

LLVM IR (-O0):
define i32 @test_06(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ugt i32 %3, 65535
br i1 %4, label %5, label %6
5: ; preds = %1
br label %8
6: ; preds = %1
%7 = load i32, i32* %2
br label %8
8: ; preds = %6, %5
%9 = phi i32 [ 65535, %5 ], [ %7, %6 ]
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_06(i32 %0) {
%2 = icmp ult i32 %0, 65535
%3 = select i1 %2, i32 %0, i32 65535
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int syscall(int, int /*<<< orphan*/);
int setfsgid(gid_t gid) { return syscall(139, gid); }


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

x86 assembly (clang, -O2):
<setfsgid>:
mov    %edi,%esi
mov    $0x8b,%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
define i32 @setfsgid(i32 %0) {
%2 = tail call i32 @syscall(i32 139, i32 %0)
ret i32 %2
}
/* Variables and functions */
int atoi(char *);
int gcd(int, int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int a, b;
  a = atoi(argv[1]);
  b = atoi(argv[2]);
  printf("%d\n", gcd(a, b));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1040 <gcd@plt>
mov    %eax,%esi
lea    0xe86(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   1050 <atoi@plt>
mov    %eax,%ebp
mov    0x10(%rbx),%rdi
call   1050 <atoi@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1040 <gcd@plt>
lea    0xea6(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i8**, i8*** %5
%9 = getelementptr inbounds i8*, i8** %8, i64 1
%10 = load i8*, i8** %9
%11 = call i32 @atoi(i8* %10)
store i32 %11, i32* %6
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 2
%14 = load i8*, i8** %13
%15 = call i32 @atoi(i8* %14)
store i32 %15, i32* %7
%16 = load i32, i32* %6
%17 = load i32, i32* %7
%18 = call i32 @gcd(i32 %16, i32 %17)
%19 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %18)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @atoi(i8* %4)
%6 = getelementptr inbounds i8*, i8** %1, i64 2
%7 = load i8*, i8** %6
%8 = tail call i32 @atoi(i8* %7)
%9 = tail call i32 @gcd(i32 %5, i32 %8)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
ret i32 0
}
void gtk_file_chooser_list_filters() {}


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

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

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

LLVM IR (-O2):
define void @gtk_file_chooser_list_filters() {
ret void
}
int bgscan_notify_scan(struct wpa_supplicant *wpa_s) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.wpa_supplicant = type opaque
define i32 @bgscan_notify_scan(%struct.wpa_supplicant* nocapture readnone %0) {
ret i32 0
}
void sem_unlink() {}


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

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

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

LLVM IR (-O2):
define void @sem_unlink() {
ret void
}
void of_reserved_mem_device_init(struct device *dev) {}


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

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

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

LLVM IR (-O2):
%struct.device = type opaque
define void @of_reserved_mem_device_init(%struct.device* nocapture %0) {
ret void
}
/* Variables and functions */
int set_action_val_name_any(char *, char *, int, int /*<<< orphan*/);
int set_action_val_name(char *saction, char *f_val, int len) {
  return set_action_val_name_any(saction, f_val, len, 0);
}


x86 assembly (clang, -O0):
<set_action_val_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
xor    %ecx,%ecx
call   1030 <set_action_val_name_any@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_action_val_name>:
xor    %ecx,%ecx
jmp    1030 <set_action_val_name_any@plt>

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

LLVM IR (-O2):
define i32 @set_action_val_name(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @set_action_val_name_any(i8* %0, i8* %1, i32 %2, i32 0)
ret i32 %4
}
/* Variables and functions */
bool cmp(void *a, void *b) { return ((uintptr_t)a <= (uintptr_t)b); }


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

x86 assembly (clang, -O2):
<cmp>:
xor    %eax,%eax
cmp    %rsi,%rdi
setbe  %al
ret

LLVM IR (-O0):
define i32 @cmp(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 = ptrtoint i8* %5 to i64
%7 = load i8*, i8** %4
%8 = ptrtoint i8* %7 to i64
%9 = icmp ule i64 %6, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @cmp(i8* readnone %0, i8* readnone %1) {
%3 = icmp ule i8* %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
void dummy(int dummy) {}


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

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

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

LLVM IR (-O2):
define void @dummy(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0x8d() {
  Assert_real((isupper(141) == 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_isupper.c",
              710, ("isupper should be 0 for 0x8d"));
}


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

x86 assembly (clang, -O2):
<t_isupper_0x8d>:
push   %rax
mov    $0x8d,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2c6,%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_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0x8d\00"
define void @t_isupper_0x8d() {
%1 = call i64 @isupper(i32 141)
%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 710, 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_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0x8d\00"
define void @t_isupper_0x8d() {
%1 = tail call i64 @isupper(i32 141)
%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 710, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}