xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ SOCK_DGRAM;
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int open_socket_to_kernel(void) { return socket(AF_INET, SOCK_DGRAM, 0); }


x86 assembly (clang, -O0):
<open_socket_to_kernel>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
mov    0x2ebc(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <socket@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<open_socket_to_kernel>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
jmp    1030 <socket@plt>

LLVM IR (-O0):
@AF_INET = global i32 0
@SOCK_DGRAM = global i32 0
define i32 @open_socket_to_kernel() {
%1 = load i32, i32* @AF_INET
%2 = load i32, i32* @SOCK_DGRAM
%3 = call i32 @socket(i32 %1, i32 %2, i32 0)
ret i32 %3
}

LLVM IR (-O2):
@AF_INET = global i32 0
@SOCK_DGRAM = global i32 0
define i32 @open_socket_to_kernel() {
%1 = load i32, i32* @AF_INET
%2 = load i32, i32* @SOCK_DGRAM
%3 = tail call i32 @socket(i32 %1, i32 %2, i32 0)
ret i32 %3
}
/* Variables and functions */
unsigned char opcode_CC10_set_addr_mode(unsigned char, unsigned char);
unsigned char opcode_CC00_set_addr_mode(unsigned char base,
                                        unsigned char addr_mode) {
  return opcode_CC10_set_addr_mode(base, addr_mode);
}


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

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

LLVM IR (-O0):
define zeroext i8 @opcode_CC00_set_addr_mode(i8 zeroext %0, i8 zeroext %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 zeroext i8 @opcode_CC10_set_addr_mode(i8 zeroext %5, i8 zeroext %6)
ret i8 %7
}

LLVM IR (-O2):
define zeroext i8 @opcode_CC00_set_addr_mode(i8 zeroext %0, i8 zeroext %1) {
%3 = tail call zeroext i8 @opcode_CC10_set_addr_mode(i8 zeroext %0, i8 zeroext %1)
ret i8 %3
}
/* Type definitions */
typedef int __le16;

/* Variables and functions */
int cpu_to_le16(int);
int ieee80211_is_first_frag(__le16 seq_ctrl) {
  return (seq_ctrl & cpu_to_le16(0x000F)) == 0;
}


x86 assembly (clang, -O0):
<ieee80211_is_first_frag>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0xf,%edi
call   1030 <cpu_to_le16@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
and    %ecx,%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ieee80211_is_first_frag>:
push   %rbx
mov    %edi,%ebx
mov    $0xf,%edi
call   1030 <cpu_to_le16@plt>
xor    %ecx,%ecx
test   %ebx,%eax
sete   %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ieee80211_is_first_frag(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @cpu_to_le16(i32 15)
%5 = and i32 %3, %4
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @ieee80211_is_first_frag(i32 %0) {
%2 = tail call i32 @cpu_to_le16(i32 15)
%3 = and i32 %2, %0
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void say_hello(void) { printf(": c hello.n\n"); }


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

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

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

LLVM IR (-O2):
@str = [12 x i8] c": c hello.n\00"
define void @say_hello() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret void
}
void reset(char *c, int len) {
  int i;
  for (i = 0; i < len; i++) {
    c[i] = '\0';
  }
}


x86 assembly (clang, -O0):
<reset>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1138 <reset+0x38>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <reset+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<reset>:
test   %esi,%esi
jle    1122 <reset+0x12>
push   %rax
mov    %esi,%edx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
define void @reset(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %15, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %18
10: ; preds = %6
%11 = load i8*, i8** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %11, i64 %13
store i8 0, i8* %14
br label %15
15: ; preds = %10
%16 = load i32, i32* %5
%17 = add nsw i32 %16, 1
store i32 %17, i32* %5
br label %6
18: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @reset(i8* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %2
ret void
}
void d2i_PrivateKey(void) {}


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

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

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

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

/* Variables and functions */
char *read_seekable_stream(int /*<<< orphan*/ *, size_t *);
char **text_to_lines(char *const, size_t, int *);
char **read_file_lines(FILE *f, int *nlines) {
  size_t text_len;
  char *const text = read_seekable_stream(f, &text_len);
  return text_to_lines(text, text_len, nlines);
}


x86 assembly (clang, -O0):
<read_file_lines>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <read_seekable_stream@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <text_to_lines@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_file_lines>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
lea    0x8(%rsp),%rsi
call   1040 <read_seekable_stream@plt>
mov    0x8(%rsp),%rsi
mov    %rax,%rdi
mov    %rbx,%rdx
call   1030 <text_to_lines@plt>
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i8** @read_file_lines(i32* %0, i32* %1) {
%3 = alloca i64
%4 = bitcast i64* %3 to i8*
%5 = call i8* @read_seekable_stream(i32* %0, i64* %3)
%6 = load i64, i64* %3
%7 = call i8** @text_to_lines(i8* %5, i64 %6, i32* %1)
ret i8** %7
}
int n_iclamp(int val, int minVal, int maxVal) {
  if (val < minVal)
    return minVal;
  else if (val > maxVal)
    return maxVal;
  else
    return val;
}


x86 assembly (clang, -O0):
<n_iclamp>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1124 <n_iclamp+0x24>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1141 <n_iclamp+0x41>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    113b <n_iclamp+0x3b>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1141 <n_iclamp+0x41>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<n_iclamp>:
mov    %edx,%eax
cmp    %edx,%edi
cmovle %edi,%eax
cmp    %esi,%edi
cmovl  %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @n_iclamp(i32 %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %0, %1
%5 = icmp sgt i32 %0, %2
%6 = select i1 %5, i32 %2, i32 %0
%7 = select i1 %4, i32 %1, i32 %6
ret i32 %7
}
int reserve_ds_buffers(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @reserve_ds_buffers() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int /*<<< orphan*/);
int /*<<< orphan*/ sync();
int main(void) {
  sync();
  _exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <sync@plt>
xor    %edi,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <sync@plt>
xor    %edi,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @sync()
%3 = call i32 @_exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @sync()
%2 = tail call i32 @_exit(i32 0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int /*<<< orphan*/ localtime(int /*<<< orphan*/ *);
size_t strftime(char *, size_t, char const *, int /*<<< orphan*/);
size_t readstat_strftime(char *s, size_t maxsize, const char *format,
                         time_t timestamp) {
  return strftime(s, maxsize, format, localtime(&timestamp));
}


x86 assembly (clang, -O0):
<readstat_strftime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
lea    -0x1c(%rbp),%rdi
call   1030 <localtime@plt>
mov    -0x38(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    %eax,%ecx
call   1040 <strftime@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readstat_strftime>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
mov    %ecx,0xc(%rsp)
lea    0xc(%rsp),%rdi
call   1030 <localtime@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
mov    %eax,%ecx
call   1040 <strftime@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i64 @readstat_strftime(i8* %0, i64 %1, i8* %2, i32 %3) {
%5 = alloca i32
store i32 %3, i32* %5
%6 = call i32 @localtime(i32* %5)
%7 = call i64 @strftime(i8* %0, i64 %1, i8* %2, i32 %6)
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_array(char a[8][15], int n) {
  int i;
  for (i = 0; i < n; i++)
    printf("%s\n", a[i]);
  printf("\n");
}


x86 assembly (clang, -O0):
<print_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115d <print_array+0x4d>
mov    -0x8(%rbp),%rsi
movslq -0x10(%rbp),%rax
imul   $0xf,%rax,%rax
add    %rax,%rsi
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <print_array+0x16>
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_array>:
push   %r14
push   %rbx
push   %rax
test   %esi,%esi
jle    1142 <print_array+0x22>
mov    %rdi,%rbx
mov    %esi,%r14d
xchg   %ax,%ax
mov    %rbx,%rdi
call   1040 <puts@plt>
add    $0xf,%rbx
add    $0xffffffffffffffff,%r14
jne    1130 <print_array+0x10>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @print_array([15 x i8]* %0, i32 %1) {
%3 = alloca [15 x i8]*
%4 = alloca i32
%5 = alloca i32
store [15 x i8]* %0, [15 x i8]** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load [15 x i8]*, [15 x i8]** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [15 x i8], [15 x i8]* %11, i64 %13
%15 = getelementptr inbounds [15 x i8], [15 x i8]* %14, i64 0, i64 0
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
define void @print_array([15 x i8]* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %10, %6 ]
%8 = getelementptr inbounds [15 x i8], [15 x i8]* %0, i64 %7, i64 0
%9 = tail call i32 @puts(i8* dereferenceable(1) %8)
%10 = add nuw nsw i64 %7, 1
%11 = icmp eq i64 %10, %5
br i1 %11, label %12, label %6
12: ; preds = %6, %2
%13 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ put32(unsigned int);
int /*<<< orphan*/ put8(unsigned char);
void cmp_preg64pimm32_imm8(int reg64, unsigned int imm32, unsigned char imm8) {
  put8(0x80);
  put8(0xB8 + reg64);
  put32(imm32);
  put8(imm8);
}


x86 assembly (clang, -O0):
<cmp_preg64pimm32_imm8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    $0x80,%edi
call   1030 <put8@plt>
mov    -0x4(%rbp),%eax
add    $0xb8,%eax
movzbl %al,%edi
call   1030 <put8@plt>
mov    -0x8(%rbp),%edi
call   1040 <put32@plt>
movzbl -0x9(%rbp),%edi
call   1030 <put8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_preg64pimm32_imm8>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
mov    $0x80,%edi
call   1030 <put8@plt>
add    $0xb8,%bl
movzbl %bl,%edi
call   1030 <put8@plt>
mov    %ebp,%edi
call   1040 <put32@plt>
mov    %r14d,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <put8@plt>

LLVM IR (-O0):
define void @cmp_preg64pimm32_imm8(i32 %0, i32 %1, i8 zeroext %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8 %2, i8* %6
%7 = call i32 @put8(i8 zeroext -128)
%8 = load i32, i32* %4
%9 = add nsw i32 184, %8
%10 = trunc i32 %9 to i8
%11 = call i32 @put8(i8 zeroext %10)
%12 = load i32, i32* %5
%13 = call i32 @put32(i32 %12)
%14 = load i8, i8* %6
%15 = call i32 @put8(i8 zeroext %14)
ret void
}

LLVM IR (-O2):
define void @cmp_preg64pimm32_imm8(i32 %0, i32 %1, i8 zeroext %2) {
%4 = tail call i32 @put8(i8 zeroext -128)
%5 = trunc i32 %0 to i8
%6 = add i8 %5, -72
%7 = tail call i32 @put8(i8 zeroext %6)
%8 = tail call i32 @put32(i32 %1)
%9 = tail call i32 @put8(i8 zeroext %2)
ret void
}
/* Variables and functions */
int accept(int, int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
int accepte_client(int socket_serveur) {
  int socket_client;
  socket_client = accept(socket_serveur, NULL, NULL);
  if (socket_client == -1) {
    perror("accept");
    exit(4);
  }
  return socket_client;
}


x86 assembly (clang, -O0):
<accepte_client>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    %eax,%eax
mov    %eax,%edx
mov    %rdx,%rsi
call   1040 <accept@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jne    116d <accepte_client+0x3d>
lea    0xea2(%rip),%rdi
call   1030 <perror@plt>
mov    $0x4,%edi
call   1050 <exit@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<accepte_client>:
push   %rax
xor    %esi,%esi
xor    %edx,%edx
call   1040 <accept@plt>
cmp    $0xffffffff,%eax
je     1141 <accepte_client+0x11>
pop    %rcx
ret
lea    0xeb8(%rip),%rdi
call   1030 <perror@plt>
mov    $0x4,%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"accept\00"
define i32 @accepte_client(i32 %0) {
%2 = tail call i32 @accept(i32 %0, i32* null, i32* null)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 4)
unreachable
7: ; preds = %1
ret i32 %2
}
void image_window_push(int index) {}


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

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

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

LLVM IR (-O2):
define void @image_window_push(i32 %0) {
ret void
}
int test_imm_48uint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0x48 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_48uint64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
shr    $0x20,%rdx
and    $0x48,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_48uint64_highword_mem>:
testb  $0x48,0x4(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_48uint64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = lshr i64 %4, 32
%6 = and i64 %5, 72
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_48uint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 309237645312
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ fexpect(char *, int, int, int);
void t2() {
  struct {
    int a;
    int b;
  } x;
  x.a = 61;
  x.b = 2;
  fexpect("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/struct.c",
          16, 63, x.a + x.b);
  ;
}


x86 assembly (clang, -O0):
<t2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x3d,-0x8(%rbp)
movl   $0x2,-0x4(%rbp)
mov    -0x8(%rbp),%ecx
add    -0x4(%rbp),%ecx
lea    0xecd(%rip),%rdi
mov    $0x10,%esi
mov    $0x3f,%edx
call   1030 <fexpect@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t2>:
lea    0xee9(%rip),%rdi
mov    $0x10,%esi
mov    $0x3f,%edx
mov    $0x3f,%ecx
jmp    1030 <fexpect@plt>

LLVM IR (-O0):
%struct.anon = type { i32, i32 }
@.str = [129 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/struct.c\00"
define void @t2() {
%1 = alloca %struct.anon
%2 = getelementptr inbounds %struct.anon, %struct.anon* %1, i32 0, i32 0
store i32 61, i32* %2
%3 = getelementptr inbounds %struct.anon, %struct.anon* %1, i32 0, i32 1
store i32 2, i32* %3
%4 = getelementptr inbounds %struct.anon, %struct.anon* %1, i32 0, i32 0
%5 = load i32, i32* %4
%6 = getelementptr inbounds %struct.anon, %struct.anon* %1, i32 0, i32 1
%7 = load i32, i32* %6
%8 = add nsw i32 %5, %7
%9 = call i32 @fexpect(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 16, i32 63, i32 %8)
ret void
}

LLVM IR (-O2):
@.str = [129 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/8l/8cc/refs/heads/master/test/struct.c\00"
define void @t2() {
%1 = tail call i32 @fexpect(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str, i64 0, i64 0), i32 16, i32 63, i32 63)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int spi_xfer(int, int *, int /*<<< orphan*/ *, unsigned long);
int dac7568_write_spi(uint32_t cmd, uint32_t cmd_len) {
  unsigned long flags = 0x01;
  int ret;
  uint32_t tmp = 0;
  tmp = (cmd << 16) | ((cmd >> 16) & 0xffff);
  flags |= 0x02;
  ret = spi_xfer(cmd_len * 8, &tmp, NULL, flags);
  if (ret) {
    return -1;
  }
  return ret;
}


x86 assembly (clang, -O0):
<dac7568_write_spi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movq   $0x1,-0x18(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x10,%eax
mov    -0x8(%rbp),%ecx
sar    $0x10,%ecx
and    $0xffff,%ecx
or     %ecx,%eax
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
or     $0x2,%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
shl    $0x3,%edi
mov    -0x18(%rbp),%rcx
lea    -0x20(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <spi_xfer@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     1180 <dac7568_write_spi+0x70>
movl   $0xffffffff,-0x4(%rbp)
jmp    1186 <dac7568_write_spi+0x76>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dac7568_write_spi>:
push   %rax
rol    $0x10,%edi
mov    %edi,0x4(%rsp)
lea    0x0(,%rsi,8),%edi
lea    0x4(%rsp),%rsi
mov    $0x3,%ecx
xor    %edx,%edx
call   1030 <spi_xfer@plt>
neg    %eax
sbb    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @dac7568_write_spi(i32 %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = tail call i32 @llvm.fshl.i32(i32 %0, i32 %0, i32 16)
store i32 %5, i32* %3
%6 = shl nsw i32 %1, 3
%7 = call i32 @spi_xfer(i32 %6, i32* %3, i32* null, i64 3)
%8 = icmp ne i32 %7, 0
%9 = sext i1 %8 to i32
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
void XMLDB_Generate_End_List(FILE *dest_doc) {
  fprintf(dest_doc, "%s", "</itemizedlist>");
}


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

x86 assembly (clang, -O2):
<XMLDB_Generate_End_List>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0xf,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [16 x i8] c"</itemizedlist>\00"
define void @XMLDB_Generate_End_List(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [16 x i8] c"</itemizedlist>\00"
define void @XMLDB_Generate_End_List(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i64 15, i64 1, i32* %0)
ret void
}
/* Variables and functions */
long long PAPI_get_virt_cyc();
void papif_get_virt_cyc_(long long *virt_cyc) {
  *virt_cyc = PAPI_get_virt_cyc();
}


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

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

LLVM IR (-O0):
define void @papif_get_virt_cyc_(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = call i64 (...) @PAPI_get_virt_cyc()
%4 = load i64*, i64** %2
store i64 %3, i64* %4
ret void
}

LLVM IR (-O2):
define void @papif_get_virt_cyc_(i64* nocapture writeonly %0) {
%2 = tail call i64 (...) @PAPI_get_virt_cyc()
store i64 %2, i64* %0
ret void
}
/* Variables and functions */
int ft_atoi(char *);
int /*<<< orphan*/ ft_putnbr(int);
void mult(char *num1, char *num2) {
  int i_num1;
  int i_num2;
  i_num1 = ft_atoi(num1);
  i_num2 = ft_atoi(num2);
  ft_putnbr(i_num1 * i_num2);
}


x86 assembly (clang, -O0):
<mult>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <ft_atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <ft_atoi@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
imul   -0x18(%rbp),%edi
call   1030 <ft_putnbr@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mult>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
call   1040 <ft_atoi@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <ft_atoi@plt>
imul   %eax,%ebp
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <ft_putnbr@plt>

LLVM IR (-O0):
define void @mult(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 = call i32 @ft_atoi(i8* %7)
store i32 %8, i32* %5
%9 = load i8*, i8** %4
%10 = call i32 @ft_atoi(i8* %9)
store i32 %10, i32* %6
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = mul nsw i32 %11, %12
%14 = call i32 @ft_putnbr(i32 %13)
ret void
}

LLVM IR (-O2):
define void @mult(i8* %0, i8* %1) {
%3 = tail call i32 @ft_atoi(i8* %0)
%4 = tail call i32 @ft_atoi(i8* %1)
%5 = mul nsw i32 %4, %3
%6 = tail call i32 @ft_putnbr(i32 %5)
ret void
}
void h(int t, int s) {
  int z = t;
  int arg = s;
}


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

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

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

LLVM IR (-O2):
define void @h(i32 %0, i32 %1) {
ret void
}
/* Type definitions */
typedef int ptrdiff_t;
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ inv_adst8_1d_internal_c(int /*<<< orphan*/ *const, int const,
                                           int const, int const,
                                           int /*<<< orphan*/ *, int const);
void dav1d_inv_flipadst8_1d_c(int32_t *const c, const ptrdiff_t stride,
                              const int min, const int max) {
  inv_adst8_1d_internal_c(c, stride, min, max, &c[(8 - 1) * stride], -stride);
}


x86 assembly (clang, -O0):
<dav1d_inv_flipadst8_1d_c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x8(%rbp),%r8
imul   $0x7,-0xc(%rbp),%eax
cltq
shl    $0x2,%rax
add    %rax,%r8
xor    %r9d,%r9d
sub    -0xc(%rbp),%r9d
call   1030 <inv_adst8_1d_internal_c@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dav1d_inv_flipadst8_1d_c>:
lea    0x0(,%rsi,8),%eax
sub    %esi,%eax
cltq
lea    (%rdi,%rax,4),%r8
mov    %esi,%r9d
neg    %r9d
jmp    1030 <inv_adst8_1d_internal_c@plt>

LLVM IR (-O0):
define void @dav1d_inv_flipadst8_1d_c(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 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = load i32*, i32** %5
%14 = load i32, i32* %6
%15 = mul nsw i32 7, %14
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i32, i32* %13, i64 %16
%18 = load i32, i32* %6
%19 = sub nsw i32 0, %18
%20 = call i32 @inv_adst8_1d_internal_c(i32* %9, i32 %10, i32 %11, i32 %12, i32* %17, i32 %19)
ret void
}

LLVM IR (-O2):
define void @dav1d_inv_flipadst8_1d_c(i32* %0, i32 %1, i32 %2, i32 %3) {
%5 = mul nsw i32 %1, 7
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i32, i32* %0, i64 %6
%8 = sub nsw i32 0, %1
%9 = tail call i32 @inv_adst8_1d_internal_c(i32* %0, i32 %1, i32 %2, i32 %3, i32* %7, i32 %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int valor = 50;
  int *ponteiro = &valor;
  int **ponteiroDoPonteiro = &ponteiro;
  printf("\n%d", **ponteiroDoPonteiro);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x32,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%esi
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"\0A%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 50)
ret i32 0
}
int get_salt_size(void) { return 34; }


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

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

LLVM IR (-O0):
define i32 @get_salt_size() {
ret i32 34
}

LLVM IR (-O2):
define i32 @get_salt_size() {
ret i32 34
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int celcon_number_of_stable_cells(int *length) {
  int fail;
  int *b;
  double *c;
  fail = _ada_use_c2phc4c(881, length, b, c, 0);
  return fail;
}


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

x86 assembly (clang, -O2):
<celcon_number_of_stable_cells>:
mov    %rdi,%rsi
mov    $0x371,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

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

LLVM IR (-O2):
define i32 @celcon_number_of_stable_cells(i32* %0) {
%2 = tail call i32 @_ada_use_c2phc4c(i32 881, i32* %0, i32* undef, double* undef, i32 0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void yywarning(const char *format, ...) { fputs("", stderr); }


x86 assembly (clang, -O0):
<yywarning>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%esi
lea    0xed4(%rip),%rdi
call   1030 <fputs@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yywarning>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
lea    0xee0(%rip),%rdi
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@stderr = global i32 0
define void @yywarning(i8* %0, ...) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = call i32 @fputs(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@stderr = global i32 0
define void @yywarning(i8* nocapture readnone %0, ...) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fputs(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}
get(fd, pos, buf, n) int fd, n;
long pos;
char *buf;
{
  if (lseek(fd, pos, 0) == -1)
    return -1;
  else
    return read(fd, buf, n);
}


x86 assembly (clang, -O0):
<get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
xor    %edx,%edx
mov    $0x0,%al
call   1030 <lseek@plt>
cmp    $0xffffffff,%eax
jne    115b <get+0x3b>
movl   $0xffffffff,-0x4(%rbp)
jmp    116f <get+0x4f>
mov    -0x8(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    $0x0,%al
call   1040 <read@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get>:
push   %rbp
push   %r14
push   %rbx
mov    %ecx,%r14d
mov    %rdx,%rbx
mov    %edi,%ebp
xor    %edx,%edx
xor    %eax,%eax
call   1030 <lseek@plt>
cmp    $0xffffffff,%eax
je     114d <get+0x2d>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14d,%edx
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <read@plt>
mov    $0xffffffff,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @get(i32 %0, i64 %1, i8* %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i64
%8 = alloca i8*
%9 = alloca i32
store i32 %0, i32* %6
store i64 %1, i64* %7
store i8* %2, i8** %8
store i32 %3, i32* %9
%10 = load i32, i32* %6
%11 = load i64, i64* %7
%12 = call i32 (i32, i64, i32, ...) bitcast (i32 (...)* @lseek to i32 (i32, i64, i32, ...)*)(i32 %10, i64 %11, i32 0)
%13 = icmp eq i32 %12, -1
br i1 %13, label %14, label %15
14: ; preds = %4
store i32 -1, i32* %5
br label %20
15: ; preds = %4
%16 = load i32, i32* %6
%17 = load i8*, i8** %8
%18 = load i32, i32* %9
%19 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @read to i32 (i32, i8*, i32, ...)*)(i32 %16, i8* %17, i32 %18)
store i32 %19, i32* %5
br label %20
20: ; preds = %15, %14
%21 = load i32, i32* %5
ret i32 %21
}

LLVM IR (-O2):
define i32 @get(i32 %0, i64 %1, i8* %2, i32 %3) {
%5 = tail call i32 (i32, i64, i32, ...) bitcast (i32 (...)* @lseek to i32 (i32, i64, i32, ...)*)(i32 %0, i64 %1, i32 0)
%6 = icmp eq i32 %5, -1
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = tail call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @read to i32 (i32, i8*, i32, ...)*)(i32 %0, i8* %2, i32 %3)
br label %9
9: ; preds = %4, %7
%10 = phi i32 [ %8, %7 ], [ -1, %4 ]
ret i32 %10
}
int min(int a, int b) { return (a <= b) ? a : b; }


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1121 <min+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <min+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
mov    %edi,%eax
cmp    %esi,%edi
cmovg  %esi,%eax
ret

LLVM IR (-O0):
define i32 @min(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 = icmp sle i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @min(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
int main(int argc, char *argv[]) {
  int a = 4 + 5;
  int b = a - 3;
  int c = a / b;
  int d = a * a;
  int e = d << 1;
  int f = e | 1;
  return f;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x9,-0x14(%rbp)
mov    -0x14(%rbp),%eax
sub    $0x3,%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
cltd
idivl  -0x18(%rbp)
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
imul   -0x14(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
or     $0x1,%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 9, i32* %6
%12 = load i32, i32* %6
%13 = sub nsw i32 %12, 3
store i32 %13, i32* %7
%14 = load i32, i32* %6
%15 = load i32, i32* %7
%16 = sdiv i32 %14, %15
store i32 %16, i32* %8
%17 = load i32, i32* %6
%18 = load i32, i32* %6
%19 = mul nsw i32 %17, %18
store i32 %19, i32* %9
%20 = load i32, i32* %9
%21 = shl i32 %20, 1
store i32 %21, i32* %10
%22 = load i32, i32* %10
%23 = or i32 %22, 1
store i32 %23, i32* %11
%24 = load i32, i32* %11
ret i32 %24
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 163
}
/* Variables and functions */
int /*<<< orphan*/ callee_end();
int /*<<< orphan*/ callee_restore();
int /*<<< orphan*/ caller_restore();
void function_epilog() {
  callee_restore();
  caller_restore();
  callee_end();
}


x86 assembly (clang, -O0):
<function_epilog>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <callee_restore@plt>
mov    $0x0,%al
call   1050 <caller_restore@plt>
mov    $0x0,%al
call   1040 <callee_end@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<function_epilog>:
push   %rax
xor    %eax,%eax
call   1030 <callee_restore@plt>
xor    %eax,%eax
call   1050 <caller_restore@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <callee_end@plt>

LLVM IR (-O0):
define void @function_epilog() {
%1 = call i32 (...) @callee_restore()
%2 = call i32 (...) @caller_restore()
%3 = call i32 (...) @callee_end()
ret void
}

LLVM IR (-O2):
define void @function_epilog() {
%1 = tail call i32 (...) @callee_restore()
%2 = tail call i32 (...) @caller_restore()
%3 = tail call i32 (...) @callee_end()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ perror(char *);
void io_error(void) { perror("Error opening stat file\n"); }


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

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

LLVM IR (-O0):
@.str = [25 x i8] c"Error opening stat file\0A\00"
define void @io_error() {
%1 = call i32 @perror(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"Error opening stat file\0A\00"
define void @io_error() {
%1 = tail call i32 @perror(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct utmp {
  int ut_time;
  int /*<<< orphan*/ member_0;
};

/* Variables and functions */
int main(void) {
  struct utmp ut = {0};
  return ut.ut_time;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1030 <memset@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ T();
int /*<<< orphan*/ printf(char *, int);
int randChar(char *);
int randInt(int);
int E() {
  if (randInt(10) < 5) {
    T();
    printf("%c", randChar("+-*/"));
    E();
  } else {
    T();
  }
}


x86 assembly (clang, -O0):
<E>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xa,%edi
call   1070 <randInt@plt>
cmp    $0x5,%eax
jge    1196 <E+0x46>
mov    $0x0,%al
call   1030 <T@plt>
lea    0xe8a(%rip),%rdi
call   1050 <randChar@plt>
mov    %eax,%esi
lea    0xe79(%rip),%rdi
call   1040 <printf@plt>
call   1060 <E@plt>
jmp    119d <E+0x4d>
mov    $0x0,%al
call   1030 <T@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<E>:
push   %r14
push   %rbx
push   %rax
mov    $0xa,%edi
call   1060 <randInt@plt>
cmp    $0x4,%eax
jg     1198 <E+0x58>
lea    0xea9(%rip),%r14
lea    0xe9f(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <T@plt>
mov    %r14,%rdi
call   1050 <randChar@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0xa,%edi
call   1060 <randInt@plt>
cmp    $0x5,%eax
jl     1170 <E+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <T@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
@.str.1 = [5 x i8] c"+-*/\00"
define i32 @E() {
%1 = alloca i32
%2 = call i32 @randInt(i32 10)
%3 = icmp slt i32 %2, 5
br i1 %3, label %4, label %9
4: ; preds = %0
%5 = call i32 (...) @T()
%6 = call i32 @randChar(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = call i32 @E()
br label %11
9: ; preds = %0
%10 = call i32 (...) @T()
br label %11
11: ; preds = %9, %4
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
@.str.1 = [5 x i8] c"+-*/\00"
define i32 @E() {
%1 = tail call i32 @randInt(i32 10)
%2 = icmp slt i32 %1, 5
br i1 %2, label %3, label %9
3: ; preds = %0, %3
%4 = tail call i32 (...) @T()
%5 = tail call i32 @randChar(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = tail call i32 @randInt(i32 10)
%8 = icmp slt i32 %7, 5
br i1 %8, label %3, label %9
9: ; preds = %3, %0
%10 = tail call i32 (...) @T()
ret i32 undef
}
double f(double x) { return x / x; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
divsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
divsd  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @f(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fdiv double %3, %4
ret double %5
}

LLVM IR (-O2):
define double @f(double %0) {
%2 = fdiv double %0, %0
ret double %2
}
void swap(char *str, int i, int j) {
  char t = str[i];
  str[i] = str[j];
  str[j] = t;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x11(%rbp),%dl
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
movslq %esi,%rax
mov    (%rdi,%rax,1),%sil
movslq %edx,%rdx
mov    (%rdi,%rdx,1),%cl
mov    %cl,(%rdi,%rax,1)
mov    %sil,(%rdi,%rdx,1)
ret

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

LLVM IR (-O2):
define void @swap(i8* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
store i8 %9, i8* %5
store i8 %6, i8* %8
ret void
}
int security_file_mprotect(struct vm_area_struct *vma, unsigned long prot) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.vm_area_struct = type opaque
define i32 @security_file_mprotect(%struct.vm_area_struct* %0, i64 %1) {
%3 = alloca %struct.vm_area_struct*
%4 = alloca i64
store %struct.vm_area_struct* %0, %struct.vm_area_struct** %3
store i64 %1, i64* %4
ret i32 0
}

LLVM IR (-O2):
%struct.vm_area_struct = type opaque
define i32 @security_file_mprotect(%struct.vm_area_struct* nocapture readnone %0, i64 %1) {
ret i32 0
}