xunge/DecIR huggingface dataset:
put(obj, where, pval) int obj, where, pval;
{
  move(obj, where);
  return ((-1) - pval);
}


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

x86 assembly (clang, -O2):
<put>:
push   %rbx
mov    %edx,%ebx
xor    %eax,%eax
call   1030 <move@plt>
not    %ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @put(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = call i32 (i32, i32, ...) bitcast (i32 (...)* @move to i32 (i32, i32, ...)*)(i32 %7, i32 %8)
%10 = load i32, i32* %6
%11 = sub nsw i32 -1, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @put(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @move to i32 (i32, i32, ...)*)(i32 %0, i32 %1)
%5 = xor i32 %2, -1
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void list_testBench_print(const void *n) {
  printf("%d ", *(int *)(unsigned long)n);
}


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"%d \00"
define void @list_testBench_print(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
%5 = inttoptr i64 %4 to i32*
%6 = load i32, i32* %5
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @list_testBench_print(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
/* Variables and functions */
signed short ClampShort(int i) {
  if (i < -32768) {
    return -32768;
  }
  if (i > 0x7fff) {
    return 0x7fff;
  }
  return i;
}


x86 assembly (clang, -O0):
<ClampShort>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0xffff8000,-0x8(%rbp)
jge    111f <ClampShort+0x1f>
movw   $0x8000,-0x2(%rbp)
jmp    113e <ClampShort+0x3e>
cmpl   $0x7fff,-0x8(%rbp)
jle    1137 <ClampShort+0x37>
movw   $0x7fff,-0x2(%rbp)
jmp    113e <ClampShort+0x3e>
mov    -0x8(%rbp),%eax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ClampShort>:
cmp    $0x7fff,%edi
mov    $0x7fff,%ecx
cmovl  %edi,%ecx
cmp    $0xffff8001,%ecx
mov    $0x8000,%eax
cmovge %ecx,%eax
ret

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

LLVM IR (-O2):
define signext i16 @ClampShort(i32 %0) {
%2 = icmp slt i32 %0, 32767
%3 = select i1 %2, i32 %0, i32 32767
%4 = icmp sgt i32 %3, -32768
%5 = select i1 %4, i32 %3, i32 -32768
%6 = trunc i32 %5 to i16
ret i16 %6
}
int mdp4_writeback_dequeue_buffer(struct fb_info *info,
                                  struct msmfb_data *data) {
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.fb_info = type opaque
%struct.msmfb_data = type opaque
define i32 @mdp4_writeback_dequeue_buffer(%struct.fb_info* nocapture readnone %0, %struct.msmfb_data* nocapture readnone %1) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ addr_to_bytes(unsigned char *, int /*<<< orphan*/ const *);
int /*<<< orphan*/ memcpy(unsigned char *, unsigned char const *, int);
int /*<<< orphan*/ shake256(unsigned char *, int, unsigned char *, int);
void prf_addr(unsigned char *out, const unsigned char *key,
              const uint32_t addr[8]) {
  unsigned char buf[16 + 32];
  memcpy(buf, key, 16);
  addr_to_bytes(buf + 16, addr);
  shake256(out, 16, buf, 16 + 32);
}


x86 assembly (clang, -O0):
<prf_addr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x50(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x10,%edx
call   1040 <memcpy@plt>
lea    -0x50(%rbp),%rdi
add    $0x10,%rdi
mov    -0x18(%rbp),%rsi
call   1030 <addr_to_bytes@plt>
mov    -0x8(%rbp),%rdi
lea    -0x50(%rbp),%rdx
mov    $0x10,%esi
mov    $0x30,%ecx
call   1050 <shake256@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prf_addr>:
push   %r15
push   %r14
push   %rbx
sub    $0x30,%rsp
mov    %rdx,%rbx
mov    %rdi,%r14
mov    %rsp,%r15
mov    %r15,%rdi
mov    $0x10,%edx
call   1040 <memcpy@plt>
lea    0x10(%rsp),%rdi
mov    %rbx,%rsi
call   1030 <addr_to_bytes@plt>
mov    %r14,%rdi
mov    $0x10,%esi
mov    %r15,%rdx
mov    $0x30,%ecx
call   1050 <shake256@plt>
add    $0x30,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @prf_addr(i8* %0, i8* %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32*
%7 = alloca [48 x i8]
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32* %2, i32** %6
%8 = getelementptr inbounds [48 x i8], [48 x i8]* %7, i64 0, i64 0
%9 = load i8*, i8** %5
%10 = call i32 @memcpy(i8* %8, i8* %9, i32 16)
%11 = getelementptr inbounds [48 x i8], [48 x i8]* %7, i64 0, i64 0
%12 = getelementptr inbounds i8, i8* %11, i64 16
%13 = load i32*, i32** %6
%14 = call i32 @addr_to_bytes(i8* %12, i32* %13)
%15 = load i8*, i8** %4
%16 = getelementptr inbounds [48 x i8], [48 x i8]* %7, i64 0, i64 0
%17 = call i32 @shake256(i8* %15, i32 16, i8* %16, i32 48)
ret void
}

LLVM IR (-O2):
define void @prf_addr(i8* %0, i8* %1, i32* %2) {
%4 = alloca [48 x i8]
%5 = getelementptr inbounds [48 x i8], [48 x i8]* %4, i64 0, i64 0
%6 = call i32 @memcpy(i8* %5, i8* %1, i32 16)
%7 = getelementptr inbounds [48 x i8], [48 x i8]* %4, i64 0, i64 16
%8 = call i32 @addr_to_bytes(i8* %7, i32* %2)
%9 = call i32 @shake256(i8* %0, i32 16, i8* %5, i32 48)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0x12() {
  Assert_real((isspace(18) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isspace.c",
              95, ("isspace should be 0 for 0x12"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0x12\00"
define void @t_isspace_0x12() {
%1 = tail call i64 @isspace(i32 18)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 95, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int foo(int i) {
  int k = i + 1;
  int j = i + 1;
  if (k != j)
    k = k + 1;
  if (k != j)
    k = k + 1;
  k = k - i;
  return k;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     112e <foo+0x2e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     1143 <foo+0x43>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @foo(i32 %0) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ setresgid(int, int, int);
int /*<<< orphan*/ setresuid(int, int, int);
int main() {
  setresgid(1, 2, 3);
  setresuid(1, 2, 3);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
call   1040 <setresgid@plt>
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
call   1030 <setresuid@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
call   1040 <setresgid@plt>
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
call   1030 <setresuid@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @setresgid(i32 1, i32 2, i32 3)
%2 = call i32 @setresuid(i32 1, i32 2, i32 3)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @setresgid(i32 1, i32 2, i32 3)
%2 = tail call i32 @setresuid(i32 1, i32 2, i32 3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _getch();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ putchar(int);
int main() {
  int i;
  for (i = 0200; i < 0377; i++)
    putchar(i);
  printf("\n");
  _getch();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x80,-0x8(%rbp)
cmpl   $0xff,-0x8(%rbp)
jge    1169 <main+0x39>
mov    -0x8(%rbp),%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1146 <main+0x16>
lea    0xe90(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <_getch@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x80,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
cmp    $0xff,%ebx
jne    1130 <main+0x10>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <_getch@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 128, %0 ], [ %4, %1 ]
%3 = tail call i32 @putchar(i32 %2)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 255
br i1 %5, label %6, label %1
6: ; preds = %1
%7 = tail call i32 @putchar(i32 10)
%8 = tail call i32 (...) @_getch()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void iptreemap_usage(void) {
  printf("-N set iptreemap --gc interval\n"
         "-A set IP\n"
         "-D set IP\n"
         "-T set IP\n");
}


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

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

LLVM IR (-O0):
@.str = [62 x i8] c"-N set iptreemap --gc interval\0A-A set IP\0A-D set IP\0A-T set IP\0A\00"
define void @iptreemap_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [61 x i8] c"-N set iptreemap --gc interval\0A-A set IP\0A-D set IP\0A-T set IP\00"
define void @iptreemap_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ log_f(char *);
void inputb_none_done(void) { log_f("inputb:none: inputb_none_done()\n"); }


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

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

LLVM IR (-O0):
@.str = [33 x i8] c"inputb:none: inputb_none_done()\0A\00"
define void @inputb_none_done() {
%1 = call i32 @log_f(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"inputb:none: inputb_none_done()\0A\00"
define void @inputb_none_done() {
%1 = tail call i32 @log_f(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret void
}
int foo() {
#pragma omp task
  {}
#pragma omp taskwait
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @foo() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  unsigned long count, continua = 1;
  while (continua) {
    printf("continua imprimindo\n");
    count++;
    if (count == 10) {
      break;
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x1,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1166 <main+0x56>
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
cmpq   $0xa,-0x18(%rbp)
jne    1161 <main+0x51>
jmp    1166 <main+0x56>
jmp    112e <main+0x1e>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@str = [20 x i8] c"continua imprimindo\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret i32 0
}
conv_i1() {}


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

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

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

LLVM IR (-O2):
define i32 @conv_i1() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ show_string(char *, char *);
void show_warning(const char *msg) { show_string("warning", (char *)msg); }


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

x86 assembly (clang, -O2):
<show_warning>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <show_string@plt>

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

LLVM IR (-O2):
@.str = [8 x i8] c"warning\00"
define void @show_warning(i8* %0) {
%2 = tail call i32 @show_string(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
char *U_WMRCORENONE_set(char *);
char *U_WMR93_set(void) { return U_WMRCORENONE_set("U_WMR93"); }


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMR93\00"
define i8* @U_WMR93_set() {
%1 = tail call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(void) {
  puts("Hello, world !");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [15 x i8] c"Hello, world !\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @puts(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"Hello, world !\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void *load_PCB(void) {
  register void *sp;
  return sp;
}


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

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

LLVM IR (-O0):
define i8* @load_PCB() {
%1 = alloca i8*
%2 = load i8*, i8** %1
ret i8* %2
}

LLVM IR (-O2):
define noalias i8* @load_PCB() {
ret i8* undef
}
/* Variables and functions */
char *malloc(int);
char *charprt(void) { return malloc(sizeof(char)); }


x86 assembly (clang, -O0):
<charprt>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <malloc@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<charprt>:
mov    $0x1,%edi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @charprt() {
%1 = call i8* @malloc(i32 1)
ret i8* %1
}

LLVM IR (-O2):
define noalias i8* @charprt() {
%1 = tail call dereferenceable_or_null(1) i8* @malloc(i32 1)
ret i8* %1
}
/* Type definitions */
struct proctal {
  int dummy;
};

/* Variables and functions */
struct proctal *proctal_implementation_open();
struct proctal *proctal_open(void) {
  return proctal_implementation_open();
}


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

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

LLVM IR (-O0):
%struct.proctal = type { i32 }
define %struct.proctal* @proctal_open() {
%1 = call %struct.proctal* (...) @proctal_implementation_open()
ret %struct.proctal* %1
}

LLVM IR (-O2):
%struct.proctal = type { i32 }
define %struct.proctal* @proctal_open() {
%1 = tail call %struct.proctal* (...) @proctal_implementation_open()
ret %struct.proctal* %1
}
/* Variables and functions */
int PAPI_is_initialized();
void papif_is_initialized_(int *level) { *level = PAPI_is_initialized(); }


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

x86 assembly (clang, -O2):
<papif_is_initialized_>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <PAPI_is_initialized@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @papif_is_initialized_(i32* nocapture writeonly %0) {
%2 = tail call i32 (...) @PAPI_is_initialized()
store i32 %2, i32* %0
ret void
}
/* Variables and functions */
float __nv_cyl_bessel_i1f(float);
float cyl_bessel_i1f(float __a) { return __nv_cyl_bessel_i1f(__a); }


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

x86 assembly (clang, -O2):
<cyl_bessel_i1f>:
jmp    1030 <__nv_cyl_bessel_i1f@plt>

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

LLVM IR (-O2):
define float @cyl_bessel_i1f(float %0) {
%2 = tail call float @__nv_cyl_bessel_i1f(float %0)
ret float %2
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ disable_file_or_dir(char *);
scalar_t__ stat(char *, struct stat *);
void disable_socket_dir(void) {
  struct stat s;
  if (stat("/run"
           "/firejail"
           "/dbus",
           &s) == 0)
    disable_file_or_dir("/run"
                        "/firejail"
                        "/dbus");
}


x86 assembly (clang, -O0):
<disable_socket_dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <stat@plt>
cmp    $0x0,%rax
jne    114e <disable_socket_dir+0x2e>
lea    0xeb7(%rip),%rdi
call   1030 <disable_file_or_dir@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<disable_socket_dir>:
push   %rax
lea    0xed8(%rip),%rdi
mov    %rsp,%rsi
call   1040 <stat@plt>
test   %rax,%rax
je     1137 <disable_socket_dir+0x17>
pop    %rax
ret
lea    0xec2(%rip),%rdi
call   1030 <disable_file_or_dir@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@.str = [19 x i8] c"/run/firejail/dbus\00"
define void @disable_socket_dir() {
%1 = alloca %struct.stat
%2 = call i64 @stat(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), %struct.stat* %1)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @disable_file_or_dir(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %0
ret void
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@.str = [19 x i8] c"/run/firejail/dbus\00"
define void @disable_socket_dir() {
%1 = alloca %struct.stat
%2 = bitcast %struct.stat* %1 to i8*
%3 = call i64 @stat(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), %struct.stat* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @disable_file_or_dir(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %0
ret void
}
/* Variables and functions */
double __ieee754_atanh(double);
double atanh(double x) { return __ieee754_atanh(x); }


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

x86 assembly (clang, -O2):
<atanh>:
jmp    1030 <__ieee754_atanh@plt>

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

LLVM IR (-O2):
define double @atanh(double %0) {
%2 = tail call double @__ieee754_atanh(double %0)
ret double %2
}
tzload(name, sp, doextend) {}


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

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

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

LLVM IR (-O2):
define i32 @tzload(i32 %0, i32 %1, i32 %2) {
ret i32 undef
}
/* Type definitions */
typedef scalar_t__ uint16_t;

/* Variables and functions */
double f1(uint16_t x) { return (double)(float)x; }


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

x86 assembly (clang, -O2):
<f1>:
cvtsi2ss %rdi,%xmm0
cvtss2sd %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @f1(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = sitofp i64 %3 to float
%5 = fpext float %4 to double
ret double %5
}

LLVM IR (-O2):
define double @f1(i64 %0) {
%2 = sitofp i64 %0 to float
%3 = fpext float %2 to double
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ steal();
void *thief(void *arg) {
  int i;
  for (i = 0; i < 10; ++i) {
    steal();
  }
}


x86 assembly (clang, -O0):
<thief>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0xa,-0x14(%rbp)
jge    1142 <thief+0x32>
mov    $0x0,%al
call   1030 <steal@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1123 <thief+0x13>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thief>:
push   %rax
xor    %eax,%eax
call   1030 <steal@plt>
xor    %eax,%eax
call   1030 <steal@plt>
xor    %eax,%eax
call   1030 <steal@plt>
xor    %eax,%eax
call   1030 <steal@plt>
xor    %eax,%eax
call   1030 <steal@plt>
xor    %eax,%eax
call   1030 <steal@plt>
xor    %eax,%eax
call   1030 <steal@plt>
xor    %eax,%eax
call   1030 <steal@plt>
xor    %eax,%eax
call   1030 <steal@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <steal@plt>

LLVM IR (-O0):
define i8* @thief(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 0, i32* %4
br label %5
5: ; preds = %10, %1
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 10
br i1 %7, label %8, label %13
8: ; preds = %5
%9 = call i32 (...) @steal()
br label %10
10: ; preds = %8
%11 = load i32, i32* %4
%12 = add nsw i32 %11, 1
store i32 %12, i32* %4
br label %5
13: ; preds = %5
%14 = load i8*, i8** %2
ret i8* %14
}

LLVM IR (-O2):
define noalias i8* @thief(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @steal()
%3 = tail call i32 (...) @steal()
%4 = tail call i32 (...) @steal()
%5 = tail call i32 (...) @steal()
%6 = tail call i32 (...) @steal()
%7 = tail call i32 (...) @steal()
%8 = tail call i32 (...) @steal()
%9 = tail call i32 (...) @steal()
%10 = tail call i32 (...) @steal()
%11 = tail call i32 (...) @steal()
ret i8* undef
}
/* Type definitions */
struct cli_val_text {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct cli_val_text *);
void cli_val_text_destroy(struct cli_val_text *v) { free(v); }


x86 assembly (clang, -O0):
<cli_val_text_destroy>:
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):
<cli_val_text_destroy>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.cli_val_text = type { i32 }
define void @cli_val_text_destroy(%struct.cli_val_text* %0) {
%2 = alloca %struct.cli_val_text*
store %struct.cli_val_text* %0, %struct.cli_val_text** %2
%3 = load %struct.cli_val_text*, %struct.cli_val_text** %2
%4 = call i32 @free(%struct.cli_val_text* %3)
ret void
}

LLVM IR (-O2):
%struct.cli_val_text = type { i32 }
define void @cli_val_text_destroy(%struct.cli_val_text* nocapture %0) {
%2 = tail call i32 @free(%struct.cli_val_text* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fgets(char *, size_t, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int strlen(char *);
char *readline(char *s, size_t max) {
  fgets(s, max - 1, stdin);
  s[strlen(s) - 1] = '\0';
  return s;
}


x86 assembly (clang, -O0):
<readline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
sub    $0x1,%rsi
mov    0x2ea5(%rip),%rax
mov    (%rax),%edx
call   1040 <fgets@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readline>:
push   %rbx
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rsi
mov    0x2eb9(%rip),%rax
mov    (%rax),%edx
call   1040 <fgets@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%rbx,1)
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@stdin = global i32 0
define i8* @readline(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = sub i64 %6, 1
%8 = load i32, i32* @stdin
%9 = call i32 @fgets(i8* %5, i64 %7, i32 %8)
%10 = load i8*, i8** %3
%11 = load i8*, i8** %3
%12 = call i32 @strlen(i8* %11)
%13 = sub nsw i32 %12, 1
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %10, i64 %14
store i8 0, i8* %15
%16 = load i8*, i8** %3
ret i8* %16
}

LLVM IR (-O2):
@stdin = global i32 0
define i8* @readline(i8* returned %0, i64 %1) {
%3 = add i64 %1, -1
%4 = load i32, i32* @stdin
%5 = tail call i32 @fgets(i8* %0, i64 %3, i32 %4)
%6 = tail call i32 @strlen(i8* %0)
%7 = add nsw i32 %6, -1
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %0, i64 %8
store i8 0, i8* %9
ret i8* %0
}
void ff_hevc_put_hevc_bi_epel_h64_8_avx2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_epel_h64_8_avx2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ makelit(char *);
int /*<<< orphan*/ mlforce(char *);
int mlreply(char *, char *, int);
writemsg(int f, int n) {
  register int status;
  char buf[128];
  if ((status = mlreply("Message to write: ", buf, 128 - 1)) != 1)
    return (status);
  makelit(buf);
  mlforce(buf);
  return (1);
}


x86 assembly (clang, -O0):
<writemsg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x90(%rbp),%rsi
lea    0xeb1(%rip),%rdi
mov    $0x7f,%edx
call   1050 <mlreply@plt>
mov    %eax,-0x10(%rbp)
cmp    $0x1,%eax
je     1170 <writemsg+0x40>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    118f <writemsg+0x5f>
lea    -0x90(%rbp),%rdi
call   1030 <makelit@plt>
lea    -0x90(%rbp),%rdi
call   1040 <mlforce@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writemsg>:
push   %r14
push   %rbx
sub    $0x88,%rsp
lea    0xebf(%rip),%rdi
mov    %rsp,%rsi
mov    $0x7f,%edx
call   1050 <mlreply@plt>
mov    %eax,%ebx
cmp    $0x1,%eax
jne    1168 <writemsg+0x38>
mov    %rsp,%r14
mov    %r14,%rdi
call   1030 <makelit@plt>
mov    %r14,%rdi
call   1040 <mlforce@plt>
mov    %ebx,%eax
add    $0x88,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [19 x i8] c"Message to write: \00"
define i32 @writemsg(i32 %0, i32 %1) {
%3 = alloca [128 x i8]
%4 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%5 = call i32 @mlreply(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %4, i32 127)
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = call i32 @makelit(i8* %4)
%9 = call i32 @mlforce(i8* %4)
br label %10
10: ; preds = %2, %7
ret i32 %5
}
void foo392(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo392(i32 %0) {
ret void
}
double mercator_sheet_x(double longitude) { return longitude; }


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

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

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

LLVM IR (-O2):
define double @mercator_sheet_x(double returned %0) {
ret double %0
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int solcon_number_of_standard_solutions(int *length) {
  int *a, fail;
  double *c;
  fail = _ada_use_c2phc(32, a, length, c);
  return fail;
}


x86 assembly (clang, -O0):
<solcon_number_of_standard_solutions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x20,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solcon_number_of_standard_solutions>:
mov    %rdi,%rdx
mov    $0x20,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @solcon_number_of_standard_solutions(i32* %0) {
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i32
%5 = alloca double*
store i32* %0, i32** %2
%6 = load i32*, i32** %3
%7 = load i32*, i32** %2
%8 = load double*, double** %5
%9 = call i32 @_ada_use_c2phc(i32 32, i32* %6, i32* %7, double* %8)
store i32 %9, i32* %4
%10 = load i32, i32* %4
ret i32 %10
}

LLVM IR (-O2):
define i32 @solcon_number_of_standard_solutions(i32* %0) {
%2 = tail call i32 @_ada_use_c2phc(i32 32, i32* undef, i32* %0, double* undef)
ret i32 %2
}
void foo443(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo443(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ O_RDWR;
int open(char *, int /*<<< orphan*/);
int read(int, char *, int);
int /*<<< orphan*/ write(int, char *, int);
void main() {
  int fd = open("/dev/ptyp0", O_RDWR);
  while (1) {
    char buffer[256];
    int len;
    len = read(fd, buffer, 256);
    write(1, buffer, len);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    0x2ea6(%rip),%rax
mov    (%rax),%esi
lea    0xeb5(%rip),%rdi
call   1050 <open@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x110(%rbp),%rsi
mov    $0x100,%edx
call   1040 <read@plt>
mov    %eax,-0x114(%rbp)
lea    -0x110(%rbp),%rsi
mov    -0x114(%rbp),%edx
mov    $0x1,%edi
call   1030 <write@plt>
jmp    1153 <main+0x23>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
sub    $0x108,%rsp
mov    0x2ea8(%rip),%rax
mov    (%rax),%esi
lea    0xeb7(%rip),%rdi
call   1050 <open@plt>
mov    %eax,%ebp
mov    %rsp,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0x100,%edx
call   1040 <read@plt>
mov    $0x1,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
jmp    1160 <main+0x30>

LLVM IR (-O0):
@.str = [11 x i8] c"/dev/ptyp0\00"
@O_RDWR = global i32 0
define void @main() {
%1 = alloca i32
%2 = alloca [256 x i8]
%3 = alloca i32
%4 = load i32, i32* @O_RDWR
%5 = call i32 @open(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %4)
store i32 %5, i32* %1
br label %6
6: ; preds = %0, %6
%7 = load i32, i32* %1
%8 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%9 = call i32 @read(i32 %7, i8* %8, i32 256)
store i32 %9, i32* %3
%10 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%11 = load i32, i32* %3
%12 = call i32 @write(i32 1, i8* %10, i32 %11)
br label %6
}

LLVM IR (-O2):
@.str = [11 x i8] c"/dev/ptyp0\00"
@O_RDWR = global i32 0
define void @main() {
%1 = alloca [256 x i8]
%2 = load i32, i32* @O_RDWR
%3 = tail call i32 @open(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
br label %5
5: ; preds = %5, %0
%6 = call i32 @read(i32 %3, i8* %4, i32 256)
%7 = call i32 @write(i32 1, i8* %4, i32 %6)
br label %5
}
int nogrk(long long a, long long b) { return ~(a | b) ? 23 : 42; }


x86 assembly (clang, -O0):
<nogrk>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdx
or     -0x10(%rbp),%rdx
xor    $0xffffffffffffffff,%rdx
mov    $0x2a,%eax
mov    $0x17,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nogrk>:
or     %rsi,%rdi
cmp    $0xffffffffffffffff,%rdi
mov    $0x2a,%ecx
mov    $0x17,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @nogrk(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = or i64 %5, %6
%8 = xor i64 %7, -1
%9 = icmp ne i64 %8, 0
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 23, i32 42
ret i32 %11
}

LLVM IR (-O2):
define i32 @nogrk(i64 %0, i64 %1) {
%3 = or i64 %1, %0
%4 = icmp eq i64 %3, -1
%5 = select i1 %4, i32 42, i32 23
ret i32 %5
}
/* Type definitions */
typedef int uint8_t;
typedef int uint64_t;

/* Variables and functions */
uint64_t _wyr3(const uint8_t *p, unsigned k) {
  return (((uint64_t)p[0]) << 16) | (((uint64_t)p[k >> 1]) << 8) | p[k - 1];
}


x86 assembly (clang, -O0):
<_wyr3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
shl    $0x10,%eax
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%edx
shr    $0x1,%edx
mov    %edx,%edx
mov    (%rcx,%rdx,4),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%edx
sub    $0x1,%edx
mov    %edx,%edx
or     (%rcx,%rdx,4),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_wyr3>:
mov    (%rdi),%ecx
shl    $0x10,%ecx
mov    %esi,%eax
shr    %eax
mov    (%rdi,%rax,4),%eax
shl    $0x8,%eax
or     %ecx,%eax
add    $0xffffffff,%esi
or     (%rdi,%rsi,4),%eax
ret

LLVM IR (-O0):
define i32 @_wyr3(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 = getelementptr inbounds i32, i32* %5, i64 0
%7 = load i32, i32* %6
%8 = shl i32 %7, 16
%9 = load i32*, i32** %3
%10 = load i32, i32* %4
%11 = lshr i32 %10, 1
%12 = zext i32 %11 to i64
%13 = getelementptr inbounds i32, i32* %9, i64 %12
%14 = load i32, i32* %13
%15 = shl i32 %14, 8
%16 = or i32 %8, %15
%17 = load i32*, i32** %3
%18 = load i32, i32* %4
%19 = sub i32 %18, 1
%20 = zext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %17, i64 %20
%22 = load i32, i32* %21
%23 = or i32 %16, %22
ret i32 %23
}

LLVM IR (-O2):
define i32 @_wyr3(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = shl i32 %3, 16
%5 = lshr i32 %1, 1
%6 = zext i32 %5 to i64
%7 = getelementptr inbounds i32, i32* %0, i64 %6
%8 = load i32, i32* %7
%9 = shl i32 %8, 8
%10 = or i32 %9, %4
%11 = add i32 %1, -1
%12 = zext i32 %11 to i64
%13 = getelementptr inbounds i32, i32* %0, i64 %12
%14 = load i32, i32* %13
%15 = or i32 %10, %14
ret i32 %15
}
int Suffix(myword, suffix)
char *myword;
char *suffix;
{
  register int i;
  register int j;
  i = strlen(myword);
  j = strlen(suffix);
  if (i > j) {
    return (STRCMP((myword + i - j), suffix));
  } else {
    return (-1);
  }
}


x86 assembly (clang, -O0):
<Suffix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jle    117e <Suffix+0x5e>
mov    -0x10(%rbp),%rdi
movslq -0x1c(%rbp),%rax
add    %rax,%rdi
movslq -0x20(%rbp),%rcx
xor    %eax,%eax
sub    %rcx,%rax
add    %rax,%rdi
mov    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1040 <STRCMP@plt>
mov    %eax,-0x4(%rbp)
jmp    1185 <Suffix+0x65>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Suffix>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rax,%r15
mov    %r14,%rdi
call   1030 <strlen@plt>
cmp    %eax,%r15d
jle    115d <Suffix+0x3d>
movslq %r15d,%rcx
add    %rcx,%rbx
cltq
sub    %rax,%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <STRCMP@plt>
mov    $0xffffffff,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @Suffix(i8* %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = trunc i64 %3 to i32
%5 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%6 = trunc i64 %5 to i32
%7 = icmp sgt i32 %4, %6
br i1 %7, label %8, label %17
8: ; preds = %2
%9 = shl i64 %3, 32
%10 = ashr exact i64 %9, 32
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = shl i64 %5, 32
%13 = ashr exact i64 %12, 32
%14 = sub nsw i64 0, %13
%15 = getelementptr inbounds i8, i8* %11, i64 %14
%16 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @STRCMP to i32 (i8*, i8*, ...)*)(i8* %15, i8* %1)
br label %17
17: ; preds = %2, %8
%18 = phi i32 [ %16, %8 ], [ -1, %2 ]
ret i32 %18
}
/* Type definitions */
typedef scalar_t__ uint32_t;
typedef int int32_t;

/* Variables and functions */
double stat_per_interval(uint32_t value, int32_t dur) {
  if (dur < 1000)
    dur = 1000;
  return ((double)value / dur) * 1000000;
}


x86 assembly (clang, -O0):
<stat_per_interval>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x3e8,-0xc(%rbp)
jge    111f <stat_per_interval+0x1f>
movl   $0x3e8,-0xc(%rbp)
cvtsi2sdq -0x8(%rbp),%xmm0
cvtsi2sdl -0xc(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  0xeca(%rip),%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<stat_per_interval>:
cmp    $0x3e9,%esi
mov    $0x3e8,%eax
cmovge %esi,%eax
cvtsi2sd %rdi,%xmm0
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
mulsd  0xedd(%rip),%xmm0
ret

LLVM IR (-O0):
define double @stat_per_interval(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp slt i32 %5, 1000
br i1 %6, label %7, label %8
7: ; preds = %2
store i32 1000, i32* %4
br label %8
8: ; preds = %7, %2
%9 = load i64, i64* %3
%10 = sitofp i64 %9 to double
%11 = load i32, i32* %4
%12 = sitofp i32 %11 to double
%13 = fdiv double %10, %12
%14 = fmul double %13, 1.000000e+06
ret double %14
}

LLVM IR (-O2):
define double @stat_per_interval(i64 %0, i32 %1) {
%3 = icmp sgt i32 %1, 1000
%4 = select i1 %3, i32 %1, i32 1000
%5 = sitofp i64 %0 to double
%6 = sitofp i32 %4 to double
%7 = fdiv double %5, %6
%8 = fmul double %7, 1.000000e+06
ret double %8
}