xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ DEC8(int /*<<< orphan*/);
int /*<<< orphan*/ DirectIndexedXE0(int);
void OpD6E0M1(void) { DEC8(DirectIndexedXE0(3)); }


x86 assembly (clang, -O0):
<OpD6E0M1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
call   1040 <DirectIndexedXE0@plt>
mov    %eax,%edi
call   1030 <DEC8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<OpD6E0M1>:
push   %rax
mov    $0x3,%edi
call   1040 <DirectIndexedXE0@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <DEC8@plt>

LLVM IR (-O0):
define void @OpD6E0M1() {
%1 = call i32 @DirectIndexedXE0(i32 3)
%2 = call i32 @DEC8(i32 %1)
ret void
}

LLVM IR (-O2):
define void @OpD6E0M1() {
%1 = tail call i32 @DirectIndexedXE0(i32 3)
%2 = tail call i32 @DEC8(i32 %1)
ret void
}
int set1BFalse(char *mem) { return (*mem = (1 < 0)); }


x86 assembly (clang, -O0):
<set1BFalse>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<set1BFalse>:
movb   $0x0,(%rdi)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @set1BFalse(i8* nocapture writeonly %0) {
store i8 0, i8* %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ uart_send(int /*<<< orphan*/);
void uart_send_str(const char *psz) {
  while (*psz) {
    uart_send(*psz++);
  }
}


x86 assembly (clang, -O0):
<uart_send_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1145 <uart_send_str+0x35>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <uart_send@plt>
jmp    111c <uart_send_str+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_send_str>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <uart_send_str+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <uart_send@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <uart_send_str+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @uart_send_str(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = sext i8 %5 to i32
%9 = tail call i32 @uart_send(i32 %8)
%10 = load i8, i8* %7
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
void Logging_lost_callback(int channel_id, int lost) {}


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

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

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

LLVM IR (-O2):
define void @Logging_lost_callback(i32 %0, i32 %1) {
ret void
}
void udev_selinux_exit(struct udev *udev) {}


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

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

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

LLVM IR (-O2):
%struct.udev = type opaque
define void @udev_selinux_exit(%struct.udev* nocapture %0) {
ret void
}
void adis16400_unconfigure_ring(struct iio_dev *indio_dev) {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
%struct.iio_dev = type opaque
define void @adis16400_unconfigure_ring(%struct.iio_dev* nocapture %0) {
ret void
}
void fatal(s1, s2) char *s1, *s2;
{
  nonfatal(s1, s2);
  exit(1);
}


x86 assembly (clang, -O0):
<fatal>:
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    $0x0,%al
call   1030 <nonfatal@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<fatal>:
push   %rax
xor    %eax,%eax
call   1030 <nonfatal@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @fatal(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 (i8*, i8*, ...) bitcast (i32 (...)* @nonfatal to i32 (i8*, i8*, ...)*)(i8* %5, i8* %6)
unreachable
}

LLVM IR (-O2):
define void @fatal(i8* %0, i8* %1) {
%3 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @nonfatal to i32 (i8*, i8*, ...)*)(i8* %0, i8* %1)
tail call void @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ isdigit(char);
int /*<<< orphan*/ printf(char *, char *);
int is_invalid_node_name(char *s) {
  if (s[0] != '-')
    return 0;
  if (!isdigit(s[1]))
    return 0;
  printf("Error: bad node name \"%s\"\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<is_invalid_node_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
je     1148 <is_invalid_node_name+0x28>
movl   $0x0,-0x4(%rbp)
jmp    1181 <is_invalid_node_name+0x61>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%eax
jne    116a <is_invalid_node_name+0x4a>
movl   $0x0,-0x4(%rbp)
jmp    1181 <is_invalid_node_name+0x61>
mov    -0x10(%rbp),%rsi
lea    0xe8b(%rip),%rdi
call   1040 <printf@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_invalid_node_name>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
cmpb   $0x2d,(%rdi)
jne    114e <is_invalid_node_name+0x2e>
mov    %rdi,%rbx
movsbl 0x1(%rdi),%edi
call   1030 <isdigit@plt>
test   %eax,%eax
je     114e <is_invalid_node_name+0x2e>
lea    0xebf(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    $0x1,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [27 x i8] c"Error: bad node name \22%s\22\0A\00"
define i32 @is_invalid_node_name(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 45
br i1 %3, label %4, label %11
4: ; preds = %1
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = tail call i32 @isdigit(i8 signext %6)
%8 = icmp eq i32 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %4
%10 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %11
11: ; preds = %4, %1, %9
%12 = phi i32 [ 1, %9 ], [ 0, %1 ], [ 0, %4 ]
ret i32 %12
}
void logsend(int s, unsigned short n) {}


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

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

LLVM IR (-O0):
define void @logsend(i32 %0, i16 zeroext %1) {
%3 = alloca i32
%4 = alloca i16
store i32 %0, i32* %3
store i16 %1, i16* %4
ret void
}

LLVM IR (-O2):
define void @logsend(i32 %0, i16 zeroext %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
scalar_t__ __rdrand64(int /*<<< orphan*/ *);
void rdrand64(uint64_t *val) {
  while (__rdrand64(val) == 0)
    ;
}


x86 assembly (clang, -O0):
<rdrand64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <__rdrand64@plt>
cmp    $0x0,%rax
jne    1134 <rdrand64+0x24>
jmp    111c <rdrand64+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rdrand64>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
call   1030 <__rdrand64@plt>
test   %rax,%rax
je     1120 <rdrand64+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @rdrand64(i32* %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i64 @__rdrand64(i32* %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %2, label %5
5: ; preds = %2
ret void
}
/* Type definitions */
struct timespec {
  int tv_sec;
  scalar_t__ tv_nsec;
};

/* Variables and functions */
int nanosleep(struct timespec *, struct timespec *);
void sleeper(int sec) {
  struct timespec req;
  struct timespec rem;
  req.tv_sec = sec;
  req.tv_nsec = 0;
  int r = -1;
  while (r) {
    r = nanosleep(&req, &rem);
    req = rem;
  }
}


x86 assembly (clang, -O0):
<sleeper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
movq   $0x0,-0x10(%rbp)
movl   $0xffffffff,-0x2c(%rbp)
cmpl   $0x0,-0x2c(%rbp)
je     115f <sleeper+0x4f>
lea    -0x18(%rbp),%rdi
lea    -0x28(%rbp),%rsi
call   1030 <nanosleep@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1130 <sleeper+0x20>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sleeper>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %edi,(%rsp)
movq   $0x0,0x8(%rsp)
mov    %rsp,%r14
lea    0x18(%rsp),%rbx
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <nanosleep@plt>
movups 0x18(%rsp),%xmm0
movaps %xmm0,(%rsp)
test   %eax,%eax
jne    1130 <sleeper+0x20>
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
%struct.timespec = type { i32, i64 }
define void @sleeper(i32 %0) {
%2 = alloca %struct.timespec
%3 = alloca %struct.timespec
%4 = bitcast %struct.timespec* %2 to i8*
%5 = bitcast %struct.timespec* %3 to i8*
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 0
store i32 %0, i32* %6
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 1
store i64 0, i64* %7
br label %8
8: ; preds = %1, %8
%9 = call i32 @nanosleep(%struct.timespec* %2, %struct.timespec* %3)
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %8
11: ; preds = %8
ret void
}
int arrays(char (*a)[5], char (*b)[10], char (*c)[5]) {
  int d = (a == c);
  return a == b;
}


x86 assembly (clang, -O0):
<arrays>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x18(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<arrays>:
xor    %eax,%eax
cmp    %rdi,%rsi
sete   %al
ret

LLVM IR (-O0):
define i32 @arrays([5 x i8]* %0, [10 x i8]* %1, [5 x i8]* %2) {
%4 = alloca [5 x i8]*
%5 = alloca [10 x i8]*
%6 = alloca [5 x i8]*
%7 = alloca i32
store [5 x i8]* %0, [5 x i8]** %4
store [10 x i8]* %1, [10 x i8]** %5
store [5 x i8]* %2, [5 x i8]** %6
%8 = load [5 x i8]*, [5 x i8]** %4
%9 = load [5 x i8]*, [5 x i8]** %6
%10 = icmp eq [5 x i8]* %8, %9
%11 = zext i1 %10 to i32
store i32 %11, i32* %7
%12 = load [5 x i8]*, [5 x i8]** %4
%13 = load [10 x i8]*, [10 x i8]** %5
%14 = bitcast [10 x i8]* %13 to [5 x i8]*
%15 = icmp eq [5 x i8]* %12, %14
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @arrays([5 x i8]* readnone %0, [10 x i8]* readnone %1, [5 x i8]* nocapture readnone %2) {
%4 = bitcast [10 x i8]* %1 to [5 x i8]*
%5 = icmp eq [5 x i8]* %4, %0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ int80(int, int, char *, int, int /*<<< orphan*/,
                         int /*<<< orphan*/);
void read(int fd, char *buffer, int size) { int80(3, fd, buffer, size, 0, 0); }


x86 assembly (clang, -O0):
<read>:
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
mov    $0x3,%edi
xor    %r9d,%r9d
mov    %r9d,%r8d
call   1030 <int80@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read>:
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %edi,%esi
mov    $0x3,%edi
xor    %r8d,%r8d
xor    %r9d,%r9d
jmp    1030 <int80@plt>

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

LLVM IR (-O2):
define void @read(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @int80(i32 3, i32 %0, i8* %1, i32 %2, i32 0, i32 0)
ret void
}
unsigned ilog10(unsigned long ul) {
  int n = 0;
  while (ul > 0) {
    n++;
    ul /= 10;
  }
  return n;
}


x86 assembly (clang, -O0):
<ilog10>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
jbe    113a <ilog10+0x3a>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    $0xa,%ecx
xor    %edx,%edx
div    %rcx
mov    %rax,-0x8(%rbp)
jmp    110f <ilog10+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ilog10>:
xor    %ecx,%ecx
test   %rdi,%rdi
je     1136 <ilog10+0x36>
movabs $0xcccccccccccccccd,%rsi
cc cc cc
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%ecx
mov    %rdi,%rax
mul    %rsi
shr    $0x3,%rdx
cmp    $0x9,%rdi
mov    %rdx,%rdi
ja     1120 <ilog10+0x20>
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @ilog10(i64 %0) {
%2 = alloca i64
%3 = alloca i32
store i64 %0, i64* %2
store i32 0, i32* %3
br label %4
4: ; preds = %7, %1
%5 = load i64, i64* %2
%6 = icmp ugt i64 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %4
%8 = load i32, i32* %3
%9 = add nsw i32 %8, 1
store i32 %9, i32* %3
%10 = load i64, i64* %2
%11 = udiv i64 %10, 10
store i64 %11, i64* %2
br label %4
12: ; preds = %4
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @ilog10(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = phi i64 [ %7, %3 ], [ %0, %1 ]
%6 = add nuw nsw i32 %4, 1
%7 = udiv i64 %5, 10
%8 = icmp ult i64 %5, 10
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %10
}
void mlm_set_pool(int level) {}


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

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

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

LLVM IR (-O2):
define void @mlm_set_pool(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_second_greetings();
void print_greetings(void) { print_second_greetings(); }


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

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

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

LLVM IR (-O2):
define void @print_greetings() {
%1 = tail call i32 (...) @print_second_greetings()
ret void
}
/* Variables and functions */
int putchar(int);
int outc(int c) { return putchar(c); }


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

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

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

LLVM IR (-O2):
define i32 @outc(i32 %0) {
%2 = tail call i32 @putchar(i32 %0)
ret i32 %2
}
int brain_avg_liberties(void) {
  int value;
  value = 0;
  return value;
}


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

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

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

LLVM IR (-O2):
define i32 @brain_avg_liberties() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fmin(double, double);
int /*<<< orphan*/ fminf(float, float);
int /*<<< orphan*/ fminl(long double, long double);
void uninitvar_fmin(void) {
  float f1, f2;
  (void)fminf(f1, f2);
  double d1, d2;
  (void)fmin(d1, d2);
  long double ld1, ld2;
  (void)fminl(ld1, ld2);
}


x86 assembly (clang, -O0):
<uninitvar_fmin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1040 <fminf@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
call   1050 <fmin@plt>
fldt   -0x30(%rbp)
fldt   -0x40(%rbp)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
call   1030 <fminl@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uninitvar_fmin>:
sub    $0x28,%rsp
call   1040 <fminf@plt>
call   1050 <fmin@plt>
call   1030 <fminl@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
define void @uninitvar_fmin() {
%1 = alloca float
%2 = alloca float
%3 = alloca double
%4 = alloca double
%5 = alloca x86_fp80
%6 = alloca x86_fp80
%7 = load float, float* %1
%8 = load float, float* %2
%9 = call i32 @fminf(float %7, float %8)
%10 = load double, double* %3
%11 = load double, double* %4
%12 = call i32 @fmin(double %10, double %11)
%13 = load x86_fp80, x86_fp80* %5
%14 = load x86_fp80, x86_fp80* %6
%15 = call i32 @fminl(x86_fp80 %13, x86_fp80 %14)
ret void
}

LLVM IR (-O2):
define void @uninitvar_fmin() {
%1 = tail call i32 @fminf(float undef, float undef)
%2 = tail call i32 @fmin(double undef, double undef)
%3 = tail call i32 @fminl(x86_fp80 undef, x86_fp80 undef)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ str_rev(char *);
int main() {
  char str[] = "Please reverse this string!";
  printf("%s\n", str);
  str_rev(str);
  printf("%s\n", str);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec4(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xec2(%rip),%eax
mov    %eax,-0x8(%rbp)
lea    -0x20(%rbp),%rsi
lea    0xeb8(%rip),%rdi
call   1040 <printf@plt>
lea    -0x20(%rbp),%rdi
call   1030 <str_rev@plt>
lea    -0x20(%rbp),%rsi
lea    0xe9f(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x28,%rsp
movups 0xede(%rip),%xmm0
movups %xmm0,0xc(%rsp)
movaps 0xec6(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xed7(%rip),%r14
mov    %rsp,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <str_rev@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.str = [28 x i8] c"Please reverse this string!\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [28 x i8]
store i32 0, i32* %1
%3 = bitcast [28 x i8]* %2 to i8*
%4 = getelementptr inbounds [28 x i8], [28 x i8]* %2, i64 0, i64 0
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = getelementptr inbounds [28 x i8], [28 x i8]* %2, i64 0, i64 0
%7 = call i32 @str_rev(i8* %6)
%8 = getelementptr inbounds [28 x i8], [28 x i8]* %2, i64 0, i64 0
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %8)
ret i32 0
}

LLVM IR (-O2):
@__const.main.str = [28 x i8] c"Please reverse this string!\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [28 x i8]
%2 = getelementptr inbounds [28 x i8], [28 x i8]* %1, i64 0, i64 0
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @str_rev(i8* %2)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Type definitions */
struct parser_ctx_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ PRINTFUNC();
scalar_t__ parser_expression(struct parser_ctx_t *);
scalar_t__ parser_other_expressions(struct parser_ctx_t *);
int parser_expressions(struct parser_ctx_t *ctx) {
  PRINTFUNC();
  if (parser_expression(ctx))
    return -1;
  if (parser_other_expressions(ctx))
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<parser_expressions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <PRINTFUNC@plt>
mov    -0x10(%rbp),%rdi
call   1040 <parser_expression@plt>
cmp    $0x0,%rax
je     1162 <parser_expressions+0x32>
movl   $0xffffffff,-0x4(%rbp)
jmp    1188 <parser_expressions+0x58>
mov    -0x10(%rbp),%rdi
call   1030 <parser_other_expressions@plt>
cmp    $0x0,%rax
je     1181 <parser_expressions+0x51>
movl   $0xffffffff,-0x4(%rbp)
jmp    1188 <parser_expressions+0x58>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parser_expressions>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1050 <PRINTFUNC@plt>
mov    %rbx,%rdi
call   1040 <parser_expression@plt>
mov    %rax,%rcx
mov    $0xffffffff,%eax
test   %rcx,%rcx
je     1152 <parser_expressions+0x22>
pop    %rbx
ret
mov    %rbx,%rdi
call   1030 <parser_other_expressions@plt>
neg    %rax
sbb    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.parser_ctx_t = type { i32 }
define i32 @parser_expressions(%struct.parser_ctx_t* %0) {
%2 = alloca i32
%3 = alloca %struct.parser_ctx_t*
store %struct.parser_ctx_t* %0, %struct.parser_ctx_t** %3
%4 = call i32 (...) @PRINTFUNC()
%5 = load %struct.parser_ctx_t*, %struct.parser_ctx_t** %3
%6 = call i64 @parser_expression(%struct.parser_ctx_t* %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 -1, i32* %2
br label %15
9: ; preds = %1
%10 = load %struct.parser_ctx_t*, %struct.parser_ctx_t** %3
%11 = call i64 @parser_other_expressions(%struct.parser_ctx_t* %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %9
store i32 -1, i32* %2
br label %15
14: ; preds = %9
store i32 0, i32* %2
br label %15
15: ; preds = %14, %13, %8
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
%struct.parser_ctx_t = type { i32 }
define i32 @parser_expressions(%struct.parser_ctx_t* %0) {
%2 = tail call i32 (...) @PRINTFUNC()
%3 = tail call i64 @parser_expression(%struct.parser_ctx_t* %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = tail call i64 @parser_other_expressions(%struct.parser_ctx_t* %0)
%7 = icmp ne i64 %6, 0
%8 = sext i1 %7 to i32
br label %9
9: ; preds = %5, %1
%10 = phi i32 [ -1, %1 ], [ %8, %5 ]
ret i32 %10
}
void handle_35(int sig) {}


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

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

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

LLVM IR (-O2):
define void @handle_35(i32 %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ nasm_write(int /*<<< orphan*/ *, int, int /*<<< orphan*/ *);
void fwriteaddr(uint64_t data, int size, FILE *fp) {
  nasm_write(&data, size, fp);
}


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

x86 assembly (clang, -O2):
<fwriteaddr>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <nasm_write@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @fwriteaddr(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* %5
%8 = load i32*, i32** %6
%9 = call i32 @nasm_write(i32* %4, i32 %7, i32* %8)
ret void
}

LLVM IR (-O2):
define void @fwriteaddr(i32 %0, i32 %1, i32* %2) {
%4 = alloca i32
store i32 %0, i32* %4
%5 = call i32 @nasm_write(i32* %4, i32 %1, i32* %2)
ret void
}
void divide_mv(int a, int b, int *quotient_p, int *remainder_p) {
  *quotient_p = a / b;
  *remainder_p = a % b;
}


x86 assembly (clang, -O0):
<divide_mv>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    -0x18(%rbp),%rax
mov    %edx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<divide_mv>:
mov    %rdx,%r8
mov    %edi,%eax
cltd
idiv   %esi
mov    %eax,(%r8)
mov    %edx,(%rcx)
ret

LLVM IR (-O0):
define void @divide_mv(i32 %0, i32 %1, i32* %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = sdiv i32 %9, %10
%12 = load i32*, i32** %7
store i32 %11, i32* %12
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = srem i32 %13, %14
%16 = load i32*, i32** %8
store i32 %15, i32* %16
ret void
}

LLVM IR (-O2):
define void @divide_mv(i32 %0, i32 %1, i32* nocapture writeonly %2, i32* nocapture writeonly %3) {
%5 = sdiv i32 %0, %1
store i32 %5, i32* %2
%6 = srem i32 %0, %1
store i32 %6, i32* %3
ret void
}
/* Variables and functions */
int __READINT();
int /*<<< orphan*/ __WRITEINT(int);
int fact(int);
int main() {
  int m, result;
  m = __READINT();
  if (m > 1)
    result = fact(m);
  else
    result = 1;
  __WRITEINT(result);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__READINT@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    1163 <main+0x33>
mov    -0x8(%rbp),%edi
call   1050 <fact@plt>
mov    %eax,-0xc(%rbp)
jmp    116a <main+0x3a>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <__WRITEINT@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__READINT@plt>
mov    $0x1,%edi
cmp    $0x2,%eax
jl     114b <main+0x1b>
mov    %eax,%edi
call   1050 <fact@plt>
mov    %eax,%edi
call   1040 <__WRITEINT@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (...) @__READINT()
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = icmp sgt i32 %5, 1
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = load i32, i32* %2
%9 = call i32 @fact(i32 %8)
store i32 %9, i32* %3
br label %11
10: ; preds = %0
store i32 1, i32* %3
br label %11
11: ; preds = %10, %7
%12 = load i32, i32* %3
%13 = call i32 @__WRITEINT(i32 %12)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__READINT()
%2 = icmp sgt i32 %1, 1
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @fact(i32 %1)
br label %5
5: ; preds = %0, %3
%6 = phi i32 [ %4, %3 ], [ 1, %0 ]
%7 = tail call i32 @__WRITEINT(i32 %6)
ret i32 0
}
short test_73_2(short *mem) { return __atomic_nand_fetch(mem + 4, -1, 4); }


x86 assembly (clang, -O0):
<test_73_2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x18(%rbp)
movw   $0xffff,-0xa(%rbp)
mov    -0xa(%rbp),%cx
mov    %cx,-0x10(%rbp)
mov    0x8(%rax),%ax
mov    %ax,-0xe(%rbp)
mov    -0xe(%rbp),%ax
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%dx
mov    %dx,%si
mov    %ax,%dx
mov    %edx,-0x28(%rbp)
and    %esi,%edx
mov    %edx,-0x24(%rbp)
not    %edx
mov    %edx,-0x20(%rbp)
lock cmpxchg %dx,(%rcx)
sete   %cl
mov    %ax,-0x1a(%rbp)
test   $0x1,%cl
mov    %ax,-0xe(%rbp)
jne    116a <test_73_2+0x6a>
jmp    112d <test_73_2+0x2d>
mov    -0x10(%rbp),%cx
mov    -0x1a(%rbp),%ax
and    %cx,%ax
xor    $0xffff,%ax
mov    %ax,-0xc(%rbp)
movswl -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_73_2>:
movzwl 0x8(%rdi),%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %eax,%ecx
not    %ecx
lock cmpxchg %cx,0x8(%rdi)
jne    1110 <test_73_2+0x10>
not    %eax
ret

LLVM IR (-O0):
define signext i16 @test_73_2(i16* %0) {
%2 = alloca i16*
%3 = alloca i16
%4 = alloca i16
store i16* %0, i16** %2
%5 = load i16*, i16** %2
%6 = getelementptr inbounds i16, i16* %5, i64 4
store i16 -1, i16* %3
%7 = load i16, i16* %3
%8 = atomicrmw nand i16* %6, i16 %7 acq_rel
%9 = and i16 %8, %7
%10 = xor i16 %9, -1
store i16 %10, i16* %4
%11 = load i16, i16* %4
ret i16 %11
}

LLVM IR (-O2):
define signext i16 @test_73_2(i16* nocapture %0) {
%2 = getelementptr inbounds i16, i16* %0, i64 4
%3 = atomicrmw nand i16* %2, i16 -1 acq_rel
%4 = xor i16 %3, -1
ret i16 %4
}
/* Variables and functions */
int /*<<< orphan*/ writer();
void *prod(void *data) {
  writer();
  return 0;
}


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

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

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

LLVM IR (-O2):
define noalias i8* @prod(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @writer()
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ decrypt(char *);
int main() { decrypt("8.txt"); }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"8.txt\00"
define i32 @main() {
%1 = call i32 @decrypt(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"8.txt\00"
define i32 @main() {
%1 = tail call i32 @decrypt(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int fd(void *fp __attribute__((unused))) {}


x86 assembly (clang, -O0):
<fd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @fd(i8* nocapture readnone %0) {
ret i32 undef
}
int nodecmp(void *a, void *b) {
  if (a == b)
    return 0;
  else if (a < b)
    return -1;
  else {
    return 1;
  }
}


x86 assembly (clang, -O0):
<nodecmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jne    1126 <nodecmp+0x26>
movl   $0x0,-0x4(%rbp)
jmp    1147 <nodecmp+0x47>
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    1140 <nodecmp+0x40>
movl   $0xffffffff,-0x4(%rbp)
jmp    1147 <nodecmp+0x47>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nodecmp>:
xor    %ecx,%ecx
xor    %eax,%eax
cmp    %rsi,%rdi
setae  %al
lea    -0x1(%rax,%rax,1),%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @nodecmp(i8* readnone %0, i8* readnone %1) {
%3 = icmp eq i8* %0, %1
%4 = icmp ult i8* %0, %1
%5 = select i1 %4, i32 -1, i32 1
%6 = select i1 %3, i32 0, i32 %5
ret i32 %6
}
void table_init(int *table) {
  int i;
  for (i = 0; i < 16; i++)
    table[i] = i + 1;
}


x86 assembly (clang, -O0):
<table_init>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x10,-0xc(%rbp)
jge    1138 <table_init+0x38>
mov    -0xc(%rbp),%edx
add    $0x1,%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <table_init+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<table_init>:
movaps 0xef9(%rip),%xmm0
movups %xmm0,(%rdi)
movaps 0xeff(%rip),%xmm0
movups %xmm0,0x10(%rdi)
movaps 0xf04(%rip),%xmm0
movups %xmm0,0x20(%rdi)
movaps 0xf09(%rip),%xmm0
movups %xmm0,0x30(%rdi)
ret

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

LLVM IR (-O2):
define void @table_init(i32* nocapture writeonly %0) {
%2 = bitcast i32* %0 to <4 x i32>*
store <4 x i32> <i32 1, i32 2, i32 3, i32 4>, <4 x i32>* %2
%3 = getelementptr inbounds i32, i32* %0, i64 4
%4 = bitcast i32* %3 to <4 x i32>*
store <4 x i32> <i32 5, i32 6, i32 7, i32 8>, <4 x i32>* %4
%5 = getelementptr inbounds i32, i32* %0, i64 8
%6 = bitcast i32* %5 to <4 x i32>*
store <4 x i32> <i32 9, i32 10, i32 11, i32 12>, <4 x i32>* %6
%7 = getelementptr inbounds i32, i32* %0, i64 12
%8 = bitcast i32* %7 to <4 x i32>*
store <4 x i32> <i32 13, i32 14, i32 15, i32 16>, <4 x i32>* %8
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ radio_set_scan_rsp_data(int /*<<< orphan*/,
                                           int /*<<< orphan*/ *);
void ll_set_scan_rsp_data(uint8_t len, uint8_t *data_ptr) {
  radio_set_scan_rsp_data(len, data_ptr);
}


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

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

LLVM IR (-O0):
define void @ll_set_scan_rsp_data(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 @radio_set_scan_rsp_data(i32 %5, i32* %6)
ret void
}

LLVM IR (-O2):
define void @ll_set_scan_rsp_data(i32 %0, i32* %1) {
%3 = tail call i32 @radio_set_scan_rsp_data(i32 %0, i32* %1)
ret void
}
/* Type definitions */
struct lifo {
  int dummy;
};

/* Variables and functions */
double hypot(double, double);
double pop(struct lifo *);
double opr_hypot(struct lifo *stack) {
  double op1, op2;
  op1 = pop(stack);
  op2 = pop(stack);
  return hypot(op2, op1);
}


x86 assembly (clang, -O0):
<opr_hypot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <pop@plt>
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <pop@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1040 <hypot@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<opr_hypot>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
call   1030 <pop@plt>
movsd  %xmm0,0x8(%rsp)
mov    %rbx,%rdi
call   1030 <pop@plt>
movsd  0x8(%rsp),%xmm1
add    $0x10,%rsp
pop    %rbx
jmp    1040 <hypot@plt>

LLVM IR (-O0):
%struct.lifo = type { i32 }
define double @opr_hypot(%struct.lifo* %0) {
%2 = alloca %struct.lifo*
%3 = alloca double
%4 = alloca double
store %struct.lifo* %0, %struct.lifo** %2
%5 = load %struct.lifo*, %struct.lifo** %2
%6 = call double @pop(%struct.lifo* %5)
store double %6, double* %3
%7 = load %struct.lifo*, %struct.lifo** %2
%8 = call double @pop(%struct.lifo* %7)
store double %8, double* %4
%9 = load double, double* %4
%10 = load double, double* %3
%11 = call double @hypot(double %9, double %10)
ret double %11
}

LLVM IR (-O2):
%struct.lifo = type { i32 }
define double @opr_hypot(%struct.lifo* %0) {
%2 = tail call double @pop(%struct.lifo* %0)
%3 = tail call double @pop(%struct.lifo* %0)
%4 = tail call double @hypot(double %3, double %2)
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ fputc(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ puts(char const *);
int /*<<< orphan*/ stdout;
void put_filename(const char *filename, bool null_terminate) {
  if (null_terminate) {
    fputs(filename, stdout);
    fputc(0, stdout);
  } else {
    puts(filename);
  }
}


x86 assembly (clang, -O0):
<put_filename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1170 <put_filename+0x40>
mov    -0x8(%rbp),%rdi
mov    0x2e8c(%rip),%rax
mov    (%rax),%esi
call   1040 <fputs@plt>
mov    0x2e7e(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
call   1050 <fputc@plt>
jmp    1179 <put_filename+0x49>
mov    -0x8(%rbp),%rdi
call   1030 <puts@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<put_filename>:
test   %esi,%esi
je     114d <put_filename+0x1d>
push   %rbx
mov    0x2ea4(%rip),%rbx
mov    (%rbx),%esi
call   1040 <fputs@plt>
mov    (%rbx),%esi
xor    %edi,%edi
pop    %rbx
jmp    1050 <fputc@plt>
jmp    1030 <puts@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @put_filename(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = load i32, i32* @stdout
%10 = call i32 @fputs(i8* %8, i32 %9)
%11 = load i32, i32* @stdout
%12 = call i32 @fputc(i32 0, i32 %11)
br label %16
13: ; preds = %2
%14 = load i8*, i8** %3
%15 = call i32 @puts(i8* %14)
br label %16
16: ; preds = %13, %7
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @put_filename(i8* %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2
%5 = load i32, i32* @stdout
%6 = tail call i32 @fputs(i8* %0, i32 %5)
%7 = load i32, i32* @stdout
%8 = tail call i32 @fputc(i32 0, i32 %7)
br label %11
9: ; preds = %2
%10 = tail call i32 @puts(i8* dereferenceable(1) %0)
br label %11
11: ; preds = %9, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dist2(double, double, double, double, double, double);
double sqrt(int /*<<< orphan*/);
double dist(double x, double y, double z, double x2, double y2, double z2) {
  return sqrt(dist2(x, y, z, x2, y2, z2));
}


x86 assembly (clang, -O0):
<dist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
movsd  -0x28(%rbp),%xmm4
movsd  -0x30(%rbp),%xmm5
call   1030 <dist2@plt>
mov    %eax,%edi
call   1040 <sqrt@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dist>:
push   %rax
call   1030 <dist2@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <sqrt@plt>

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

LLVM IR (-O2):
define double @dist(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = tail call i32 @dist2(double %0, double %1, double %2, double %3, double %4, double %5)
%8 = tail call double @sqrt(i32 %7)
ret double %8
}
/* Variables and functions */
char shft_b(char *, char *);
signed char intr_wrap_552(signed char p1, signed char p2) {
  return shft_b(&p1, &p2);
}


x86 assembly (clang, -O0):
<intr_wrap_552>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
lea    -0x1(%rbp),%rdi
lea    -0x2(%rbp),%rsi
call   1030 <shft_b@plt>
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intr_wrap_552>:
push   %rax
mov    %dil,0x7(%rsp)
mov    %sil,0x6(%rsp)
lea    0x7(%rsp),%rdi
lea    0x6(%rsp),%rsi
call   1030 <shft_b@plt>
pop    %rcx
ret

LLVM IR (-O0):
define signext i8 @intr_wrap_552(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = call signext i8 @shft_b(i8* %3, i8* %4)
ret i8 %5
}

LLVM IR (-O2):
define signext i8 @intr_wrap_552(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = call signext i8 @shft_b(i8* %3, i8* %4)
ret i8 %5
}
void x64_begarg(int i, unsigned tar, unsigned arg1, unsigned arg2) {}


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

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

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

LLVM IR (-O2):
define void @x64_begarg(i32 %0, i32 %1, i32 %2, i32 %3) {
ret void
}
int islower(int c) { return (unsigned int)c - 'a' < 26; }


x86 assembly (clang, -O0):
<islower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x61,%eax
cmp    $0x1a,%eax
setb   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<islower>:
add    $0xffffff9f,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @islower(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub i32 %3, 97
%5 = icmp ult i32 %4, 26
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @islower(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
__attribute__((always_)) void XRayInit(int stack_size, int buffer_size,
                                       int frame_count,
                                       const char *mapfilename) {
  ;
}


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

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

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

LLVM IR (-O2):
define void @XRayInit(i32 %0, i32 %1, i32 %2, i8* nocapture %3) {
ret void
}
void dtm_turn_off_test() {}


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

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

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

LLVM IR (-O2):
define void @dtm_turn_off_test() {
ret void
}
int muspcm_unload(int slot) { return (-1); }


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

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

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

LLVM IR (-O2):
define i32 @muspcm_unload(i32 %0) {
ret i32 -1
}