xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ SYS_mbind;
int syscall(int /*<<< orphan*/, void *, unsigned long, int, unsigned long *,
            unsigned long, unsigned int);
int my_mbind(void *addr, unsigned long len, int mode, unsigned long *nodemask,
             unsigned long maxnode, unsigned flags) {
  return syscall(SYS_mbind, addr, len, mode, nodemask, maxnode, flags);
}


x86 assembly (clang, -O0):
<my_mbind>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
mov    -0x2c(%rbp),%eax
mov    %eax,(%rsp)
call   1030 <syscall@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_mbind>:
push   %rax
mov    %r8,%rax
mov    %rcx,%r8
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    0x2eb2(%rip),%rdi
mov    (%rdi),%edi
mov    %r9d,(%rsp)
mov    %rax,%r9
call   1030 <syscall@plt>
pop    %rcx
ret

LLVM IR (-O0):
@SYS_mbind = global i32 0
define i32 @my_mbind(i8* %0, i64 %1, i32 %2, i64* %3, i64 %4, i32 %5) {
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i32
%10 = alloca i64*
%11 = alloca i64
%12 = alloca i32
store i8* %0, i8** %7
store i64 %1, i64* %8
store i32 %2, i32* %9
store i64* %3, i64** %10
store i64 %4, i64* %11
store i32 %5, i32* %12
%13 = load i32, i32* @SYS_mbind
%14 = load i8*, i8** %7
%15 = load i64, i64* %8
%16 = load i32, i32* %9
%17 = load i64*, i64** %10
%18 = load i64, i64* %11
%19 = load i32, i32* %12
%20 = call i32 @syscall(i32 %13, i8* %14, i64 %15, i32 %16, i64* %17, i64 %18, i32 %19)
ret i32 %20
}

LLVM IR (-O2):
@SYS_mbind = global i32 0
define i32 @my_mbind(i8* %0, i64 %1, i32 %2, i64* %3, i64 %4, i32 %5) {
%7 = load i32, i32* @SYS_mbind
%8 = tail call i32 @syscall(i32 %7, i8* %0, i64 %1, i32 %2, i64* %3, i64 %4, i32 %5)
ret i32 %8
}
void outputRoot(unsigned char root, unsigned char *destination,
                long *position) {
  destination[*position] = root;
  (*position)++;
}


x86 assembly (clang, -O0):
<outputRoot>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x1(%rbp),%dl
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    (%rcx),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<outputRoot>:
mov    (%rdx),%rax
mov    %dil,(%rsi,%rax,1)
addq   $0x1,(%rdx)
ret

LLVM IR (-O0):
define void @outputRoot(i8 zeroext %0, i8* %1, i64* %2) {
%4 = alloca i8
%5 = alloca i8*
%6 = alloca i64*
store i8 %0, i8* %4
store i8* %1, i8** %5
store i64* %2, i64** %6
%7 = load i8, i8* %4
%8 = load i8*, i8** %5
%9 = load i64*, i64** %6
%10 = load i64, i64* %9
%11 = getelementptr inbounds i8, i8* %8, i64 %10
store i8 %7, i8* %11
%12 = load i64*, i64** %6
%13 = load i64, i64* %12
%14 = add nsw i64 %13, 1
store i64 %14, i64* %12
ret void
}

LLVM IR (-O2):
define void @outputRoot(i8 zeroext %0, i8* nocapture writeonly %1, i64* nocapture %2) {
%4 = load i64, i64* %2
%5 = getelementptr inbounds i8, i8* %1, i64 %4
store i8 %0, i8* %5
%6 = load i64, i64* %2
%7 = add nsw i64 %6, 1
store i64 %7, i64* %2
ret void
}
int strcmp(const char *s, const char *t) {
  for (; *s == *t; s++, t++) {
    if (*s == '\0') {
      return 0;
    }
  }
  return *s - *t;
}


x86 assembly (clang, -O0):
<strcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    1160 <strcmp+0x60>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    113e <strcmp+0x3e>
movl   $0x0,-0x4(%rbp)
jmp    1173 <strcmp+0x73>
jmp    1143 <strcmp+0x43>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    110c <strcmp+0xc>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
movsbl (%rcx),%ecx
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp>:
mov    (%rdi),%al
mov    (%rsi),%cl
cmp    %cl,%al
jne    1124 <strcmp+0x24>
mov    $0x1,%edx
nopl   (%rax)
test   %al,%al
je     112d <strcmp+0x2d>
movzbl (%rdi,%rdx,1),%eax
movzbl (%rsi,%rdx,1),%ecx
add    $0x1,%rdx
cmp    %cl,%al
je     1110 <strcmp+0x10>
movsbl %al,%eax
movsbl %cl,%ecx
sub    %ecx,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @strcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
%5 = icmp eq i8 %3, %4
br i1 %5, label %6, label %17
6: ; preds = %2, %11
%7 = phi i8 [ %14, %11 ], [ %3, %2 ]
%8 = phi i8* [ %13, %11 ], [ %1, %2 ]
%9 = phi i8* [ %12, %11 ], [ %0, %2 ]
%10 = icmp eq i8 %7, 0
br i1 %10, label %23, label %11
11: ; preds = %6
%12 = getelementptr inbounds i8, i8* %9, i64 1
%13 = getelementptr inbounds i8, i8* %8, i64 1
%14 = load i8, i8* %12
%15 = load i8, i8* %13
%16 = icmp eq i8 %14, %15
br i1 %16, label %6, label %17
17: ; preds = %11, %2
%18 = phi i8 [ %3, %2 ], [ %14, %11 ]
%19 = phi i8 [ %4, %2 ], [ %15, %11 ]
%20 = sext i8 %18 to i32
%21 = sext i8 %19 to i32
%22 = sub nsw i32 %20, %21
br label %23
23: ; preds = %6, %17
%24 = phi i32 [ %22, %17 ], [ 0, %6 ]
ret i32 %24
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char *, int, char *);
int main(void) {
  char *p = "int main(void){printf(p,34,p=%c%s%c,34);%s}";
  printf(p, 34, p = "int main(void){printf(p,34,p=%c%s%c,34); }", 34, p);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xefe(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%r8
mov    $0x22,%ecx
lea    0xeea(%rip),%rdx
mov    %ecx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [44 x i8] c"int main(void){printf(p,34,p=%c%s%c,34);%s}\00"
@.str.1 = [43 x i8] c"int main(void){printf(p,34,p=%c%s%c,34); }\00"
define i32 @main() {
%1 = alloca i8*
store i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
store i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @printf(i8* %2, i32 34, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i32 34, i8* %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [44 x i8] c"int main(void){printf(p,34,p=%c%s%c,34);%s}\00"
@.str.1 = [43 x i8] c"int main(void){printf(p,34,p=%c%s%c,34); }\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i32 34, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i32 34, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ integer_to_value(char *, char *, int);
void integer_to_quantity(char integer[], char qty[]) {
  integer_to_value(integer, qty, 8);
}


x86 assembly (clang, -O0):
<integer_to_quantity>:
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    $0x8,%edx
call   1030 <integer_to_value@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<integer_to_quantity>:
mov    $0x8,%edx
jmp    1030 <integer_to_value@plt>

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

LLVM IR (-O2):
define void @integer_to_quantity(i8* %0, i8* %1) {
%3 = tail call i32 @integer_to_value(i8* %0, i8* %1, i32 8)
ret void
}
/* Type definitions */
struct expr_list {
  int dummy;
};

/* Variables and functions */
void init_expr_hash(struct expr_list **list) {
  register int i = 0;
  while (i < 32771)
    list[i++] = NULL;
}


x86 assembly (clang, -O0):
<init_expr_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x8003,-0xc(%rbp)
jge    113b <init_expr_hash+0x3b>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0xc(%rbp)
movslq %ecx,%rcx
movq   $0x0,(%rax,%rcx,8)
jmp    110f <init_expr_hash+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_expr_hash>:
push   %rax
mov    $0x40018,%edx
xor    %esi,%esi
call   1030 <memset@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.expr_list = type { i32 }
define void @init_expr_hash(%struct.expr_list** %0) {
%2 = alloca %struct.expr_list**
%3 = alloca i32
store %struct.expr_list** %0, %struct.expr_list*** %2
store i32 0, i32* %3
br label %4
4: ; preds = %7, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 32771
br i1 %6, label %7, label %13
7: ; preds = %4
%8 = load %struct.expr_list**, %struct.expr_list*** %2
%9 = load i32, i32* %3
%10 = add nsw i32 %9, 1
store i32 %10, i32* %3
%11 = sext i32 %9 to i64
%12 = getelementptr inbounds %struct.expr_list*, %struct.expr_list** %8, i64 %11
store %struct.expr_list* null, %struct.expr_list** %12
br label %4
13: ; preds = %4
ret void
}

LLVM IR (-O2):
%struct.expr_list = type { i32 }
define void @init_expr_hash(%struct.expr_list** nocapture writeonly %0) {
%2 = bitcast %struct.expr_list** %0 to i8*
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int /*<<< orphan*/ __SYSCALL_LL_O(int /*<<< orphan*/);
int syscall(int, int, int /*<<< orphan*/);
int ftruncate(int fd, off_t length) {
  return syscall(93, fd, __SYSCALL_LL_O(length));
}


x86 assembly (clang, -O0):
<ftruncate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <__SYSCALL_LL_O@plt>
mov    -0xc(%rbp),%esi
mov    %eax,%edx
mov    $0x5d,%edi
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ftruncate>:
push   %rbx
mov    %edi,%ebx
mov    %esi,%edi
call   1040 <__SYSCALL_LL_O@plt>
mov    $0x5d,%edi
mov    %ebx,%esi
mov    %eax,%edx
pop    %rbx
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
define i32 @ftruncate(i32 %0, i32 %1) {
%3 = tail call i32 @__SYSCALL_LL_O(i32 %1)
%4 = tail call i32 @syscall(i32 93, i32 %0, i32 %3)
ret i32 %4
}
/* Type definitions */
typedef unsigned long volatile uint32_t;

/* Variables and functions */
uint32_t I2CSlaveStatus(uint32_t ui32Base) {
  ;
  return ((*((volatile unsigned long *)(ui32Base + 0x00000804))));
}


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

x86 assembly (clang, -O2):
<I2CSlaveStatus>:
mov    %rdi,-0x8(%rsp)
mov    -0x8(%rsp),%rax
mov    0x804(%rax),%rax
ret

LLVM IR (-O0):
define i64 @I2CSlaveStatus(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = add i64 %3, 2052
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @I2CSlaveStatus(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = add i64 %3, 2052
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
ret i64 %6
}
/* Variables and functions */
int errno;
int munmap(void *, size_t);
int __sulong_posix_munmap(void *addr, size_t length) {
  {
    int native_errno = errno;
    int result = munmap(addr, length);
    if (result == (int)-1) {
      result = (int)(long)-errno;
    }
    errno = native_errno;
    return result;
  };
}


x86 assembly (clang, -O0):
<__sulong_posix_munmap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb9(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <munmap@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0xffffffff,-0x18(%rbp)
jne    1156 <__sulong_posix_munmap+0x46>
xor    %eax,%eax
mov    0x2e91(%rip),%rcx
sub    (%rcx),%eax
cltq
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%ecx
mov    0x2e80(%rip),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__sulong_posix_munmap>:
push   %rbp
push   %rbx
push   %rax
mov    0x2ec6(%rip),%rbx
mov    (%rbx),%ebp
call   1030 <munmap@plt>
xor    %ecx,%ecx
sub    (%rbx),%ecx
cmp    $0xffffffff,%eax
cmove  %ecx,%eax
mov    %ebp,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@errno = global i32 0
define i32 @__sulong_posix_munmap(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store i64 %1, i64* %4
%7 = load i32, i32* @errno
store i32 %7, i32* %5
%8 = load i8*, i8** %3
%9 = load i64, i64* %4
%10 = call i32 @munmap(i8* %8, i64 %9)
store i32 %10, i32* %6
%11 = load i32, i32* %6
%12 = icmp eq i32 %11, -1
br i1 %12, label %13, label %18
13: ; preds = %2
%14 = load i32, i32* @errno
%15 = sub nsw i32 0, %14
%16 = sext i32 %15 to i64
%17 = trunc i64 %16 to i32
store i32 %17, i32* %6
br label %18
18: ; preds = %13, %2
%19 = load i32, i32* %5
store i32 %19, i32* @errno
%20 = load i32, i32* %6
ret i32 %20
}

LLVM IR (-O2):
@errno = global i32 0
define i32 @__sulong_posix_munmap(i8* %0, i64 %1) {
%3 = load i32, i32* @errno
%4 = tail call i32 @munmap(i8* %0, i64 %1)
%5 = icmp eq i32 %4, -1
%6 = load i32, i32* @errno
%7 = sub nsw i32 0, %6
%8 = select i1 %5, i32 %7, i32 %4
store i32 %3, i32* @errno
ret i32 %8
}
int abs(int j) { return ((j < 0) ? -j : j); }


x86 assembly (clang, -O0):
<abs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    111e <abs+0x1e>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1124 <abs+0x24>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @abs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
/* Variables and functions */
int *malloc(int);
int main() {
  int *ip = malloc(sizeof(int));
  if (ip) {
    *ip = 1;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1142 <main+0x32>
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4,%edi
call   1030 <malloc@plt>
test   %rax,%rax
je     1126 <main+0x16>
movl   $0x1,(%rax)
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32* @malloc(i32 4)
%2 = icmp eq i32* %1, null
br i1 %2, label %4, label %3
3: ; preds = %0
store i32 1, i32* %1
br label %4
4: ; preds = %3, %0
ret i32 0
}
/* Type definitions */
struct fastbuf {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ bwrite(struct fastbuf *, char const *, scalar_t__);
scalar_t__ strlen(char const *);
void bputs0(struct fastbuf *f, const char *b) { bwrite(f, b, strlen(b) + 1); }


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

x86 assembly (clang, -O2):
<bputs0>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
lea    0x1(%rax),%rdx
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <bwrite@plt>

LLVM IR (-O0):
%struct.fastbuf = type { i32 }
define void @bputs0(%struct.fastbuf* %0, i8* %1) {
%3 = alloca %struct.fastbuf*
%4 = alloca i8*
store %struct.fastbuf* %0, %struct.fastbuf** %3
store i8* %1, i8** %4
%5 = load %struct.fastbuf*, %struct.fastbuf** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i64 @strlen(i8* %7)
%9 = add nsw i64 %8, 1
%10 = call i32 @bwrite(%struct.fastbuf* %5, i8* %6, i64 %9)
ret void
}

LLVM IR (-O2):
%struct.fastbuf = type { i32 }
define void @bputs0(%struct.fastbuf* %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = add nsw i64 %3, 1
%5 = tail call i32 @bwrite(%struct.fastbuf* %0, i8* %1, i64 %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
size_t fwrite(void *, size_t, size_t, int /*<<< orphan*/ *);
int /*<<< orphan*/ perror(char *);
void write_to_file_or_die(void *ptr, size_t size, size_t nmemb, FILE *fp) {
  if (fwrite(ptr, size, nmemb, fp) != nmemb) {
    perror("fwrite");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<write_to_file_or_die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1050 <fwrite@plt>
cmp    -0x18(%rbp),%rax
je     117d <write_to_file_or_die+0x4d>
lea    0xe92(%rip),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_to_file_or_die>:
push   %rbx
mov    %rdx,%rbx
call   1050 <fwrite@plt>
cmp    %rbx,%rax
jne    1140 <write_to_file_or_die+0x10>
pop    %rbx
ret
lea    0xeb9(%rip),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"fwrite\00"
define void @write_to_file_or_die(i8* %0, i64 %1, i64 %2, i32* %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32*
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i32* %3, i32** %8
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = load i64, i64* %7
%12 = load i32*, i32** %8
%13 = call i64 @fwrite(i8* %9, i64 %10, i64 %11, i32* %12)
%14 = load i64, i64* %7
%15 = icmp ne i64 %13, %14
br i1 %15, label %16, label %19
16: ; preds = %4
%17 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%18 = call i32 @exit(i32 1)
unreachable
19: ; preds = %4
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"fwrite\00"
define void @write_to_file_or_die(i8* nocapture %0, i64 %1, i64 %2, i32* nocapture %3) {
%5 = tail call i64 @fwrite(i8* %0, i64 %1, i64 %2, i32* %3)
%6 = icmp eq i64 %5, %2
br i1 %6, label %10, label %7
7: ; preds = %4
%8 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 @exit(i32 1)
unreachable
10: ; preds = %4
ret void
}
/* Variables and functions */
void *malloc(unsigned int);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, unsigned int);
void *zalloc(unsigned int size) {
  void *ret = malloc(size);
  if (ret)
    memset(ret, 0, size);
  return ret;
}


x86 assembly (clang, -O0):
<zalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1150 <zalloc+0x30>
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zalloc>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     113e <zalloc+0x1e>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %ebp,%edx
call   1030 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i8* @zalloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = load i32, i32* %2
%11 = call i32 @memset(i8* %9, i32 0, i32 %10)
br label %12
12: ; preds = %8, %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
define i8* @zalloc(i32 %0) {
%2 = tail call i8* @malloc(i32 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @memset(i8* %2, i32 0, i32 %0)
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
double log(double);
double haldane(double r) { return -50.0 * log(1.0 - 2.0 * r); }


x86 assembly (clang, -O0):
<haldane>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm1
addsd  %xmm1,%xmm1
movsd  0xeda(%rip),%xmm0
subsd  %xmm1,%xmm0
call   1030 <log@plt>
movaps %xmm0,%xmm1
movsd  0xebe(%rip),%xmm0
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<haldane>:
push   %rax
addsd  %xmm0,%xmm0
movsd  0xee3(%rip),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1030 <log@plt>
mulsd  0xed6(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @haldane(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %3, double 1.000000e+00)
%5 = call double @log(double %4)
%6 = fmul double -5.000000e+01, %5
ret double %6
}

LLVM IR (-O2):
define double @haldane(double %0) {
%2 = tail call double @llvm.fmuladd.f64(double %0, double -2.000000e+00, double 1.000000e+00)
%3 = tail call double @log(double %2)
%4 = fmul double %3, -5.000000e+01
ret double %4
}
int __sx25_find_link_parameters(struct link_data **lptr) { return (0); }


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

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

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

LLVM IR (-O2):
%struct.link_data = type opaque
define i32 @__sx25_find_link_parameters(%struct.link_data** nocapture readnone %0) {
ret i32 0
}
char int_to_leds_m$leds$yellow_off(void) {
  char result;
  result = leds$leds$yellow_off();
  return result;
}


x86 assembly (clang, -O0):
<int_to_leds_m$leds$yellow_off>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <leds$leds$yellow_off@plt>
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_to_leds_m$leds$yellow_off>:
push   %rax
xor    %eax,%eax
call   1030 <leds$leds$yellow_off@plt>
pop    %rcx
ret

LLVM IR (-O0):
define signext i8 @"int_to_leds_m$leds$yellow_off"() {
%1 = alloca i8
%2 = call i32 (...) @"leds$leds$yellow_off"()
%3 = trunc i32 %2 to i8
store i8 %3, i8* %1
%4 = load i8, i8* %1
ret i8 %4
}

LLVM IR (-O2):
define signext i8 @"int_to_leds_m$leds$yellow_off"() {
%1 = tail call i32 (...) @"leds$leds$yellow_off"()
%2 = trunc i32 %1 to i8
ret i8 %2
}
int lowest_of_u64(unsigned long long int arg1, unsigned long long int arg2) {
  if (arg1 <= arg2)
    return arg1;
  else
    return arg2;
}


x86 assembly (clang, -O0):
<lowest_of_u64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
ja     1126 <lowest_of_u64+0x26>
mov    -0x10(%rbp),%rax
mov    %eax,-0x4(%rbp)
jmp    112d <lowest_of_u64+0x2d>
mov    -0x18(%rbp),%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lowest_of_u64>:
mov    %rdi,%rax
cmp    %rsi,%rdi
cmova  %esi,%eax
ret

LLVM IR (-O0):
define i32 @lowest_of_u64(i64 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
%6 = load i64, i64* %4
%7 = load i64, i64* %5
%8 = icmp ule i64 %6, %7
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = load i64, i64* %4
%11 = trunc i64 %10 to i32
store i32 %11, i32* %3
br label %15
12: ; preds = %2
%13 = load i64, i64* %5
%14 = trunc i64 %13 to i32
store i32 %14, i32* %3
br label %15
15: ; preds = %12, %9
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @lowest_of_u64(i64 %0, i64 %1) {
%3 = icmp ugt i64 %0, %1
%4 = select i1 %3, i64 %1, i64 %0
%5 = trunc i64 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ die(char *, char *, int);
void die_mem(char *file, int line) { die("Out of memory", file, line); }


x86 assembly (clang, -O0):
<die_mem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    0xed3(%rip),%rdi
call   1030 <die@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<die_mem>:
mov    %esi,%edx
mov    %rdi,%rsi
lea    0xee4(%rip),%rdi
jmp    1030 <die@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"Out of memory\00"
define void @die_mem(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @die(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"Out of memory\00"
define void @die_mem(i8* %0, i32 %1) {
%3 = tail call i32 @die(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ parsingStringAttr(char *, char *);
void sj_onString(char *name, char *value) { parsingStringAttr(name, value); }


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

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

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

LLVM IR (-O2):
define void @sj_onString(i8* %0, i8* %1) {
%3 = tail call i32 @parsingStringAttr(i8* %0, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ atoi(char const *);
int /*<<< orphan*/ sastantua(int /*<<< orphan*/);
int main(int argc, char const *argv[]) {
  sastantua(atoi(argv[1]));
  return 0;
}


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    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,%edi
call   1030 <sastantua@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
call   1040 <atoi@plt>
mov    %eax,%edi
call   1030 <sastantua@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
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 = load i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = call i32 @atoi(i8* %8)
%10 = call i32 @sastantua(i32 %9)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @atoi(i8* %4)
%6 = tail call i32 @sastantua(i32 %5)
ret i32 0
}
void ScaleRowDown2Box_SSSE3() {}


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

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

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

LLVM IR (-O2):
define void @ScaleRowDown2Box_SSSE3() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ put8(int);
void fdiv_preg32_qword(int reg32) {
  put8(0xDC);
  put8(0x30 + reg32);
}


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

x86 assembly (clang, -O2):
<fdiv_preg32_qword>:
push   %rbx
mov    %edi,%ebx
mov    $0xdc,%edi
call   1030 <put8@plt>
add    $0x30,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1030 <put8@plt>

LLVM IR (-O0):
define void @fdiv_preg32_qword(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @put8(i32 220)
%4 = load i32, i32* %2
%5 = add nsw i32 48, %4
%6 = call i32 @put8(i32 %5)
ret void
}

LLVM IR (-O2):
define void @fdiv_preg32_qword(i32 %0) {
%2 = tail call i32 @put8(i32 220)
%3 = add nsw i32 %0, 48
%4 = tail call i32 @put8(i32 %3)
ret void
}
main() {
  int x;
  x = 4;
  x = 5;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
unsigned int aml_read_rtc_mem_reg(unsigned char reg_id) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @aml_read_rtc_mem_reg(i8 zeroext %0) {
ret i32 0
}
void flush_cache(void) { asm volatile("wbinvd" ::: "memory"); }


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

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

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

LLVM IR (-O2):
define void @flush_cache() {
tail call void asm sideeffect "wbinvd", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
int OPA1() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @OPA1() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ IntDisable(int /*<<< orphan*/);
int /*<<< orphan*/ IntUnregister(int /*<<< orphan*/);
int /*<<< orphan*/ _PWMGenIntNumberGet(int /*<<< orphan*/, int /*<<< orphan*/);
void PWMGenIntUnregister(uint32_t ui32Base, uint32_t ui32Gen) {
  uint32_t ui32Int;
  ;
  ;
  ui32Int = _PWMGenIntNumberGet(ui32Base, ui32Gen);
  ;
  IntDisable(ui32Int);
  IntUnregister(ui32Int);
}


x86 assembly (clang, -O0):
<PWMGenIntUnregister>:
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 <_PWMGenIntNumberGet@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <IntDisable@plt>
mov    -0xc(%rbp),%edi
call   1050 <IntUnregister@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PWMGenIntUnregister>:
push   %rbx
call   1030 <_PWMGenIntNumberGet@plt>
mov    %eax,%ebx
mov    %eax,%edi
call   1040 <IntDisable@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1050 <IntUnregister@plt>

LLVM IR (-O0):
define void @PWMGenIntUnregister(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 @_PWMGenIntNumberGet(i32 %6, i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = call i32 @IntDisable(i32 %9)
%11 = load i32, i32* %5
%12 = call i32 @IntUnregister(i32 %11)
ret void
}

LLVM IR (-O2):
define void @PWMGenIntUnregister(i32 %0, i32 %1) {
%3 = tail call i32 @_PWMGenIntNumberGet(i32 %0, i32 %1)
%4 = tail call i32 @IntDisable(i32 %3)
%5 = tail call i32 @IntUnregister(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ chline(char, int, int);
int /*<<< orphan*/ scanf(char *, char *, int *, int *);
int main(void) {
  char ch;
  int i, j;
  scanf("%c%d%d", &ch, &i, &j);
  chline(ch, i, j);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x5(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
mov    -0x5(%rbp),%al
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
movsbl %al,%edi
call   1030 <chline@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0xf(%rsp),%rsi
lea    0x14(%rsp),%rdx
lea    0x10(%rsp),%rcx
call   1040 <scanf@plt>
movsbl 0xf(%rsp),%edi
mov    0x14(%rsp),%esi
mov    0x10(%rsp),%edx
call   1030 <chline@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%c%d%d\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %2 to i8*
%5 = bitcast i32* %3 to i8*
%6 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %1, i32* %2, i32* %3)
%7 = load i8, i8* %1
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = call i32 @chline(i8 signext %7, i32 %8, i32 %9)
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ state;
};
typedef TYPE_1__ XColormapEvent;

/* Variables and functions */
int get_XColormapEvent_state(void *_p) {
  return (int)((XColormapEvent *)_p)->state;
}


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

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

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

LLVM IR (-O2):
define i32 @get_XColormapEvent_state(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
void audioVol(int vol) {}


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

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

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

LLVM IR (-O2):
define void @audioVol(i32 %0) {
ret void
}
/* Type definitions */
struct _file_stream {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ err(int, char *);
int fs_read_int(struct _file_stream *);
void check_valid_format(struct _file_stream *in) {
  int format = fs_read_int(in);
  if (format > 1)
    err(1, "Incompatible format version");
}


x86 assembly (clang, -O0):
<check_valid_format>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fs_read_int@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jle    1153 <check_valid_format+0x33>
mov    $0x1,%edi
lea    0xeb2(%rip),%rsi
call   1040 <err@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_valid_format>:
push   %rax
call   1030 <fs_read_int@plt>
cmp    $0x2,%eax
jl     113d <check_valid_format+0x1d>
lea    0xece(%rip),%rsi
mov    $0x1,%edi
pop    %rax
jmp    1040 <err@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct._file_stream = type { i32 }
@.str = [28 x i8] c"Incompatible format version\00"
define void @check_valid_format(%struct._file_stream* %0) {
%2 = alloca %struct._file_stream*
%3 = alloca i32
store %struct._file_stream* %0, %struct._file_stream** %2
%4 = load %struct._file_stream*, %struct._file_stream** %2
%5 = call i32 @fs_read_int(%struct._file_stream* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp sgt i32 %6, 1
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 @err(i32 1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
%struct._file_stream = type { i32 }
@.str = [28 x i8] c"Incompatible format version\00"
define void @check_valid_format(%struct._file_stream* %0) {
%2 = tail call i32 @fs_read_int(%struct._file_stream* %0)
%3 = icmp sgt i32 %2, 1
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @err(i32 1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int /*<<< orphan*/ pthread_mutex_destroy(int /*<<< orphan*/ *);
int /*<<< orphan*/ pthread_mutex_init(int /*<<< orphan*/ *,
                                      int /*<<< orphan*/ *);
int /*<<< orphan*/ pthread_mutex_lock(int /*<<< orphan*/ *);
int /*<<< orphan*/ pthread_mutex_unlock(int /*<<< orphan*/ *);
int main(int argc, char **argv) {
  pthread_mutex_t mutex;
  pthread_mutex_init(&mutex, NULL);
  pthread_mutex_lock(&mutex);
  pthread_mutex_unlock(&mutex);
  pthread_mutex_destroy(&mutex);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x14(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <pthread_mutex_init@plt>
lea    -0x14(%rbp),%rdi
call   1060 <pthread_mutex_lock@plt>
lea    -0x14(%rbp),%rdi
call   1040 <pthread_mutex_unlock@plt>
lea    -0x14(%rbp),%rdi
call   1030 <pthread_mutex_destroy@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
call   1050 <pthread_mutex_init@plt>
mov    %rbx,%rdi
call   1060 <pthread_mutex_lock@plt>
mov    %rbx,%rdi
call   1040 <pthread_mutex_unlock@plt>
mov    %rbx,%rdi
call   1030 <pthread_mutex_destroy@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @pthread_mutex_init(i32* %6, i32* null)
%8 = call i32 @pthread_mutex_lock(i32* %6)
%9 = call i32 @pthread_mutex_unlock(i32* %6)
%10 = call i32 @pthread_mutex_destroy(i32* %6)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @pthread_mutex_init(i32* %3, i32* null)
%6 = call i32 @pthread_mutex_lock(i32* %3)
%7 = call i32 @pthread_mutex_unlock(i32* %3)
%8 = call i32 @pthread_mutex_destroy(i32* %3)
ret i32 0
}
/* Type definitions */
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ socklen_t;

/* Variables and functions */
int socketcall(int (*)(int, struct sockaddr *, int /*<<< orphan*/ *), int,
               struct sockaddr *, int /*<<< orphan*/ *, int /*<<< orphan*/,
               int /*<<< orphan*/, int /*<<< orphan*/);
int getpeername(int fd, struct sockaddr *addr, socklen_t *len) {
  return socketcall(getpeername, fd, addr, len, 0, 0, 0);
}


x86 assembly (clang, -O0):
<getpeername>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    0x2ec3(%rip),%rdi
xor    %r9d,%r9d
mov    %r9d,%r8d
movl   $0x0,(%rsp)
call   1030 <socketcall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getpeername>:
push   %rax
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %edi,%esi
movl   $0x0,(%rsp)
mov    0x2ed1(%rip),%rdi
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <socketcall@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
define i32 @getpeername(i32 %0, %struct.sockaddr* %1, i32* %2) {
%4 = tail call i32 @socketcall(i32 (i32, %struct.sockaddr*, i32*)* @getpeername, i32 %0, %struct.sockaddr* %1, i32* %2, i32 0, i32 0, i32 0)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *const);
int /*<<< orphan*/ stderr;
void error(const char *const s) {
  fprintf(stderr, "error: %s\n", s);
  exit(-1);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [11 x i8] c"error: %s\0A\00"
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"error: %s\0A\00"
define void @error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 -1)
unreachable
}
int iscntrl(int c) { return c >= 0x0 && c <= 0x8; }


x86 assembly (clang, -O0):
<iscntrl>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <iscntrl+0x20>
cmpl   $0x8,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iscntrl>:
xor    %eax,%eax
cmp    $0x9,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @iscntrl(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 8
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @iscntrl(i32 %0) {
%2 = icmp ult i32 %0, 9
%3 = zext i1 %2 to i32
ret i32 %3
}
int glmMinIndex2d(double a, double b, int i1, int i2) {
  if (a < b)
    return i1;
  return i2;
}


x86 assembly (clang, -O0):
<glmMinIndex2d>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %edi,-0x1c(%rbp)
mov    %esi,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1133 <glmMinIndex2d+0x33>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1139 <glmMinIndex2d+0x39>
mov    -0x20(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmMinIndex2d>:
ucomisd %xmm0,%xmm1
mov    %edi,%eax
cmovbe %esi,%eax
ret

LLVM IR (-O0):
define i32 @glmMinIndex2d(double %0, double %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca double
%7 = alloca double
%8 = alloca i32
%9 = alloca i32
store double %0, double* %6
store double %1, double* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
%10 = load double, double* %6
%11 = load double, double* %7
%12 = fcmp olt double %10, %11
br i1 %12, label %13, label %15
13: ; preds = %4
%14 = load i32, i32* %8
store i32 %14, i32* %5
br label %17
15: ; preds = %4
%16 = load i32, i32* %9
store i32 %16, i32* %5
br label %17
17: ; preds = %15, %13
%18 = load i32, i32* %5
ret i32 %18
}

LLVM IR (-O2):
define i32 @glmMinIndex2d(double %0, double %1, i32 %2, i32 %3) {
%5 = fcmp olt double %0, %1
%6 = select i1 %5, i32 %2, i32 %3
ret i32 %6
}
/* Variables and functions */
scalar_t__ findProtocol(unsigned short, char *);
int ValidAuthorization(unsigned short name_length, char *name) {
  if (findProtocol(name_length, name))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<ValidAuthorization>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x6(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x6(%rbp),%ax
mov    -0x10(%rbp),%rsi
movzwl %ax,%edi
call   1030 <findProtocol@plt>
cmp    $0x0,%rax
je     1149 <ValidAuthorization+0x39>
movl   $0x1,-0x4(%rbp)
jmp    1150 <ValidAuthorization+0x40>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ValidAuthorization>:
push   %rax
call   1030 <findProtocol@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @ValidAuthorization(i16 zeroext %0, i8* %1) {
%3 = tail call i64 @findProtocol(i16 zeroext %0, i8* %1)
%4 = icmp ne i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}