xunge/DecIR huggingface dataset:
int main(int argc, char **argv) {
  volatile int (*fp)();
  char buffer[64];
  fp = 0;
  gets(buffer);
  if (fp) {
    printf("calling function pointer, jumping to 0x%08x\n", fp);
    fp();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
lea    -0x60(%rbp),%rdi
mov    $0x0,%al
call   1040 <gets@plt>
cmpq   $0x0,-0x18(%rbp)
je     116b <main+0x4b>
mov    -0x18(%rbp),%rsi
lea    0xea1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   *-0x18(%rbp)
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x48,%rsp
mov    %rsp,%rdi
xor    %eax,%eax
call   1030 <gets@plt>
xor    %eax,%eax
add    $0x48,%rsp
ret

LLVM IR (-O0):
@.str = [45 x i8] c"calling function pointer, jumping to 0x%08x\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32 (...)*
%7 = alloca [64 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 (...)* null, i32 (...)** %6
%8 = getelementptr inbounds [64 x i8], [64 x i8]* %7, i64 0, i64 0
%9 = call i32 (i8*, ...) bitcast (i32 (...)* @gets to i32 (i8*, ...)*)(i8* %8)
%10 = load i32 (...)*, i32 (...)** %6
%11 = icmp ne i32 (...)* %10, null
br i1 %11, label %12, label %17
12: ; preds = %2
%13 = load i32 (...)*, i32 (...)** %6
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 (...)* %13)
%15 = load i32 (...)*, i32 (...)** %6
%16 = call i32 (...) %15()
br label %17
17: ; preds = %12, %2
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [64 x i8]
%4 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @gets to i32 (i8*, ...)*)(i8* %4)
ret i32 0
}
void setst(unsigned short bits, char *chars) {}


x86 assembly (clang, -O0):
<setst>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @setst(i16 zeroext %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
bool nrf52_errata_115(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf52_errata_115() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ foold(long double *);
void testlongdouble() {
  long double ld = 2.0;
  foold(&ld);
}


x86 assembly (clang, -O0):
<testlongdouble>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
flds   0xee2(%rip)
fstpt  -0x10(%rbp)
lea    -0x10(%rbp),%rdi
call   1030 <foold@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testlongdouble>:
sub    $0x18,%rsp
flds   0xee6(%rip)
fstpt  (%rsp)
mov    %rsp,%rdi
call   1030 <foold@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @testlongdouble() {
%1 = alloca x86_fp80
store x86_fp80 0xK40008000000000000000, x86_fp80* %1
%2 = call i32 @foold(x86_fp80* %1)
ret void
}

LLVM IR (-O2):
define void @testlongdouble() {
%1 = alloca x86_fp80
%2 = bitcast x86_fp80* %1 to i8*
store x86_fp80 0xK40008000000000000000, x86_fp80* %1
%3 = call i32 @foold(x86_fp80* %1)
ret void
}
/* Type definitions */
struct timespec {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_MONOTONIC;
int /*<<< orphan*/ abort();
scalar_t__ clock_gettime(int /*<<< orphan*/, struct timespec *);
int /*<<< orphan*/ perror(char *);
void monotonic_time(struct timespec *ts) {
  if (clock_gettime(CLOCK_MONOTONIC, ts) != 0) {
    perror("clock_gettime failed");
    abort();
  }
}


x86 assembly (clang, -O0):
<monotonic_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
call   1040 <clock_gettime@plt>
cmp    $0x0,%rax
je     116b <monotonic_time+0x3b>
lea    0xea1(%rip),%rdi
call   1050 <perror@plt>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<monotonic_time>:
push   %rax
mov    %rdi,%rsi
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
call   1040 <clock_gettime@plt>
test   %rax,%rax
jne    1149 <monotonic_time+0x19>
pop    %rax
ret
lea    0xeb0(%rip),%rdi
call   1050 <perror@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
%struct.timespec = type { i32 }
@CLOCK_MONOTONIC = global i32 0
@.str = [21 x i8] c"clock_gettime failed\00"
define void @monotonic_time(%struct.timespec* %0) {
%2 = alloca %struct.timespec*
store %struct.timespec* %0, %struct.timespec** %2
%3 = load i32, i32* @CLOCK_MONOTONIC
%4 = load %struct.timespec*, %struct.timespec** %2
%5 = call i64 @clock_gettime(i32 %3, %struct.timespec* %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = call i32 @perror(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%9 = call i32 (...) @abort()
unreachable
10: ; preds = %1
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
@CLOCK_MONOTONIC = global i32 0
@.str = [21 x i8] c"clock_gettime failed\00"
define void @monotonic_time(%struct.timespec* %0) {
%2 = load i32, i32* @CLOCK_MONOTONIC
%3 = tail call i64 @clock_gettime(i32 %2, %struct.timespec* %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = tail call i32 @perror(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 (...) @abort()
unreachable
8: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ft_putendl(char *);
void interrupt_cmd(int s) {
  (void)s;
  ft_putendl("");
}


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

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

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define void @interrupt_cmd(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @ft_putendl(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define void @interrupt_cmd(i32 %0) {
%2 = tail call i32 @ft_putendl(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef char *uint64_t;

/* Variables and functions */
uint64_t ROL64_54(uint64_t x) {
  __asm__("rolq $54, %0" : "=r"(x) : "0"(x));
  return x;
}


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

x86 assembly (clang, -O2):
<ROL64_54>:
mov    %rdi,%rax
rol    $0x36,%rax
ret

LLVM IR (-O0):
define i8* @ROL64_54(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* asm "rolq $$54, $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i8* %3)
store i8* %4, i8** %2
%5 = load i8*, i8** %2
ret i8* %5
}

LLVM IR (-O2):
define i8* @ROL64_54(i8* readnone %0) {
%2 = tail call i8* asm "rolq $$54, $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ line();
int /*<<< orphan*/ name(char const *);
int /*<<< orphan*/ space();
int /*<<< orphan*/ string(char *);
void log_cachedns(const char *control, const char *ns) {
  string("     cc ns ");
  name(control);
  space();
  name(ns);
  line();
}


x86 assembly (clang, -O0):
<log_cachedns>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xea9(%rip),%rdi
call   1040 <string@plt>
mov    -0x8(%rbp),%rdi
call   1050 <name@plt>
mov    $0x0,%al
call   1030 <space@plt>
mov    -0x10(%rbp),%rdi
call   1050 <name@plt>
mov    $0x0,%al
call   1060 <line@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_cachedns>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xeaf(%rip),%rdi
call   1040 <string@plt>
mov    %rbx,%rdi
call   1050 <name@plt>
xor    %eax,%eax
call   1030 <space@plt>
mov    %r14,%rdi
call   1050 <name@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1060 <line@plt>

LLVM IR (-O0):
@.str = [12 x i8] c" cc ns \00"
define void @log_cachedns(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = call i32 @string(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%6 = load i8*, i8** %3
%7 = call i32 @name(i8* %6)
%8 = call i32 (...) @space()
%9 = load i8*, i8** %4
%10 = call i32 @name(i8* %9)
%11 = call i32 (...) @line()
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c" cc ns \00"
define void @log_cachedns(i8* %0, i8* %1) {
%3 = tail call i32 @string(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @name(i8* %0)
%5 = tail call i32 (...) @space()
%6 = tail call i32 @name(i8* %1)
%7 = tail call i32 (...) @line()
ret void
}
void test_32_0(char *mem) { __atomic_fetch_or(mem, 1, 4); }


x86 assembly (clang, -O0):
<test_32_0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movb   $0x1,-0x9(%rbp)
mov    -0x9(%rbp),%cl
mov    %cl,-0xc(%rbp)
mov    (%rax),%al
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%al
mov    -0x18(%rbp),%rcx
mov    -0xc(%rbp),%sil
mov    %al,%dl
or     %sil,%dl
lock cmpxchg %dl,(%rcx)
sete   %cl
mov    %al,-0x19(%rbp)
test   $0x1,%cl
mov    %al,-0xb(%rbp)
jne    114a <test_32_0+0x4a>
jmp    111f <test_32_0+0x1f>
mov    -0x19(%rbp),%al
mov    %al,-0xa(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_32_0>:
lock orb $0x1,(%rdi)
ret

LLVM IR (-O0):
define void @test_32_0(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
%4 = alloca i8
store i8* %0, i8** %2
%5 = load i8*, i8** %2
store i8 1, i8* %3
%6 = load i8, i8* %3
%7 = atomicrmw or i8* %5, i8 %6 acq_rel
store i8 %7, i8* %4
%8 = load i8, i8* %4
ret void
}

LLVM IR (-O2):
define void @test_32_0(i8* nocapture %0) {
%2 = atomicrmw or i8* %0, i8 1 acq_rel
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t MIPS32_J(void *address) {
  return (0x08000000 | (((uintptr_t)address >> 2) & 0x03FFFFFF));
}


x86 assembly (clang, -O0):
<MIPS32_J>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x2,%rax
and    $0x3ffffff,%rax
or     $0x8000000,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<MIPS32_J>:
shr    $0x2,%edi
and    $0x3ffffff,%edi
lea    0x8000000(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @MIPS32_J(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
%5 = lshr i64 %4, 2
%6 = and i64 %5, 67108863
%7 = or i64 134217728, %6
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @MIPS32_J(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
%4 = lshr i32 %3, 2
%5 = and i32 %4, 67108863
%6 = or i32 %5, 134217728
ret i32 %6
}
int __attribute__((no)) write_received(unsigned char packet_response) {
  return (packet_response & 0x1) && ((packet_response >> 1) & 0x7) == 0x2;
}


x86 assembly (clang, -O0):
<write_received>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%ecx
and    $0x1,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x2(%rbp)
je     1132 <write_received+0x32>
movzbl -0x1(%rbp),%eax
sar    $0x1,%eax
and    $0x7,%eax
cmp    $0x2,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_received>:
and    $0xf,%dil
xor    %eax,%eax
cmp    $0x5,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @write_received(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 1
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %1
%8 = load i8, i8* %2
%9 = zext i8 %8 to i32
%10 = ashr i32 %9, 1
%11 = and i32 %10, 7
%12 = icmp eq i32 %11, 2
br label %13
13: ; preds = %7, %1
%14 = phi i1 [ false, %1 ], [ %12, %7 ]
%15 = zext i1 %14 to i32
ret i32 %15
}

LLVM IR (-O2):
define i32 @write_received(i8 zeroext %0) {
%2 = and i8 %0, 15
%3 = icmp eq i8 %2, 5
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
struct index {
  int dummy;
};

/* Variables and functions */
struct index *index_external_create_with_opts(char const *, int);
struct index *index_external_create(const char *filename) {
  return index_external_create_with_opts(filename, 16384);
}


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

x86 assembly (clang, -O2):
<index_external_create>:
mov    $0x4000,%esi
jmp    1030 <index_external_create_with_opts@plt>

LLVM IR (-O0):
%struct.index = type { i32 }
define %struct.index* @index_external_create(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call %struct.index* @index_external_create_with_opts(i8* %3, i32 16384)
ret %struct.index* %4
}

LLVM IR (-O2):
%struct.index = type { i32 }
define %struct.index* @index_external_create(i8* %0) {
%2 = tail call %struct.index* @index_external_create_with_opts(i8* %0, i32 16384)
ret %struct.index* %2
}
/* Variables and functions */
scalar_t__ malloc(size_t);
scalar_t__ memcpy(char *, char const *, size_t);
int strlen(char const *);
char *str_dup(const char *s) {
  char *p;
  size_t n;
  n = strlen(s) + 1;
  p = (char *)malloc(n);
  if (p)
    p = (char *)memcpy(p, s, n);
  return p;
}


x86 assembly (clang, -O0):
<str_dup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x1,%eax
cltq
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     117b <str_dup+0x4b>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <memcpy@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_dup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <strlen@plt>
add    $0x1,%eax
movslq %eax,%rbx
mov    %rbx,%rdi
call   1050 <malloc@plt>
test   %rax,%rax
je     115f <str_dup+0x2f>
mov    %rax,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1040 <memcpy@plt>
jmp    1161 <str_dup+0x31>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @str_dup(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = sext i32 %3 to i64
%5 = tail call i64 @malloc(i64 %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %1
%8 = inttoptr i64 %5 to i8*
%9 = tail call i64 @memcpy(i8* %8, i8* %0, i64 %4)
%10 = inttoptr i64 %9 to i8*
br label %11
11: ; preds = %7, %1
%12 = phi i8* [ %10, %7 ], [ null, %1 ]
ret i8* %12
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void myfree(void *p) { free(p); }


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

x86 assembly (clang, -O2):
<myfree>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @myfree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t rot32l1(uint32_t x) { return (x << 1) | (x >> 31); }


x86 assembly (clang, -O0):
<rot32l1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    -0x4(%rbp),%ecx
sar    $0x1f,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rot32l1>:
lea    (%rdi,%rdi,1),%eax
sar    $0x1f,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @rot32l1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 1
%5 = load i32, i32* %2
%6 = ashr i32 %5, 31
%7 = or i32 %4, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @rot32l1(i32 %0) {
%2 = shl i32 %0, 1
%3 = ashr i32 %0, 31
%4 = or i32 %2, %3
ret i32 %4
}
/* Variables and functions */
scalar_t__ should_send_debug(int);
int simple_write(int, char const *);
int mputs(int fd, const char *str) {
  if (should_send_debug(fd)) {
    simple_write(fd, str);
    return simple_write(fd, "\r\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<mputs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <should_send_debug@plt>
cmp    $0x0,%rax
je     1164 <mputs+0x44>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <simple_write@plt>
mov    -0x8(%rbp),%edi
lea    0xea9(%rip),%rsi
call   1030 <simple_write@plt>
mov    %eax,-0x4(%rbp)
jmp    116b <mputs+0x4b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mputs>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %edi,%ebx
call   1040 <should_send_debug@plt>
test   %rax,%rax
je     1152 <mputs+0x32>
mov    %ebx,%edi
mov    %r14,%rsi
call   1030 <simple_write@plt>
lea    0xebc(%rip),%rsi
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <simple_write@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"\0D\0A\00"
define i32 @mputs(i32 %0, i8* %1) {
%3 = tail call i64 @should_send_debug(i32 %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @simple_write(i32 %0, i8* %1)
%7 = tail call i32 @simple_write(i32 %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %2, %5
%9 = phi i32 [ %7, %5 ], [ 0, %2 ]
ret i32 %9
}
void unlock(void) {}


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

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

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

LLVM IR (-O2):
define void @unlock() {
ret void
}
int is_world_regdom(const char *alpha2) {
  if (alpha2[0] == '0' && alpha2[1] == '0')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<is_world_regdom>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
jne    1135 <is_world_regdom+0x35>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x30,%eax
jne    1135 <is_world_regdom+0x35>
movl   $0x1,-0x4(%rbp)
jmp    113c <is_world_regdom+0x3c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_world_regdom>:
cmpb   $0x30,(%rdi)
jne    1110 <is_world_regdom+0x10>
mov    $0x1,%eax
cmpb   $0x30,0x1(%rdi)
je     1112 <is_world_regdom+0x12>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @is_world_regdom(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 eq i32 %7, 48
br i1 %8, label %9, label %16
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 48
br i1 %14, label %15, label %16
15: ; preds = %9
store i32 1, i32* %2
br label %17
16: ; preds = %9, %1
store i32 0, i32* %2
br label %17
17: ; preds = %16, %15
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @is_world_regdom(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 48
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 48
br i1 %7, label %9, label %8
8: ; preds = %4, %1
br label %9
9: ; preds = %4, %8
%10 = phi i32 [ 0, %8 ], [ 1, %4 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printArray(int *array, int length) {
  for (int i = 0; i < length; i++)
    printf("%d ", array[i]);
  printf("\n");
}


x86 assembly (clang, -O0):
<printArray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <printArray+0x49>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <printArray+0x16>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printArray>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <printArray+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <printArray+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @printArray(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %8
6: ; preds = %8, %2
%7 = tail call i32 @putchar(i32 10)
ret void
8: ; preds = %4, %8
%9 = phi i64 [ 0, %4 ], [ %13, %8 ]
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = add nuw nsw i64 %9, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %6, label %8
}
double poly2(x) {
  int i;
  double res = 1.0 / 100;
  for (i = 100 - 1; i > 0; i--)
    res = 1 / i + x * res;
  return res;
}


x86 assembly (clang, -O0):
<poly2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movsd  0xef1(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movl   $0x63,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1157 <poly2+0x57>
mov    $0x1,%eax
cltd
idivl  -0x8(%rbp)
cvtsi2sd %eax,%xmm1
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    111b <poly2+0x1b>
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<poly2>:
cvtsi2sd %edi,%xmm1
movsd  0xef4(%rip),%xmm0
mov    $0x64,%eax
movsd  0xeef(%rip),%xmm2
xorpd  %xmm4,%xmm4
jmp    1140 <poly2+0x40>
nop
mulsd  %xmm1,%xmm0
addsd  %xmm4,%xmm0
mulsd  %xmm1,%xmm0
addsd  %xmm4,%xmm0
mulsd  %xmm1,%xmm0
addsd  %xmm3,%xmm0
add    $0xfffffffd,%eax
cmp    $0x1,%eax
jbe    114f <poly2+0x4f>
movapd %xmm2,%xmm3
cmp    $0x4,%eax
je     1120 <poly2+0x20>
xorpd  %xmm3,%xmm3
jmp    1120 <poly2+0x20>
ret

LLVM IR (-O0):
define double @poly2(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
store i32 %0, i32* %2
store double 1.000000e-02, double* %4
store i32 99, i32* %3
br label %5
5: ; preds = %16, %1
%6 = load i32, i32* %3
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %19
8: ; preds = %5
%9 = load i32, i32* %3
%10 = sdiv i32 1, %9
%11 = sitofp i32 %10 to double
%12 = load i32, i32* %2
%13 = sitofp i32 %12 to double
%14 = load double, double* %4
%15 = call double @llvm.fmuladd.f64(double %13, double %14, double %11)
store double %15, double* %4
br label %16
16: ; preds = %8
%17 = load i32, i32* %3
%18 = add nsw i32 %17, -1
store i32 %18, i32* %3
br label %5
19: ; preds = %5
%20 = load double, double* %4
ret double %20
}

LLVM IR (-O2):
define double @poly2(i32 %0) {
%2 = sitofp i32 %0 to double
br label %3
3: ; preds = %3, %1
%4 = phi double [ 1.000000e-02, %1 ], [ %11, %3 ]
%5 = phi i32 [ 99, %1 ], [ %12, %3 ]
%6 = tail call double @llvm.fmuladd.f64(double %2, double %4, double 0.000000e+00)
%7 = tail call double @llvm.fmuladd.f64(double %2, double %6, double 0.000000e+00)
%8 = add nsw i32 %5, -2
%9 = icmp eq i32 %8, 1
%10 = uitofp i1 %9 to double
%11 = tail call double @llvm.fmuladd.f64(double %2, double %7, double %10)
%12 = add nsw i32 %5, -3
%13 = icmp ugt i32 %8, 1
br i1 %13, label %3, label %14
14: ; preds = %3
ret double %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void _print_vet(int *vet, int size) {
  int i;
  for (i = 0; i < size; i++)
    printf("%d\n", vet[i]);
  return;
}


x86 assembly (clang, -O0):
<_print_vet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1157 <_print_vet+0x47>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <_print_vet+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_print_vet>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1145 <_print_vet+0x35>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <_print_vet+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @_print_vet(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void priv_decl_end(FILE *outfile) { fprintf(outfile, ");\n"); }


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

x86 assembly (clang, -O2):
<priv_decl_end>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0x3,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c");\0A\00"
define void @priv_decl_end(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 3, i64 1, i32* %0)
ret void
}
void XAllocWMHints() {}


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

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

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

LLVM IR (-O2):
define void @XAllocWMHints() {
ret void
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
int /*<<< orphan*/ SIGUSR1;
int /*<<< orphan*/ kill(scalar_t__, int /*<<< orphan*/);
scalar_t__ proc_find(char const *);
void sendOKSignal() {
  const char *proc_name = "EmSyRU";
  pid_t pid = proc_find(proc_name);
  if (pid > 0)
    kill(pid, SIGUSR1);
}


x86 assembly (clang, -O0):
<sendOKSignal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <proc_find@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jle    115d <sendOKSignal+0x3d>
mov    -0x10(%rbp),%rdi
mov    0x2e92(%rip),%rax
mov    (%rax),%esi
call   1040 <kill@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendOKSignal>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <proc_find@plt>
test   %rax,%rax
jle    1144 <sendOKSignal+0x24>
mov    0x2eaf(%rip),%rcx
mov    (%rcx),%esi
mov    %rax,%rdi
pop    %rax
jmp    1040 <kill@plt>
pop    %rax
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"EmSyRU\00"
@SIGUSR1 = global i32 0
define void @sendOKSignal() {
%1 = tail call i64 @proc_find(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = icmp sgt i64 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = load i32, i32* @SIGUSR1
%5 = tail call i32 @kill(i64 %1, i32 %4)
br label %6
6: ; preds = %3, %0
ret void
}
/* Variables and functions */
double floor(double);
double log10(double);
double pow(int, double);
void bigexp(double lnx, double *a, double *b) {
  double z;
  z = lnx * log10(2.71828);
  *b = floor(z);
  *a = pow(10, z - (*b));
}


x86 assembly (clang, -O0):
<bigexp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xea9(%rip),%xmm0
call   1040 <log10@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1050 <floor@plt>
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x20(%rbp),%xmm0
mov    -0x18(%rbp),%rax
subsd  (%rax),%xmm0
mov    $0xa,%edi
call   1030 <pow@plt>
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bigexp>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mulsd  0xece(%rip),%xmm0
movsd  %xmm0,(%rsp)
call   1040 <floor@plt>
movsd  %xmm0,(%rbx)
movsd  (%rsp),%xmm1
subsd  %xmm0,%xmm1
mov    $0xa,%edi
movapd %xmm1,%xmm0
call   1030 <pow@plt>
movsd  %xmm0,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @bigexp(double %0, double* %1, double* %2) {
%4 = alloca double
%5 = alloca double*
%6 = alloca double*
%7 = alloca double
store double %0, double* %4
store double* %1, double** %5
store double* %2, double** %6
%8 = load double, double* %4
%9 = call double @log10(double 2.718280e+00)
%10 = fmul double %8, %9
store double %10, double* %7
%11 = load double, double* %7
%12 = call double @llvm.floor.f64(double %11)
%13 = load double*, double** %6
store double %12, double* %13
%14 = load double, double* %7
%15 = load double*, double** %6
%16 = load double, double* %15
%17 = fsub double %14, %16
%18 = call double @pow(i32 10, double %17)
%19 = load double*, double** %5
store double %18, double* %19
ret void
}

LLVM IR (-O2):
define void @bigexp(double %0, double* nocapture writeonly %1, double* nocapture writeonly %2) {
%4 = fmul double %0, 0x3FDBCB79DB7AFC99
%5 = tail call double @llvm.floor.f64(double %4)
store double %5, double* %2
%6 = fsub double %4, %5
%7 = tail call double @pow(i32 10, double %6)
store double %7, double* %1
ret void
}
/* Type definitions */
struct UPnPService {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void RNDResponseSink_RenderingControl_SetLoudness(struct UPnPService *Service,
                                                  int ErrorCode, void *User) {
  printf(
      "RND Invoke Response: RenderingControl/SetLoudness[ErrorCode:%d]()\r\n",
      ErrorCode);
}


x86 assembly (clang, -O0):
<RNDResponseSink_RenderingControl_SetLoudness>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0xc(%rbp),%esi
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.UPnPService = type { i32 }
@.str = [68 x i8] c"RND Invoke Response: RenderingControl/SetLoudness[ErrorCode:%d]()\0D\0A\00"
define void @RNDResponseSink_RenderingControl_SetLoudness(%struct.UPnPService* %0, i32 %1, i8* %2) {
%4 = alloca %struct.UPnPService*
%5 = alloca i32
%6 = alloca i8*
store %struct.UPnPService* %0, %struct.UPnPService** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* %5
%8 = call i32 @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str, i64 0, i64 0), i32 %7)
ret void
}

LLVM IR (-O2):
%struct.UPnPService = type { i32 }
@.str = [68 x i8] c"RND Invoke Response: RenderingControl/SetLoudness[ErrorCode:%d]()\0D\0A\00"
define void @RNDResponseSink_RenderingControl_SetLoudness(%struct.UPnPService* nocapture readnone %0, i32 %1, i8* nocapture readnone %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
int MAINPAGE_FindNextElem(int, int);
int elem_rel_to_abs(int type, int idx) {
  int nxt = -1;
  for (int i = 0; i < idx + 1; i++)
    nxt = MAINPAGE_FindNextElem(type, nxt + 1);
  return nxt;
}


x86 assembly (clang, -O0):
<elem_rel_to_abs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0xffffffff,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    115c <elem_rel_to_abs+0x4c>
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%esi
add    $0x1,%esi
call   1030 <MAINPAGE_FindNextElem@plt>
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    112c <elem_rel_to_abs+0x1c>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<elem_rel_to_abs>:
push   %rbp
push   %rbx
push   %rax
test   %esi,%esi
js     1143 <elem_rel_to_abs+0x33>
mov    %esi,%ebx
mov    %edi,%ebp
add    $0x1,%ebx
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%eax
mov    %ebp,%edi
mov    %eax,%esi
call   1030 <MAINPAGE_FindNextElem@plt>
add    $0xffffffff,%ebx
jne    1130 <elem_rel_to_abs+0x20>
jmp    1148 <elem_rel_to_abs+0x38>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @elem_rel_to_abs(i32 %0, i32 %1) {
%3 = icmp slt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %6, %2
%5 = phi i32 [ -1, %2 ], [ %10, %6 ]
ret i32 %5
6: ; preds = %2, %6
%7 = phi i32 [ %11, %6 ], [ 0, %2 ]
%8 = phi i32 [ %10, %6 ], [ -1, %2 ]
%9 = add nsw i32 %8, 1
%10 = tail call i32 @MAINPAGE_FindNextElem(i32 %0, i32 %9)
%11 = add nuw i32 %7, 1
%12 = icmp eq i32 %7, %1
br i1 %12, label %4, label %6
}
void socfpga_init_ocram_ecc(void) {}


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

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

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

LLVM IR (-O2):
define void @socfpga_init_ocram_ecc() {
ret void
}
char *eatwhite(char *curlinepos) {
  while ((*curlinepos == ' ') || (*curlinepos == '\t'))
    curlinepos++;
  return curlinepos;
}


x86 assembly (clang, -O0):
<eatwhite>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x9(%rbp)
je     112d <eatwhite+0x2d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    113d <eatwhite+0x3d>
jmp    114e <eatwhite+0x4e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <eatwhite+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<eatwhite>:
mov    %rdi,%rax
jmp    1114 <eatwhite+0x14>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%rax
movzbl (%rax),%ecx
cmp    $0x20,%cl
je     1110 <eatwhite+0x10>
cmp    $0x9,%cl
je     1110 <eatwhite+0x10>
ret

LLVM IR (-O0):
define i8* @eatwhite(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %15, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 32
br i1 %7, label %13, label %8
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 9
br label %13
13: ; preds = %8, %3
%14 = phi i1 [ true, %3 ], [ %12, %8 ]
br i1 %14, label %15, label %18
15: ; preds = %13
%16 = load i8*, i8** %2
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %2
br label %3
18: ; preds = %13
%19 = load i8*, i8** %2
ret i8* %19
}

LLVM IR (-O2):
define i8* @eatwhite(i8* %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %7 [
i8 32, label %5
i8 9, label %5
]
5: ; preds = %2, %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2
ret i8* %3
}
__attribute__((always_)) int hhh() {
  asm("hh_label: .globl hhh_label");
  return iii() + 1;
}


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

x86 assembly (clang, -O2):
<hhh>:
push   %rax

LLVM IR (-O0):
define i32 @hhh() {
%1 = call i32 (...) @iii()
%2 = add nsw i32 %1, 1
ret i32 %2
}

LLVM IR (-O2):
define i32 @hhh() {
tail call void asm sideeffect "hh_label: .globl hhh_label", "~{dirflag},~{fpsr},~{flags}"()
%1 = tail call i32 (...) @iii()
%2 = add nsw i32 %1, 1
ret i32 %2
}
/* Variables and functions */
float sqrtf(float);
float bar(float x) { return sqrtf(1.0f / x); }


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  0xedb(%rip),%xmm0
divss  -0x4(%rbp),%xmm0
call   1030 <sqrtf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
movaps %xmm0,%xmm1
movss  0xee5(%rip),%xmm0
divss  %xmm1,%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     112c <bar+0x1c>
sqrtss %xmm0,%xmm0
ret
jmp    1030 <sqrtf@plt>

LLVM IR (-O0):
define float @bar(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fdiv float 1.000000e+00, %3
%5 = call float @sqrtf(float %4)
ret float %5
}

LLVM IR (-O2):
define float @bar(float %0) {
%2 = fdiv float 1.000000e+00, %0
%3 = tail call float @sqrtf(float %2)
ret float %3
}
char *_add(const char *str, char *pt, const char *ptlim) {
  while (pt < ptlim && (*pt = *str++) != '\0')
    ++pt;
  return pt;
}


x86 assembly (clang, -O0):
<_add>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rcx
xor    %eax,%eax
cmp    -0x18(%rbp),%rcx
mov    %al,-0x19(%rbp)
jae    1146 <_add+0x46>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%al
mov    -0x10(%rbp),%rcx
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    1156 <_add+0x56>
jmp    1167 <_add+0x67>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <_add+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_add>:
mov    %rsi,%rax
cmp    %rdx,%rsi
jae    112b <_add+0x2b>
mov    %rdx,%r8
sub    %rax,%r8
xor    %esi,%esi
movzbl (%rdi,%rsi,1),%ecx
mov    %cl,(%rax,%rsi,1)
test   %cl,%cl
je     1128 <_add+0x28>
add    $0x1,%rsi
cmp    %rsi,%r8
jne    1110 <_add+0x10>
mov    %rdx,%rax
ret
add    %rsi,%rax
ret

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

LLVM IR (-O2):
define i8* @_add(i8* nocapture %0, i8* writeonly %1, i8* readnone %2) {
%4 = icmp ult i8* %1, %2
br i1 %4, label %5, label %19
5: ; preds = %3
%6 = ptrtoint i8* %2 to i64
%7 = ptrtoint i8* %1 to i64
%8 = sub i64 %6, %7
%9 = getelementptr i8, i8* %1, i64 %8
br label %10
10: ; preds = %5, %15
%11 = phi i8* [ %16, %15 ], [ %0, %5 ]
%12 = phi i8* [ %17, %15 ], [ %1, %5 ]
%13 = load i8, i8* %11
store i8 %13, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %19, label %15
15: ; preds = %10
%16 = getelementptr inbounds i8, i8* %11, i64 1
%17 = getelementptr inbounds i8, i8* %12, i64 1
%18 = icmp eq i8* %17, %9
br i1 %18, label %19, label %10
19: ; preds = %10, %15, %3
%20 = phi i8* [ %1, %3 ], [ %9, %15 ], [ %12, %10 ]
ret i8* %20
}
/* Variables and functions */
char *Op_gt(char *, char *);
char *Op_not(char *);
int /*<<< orphan*/ mu__free(char *, int, char *);
char *Op_le(char *arg1, char *arg2) {
  char *tmp = Op_gt(arg1, arg2);
  char *result = Op_not(tmp);
  mu__free("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
           "2022-01-22/02-19-57/repos/kaiaie/bile/refs/heads/master/src/Ops.c",
           192, tmp);
  return result;
}


x86 assembly (clang, -O0):
<Op_le>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <Op_gt@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <Op_not@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdx
lea    0xe97(%rip),%rdi
mov    $0xc0,%esi
call   1050 <mu__free@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Op_le>:
push   %r14
push   %rbx
push   %rax
call   1040 <Op_gt@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <Op_not@plt>
mov    %rax,%r14
lea    0xeb2(%rip),%rdi
mov    $0xc0,%esi
mov    %rbx,%rdx
call   1050 <mu__free@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [130 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/kaiaie/bile/refs/heads/master/src/Ops.c\00"
define i8* @Op_le(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = load i8*, i8** %4
%9 = call i8* @Op_gt(i8* %7, i8* %8)
store i8* %9, i8** %5
%10 = load i8*, i8** %5
%11 = call i8* @Op_not(i8* %10)
store i8* %11, i8** %6
%12 = load i8*, i8** %5
%13 = call i32 @mu__free(i8* getelementptr inbounds ([130 x i8], [130 x i8]* @.str, i64 0, i64 0), i32 192, i8* %12)
%14 = load i8*, i8** %6
ret i8* %14
}

LLVM IR (-O2):
@.str = [130 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/kaiaie/bile/refs/heads/master/src/Ops.c\00"
define i8* @Op_le(i8* %0, i8* %1) {
%3 = tail call i8* @Op_gt(i8* %0, i8* %1)
%4 = tail call i8* @Op_not(i8* %3)
%5 = tail call i32 @mu__free(i8* getelementptr inbounds ([130 x i8], [130 x i8]* @.str, i64 0, i64 0), i32 192, i8* %3)
ret i8* %4
}
long long int longlongint_ignoring_signedint(long long int x, signed int y) {
  return x;
}


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

x86 assembly (clang, -O2):
<longlongint_ignoring_signedint>:
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @longlongint_ignoring_signedint(i64 returned %0, i32 %1) {
ret i64 %0
}