xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ sleep(int);
int main(int argc, char **argv) {
  int max_count = 100;
  int count = 0;
  while (true) {
    sleep(1);
    count++;
    printf("%d/%d \n", count, max_count);
    if (count == max_count)
      break;
  }
  exit(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)
movl   $0x64,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    $0x1,%edi
call   1050 <sleep@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%esi
mov    -0x14(%rbp),%edx
lea    0xe8c(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jne    118a <main+0x5a>
jmp    118f <main+0x5f>
jmp    1154 <main+0x24>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x1,%ebx
lea    0xec0(%rip),%r14
mov    $0x1,%edi
call   1050 <sleep@plt>
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0x64,%edx
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x65,%ebx
jne    1140 <main+0x10>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@.str = [8 x i8] c"%d/%d \0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ 0, %2 ], [ %6, %3 ]
%5 = tail call i32 @sleep(i32 1)
%6 = add nuw nsw i32 %4, 1
%7 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %6, i32 100)
%8 = icmp eq i32 %6, 100
br i1 %8, label %9, label %3
9: ; preds = %3
%10 = tail call i32 @exit(i32 0)
unreachable
}
int execute_readv() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_readv() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void any_to_c(void *a) {
  if (a == NULL) {
    printf("NULL\n");
  } else {
    printf("not NULL\n");
  }
}


x86 assembly (clang, -O0):
<any_to_c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1138 <any_to_c+0x28>
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
jmp    1144 <any_to_c+0x34>
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<any_to_c>:
test   %rdi,%rdi
lea    0xeea(%rip),%rax
lea    0xedf(%rip),%rdi
cmove  %rax,%rdi
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@str = [9 x i8] c"not NULL\00"
@str.2 = [5 x i8] c"NULL\00"
define void @any_to_c(i8* readnone %0) {
%2 = icmp eq i8* %0, null
%3 = select i1 %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0)
%4 = tail call i32 @puts(i8* dereferenceable(1) %3)
ret void
}
int battery_open(struct inode *inode, struct file *filp) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.inode = type opaque
%struct.file = type opaque
define i32 @battery_open(%struct.inode* nocapture readnone %0, %struct.file* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void fun1() {
  int i = 0;
  while (i < 100) {
    i++;
    printf("fun1\n");
  }
}


x86 assembly (clang, -O0):
<fun1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x64,-0x4(%rbp)
jge    1143 <fun1+0x33>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
jmp    111f <fun1+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun1>:
push   %rbp
push   %rbx
push   %rax
mov    $0x64,%ebp
lea    0xee1(%rip),%rbx
nop
mov    %rbx,%rdi
call   1030 <puts@plt>
add    $0xffffffff,%ebp
jne    1120 <fun1+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@str = [5 x i8] c"fun1\00"
define void @fun1() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %3, %1 ]
%3 = add nuw nsw i32 %2, 1
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%5 = icmp eq i32 %3, 100
br i1 %5, label %6, label %1
6: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ send_rebroadcast();
void rng_alarm_handler(int sig) { send_rebroadcast(); }


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

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

LLVM IR (-O0):
define void @rng_alarm_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @send_rebroadcast()
ret void
}

LLVM IR (-O2):
define void @rng_alarm_handler(i32 %0) {
%2 = tail call i32 (...) @send_rebroadcast()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ parse_fail(void *);
void parse_should_fail_success(void *o) { parse_fail(o); }


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

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

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

LLVM IR (-O2):
define void @parse_should_fail_success(i8* %0) {
%2 = tail call i32 @parse_fail(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void htmlNbSpaces(int count) {
  int i;
  for (i = 0; i < count; ++i)
    printf("&nbsp;");
}


x86 assembly (clang, -O0):
<htmlNbSpaces>:
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 <htmlNbSpaces+0x38>
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <htmlNbSpaces+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<htmlNbSpaces>:
push   %r14
push   %rbx
push   %rax
test   %edi,%edi
jle    113d <htmlNbSpaces+0x2d>
mov    %edi,%ebx
lea    0xedf(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0xffffffff,%ebx
jne    1130 <htmlNbSpaces+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [7 x i8] c"&nbsp;\00"
define void @htmlNbSpaces(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 ([7 x i8], [7 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
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"&nbsp;\00"
define void @htmlNbSpaces(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
/* Type definitions */
struct shim_linux_dirent {
  int dummy;
};

/* Variables and functions */
scalar_t__ shim_enosys(int /*<<< orphan*/, unsigned int,
                       struct shim_linux_dirent *, unsigned int);
int shim_getdents(unsigned int fd, struct shim_linux_dirent *dirp,
                  unsigned int count) {
  return (int)shim_enosys(0, fd, dirp, count);
}


x86 assembly (clang, -O0):
<shim_getdents>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
xor    %edi,%edi
call   1030 <shim_enosys@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shim_getdents>:
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %edi,%esi
xor    %edi,%edi
jmp    1030 <shim_enosys@plt>

LLVM IR (-O0):
%struct.shim_linux_dirent = type { i32 }
define i32 @shim_getdents(i32 %0, %struct.shim_linux_dirent* %1, i32 %2) {
%4 = alloca i32
%5 = alloca %struct.shim_linux_dirent*
%6 = alloca i32
store i32 %0, i32* %4
store %struct.shim_linux_dirent* %1, %struct.shim_linux_dirent** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load %struct.shim_linux_dirent*, %struct.shim_linux_dirent** %5
%9 = load i32, i32* %6
%10 = call i64 @shim_enosys(i32 0, i32 %7, %struct.shim_linux_dirent* %8, i32 %9)
%11 = trunc i64 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
%struct.shim_linux_dirent = type { i32 }
define i32 @shim_getdents(i32 %0, %struct.shim_linux_dirent* %1, i32 %2) {
%4 = tail call i64 @shim_enosys(i32 0, i32 %0, %struct.shim_linux_dirent* %1, i32 %2)
%5 = trunc i64 %4 to i32
ret i32 %5
}
void cleanup(int a, int b) {
  if (a)
    if (b)
      a = 1;
    else
      b = 1;
  else if (a)
    a = 1;
  else
    b = 1;
  return;
}


x86 assembly (clang, -O0):
<cleanup>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1136 <cleanup+0x36>
cmpl   $0x0,-0x8(%rbp)
je     112a <cleanup+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    1131 <cleanup+0x31>
movl   $0x1,-0x8(%rbp)
jmp    1158 <cleanup+0x58>
cmpl   $0x0,-0x4(%rbp)
je     114c <cleanup+0x4c>
movl   $0x1,-0x4(%rbp)
jmp    1153 <cleanup+0x53>
movl   $0x1,-0x8(%rbp)
jmp    1158 <cleanup+0x58>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @cleanup(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 = icmp ne i32 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %2
%8 = load i32, i32* %4
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %7
store i32 1, i32* %3
br label %12
11: ; preds = %7
store i32 1, i32* %4
br label %12
12: ; preds = %11, %10
br label %19
13: ; preds = %2
%14 = load i32, i32* %3
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %13
store i32 1, i32* %3
br label %18
17: ; preds = %13
store i32 1, i32* %4
br label %18
18: ; preds = %17, %16
br label %19
19: ; preds = %18, %12
ret void
}

LLVM IR (-O2):
define void @cleanup(i32 %0, i32 %1) {
ret void
}
void dirty_ratio_handler(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<dirty_ratio_handler>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<dirty_ratio_handler>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.dirty_ratio_handler = [20 x i8] c"dirty_ratio_handler\00"
define void @dirty_ratio_handler() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @__func__.dirty_ratio_handler, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.dirty_ratio_handler = [20 x i8] c"dirty_ratio_handler\00"
define void @dirty_ratio_handler() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @__func__.dirty_ratio_handler, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_setzero_si128();
int /*<<< orphan*/ _mm_unpacklo_epi16(int /*<<< orphan*/, int /*<<< orphan*/);
extern __attribute__((__gnu___, __always___, __artificial__)) __m128i
_MM_CVTEPU16_EPI32(__m128i a) {
  __m128i zero = _mm_setzero_si128();
  return _mm_unpacklo_epi16(a, zero);
}


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

x86 assembly (clang, -O2):
<_MM_CVTEPU16_EPI32>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <_mm_setzero_si128@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1040 <_mm_unpacklo_epi16@plt>

LLVM IR (-O0):
define i32 @_MM_CVTEPU16_EPI32(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 (...) @_mm_setzero_si128()
store i32 %4, i32* %3
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = call i32 @_mm_unpacklo_epi16(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @_MM_CVTEPU16_EPI32(i32 %0) {
%2 = tail call i32 (...) @_mm_setzero_si128()
%3 = tail call i32 @_mm_unpacklo_epi16(i32 %0, i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ SysCtlClockGet();
int /*<<< orphan*/ UARTStdioConfig(unsigned long, unsigned long,
                                   int /*<<< orphan*/);
void UARTStdioInitExpClk(unsigned long ulPortNum, unsigned long ulBaud) {
  UARTStdioConfig(ulPortNum, ulBaud, SysCtlClockGet());
}


x86 assembly (clang, -O0):
<UARTStdioInitExpClk>:
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    $0x0,%al
call   1030 <SysCtlClockGet@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1040 <UARTStdioConfig@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTStdioInitExpClk>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <SysCtlClockGet@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <UARTStdioConfig@plt>

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

LLVM IR (-O2):
define void @UARTStdioInitExpClk(i64 %0, i64 %1) {
%3 = tail call i32 (...) @SysCtlClockGet()
%4 = tail call i32 @UARTStdioConfig(i64 %0, i64 %1, i32 %3)
ret void
}
int ffiTestInts9(int c1, int c2, int c3, int c4, int c5, int c6, int c7, int c8,
                 int c9) {
  ;
  return 42;
}


x86 assembly (clang, -O0):
<ffiTestInts9>:
push   %rbp
mov    %rsp,%rbp
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    $0x2a,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @ffiTestInts9(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8) {
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
store i32 %0, i32* %10
store i32 %1, i32* %11
store i32 %2, i32* %12
store i32 %3, i32* %13
store i32 %4, i32* %14
store i32 %5, i32* %15
store i32 %6, i32* %16
store i32 %7, i32* %17
store i32 %8, i32* %18
ret i32 42
}

LLVM IR (-O2):
define i32 @ffiTestInts9(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8) {
ret i32 42
}
int curs_set(int visibility) {
  (void)visibility;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @curs_set(i32 %0) {
ret i32 0
}
/* Variables and functions */
scalar_t__ COND_VC();
int /*<<< orphan*/ EA_AW_8();
int /*<<< orphan*/ m68ki_write_8(int /*<<< orphan*/, int);
void m68k_op_svc_8_aw(void) { m68ki_write_8(EA_AW_8(), COND_VC() ? 0xff : 0); }


x86 assembly (clang, -O0):
<m68k_op_svc_8_aw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <EA_AW_8@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <COND_VC@plt>
mov    -0x4(%rbp),%edi
mov    %rax,%rcx
xor    %esi,%esi
mov    $0xff,%eax
cmp    $0x0,%rcx
cmovne %eax,%esi
call   1050 <m68ki_write_8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68k_op_svc_8_aw>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
xor    %eax,%eax
call   1040 <EA_AW_8@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <COND_VC@plt>
test   %rax,%rax
mov    $0xff,%esi
cmove  %ebp,%esi
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <m68ki_write_8@plt>

LLVM IR (-O0):
define void @m68k_op_svc_8_aw() {
%1 = call i32 (...) @EA_AW_8()
%2 = call i64 (...) @COND_VC()
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i64
%5 = select i1 %3, i32 255, i32 0
%6 = call i32 @m68ki_write_8(i32 %1, i32 %5)
ret void
}

LLVM IR (-O2):
define void @m68k_op_svc_8_aw() {
%1 = tail call i32 (...) @EA_AW_8()
%2 = tail call i64 (...) @COND_VC()
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 0, i32 255
%5 = tail call i32 @m68ki_write_8(i32 %1, i32 %4)
ret void
}
void copia(void) {
  int i;
  extern char linea[], linea_max[];
  i = 0;
  while (*(linea + i) != '\0') {
    *(linea_max + i) = *(linea + i);
    i++;
  }
  linea_max[i] = '\0';
}


x86 assembly (clang, -O0):
<copia>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movslq -0x4(%rbp),%rcx
mov    0x2eda(%rip),%rax
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     114d <copia+0x4d>
movslq -0x4(%rbp),%rcx
mov    0x2ec2(%rip),%rax
mov    (%rax,%rcx,1),%dl
movslq -0x4(%rbp),%rcx
mov    0x2e9c(%rip),%rax
mov    %dl,(%rax,%rcx,1)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <copia+0xb>
movslq -0x4(%rbp),%rcx
mov    0x2e80(%rip),%rax
movb   $0x0,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<copia>:
mov    0x2ee9(%rip),%rax
mov    (%rax),%cl
test   %cl,%cl
je     1134 <copia+0x34>
xor    %edx,%edx
mov    0x2ec2(%rip),%rsi
cs nopw 0x0(%rax,%rax,1)
mov    %cl,(%rsi,%rdx,1)
movzbl 0x1(%rax,%rdx,1),%ecx
add    $0x1,%rdx
test   %cl,%cl
jne    1120 <copia+0x20>
mov    %edx,%eax
jmp    1136 <copia+0x36>
xor    %eax,%eax
mov    0x2e9b(%rip),%rcx
movb   $0x0,(%rcx,%rax,1)
ret

LLVM IR (-O0):
@linea = external global [0 x i8]
@linea_max = external global [0 x i8]
define void @copia() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %9, %0
%3 = load i32, i32* %1
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* getelementptr inbounds ([0 x i8], [0 x i8]* @linea, i64 0, i64 0), i64 %4
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %19
9: ; preds = %2
%10 = load i32, i32* %1
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* getelementptr inbounds ([0 x i8], [0 x i8]* @linea, i64 0, i64 0), i64 %11
%13 = load i8, i8* %12
%14 = load i32, i32* %1
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* getelementptr inbounds ([0 x i8], [0 x i8]* @linea_max, i64 0, i64 0), i64 %15
store i8 %13, i8* %16
%17 = load i32, i32* %1
%18 = add nsw i32 %17, 1
store i32 %18, i32* %1
br label %2
19: ; preds = %2
%20 = load i32, i32* %1
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [0 x i8], [0 x i8]* @linea_max, i64 0, i64 %21
store i8 0, i8* %22
ret void
}

LLVM IR (-O2):
@linea = external global [0 x i8]
@linea_max = external global [0 x i8]
define void @copia() {
%1 = load i8, i8* getelementptr inbounds ([0 x i8], [0 x i8]* @linea, i64 0, i64 0)
%2 = icmp eq i8 %1, 0
br i1 %2, label %13, label %3
3: ; preds = %0, %3
%4 = phi i64 [ %7, %3 ], [ 0, %0 ]
%5 = phi i8 [ %9, %3 ], [ %1, %0 ]
%6 = getelementptr inbounds [0 x i8], [0 x i8]* @linea_max, i64 0, i64 %4
store i8 %5, i8* %6
%7 = add nuw nsw i64 %4, 1
%8 = getelementptr inbounds [0 x i8], [0 x i8]* @linea, i64 0, i64 %7
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %3
11: ; preds = %3
%12 = and i64 %7, 4294967295
br label %13
13: ; preds = %11, %0
%14 = phi i64 [ 0, %0 ], [ %12, %11 ]
%15 = getelementptr inbounds [0 x i8], [0 x i8]* @linea_max, i64 0, i64 %14
store i8 0, i8* %15
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
char *my_int_to_string(int a) {
  static char tempBuffer[128];
  sprintf(tempBuffer, "%d", a);
  return tempBuffer;
}


x86 assembly (clang, -O0):
<my_int_to_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
lea    0x2f1b(%rip),%rdi
lea    0xed4(%rip),%rsi
call   1030 <sprintf@plt>
lea    0x2f08(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_int_to_string>:
push   %rbx
mov    %edi,%edx
lea    0x2f26(%rip),%rbx
lea    0xedf(%rip),%rsi
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@my_int_to_string.tempBuffer = internal global [128 x i8] zeroinitializer
@.str = [3 x i8] c"%d\00"
define i8* @my_int_to_string(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @sprintf(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @my_int_to_string.tempBuffer, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i8* getelementptr inbounds ([128 x i8], [128 x i8]* @my_int_to_string.tempBuffer, i64 0, i64 0)
}

LLVM IR (-O2):
@my_int_to_string.tempBuffer = internal global [128 x i8] zeroinitializer
@.str = [3 x i8] c"%d\00"
define i8* @my_int_to_string(i32 %0) {
%2 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([128 x i8], [128 x i8]* @my_int_to_string.tempBuffer, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i8* getelementptr inbounds ([128 x i8], [128 x i8]* @my_int_to_string.tempBuffer, i64 0, i64 0)
}
int trailingZerosOfFactorial(int n) {
  int multipliesof5 = 0;
  for (int i = 5; i <= n; i *= 5) {
    multipliesof5 += n / i;
  }
  return multipliesof5;
}


x86 assembly (clang, -O0):
<trailingZerosOfFactorial>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x5,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     113a <trailingZerosOfFactorial+0x3a>
mov    -0x4(%rbp),%eax
cltd
idivl  -0xc(%rbp)
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
imul   $0x5,-0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1115 <trailingZerosOfFactorial+0x15>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<trailingZerosOfFactorial>:
xor    %ecx,%ecx
cmp    $0x5,%edi
jl     111e <trailingZerosOfFactorial+0x1e>
xor    %ecx,%ecx
mov    $0x5,%esi
xchg   %ax,%ax
mov    %edi,%eax
cltd
idiv   %esi
add    %eax,%ecx
lea    (%rsi,%rsi,4),%esi
cmp    %edi,%esi
jle    1110 <trailingZerosOfFactorial+0x10>
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @trailingZerosOfFactorial(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
store i32 5, i32* %4
br label %5
5: ; preds = %15, %1
%6 = load i32, i32* %4
%7 = load i32, i32* %2
%8 = icmp sle i32 %6, %7
br i1 %8, label %9, label %18
9: ; preds = %5
%10 = load i32, i32* %2
%11 = load i32, i32* %4
%12 = sdiv i32 %10, %11
%13 = load i32, i32* %3
%14 = add nsw i32 %13, %12
store i32 %14, i32* %3
br label %15
15: ; preds = %9
%16 = load i32, i32* %4
%17 = mul nsw i32 %16, 5
store i32 %17, i32* %4
br label %5
18: ; preds = %5
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @trailingZerosOfFactorial(i32 %0) {
%2 = icmp slt i32 %0, 5
br i1 %2, label %3, label %5
3: ; preds = %5, %1
%4 = phi i32 [ 0, %1 ], [ %9, %5 ]
ret i32 %4
5: ; preds = %1, %5
%6 = phi i32 [ %10, %5 ], [ 5, %1 ]
%7 = phi i32 [ %9, %5 ], [ 0, %1 ]
%8 = sdiv i32 %0, %6
%9 = add nsw i32 %8, %7
%10 = mul nsw i32 %6, 5
%11 = icmp sgt i32 %10, %0
br i1 %11, label %3, label %5
}
int __attribute__((stdcall)) stdcall_fun(int a, int b, int c) {
  return a + b + c;
}


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

x86 assembly (clang, -O2):
<stdcall_fun>:
lea    (%rdi,%rsi,1),%eax
add    %edx,%eax
ret

LLVM IR (-O0):
define i32 @stdcall_fun(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = add nsw i32 %7, %8
%10 = load i32, i32* %6
%11 = add nsw i32 %9, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @stdcall_fun(i32 %0, i32 %1, i32 %2) {
%4 = add nsw i32 %1, %0
%5 = add nsw i32 %4, %2
ret i32 %5
}
/* Variables and functions */
void *object_get_interface(void *instance, void *interface_type) {
  return NULL;
}


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

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

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

LLVM IR (-O2):
define noalias i8* @object_get_interface(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ link_error0();
void test2(int x, int y) {
  if ((x < y) && (x > y))
    link_error0();
}


x86 assembly (clang, -O0):
<test2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    113d <test2+0x2d>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    113d <test2+0x2d>
mov    $0x0,%al
call   1030 <link_error0@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test2(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 slt i32 %5, %6
br i1 %7, label %8, label %14
8: ; preds = %2
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = icmp sgt i32 %9, %10
br i1 %11, label %12, label %14
12: ; preds = %8
%13 = call i32 (...) @link_error0()
br label %14
14: ; preds = %12, %8, %2
ret void
}

LLVM IR (-O2):
define void @test2(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int tabela[] = {1, 2, 4, 6, 12};
  int i;
  i = 4;
  while (i >= 0) {
    printf("tabela[%d]=%d\n", i, tabela[i]);
    i--;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xed5(%rip),%eax
mov    %eax,-0x10(%rbp)
movl   $0x4,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jl     1174 <main+0x64>
mov    -0x24(%rbp),%esi
movslq -0x24(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%edx
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x24(%rbp)
jmp    1145 <main+0x35>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x4,%esi
mov    $0xc,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
mov    $0x6,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
mov    $0x4,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x2,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x1,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [15 x i8] c"tabela[%d]=%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 4, i32 12)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 3, i32 6)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 2, i32 4)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 1, i32 2)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 0, i32 1)
ret i32 0
}
/* Variables and functions */
int strcmp(char *, char *);
int qsort_strcmp(const void *s1, const void *s2) {
  return strcmp(*(char **)s1, *(char **)s2);
}


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

x86 assembly (clang, -O2):
<qsort_strcmp>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @qsort_strcmp(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 = bitcast i8* %5 to i8**
%7 = load i8*, i8** %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i8**
%10 = load i8*, i8** %9
%11 = call i32 @strcmp(i8* %7, i8* %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @qsort_strcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
ret i32 %7
}
double neuron_relu(double input, double max) {
  input = input > 0 ? input : 0;
  input = input < max ? input : max;
  return input;
}


x86 assembly (clang, -O0):
<neuron_relu>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    112f <neuron_relu+0x2f>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    113c <neuron_relu+0x3c>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    113c <neuron_relu+0x3c>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1169 <neuron_relu+0x69>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    1173 <neuron_relu+0x73>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<neuron_relu>:
xorpd  %xmm2,%xmm2
maxsd  %xmm2,%xmm0
minsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @neuron_relu(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = fcmp ogt double %5, 0.000000e+00
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = load double, double* %3
br label %10
9: ; preds = %2
br label %10
10: ; preds = %9, %7
%11 = phi double [ %8, %7 ], [ 0.000000e+00, %9 ]
store double %11, double* %3
%12 = load double, double* %3
%13 = load double, double* %4
%14 = fcmp olt double %12, %13
br i1 %14, label %15, label %17
15: ; preds = %10
%16 = load double, double* %3
br label %19
17: ; preds = %10
%18 = load double, double* %4
br label %19
19: ; preds = %17, %15
%20 = phi double [ %16, %15 ], [ %18, %17 ]
store double %20, double* %3
%21 = load double, double* %3
ret double %21
}

LLVM IR (-O2):
define double @neuron_relu(double %0, double %1) {
%3 = fcmp ogt double %0, 0.000000e+00
%4 = select i1 %3, double %0, double 0.000000e+00
%5 = fcmp olt double %4, %1
%6 = select i1 %5, double %4, double %1
ret double %6
}
int main(void) {
  int a = 1;
  int b = 2;
  int c = a + b;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%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
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
store i32 2, i32* %3
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = add nsw i32 %5, %6
store i32 %7, i32* %4
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
three4(a, b, c) { nop(); }


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

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

LLVM IR (-O0):
define i32 @three4(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%8 = call i32 (...) @nop()
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
define i32 @three4(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 (...) @nop()
ret i32 undef
}
/* Type definitions */
struct feed_tty {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ feed_tty_cleanup(struct feed_tty *const);
void feed_tty_cleanup_cb(void *const p_object) {
  struct feed_tty *const p_tty = (struct feed_tty *)(p_object);
  feed_tty_cleanup(p_tty);
}


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

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

LLVM IR (-O0):
%struct.feed_tty = type { i32 }
define void @feed_tty_cleanup_cb(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.feed_tty*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to %struct.feed_tty*
store %struct.feed_tty* %5, %struct.feed_tty** %3
%6 = load %struct.feed_tty*, %struct.feed_tty** %3
%7 = call i32 @feed_tty_cleanup(%struct.feed_tty* %6)
ret void
}

LLVM IR (-O2):
%struct.feed_tty = type { i32 }
define void @feed_tty_cleanup_cb(i8* %0) {
%2 = bitcast i8* %0 to %struct.feed_tty*
%3 = tail call i32 @feed_tty_cleanup(%struct.feed_tty* %2)
ret void
}
void gtk_text_buffer_insert_range_interactive() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_buffer_insert_range_interactive() {
ret void
}
void foo105(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo105(i32 %0) {
ret void
}
unsigned long int cast_uchar_ulong_fast(unsigned char x) {
  return (unsigned long int)x;
}


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

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

LLVM IR (-O0):
define i64 @cast_uchar_ulong_fast(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i64
ret i64 %4
}

LLVM IR (-O2):
define i64 @cast_uchar_ulong_fast(i8 zeroext %0) {
%2 = zext i8 %0 to i64
ret i64 %2
}
/* Variables and functions */
void *malloc(int);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
void *calloc(size_t nelem, size_t elsize) {
  void *tmp;
  int size = nelem * elsize;
  tmp = malloc(size);
  if (!tmp)
    return NULL;
  memset((char *)tmp, 0, size);
  return tmp;
}


x86 assembly (clang, -O0):
<calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
imul   -0x18(%rbp),%rax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%edi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1160 <calloc+0x40>
movq   $0x0,-0x8(%rbp)
jmp    1176 <calloc+0x56>
mov    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calloc>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
imul   %edi,%ebx
mov    %ebx,%edi
call   1040 <malloc@plt>
mov    %rax,%r14
test   %rax,%rax
je     1145 <calloc+0x25>
mov    %r14,%rdi
xor    %esi,%esi
mov    %ebx,%edx
call   1030 <memset@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @calloc(i64 %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i64
%6 = alloca i8*
%7 = alloca i32
store i64 %0, i64* %4
store i64 %1, i64* %5
%8 = load i64, i64* %4
%9 = load i64, i64* %5
%10 = mul i64 %8, %9
%11 = trunc i64 %10 to i32
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = call i8* @malloc(i32 %12)
store i8* %13, i8** %6
%14 = load i8*, i8** %6
%15 = icmp ne i8* %14, null
br i1 %15, label %17, label %16
16: ; preds = %2
store i8* null, i8** %3
br label %22
17: ; preds = %2
%18 = load i8*, i8** %6
%19 = load i32, i32* %7
%20 = call i32 @memset(i8* %18, i32 0, i32 %19)
%21 = load i8*, i8** %6
store i8* %21, i8** %3
br label %22
22: ; preds = %17, %16
%23 = load i8*, i8** %3
ret i8* %23
}

LLVM IR (-O2):
define i8* @calloc(i64 %0, i64 %1) {
%3 = mul i64 %1, %0
%4 = trunc i64 %3 to i32
%5 = tail call i8* @malloc(i32 %4)
%6 = icmp eq i8* %5, null
br i1 %6, label %9, label %7
7: ; preds = %2
%8 = tail call i32 @memset(i8* %5, i32 0, i32 %4)
br label %9
9: ; preds = %2, %7
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ print_message(char *);
void big_bad_setup_fixture() {
  print_message("big hashset (bad hash)\n");
  print_message("----------------------\n");
}


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

x86 assembly (clang, -O2):
<big_bad_setup_fixture>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <print_message@plt>
lea    0xef4(%rip),%rdi
pop    %rax
jmp    1030 <print_message@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"big hashset (bad hash)\0A\00"
@.str.1 = [24 x i8] c"----------------------\0A\00"
define void @big_bad_setup_fixture() {
%1 = call i32 @print_message(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @print_message(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"big hashset (bad hash)\0A\00"
@.str.1 = [24 x i8] c"----------------------\0A\00"
define void @big_bad_setup_fixture() {
%1 = tail call i32 @print_message(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @print_message(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *progname) {
  fprintf(stderr, "usage:  %s port\n", progname);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
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    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [17 x i8] c"usage: %s port\0A\00"
define void @usage(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 ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [17 x i8] c"usage: %s port\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
bool file_exists(const char *filename) {
  FILE *file;
  if ((file = fopen(filename, "r"))) {
    fclose(file);
    return true;
  }
  return false;
}


x86 assembly (clang, -O0):
<file_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     115f <file_exists+0x3f>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x1,-0x4(%rbp)
jmp    1166 <file_exists+0x46>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_exists>:
push   %rax
lea    0xed8(%rip),%rsi
call   1040 <fopen@plt>
test   %rax,%rax
je     1141 <file_exists+0x21>
mov    %rax,%rdi
call   1030 <fclose@plt>
mov    $0x1,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define i32 @file_exists(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @fclose(i32* %2)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %7
}
/* Variables and functions */
double gcd(double, double);
double lcm(double u, double v) { return u * v / gcd(u, v); }


x86 assembly (clang, -O0):
<lcm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <gcd@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
divsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcm>:
push   %rax
movapd %xmm0,%xmm2
mulsd  %xmm1,%xmm2
movsd  %xmm2,(%rsp)
call   1030 <gcd@plt>
movsd  (%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @lcm(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fmul double %5, %6
%8 = load double, double* %3
%9 = load double, double* %4
%10 = call double @gcd(double %8, double %9)
%11 = fdiv double %7, %10
ret double %11
}

LLVM IR (-O2):
define double @lcm(double %0, double %1) {
%3 = fmul double %0, %1
%4 = tail call double @gcd(double %0, double %1)
%5 = fdiv double %3, %4
ret double %5
}
/* Type definitions */
struct group {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
struct group *getgrnam(const char *name __attribute__((unused))) {
  errno = ENOSYS;
  return NULL;
}


x86 assembly (clang, -O0):
<getgrnam>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    0x2ed9(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec0(%rip),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.group = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
define %struct.group* @getgrnam(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @ENOSYS
store i32 %3, i32* @errno
ret %struct.group* null
}

LLVM IR (-O2):
%struct.group = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
define noalias %struct.group* @getgrnam(i8* nocapture readnone %0) {
%2 = load i32, i32* @ENOSYS
store i32 %2, i32* @errno
ret %struct.group* null
}