xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  void replaceString(char source[], char s1[], char s2[]);
  char text[50] = "the wrong son";
  replaceString(text, "sonb", "man");
  printf("%s\n", text);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xeb6(%rip),%rsi
mov    $0x32,%edx
call   1050 <memcpy@plt>
lea    -0x40(%rbp),%rdi
lea    0xed3(%rip),%rsi
lea    0xed1(%rip),%rdx
call   1030 <replaceString@plt>
lea    -0x40(%rbp),%rsi
lea    0xec5(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x40,%rsp
movaps 0xef4(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xed8(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xebc(%rip),%xmm0
movaps %xmm0,(%rsp)
movw   $0x0,0x30(%rsp)
lea    0xedc(%rip),%rsi
lea    0xeda(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <replaceString@plt>
lea    0xecc(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.text = [50 x i8] c"the wrong son\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [5 x i8] c"sonb\00"
@.str.1 = [4 x i8] c"man\00"
@.str.2 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [50 x i8]
store i32 0, i32* %1
%3 = bitcast [50 x i8]* %2 to i8*
%4 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%5 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %5)
ret i32 0
}

LLVM IR (-O2):
@__const.main.text = [50 x i8] c"the wrong son\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@.str = [5 x i8] c"sonb\00"
@.str.1 = [4 x i8] c"man\00"
@.str.2 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [50 x i8]
%2 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 0
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ mkdir(char const *, int);
void create_dir(const char *path) { mkdir(path, 0777); }


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

x86 assembly (clang, -O2):
<create_dir>:
mov    $0x1ff,%esi
jmp    1030 <mkdir@plt>

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

LLVM IR (-O2):
define void @create_dir(i8* nocapture %0) {
%2 = tail call i32 @mkdir(i8* %0, i32 511)
ret void
}
/* Variables and functions */
long rand();
int /*<<< orphan*/ usleep(long long);
void randsleep() {
  long long int usec;
  usec = rand() % 3500000L;
  usleep(usec);
}


x86 assembly (clang, -O0):
<randsleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0x3567e0,%ecx
cqto
idiv   %rcx
mov    %rdx,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <usleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randsleep>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
mov    %rax,%rdi
movabs $0x996445bd5ac50b19,%rcx
45 64 99
imul   %rcx
add    %rdi,%rdx
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x15,%rdx
add    %rax,%rdx
imul   $0x3567e0,%rdx,%rax
sub    %rax,%rdi
pop    %rax
jmp    1040 <usleep@plt>

LLVM IR (-O0):
define void @randsleep() {
%1 = alloca i64
%2 = call i64 (...) @rand()
%3 = srem i64 %2, 3500000
store i64 %3, i64* %1
%4 = load i64, i64* %1
%5 = call i32 @usleep(i64 %4)
ret void
}

LLVM IR (-O2):
define void @randsleep() {
%1 = tail call i64 (...) @rand()
%2 = srem i64 %1, 3500000
%3 = tail call i32 @usleep(i64 %2)
ret void
}
int ft_count_if(char **tab, int (*f)(char *)) {
  int i;
  int count;
  i = 0;
  count = 0;
  while (tab[i]) {
    if (f(tab[i]) == 1)
      count++;
    i++;
  }
  return (count);
}


x86 assembly (clang, -O0):
<ft_count_if>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1163 <ft_count_if+0x63>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
movslq -0x14(%rbp),%rdx
mov    (%rcx,%rdx,8),%rdi
call   *%rax
cmp    $0x1,%eax
jne    1155 <ft_count_if+0x55>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    111e <ft_count_if+0x1e>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_count_if>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     113b <ft_count_if+0x3b>
mov    %rsi,%r14
add    $0x8,%rbx
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
call   *%r14
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
add    %ecx,%ebp
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1120 <ft_count_if+0x20>
jmp    113d <ft_count_if+0x3d>
xor    %ebp,%ebp
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @ft_count_if(i8** nocapture %0, i32 (i8*)* nocapture %1) {
%3 = load i8*, i8** %0
%4 = icmp eq i8* %3, null
br i1 %4, label %17, label %5
5: ; preds = %2, %5
%6 = phi i64 [ %13, %5 ], [ 0, %2 ]
%7 = phi i8* [ %15, %5 ], [ %3, %2 ]
%8 = phi i32 [ %12, %5 ], [ 0, %2 ]
%9 = tail call i32 %1(i8* %7)
%10 = icmp eq i32 %9, 1
%11 = zext i1 %10 to i32
%12 = add nuw nsw i32 %8, %11
%13 = add nuw i64 %6, 1
%14 = getelementptr inbounds i8*, i8** %0, i64 %13
%15 = load i8*, i8** %14
%16 = icmp eq i8* %15, null
br i1 %16, label %17, label %5
17: ; preds = %5, %2
%18 = phi i32 [ 0, %2 ], [ %12, %5 ]
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void baz(int i, int j) {
  if (i != j)
    abort();
}


x86 assembly (clang, -O0):
<baz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
je     1131 <baz+0x21>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<baz>:
cmp    %esi,%edi
jne    1115 <baz+0x5>
ret
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @baz(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 ne i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 (...) @abort()
unreachable
10: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @baz(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %2
ret void
}
int octave_f_setfd_wrapper(void) { return -1; }


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

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

LLVM IR (-O0):
define i32 @octave_f_setfd_wrapper() {
ret i32 -1
}

LLVM IR (-O2):
define i32 @octave_f_setfd_wrapper() {
ret i32 -1
}
/* Type definitions */
struct timezone {
  int dummy;
};
struct timeval {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __NR_gettimeofday;
int syscall(int /*<<< orphan*/, struct timeval *, struct timezone *);
int sys_gettimeofday(struct timeval *tv, struct timezone *tz) {
  return syscall(__NR_gettimeofday, tv, tz);
}


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

x86 assembly (clang, -O2):
<sys_gettimeofday>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    0x2ecb(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
%struct.timeval = type { i32 }
%struct.timezone = type { i32 }
@__NR_gettimeofday = global i32 0
define i32 @sys_gettimeofday(%struct.timeval* %0, %struct.timezone* %1) {
%3 = alloca %struct.timeval*
%4 = alloca %struct.timezone*
store %struct.timeval* %0, %struct.timeval** %3
store %struct.timezone* %1, %struct.timezone** %4
%5 = load i32, i32* @__NR_gettimeofday
%6 = load %struct.timeval*, %struct.timeval** %3
%7 = load %struct.timezone*, %struct.timezone** %4
%8 = call i32 @syscall(i32 %5, %struct.timeval* %6, %struct.timezone* %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
%struct.timezone = type { i32 }
@__NR_gettimeofday = global i32 0
define i32 @sys_gettimeofday(%struct.timeval* %0, %struct.timezone* %1) {
%3 = load i32, i32* @__NR_gettimeofday
%4 = tail call i32 @syscall(i32 %3, %struct.timeval* %0, %struct.timezone* %1)
ret i32 %4
}
int in_set(int c, char *s) {
  while (0 != s[0]) {
    if (c == s[0])
      return 1;
    s = s + 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<in_set>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
je     114b <in_set+0x4b>
mov    -0x8(%rbp),%eax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    113a <in_set+0x3a>
movl   $0x1,-0x4(%rbp)
jmp    1152 <in_set+0x52>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110b <in_set+0xb>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<in_set>:
mov    (%rsi),%cl
xor    %eax,%eax
test   %cl,%cl
je     1122 <in_set+0x22>
add    $0x1,%rsi
nopl   0x0(%rax)
movsbl %cl,%ecx
cmp    %edi,%ecx
je     1123 <in_set+0x23>
movzbl (%rsi),%ecx
add    $0x1,%rsi
test   %cl,%cl
jne    1110 <in_set+0x10>
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @in_set(i32 %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %14, label %8
5: ; preds = %8
%6 = load i8, i8* %13
%7 = icmp eq i8 %6, 0
br i1 %7, label %14, label %8
8: ; preds = %2, %5
%9 = phi i8 [ %6, %5 ], [ %3, %2 ]
%10 = phi i8* [ %13, %5 ], [ %1, %2 ]
%11 = sext i8 %9 to i32
%12 = icmp eq i32 %11, %0
%13 = getelementptr inbounds i8, i8* %10, i64 1
br i1 %12, label %14, label %5
14: ; preds = %8, %5, %2
%15 = phi i32 [ 0, %2 ], [ 0, %5 ], [ 1, %8 ]
ret i32 %15
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct zbuf {
  int dummy;
};

/* Variables and functions */
scalar_t__ __zbuf_pull(struct zbuf *, int, int);
uint32_t zbuf_get32(struct zbuf *zb) {
  struct unaligned32 {
    uint32_t value;
  } __attribute__((packed));
  struct unaligned32 *v =
      ((struct unaligned32 *)__zbuf_pull(zb, sizeof(struct unaligned32), 1));
  if (v)
    return v->value;
  return 0;
}


x86 assembly (clang, -O0):
<zbuf_get32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <__zbuf_pull@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     114c <zbuf_get32+0x3c>
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1153 <zbuf_get32+0x43>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zbuf_get32>:
push   %rax
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <__zbuf_pull@plt>
test   %rax,%rax
je     1129 <zbuf_get32+0x19>
mov    (%rax),%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.zbuf = type { i32 }
%struct.unaligned32 = type { i32 }
define i32 @zbuf_get32(%struct.zbuf* %0) {
%2 = alloca i32
%3 = alloca %struct.zbuf*
%4 = alloca %struct.unaligned32*
store %struct.zbuf* %0, %struct.zbuf** %3
%5 = load %struct.zbuf*, %struct.zbuf** %3
%6 = call i64 @__zbuf_pull(%struct.zbuf* %5, i32 4, i32 1)
%7 = inttoptr i64 %6 to %struct.unaligned32*
store %struct.unaligned32* %7, %struct.unaligned32** %4
%8 = load %struct.unaligned32*, %struct.unaligned32** %4
%9 = icmp ne %struct.unaligned32* %8, null
br i1 %9, label %10, label %14
10: ; preds = %1
%11 = load %struct.unaligned32*, %struct.unaligned32** %4
%12 = getelementptr inbounds %struct.unaligned32, %struct.unaligned32* %11, i32 0, i32 0
%13 = load i32, i32* %12
store i32 %13, i32* %2
br label %15
14: ; preds = %1
store i32 0, i32* %2
br label %15
15: ; preds = %14, %10
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
%struct.zbuf = type { i32 }
%struct.unaligned32 = type { i32 }
define i32 @zbuf_get32(%struct.zbuf* %0) {
%2 = tail call i64 @__zbuf_pull(%struct.zbuf* %0, i32 4, i32 1)
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = inttoptr i64 %2 to %struct.unaligned32*
%6 = getelementptr inbounds %struct.unaligned32, %struct.unaligned32* %5, i64 0, i32 0
%7 = load i32, i32* %6
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ 0, %1 ]
ret i32 %9
}
imm0imm1(r0, r1, x0, x1, p0, p1) unsigned short r0, r1;
unsigned short *p0, *p1;
{
  if (22 <= 33)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<imm0imm1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
mov    %edx,-0x8(%rbp)
mov    %ecx,-0xc(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @imm0imm1(i32 %0, i32 %1, i32 %2, i32 %3, i16* %4, i16* %5) {
%7 = alloca i16
%8 = alloca i16
%9 = alloca i32
%10 = alloca i32
%11 = alloca i16*
%12 = alloca i16*
%13 = trunc i32 %0 to i16
%14 = trunc i32 %1 to i16
store i16 %13, i16* %7
store i16 %14, i16* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i16* %4, i16** %11
store i16* %5, i16** %12
ret i32 1
}

LLVM IR (-O2):
define i32 @imm0imm1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture readnone %4, i16* nocapture readnone %5) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ run();
int main(int c, char **v) {
  run();
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <run@plt>
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <run@plt>
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @run()
%7 = load i32, i32* @EXIT_SUCCESS
%8 = call i32 @exit(i32 %7)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @run()
%4 = load i32, i32* @EXIT_SUCCESS
%5 = tail call i32 @exit(i32 %4)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ err(int, char *, char const *);
scalar_t__ remove(char const *);
void doremove(const char *file) {
  if (remove(file)) {
    err(1, "%s", file);
  }
}


x86 assembly (clang, -O0):
<doremove>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <remove@plt>
cmp    $0x0,%rax
je     1154 <doremove+0x34>
mov    -0x8(%rbp),%rdx
mov    $0x1,%edi
lea    0xeb1(%rip),%rsi
call   1040 <err@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<doremove>:
push   %rbx
mov    %rdi,%rbx
call   1030 <remove@plt>
test   %rax,%rax
je     1143 <doremove+0x23>
lea    0xecb(%rip),%rsi
mov    $0x1,%edi
mov    %rbx,%rdx
pop    %rbx
jmp    1040 <err@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define void @doremove(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @remove(i8* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i32 @err(i32 1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %7)
br label %9
9: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @doremove(i8* %0) {
%2 = tail call i64 @remove(i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @err(i32 1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %4, %1
ret void
}
void g_thread_pool_push() {}


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

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

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

LLVM IR (-O2):
define void @g_thread_pool_push() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int func_3(int a, int b) {
  puts("Inside func_3\n");
  return (a * b);
}


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

x86 assembly (clang, -O2):
<func_3>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xee2(%rip),%rdi
call   1030 <puts@plt>
imul   %ebx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Inside func_3\0A\00"
define i32 @func_3(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @puts(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = mul nsw i32 %6, %7
ret i32 %8
}

LLVM IR (-O2):
@.str = [15 x i8] c"Inside func_3\0A\00"
define i32 @func_3(i32 %0, i32 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = mul nsw i32 %1, %0
ret i32 %4
}
/* Variables and functions */
double cosh(double);
double tau(double A, double B, double C, double V) {
  return A / cosh(0.5 * (V - B) / C);
}


x86 assembly (clang, -O0):
<tau>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
movsd  0xeb8(%rip),%xmm0
mulsd  %xmm1,%xmm0
divsd  -0x18(%rbp),%xmm0
call   1030 <cosh@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
divsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tau>:
push   %rax
movsd  %xmm0,(%rsp)
subsd  %xmm1,%xmm3
mulsd  0xede(%rip),%xmm3
divsd  %xmm2,%xmm3
movapd %xmm3,%xmm0
call   1030 <cosh@plt>
movsd  (%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @tau(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* %5
%10 = load double, double* %8
%11 = load double, double* %6
%12 = fsub double %10, %11
%13 = fmul double 5.000000e-01, %12
%14 = load double, double* %7
%15 = fdiv double %13, %14
%16 = call double @cosh(double %15)
%17 = fdiv double %9, %16
ret double %17
}

LLVM IR (-O2):
define double @tau(double %0, double %1, double %2, double %3) {
%5 = fsub double %3, %1
%6 = fmul double %5, 5.000000e-01
%7 = fdiv double %6, %2
%8 = tail call double @cosh(double %7)
%9 = fdiv double %0, %8
ret double %9
}
/* Variables and functions */
scalar_t__ chr_iswhite(char const);
char *str_new(char const *);
char *str_triml(const char *s) {
  while (chr_iswhite(*s))
    s++;
  return str_new(s);
}


x86 assembly (clang, -O0):
<str_triml>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1040 <chr_iswhite@plt>
cmp    $0x0,%rax
je     1153 <str_triml+0x33>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    112c <str_triml+0xc>
mov    -0x8(%rbp),%rdi
call   1030 <str_new@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_triml>:
push   %rbx
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
nopl   0x0(%rax,%rax,1)
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1040 <chr_iswhite@plt>
test   %rax,%rax
jne    1130 <str_triml+0x10>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <str_new@plt>

LLVM IR (-O0):
define i8* @str_triml(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %8, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = call i64 @chr_iswhite(i8 signext %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %2
br label %3
11: ; preds = %3
%12 = load i8*, i8** %2
%13 = call i8* @str_new(i8* %12)
ret i8* %13
}

LLVM IR (-O2):
define i8* @str_triml(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = tail call i64 @chr_iswhite(i8 signext %4)
%6 = icmp eq i64 %5, 0
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = tail call i8* @str_new(i8* %3)
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void handyFunction(int num) {
  for (int i = 0; i < num; i++) {
    printf("=");
  }
  printf("\n\n");
}


x86 assembly (clang, -O0):
<handyFunction>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1148 <handyFunction+0x38>
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <handyFunction+0x12>
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handyFunction>:
push   %rbx
test   %edi,%edi
jle    113f <handyFunction+0x1f>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x3d,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1130 <handyFunction+0x10>
lea    0xeba(%rip),%rdi
pop    %rbx
jmp    1040 <puts@plt>

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

LLVM IR (-O2):
@str = [2 x i8] c"\0A\00"
define void @handyFunction(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %5, %1
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret void
5: ; preds = %1, %5
%6 = phi i32 [ %8, %5 ], [ 0, %1 ]
%7 = tail call i32 @putchar(i32 61)
%8 = add nuw nsw i32 %6, 1
%9 = icmp eq i32 %8, %0
br i1 %9, label %3, label %5
}
void gtk_radio_action_new() {}


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

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

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

LLVM IR (-O2):
define void @gtk_radio_action_new() {
ret void
}
__attribute__((always_)) void rdtsc_barrier(void) {
  asm volatile("661:\n\t"
               ".byte 0x66,0x66,0x90\n"
               "\n662:\n"
               ".section .altinstructions,\"a\"\n"
               " "
               ".balign 8"
               " "
               "\n"
               " "
               ".quad"
               " "
               "661b\n"
               " "
               ".quad"
               " "
               "663f\n"
               "	 .byte "
               "(3*32+17)"
               "\n"
               "	 .byte 662b-661b\n"
               "	 .byte 664f-663f\n"
               ".previous\n"
               ".section .altinstr_replacement, \"ax\"\n"
               "663:\n\t"
               "mfence"
               "\n664:\n"
               ".previous"
               :
               :
               : "memory");
  asm volatile("661:\n\t"
               ".byte 0x66,0x66,0x90\n"
               "\n662:\n"
               ".section .altinstructions,\"a\"\n"
               " "
               ".balign 8"
               " "
               "\n"
               " "
               ".quad"
               " "
               "661b\n"
               " "
               ".quad"
               " "
               "663f\n"
               "	 .byte "
               "(3*32+18)"
               "\n"
               "	 .byte 662b-661b\n"
               "	 .byte 664f-663f\n"
               ".previous\n"
               ".section .altinstr_replacement, \"ax\"\n"
               "663:\n\t"
               "lfence"
               "\n664:\n"
               ".previous"
               :
               :
               : "memory");
}


x86 assembly (clang, -O0):
<rdtsc_barrier>:
push   %rbp
mov    %rsp,%rbp
data16 xchg %ax,%ax
data16 xchg %ax,%ax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rdtsc_barrier>:
data16 xchg %ax,%ax
data16 xchg %ax,%ax
ret

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

LLVM IR (-O2):
define void @rdtsc_barrier() {
tail call void asm sideeffect "661:\0A\09.byte 0x66,0x66,0x90\0A\0A662:\0A.section .altinstructions,\22a\22\0A .balign 8 \0A .quad 661b\0A .quad 663f\0A\09 .byte (3*32+17)\0A\09 .byte 662b-661b\0A\09 .byte 664f-663f\0A.previous\0A.section .altinstr_replacement, \22ax\22\0A663:\0A\09mfence\0A664:\0A.previous", "~{memory},~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "661:\0A\09.byte 0x66,0x66,0x90\0A\0A662:\0A.section .altinstructions,\22a\22\0A .balign 8 \0A .quad 661b\0A .quad 663f\0A\09 .byte (3*32+18)\0A\09 .byte 662b-661b\0A\09 .byte 664f-663f\0A.previous\0A.section .altinstr_replacement, \22ax\22\0A663:\0A\09lfence\0A664:\0A.previous", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0xbb() {
  Assert_real((isalnum(187) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalnum.c",
              940, ("isalnum should be 0 for 0xbb"));
}


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xbb\00"
define void @t_isalnum_0xbb() {
%1 = call i64 @isalnum(i32 187)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 940, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xbb\00"
define void @t_isalnum_0xbb() {
%1 = tail call i64 @isalnum(i32 187)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 940, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int pm_om_debug_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @pm_om_debug_init() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ h();
void g(void) { h(); }


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

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

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

LLVM IR (-O2):
define void @g() {
%1 = tail call i32 (...) @h()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *);
int extension1(char *input, int inputLen, char *output, int outputMaxLen) {
  sprintf(output, "extension1 computation done");
  return 1;
}


x86 assembly (clang, -O0):
<extension1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xecf(%rip),%rsi
call   1030 <sprintf@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<extension1>:
movups 0xf05(%rip),%xmm0
movups %xmm0,0xc(%rdx)
movups 0xeee(%rip),%xmm0
movups %xmm0,(%rdx)
mov    $0x1,%eax
ret

LLVM IR (-O0):
@.str = [28 x i8] c"extension1 computation done\00"
define i32 @extension1(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i8*, i8** %7
%10 = call i32 @sprintf(i8* %9, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@.str = [28 x i8] c"extension1 computation done\00"
define i32 @extension1(i8* nocapture readnone %0, i32 %1, i8* nocapture writeonly %2, i32 %3) {
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 dereferenceable(28) %2, i8* align 1 dereferenceable(28) getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i64 28, i1 false)
ret i32 1
}
/* Variables and functions */
int norecurse1b(int);
int norecurse1a(int i) { return norecurse1b(i + 1); }


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

x86 assembly (clang, -O2):
<norecurse1a>:
add    $0x1,%edi
jmp    1030 <norecurse1b@plt>

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

LLVM IR (-O2):
define i32 @norecurse1a(i32 %0) {
%2 = add nsw i32 %0, 1
%3 = tail call i32 @norecurse1b(i32 %2)
ret i32 %3
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ hd44780_extif_pin_rs(int);
void hd44780_ll_select_register(uint8_t is_data_reg) {
  if (is_data_reg) {
    hd44780_extif_pin_rs(1);
  } else {
    hd44780_extif_pin_rs(0);
  }
}


x86 assembly (clang, -O0):
<hd44780_ll_select_register>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1136 <hd44780_ll_select_register+0x26>
mov    $0x1,%edi
call   1030 <hd44780_extif_pin_rs@plt>
jmp    113d <hd44780_ll_select_register+0x2d>
xor    %edi,%edi
call   1030 <hd44780_extif_pin_rs@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hd44780_ll_select_register>:
xor    %eax,%eax
test   %rdi,%rdi
setne  %al
mov    %eax,%edi
jmp    1030 <hd44780_extif_pin_rs@plt>

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

LLVM IR (-O2):
define void @hd44780_ll_select_register(i64 %0) {
%2 = icmp ne i64 %0, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @hd44780_extif_pin_rs(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CC2420CsmaP__CC2420Power__startOscillatorDone();
void CC2420ControlP__CC2420Power__startOscillatorDone(void) {
  CC2420CsmaP__CC2420Power__startOscillatorDone();
}


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

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

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

LLVM IR (-O2):
define void @CC2420ControlP__CC2420Power__startOscillatorDone() {
%1 = tail call i32 (...) @CC2420CsmaP__CC2420Power__startOscillatorDone()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ add();
int /*<<< orphan*/ by(int /*<<< orphan*/);
void add_by(uint32_t x) {
  by(x);
  add();
}


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

x86 assembly (clang, -O2):
<add_by>:
push   %rax
call   1040 <by@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <add@plt>

LLVM IR (-O0):
define void @add_by(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @by(i32 %3)
%5 = call i32 (...) @add()
ret void
}

LLVM IR (-O2):
define void @add_by(i32 %0) {
%2 = tail call i32 @by(i32 %0)
%3 = tail call i32 (...) @add()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ PKCS12_BAGS;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
int ASN1_item_i2d(int /*<<< orphan*/ *, unsigned char **, int /*<<< orphan*/ *);
int /*<<< orphan*/ PKCS12_BAGS_it;
int i2d_PKCS12_BAGS(PKCS12_BAGS *a, unsigned char **out) {
  return ASN1_item_i2d((ASN1_VALUE *)a, out, &PKCS12_BAGS_it);
}


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

x86 assembly (clang, -O2):
<i2d_PKCS12_BAGS>:
mov    0x2ec9(%rip),%rdx
jmp    1030 <ASN1_item_i2d@plt>

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

LLVM IR (-O2):
@PKCS12_BAGS_it = global i32 0
define i32 @i2d_PKCS12_BAGS(i32* %0, i8** %1) {
%3 = tail call i32 @ASN1_item_i2d(i32* %0, i8** %1, i32* @PKCS12_BAGS_it)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ kputc(char);
void putc_screen(char **s, char c) {
  (void)s;
  kputc(c);
}


x86 assembly (clang, -O0):
<putc_screen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%edi
call   1030 <kputc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putc_screen>:
mov    %esi,%edi
jmp    1030 <kputc@plt>

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

LLVM IR (-O2):
define void @putc_screen(i8** nocapture readnone %0, i8 signext %1) {
%3 = tail call i32 @kputc(i8 signext %1)
ret void
}
void refreshaudio(void) {}


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

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

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

LLVM IR (-O2):
define void @refreshaudio() {
ret void
}
void print_list(struct llist *list) {}


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

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

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

LLVM IR (-O2):
%struct.llist = type opaque
define void @print_list(%struct.llist* nocapture %0) {
ret void
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void print_mod_int32_t(int32_t m) { printf("K:=GF(%d);\n", m); }


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"K:=GF(%d);\0A\00"
define void @print_mod_int32_t(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"K:=GF(%d);\0A\00"
define void @print_mod_int32_t(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
void ieee80211_debugfs_key_remove_default(struct ieee80211_sub_if_data *sdata) {
}


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

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

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

LLVM IR (-O2):
%struct.ieee80211_sub_if_data = type opaque
define void @ieee80211_debugfs_key_remove_default(%struct.ieee80211_sub_if_data* nocapture %0) {
ret void
}
int i_APCI16XX_Reset(struct comedi_device *dev) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.comedi_device = type opaque
define i32 @i_APCI16XX_Reset(%struct.comedi_device* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ FerMem_Free(double *, char *, int);
void free_dyn_mem_(double *mvar) {
  FerMem_Free(mvar,
              "/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_dyn_mem.c",
              15);
  mvar = NULL;
}


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

x86 assembly (clang, -O2):
<free_dyn_mem_>:
lea    0xee9(%rip),%rsi
mov    $0xf,%edx
jmp    1030 <FerMem_Free@plt>

LLVM IR (-O0):
@.str = [148 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_dyn_mem.c\00"
define void @free_dyn_mem_(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = call i32 @FerMem_Free(double* %3, i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str, i64 0, i64 0), i32 15)
store double* null, double** %2
ret void
}

LLVM IR (-O2):
@.str = [148 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_dyn_mem.c\00"
define void @free_dyn_mem_(double* %0) {
%2 = tail call i32 @FerMem_Free(double* %0, i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str, i64 0, i64 0), i32 15)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  char letra = 'g';
  int numero = 666;
  char *letra_p = &letra;
  int *numero_p = &numero;
  *numero_p += (int)(*letra_p);
  printf("Resultado: %d\n", *numero_p);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x67,-0x5(%rbp)
movl   $0x29a,-0xc(%rbp)
lea    -0x5(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0xc(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%ecx
mov    -0x20(%rbp),%rax
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x20(%rbp),%rax
mov    (%rax),%esi
lea    0xeaa(%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    $0x301,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [15 x i8] c"Resultado: %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 769)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int _system(const char *command) {
  if (!command)
    return 0;
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<_system>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    111f <_system+0x1f>
movl   $0x0,-0x4(%rbp)
jmp    1138 <_system+0x38>
mov    0x2ec2(%rip),%rax
mov    (%rax),%ecx
mov    0x2ea9(%rip),%rax
mov    %ecx,(%rax)
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_system>:
test   %rdi,%rdi
je     111d <_system+0x1d>
mov    0x2edc(%rip),%rax
mov    (%rax),%eax
mov    0x2ec3(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @_system(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = icmp ne i8* %4, null
br i1 %5, label %7, label %6
6: ; preds = %1
store i32 0, i32* %2
br label %9
7: ; preds = %1
%8 = load i32, i32* @ENOSYS
store i32 %8, i32* @errno
store i32 -1, i32* %2
br label %9
9: ; preds = %7, %6
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @_system(i8* readnone %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = load i32, i32* @ENOSYS
store i32 %4, i32* @errno
br label %5
5: ; preds = %1, %3
%6 = phi i32 [ -1, %3 ], [ 0, %1 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ _nb_tests_lassert(int /*<<< orphan*/);
void _REQUIRE_CASE_succeed(void) { _nb_tests_lassert(0); }


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

x86 assembly (clang, -O2):
<_REQUIRE_CASE_succeed>:
xor    %edi,%edi
jmp    1030 <_nb_tests_lassert@plt>

LLVM IR (-O0):
define void @_REQUIRE_CASE_succeed() {
%1 = call i32 @_nb_tests_lassert(i32 0)
ret void
}

LLVM IR (-O2):
define void @_REQUIRE_CASE_succeed() {
%1 = tail call i32 @_nb_tests_lassert(i32 0)
ret void
}