xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char const *, int);
char *mp_encode_binl(char *, int);
char *mp_encode_bin(char *data, const char *str, uint32_t len) {
  data = mp_encode_binl(data, len);
  memcpy(data, str, len);
  return data + len;
}


x86 assembly (clang, -O0):
<mp_encode_bin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <mp_encode_binl@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <memcpy@plt>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp_encode_bin>:
push   %r15
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %rsi,%r14
mov    %edx,%esi
call   1030 <mp_encode_binl@plt>
mov    %rax,%r15
mov    %rax,%rdi
mov    %r14,%rsi
mov    %ebx,%edx
call   1040 <memcpy@plt>
movslq %ebx,%rax
add    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @mp_encode_bin(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %6
%9 = call i8* @mp_encode_binl(i8* %7, i32 %8)
store i8* %9, i8** %4
%10 = load i8*, i8** %4
%11 = load i8*, i8** %5
%12 = load i32, i32* %6
%13 = call i32 @memcpy(i8* %10, i8* %11, i32 %12)
%14 = load i8*, i8** %4
%15 = load i32, i32* %6
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
ret i8* %17
}

LLVM IR (-O2):
define i8* @mp_encode_bin(i8* %0, i8* %1, i32 %2) {
%4 = tail call i8* @mp_encode_binl(i8* %0, i32 %2)
%5 = tail call i32 @memcpy(i8* %4, i8* %1, i32 %2)
%6 = sext i32 %2 to i64
%7 = getelementptr inbounds i8, i8* %4, i64 %6
ret i8* %7
}
/* Type definitions */
struct dstack {
  int dummy;
};

/* Variables and functions */
void *dstack_pop(struct dstack *);
void dstack_pop2(struct dstack *st) {
  void *p = dstack_pop(st);
  p = 0;
}


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

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

LLVM IR (-O0):
%struct.dstack = type { i32 }
define void @dstack_pop2(%struct.dstack* %0) {
%2 = alloca %struct.dstack*
%3 = alloca i8*
store %struct.dstack* %0, %struct.dstack** %2
%4 = load %struct.dstack*, %struct.dstack** %2
%5 = call i8* @dstack_pop(%struct.dstack* %4)
store i8* %5, i8** %3
store i8* null, i8** %3
ret void
}

LLVM IR (-O2):
%struct.dstack = type { i32 }
define void @dstack_pop2(%struct.dstack* %0) {
%2 = tail call i8* @dstack_pop(%struct.dstack* %0)
ret void
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int __fxstat(int, int, struct stat *);
int fstat(int fd, struct stat *buf) { return __fxstat(1, fd, buf); }


x86 assembly (clang, -O0):
<fstat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    $0x1,%edi
call   1030 <__fxstat@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fstat>:
mov    %rsi,%rdx
mov    %edi,%esi
mov    $0x1,%edi
jmp    1030 <__fxstat@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @fstat(i32 %0, %struct.stat* %1) {
%3 = alloca i32
%4 = alloca %struct.stat*
store i32 %0, i32* %3
store %struct.stat* %1, %struct.stat** %4
%5 = load i32, i32* %3
%6 = load %struct.stat*, %struct.stat** %4
%7 = call i32 @__fxstat(i32 1, i32 %5, %struct.stat* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @fstat(i32 %0, %struct.stat* %1) {
%3 = tail call i32 @__fxstat(i32 1, i32 %0, %struct.stat* %1)
ret i32 %3
}
int ft_isalnum(int c) {
  if ((c <= 90 && c >= 65) || (c <= 122 && c >= 97) || (c <= 57 && c >= 48))
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<ft_isalnum>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x5a,-0x8(%rbp)
jg     111b <ft_isalnum+0x1b>
cmpl   $0x41,-0x8(%rbp)
jge    1143 <ft_isalnum+0x43>
cmpl   $0x7a,-0x8(%rbp)
jg     112f <ft_isalnum+0x2f>
cmpl   $0x61,-0x8(%rbp)
jge    1143 <ft_isalnum+0x43>
cmpl   $0x39,-0x8(%rbp)
jg     114f <ft_isalnum+0x4f>
cmpl   $0x30,-0x8(%rbp)
jl     114f <ft_isalnum+0x4f>
movl   $0x1,-0x4(%rbp)
jmp    1156 <ft_isalnum+0x56>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isalnum>:
mov    %edi,%eax
and    $0xffffffdf,%eax
add    $0xffffffbf,%eax
cmp    $0x1a,%eax
setb   %al
add    $0xffffffd0,%edi
cmp    $0xa,%edi
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @ft_isalnum(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sle i32 %4, 90
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sge i32 %7, 65
br i1 %8, label %21, label %9
9: ; preds = %6, %1
%10 = load i32, i32* %3
%11 = icmp sle i32 %10, 122
br i1 %11, label %12, label %15
12: ; preds = %9
%13 = load i32, i32* %3
%14 = icmp sge i32 %13, 97
br i1 %14, label %21, label %15
15: ; preds = %12, %9
%16 = load i32, i32* %3
%17 = icmp sle i32 %16, 57
br i1 %17, label %18, label %22
18: ; preds = %15
%19 = load i32, i32* %3
%20 = icmp sge i32 %19, 48
br i1 %20, label %21, label %22
21: ; preds = %18, %12, %6
store i32 1, i32* %2
br label %23
22: ; preds = %18, %15
store i32 0, i32* %2
br label %23
23: ; preds = %22, %21
%24 = load i32, i32* %2
ret i32 %24
}

LLVM IR (-O2):
define i32 @ft_isalnum(i32 %0) {
%2 = and i32 %0, -33
%3 = add i32 %2, -65
%4 = icmp ult i32 %3, 26
%5 = add i32 %0, -48
%6 = icmp ult i32 %5, 10
%7 = or i1 %6, %4
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ smbhash(unsigned char *, unsigned char *, unsigned char *,
                           int);
void cred_hash2(unsigned char *out, unsigned char *in, unsigned char *key) {
  unsigned char buf[8];
  static unsigned char key2[8];
  smbhash(buf, in, key, 1);
  key2[0] = key[7];
  smbhash(out, buf, key2, 1);
}


x86 assembly (clang, -O0):
<cred_hash2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    $0x1,%ecx
call   1030 <smbhash@plt>
mov    -0x18(%rbp),%rax
mov    0x7(%rax),%al
mov    %al,0x2ee2(%rip)
mov    -0x8(%rbp),%rdi
lea    -0x20(%rbp),%rsi
lea    0x2ed3(%rip),%rdx
mov    $0x1,%ecx
call   1030 <smbhash@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cred_hash2>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%rbx
mov    %rdi,%r14
lea    0x8(%rsp),%r15
mov    %r15,%rdi
mov    $0x1,%ecx
call   1030 <smbhash@plt>
mov    0x7(%rbx),%al
mov    %al,0x2eef(%rip)
lea    0x2ee8(%rip),%rdx
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x1,%ecx
call   1030 <smbhash@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@cred_hash2.key2 = internal global [8 x i8] zeroinitializer
define void @cred_hash2(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca [8 x i8]
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = getelementptr inbounds [8 x i8], [8 x i8]* %7, i64 0, i64 0
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = call i32 @smbhash(i8* %8, i8* %9, i8* %10, i32 1)
%12 = load i8*, i8** %6
%13 = getelementptr inbounds i8, i8* %12, i64 7
%14 = load i8, i8* %13
store i8 %14, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @cred_hash2.key2, i64 0, i64 0)
%15 = load i8*, i8** %4
%16 = getelementptr inbounds [8 x i8], [8 x i8]* %7, i64 0, i64 0
%17 = call i32 @smbhash(i8* %15, i8* %16, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @cred_hash2.key2, i64 0, i64 0), i32 1)
ret void
}

LLVM IR (-O2):
@cred_hash2.key2 = internal global [8 x i8] zeroinitializer
define void @cred_hash2(i8* %0, i8* %1, i8* %2) {
%4 = alloca [8 x i8]
%5 = getelementptr inbounds [8 x i8], [8 x i8]* %4, i64 0, i64 0
%6 = call i32 @smbhash(i8* %5, i8* %1, i8* %2, i32 1)
%7 = getelementptr inbounds i8, i8* %2, i64 7
%8 = load i8, i8* %7
store i8 %8, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @cred_hash2.key2, i64 0, i64 0)
%9 = call i32 @smbhash(i8* %0, i8* %5, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @cred_hash2.key2, i64 0, i64 0), i32 1)
ret void
}
int two_function(void) { return 9; }


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

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

LLVM IR (-O0):
define i32 @two_function() {
ret i32 9
}

LLVM IR (-O2):
define i32 @two_function() {
ret i32 9
}
/* Type definitions */
typedef int /*<<< orphan*/ xcb_window_t;
typedef int /*<<< orphan*/ xcb_get_property_cookie_t;
typedef int /*<<< orphan*/ xcb_connection_t;

/* Variables and functions */
int /*<<< orphan*/ XCB_ATOM_WM_HINTS;
int /*<<< orphan*/ xcb_get_property(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                    int /*<<< orphan*/, int /*<<< orphan*/,
                                    int /*<<< orphan*/, long, int);
xcb_get_property_cookie_t xcb_icccm_get_wm_hints(xcb_connection_t *c,
                                                 xcb_window_t window) {
  return xcb_get_property(c, 0, window, XCB_ATOM_WM_HINTS, XCB_ATOM_WM_HINTS,
                          0L, 9);
}


x86 assembly (clang, -O0):
<xcb_icccm_get_wm_hints>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    0x2eab(%rip),%rax
mov    (%rax),%ecx
mov    0x2ea2(%rip),%rax
mov    (%rax),%r8d
xor    %esi,%esi
xor    %eax,%eax
mov    %eax,%r9d
movl   $0x9,(%rsp)
call   1030 <xcb_get_property@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xcb_icccm_get_wm_hints>:
push   %rax
mov    %esi,%edx
mov    0x2ebe(%rip),%rax
mov    (%rax),%ecx
movl   $0x9,(%rsp)
xor    %esi,%esi
mov    %ecx,%r8d
xor    %r9d,%r9d
call   1030 <xcb_get_property@plt>
pop    %rcx
ret

LLVM IR (-O0):
@XCB_ATOM_WM_HINTS = global i32 0
define i32 @xcb_icccm_get_wm_hints(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* @XCB_ATOM_WM_HINTS
%8 = load i32, i32* @XCB_ATOM_WM_HINTS
%9 = call i32 @xcb_get_property(i32* %5, i32 0, i32 %6, i32 %7, i32 %8, i64 0, i32 9)
ret i32 %9
}

LLVM IR (-O2):
@XCB_ATOM_WM_HINTS = global i32 0
define i32 @xcb_icccm_get_wm_hints(i32* %0, i32 %1) {
%3 = load i32, i32* @XCB_ATOM_WM_HINTS
%4 = tail call i32 @xcb_get_property(i32* %0, i32 0, i32 %1, i32 %3, i32 %3, i64 0, i32 9)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
uint32_t pack_16t_16t(int32_t a, int32_t b) {}


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

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

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

LLVM IR (-O2):
define i32 @pack_16t_16t(i32 %0, i32 %1) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ tomato();
int main(void) {
  tomato();
  printf("this is main's output\n");
}


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

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

LLVM IR (-O0):
@.str = [23 x i8] c"this is main's output\0A\00"
define i32 @main() {
%1 = call i32 (...) @tomato()
%2 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [22 x i8] c"this is main's output\00"
define i32 @main() {
%1 = tail call i32 (...) @tomato()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ test_intcomma();
void test_humanize() { test_intcomma(); }


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

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

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

LLVM IR (-O2):
define void @test_humanize() {
%1 = tail call i32 (...) @test_intcomma()
ret void
}
__attribute__((visibility("default"))) long
trio_to_long(const char *string, char **endp, int base) {
  assert(string);
  assert((base >= 2) && (base <= 36));
  return strtol(string, endp, base);
}


x86 assembly (clang, -O0):
<trio_to_long>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <assert@plt>
xor    %eax,%eax
cmpl   $0x2,-0x14(%rbp)
mov    %al,-0x15(%rbp)
jl     1157 <trio_to_long+0x37>
cmpl   $0x24,-0x14(%rbp)
setle  %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <assert@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <strtol@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trio_to_long>:
push   %r15
push   %r14
push   %rbx
mov    %edx,%r15d
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <assert@plt>
lea    -0x2(%r15),%eax
xor    %edi,%edi
cmp    $0x23,%eax
setb   %dil
xor    %eax,%eax
call   1030 <assert@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15d,%edx
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <strtol@plt>

LLVM IR (-O0):
define i64 @trio_to_long(i8* %0, i8** %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i32
store i8* %0, i8** %4
store i8** %1, i8*** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = call i32 (i8*, ...) bitcast (i32 (...)* @assert to i32 (i8*, ...)*)(i8* %7)
%9 = load i32, i32* %6
%10 = icmp sge i32 %9, 2
br i1 %10, label %11, label %14
11: ; preds = %3
%12 = load i32, i32* %6
%13 = icmp sle i32 %12, 36
br label %14
14: ; preds = %11, %3
%15 = phi i1 [ false, %3 ], [ %13, %11 ]
%16 = zext i1 %15 to i32
%17 = call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %16)
%18 = load i8*, i8** %4
%19 = load i8**, i8*** %5
%20 = load i32, i32* %6
%21 = call i64 @strtol(i8* %18, i8** %19, i32 %20)
ret i64 %21
}

LLVM IR (-O2):
define i64 @trio_to_long(i8* %0, i8** nocapture %1, i32 %2) {
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @assert to i32 (i8*, ...)*)(i8* %0)
%5 = add i32 %2, -2
%6 = icmp ult i32 %5, 35
%7 = zext i1 %6 to i32
%8 = tail call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %7)
%9 = tail call i64 @strtol(i8* %0, i8** %1, i32 %2)
ret i64 %9
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
uint32_t min32(uint32_t a, uint32_t b) { return a < b ? a : b; }


x86 assembly (clang, -O0):
<min32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1127 <min32+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <min32+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min32>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovl  %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @min32(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Type definitions */
struct timeval {
  int tv_sec;
  int tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double what_time_is_it() {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  double current_time = tv.tv_sec + tv.tv_usec * 1e-6;
  return current_time;
}


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

x86 assembly (clang, -O2):
<what_time_is_it>:
push   %rax
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdl (%rsp),%xmm1
cvtsi2sdl 0x4(%rsp),%xmm0
mulsd  0xed2(%rip),%xmm0
addsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
define double @what_time_is_it() {
%1 = alloca %struct.timeval
%2 = alloca double
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%5 = load i32, i32* %4
%6 = sitofp i32 %5 to double
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%8 = load i32, i32* %7
%9 = sitofp i32 %8 to double
%10 = call double @llvm.fmuladd.f64(double %9, double 0x3EB0C6F7A0B5ED8D, double %6)
store double %10, double* %2
%11 = load double, double* %2
ret double %11
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
define double @what_time_is_it() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load i32, i32* %4
%6 = sitofp i32 %5 to double
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%8 = load i32, i32* %7
%9 = sitofp i32 %8 to double
%10 = tail call double @llvm.fmuladd.f64(double %9, double 0x3EB0C6F7A0B5ED8D, double %6)
ret double %10
}
/* Type definitions */
struct yaffs_obj {
  int dummy;
};

/* Variables and functions */
int yaffs_open_sharing_reldir(struct yaffs_obj *, char const *, int, int, int);
int yaffs_open_reldir(struct yaffs_obj *reldir, const char *path, int oflag,
                      int mode) {
  return yaffs_open_sharing_reldir(reldir, path, oflag, mode, 1 | 2);
}


x86 assembly (clang, -O0):
<yaffs_open_reldir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    $0x3,%r8d
call   1030 <yaffs_open_sharing_reldir@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yaffs_open_reldir>:
mov    $0x3,%r8d
jmp    1030 <yaffs_open_sharing_reldir@plt>

LLVM IR (-O0):
%struct.yaffs_obj = type { i32 }
define i32 @yaffs_open_reldir(%struct.yaffs_obj* %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca %struct.yaffs_obj*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store %struct.yaffs_obj* %0, %struct.yaffs_obj** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load %struct.yaffs_obj*, %struct.yaffs_obj** %5
%10 = load i8*, i8** %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 @yaffs_open_sharing_reldir(%struct.yaffs_obj* %9, i8* %10, i32 %11, i32 %12, i32 3)
ret i32 %13
}

LLVM IR (-O2):
%struct.yaffs_obj = type { i32 }
define i32 @yaffs_open_reldir(%struct.yaffs_obj* %0, i8* %1, i32 %2, i32 %3) {
%5 = tail call i32 @yaffs_open_sharing_reldir(%struct.yaffs_obj* %0, i8* %1, i32 %2, i32 %3, i32 3)
ret i32 %5
}
/* Variables and functions */
int CyBtldr_ParseDefaultCmdResult(unsigned char *, unsigned long,
                                  unsigned char *);
int CyBtldr_ParseEraseRowCmdResult(unsigned char *cmdBuf, unsigned long cmdSize,
                                   unsigned char *status) {
  return CyBtldr_ParseDefaultCmdResult(cmdBuf, cmdSize, status);
}


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

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

LLVM IR (-O0):
define i32 @CyBtldr_ParseEraseRowCmdResult(i8* %0, i64 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8*
store i8* %0, i8** %4
store i64 %1, i64* %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i64, i64* %5
%9 = load i8*, i8** %6
%10 = call i32 @CyBtldr_ParseDefaultCmdResult(i8* %7, i64 %8, i8* %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @CyBtldr_ParseEraseRowCmdResult(i8* %0, i64 %1, i8* %2) {
%4 = tail call i32 @CyBtldr_ParseDefaultCmdResult(i8* %0, i64 %1, i8* %2)
ret i32 %4
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int celcon_permute_system(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(105, a, b, c);
  return fail;
}


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

x86 assembly (clang, -O2):
<celcon_permute_system>:
mov    $0x69,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @celcon_permute_system() {
%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_c2phc(i32 105, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @celcon_permute_system() {
%1 = tail call i32 @_ada_use_c2phc(i32 105, i32* undef, i32* undef, double* undef)
ret i32 %1
}
char SwapBytesBE_(char value) { return value; }


x86 assembly (clang, -O0):
<SwapBytesBE_>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define signext i8 @SwapBytesBE_(i8 returned signext %0) {
ret i8 %0
}
float angle_normalize(float angle) {
  while (angle < 0) {
    angle += (2 * 3.14159265358979323846f);
  }
  while (angle >= (2 * 3.14159265358979323846f)) {
    angle -= (2 * 3.14159265358979323846f);
  }
  return angle;
}


x86 assembly (clang, -O0):
<angle_normalize>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0x4(%rbp),%xmm0
jbe    112d <angle_normalize+0x2d>
movss  0xee2(%rip),%xmm0
addss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1109 <angle_normalize+0x9>
jmp    1132 <angle_normalize+0x32>
movss  -0x4(%rbp),%xmm0
movss  0xec1(%rip),%xmm1
ucomiss %xmm1,%xmm0
jb     1163 <angle_normalize+0x63>
movss  -0x4(%rbp),%xmm0
movss  0xeab(%rip),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1132 <angle_normalize+0x32>
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<angle_normalize>:
xorps  %xmm1,%xmm1
ucomiss %xmm0,%xmm1
jbe    1119 <angle_normalize+0x19>
movss  0xef0(%rip),%xmm2
addss  %xmm2,%xmm0
ucomiss %xmm0,%xmm1
ja     1110 <angle_normalize+0x10>
ucomiss 0xee0(%rip),%xmm0
jb     1149 <angle_normalize+0x49>
movss  0xeda(%rip),%xmm1
movss  0xece(%rip),%xmm2
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
addss  %xmm1,%xmm0
ucomiss %xmm2,%xmm0
jae    1140 <angle_normalize+0x40>
ret

LLVM IR (-O0):
define float @angle_normalize(float %0) {
%2 = alloca float
store float %0, float* %2
br label %3
3: ; preds = %6, %1
%4 = load float, float* %2
%5 = fcmp olt float %4, 0.000000e+00
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = load float, float* %2
%8 = fadd float %7, 0x401921FB60000000
store float %8, float* %2
br label %3
9: ; preds = %3
br label %10
10: ; preds = %13, %9
%11 = load float, float* %2
%12 = fcmp oge float %11, 0x401921FB60000000
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = load float, float* %2
%15 = fsub float %14, 0x401921FB60000000
store float %15, float* %2
br label %10
16: ; preds = %10
%17 = load float, float* %2
ret float %17
}

LLVM IR (-O2):
define float @angle_normalize(float %0) {
%2 = fcmp olt float %0, 0.000000e+00
br i1 %2, label %6, label %3
3: ; preds = %6, %1
%4 = phi float [ %0, %1 ], [ %8, %6 ]
%5 = fcmp ult float %4, 0x401921FB60000000
br i1 %5, label %14, label %10
6: ; preds = %1, %6
%7 = phi float [ %8, %6 ], [ %0, %1 ]
%8 = fadd float %7, 0x401921FB60000000
%9 = fcmp olt float %8, 0.000000e+00
br i1 %9, label %6, label %3
10: ; preds = %3, %10
%11 = phi float [ %12, %10 ], [ %4, %3 ]
%12 = fadd float %11, 0xC01921FB60000000
%13 = fcmp ult float %12, 0x401921FB60000000
br i1 %13, label %14, label %10
14: ; preds = %10, %3
%15 = phi float [ %4, %3 ], [ %12, %10 ]
ret float %15
}
void Python_Release_Vim(void) {}


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

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

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

LLVM IR (-O2):
define void @Python_Release_Vim() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ free(void *);
void close_file(void *pvFile) {
  close(*(int *)pvFile);
  free(pvFile);
}


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

x86 assembly (clang, -O2):
<close_file>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%edi
call   1040 <close@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @close_file(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
%6 = call i32 @close(i32 %5)
%7 = load i8*, i8** %2
%8 = call i32 @free(i8* %7)
ret void
}

LLVM IR (-O2):
define void @close_file(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @close(i32 %3)
%5 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ F_OK;
int /*<<< orphan*/ access(char const *, int /*<<< orphan*/);
int sysfs_file_exists(const char *path) { return !access(path, F_OK); }


x86 assembly (clang, -O0):
<sysfs_file_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
call   1030 <access@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sysfs_file_exists>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
call   1030 <access@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@F_OK = global i32 0
define i32 @sysfs_file_exists(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @F_OK
%5 = call i32 @access(i8* %3, i32 %4)
%6 = icmp ne i32 %5, 0
%7 = xor i1 %6, true
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
@F_OK = global i32 0
define i32 @sysfs_file_exists(i8* nocapture %0) {
%2 = load i32, i32* @F_OK
%3 = tail call i32 @access(i8* %0, i32 %2)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
int strlen(char *);
int fgetline(char *line, int max, FILE *fp) {
  if (fgets(line, max, fp) == NULL)
    return -1;
  return strlen(line);
}


x86 assembly (clang, -O0):
<fgetline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x20(%rbp),%rdx
call   1040 <fgets@plt>
cmp    $0x0,%rax
jne    1159 <fgetline+0x39>
movl   $0xffffffff,-0x4(%rbp)
jmp    1165 <fgetline+0x45>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fgetline>:
push   %rbx
mov    %rdi,%rbx
call   1040 <fgets@plt>
test   %rax,%rax
je     1137 <fgetline+0x17>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <strlen@plt>
mov    $0xffffffff,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @fgetline(i8* %0, i32 %1, i32* nocapture %2) {
%4 = tail call i32* @fgets(i8* %0, i32 %1, i32* %2)
%5 = icmp eq i32* %4, null
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @strlen(i8* %0)
br label %8
8: ; preds = %3, %6
%9 = phi i32 [ %7, %6 ], [ -1, %3 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ strcat(char *, char *);
char *strchr(char *, char);
scalar_t__ strcmp(char *, char *);
char *rewrite_url(char *url) {
  char *s;
  s = strchr(url, '?');
  if (s != NULL) {
    *s = '\0';
  }
  if (strcmp(url, "/") == 0) {
    strcat(url, "index.html");
  }
  return url;
}


x86 assembly (clang, -O0):
<rewrite_url>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x3f,%esi
call   1030 <strchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1160 <rewrite_url+0x30>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
lea    0xe95(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    118a <rewrite_url+0x5a>
mov    -0x8(%rbp),%rdi
lea    0xe7d(%rip),%rsi
call   1050 <strcat@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rewrite_url>:
push   %rbx
mov    %rdi,%rbx
mov    $0x3f,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1146 <rewrite_url+0x16>
movb   $0x0,(%rax)
lea    0xeb3(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
jne    1169 <rewrite_url+0x39>
lea    0xea1(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcat@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"/\00"
@.str.1 = [11 x i8] c"index.html\00"
define i8* @rewrite_url(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strchr(i8* %4, i8 signext 63)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = load i8*, i8** %3
store i8 0, i8* %9
br label %10
10: ; preds = %8, %1
%11 = load i8*, i8** %2
%12 = call i64 @strcmp(i8* %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %10
%15 = load i8*, i8** %2
%16 = call i32 @strcat(i8* %15, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
br label %17
17: ; preds = %14, %10
%18 = load i8*, i8** %2
ret i8* %18
}

LLVM IR (-O2):
@.str = [2 x i8] c"/\00"
@.str.1 = [11 x i8] c"index.html\00"
define i8* @rewrite_url(i8* returned %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 63)
%3 = icmp eq i8* %2, null
br i1 %3, label %5, label %4
4: ; preds = %1
store i8 0, i8* %2
br label %5
5: ; preds = %4, %1
%6 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = tail call i32 @strcat(i8* %0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8, %5
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ pause();
void *test_thread(void *p) {
  pause();
  return NULL;
}


x86 assembly (clang, -O0):
<test_thread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <pause@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_thread>:
push   %rax
xor    %eax,%eax
call   1030 <pause@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @test_thread(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @pause()
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @test_thread(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @pause()
ret i8* null
}
/* Type definitions */
struct timespec {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_REALTIME;
int clock_gettime(int /*<<< orphan*/, struct timespec *);
int gettime_realtime(struct timespec *tp) {
  return clock_gettime(CLOCK_REALTIME, tp);
}


x86 assembly (clang, -O0):
<gettime_realtime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
call   1030 <clock_gettime@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gettime_realtime>:
mov    %rdi,%rsi
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
jmp    1030 <clock_gettime@plt>

LLVM IR (-O0):
%struct.timespec = type { i32 }
@CLOCK_REALTIME = global i32 0
define i32 @gettime_realtime(%struct.timespec* %0) {
%2 = alloca %struct.timespec*
store %struct.timespec* %0, %struct.timespec** %2
%3 = load i32, i32* @CLOCK_REALTIME
%4 = load %struct.timespec*, %struct.timespec** %2
%5 = call i32 @clock_gettime(i32 %3, %struct.timespec* %4)
ret i32 %5
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
@CLOCK_REALTIME = global i32 0
define i32 @gettime_realtime(%struct.timespec* %0) {
%2 = load i32, i32* @CLOCK_REALTIME
%3 = tail call i32 @clock_gettime(i32 %2, %struct.timespec* %0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ FerMem_Free(char **, char *, int);
void free_c_pointer_(char ***fer_ptr) {
  FerMem_Free(*fer_ptr,
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/NOAA-PMEL/Ferret/refs/heads/master/"
              "fer/ccr/free_c_pointer.c",
              48);
  *fer_ptr = NULL;
}


x86 assembly (clang, -O0):
<free_c_pointer_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
lea    0xed6(%rip),%rsi
mov    $0x30,%edx
call   1030 <FerMem_Free@plt>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_c_pointer_>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
lea    0xee2(%rip),%rsi
mov    $0x30,%edx
call   1030 <FerMem_Free@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
@.str = [150 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/NOAA-PMEL/Ferret/refs/heads/master/fer/ccr/free_c_pointer.c\00"
define void @free_c_pointer_(i8*** %0) {
%2 = alloca i8***
store i8*** %0, i8**** %2
%3 = load i8***, i8**** %2
%4 = load i8**, i8*** %3
%5 = call i32 @FerMem_Free(i8** %4, i8* getelementptr inbounds ([150 x i8], [150 x i8]* @.str, i64 0, i64 0), i32 48)
%6 = load i8***, i8**** %2
store i8** null, i8*** %6
ret void
}

LLVM IR (-O2):
@.str = [150 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/NOAA-PMEL/Ferret/refs/heads/master/fer/ccr/free_c_pointer.c\00"
define void @free_c_pointer_(i8*** nocapture %0) {
%2 = load i8**, i8*** %0
%3 = tail call i32 @FerMem_Free(i8** %2, i8* getelementptr inbounds ([150 x i8], [150 x i8]* @.str, i64 0, i64 0), i32 48)
store i8** null, i8*** %0
ret void
}
void acpuclock_secondary_init(void) {}


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

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

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

LLVM IR (-O2):
define void @acpuclock_secondary_init() {
ret void
}
void putc(c) char c;
{ write(2, &c, sizeof c); }


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

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

LLVM IR (-O0):
define void @putc(i32 %0) {
%2 = alloca i8
%3 = trunc i32 %0 to i8
store i8 %3, i8* %2
%4 = call i32 (i32, i8*, i64, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i64, ...)*)(i32 2, i8* %2, i64 1)
ret void
}

LLVM IR (-O2):
define void @putc(i32 %0) {
%2 = alloca i8
%3 = trunc i32 %0 to i8
store i8 %3, i8* %2
%4 = call i32 (i32, i8*, i64, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i64, ...)*)(i32 2, i8* %2, i64 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void test37_Mod_targetInit__I() { printf("Mod init\n"); }


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

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

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

LLVM IR (-O2):
@str = [9 x i8] c"Mod init\00"
define void @test37_Mod_targetInit__I() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Sys_failure(char *);
int shutdown(int, int);
void Shutdown(int s, int how) {
  int retval;
  retval = shutdown(s, how);
  if (retval == -1)
    Sys_failure("shutdown");
}


x86 assembly (clang, -O0):
<Shutdown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <shutdown@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0xffffffff,-0xc(%rbp)
jne    1152 <Shutdown+0x32>
lea    0xeb3(%rip),%rdi
call   1040 <Sys_failure@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Shutdown>:
push   %rax
call   1030 <shutdown@plt>
cmp    $0xffffffff,%eax
je     112d <Shutdown+0xd>
pop    %rax
ret
lea    0xecc(%rip),%rdi
pop    %rax
jmp    1040 <Sys_failure@plt>

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

LLVM IR (-O2):
@.str = [9 x i8] c"shutdown\00"
define void @Shutdown(i32 %0, i32 %1) {
%3 = tail call i32 @shutdown(i32 %0, i32 %1)
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @Sys_failure(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret void
}
int env_close() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @env_close() {
ret i32 0
}
int get_pgm_id() {
  int rval = 0;
  return rval;
}


x86 assembly (clang, -O0):
<get_pgm_id>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @get_pgm_id() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ InitSD();
int /*<<< orphan*/ Nand_Init();
int /*<<< orphan*/ SD_Init();
void sdmmc_sdcard_init() {
  ;
  InitSD();
  Nand_Init();
  ;
  SD_Init();
  ;
}


x86 assembly (clang, -O0):
<sdmmc_sdcard_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <InitSD@plt>
mov    $0x0,%al
call   1040 <Nand_Init@plt>
mov    $0x0,%al
call   1050 <SD_Init@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sdmmc_sdcard_init>:
push   %rax
xor    %eax,%eax
call   1030 <InitSD@plt>
xor    %eax,%eax
call   1040 <Nand_Init@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <SD_Init@plt>

LLVM IR (-O0):
define void @sdmmc_sdcard_init() {
%1 = call i32 (...) @InitSD()
%2 = call i32 (...) @Nand_Init()
%3 = call i32 (...) @SD_Init()
ret void
}

LLVM IR (-O2):
define void @sdmmc_sdcard_init() {
%1 = tail call i32 (...) @InitSD()
%2 = tail call i32 (...) @Nand_Init()
%3 = tail call i32 (...) @SD_Init()
ret void
}
void lastz_zero_stats(void) {}


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

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

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

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

/* Variables and functions */
int EOF;
int fgetc(int /*<<< orphan*/ *);
int srec_skip_line(FILE *fp) {
  int c;
  while (1) {
    c = fgetc(fp);
    if (c == EOF) {
      return (1);
    }
    if ((c == 0x0a) || (c == 0x0d)) {
      return (0);
    }
  }
  return (0);
}


x86 assembly (clang, -O0):
<srec_skip_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    0x2eb6(%rip),%rcx
cmp    (%rcx),%eax
jne    1146 <srec_skip_line+0x36>
movl   $0x1,-0x4(%rbp)
jmp    116b <srec_skip_line+0x5b>
cmpl   $0xa,-0x14(%rbp)
je     115a <srec_skip_line+0x4a>
cmpl   $0xd,-0x14(%rbp)
jne    1166 <srec_skip_line+0x56>
movl   $0x0,-0x4(%rbp)
jmp    116b <srec_skip_line+0x5b>
jmp    111c <srec_skip_line+0xc>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<srec_skip_line>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eca(%rip),%r14
xchg   %ax,%ax
mov    %rbx,%rdi
call   1030 <fgetc@plt>
cmp    (%r14),%eax
je     113d <srec_skip_line+0x2d>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0xd,%ecx
je     1142 <srec_skip_line+0x32>
cmp    $0xa,%ecx
jne    1120 <srec_skip_line+0x10>
jmp    1142 <srec_skip_line+0x32>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@EOF = global i32 0
define i32 @srec_skip_line(i32* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = tail call i32 @fgetc(i32* %0)
%4 = load i32, i32* @EOF
%5 = icmp eq i32 %3, %4
br i1 %5, label %7, label %6
6: ; preds = %2
switch i32 %3, label %2 [
i32 13, label %7
i32 10, label %7
]
7: ; preds = %6, %6, %2
%8 = phi i32 [ 1, %2 ], [ 0, %6 ], [ 0, %6 ]
ret i32 %8
}
/* Variables and functions */
int screen_control(int);
int main(void) {
  int game_state = 0;
  while (game_state >= 0) {
    game_state = screen_control(game_state);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1140 <main+0x30>
mov    -0x8(%rbp),%edi
call   1030 <screen_control@plt>
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %eax,%edi
call   1030 <screen_control@plt>
test   %eax,%eax
jns    1120 <main+0x10>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %6, %0
%4 = load i32, i32* %2
%5 = icmp sge i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = load i32, i32* %2
%8 = call i32 @screen_control(i32 %7)
store i32 %8, i32* %2
br label %3
9: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %3, %1 ]
%3 = tail call i32 @screen_control(i32 %2)
%4 = icmp sgt i32 %3, -1
br i1 %4, label %1, label %5
5: ; preds = %1
ret i32 0
}
/* Variables and functions */
int padovan(int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("o 12 termo da serie de padovan eh: %d", padovan(12));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xc,%edi
call   1030 <padovan@plt>
mov    %eax,%esi
lea    0xebe(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [38 x i8] c"o 12 termo da serie de padovan eh: %d\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @padovan(i32 12)
%3 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [38 x i8] c"o 12 termo da serie de padovan eh: %d\00"
define i32 @main() {
%1 = tail call i32 @padovan(i32 12)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
short FSE_abs(short a) { return a < 0 ? -a : a; }


x86 assembly (clang, -O0):
<FSE_abs>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
cmp    $0x0,%eax
jge    1128 <FSE_abs+0x28>
movswl -0x2(%rbp),%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0x8(%rbp)
jmp    112f <FSE_abs+0x2f>
movswl -0x2(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cwtl
pop    %rbp
ret

x86 assembly (clang, -O2):
<FSE_abs>:
mov    %edi,%eax
neg    %ax
cmovs  %di,%ax
ret

LLVM IR (-O0):
define signext i16 @FSE_abs(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i16, i16* %2
%8 = sext i16 %7 to i32
%9 = sub nsw i32 0, %8
br label %13
10: ; preds = %1
%11 = load i16, i16* %2
%12 = sext i16 %11 to i32
br label %13
13: ; preds = %10, %6
%14 = phi i32 [ %9, %6 ], [ %12, %10 ]
%15 = trunc i32 %14 to i16
ret i16 %15
}

LLVM IR (-O2):
define signext i16 @FSE_abs(i16 signext %0) {
%2 = tail call i16 @llvm.abs.i16(i16 %0, i1 false)
ret i16 %2
}