xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void indent(int nestingLevel) {
  while (nestingLevel--)
    printf("  ");
}


x86 assembly (clang, -O0):
<indent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
je     1140 <indent+0x30>
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
jmp    111b <indent+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<indent>:
push   %r14
push   %rbx
push   %rax
test   %edi,%edi
je     113d <indent+0x2d>
mov    %edi,%ebx
lea    0xedf(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0xffffffff,%ebx
jne    1130 <indent+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c" \00"
define void @indent(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %5, %3 ], [ %0, %1 ]
%5 = add nsw i32 %4, -1
%6 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%7 = icmp eq i32 %5, 0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
void gtk_entry_set_text() {}


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

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

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

LLVM IR (-O2):
define void @gtk_entry_set_text() {
ret void
}
/* Variables and functions */
char *U_WMRCORENONE_set(char *);
char *U_WMR70_set(void) { return U_WMRCORENONE_set("U_WMR70"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMR70\00"
define i8* @U_WMR70_set() {
%1 = call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMR70\00"
define i8* @U_WMR70_set() {
%1 = tail call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int Usage() {
  printf("Usage: compareallocs <count>\n");
  return -127;
}


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

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

LLVM IR (-O0):
@.str = [30 x i8] c"Usage: compareallocs <count>\0A\00"
define i32 @Usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
ret i32 -127
}

LLVM IR (-O2):
@str = [29 x i8] c"Usage: compareallocs <count>\00"
define i32 @Usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
ret i32 -127
}
int f(int a, int b, int c) {
  c |= 1;
  a *= c;
  b *= c;
  return a == b;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%eax
or     $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
imul   -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
or     $0x1,%edx
imul   %edx,%edi
imul   %esi,%edx
xor    %eax,%eax
cmp    %edx,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @f(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* %6
%8 = or i32 %7, 1
store i32 %8, i32* %6
%9 = load i32, i32* %6
%10 = load i32, i32* %4
%11 = mul nsw i32 %10, %9
store i32 %11, i32* %4
%12 = load i32, i32* %6
%13 = load i32, i32* %5
%14 = mul nsw i32 %13, %12
store i32 %14, i32* %5
%15 = load i32, i32* %4
%16 = load i32, i32* %5
%17 = icmp eq i32 %15, %16
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1, i32 %2) {
%4 = or i32 %2, 1
%5 = mul nsw i32 %4, %0
%6 = mul nsw i32 %4, %1
%7 = icmp eq i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ charcreation();
int /*<<< orphan*/ introlessernoble();
int main() {
  charcreation();
  introlessernoble();
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @charcreation()
%2 = call i32 (...) @introlessernoble()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @charcreation()
%2 = tail call i32 (...) @introlessernoble()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ RAND_bytes(int /*<<< orphan*/ *, size_t);
int crypto_random_bytes_generate(uint8_t *id, size_t len) {
  if (!RAND_bytes(id, len)) {
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<crypto_random_bytes_generate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <RAND_bytes@plt>
cmp    $0x0,%eax
jne    1142 <crypto_random_bytes_generate+0x32>
movl   $0xffffffff,-0x4(%rbp)
jmp    1149 <crypto_random_bytes_generate+0x39>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crypto_random_bytes_generate>:
push   %rax
call   1030 <RAND_bytes@plt>
cmp    $0x1,%eax
sbb    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @crypto_random_bytes_generate(i32* %0, i64 %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i64
store i32* %0, i32** %4
store i64 %1, i64* %5
%6 = load i32*, i32** %4
%7 = load i64, i64* %5
%8 = call i32 @RAND_bytes(i32* %6, i64 %7)
%9 = icmp ne i32 %8, 0
br i1 %9, label %11, label %10
10: ; preds = %2
store i32 -1, i32* %3
br label %12
11: ; preds = %2
store i32 0, i32* %3
br label %12
12: ; preds = %11, %10
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @crypto_random_bytes_generate(i32* %0, i64 %1) {
%3 = tail call i32 @RAND_bytes(i32* %0, i64 %1)
%4 = icmp eq i32 %3, 0
%5 = sext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ assert(char const *);
scalar_t__ strcasecmp(char const *, char const *);
int trio_equal(const char *first, const char *second) {
  assert(first);
  assert(second);
  if ((first != 0) && (second != 0)) {
    return (0 == strcasecmp(first, second));
  }
  return (1 == 0);
}


x86 assembly (clang, -O0):
<trio_equal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <assert@plt>
mov    -0x18(%rbp),%rdi
call   1040 <assert@plt>
cmpq   $0x0,-0x10(%rbp)
je     117d <trio_equal+0x5d>
cmpq   $0x0,-0x18(%rbp)
je     117d <trio_equal+0x5d>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcasecmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    1184 <trio_equal+0x64>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trio_equal>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <assert@plt>
mov    %r14,%rdi
call   1040 <assert@plt>
xor    %eax,%eax
test   %rbx,%rbx
je     1159 <trio_equal+0x39>
test   %r14,%r14
je     1159 <trio_equal+0x39>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcasecmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @trio_equal(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 = call i32 @assert(i8* %6)
%8 = load i8*, i8** %5
%9 = call i32 @assert(i8* %8)
%10 = load i8*, i8** %4
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %21
12: ; preds = %2
%13 = load i8*, i8** %5
%14 = icmp ne i8* %13, null
br i1 %14, label %15, label %21
15: ; preds = %12
%16 = load i8*, i8** %4
%17 = load i8*, i8** %5
%18 = call i64 @strcasecmp(i8* %16, i8* %17)
%19 = icmp eq i64 0, %18
%20 = zext i1 %19 to i32
store i32 %20, i32* %3
br label %22
21: ; preds = %12, %2
store i32 0, i32* %3
br label %22
22: ; preds = %21, %15
%23 = load i32, i32* %3
ret i32 %23
}

LLVM IR (-O2):
define i32 @trio_equal(i8* %0, i8* %1) {
%3 = tail call i32 @assert(i8* %0)
%4 = tail call i32 @assert(i8* %1)
%5 = icmp ne i8* %0, null
%6 = icmp ne i8* %1, null
%7 = and i1 %5, %6
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = tail call i64 @strcasecmp(i8* %0, i8* %1)
%10 = icmp eq i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %2, %8
%13 = phi i32 [ %11, %8 ], [ 0, %2 ]
ret i32 %13
}
void caller_with_vp2() {}


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

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

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

LLVM IR (-O2):
define void @caller_with_vp2() {
ret void
}
char dash2underscore(char c) {
  if (c == '-')
    return '_';
  return c;
}


x86 assembly (clang, -O0):
<dash2underscore>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x2d,%eax
jne    1120 <dash2underscore+0x20>
movb   $0x5f,-0x1(%rbp)
jmp    1126 <dash2underscore+0x26>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dash2underscore>:
cmp    $0x2d,%dil
mov    $0x5f,%eax
cmovne %edi,%eax
ret

LLVM IR (-O0):
define signext i8 @dash2underscore(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 45
br i1 %6, label %7, label %8
7: ; preds = %1
store i8 95, i8* %2
br label %10
8: ; preds = %1
%9 = load i8, i8* %3
store i8 %9, i8* %2
br label %10
10: ; preds = %8, %7
%11 = load i8, i8* %2
ret i8 %11
}

LLVM IR (-O2):
define signext i8 @dash2underscore(i8 signext %0) {
%2 = icmp eq i8 %0, 45
%3 = select i1 %2, i8 95, i8 %0
ret i8 %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isgraph(int);
void t_isgraph_0x7c() {
  Assert_real((isgraph(124)),
              "/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_isgraph.c",
              625, ("isgraph should be 1 for |"));
}


x86 assembly (clang, -O0):
<t_isgraph_0x7c>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7c,%edi
call   1040 <isgraph@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x271,%edx
lea    0xf65(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isgraph_0x7c>:
push   %rax
mov    $0x7c,%edi
call   1040 <isgraph@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x271,%edx
pop    %rax
jmp    1030 <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_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for |\00"
define void @t_isgraph_0x7c() {
%1 = call i32 @isgraph(i32 124)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 625, i8* getelementptr inbounds ([26 x i8], [26 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_isgraph.c\00"
@.str.1 = [26 x i8] c"isgraph should be 1 for |\00"
define void @t_isgraph_0x7c() {
%1 = tail call i32 @isgraph(i32 124)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 625, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void vdbg(char *fmt, ...) {}


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

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

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

LLVM IR (-O2):
define void @vdbg(i8* nocapture %0, ...) {
ret void
}
int ia_square(int value, int index) { return value * value; }


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

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

LLVM IR (-O0):
define i32 @ia_square(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %3
%7 = mul nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @ia_square(i32 %0, i32 %1) {
%3 = mul nsw i32 %0, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ write(int, void const *, int);
void ft_putchar_fd(char c, int fd) { write(fd, (const void *)&c, 1); }


x86 assembly (clang, -O0):
<ft_putchar_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x1(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putchar_fd>:
push   %rax
mov    %esi,%eax
mov    %dil,0x7(%rsp)
lea    0x7(%rsp),%rsi
mov    %eax,%edi
mov    $0x1,%edx
call   1030 <write@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @ft_putchar_fd(i8 signext %0, i32 %1) {
%3 = alloca i8
store i8 %0, i8* %3
%4 = call i32 @write(i32 %1, i8* %3, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0xc5() {
  Assert_real((isgraph(197) == 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_isgraph.c",
              990, ("isgraph should be 0 for 0xc5"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0xc5>:
push   %rax
mov    $0xc5,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3de,%edx
pop    %rax
jmp    1030 <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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xc5\00"
define void @t_isgraph_0xc5() {
%1 = call i64 @isgraph(i32 197)
%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 990, 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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xc5\00"
define void @t_isgraph_0xc5() {
%1 = tail call i64 @isgraph(i32 197)
%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 990, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
float cRand(int, int, int);
int /*<<< orphan*/ checkSeed();
float bRand(int min, int max) {
  checkSeed();
  return cRand(min, max, 3);
}


x86 assembly (clang, -O0):
<bRand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <checkSeed@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x3,%edx
call   1030 <cRand@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bRand>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1040 <checkSeed@plt>
mov    %ebp,%edi
mov    %ebx,%esi
mov    $0x3,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <cRand@plt>

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

LLVM IR (-O2):
define float @bRand(i32 %0, i32 %1) {
%3 = tail call i32 (...) @checkSeed()
%4 = tail call float @cRand(i32 %0, i32 %1, i32 3)
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ dswap_(int *, double *, int *, double *, int *);
void wcc_dswap_(int *n, char *dx, int *incx, char *dy, int *incy) {
  dswap_(n, (double *)dx, incx, (double *)dy, incy);
}


x86 assembly (clang, -O0):
<wcc_dswap_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   1030 <dswap_@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wcc_dswap_>:
jmp    1030 <dswap_@plt>

LLVM IR (-O0):
define void @wcc_dswap_(i32* %0, i8* %1, i32* %2, i8* %3, i32* %4) {
%6 = alloca i32*
%7 = alloca i8*
%8 = alloca i32*
%9 = alloca i8*
%10 = alloca i32*
store i32* %0, i32** %6
store i8* %1, i8** %7
store i32* %2, i32** %8
store i8* %3, i8** %9
store i32* %4, i32** %10
%11 = load i32*, i32** %6
%12 = load i8*, i8** %7
%13 = bitcast i8* %12 to double*
%14 = load i32*, i32** %8
%15 = load i8*, i8** %9
%16 = bitcast i8* %15 to double*
%17 = load i32*, i32** %10
%18 = call i32 @dswap_(i32* %11, double* %13, i32* %14, double* %16, i32* %17)
ret void
}

LLVM IR (-O2):
define void @wcc_dswap_(i32* %0, i8* %1, i32* %2, i8* %3, i32* %4) {
%6 = bitcast i8* %1 to double*
%7 = bitcast i8* %3 to double*
%8 = tail call i32 @dswap_(i32* %0, double* %6, i32* %2, double* %7, i32* %4)
ret void
}
double Windage(double WindSpeed, double Vi, double xx, double t) {
  double Vw = WindSpeed * 17.60;
  return (Vw * (t - xx / Vi));
}


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

x86 assembly (clang, -O2):
<Windage>:
mulsd  0xef8(%rip),%xmm0
divsd  %xmm1,%xmm2
subsd  %xmm2,%xmm3
mulsd  %xmm3,%xmm0
ret

LLVM IR (-O0):
define double @Windage(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%10 = load double, double* %5
%11 = fmul double %10, 1.760000e+01
store double %11, double* %9
%12 = load double, double* %9
%13 = load double, double* %8
%14 = load double, double* %7
%15 = load double, double* %6
%16 = fdiv double %14, %15
%17 = fsub double %13, %16
%18 = fmul double %12, %17
ret double %18
}

LLVM IR (-O2):
define double @Windage(double %0, double %1, double %2, double %3) {
%5 = fmul double %0, 1.760000e+01
%6 = fdiv double %2, %1
%7 = fsub double %3, %6
%8 = fmul double %5, %7
ret double %8
}
/* Type definitions */
struct katcp_dispatch {
  int dummy;
};

/* Variables and functions */
int store_sensor_mode_katcp(struct katcp_dispatch *, unsigned int,
                            int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                            int /*<<< orphan*/ *, int /*<<< orphan*/ *, void *,
                            int /*<<< orphan*/ *, int /*<<< orphan*/);
int store_mode_katcp(struct katcp_dispatch *d, unsigned int mode, void *state) {
  return store_sensor_mode_katcp(d, mode, NULL, NULL, NULL, NULL, state, NULL,
                                 0);
}


x86 assembly (clang, -O0):
<store_mode_katcp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%r9d
xor    %ecx,%ecx
mov    %r9,%rdx
mov    %r9,%rcx
mov    %r9,%r8
mov    %rax,(%rsp)
movq   $0x0,0x8(%rsp)
movl   $0x0,0x10(%rsp)
call   1030 <store_sensor_mode_katcp@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<store_mode_katcp>:
push   %rax
mov    %rdx,%rax
sub    $0x8,%rsp
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0x0
push   $0x0
push   %rax
call   1030 <store_sensor_mode_katcp@plt>
add    $0x20,%rsp
pop    %rcx
ret

LLVM IR (-O0):
%struct.katcp_dispatch = type { i32 }
define i32 @store_mode_katcp(%struct.katcp_dispatch* %0, i32 %1, i8* %2) {
%4 = alloca %struct.katcp_dispatch*
%5 = alloca i32
%6 = alloca i8*
store %struct.katcp_dispatch* %0, %struct.katcp_dispatch** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load %struct.katcp_dispatch*, %struct.katcp_dispatch** %4
%8 = load i32, i32* %5
%9 = load i8*, i8** %6
%10 = call i32 @store_sensor_mode_katcp(%struct.katcp_dispatch* %7, i32 %8, i32* null, i32* null, i32* null, i32* null, i8* %9, i32* null, i32 0)
ret i32 %10
}

LLVM IR (-O2):
%struct.katcp_dispatch = type { i32 }
define i32 @store_mode_katcp(%struct.katcp_dispatch* %0, i32 %1, i8* %2) {
%4 = tail call i32 @store_sensor_mode_katcp(%struct.katcp_dispatch* %0, i32 %1, i32* null, i32* null, i32* null, i32* null, i8* %2, i32* null, i32 0)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ __builtin_arc_lr(int);
__attribute__((always_)) uint32_t arcv2_timer0_count_get(void) {
  return (__builtin_arc_lr(0x021));
}


x86 assembly (clang, -O0):
<arcv2_timer0_count_get>:
push   %rbp
mov    %rsp,%rbp
mov    $0x21,%edi
call   1030 <__builtin_arc_lr@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<arcv2_timer0_count_get>:
mov    $0x21,%edi
jmp    1030 <__builtin_arc_lr@plt>

LLVM IR (-O0):
define i32 @arcv2_timer0_count_get() {
%1 = call i32 @__builtin_arc_lr(i32 33)
ret i32 %1
}

LLVM IR (-O2):
define i32 @arcv2_timer0_count_get() {
%1 = tail call i32 @__builtin_arc_lr(i32 33)
ret i32 %1
}
/* Variables and functions */
int abs(scalar_t__);
scalar_t__ jours_depuis_debut(int, int, int);
int jours_entre_deux_dates(int jour_1, int mois_1, int annee_1, int jour_2,
                           int mois_2, int annee_2) {
  return abs(jours_depuis_debut(jour_1, mois_1, annee_1) -
             jours_depuis_debut(jour_2, mois_2, annee_2));
}


x86 assembly (clang, -O0):
<jours_entre_deux_dates>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1040 <jours_depuis_debut@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
call   1040 <jours_depuis_debut@plt>
mov    -0x20(%rbp),%rdi
sub    %rax,%rdi
call   1030 <abs@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jours_entre_deux_dates>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %r9d,%r14d
mov    %r8d,%r15d
mov    %ecx,%ebx
call   1040 <jours_depuis_debut@plt>
mov    %rax,%rbp
mov    %ebx,%edi
mov    %r15d,%esi
mov    %r14d,%edx
call   1040 <jours_depuis_debut@plt>
sub    %rax,%rbp
mov    %rbp,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <abs@plt>

LLVM IR (-O0):
define i32 @jours_entre_deux_dates(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load i32, i32* %7
%14 = load i32, i32* %8
%15 = load i32, i32* %9
%16 = call i64 @jours_depuis_debut(i32 %13, i32 %14, i32 %15)
%17 = load i32, i32* %10
%18 = load i32, i32* %11
%19 = load i32, i32* %12
%20 = call i64 @jours_depuis_debut(i32 %17, i32 %18, i32 %19)
%21 = sub nsw i64 %16, %20
%22 = call i32 @abs(i64 %21)
ret i32 %22
}

LLVM IR (-O2):
define i32 @jours_entre_deux_dates(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = tail call i64 @jours_depuis_debut(i32 %0, i32 %1, i32 %2)
%8 = tail call i64 @jours_depuis_debut(i32 %3, i32 %4, i32 %5)
%9 = sub nsw i64 %7, %8
%10 = tail call i32 @abs(i64 %9)
ret i32 %10
}
void signed_char_sub_signed_char_signed_int(signed char *LHS, signed int RHS) {
  (*LHS) -= RHS;
}


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

x86 assembly (clang, -O2):
<signed_char_sub_signed_char_signed_int>:
sub    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @signed_char_sub_signed_char_signed_int(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = sub nsw i32 %8, %5
%10 = trunc i32 %9 to i8
store i8 %10, i8* %6
ret void
}

LLVM IR (-O2):
define void @signed_char_sub_signed_char_signed_int(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = trunc i32 %1 to i8
%5 = sub i8 %3, %4
store i8 %5, i8* %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint32_t lfs_fromle32(uint32_t a) { return a; }


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

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

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

LLVM IR (-O2):
define i32 @lfs_fromle32(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ derefArg(int *);
int *getNull();
void ternaryArg(char cond) {
  static int x;
  derefArg(cond ? &x : getNull());
}


x86 assembly (clang, -O0):
<ternaryArg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x0,%eax
je     114b <ternaryArg+0x2b>
lea    0x2ef2(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1156 <ternaryArg+0x36>
mov    $0x0,%al
call   1040 <getNull@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <derefArg@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ternaryArg>:
test   %dil,%dil
je     1131 <ternaryArg+0x11>
lea    0x2f08(%rip),%rdi
jmp    1030 <derefArg@plt>
push   %rax
xor    %eax,%eax
call   1040 <getNull@plt>
mov    %rax,%rdi
add    $0x8,%rsp
jmp    1030 <derefArg@plt>

LLVM IR (-O0):
@ternaryArg.x = internal global i32 0
define void @ternaryArg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
br label %9
7: ; preds = %1
%8 = call i32* (...) @getNull()
br label %9
9: ; preds = %7, %6
%10 = phi i32* [ @ternaryArg.x, %6 ], [ %8, %7 ]
%11 = call i32 @derefArg(i32* %10)
ret void
}

LLVM IR (-O2):
@ternaryArg.x = internal global i32 0
define void @ternaryArg(i8 signext %0) {
%2 = icmp eq i8 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32* (...) @getNull()
br label %5
5: ; preds = %1, %3
%6 = phi i32* [ %4, %3 ], [ @ternaryArg.x, %1 ]
%7 = tail call i32 @derefArg(i32* %6)
ret void
}
void gdk_draw_layout() {}


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

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

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

LLVM IR (-O2):
define void @gdk_draw_layout() {
ret void
}
/* Type definitions */
struct timeval {
  double tv_sec;
  double tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
void GET_TIME(double now) {
  struct timeval t;
  gettimeofday(&t, NULL);
  now = t.tv_sec + t.tv_usec / 1000000.0;
}


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

x86 assembly (clang, -O2):
<GET_TIME>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { double, double }
define void @GET_TIME(double %0) {
%2 = alloca double
%3 = alloca %struct.timeval
store double %0, double* %2
%4 = call i32 @gettimeofday(%struct.timeval* %3, i32* null)
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 0
%6 = load double, double* %5
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 1
%8 = load double, double* %7
%9 = fdiv double %8, 1.000000e+06
%10 = fadd double %6, %9
store double %10, double* %2
ret void
}

LLVM IR (-O2):
%struct.timeval = type { double, double }
define void @GET_TIME(double %0) {
%2 = alloca %struct.timeval
%3 = bitcast %struct.timeval* %2 to i8*
%4 = call i32 @gettimeofday(%struct.timeval* %2, i32* null)
ret void
}
int is_pattern(char *p) {
  while (*p) {
    switch (*p++) {
    case '?':
    case '*':
    case '[':
    case '\\':
      return 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<is_pattern>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     116e <is_pattern+0x6e>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
sub    $0x2a,%eax
je     115d <is_pattern+0x5d>
jmp    1138 <is_pattern+0x38>
mov    -0x14(%rbp),%eax
sub    $0x3f,%eax
je     115d <is_pattern+0x5d>
jmp    1149 <is_pattern+0x49>
mov    -0x14(%rbp),%eax
add    $0xffffffa5,%eax
sub    $0x1,%eax
ja     1169 <is_pattern+0x69>
jmp    115d <is_pattern+0x5d>
movl   $0x1,-0x4(%rbp)
jmp    1175 <is_pattern+0x75>
jmp    1108 <is_pattern+0x8>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_pattern>:
movabs $0x6000000200001,%rax
nopw   0x0(%rax,%rax,1)
movsbl (%rdi),%ecx
test   %ecx,%ecx
je     112f <is_pattern+0x2f>
add    $0x1,%rdi
add    $0xffffffd6,%ecx
cmp    $0x32,%ecx
ja     1110 <is_pattern+0x10>
bt     %rcx,%rax
jae    1110 <is_pattern+0x10>
mov    $0x1,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @is_pattern(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
br label %4
4: ; preds = %14, %1
%5 = load i8*, i8** %3
%6 = load i8, i8* %5
%7 = icmp ne i8 %6, 0
br i1 %7, label %8, label %15
8: ; preds = %4
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %3
%11 = load i8, i8* %9
%12 = sext i8 %11 to i32
switch i32 %12, label %14 [
i32 63, label %13
i32 42, label %13
i32 91, label %13
i32 92, label %13
]
13: ; preds = %8, %8, %8, %8
store i32 1, i32* %2
br label %16
14: ; preds = %8
br label %4
15: ; preds = %4
store i32 0, i32* %2
br label %16
16: ; preds = %15, %13
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
define i32 @is_pattern(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i8* [ %0, %1 ], [ %7, %6 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %2
%7 = getelementptr inbounds i8, i8* %3, i64 1
%8 = sext i8 %4 to i32
switch i32 %8, label %2 [
i32 63, label %9
i32 42, label %9
i32 91, label %9
i32 92, label %9
]
9: ; preds = %2, %6, %6, %6, %6
%10 = phi i32 [ 1, %6 ], [ 1, %6 ], [ 1, %6 ], [ 1, %6 ], [ 0, %2 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ callme();
void c_function(void) { callme(); }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
int boost_step_dump_head(FILE *fp) {
  fprintf(fp, "iter \t axis \t gamma \t residuals \t step t \t total t\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<boost_step_dump_head>:
push   %rax
mov    %rdi,%rcx
lea    0xee5(%rip),%rdi
mov    $0x33,%esi
mov    $0x1,%edx
call   1030 <fwrite@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [52 x i8] c"iter \09 axis \09 gamma \09 residuals \09 step t \09 total t\0A\00"
define i32 @boost_step_dump_head(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [52 x i8] c"iter \09 axis \09 gamma \09 residuals \09 step t \09 total t\0A\00"
define i32 @boost_step_dump_head(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i64 51, i64 1, i32* %0)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint32_t do_crc(const uint8_t *buf, size_t size) {
  (void)buf;
  (void)size;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @do_crc(i32* nocapture readnone %0, i64 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ analyzeAof(char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  if (argc != 2) {
    fprintf(stderr, "Arguments should be 2.\n");
    return 1;
  }
  analyzeAof(argv[1]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     1161 <main+0x41>
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1175 <main+0x55>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <analyzeAof@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jne    1133 <main+0x13>
mov    0x8(%rsi),%rdi
call   1030 <analyzeAof@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
lea    0xebd(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"Arguments should be 2.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp ne i32 %6, 2
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %3
br label %16
11: ; preds = %2
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 1
%14 = load i8*, i8** %13
%15 = call i32 @analyzeAof(i8* %14)
store i32 0, i32* %3
br label %16
16: ; preds = %11, %8
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"Arguments should be 2.\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %11
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 @analyzeAof(i8* %9)
br label %11
11: ; preds = %7, %4
%12 = phi i32 [ 1, %4 ], [ 0, %7 ]
ret i32 %12
}
/* Type definitions */
struct DynArr {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ popDynArr(struct DynArr *);
int /*<<< orphan*/ pow(double, int);
int /*<<< orphan*/ pushDynArr(struct DynArr *, int /*<<< orphan*/);
double topDynArr(struct DynArr *);
void cube(struct DynArr *stack) {
  double i = topDynArr(stack);
  popDynArr(stack);
  pushDynArr(stack, pow(i, 3));
}


x86 assembly (clang, -O0):
<cube>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <topDynArr@plt>
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <popDynArr@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    $0x3,%edi
call   1050 <pow@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1060 <pushDynArr@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cube>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
call   1030 <topDynArr@plt>
movsd  %xmm0,0x8(%rsp)
mov    %rbx,%rdi
call   1040 <popDynArr@plt>
movsd  0x8(%rsp),%xmm0
mov    $0x3,%edi
call   1050 <pow@plt>
mov    %rbx,%rdi
mov    %eax,%esi
add    $0x10,%rsp
pop    %rbx
jmp    1060 <pushDynArr@plt>

LLVM IR (-O0):
%struct.DynArr = type { i32 }
define void @cube(%struct.DynArr* %0) {
%2 = alloca %struct.DynArr*
%3 = alloca double
store %struct.DynArr* %0, %struct.DynArr** %2
%4 = load %struct.DynArr*, %struct.DynArr** %2
%5 = call double @topDynArr(%struct.DynArr* %4)
store double %5, double* %3
%6 = load %struct.DynArr*, %struct.DynArr** %2
%7 = call i32 @popDynArr(%struct.DynArr* %6)
%8 = load %struct.DynArr*, %struct.DynArr** %2
%9 = load double, double* %3
%10 = call i32 @pow(double %9, i32 3)
%11 = call i32 @pushDynArr(%struct.DynArr* %8, i32 %10)
ret void
}

LLVM IR (-O2):
%struct.DynArr = type { i32 }
define void @cube(%struct.DynArr* %0) {
%2 = tail call double @topDynArr(%struct.DynArr* %0)
%3 = tail call i32 @popDynArr(%struct.DynArr* %0)
%4 = tail call i32 @pow(double %2, i32 3)
%5 = tail call i32 @pushDynArr(%struct.DynArr* %0, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep(int);
void bar() {
  printf("bar: started\n");
  sleep(2);
  printf("bar: done\n");
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x2,%edi
call   1040 <sleep@plt>
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x2,%edi
call   1040 <sleep@plt>
lea    0xecf(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"bar: started\0A\00"
@.str.1 = [11 x i8] c"bar: done\0A\00"
define void @bar() {
%1 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @sleep(i32 2)
%3 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [13 x i8] c"bar: started\00"
@str.2 = [10 x i8] c"bar: done\00"
define void @bar() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @sleep(i32 2)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int incr(int);
int main() {
  int a = 2;
  a = incr(a + 1);
  return a;
}


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

x86 assembly (clang, -O2):
<main>:
mov    $0x3,%edi
jmp    1030 <incr@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 2, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1
%5 = call i32 @incr(i32 %4)
store i32 %5, i32* %2
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @incr(i32 3)
ret i32 %1
}
void PrintN(N) {
  if (N) {
    printN(N - 1);
    printf("%d\n", N);
  }
  return;
}


x86 assembly (clang, -O0):
<PrintN>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1153 <PrintN+0x33>
mov    -0x4(%rbp),%edi
sub    $0x1,%edi
mov    $0x0,%al
call   1030 <printN@plt>
mov    -0x4(%rbp),%esi
lea    0xeb4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PrintN>:
test   %edi,%edi
je     1142 <PrintN+0x22>
push   %rbx
mov    %edi,%ebx
lea    -0x1(%rbx),%edi
xor    %eax,%eax
call   1030 <printN@plt>
lea    0xec8(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
pop    %rbx
jmp    1040 <printf@plt>
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @PrintN(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = add nsw i32 %0, -1
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @printN to i32 (i32, ...)*)(i32 %4)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %7
7: ; preds = %3, %1
ret void
}
int rand_r(unsigned int *seed) {
  *seed = ((*seed * 1103515245) + 123456);
  return (int)*seed;
}


x86 assembly (clang, -O0):
<rand_r>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
imul   $0x41c64e6d,(%rax),%ecx
add    $0x1e240,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_r>:
imul   $0x41c64e6d,(%rdi),%eax
add    $0x1e240,%eax
mov    %eax,(%rdi)
ret

LLVM IR (-O0):
define i32 @rand_r(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = mul i32 %4, 1103515245
%6 = add i32 %5, 123456
%7 = load i32*, i32** %2
store i32 %6, i32* %7
%8 = load i32*, i32** %2
%9 = load i32, i32* %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @rand_r(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = mul i32 %2, 1103515245
%4 = add i32 %3, 123456
store i32 %4, i32* %0
ret i32 %4
}
int validator(int x) {
  if (x < 65) {
    if ((x == 10) || (x == 32)) {
      return 1;
    }
    return -1;
  } else if (x > 90) {
    return -1;
  } else {
    return 1;
  }
}


x86 assembly (clang, -O0):
<validator>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x41,-0x8(%rbp)
jge    113d <validator+0x3d>
cmpl   $0xa,-0x8(%rbp)
je     1125 <validator+0x25>
cmpl   $0x20,-0x8(%rbp)
jne    1131 <validator+0x31>
movl   $0x1,-0x4(%rbp)
jmp    115a <validator+0x5a>
movl   $0xffffffff,-0x4(%rbp)
jmp    115a <validator+0x5a>
cmpl   $0x5a,-0x8(%rbp)
jle    1153 <validator+0x53>
movl   $0xffffffff,-0x4(%rbp)
jmp    115a <validator+0x5a>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<validator>:
xor    %eax,%eax
cmp    $0x40,%edi
jg     111d <validator+0x1d>
cmp    $0xa,%edi
sete   %al
cmp    $0x20,%edi
lea    -0x1(%rax,%rax,1),%ecx
mov    $0x1,%eax
cmovne %ecx,%eax
ret
cmp    $0x5b,%edi
setb   %al
add    %eax,%eax
add    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @validator(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 65
br i1 %5, label %6, label %14
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp eq i32 %7, 10
br i1 %8, label %12, label %9
9: ; preds = %6
%10 = load i32, i32* %3
%11 = icmp eq i32 %10, 32
br i1 %11, label %12, label %13
12: ; preds = %9, %6
store i32 1, i32* %2
br label %19
13: ; preds = %9
store i32 -1, i32* %2
br label %19
14: ; preds = %1
%15 = load i32, i32* %3
%16 = icmp sgt i32 %15, 90
br i1 %16, label %17, label %18
17: ; preds = %14
store i32 -1, i32* %2
br label %19
18: ; preds = %14
store i32 1, i32* %2
br label %19
19: ; preds = %18, %17, %13, %12
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
define i32 @validator(i32 %0) {
%2 = icmp slt i32 %0, 65
br i1 %2, label %3, label %8
3: ; preds = %1
%4 = icmp eq i32 %0, 32
%5 = icmp eq i32 %0, 10
%6 = or i1 %4, %5
%7 = select i1 %6, i32 1, i32 -1
br label %11
8: ; preds = %1
%9 = icmp ugt i32 %0, 90
%10 = select i1 %9, i32 -1, i32 1
br label %11
11: ; preds = %3, %8
%12 = phi i32 [ %10, %8 ], [ %7, %3 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ kappa2(double);
double pow(int /*<<< orphan*/, double);
double kappa(double x) { return pow(kappa2(x), .5); }


x86 assembly (clang, -O0):
<kappa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <kappa2@plt>
mov    %eax,%edi
movsd  0xebf(%rip),%xmm0
call   1040 <pow@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kappa>:
push   %rax
call   1030 <kappa2@plt>
movsd  0xed2(%rip),%xmm0
mov    %eax,%edi
pop    %rax
jmp    1040 <pow@plt>

LLVM IR (-O0):
define double @kappa(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @kappa2(double %3)
%5 = call double @pow(i32 %4, double 5.000000e-01)
ret double %5
}

LLVM IR (-O2):
define double @kappa(double %0) {
%2 = tail call i32 @kappa2(double %0)
%3 = tail call double @pow(i32 %2, double 5.000000e-01)
ret double %3
}