xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int proc1(int, int);
int main(int argc, char *argv[], char *envp[]) {
  int g3;
  g3 = proc1(3, 4);
  printf("%i\n", g3);
  g3 = proc1(5, 6);
  printf("%i\n", g3);
  return g3;
}


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    %rdx,-0x18(%rbp)
mov    $0x3,%edi
mov    $0x4,%esi
call   1040 <proc1@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
mov    $0x5,%edi
mov    $0x6,%esi
call   1040 <proc1@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xe89(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    $0x3,%edi
mov    $0x4,%esi
call   1040 <proc1@plt>
lea    0xec7(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x5,%edi
mov    $0x6,%esi
call   1040 <proc1@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%i\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1, i8** nocapture readnone %2) {
%4 = tail call i32 @proc1(i32 3, i32 4)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = tail call i32 @proc1(i32 5, i32 6)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 %6
}
/* Type definitions */
struct item {
  int dummy;
};

/* Variables and functions */
scalar_t__ mk_item_integer(int /*<<< orphan*/);
scalar_t__ mk_item_string(char const *, size_t, int /*<<< orphan*/);
int /*<<< orphan*/ strtol(char const *, int /*<<< orphan*/ *, int);
struct item *parse_item(int is_digit, const char *buf, size_t size) {
  if (is_digit) {
    return (struct item *)mk_item_integer(strtol(buf, NULL, 10));
  }
  return (struct item *)mk_item_string(buf, size, 0);
}


x86 assembly (clang, -O0):
<parse_item>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     116f <parse_item+0x3f>
mov    -0x18(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1040 <strtol@plt>
mov    %eax,%edi
call   1050 <mk_item_integer@plt>
mov    %rax,-0x8(%rbp)
jmp    1182 <parse_item+0x52>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
xor    %edx,%edx
call   1030 <mk_item_string@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_item>:
push   %rax
test   %edi,%edi
je     114d <parse_item+0x1d>
mov    %rsi,%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1040 <strtol@plt>
mov    %eax,%edi
call   1050 <mk_item_integer@plt>
pop    %rcx
ret
mov    %rsi,%rdi
mov    %rdx,%rsi
xor    %edx,%edx
call   1030 <mk_item_string@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.item = type { i32 }
define %struct.item* @parse_item(i32 %0, i8* %1, i64 %2) {
%4 = alloca %struct.item*
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i64
store i32 %0, i32* %5
store i8* %1, i8** %6
store i64 %2, i64* %7
%8 = load i32, i32* %5
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %15
10: ; preds = %3
%11 = load i8*, i8** %6
%12 = call i32 @strtol(i8* %11, i32* null, i32 10)
%13 = call i64 @mk_item_integer(i32 %12)
%14 = inttoptr i64 %13 to %struct.item*
store %struct.item* %14, %struct.item** %4
br label %20
15: ; preds = %3
%16 = load i8*, i8** %6
%17 = load i64, i64* %7
%18 = call i64 @mk_item_string(i8* %16, i64 %17, i32 0)
%19 = inttoptr i64 %18 to %struct.item*
store %struct.item* %19, %struct.item** %4
br label %20
20: ; preds = %15, %10
%21 = load %struct.item*, %struct.item** %4
ret %struct.item* %21
}

LLVM IR (-O2):
%struct.item = type { i32 }
define %struct.item* @parse_item(i32 %0, i8* %1, i64 %2) {
%4 = icmp eq i32 %0, 0
br i1 %4, label %8, label %5
5: ; preds = %3
%6 = tail call i32 @strtol(i8* nocapture %1, i32* null, i32 10)
%7 = tail call i64 @mk_item_integer(i32 %6)
br label %10
8: ; preds = %3
%9 = tail call i64 @mk_item_string(i8* %1, i64 %2, i32 0)
br label %10
10: ; preds = %8, %5
%11 = phi i64 [ %7, %5 ], [ %9, %8 ]
%12 = inttoptr i64 %11 to %struct.item*
ret %struct.item* %12
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void jtag_exit_pause_ir(volatile uint32_t *host) {
  host[0] = 0x80000000 | (2 << 16) | 0x03;
}


x86 assembly (clang, -O0):
<jtag_exit_pause_ir>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x80020003,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<jtag_exit_pause_ir>:
movl   $0x80020003,(%rdi)
ret

LLVM IR (-O0):
define void @jtag_exit_pause_ir(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
store volatile i32 -2147352573, i32* %4
ret void
}

LLVM IR (-O2):
define void @jtag_exit_pause_ir(i32* %0) {
store volatile i32 -2147352573, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ at_assert_f(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ success();
void _at_tf_Success(void *_at_input) {
  if (!at_assert_f(success(),
                   "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                   "outputs/2022-01-22/02-19-57/repos/alexandream/atest/refs/"
                   "heads/master/src/example.c",
                   35))
    return;
}


x86 assembly (clang, -O0):
<_at_tf_Success>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <success@plt>
mov    %eax,%edi
lea    0xec4(%rip),%rsi
mov    $0x23,%edx
call   1040 <at_assert_f@plt>
cmp    $0x0,%eax
jne    1154 <_at_tf_Success+0x34>
jmp    1154 <_at_tf_Success+0x34>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_at_tf_Success>:
push   %rax
xor    %eax,%eax
call   1030 <success@plt>
lea    0xed1(%rip),%rsi
mov    %eax,%edi
mov    $0x23,%edx
pop    %rax
jmp    1040 <at_assert_f@plt>

LLVM IR (-O0):
@.str = [140 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/alexandream/atest/refs/heads/master/src/example.c\00"
define void @_at_tf_Success(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @success()
%4 = call i32 @at_assert_f(i32 %3, i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str, i64 0, i64 0), i32 35)
%5 = icmp ne i32 %4, 0
br i1 %5, label %7, label %6
6: ; preds = %1
br label %7
7: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
@.str = [140 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/alexandream/atest/refs/heads/master/src/example.c\00"
define void @_at_tf_Success(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @success()
%3 = tail call i32 @at_assert_f(i32 %2, i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str, i64 0, i64 0), i32 35)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void handle_conn_state(void *context, const char *state) {
  printf("handle_conn_state: state: %s\n", state);
}


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

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

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

LLVM IR (-O2):
@.str = [30 x i8] c"handle_conn_state: state: %s\0A\00"
define void @handle_conn_state(i8* nocapture readnone %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ errx(int, char *, char *);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
void *smalloc_st(void *arg) {
  char *crap = arg;
  if (strcmp(crap, "hi") != 0)
    errx(1, "crap is %s", crap);
  strcpy(crap, "bye");
  return NULL;
}


x86 assembly (clang, -O0):
<smalloc_st>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xeb1(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
je     1173 <smalloc_st+0x43>
mov    -0x10(%rbp),%rdx
mov    $0x1,%edi
lea    0xe95(%rip),%rsi
call   1040 <errx@plt>
mov    -0x10(%rbp),%rdi
lea    0xe90(%rip),%rsi
call   1030 <strcpy@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smalloc_st>:
push   %rbx
mov    %rdi,%rbx
lea    0xec5(%rip),%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
je     1159 <smalloc_st+0x29>
lea    0xeb7(%rip),%rsi
mov    $0x1,%edi
mov    %rbx,%rdx
call   1040 <errx@plt>
lea    0xeae(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"hi\00"
@.str.1 = [11 x i8] c"crap is %s\00"
@.str.2 = [4 x i8] c"bye\00"
define i8* @smalloc_st(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i32 @errx(i32 1, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* %9)
br label %11
11: ; preds = %8, %1
%12 = load i8*, i8** %3
%13 = call i32 @strcpy(i8* %12, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
ret i8* null
}

LLVM IR (-O2):
@.str = [3 x i8] c"hi\00"
@.str.1 = [11 x i8] c"crap is %s\00"
@.str.2 = [4 x i8] c"bye\00"
define noalias i8* @smalloc_st(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @errx(i32 1, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %4, %1
%7 = tail call i32 @strcpy(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
ret i8* null
}
int is_sign(char c) { return c == '+' || c == '-'; }


x86 assembly (clang, -O0):
<is_sign>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2b,%ecx
mov    %al,-0x2(%rbp)
je     1129 <is_sign+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x2d,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_sign>:
add    $0xd5,%dil
xor    %eax,%eax
test   $0xfd,%dil
sete   %al
ret

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

LLVM IR (-O2):
define i32 @is_sign(i8 signext %0) {
%2 = icmp eq i8 %0, 43
%3 = icmp eq i8 %0, 45
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() { printf("hello richard benson\n"); }


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

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

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

LLVM IR (-O2):
@str = [21 x i8] c"hello richard benson\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ error(char *);
void errorInit(void) { error("Invalid or unsupported initialization\n"); }


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

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

LLVM IR (-O0):
@.str = [39 x i8] c"Invalid or unsupported initialization\0A\00"
define void @errorInit() {
%1 = call i32 @error(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c"Invalid or unsupported initialization\0A\00"
define void @errorInit() {
%1 = tail call i32 @error(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
ret void
}
int trailing_zeroes(int n) {
  int count;
  count = 0;
  while (n) {
    n /= 5;
    count += n;
  }
  return count;
}


x86 assembly (clang, -O0):
<trailing_zeroes>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1134 <trailing_zeroes+0x34>
mov    -0x4(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    110e <trailing_zeroes+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<trailing_zeroes>:
xor    %eax,%eax
test   %edi,%edi
je     1131 <trailing_zeroes+0x31>
cs nopw 0x0(%rax,%rax,1)
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rdi
mov    %rdi,%rdx
shr    $0x3f,%rdx
sar    $0x21,%rdi
add    %edx,%edi
add    %edi,%eax
add    $0x4,%ecx
cmp    $0x8,%ecx
ja     1110 <trailing_zeroes+0x10>
ret

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

LLVM IR (-O2):
define i32 @trailing_zeroes(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = sdiv i32 %5, 5
%7 = add nsw i32 %4, %6
%8 = add i32 %5, 4
%9 = icmp ult i32 %8, 9
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0x9f() {
  Assert_real((isalnum(159) == 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_isalnum.c",
              800, ("isalnum should be 0 for 0x9f"));
}


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

x86 assembly (clang, -O2):
<t_isalnum_0x9f>:
push   %rax
mov    $0x9f,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x320,%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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0x9f\00"
define void @t_isalnum_0x9f() {
%1 = call i64 @isalnum(i32 159)
%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 800, 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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0x9f\00"
define void @t_isalnum_0x9f() {
%1 = tail call i64 @isalnum(i32 159)
%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 800, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct ipr_ioa {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ disable_dump(struct ipr_ioa *);
int /*<<< orphan*/ enable_dump(struct ipr_ioa *);
int read_dump(struct ipr_ioa *);
int /*<<< orphan*/ write_dump(struct ipr_ioa *, int);
void dump_ioa(struct ipr_ioa *ioa) {
  int count;
  count = read_dump(ioa);
  if (count <= 0)
    return;
  write_dump(ioa, count);
  disable_dump(ioa);
  enable_dump(ioa);
}


x86 assembly (clang, -O0):
<dump_ioa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <read_dump@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jg     1167 <dump_ioa+0x27>
jmp    1185 <dump_ioa+0x45>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <write_dump@plt>
mov    -0x8(%rbp),%rdi
call   1050 <disable_dump@plt>
mov    -0x8(%rbp),%rdi
call   1060 <enable_dump@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_ioa>:
push   %rbx
mov    %rdi,%rbx
call   1030 <read_dump@plt>
test   %eax,%eax
jle    1168 <dump_ioa+0x28>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <write_dump@plt>
mov    %rbx,%rdi
call   1050 <disable_dump@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1060 <enable_dump@plt>
pop    %rbx
ret

LLVM IR (-O0):
%struct.ipr_ioa = type { i32 }
define void @dump_ioa(%struct.ipr_ioa* %0) {
%2 = alloca %struct.ipr_ioa*
%3 = alloca i32
store %struct.ipr_ioa* %0, %struct.ipr_ioa** %2
%4 = load %struct.ipr_ioa*, %struct.ipr_ioa** %2
%5 = call i32 @read_dump(%struct.ipr_ioa* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp sle i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
br label %17
9: ; preds = %1
%10 = load %struct.ipr_ioa*, %struct.ipr_ioa** %2
%11 = load i32, i32* %3
%12 = call i32 @write_dump(%struct.ipr_ioa* %10, i32 %11)
%13 = load %struct.ipr_ioa*, %struct.ipr_ioa** %2
%14 = call i32 @disable_dump(%struct.ipr_ioa* %13)
%15 = load %struct.ipr_ioa*, %struct.ipr_ioa** %2
%16 = call i32 @enable_dump(%struct.ipr_ioa* %15)
br label %17
17: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
%struct.ipr_ioa = type { i32 }
define void @dump_ioa(%struct.ipr_ioa* %0) {
%2 = tail call i32 @read_dump(%struct.ipr_ioa* %0)
%3 = icmp slt i32 %2, 1
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @write_dump(%struct.ipr_ioa* %0, i32 %2)
%6 = tail call i32 @disable_dump(%struct.ipr_ioa* %0)
%7 = tail call i32 @enable_dump(%struct.ipr_ioa* %0)
br label %8
8: ; preds = %1, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0x44() {
  Assert_real((iscntrl(68) == 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_iscntrl.c",
              345, ("iscntrl should be 0 for D"));
}


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

x86 assembly (clang, -O2):
<t_iscntrl_0x44>:
push   %rax
mov    $0x44,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x159,%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_iscntrl.c\00"
@.str.1 = [26 x i8] c"iscntrl should be 0 for D\00"
define void @t_iscntrl_0x44() {
%1 = call i64 @iscntrl(i32 68)
%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 345, 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_iscntrl.c\00"
@.str.1 = [26 x i8] c"iscntrl should be 0 for D\00"
define void @t_iscntrl_0x44() {
%1 = tail call i64 @iscntrl(i32 68)
%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 345, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
double obterValor(int codigo) {
  switch (codigo) {
  case 1001:
    return 1.50;
  case 1002:
    return 2.50;
  case 1003:
    return 3.50;
  case 1004:
    return 4.50;
  case 1005:
    return 5.50;
  default:
    return 0.0;
  }
}


x86 assembly (clang, -O0):
<obterValor>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0xfffffc17,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x4,%eax
ja     118c <obterValor+0x8c>
mov    -0x18(%rbp),%rax
lea    0xeff(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movsd  0xee6(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1194 <obterValor+0x94>
movsd  0xecc(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1194 <obterValor+0x94>
movsd  0xeb2(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1194 <obterValor+0x94>
movsd  0xe98(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1194 <obterValor+0x94>
movsd  0xe7e(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1194 <obterValor+0x94>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<obterValor>:
add    $0xfffffc17,%edi
xorps  %xmm0,%xmm0
cmp    $0x4,%edi
ja     111d <obterValor+0x1d>
movslq %edi,%rax
lea    0xee8(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm0
ret

LLVM IR (-O0):
define double @obterValor(i32 %0) {
%2 = alloca double
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %10 [
i32 1001, label %5
i32 1002, label %6
i32 1003, label %7
i32 1004, label %8
i32 1005, label %9
]
5: ; preds = %1
store double 1.500000e+00, double* %2
br label %11
6: ; preds = %1
store double 2.500000e+00, double* %2
br label %11
7: ; preds = %1
store double 3.500000e+00, double* %2
br label %11
8: ; preds = %1
store double 4.500000e+00, double* %2
br label %11
9: ; preds = %1
store double 5.500000e+00, double* %2
br label %11
10: ; preds = %1
store double 0.000000e+00, double* %2
br label %11
11: ; preds = %10, %9, %8, %7, %6, %5
%12 = load double, double* %2
ret double %12
}

LLVM IR (-O2):
@switch.table.obterValor = [5 x double] [double 1.500000e+00, double 2.500000e+00, double 3.500000e+00, double 4.500000e+00, double 5.500000e+00]
define double @obterValor(i32 %0) {
%2 = add i32 %0, -1001
%3 = icmp ult i32 %2, 5
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds [5 x double], [5 x double]* @switch.table.obterValor, i64 0, i64 %5
%7 = load double, double* %6
br label %8
8: ; preds = %1, %4
%9 = phi double [ %7, %4 ], [ 0.000000e+00, %1 ]
ret double %9
}
void testing_common_init() {}


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

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

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

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


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
int nc_fgets(char *s, int m, FILE *f) {
  while (fgets(s, m, f) != NULL)
    if (s[0] != '#')
      return 1;
  return 0;
}


x86 assembly (clang, -O0):
<nc_fgets>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x20(%rbp),%rdx
call   1030 <fgets@plt>
cmp    $0x0,%rax
je     115e <nc_fgets+0x4e>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
je     1159 <nc_fgets+0x49>
movl   $0x1,-0x4(%rbp)
jmp    1165 <nc_fgets+0x55>
jmp    1123 <nc_fgets+0x13>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nc_fgets>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %esi,%ebp
mov    %rdi,%rbx
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14,%rdx
call   1030 <fgets@plt>
test   %rax,%rax
je     113e <nc_fgets+0x2e>
cmpb   $0x23,(%rbx)
je     1120 <nc_fgets+0x10>
mov    $0x1,%eax
jmp    1140 <nc_fgets+0x30>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @nc_fgets(i8* %0, i32 %1, i32* nocapture %2) {
br label %4
4: ; preds = %7, %3
%5 = tail call i32* @fgets(i8* %0, i32 %1, i32* %2)
%6 = icmp eq i32* %5, null
br i1 %6, label %10, label %7
7: ; preds = %4
%8 = load i8, i8* %0
%9 = icmp eq i8 %8, 35
br i1 %9, label %4, label %10
10: ; preds = %4, %7
%11 = phi i32 [ 1, %7 ], [ 0, %4 ]
ret i32 %11
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t align(uint32_t value, uint32_t to) {
  if (value & (to - 1)) {
    value &= ~(to - 1);
    value += to;
  }
  return value;
}


x86 assembly (clang, -O0):
<align>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     1136 <align+0x36>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
xor    $0xffffffff,%eax
and    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<align>:
lea    -0x1(%rsi),%ecx
mov    %esi,%eax
neg    %eax
and    %edi,%eax
add    %esi,%eax
test   %edi,%ecx
cmove  %edi,%eax
ret

LLVM IR (-O0):
define i32 @align(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* %4
%7 = sub nsw i32 %6, 1
%8 = and i32 %5, %7
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %19
10: ; preds = %2
%11 = load i32, i32* %4
%12 = sub nsw i32 %11, 1
%13 = xor i32 %12, -1
%14 = load i32, i32* %3
%15 = and i32 %14, %13
store i32 %15, i32* %3
%16 = load i32, i32* %4
%17 = load i32, i32* %3
%18 = add nsw i32 %17, %16
store i32 %18, i32* %3
br label %19
19: ; preds = %10, %2
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
define i32 @align(i32 %0, i32 %1) {
%3 = add nsw i32 %1, -1
%4 = and i32 %3, %0
%5 = icmp eq i32 %4, 0
%6 = sub i32 0, %1
%7 = and i32 %6, %0
%8 = add nsw i32 %7, %1
%9 = select i1 %5, i32 %0, i32 %8
ret i32 %9
}
void pci_aer_clear_fatal_status(struct pci_dev *dev) {}


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

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

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

LLVM IR (-O2):
%struct.pci_dev = type opaque
define void @pci_aer_clear_fatal_status(%struct.pci_dev* nocapture %0) {
ret void
}
A0RX1(r0, r1, x0, x1, p0, p1) char r0, r1;
char *p0, *p1;
{ (*((char *)10000000)) = (p1[x1]); }


x86 assembly (clang, -O0):
<A0RX1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %dil,%sil
mov    %sil,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,1),%cl
mov    $0x989680,%eax
mov    %cl,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<A0RX1>:
movslq %ecx,%rax
mov    (%r9,%rax,1),%al
mov    %al,0x989680
ret

LLVM IR (-O0):
define i32 @A0RX1(i32 %0, i32 %1, i32 %2, i32 %3, i8* %4, i8* %5) {
%7 = alloca i32
%8 = alloca i8
%9 = alloca i8
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i8*
%14 = trunc i32 %0 to i8
%15 = trunc i32 %1 to i8
store i8 %14, i8* %8
store i8 %15, i8* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i8* %4, i8** %12
store i8* %5, i8** %13
%16 = load i8*, i8** %13
%17 = load i32, i32* %11
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8, i8* %16, i64 %18
%20 = load i8, i8* %19
store i8 %20, i8* inttoptr (i64 10000000 to i8*)
%21 = load i32, i32* %7
ret i32 %21
}

LLVM IR (-O2):
define i32 @A0RX1(i32 %0, i32 %1, i32 %2, i32 %3, i8* nocapture readnone %4, i8* nocapture %5) {
%7 = sext i32 %3 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
%9 = load i8, i8* %8
store i8 %9, i8* inttoptr (i64 10000000 to i8*)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ die(char *, long);
void *realloc(void *, size_t);
void *reallocate(const void *old, size_t bytes) {
  void *new = realloc((void *)old, bytes);
  if (!new &&bytes)
    die("could not allocate %lu bytes", (long)bytes);
  return new;
}


x86 assembly (clang, -O0):
<reallocate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1167 <reallocate+0x47>
cmpq   $0x0,-0x10(%rbp)
je     1167 <reallocate+0x47>
mov    -0x10(%rbp),%rsi
lea    0xe9e(%rip),%rdi
call   1040 <die@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reallocate>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
call   1030 <realloc@plt>
mov    %rax,%r14
test   %rbx,%rbx
je     1148 <reallocate+0x28>
test   %r14,%r14
jne    1148 <reallocate+0x28>
lea    0xec0(%rip),%rdi
mov    %rbx,%rsi
call   1040 <die@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [29 x i8] c"could not allocate %lu bytes\00"
define i8* @reallocate(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %17, label %11
11: ; preds = %2
%12 = load i64, i64* %4
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %11
%15 = load i64, i64* %4
%16 = call i32 @die(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i64 %15)
br label %17
17: ; preds = %14, %11, %2
%18 = load i8*, i8** %5
ret i8* %18
}

LLVM IR (-O2):
@.str = [29 x i8] c"could not allocate %lu bytes\00"
define noalias i8* @reallocate(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
%5 = icmp ne i64 %1, 0
%6 = and i1 %5, %4
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = tail call i32 @die(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i64 %1)
br label %9
9: ; preds = %7, %2
ret i8* %3
}
int BitIsSet(void *Data, unsigned Bit) {
  unsigned char *D = Data;
  return (D[Bit / 8] & (0x01 << (Bit % 8))) != 0;
}


x86 assembly (clang, -O0):
<BitIsSet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    -0xc(%rbp),%ecx
shr    $0x3,%ecx
mov    %ecx,%ecx
movzbl (%rax,%rcx,1),%eax
mov    -0xc(%rbp),%ecx
and    $0x7,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @BitIsSet(i8* nocapture %0, i32 %1) {
%3 = lshr i32 %1, 3
%4 = zext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = and i32 %1, 7
%9 = lshr i32 %7, %8
%10 = and i32 %9, 1
ret i32 %10
}
/* Variables and functions */
int getdtablesize();
int _rpc_dtablesize(void) {
  static int size;
  if (size == 0) {
    size = getdtablesize();
  }
  return (size);
}


x86 assembly (clang, -O0):
<_rpc_dtablesize>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,0x2f11(%rip)
jne    112e <_rpc_dtablesize+0x1e>
mov    $0x0,%al
call   1030 <getdtablesize@plt>
mov    %eax,0x2efe(%rip)
mov    0x2ef8(%rip),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_rpc_dtablesize>:
push   %rax
mov    0x2f15(%rip),%eax
test   %eax,%eax
je     111d <_rpc_dtablesize+0xd>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <getdtablesize@plt>
mov    %eax,0x2f02(%rip)
pop    %rcx
ret

LLVM IR (-O0):
@_rpc_dtablesize.size = internal global i32 0
define i32 @_rpc_dtablesize() {
%1 = load i32, i32* @_rpc_dtablesize.size
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 (...) @getdtablesize()
store i32 %4, i32* @_rpc_dtablesize.size
br label %5
5: ; preds = %3, %0
%6 = load i32, i32* @_rpc_dtablesize.size
ret i32 %6
}

LLVM IR (-O2):
@_rpc_dtablesize.size = internal unnamed_addr global i32 0
define i32 @_rpc_dtablesize() {
%1 = load i32, i32* @_rpc_dtablesize.size
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @getdtablesize()
store i32 %4, i32* @_rpc_dtablesize.size
br label %5
5: ; preds = %3, %0
%6 = phi i32 [ %4, %3 ], [ %1, %0 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ i2c_ClearSTAT(int /*<<< orphan*/, unsigned char);
void i2c0_ClearSTAT(unsigned char i2cstats) { i2c_ClearSTAT(0, i2cstats); }


x86 assembly (clang, -O0):
<i2c0_ClearSTAT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
xor    %edi,%edi
movzbl -0x1(%rbp),%esi
call   1030 <i2c_ClearSTAT@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2c0_ClearSTAT>:
mov    %edi,%esi
xor    %edi,%edi
jmp    1030 <i2c_ClearSTAT@plt>

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

LLVM IR (-O2):
define void @i2c0_ClearSTAT(i8 zeroext %0) {
%2 = tail call i32 @i2c_ClearSTAT(i32 0, i8 zeroext %0)
ret void
}
void swap(int *a, int *b) {
  if (a == b)
    return;
  int tmp = *a;
  *a = *b;
  *b = tmp;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jne    111f <swap+0x1f>
jmp    113d <swap+0x3d>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
cmp    %rsi,%rdi
je     110d <swap+0xd>
mov    (%rdi),%eax
mov    (%rsi),%ecx
mov    %ecx,(%rdi)
mov    %eax,(%rsi)
ret

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

LLVM IR (-O2):
define void @swap(i32* %0, i32* %1) {
%3 = icmp eq i32* %0, %1
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = load i32, i32* %0
%6 = load i32, i32* %1
store i32 %6, i32* %0
store i32 %5, i32* %1
br label %7
7: ; preds = %2, %4
ret void
}
void ar5312_plat_setup(void) {}


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

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

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

LLVM IR (-O2):
define void @ar5312_plat_setup() {
ret void
}
void freeGrid(char **grid, int size) {}


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

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

LLVM IR (-O0):
define void @freeGrid(i8** %0, i32 %1) {
%3 = alloca i8**
%4 = alloca i32
store i8** %0, i8*** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
define void @freeGrid(i8** nocapture %0, i32 %1) {
ret void
}
void swapc(char *a, char *b) {
  char w;
  w = *a;
  *a = *b;
  *b = w;
  return;
}


x86 assembly (clang, -O0):
<swapc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x11(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swapc>:
mov    (%rdi),%al
mov    (%rsi),%cl
mov    %cl,(%rdi)
mov    %al,(%rsi)
ret

LLVM IR (-O0):
define void @swapc(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
store i8 %7, i8* %5
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%10 = load i8*, i8** %3
store i8 %9, i8* %10
%11 = load i8, i8* %5
%12 = load i8*, i8** %4
store i8 %11, i8* %12
ret void
}

LLVM IR (-O2):
define void @swapc(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
store i8 %4, i8* %0
store i8 %3, i8* %1
ret void
}
void RandomFunc(unsigned char input[1], unsigned char output[1]) {
  unsigned char state[1];
  unsigned char local1;
  {
    state[0UL] = (input[0UL] + 51238316UL) + (unsigned char)234;
    local1 = 0UL;
    while (local1 < (unsigned char)0) {
      state[0UL] = state[local1] * state[0UL];
      local1 += 2UL;
    }
    output[0UL] = state[0UL] + 515147141UL;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
add    $0x30dd5ac,%rax
add    $0xea,%rax
mov    %al,-0x11(%rbp)
movb   $0x0,-0x12(%rbp)
movzbl -0x12(%rbp),%eax
cmp    $0x0,%eax
jge    1156 <RandomFunc+0x56>
movzbl -0x12(%rbp),%eax
movzbl -0x11(%rbp,%rax,1),%eax
movzbl -0x11(%rbp),%ecx
imul   %ecx,%eax
mov    %al,-0x11(%rbp)
movzbl -0x12(%rbp),%eax
add    $0x2,%rax
mov    %al,-0x12(%rbp)
jmp    1126 <RandomFunc+0x26>
movzbl -0x11(%rbp),%eax
add    $0x1eb48585,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
mov    (%rdi),%al
add    $0x1b,%al
mov    %al,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [1 x i8]
%6 = alloca i8
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = getelementptr inbounds i8, i8* %7, i64 0
%9 = load i8, i8* %8
%10 = zext i8 %9 to i64
%11 = add i64 %10, 51238316
%12 = add i64 %11, 234
%13 = trunc i64 %12 to i8
%14 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
store i8 %13, i8* %14
store i8 0, i8* %6
br label %15
15: ; preds = %19, %2
%16 = load i8, i8* %6
%17 = zext i8 %16 to i32
%18 = icmp slt i32 %17, 0
br i1 %18, label %19, label %35
19: ; preds = %15
%20 = load i8, i8* %6
%21 = zext i8 %20 to i64
%22 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 %21
%23 = load i8, i8* %22
%24 = zext i8 %23 to i32
%25 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
%26 = load i8, i8* %25
%27 = zext i8 %26 to i32
%28 = mul nsw i32 %24, %27
%29 = trunc i32 %28 to i8
%30 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
store i8 %29, i8* %30
%31 = load i8, i8* %6
%32 = zext i8 %31 to i64
%33 = add i64 %32, 2
%34 = trunc i64 %33 to i8
store i8 %34, i8* %6
br label %15
35: ; preds = %15
%36 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
%37 = load i8, i8* %36
%38 = zext i8 %37 to i64
%39 = add i64 %38, 515147141
%40 = trunc i64 %39 to i8
%41 = load i8*, i8** %4
%42 = getelementptr inbounds i8, i8* %41, i64 0
store i8 %40, i8* %42
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i8* nocapture %0, i8* nocapture writeonly %1) {
%3 = load i8, i8* %0
%4 = add i8 %3, 27
store i8 %4, i8* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void recursive(int number) {
  int last;
  if (number != 0) {
    last = number % 10;
    printf("%d", last);
    number /= 10;
    recursive(number);
  }
}


x86 assembly (clang, -O0):
<recursive>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1168 <recursive+0x48>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <recursive@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recursive>:
push   %r15
push   %r14
push   %rbx
test   %edi,%edi
je     1164 <recursive+0x54>
mov    %edi,%ebx
lea    0xede(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movslq %ebx,%r15
imul   $0x66666667,%r15,%rbx
mov    %rbx,%rax
shr    $0x3f,%rax
sar    $0x22,%rbx
add    %eax,%ebx
lea    (%rbx,%rbx,1),%eax
lea    (%rax,%rax,4),%eax
mov    %r15d,%esi
sub    %eax,%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x9,%r15d
cmp    $0x12,%r15d
ja     1130 <recursive+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @recursive(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ %0, %1 ]
%5 = srem i32 %4, 10
%6 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = sdiv i32 %4, 10
%8 = add i32 %4, 9
%9 = icmp ult i32 %8, 19
br i1 %9, label %10, label %3
10: ; preds = %3, %1
ret void
}
/* Type definitions */
struct proctal {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ proctal_implementation_scan_address_stop(struct proctal *);
void proctal_scan_address_stop(struct proctal *p) {
  proctal_implementation_scan_address_stop(p);
}


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

x86 assembly (clang, -O2):
<proctal_scan_address_stop>:
jmp    1030 <proctal_implementation_scan_address_stop@plt>

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

LLVM IR (-O2):
%struct.proctal = type { i32 }
define void @proctal_scan_address_stop(%struct.proctal* %0) {
%2 = tail call i32 @proctal_implementation_scan_address_stop(%struct.proctal* %0)
ret void
}