xunge/DecIR huggingface dataset:
int pathcon_nm5_work(int *sz_arg, int *sz_res, int *sz_iw, int *sz_w) {
  if (sz_arg)
    *sz_arg = 2;
  if (sz_res)
    *sz_res = 2;
  if (sz_iw)
    *sz_iw = 0;
  if (sz_w)
    *sz_w = 0;
  return 0;
}


x86 assembly (clang, -O0):
<pathcon_nm5_work>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1129 <pathcon_nm5_work+0x29>
mov    -0x8(%rbp),%rax
movl   $0x2,(%rax)
cmpq   $0x0,-0x10(%rbp)
je     113e <pathcon_nm5_work+0x3e>
mov    -0x10(%rbp),%rax
movl   $0x2,(%rax)
cmpq   $0x0,-0x18(%rbp)
je     1153 <pathcon_nm5_work+0x53>
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
cmpq   $0x0,-0x20(%rbp)
je     1168 <pathcon_nm5_work+0x68>
mov    -0x20(%rbp),%rax
movl   $0x0,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pathcon_nm5_work>:
test   %rdi,%rdi
je     110b <pathcon_nm5_work+0xb>
movl   $0x2,(%rdi)
test   %rsi,%rsi
je     1116 <pathcon_nm5_work+0x16>
movl   $0x2,(%rsi)
test   %rdx,%rdx
je     1121 <pathcon_nm5_work+0x21>
movl   $0x0,(%rdx)
test   %rcx,%rcx
je     112c <pathcon_nm5_work+0x2c>
movl   $0x0,(%rcx)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @pathcon_nm5_work(i32* writeonly %0, i32* writeonly %1, i32* writeonly %2, i32* writeonly %3) {
%5 = icmp eq i32* %0, null
br i1 %5, label %7, label %6
6: ; preds = %4
store i32 2, i32* %0
br label %7
7: ; preds = %6, %4
%8 = icmp eq i32* %1, null
br i1 %8, label %10, label %9
9: ; preds = %7
store i32 2, i32* %1
br label %10
10: ; preds = %9, %7
%11 = icmp eq i32* %2, null
br i1 %11, label %13, label %12
12: ; preds = %10
store i32 0, i32* %2
br label %13
13: ; preds = %12, %10
%14 = icmp eq i32* %3, null
br i1 %14, label %16, label %15
15: ; preds = %13
store i32 0, i32* %3
br label %16
16: ; preds = %15, %13
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void reset() { printf("\033[0m"); }


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"\1B[0m\00"
define void @reset() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_pstream_get_shm() {
  printf("NOT IMPLEMENTED:"
         "pa_pstream_get_shm"
         "\n");
}


x86 assembly (clang, -O0):
<pa_pstream_get_shm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [36 x i8] c"NOT IMPLEMENTED:pa_pstream_get_shm\0A\00"
define i32 @pa_pstream_get_shm() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [35 x i8] c"NOT IMPLEMENTED:pa_pstream_get_shm\00"
define i32 @pa_pstream_get_shm() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
void lock(int i) {}


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

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

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

LLVM IR (-O2):
define void @lock(i32 %0) {
ret void
}
/* Variables and functions */
int strcmp(void const *, void const *);
int strcmpvoid(const void *a, const void *b) { return strcmp(a, b); }


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

x86 assembly (clang, -O2):
<strcmpvoid>:
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @strcmpvoid(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Variables and functions */
char const *remote_n3();
const char *__attribute__((section(".test.c"))) call_remote_n3(void) {
  return remote_n3() + 1;
}


x86 assembly (clang, -O0):
<call_remote_n3>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <remote_n3@plt>
add    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_remote_n3>:
push   %rax
xor    %eax,%eax
call   1030 <remote_n3@plt>
add    $0x1,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @call_remote_n3() section ".test.c" {
%1 = call i8* (...) @remote_n3()
%2 = getelementptr inbounds i8, i8* %1, i64 1
ret i8* %2
}

LLVM IR (-O2):
define i8* @call_remote_n3() section ".test.c" {
%1 = tail call i8* (...) @remote_n3()
%2 = getelementptr inbounds i8, i8* %1, i64 1
ret i8* %2
}
OP(ed, a7) { illegal_2(); }


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

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

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 = call i32 (...) @illegal_2()
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_2()
ret i32 undef
}
/* Variables and functions */
void *malloc(int);
void *MyInitTimeMalloc(int numBytes) { return malloc(numBytes); }


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

x86 assembly (clang, -O2):
<MyInitTimeMalloc>:
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define noalias i8* @MyInitTimeMalloc(i32 %0) {
%2 = tail call i8* @malloc(i32 %0)
ret i8* %2
}
void *action_thread1(void *message) {
  int i;
  i = 0;
  while (i++ < 1) {
    printf("Action du thread1 : %s\n", message);
    sleep(1);
  }
  printf("je connais la sortie\n");
  pthread_exit(0);
}


x86 assembly (clang, -O0):
<action_thread1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x14(%rbp)
cmp    $0x1,%eax
jge    117a <action_thread1+0x4a>
mov    -0x10(%rbp),%rsi
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
mov    $0x0,%al
call   1050 <sleep@plt>
jmp    1143 <action_thread1+0x13>
lea    0xe97(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %edi,%edi
mov    $0x0,%al
call   1040 <pthread_exit@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<action_thread1>:
push   %rax
mov    %rdi,%rsi
lea    0xeb5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%edi
xor    %eax,%eax
call   1060 <sleep@plt>
lea    0xeb3(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
xor    %eax,%eax
pop    %rcx
jmp    1050 <pthread_exit@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"Action du thread1 : %s\0A\00"
@.str.1 = [22 x i8] c"je connais la sortie\0A\00"
define i8* @action_thread1(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 0, i32* %4
br label %5
5: ; preds = %9, %1
%6 = load i32, i32* %4
%7 = add nsw i32 %6, 1
store i32 %7, i32* %4
%8 = icmp slt i32 %6, 1
br i1 %8, label %9, label %13
9: ; preds = %5
%10 = load i8*, i8** %3
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = call i32 (i32, ...) bitcast (i32 (...)* @sleep to i32 (i32, ...)*)(i32 1)
br label %5
13: ; preds = %5
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%15 = call i32 (i32, ...) bitcast (i32 (...)* @pthread_exit to i32 (i32, ...)*)(i32 0)
%16 = load i8*, i8** %2
ret i8* %16
}

LLVM IR (-O2):
@.str = [24 x i8] c"Action du thread1 : %s\0A\00"
@str = [21 x i8] c"je connais la sortie\00"
define i8* @action_thread1(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @sleep to i32 (i32, ...)*)(i32 1)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @pthread_exit to i32 (i32, ...)*)(i32 0)
ret i8* undef
}
int apicid_to_node(int logical_apicid) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @apicid_to_node(i32 %0) {
ret i32 0
}
int _int_cmp(const void *ptr1, const void *ptr2) {
  const int *i1 = ptr1;
  const int *i2 = ptr2;
  return (i1 > i2) - (i2 < i1);
}


x86 assembly (clang, -O0):
<_int_cmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
seta   %al
and    $0x1,%al
movzbl %al,%eax
mov    -0x20(%rbp),%rcx
cmp    -0x18(%rbp),%rcx
setb   %cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @_int_cmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i32*
store i32* %8, i32** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i32*
store i32* %10, i32** %6
%11 = load i32*, i32** %5
%12 = load i32*, i32** %6
%13 = icmp ugt i32* %11, %12
%14 = zext i1 %13 to i32
%15 = load i32*, i32** %6
%16 = load i32*, i32** %5
%17 = icmp ult i32* %15, %16
%18 = zext i1 %17 to i32
%19 = sub nsw i32 %14, %18
ret i32 %19
}

LLVM IR (-O2):
define i32 @_int_cmp(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ putc(long const, int /*<<< orphan*/ *const);
int pm_writelittlelong(FILE *const ofP, long const l) {
  putc((l >> 0) & 0xff, ofP);
  putc((l >> 8) & 0xff, ofP);
  putc((l >> 16) & 0xff, ofP);
  putc((l >> 24) & 0xff, ofP);
  return 0;
}


x86 assembly (clang, -O0):
<pm_writelittlelong>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
sar    $0x0,%rdi
and    $0xff,%rdi
mov    -0x8(%rbp),%rsi
call   1030 <putc@plt>
mov    -0x10(%rbp),%rdi
sar    $0x8,%rdi
and    $0xff,%rdi
mov    -0x8(%rbp),%rsi
call   1030 <putc@plt>
mov    -0x10(%rbp),%rdi
sar    $0x10,%rdi
and    $0xff,%rdi
mov    -0x8(%rbp),%rsi
call   1030 <putc@plt>
mov    -0x10(%rbp),%rdi
sar    $0x18,%rdi
and    $0xff,%rdi
mov    -0x8(%rbp),%rsi
call   1030 <putc@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pm_writelittlelong>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
movzbl %bl,%edi
mov    %r14,%rsi
call   1030 <putc@plt>
movzbl %bh,%edi
mov    %r14,%rsi
call   1030 <putc@plt>
mov    %ebx,%eax
shr    $0x10,%eax
movzbl %al,%edi
mov    %r14,%rsi
call   1030 <putc@plt>
shr    $0x18,%ebx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <putc@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @pm_writelittlelong(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
store i32* %0, i32** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = ashr i64 %5, 0
%7 = and i64 %6, 255
%8 = load i32*, i32** %3
%9 = call i32 @putc(i64 %7, i32* %8)
%10 = load i64, i64* %4
%11 = ashr i64 %10, 8
%12 = and i64 %11, 255
%13 = load i32*, i32** %3
%14 = call i32 @putc(i64 %12, i32* %13)
%15 = load i64, i64* %4
%16 = ashr i64 %15, 16
%17 = and i64 %16, 255
%18 = load i32*, i32** %3
%19 = call i32 @putc(i64 %17, i32* %18)
%20 = load i64, i64* %4
%21 = ashr i64 %20, 24
%22 = and i64 %21, 255
%23 = load i32*, i32** %3
%24 = call i32 @putc(i64 %22, i32* %23)
ret i32 0
}

LLVM IR (-O2):
define i32 @pm_writelittlelong(i32* nocapture %0, i64 %1) {
%3 = and i64 %1, 255
%4 = tail call i32 @putc(i64 %3, i32* %0)
%5 = lshr i64 %1, 8
%6 = and i64 %5, 255
%7 = tail call i32 @putc(i64 %6, i32* %0)
%8 = lshr i64 %1, 16
%9 = and i64 %8, 255
%10 = tail call i32 @putc(i64 %9, i32* %0)
%11 = lshr i64 %1, 24
%12 = and i64 %11, 255
%13 = tail call i32 @putc(i64 %12, i32* %0)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int /*<<< orphan*/,
                         int /*<<< orphan*/);
long long ftell(int /*<<< orphan*/ *);
int /*<<< orphan*/ rewind(int /*<<< orphan*/ *);
long long int sizeFile(FILE *file) {
  long long int size;
  fseek(file, 0, SEEK_END);
  size = ftell(file);
  rewind(file);
  return size;
}


x86 assembly (clang, -O0):
<sizeFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea1(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1050 <fseek@plt>
mov    -0x8(%rbp),%rdi
call   1040 <ftell@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <rewind@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sizeFile>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eaa(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1050 <fseek@plt>
mov    %rbx,%rdi
call   1040 <ftell@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <rewind@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@SEEK_END = global i32 0
define i64 @sizeFile(i32* %0) {
%2 = alloca i32*
%3 = alloca i64
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = load i32, i32* @SEEK_END
%6 = call i32 @fseek(i32* %4, i32 0, i32 %5)
%7 = load i32*, i32** %2
%8 = call i64 @ftell(i32* %7)
store i64 %8, i64* %3
%9 = load i32*, i32** %2
%10 = call i32 @rewind(i32* %9)
%11 = load i64, i64* %3
ret i64 %11
}

LLVM IR (-O2):
@SEEK_END = global i32 0
define i64 @sizeFile(i32* nocapture %0) {
%2 = load i32, i32* @SEEK_END
%3 = tail call i32 @fseek(i32* %0, i32 0, i32 %2)
%4 = tail call i64 @ftell(i32* %0)
%5 = tail call i32 @rewind(i32* %0)
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0x02() {
  Assert_real((ispunct(2) == 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",
              15, ("ispunct should be 0 for 0x02"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0x02>:
push   %rax
mov    $0x2,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0xf,%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 0x02\00"
define void @t_ispunct_0x02() {
%1 = call i64 @ispunct(i32 2)
%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 15, 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 0x02\00"
define void @t_ispunct_0x02() {
%1 = tail call i64 @ispunct(i32 2)
%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 15, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
struct A {
  int i, j;
  void *p;
} f() {
  return (struct A){1, 2, 0};
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x10(%rbp)
movl   $0x2,-0xc(%rbp)
movq   $0x0,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
movabs $0x200000001,%rax
xor    %edx,%edx
ret

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

LLVM IR (-O2):
define { i64, i8* } @f() {
ret { i64, i8* } { i64 8589934593, i8* null }
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ little_endian_read_16(int /*<<< orphan*/ const *, int);
uint16_t bnep_event_can_send_now_get_bnep_cid(const uint8_t *event) {
  return little_endian_read_16(event, 2);
}


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

x86 assembly (clang, -O2):
<bnep_event_can_send_now_get_bnep_cid>:
mov    $0x2,%esi
jmp    1030 <little_endian_read_16@plt>

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

LLVM IR (-O2):
define i32 @bnep_event_can_send_now_get_bnep_cid(i32* %0) {
%2 = tail call i32 @little_endian_read_16(i32* %0, i32 2)
ret i32 %2
}
void beforeExit() {}


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

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

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

LLVM IR (-O2):
define void @beforeExit() {
ret void
}
int plusOne(int x) {
  int tmp = x + 1;
  return tmp;
}


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

x86 assembly (clang, -O2):
<plusOne>:
lea    0x1(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @plusOne(i32 %0) {
%2 = add nsw i32 %0, 1
ret i32 %2
}
do_setup_tabchan(argc, argv) int argc;
char **argv;
{}


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

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

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

LLVM IR (-O2):
define i32 @do_setup_tabchan(i32 %0, i8** nocapture readnone %1) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int);
int /*<<< orphan*/ puts(char *);
void abort_and_solicit_report(void) {
  puts("Please email will@sowerbutts.com if you would like support for "
       "your\nsystem added to this program.\n");
  _exit(1);
}


x86 assembly (clang, -O0):
<abort_and_solicit_report>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<abort_and_solicit_report>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
@.str = [99 x i8] c"Please email will@sowerbutts.com if you would like support for your\0Asystem added to this program.\0A\00"
define void @abort_and_solicit_report() {
%1 = call i32 @puts(i8* getelementptr inbounds ([99 x i8], [99 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @_exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [99 x i8] c"Please email will@sowerbutts.com if you would like support for your\0Asystem added to this program.\0A\00"
define void @abort_and_solicit_report() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([99 x i8], [99 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @_exit(i32 1)
unreachable
}
int Gprocessevents(int waitflag, int mode) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @Gprocessevents(i32 %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  (void)fprintf(stderr, "Usage: test_copy "
                        " source destination\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [38 x i8] c"Usage: test_copy source destination\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [38 x i8] c"Usage: test_copy source destination\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
void VecSelfSubtract3iv(int v[3], const int a[3]) {
  v[0] -= a[0];
  v[1] -= a[1];
  v[2] -= a[2];
}


x86 assembly (clang, -O0):
<VecSelfSubtract3iv>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%edx
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
sub    %edx,%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%edx
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%ecx
sub    %edx,%ecx
mov    %ecx,0x4(%rax)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%edx
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%ecx
sub    %edx,%ecx
mov    %ecx,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<VecSelfSubtract3iv>:
mov    (%rsi),%eax
sub    %eax,(%rdi)
mov    0x4(%rsi),%eax
sub    %eax,0x4(%rdi)
mov    0x8(%rsi),%eax
sub    %eax,0x8(%rdi)
ret

LLVM IR (-O0):
define void @VecSelfSubtract3iv(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %4
%6 = getelementptr inbounds i32, i32* %5, i64 0
%7 = load i32, i32* %6
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i64 0
%10 = load i32, i32* %9
%11 = sub nsw i32 %10, %7
store i32 %11, i32* %9
%12 = load i32*, i32** %4
%13 = getelementptr inbounds i32, i32* %12, i64 1
%14 = load i32, i32* %13
%15 = load i32*, i32** %3
%16 = getelementptr inbounds i32, i32* %15, i64 1
%17 = load i32, i32* %16
%18 = sub nsw i32 %17, %14
store i32 %18, i32* %16
%19 = load i32*, i32** %4
%20 = getelementptr inbounds i32, i32* %19, i64 2
%21 = load i32, i32* %20
%22 = load i32*, i32** %3
%23 = getelementptr inbounds i32, i32* %22, i64 2
%24 = load i32, i32* %23
%25 = sub nsw i32 %24, %21
store i32 %25, i32* %23
ret void
}

LLVM IR (-O2):
define void @VecSelfSubtract3iv(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = load i32, i32* %0
%5 = sub nsw i32 %4, %3
store i32 %5, i32* %0
%6 = getelementptr inbounds i32, i32* %1, i64 1
%7 = load i32, i32* %6
%8 = getelementptr inbounds i32, i32* %0, i64 1
%9 = load i32, i32* %8
%10 = sub nsw i32 %9, %7
store i32 %10, i32* %8
%11 = getelementptr inbounds i32, i32* %1, i64 2
%12 = load i32, i32* %11
%13 = getelementptr inbounds i32, i32* %0, i64 2
%14 = load i32, i32* %13
%15 = sub nsw i32 %14, %12
store i32 %15, i32* %13
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
size_t fread(void *, int, int, int /*<<< orphan*/ *);
size_t read_data(FILE *in, void *buffer) {
  return fread(buffer, 1, 4000000, in);
}


x86 assembly (clang, -O0):
<read_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x1,%esi
mov    $0x3d0900,%edx
call   1030 <fread@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_data>:
mov    %rdi,%rcx
mov    %rsi,%rdi
mov    $0x1,%esi
mov    $0x3d0900,%edx
jmp    1030 <fread@plt>

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

LLVM IR (-O2):
define i64 @read_data(i32* nocapture %0, i8* nocapture %1) {
%3 = tail call i64 @fread(i8* %1, i32 1, i32 4000000, i32* %0)
ret i64 %3
}
/* Type definitions */
struct ibv_context {
  int dummy;
};
typedef enum mlx4dv_set_ctx_attr_type {
  ____Placeholder_mlx4dv_set_ctx_attr_type
} mlx4dv_set_ctx_attr_type;

/* Variables and functions */
int mlx4dv_set_context_attr(struct ibv_context *, int, void *);
int mlx4_glue_dv_set_context_attr(struct ibv_context *context,
                                  enum mlx4dv_set_ctx_attr_type attr_type,
                                  void *attr) {
  return mlx4dv_set_context_attr(context, attr_type, attr);
}


x86 assembly (clang, -O0):
<mlx4_glue_dv_set_context_attr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1030 <mlx4dv_set_context_attr@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mlx4_glue_dv_set_context_attr>:
jmp    1030 <mlx4dv_set_context_attr@plt>

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

LLVM IR (-O2):
%struct.ibv_context = type { i32 }
define i32 @mlx4_glue_dv_set_context_attr(%struct.ibv_context* %0, i32 %1, i8* %2) {
%4 = tail call i32 @mlx4dv_set_context_attr(%struct.ibv_context* %0, i32 %1, i8* %2)
ret i32 %4
}
unsigned xrop3_163_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = S ^ D;
  stk2 = T | stk3;
  stk1 = D ^ stk2;
  stk1 = ~stk1;
  return (stk1 & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_163_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%eax
or     -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_163_1_0>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
mov    %esi,%ecx
shl    $0x8,%ecx
or     %esi,%ecx
mov    %eax,%edx
xor    $0xff,%edx
or     %ecx,%edx
xor    $0xffffff00,%edx
not    %eax
and    %edx,%eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_163_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = or i32 %13, %15
store i32 %16, i32* %6
%17 = load i8, i8* %4
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = load i8, i8* %4
%21 = zext i8 %20 to i32
%22 = or i32 %19, %21
store i32 %22, i32* %7
%23 = load i32, i32* %6
%24 = load i32, i32* %5
%25 = xor i32 %23, %24
store i32 %25, i32* %10
%26 = load i32, i32* %7
%27 = load i32, i32* %10
%28 = or i32 %26, %27
store i32 %28, i32* %9
%29 = load i32, i32* %5
%30 = load i32, i32* %9
%31 = xor i32 %29, %30
store i32 %31, i32* %8
%32 = load i32, i32* %8
%33 = xor i32 %32, -1
store i32 %33, i32* %8
%34 = load i32, i32* %8
%35 = load i32, i32* %6
%36 = xor i32 %35, -1
%37 = and i32 %34, %36
%38 = load i32, i32* %5
%39 = load i32, i32* %6
%40 = and i32 %38, %39
%41 = or i32 %37, %40
ret i32 %41
}

LLVM IR (-O2):
define i32 @xrop3_163_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = xor i32 %4, 255
%8 = or i32 %6, %7
%9 = xor i32 %8, -256
%10 = xor i32 %4, -1
%11 = and i32 %9, %10
%12 = or i32 %11, %3
ret i32 %12
}
check_fsize(sz, size) {
  if (sz != size)
    serror("bad size");
}


x86 assembly (clang, -O0):
<check_fsize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     1138 <check_fsize+0x28>
lea    0xecf(%rip),%rdi
mov    $0x0,%al
call   1030 <serror@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_fsize>:
cmp    %esi,%edi
je     1127 <check_fsize+0x17>
push   %rax
lea    0xee4(%rip),%rdi
xor    %eax,%eax
call   1030 <serror@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"bad size\00"
define i32 @check_fsize(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* %4
%7 = load i32, i32* %5
%8 = icmp ne i32 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 (i8*, ...) bitcast (i32 (...)* @serror to i32 (i8*, ...)*)(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %2
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
@.str = [9 x i8] c"bad size\00"
define i32 @check_fsize(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 (i8*, ...) bitcast (i32 (...)* @serror to i32 (i8*, ...)*)(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %2
ret i32 undef
}
/* Variables and functions */
int is_palindrome_help(char *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
int is_palindrome_rec(char *str) {
  return is_palindrome_help(str, strlen(str));
}


x86 assembly (clang, -O0):
<is_palindrome_rec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1040 <is_palindrome_help@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_palindrome_rec>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <is_palindrome_help@plt>

LLVM IR (-O0):
define i32 @is_palindrome_rec(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = call i32 @is_palindrome_help(i8* %3, i32 %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @is_palindrome_rec(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i32 @is_palindrome_help(i8* %0, i32 %2)
ret i32 %3
}
/* Type definitions */
typedef int uint16_t;
typedef int mode_t;

/* Variables and functions */
int S_IFMT;
int S_IFREG;
int /*<<< orphan*/ xerr(char *);
uint16_t zip_perms(mode_t mode) {
  if ((mode & S_IFMT) != S_IFREG)
    xerr("zipping non-file?");
  return mode & (S_IFMT | 07777);
}


x86 assembly (clang, -O0):
<zip_perms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2eb3(%rip),%rcx
and    (%rcx),%eax
mov    0x2eba(%rip),%rcx
cmp    (%rcx),%eax
je     1142 <zip_perms+0x32>
lea    0xec3(%rip),%rdi
call   1030 <xerr@plt>
mov    -0x4(%rbp),%eax
mov    0x2e8c(%rip),%rcx
mov    (%rcx),%ecx
or     $0xfff,%ecx
and    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zip_perms>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
mov    0x2ebb(%rip),%r14
mov    (%r14),%eax
mov    %eax,%ecx
and    %edi,%ecx
mov    0x2ebd(%rip),%rdx
cmp    (%rdx),%ecx
je     113e <zip_perms+0x2e>
lea    0xeca(%rip),%rdi
call   1030 <xerr@plt>
mov    (%r14),%eax
or     $0xfff,%eax
and    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@S_IFMT = global i32 0
@S_IFREG = global i32 0
@.str = [18 x i8] c"zipping non-file?\00"
define i32 @zip_perms(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @S_IFMT
%5 = and i32 %3, %4
%6 = load i32, i32* @S_IFREG
%7 = icmp ne i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 @xerr(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
%11 = load i32, i32* %2
%12 = load i32, i32* @S_IFMT
%13 = or i32 %12, 4095
%14 = and i32 %11, %13
ret i32 %14
}

LLVM IR (-O2):
@S_IFMT = global i32 0
@S_IFREG = global i32 0
@.str = [18 x i8] c"zipping non-file?\00"
define i32 @zip_perms(i32 %0) {
%2 = load i32, i32* @S_IFMT
%3 = and i32 %2, %0
%4 = load i32, i32* @S_IFREG
%5 = icmp eq i32 %3, %4
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = tail call i32 @xerr(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* @S_IFMT
br label %9
9: ; preds = %6, %1
%10 = phi i32 [ %8, %6 ], [ %2, %1 ]
%11 = or i32 %10, 4095
%12 = and i32 %11, %0
ret i32 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ __u32;

/* Variables and functions */
int /*<<< orphan*/ BPF_PROG_GET_NEXT_ID;
int bpf_obj_get_next_id(int /*<<< orphan*/, int /*<<< orphan*/ *,
                        int /*<<< orphan*/);
int bpf_prog_get_next_id(__u32 start_id, __u32 *next_id) {
  return bpf_obj_get_next_id(start_id, next_id, BPF_PROG_GET_NEXT_ID);
}


x86 assembly (clang, -O0):
<bpf_prog_get_next_id>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    0x2ebb(%rip),%rax
mov    (%rax),%edx
call   1030 <bpf_obj_get_next_id@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bpf_prog_get_next_id>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edx
jmp    1030 <bpf_obj_get_next_id@plt>

LLVM IR (-O0):
@BPF_PROG_GET_NEXT_ID = global i32 0
define i32 @bpf_prog_get_next_id(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 = load i32, i32* @BPF_PROG_GET_NEXT_ID
%8 = call i32 @bpf_obj_get_next_id(i32 %5, i32* %6, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
@BPF_PROG_GET_NEXT_ID = global i32 0
define i32 @bpf_prog_get_next_id(i32 %0, i32* %1) {
%3 = load i32, i32* @BPF_PROG_GET_NEXT_ID
%4 = tail call i32 @bpf_obj_get_next_id(i32 %0, i32* %1, i32 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ kloader_stop();
void brg_stop(void) { kloader_stop(); }


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

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

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

LLVM IR (-O2):
define void @brg_stop() {
%1 = tail call i32 (...) @kloader_stop()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strlcpy(char *, char const *, size_t);
int /*<<< orphan*/ strncpy(char *, char const *, size_t);
char *strlncpy(char *dest, const char *src, size_t l, size_t n) {
  if (n < (l - 1)) {
    strncpy(dest, src, n);
    dest[n] = '\0';
  } else
    strlcpy(dest, src, l);
  return dest;
}


x86 assembly (clang, -O0):
<strlncpy>:
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    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    $0x1,%rcx
cmp    %rcx,%rax
jae    116f <strlncpy+0x4f>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <strncpy@plt>
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
jmp    1180 <strlncpy+0x60>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <strlcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlncpy>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
lea    -0x1(%rdx),%rax
cmp    %rcx,%rax
jbe    1145 <strlncpy+0x25>
mov    %rcx,%rbx
mov    %r14,%rdi
mov    %rcx,%rdx
call   1030 <strncpy@plt>
movb   $0x0,(%r14,%rbx,1)
jmp    114d <strlncpy+0x2d>
mov    %r14,%rdi
call   1040 <strlcpy@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @strlncpy(i8* returned %0, i8* %1, i64 %2, i64 %3) {
%5 = add i64 %2, -1
%6 = icmp ugt i64 %5, %3
br i1 %6, label %7, label %10
7: ; preds = %4
%8 = tail call i32 @strncpy(i8* %0, i8* %1, i64 %3)
%9 = getelementptr inbounds i8, i8* %0, i64 %3
store i8 0, i8* %9
br label %12
10: ; preds = %4
%11 = tail call i32 @strlcpy(i8* %0, i8* %1, i64 %2)
br label %12
12: ; preds = %10, %7
ret i8* %0
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int dobldobl_Newton_step(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(198, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<dobldobl_Newton_step>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0xc6,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dobldobl_Newton_step>:
mov    $0xc6,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @dobldobl_Newton_step() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc4c(i32 198, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @dobldobl_Newton_step() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 198, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t is_valid_hex_char(const char c) {
  if ((c >= '0') && (c <= '9'))
    return 1;
  if ((c >= 'A') && (c <= 'F'))
    return 1;
  if ((c >= 'a') && (c <= 'f'))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<is_valid_hex_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x30,%eax
jl     1130 <is_valid_hex_char+0x30>
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jg     1130 <is_valid_hex_char+0x30>
movl   $0x1,-0x4(%rbp)
jmp    1183 <is_valid_hex_char+0x83>
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     1156 <is_valid_hex_char+0x56>
movsbl -0x5(%rbp),%eax
cmp    $0x46,%eax
jg     1156 <is_valid_hex_char+0x56>
movl   $0x1,-0x4(%rbp)
jmp    1183 <is_valid_hex_char+0x83>
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jl     117c <is_valid_hex_char+0x7c>
movsbl -0x5(%rbp),%eax
cmp    $0x66,%eax
jg     117c <is_valid_hex_char+0x7c>
movl   $0x1,-0x4(%rbp)
jmp    1183 <is_valid_hex_char+0x83>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_valid_hex_char>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%al
setb   %al
and    $0xdf,%dil
add    $0xbf,%dil
cmp    $0x6,%dil
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @is_valid_hex_char(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
%6 = icmp sge i32 %5, 48
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 57
br i1 %10, label %11, label %12
11: ; preds = %7
store i32 1, i32* %2
br label %31
12: ; preds = %7, %1
%13 = load i8, i8* %3
%14 = sext i8 %13 to i32
%15 = icmp sge i32 %14, 65
br i1 %15, label %16, label %21
16: ; preds = %12
%17 = load i8, i8* %3
%18 = sext i8 %17 to i32
%19 = icmp sle i32 %18, 70
br i1 %19, label %20, label %21
20: ; preds = %16
store i32 1, i32* %2
br label %31
21: ; preds = %16, %12
%22 = load i8, i8* %3
%23 = sext i8 %22 to i32
%24 = icmp sge i32 %23, 97
br i1 %24, label %25, label %30
25: ; preds = %21
%26 = load i8, i8* %3
%27 = sext i8 %26 to i32
%28 = icmp sle i32 %27, 102
br i1 %28, label %29, label %30
29: ; preds = %25
store i32 1, i32* %2
br label %31
30: ; preds = %25, %21
store i32 0, i32* %2
br label %31
31: ; preds = %30, %29, %20, %11
%32 = load i32, i32* %2
ret i32 %32
}

LLVM IR (-O2):
define i32 @is_valid_hex_char(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = and i8 %0, -33
%5 = add i8 %4, -65
%6 = icmp ult i8 %5, 6
%7 = or i1 %3, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_memchunk_reset() {
  printf("NOT IMPLEMENTED:"
         "pa_memchunk_reset"
         "\n");
}


x86 assembly (clang, -O0):
<pa_memchunk_reset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [35 x i8] c"NOT IMPLEMENTED:pa_memchunk_reset\0A\00"
define i32 @pa_memchunk_reset() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [34 x i8] c"NOT IMPLEMENTED:pa_memchunk_reset\00"
define i32 @pa_memchunk_reset() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
void encrypt(char *block, int flag) { errno = ENOSYS; }


x86 assembly (clang, -O0):
<encrypt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2ed6(%rip),%rax
mov    (%rax),%ecx
mov    0x2ebd(%rip),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<encrypt>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define void @encrypt(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @ENOSYS
store i32 %5, i32* @errno
ret void
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define void @encrypt(i8* nocapture readnone %0, i32 %1) {
%3 = load i32, i32* @ENOSYS
store i32 %3, i32* @errno
ret void
}