xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ PRIO_PROCESS;
int /*<<< orphan*/ atoi(char *);
int /*<<< orphan*/ die(char *, int /*<<< orphan*/ *, void *);
scalar_t__ setpriority(int /*<<< orphan*/, int /*<<< orphan*/,
                       int /*<<< orphan*/);
void setprio(char *p) {
  if (setpriority(PRIO_PROCESS, 0, atoi(p)))
    die("setpriority failed", NULL, ((void *)-1));
}


x86 assembly (clang, -O0):
<setprio>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <atoi@plt>
mov    -0xc(%rbp),%edi
mov    %eax,%edx
xor    %esi,%esi
call   1030 <setpriority@plt>
cmp    $0x0,%rax
je     117e <setprio+0x4e>
lea    0xe92(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xffffffffffffffff,%rdx
call   1040 <die@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setprio>:
push   %rbx
mov    0x2ea8(%rip),%rax
mov    (%rax),%ebx
call   1050 <atoi@plt>
mov    %ebx,%edi
xor    %esi,%esi
mov    %eax,%edx
call   1030 <setpriority@plt>
test   %rax,%rax
je     1165 <setprio+0x35>
lea    0xeaa(%rip),%rdi
xor    %esi,%esi
mov    $0xffffffffffffffff,%rdx
pop    %rbx
jmp    1040 <die@plt>
pop    %rbx
ret

LLVM IR (-O0):
@PRIO_PROCESS = global i32 0
@.str = [19 x i8] c"setpriority failed\00"
define void @setprio(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @PRIO_PROCESS
%4 = load i8*, i8** %2
%5 = call i32 @atoi(i8* %4)
%6 = call i64 @setpriority(i32 %3, i32 0, i32 %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 @die(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32* null, i8* inttoptr (i64 -1 to i8*))
br label %10
10: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
@PRIO_PROCESS = global i32 0
@.str = [19 x i8] c"setpriority failed\00"
define void @setprio(i8* nocapture %0) {
%2 = load i32, i32* @PRIO_PROCESS
%3 = tail call i32 @atoi(i8* %0)
%4 = tail call i64 @setpriority(i32 %2, i32 0, i32 %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = tail call i32 @die(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32* null, i8* inttoptr (i64 -1 to i8*))
br label %8
8: ; preds = %6, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ vector_nd_alloc(void **, int, int *, int);
void vector_alloc(void **ptr, int element_size, int d1) {
  int dims[1];
  dims[0] = d1;
  vector_nd_alloc(ptr, element_size, dims, 1);
}


x86 assembly (clang, -O0):
<vector_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    -0x14(%rbp),%rdx
mov    $0x1,%ecx
call   1030 <vector_nd_alloc@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vector_alloc>:
push   %rax
mov    %edx,0x4(%rsp)
lea    0x4(%rsp),%rdx
mov    $0x1,%ecx
call   1030 <vector_nd_alloc@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @vector_alloc(i8** %0, i32 %1, i32 %2) {
%4 = alloca i8**
%5 = alloca i32
%6 = alloca i32
%7 = alloca [1 x i32]
store i8** %0, i8*** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %6
%9 = getelementptr inbounds [1 x i32], [1 x i32]* %7, i64 0, i64 0
store i32 %8, i32* %9
%10 = load i8**, i8*** %4
%11 = load i32, i32* %5
%12 = getelementptr inbounds [1 x i32], [1 x i32]* %7, i64 0, i64 0
%13 = call i32 @vector_nd_alloc(i8** %10, i32 %11, i32* %12, i32 1)
ret void
}

LLVM IR (-O2):
define void @vector_alloc(i8** %0, i32 %1, i32 %2) {
%4 = alloca [1 x i32]
%5 = bitcast [1 x i32]* %4 to i8*
%6 = getelementptr inbounds [1 x i32], [1 x i32]* %4, i64 0, i64 0
store i32 %2, i32* %6
%7 = call i32 @vector_nd_alloc(i8** %0, i32 %1, i32* %6, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void move_cursor(int row, int col) { printf("\x1b[%d;%dH", row, col); }


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

x86 assembly (clang, -O2):
<move_cursor>:
mov    %esi,%edx
mov    %edi,%esi
lea    0xee5(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"\1B[%d;%dH\00"
define void @move_cursor(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 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"\1B[%d;%dH\00"
define void @move_cursor(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret void
}
void RTFileAioReqPrepareRead(void) {}


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

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

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

LLVM IR (-O2):
define void @RTFileAioReqPrepareRead() {
ret void
}
int isdozdig(char c) {
  switch (c) {
  case '0':
  case '1':
  case '2':
  case '3':
  case '4':
  case '5':
  case '6':
  case '7':
  case '8':
  case '9':
  case 'A':
  case 'a':
  case 'B':
  case 'b':
  case 'X':
  case 'x':
  case 'E':
  case 'e':
  case 'T':
  case 't':
  case ';':
  case '-':
    return 1;
    break;
  default:
    return 0;
    break;
  }
}


x86 assembly (clang, -O0):
<isdozdig>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
add    $0xffffffd3,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x4b,%eax
ja     1140 <isdozdig+0x40>
mov    -0x10(%rbp),%rax
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x4(%rbp)
jmp    1147 <isdozdig+0x47>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isdozdig>:
add    $0xffffffd3,%edi
cmp    $0x4b,%edi
ja     111e <isdozdig+0x1e>
mov    $0x1,%eax
lea    0xeec(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @isdozdig(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %7 [
i32 48, label %6
i32 49, label %6
i32 50, label %6
i32 51, label %6
i32 52, label %6
i32 53, label %6
i32 54, label %6
i32 55, label %6
i32 56, label %6
i32 57, label %6
i32 65, label %6
i32 97, label %6
i32 66, label %6
i32 98, label %6
i32 88, label %6
i32 120, label %6
i32 69, label %6
i32 101, label %6
i32 84, label %6
i32 116, label %6
i32 59, label %6
i32 45, label %6
]
6: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1
store i32 1, i32* %2
br label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @isdozdig(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %3 [
i32 48, label %4
i32 49, label %4
i32 50, label %4
i32 51, label %4
i32 52, label %4
i32 53, label %4
i32 54, label %4
i32 55, label %4
i32 56, label %4
i32 57, label %4
i32 65, label %4
i32 97, label %4
i32 66, label %4
i32 98, label %4
i32 88, label %4
i32 120, label %4
i32 69, label %4
i32 101, label %4
i32 84, label %4
i32 116, label %4
i32 59, label %4
i32 45, label %4
]
3: ; preds = %1
br label %4
4: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %3
%5 = phi i32 [ 0, %3 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ SIGINT;
int /*<<< orphan*/ SIGPIPE;
int /*<<< orphan*/ SIGQUIT;
int /*<<< orphan*/ restore_signal(int /*<<< orphan*/);
void restore_signals() {
  restore_signal(SIGPIPE);
  restore_signal(SIGINT);
  restore_signal(SIGQUIT);
}


x86 assembly (clang, -O0):
<restore_signals>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
call   1030 <restore_signal@plt>
mov    0x2ebf(%rip),%rax
mov    (%rax),%edi
call   1030 <restore_signal@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1030 <restore_signal@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<restore_signals>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
call   1030 <restore_signal@plt>
mov    0x2ec2(%rip),%rax
mov    (%rax),%edi
call   1030 <restore_signal@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1030 <restore_signal@plt>

LLVM IR (-O0):
@SIGPIPE = global i32 0
@SIGINT = global i32 0
@SIGQUIT = global i32 0
define void @restore_signals() {
%1 = load i32, i32* @SIGPIPE
%2 = call i32 @restore_signal(i32 %1)
%3 = load i32, i32* @SIGINT
%4 = call i32 @restore_signal(i32 %3)
%5 = load i32, i32* @SIGQUIT
%6 = call i32 @restore_signal(i32 %5)
ret void
}

LLVM IR (-O2):
@SIGPIPE = global i32 0
@SIGINT = global i32 0
@SIGQUIT = global i32 0
define void @restore_signals() {
%1 = load i32, i32* @SIGPIPE
%2 = tail call i32 @restore_signal(i32 %1)
%3 = load i32, i32* @SIGINT
%4 = tail call i32 @restore_signal(i32 %3)
%5 = load i32, i32* @SIGQUIT
%6 = tail call i32 @restore_signal(i32 %5)
ret void
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, int, char *);
void output_symbol(char *name, uint16_t addr, char *type) {
  printf("%s %04X %s\n", name, addr, type);
}


x86 assembly (clang, -O0):
<output_symbol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output_symbol>:
mov    %rdx,%rcx
mov    %esi,%edx
mov    %rdi,%rsi
lea    0xee1(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"%s %04X %s\0A\00"
define void @output_symbol(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = load i8*, i8** %6
%10 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %7, i32 %8, i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"%s %04X %s\0A\00"
define void @output_symbol(i8* %0, i32 %1, i8* %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1, i8* %2)
ret void
}
/* Variables and functions */
int mintaka_index_allocate2(char const *, int, char const *, int);
int mintaka_index_allocate2_(const char *string, int *number,
                             const char *string2, int *event) {
  return mintaka_index_allocate2(string, *number, string2, *event);
}


x86 assembly (clang, -O0):
<mintaka_index_allocate2_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rax
mov    (%rax),%ecx
call   1030 <mintaka_index_allocate2@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mintaka_index_allocate2_>:
mov    (%rsi),%esi
mov    (%rcx),%ecx
jmp    1030 <mintaka_index_allocate2@plt>

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

LLVM IR (-O2):
define i32 @mintaka_index_allocate2_(i8* %0, i32* nocapture %1, i8* %2, i32* nocapture %3) {
%5 = load i32, i32* %1
%6 = load i32, i32* %3
%7 = tail call i32 @mintaka_index_allocate2(i8* %0, i32 %5, i8* %2, i32 %6)
ret i32 %7
}
unsigned hashcode(char *word) {
  unsigned code;
  for (code = 0; *word != '\0'; word++) {
    code = *word + 31 * code;
  }
  return code % 1337;
}


x86 assembly (clang, -O0):
<hashcode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1140 <hashcode+0x40>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
imul   $0x1f,-0xc(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <hashcode+0xf>
mov    -0xc(%rbp),%eax
mov    $0x539,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashcode>:
mov    (%rdi),%cl
test   %cl,%cl
je     114c <hashcode+0x4c>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movsbl %cl,%ecx
mov    %eax,%edx
shl    $0x5,%edx
sub    %eax,%edx
mov    %edx,%eax
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hashcode+0x10>
mov    %eax,%ecx
mov    $0x88233b2b,%edx
imul   %rcx,%rdx
shr    $0x20,%rdx
mov    %eax,%ecx
sub    %edx,%ecx
shr    %ecx
add    %edx,%ecx
shr    $0xa,%ecx
imul   $0x539,%ecx,%ecx
sub    %ecx,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @hashcode(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %16, %1
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %19
9: ; preds = %4
%10 = load i8*, i8** %2
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = load i32, i32* %3
%14 = mul i32 31, %13
%15 = add i32 %12, %14
store i32 %15, i32* %3
br label %16
16: ; preds = %9
%17 = load i8*, i8** %2
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %2
br label %4
19: ; preds = %4
%20 = load i32, i32* %3
%21 = urem i32 %20, 1337
ret i32 %21
}

LLVM IR (-O2):
define i32 @hashcode(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %10, %4 ], [ 0, %1 ]
%7 = phi i8* [ %11, %4 ], [ %0, %1 ]
%8 = sext i8 %5 to i32
%9 = mul i32 %6, 31
%10 = add i32 %9, %8
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4
%15 = urem i32 %10, 1337
br label %16
16: ; preds = %14, %1
%17 = phi i32 [ 0, %1 ], [ %15, %14 ]
ret i32 %17
}
/* Variables and functions */
int check_arg_count(int, int);
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_error(char *);
void cmd_mvadd_wch(int nargs, char **args) {
  if (check_arg_count(nargs, 1) == 1)
    return;
  report_count(1);
  report_error("UNSUPPORTED");
}


x86 assembly (clang, -O0):
<cmd_mvadd_wch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    115a <cmd_mvadd_wch+0x2a>
jmp    1170 <cmd_mvadd_wch+0x40>
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xe95(%rip),%rdi
call   1050 <report_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_mvadd_wch>:
push   %rax
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    1142 <cmd_mvadd_wch+0x12>
pop    %rax
ret
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xead(%rip),%rdi
pop    %rax
jmp    1050 <report_error@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_mvadd_wch(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = call i32 @check_arg_count(i32 %5, i32 1)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %2
br label %12
9: ; preds = %2
%10 = call i32 @report_count(i32 1)
%11 = call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_mvadd_wch(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_arg_count(i32 %0, i32 1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @report_count(i32 1)
%7 = tail call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %2, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void *malloc(size_t);
int /*<<< orphan*/ write_error(char *);
void *easy_malloc(size_t size) {
  void *memory = malloc(size);
  if (!memory) {
    write_error("Could not allocate memory. Probably no more RAM. Exiting.");
    exit(EXIT_FAILURE);
  }
  return memory;
}


x86 assembly (clang, -O0):
<easy_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    116e <easy_malloc+0x3e>
lea    0xea5(%rip),%rdi
call   1030 <write_error@plt>
mov    0x2e79(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<easy_malloc>:
push   %rax
call   1040 <malloc@plt>
test   %rax,%rax
je     113d <easy_malloc+0xd>
pop    %rcx
ret
lea    0xebc(%rip),%rdi
call   1030 <write_error@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [58 x i8] c"Could not allocate memory. Probably no more RAM. Exiting.\00"
@EXIT_FAILURE = global i32 0
define i8* @easy_malloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %12, label %8
8: ; preds = %1
%9 = call i32 @write_error(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0))
%10 = load i32, i32* @EXIT_FAILURE
%11 = call i32 @exit(i32 %10)
unreachable
12: ; preds = %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@.str = [58 x i8] c"Could not allocate memory. Probably no more RAM. Exiting.\00"
@EXIT_FAILURE = global i32 0
define noalias i8* @easy_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32 @write_error(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
8: ; preds = %1
ret i8* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ X509_ATTRIBUTE;

/* Variables and functions */
int /*<<< orphan*/ *ASN1_item_dup(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ X509_ATTRIBUTE_it;
X509_ATTRIBUTE *X509_ATTRIBUTE_dup(X509_ATTRIBUTE *x) {
  return ASN1_item_dup(&X509_ATTRIBUTE_it, x);
}


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

x86 assembly (clang, -O2):
<X509_ATTRIBUTE_dup>:
mov    %rdi,%rsi
mov    0x2ebe(%rip),%rdi
jmp    1030 <ASN1_item_dup@plt>

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

LLVM IR (-O2):
@X509_ATTRIBUTE_it = global i32 0
define i32* @X509_ATTRIBUTE_dup(i32* %0) {
%2 = tail call i32* @ASN1_item_dup(i32* @X509_ATTRIBUTE_it, i32* %0)
ret i32* %2
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void g2_cb(void *arg) { puts("GPIO_2 triggered"); }


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"GPIO_2 triggered\00"
define void @g2_cb(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @puts(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"GPIO_2 triggered\00"
define void @g2_cb(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ send_event;
};
struct TYPE_4__ {
  TYPE_1__ xconfigure;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
int get_XEvent_xconfigure_send_event(void *_p) {
  return (int)((XEvent *)_p)->xconfigure.send_event;
}


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

x86 assembly (clang, -O2):
<get_XEvent_xconfigure_send_event>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i32 @get_XEvent_xconfigure_send_event(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @get_XEvent_xconfigure_send_event(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ my_putchar(char);
int /*<<< orphan*/ my_putstr(char *);
int my_show_wordtab(char **tab) {
  int i;
  i = 0;
  while (tab[i]) {
    my_putstr(tab[i]);
    my_putchar('\n');
    i = i + 1;
  }
}


x86 assembly (clang, -O0):
<my_show_wordtab>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     116f <my_show_wordtab+0x4f>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1040 <my_putstr@plt>
mov    $0xa,%edi
call   1030 <my_putchar@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1133 <my_show_wordtab+0x13>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_show_wordtab>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     114b <my_show_wordtab+0x2b>
add    $0x8,%rbx
call   1040 <my_putstr@plt>
mov    $0xa,%edi
call   1030 <my_putchar@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1130 <my_show_wordtab+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @my_show_wordtab(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %9, %4 ], [ 0, %1 ]
%6 = phi i8* [ %11, %4 ], [ %2, %1 ]
%7 = tail call i32 @my_putstr(i8* %6)
%8 = tail call i32 @my_putchar(i8 signext 10)
%9 = add nuw i64 %5, 1
%10 = getelementptr inbounds i8*, i8** %0, i64 %9
%11 = load i8*, i8** %10
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %4
13: ; preds = %4, %1
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void stbi_image_free(void *retval_from_stbi_load) {
  free(retval_from_stbi_load);
}


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

x86 assembly (clang, -O2):
<stbi_image_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @stbi_image_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
void swap(int *a, int *b) {
  int swap = *a;
  *a = *b;
  *b = swap;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
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>:
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* %6
store i32 %7, i32* %5
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
%10 = load i32*, i32** %3
store i32 %9, i32* %10
%11 = load i32, i32* %5
%12 = load i32*, i32** %4
store i32 %11, i32* %12
ret void
}

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(void) {
  int x = 5;
  int y = 8;
  if (y == 8) {
    if (x == 5) {
      puts("@@@@@");
    } else {
      puts("#####");
      puts("$$$$$");
      puts("&&&&&");
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movl   $0x8,-0xc(%rbp)
cmpl   $0x8,-0xc(%rbp)
jne    117b <main+0x6b>
cmpl   $0x5,-0x8(%rbp)
jne    1152 <main+0x42>
lea    0xeb8(%rip),%rdi
call   1030 <puts@plt>
jmp    1176 <main+0x66>
lea    0xead(%rip),%rdi
call   1030 <puts@plt>
lea    0xea7(%rip),%rdi
call   1030 <puts@plt>
lea    0xea1(%rip),%rdi
call   1030 <puts@plt>
jmp    117b <main+0x6b>
xor    %eax,%eax
add    $0x10,%rsp
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 = [6 x i8] c"@@@@@\00"
@.str.1 = [6 x i8] c"#####\00"
@.str.2 = [6 x i8] c"$$$$$\00"
@.str.3 = [6 x i8] c"&&&&&\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 5, i32* %2
store i32 8, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 8
br i1 %5, label %6, label %16
6: ; preds = %0
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 5
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %15
11: ; preds = %6
%12 = call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%13 = call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%14 = call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
br label %15
15: ; preds = %11, %9
br label %16
16: ; preds = %15, %0
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"@@@@@\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int write_int_to_file(char *, int);
int gpio_export(int gpio) {
  return write_int_to_file("/sys/class/gpio/export", gpio);
}


x86 assembly (clang, -O0):
<gpio_export>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <write_int_to_file@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gpio_export>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <write_int_to_file@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"/sys/class/gpio/export\00"
define i32 @gpio_export(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @write_int_to_file(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 %4
}

LLVM IR (-O2):
@.str = [23 x i8] c"/sys/class/gpio/export\00"
define i32 @gpio_export(i32 %0) {
%2 = tail call i32 @write_int_to_file(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 %2
}
/* Variables and functions */
float expf(float);
float sigmoidf(float x) { return 1.f / (1.f + expf(-x)); }


x86 assembly (clang, -O0):
<sigmoidf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
call   1030 <expf@plt>
movss  0xec4(%rip),%xmm1
addss  %xmm0,%xmm1
movss  0xeb8(%rip),%xmm0
divss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigmoidf>:
push   %rax
xorps  0xee8(%rip),%xmm0
call   1030 <expf@plt>
movss  0xeeb(%rip),%xmm1
addss  %xmm1,%xmm0
divss  %xmm0,%xmm1
movaps %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @sigmoidf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fneg float %3
%5 = call float @expf(float %4)
%6 = fadd float 1.000000e+00, %5
%7 = fdiv float 1.000000e+00, %6
ret float %7
}

LLVM IR (-O2):
define float @sigmoidf(float %0) {
%2 = fneg float %0
%3 = tail call float @expf(float %2)
%4 = fadd float %3, 1.000000e+00
%5 = fdiv float 1.000000e+00, %4
ret float %5
}
/* Type definitions */
struct rtattr {
  int dummy;
};

/* Variables and functions */
const char *rta_getattr_str(const struct rtattr *rta) {
  return (const char *)((
      void *)(((char *)(rta)) +
              ((((sizeof(struct rtattr)) + 4U - 1) & ~(4U - 1)) + (0))));
}


x86 assembly (clang, -O0):
<rta_getattr_str>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x4,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rta_getattr_str>:
lea    0x4(%rdi),%rax
ret

LLVM IR (-O0):
%struct.rtattr = type { i32 }
define i8* @rta_getattr_str(%struct.rtattr* %0) {
%2 = alloca %struct.rtattr*
store %struct.rtattr* %0, %struct.rtattr** %2
%3 = load %struct.rtattr*, %struct.rtattr** %2
%4 = bitcast %struct.rtattr* %3 to i8*
%5 = getelementptr inbounds i8, i8* %4, i64 4
ret i8* %5
}

LLVM IR (-O2):
%struct.rtattr = type { i32 }
define i8* @rta_getattr_str(%struct.rtattr* readnone %0) {
%2 = getelementptr inbounds %struct.rtattr, %struct.rtattr* %0, i64 1
%3 = bitcast %struct.rtattr* %2 to i8*
ret i8* %3
}
void Swap(int *x, int *y) {
  int n;
  n = *x;
  *x = *y;
  *y = n;
}


x86 assembly (clang, -O0):
<Swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
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>:
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* %6
store i32 %7, i32* %5
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
%10 = load i32*, i32** %3
store i32 %9, i32* %10
%11 = load i32, i32* %5
%12 = load i32*, i32** %4
store i32 %11, i32* %12
ret void
}

LLVM IR (-O2):
define void @Swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
/* Variables and functions */
int test_simple_sampler(int /*<<< orphan*/ *, int /*<<< orphan*/);
int test_unconfigured_sampler() { return test_simple_sampler(NULL, 0); }


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

x86 assembly (clang, -O2):
<test_unconfigured_sampler>:
xor    %edi,%edi
xor    %esi,%esi
jmp    1030 <test_simple_sampler@plt>

LLVM IR (-O0):
define i32 @test_unconfigured_sampler() {
%1 = call i32 @test_simple_sampler(i32* null, i32 0)
ret i32 %1
}

LLVM IR (-O2):
define i32 @test_unconfigured_sampler() {
%1 = tail call i32 @test_simple_sampler(i32* null, i32 0)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ ST_loadData();
void ST_Init(void) { ST_loadData(); }


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

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

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

LLVM IR (-O2):
define void @ST_Init() {
%1 = tail call i32 (...) @ST_loadData()
ret void
}
FUNCTION_DEFINE(debug_on) { PG_RETURN_INT32(DebugSetOn()); }


x86 assembly (clang, -O0):
<FUNCTION_DEFINE>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <DebugSetOn@plt>
mov    %eax,%edi
mov    $0x0,%al
call   1030 <PG_RETURN_INT32@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FUNCTION_DEFINE>:
push   %rax
xor    %eax,%eax
call   1040 <DebugSetOn@plt>
mov    %eax,%edi
xor    %eax,%eax
pop    %rcx
jmp    1030 <PG_RETURN_INT32@plt>

LLVM IR (-O0):
define i32 @FUNCTION_DEFINE(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 (...) @DebugSetOn()
%5 = call i32 (i32, ...) bitcast (i32 (...)* @PG_RETURN_INT32 to i32 (i32, ...)*)(i32 %4)
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
define i32 @FUNCTION_DEFINE(i32 %0) {
%2 = tail call i32 (...) @DebugSetOn()
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @PG_RETURN_INT32 to i32 (i32, ...)*)(i32 %2)
ret i32 undef
}
void gtk_tree_view_column_pack_end() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_view_column_pack_end() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0xa9() {
  Assert_real((isalpha(169) == 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_isalpha.c",
              850, ("isalpha should be 0 for 0xa9"));
}


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

x86 assembly (clang, -O2):
<t_isalpha_0xa9>:
push   %rax
mov    $0xa9,%edi
call   1030 <isalpha@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x352,%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_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0xa9\00"
define void @t_isalpha_0xa9() {
%1 = call i64 @isalpha(i32 169)
%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 850, 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_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0xa9\00"
define void @t_isalpha_0xa9() {
%1 = tail call i64 @isalpha(i32 169)
%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 850, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void MPUDisable(void) {
  (*((volatile unsigned long *)(0xE000ED94))) &= ~0x00000001;
}


x86 assembly (clang, -O0):
<MPUDisable>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe000ed94,%eax
mov    (%rax),%rcx
and    $0xfffffffffffffffe,%rcx
mov    $0xe000ed94,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<MPUDisable>:
mov    $0xe000ed94,%eax
andq   $0xfffffffffffffffe,(%rax)
ret

LLVM IR (-O0):
define void @MPUDisable() {
%1 = load volatile i64, i64* inttoptr (i64 3758157204 to i64*)
%2 = and i64 %1, -2
store volatile i64 %2, i64* inttoptr (i64 3758157204 to i64*)
ret void
}

LLVM IR (-O2):
define void @MPUDisable() {
%1 = load volatile i64, i64* inttoptr (i64 3758157204 to i64*)
%2 = and i64 %1, -2
store volatile i64 %2, i64* inttoptr (i64 3758157204 to i64*)
ret void
}
void RGB24ToARGBRow_C() {}


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

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

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

LLVM IR (-O2):
define void @RGB24ToARGBRow_C() {
ret void
}
void _pstringtocstring(s) unsigned char **s;
{
  char *p2cstr();
  *s = (unsigned char *)p2cstr(*s);
}


x86 assembly (clang, -O0):
<_pstringtocstring>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    $0x0,%al
call   1030 <p2cstr@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_pstringtocstring>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
xor    %eax,%eax
call   1030 <p2cstr@plt>
mov    %rax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @_pstringtocstring(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = load i8*, i8** %3
%5 = call i8* (i8*, ...) bitcast (i8* (...)* @p2cstr to i8* (i8*, ...)*)(i8* %4)
%6 = load i8**, i8*** %2
store i8* %5, i8** %6
ret void
}

LLVM IR (-O2):
define void @_pstringtocstring(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i8* (i8*, ...) bitcast (i8* (...)* @p2cstr to i8* (i8*, ...)*)(i8* %2)
store i8* %3, i8** %0
ret void
}
OP(ed, ae) {}


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

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
ret i32 undef
}
void flush_tlb_all(void) {}


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

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

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

LLVM IR (-O2):
define void @flush_tlb_all() {
ret void
}
/* Variables and functions */
double libballistics_deg2rad(double);
double sin(double);
double libballistics_crossWind(double windSpeed, double windAngle) {
  double Wangle = libballistics_deg2rad(windAngle);
  return (sin(Wangle) * windSpeed);
}


x86 assembly (clang, -O0):
<libballistics_crossWind>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <libballistics_deg2rad@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1040 <sin@plt>
mulsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<libballistics_crossWind>:
push   %rax
movsd  %xmm0,(%rsp)
movapd %xmm1,%xmm0
call   1030 <libballistics_deg2rad@plt>
call   1040 <sin@plt>
mulsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @libballistics_crossWind(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %4
%7 = call double @libballistics_deg2rad(double %6)
store double %7, double* %5
%8 = load double, double* %5
%9 = call double @sin(double %8)
%10 = load double, double* %3
%11 = fmul double %9, %10
ret double %11
}

LLVM IR (-O2):
define double @libballistics_crossWind(double %0, double %1) {
%3 = tail call double @libballistics_deg2rad(double %1)
%4 = tail call double @sin(double %3)
%5 = fmul double %4, %0
ret double %5
}
void yyerror(char *msg) {}


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

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

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

LLVM IR (-O2):
define void @yyerror(i8* nocapture %0) {
ret void
}
void __aeabi_unwind_cpp_pr0(void) {
  for (;;)
    ;
}


x86 assembly (clang, -O0):
<__aeabi_unwind_cpp_pr0>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <__aeabi_unwind_cpp_pr0+0x9>
jmp    1109 <__aeabi_unwind_cpp_pr0+0x9>

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

LLVM IR (-O0):
define void @__aeabi_unwind_cpp_pr0() {
br label %1
1: ; preds = %1, %0
br label %1
}

LLVM IR (-O2):
define void @__aeabi_unwind_cpp_pr0() {
br label %1
1: ; preds = %1, %0
br label %1
}
int do_320() { return 320; }


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

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

LLVM IR (-O0):
define i32 @do_320() {
ret i32 320
}

LLVM IR (-O2):
define i32 @do_320() {
ret i32 320
}
void dlmalloc_walk_heap() {}


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

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

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

LLVM IR (-O2):
define void @dlmalloc_walk_heap() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0xca() {
  Assert_real((ispunct(202) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_ispunct.c",
              1015, ("ispunct should be 0 for 0xca"));
}


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xca\00"
define void @t_ispunct_0xca() {
%1 = call i64 @ispunct(i32 202)
%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 1015, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xca\00"
define void @t_ispunct_0xca() {
%1 = tail call i64 @ispunct(i32 202)
%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 1015, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
__attribute__((always_)) int
constant_test_bit(unsigned int nr, const volatile unsigned long *addr) {
  return ((1UL << (nr % 32)) & (((unsigned long *)addr)[nr / 32])) != 0;
}


x86 assembly (clang, -O0):
<constant_test_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1f,%eax
mov    %eax,%eax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%rax
mov    -0x10(%rbp),%rcx
mov    -0x4(%rbp),%edx
shr    $0x5,%edx
mov    %edx,%edx
and    (%rcx,%rdx,8),%rax
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<constant_test_bit>:
mov    %edi,%eax
shr    $0x5,%eax
mov    (%rsi,%rax,8),%ecx
xor    %eax,%eax
bt     %edi,%ecx
setb   %al
ret

LLVM IR (-O0):
define i32 @constant_test_bit(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 = urem i32 %5, 32
%7 = zext i32 %6 to i64
%8 = shl i64 1, %7
%9 = load i64*, i64** %4
%10 = load i32, i32* %3
%11 = udiv i32 %10, 32
%12 = zext i32 %11 to i64
%13 = getelementptr inbounds i64, i64* %9, i64 %12
%14 = load i64, i64* %13
%15 = and i64 %8, %14
%16 = icmp ne i64 %15, 0
%17 = zext i1 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
define i32 @constant_test_bit(i32 %0, i64* nocapture %1) {
%3 = and i32 %0, 31
%4 = zext i32 %3 to i64
%5 = shl nuw nsw i64 1, %4
%6 = lshr i32 %0, 5
%7 = zext i32 %6 to i64
%8 = getelementptr inbounds i64, i64* %1, i64 %7
%9 = load i64, i64* %8
%10 = and i64 %9, %5
%11 = icmp ne i64 %10, 0
%12 = zext i1 %11 to i32
ret i32 %12
}
void ARGB1555ToUVRow_C() {}


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

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

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

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