xunge/DecIR huggingface dataset:
long get_num_kmers(long seq_len, unsigned long kmer_len) {
  return seq_len - kmer_len + 1;
}


x86 assembly (clang, -O0):
<get_num_kmers>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
sub    -0x10(%rbp),%rax
add    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_num_kmers>:
sub    %rsi,%rdi
lea    0x1(%rdi),%rax
ret

LLVM IR (-O0):
define i64 @get_num_kmers(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 = sub i64 %5, %6
%8 = add i64 %7, 1
ret i64 %8
}

LLVM IR (-O2):
define i64 @get_num_kmers(i64 %0, i64 %1) {
%3 = add i64 %0, 1
%4 = sub i64 %3, %1
ret i64 %4
}
OP(ed, e1) { illegal_2(); }


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

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_2()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0x56() {
  Assert_real((isdigit(86) == 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_isdigit.c",
              435, ("isdigit should be 0 for V"));
}


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

x86 assembly (clang, -O2):
<t_isdigit_0x56>:
push   %rax
mov    $0x56,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x1b3,%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_isdigit.c\00"
@.str.1 = [26 x i8] c"isdigit should be 0 for V\00"
define void @t_isdigit_0x56() {
%1 = call i64 @isdigit(i32 86)
%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 435, i8* getelementptr inbounds ([26 x i8], [26 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_isdigit.c\00"
@.str.1 = [26 x i8] c"isdigit should be 0 for V\00"
define void @t_isdigit_0x56() {
%1 = tail call i64 @isdigit(i32 86)
%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 435, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
unsigned char foo(unsigned char a, unsigned char b) {
  return ((a + 1) * b) >> 8;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
add    $0x1,%eax
movzbl -0x2(%rbp),%ecx
imul   %ecx,%eax
sar    $0x8,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
lea    0x1(%rdi),%eax
imul   %esi,%eax
shr    $0x8,%eax
ret

LLVM IR (-O0):
define zeroext i8 @foo(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = add nsw i32 %6, 1
%8 = load i8, i8* %4
%9 = zext i8 %8 to i32
%10 = mul nsw i32 %7, %9
%11 = ashr i32 %10, 8
%12 = trunc i32 %11 to i8
ret i8 %12
}

LLVM IR (-O2):
define zeroext i8 @foo(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = add nuw nsw i32 %3, 1
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %4, %5
%7 = lshr i32 %6, 8
%8 = trunc i32 %7 to i8
ret i8 %8
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_bus_message_set_destination(void *m, const char *destination) {
  return -EINVAL;
}


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

x86 assembly (clang, -O2):
<sd_bus_message_set_destination>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_bus_message_set_destination(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @EINVAL
%6 = sub nsw i32 0, %5
ret i32 %6
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_bus_message_set_destination(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}
void avio_size() {}


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

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

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

LLVM IR (-O2):
define void @avio_size() {
ret void
}
void initialiser_tableau_marque_dfs(int *marques, int nb_sommet) {
  int indice;
  for (indice = 0; indice < nb_sommet; indice++) {
    marques[indice] = 0;
  }
}


x86 assembly (clang, -O0):
<initialiser_tableau_marque_dfs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    113b <initialiser_tableau_marque_dfs+0x3b>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <initialiser_tableau_marque_dfs+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<initialiser_tableau_marque_dfs>:
test   %esi,%esi
jle    1126 <initialiser_tableau_marque_dfs+0x16>
push   %rax
mov    %esi,%edx
shl    $0x2,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @initialiser_tableau_marque_dfs(i32* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = bitcast i32* %0 to i8*
%6 = zext i32 %1 to i64
%7 = shl nuw nsw i64 %6, 2
br label %8
8: ; preds = %4, %2
ret void
}
void store_length(int len, unsigned char *p_len) {
  p_len[0] = (unsigned char)((len >> 8) & 0xFF);
  p_len[1] = (unsigned char)(len & 0xFF);
}


x86 assembly (clang, -O0):
<store_length>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x1(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<store_length>:
rol    $0x8,%di
mov    %di,(%rsi)
ret

LLVM IR (-O0):
define void @store_length(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = ashr i32 %5, 8
%7 = and i32 %6, 255
%8 = trunc i32 %7 to i8
%9 = load i8*, i8** %4
%10 = getelementptr inbounds i8, i8* %9, i64 0
store i8 %8, i8* %10
%11 = load i32, i32* %3
%12 = and i32 %11, 255
%13 = trunc i32 %12 to i8
%14 = load i8*, i8** %4
%15 = getelementptr inbounds i8, i8* %14, i64 1
store i8 %13, i8* %15
ret void
}

LLVM IR (-O2):
define void @store_length(i32 %0, i8* nocapture writeonly %1) {
%3 = lshr i32 %0, 8
%4 = trunc i32 %3 to i8
store i8 %4, i8* %1
%5 = trunc i32 %0 to i8
%6 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %5, i8* %6
ret void
}
/* Variables and functions */
scalar_t__ pollen_parts_Led1_isOn__E();
int /*<<< orphan*/ pollen_parts_Led1_off__E();
int /*<<< orphan*/ pollen_parts_Led1_on__E();
void pollen_parts_Led1_toggle__E() {
  if (pollen_parts_Led1_isOn__E()) {
    pollen_parts_Led1_off__E();
  } else {
    pollen_parts_Led1_on__E();
  }
}


x86 assembly (clang, -O0):
<pollen_parts_Led1_toggle__E>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <pollen_parts_Led1_isOn__E@plt>
cmp    $0x0,%rax
je     1151 <pollen_parts_Led1_toggle__E+0x21>
mov    $0x0,%al
call   1050 <pollen_parts_Led1_off__E@plt>
jmp    1158 <pollen_parts_Led1_toggle__E+0x28>
mov    $0x0,%al
call   1040 <pollen_parts_Led1_on__E@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pollen_parts_Led1_toggle__E>:
push   %rax
xor    %eax,%eax
call   1030 <pollen_parts_Led1_isOn__E@plt>
test   %rax,%rax
je     1145 <pollen_parts_Led1_toggle__E+0x15>
xor    %eax,%eax
pop    %rcx
jmp    1050 <pollen_parts_Led1_off__E@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <pollen_parts_Led1_on__E@plt>

LLVM IR (-O0):
define void @pollen_parts_Led1_toggle__E() {
%1 = call i64 (...) @pollen_parts_Led1_isOn__E()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 (...) @pollen_parts_Led1_off__E()
br label %7
5: ; preds = %0
%6 = call i32 (...) @pollen_parts_Led1_on__E()
br label %7
7: ; preds = %5, %3
ret void
}

LLVM IR (-O2):
define void @pollen_parts_Led1_toggle__E() {
%1 = tail call i64 (...) @pollen_parts_Led1_isOn__E()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @pollen_parts_Led1_off__E()
br label %7
5: ; preds = %0
%6 = tail call i32 (...) @pollen_parts_Led1_on__E()
br label %7
7: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, int);
void lcd_init() {
  printf("%s:%d\n",
         "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
         "2022-01-22/02-19-57/repos/beerriot/blockgame/refs/heads/master/test/"
         "mock/lcd.c",
         25);
}


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

x86 assembly (clang, -O2):
<lcd_init>:
lea    0xee9(%rip),%rdi
lea    0xee9(%rip),%rsi
mov    $0x19,%edx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"%s:%d\0A\00"
@.str.1 = [143 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/beerriot/blockgame/refs/heads/master/test/mock/lcd.c\00"
define void @lcd_init() {
%1 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([143 x i8], [143 x i8]* @.str.1, i64 0, i64 0), i32 25)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"%s:%d\0A\00"
@.str.1 = [143 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/beerriot/blockgame/refs/heads/master/test/mock/lcd.c\00"
define void @lcd_init() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([143 x i8], [143 x i8]* @.str.1, i64 0, i64 0), i32 25)
ret void
}
int DoObjPoly(char *s) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @DoObjPoly(i8* nocapture readnone %0) {
ret i32 1
}
void test_libsym1_2(void) {}


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

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

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

LLVM IR (-O2):
define void @test_libsym1_2() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct in_addr {
  int /*<<< orphan*/ member_0;
};

/* Variables and functions */
char *inet_ntoa(struct in_addr);
char *addr_to_string(uint32_t addr) {
  struct in_addr a = {addr};
  return inet_ntoa(a);
}


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

x86 assembly (clang, -O2):
<addr_to_string>:
jmp    1030 <inet_ntoa@plt>

LLVM IR (-O0):
%struct.in_addr = type { i32 }
define i8* @addr_to_string(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.in_addr
store i32 %0, i32* %2
%4 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %3, i32 0, i32 0
%5 = load i32, i32* %2
store i32 %5, i32* %4
%6 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %3, i32 0, i32 0
%7 = load i32, i32* %6
%8 = call i8* @inet_ntoa(i32 %7)
ret i8* %8
}

LLVM IR (-O2):
define i8* @addr_to_string(i32 %0) {
%2 = tail call i8* @inet_ntoa(i32 %0)
ret i8* %2
}
/* Variables and functions */
int __rdtscp(int *);
int get_access_time(volatile char *addr) {
  int time1, time2, junk;
  volatile int j;
  time1 = __rdtscp(&junk);
  j = *addr;
  time2 = __rdtscp(&junk);
  return time2 - time1;
}


x86 assembly (clang, -O0):
<get_access_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x14(%rbp),%rdi
call   1030 <__rdtscp@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
movsbl %al,%eax
mov    %eax,-0x18(%rbp)
lea    -0x14(%rbp),%rdi
call   1030 <__rdtscp@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
sub    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_access_time>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0xc(%rsp),%r14
mov    %r14,%rdi
call   1030 <__rdtscp@plt>
mov    %eax,%ebp
movsbl (%rbx),%eax
mov    %eax,0x8(%rsp)
mov    %r14,%rdi
call   1030 <__rdtscp@plt>
sub    %ebp,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @get_access_time(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %2
%7 = call i32 @__rdtscp(i32* %5)
store i32 %7, i32* %3
%8 = load i8*, i8** %2
%9 = load volatile i8, i8* %8
%10 = sext i8 %9 to i32
store volatile i32 %10, i32* %6
%11 = call i32 @__rdtscp(i32* %5)
store i32 %11, i32* %4
%12 = load i32, i32* %4
%13 = load i32, i32* %3
%14 = sub nsw i32 %12, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @get_access_time(i8* %0) {
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %2 to i8*
%5 = bitcast i32* %3 to i8*
%6 = call i32 @__rdtscp(i32* %2)
%7 = load volatile i8, i8* %0
%8 = sext i8 %7 to i32
store volatile i32 %8, i32* %3
%9 = call i32 @__rdtscp(i32* %2)
%10 = sub nsw i32 %9, %6
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ CInit();
int /*<<< orphan*/ any_one();
int /*<<< orphan*/ run();
int /*<<< orphan*/ runTransition(int /*<<< orphan*/);
int main() {
  CInit();
  runTransition(0);
  run();
  run();
  any_one();
  run();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <CInit@plt>
xor    %edi,%edi
call   1050 <runTransition@plt>
mov    $0x0,%al
call   1030 <run@plt>
mov    $0x0,%al
call   1030 <run@plt>
mov    $0x0,%al
call   1060 <any_one@plt>
mov    $0x0,%al
call   1030 <run@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <CInit@plt>
xor    %edi,%edi
call   1050 <runTransition@plt>
xor    %eax,%eax
call   1030 <run@plt>
xor    %eax,%eax
call   1030 <run@plt>
xor    %eax,%eax
call   1060 <any_one@plt>
xor    %eax,%eax
call   1030 <run@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @CInit()
%3 = call i32 @runTransition(i32 0)
%4 = call i32 (...) @run()
%5 = call i32 (...) @run()
%6 = call i32 (...) @any_one()
%7 = call i32 (...) @run()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @CInit()
%2 = tail call i32 @runTransition(i32 0)
%3 = tail call i32 (...) @run()
%4 = tail call i32 (...) @run()
%5 = tail call i32 (...) @any_one()
%6 = tail call i32 (...) @run()
ret i32 0
}
/* Variables and functions */
int getFPUStateX86();
int /*<<< orphan*/ printf(char *, int);
extern void showControlBits(void) { printf("FPU: 0x%04x\n", getFPUStateX86()); }


x86 assembly (clang, -O0):
<showControlBits>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <getFPUStateX86@plt>
mov    %eax,%esi
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<showControlBits>:
push   %rax
xor    %eax,%eax
call   1040 <getFPUStateX86@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"FPU: 0x%04x\0A\00"
define void @showControlBits() {
%1 = call i32 (...) @getFPUStateX86()
%2 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"FPU: 0x%04x\0A\00"
define void @showControlBits() {
%1 = tail call i32 (...) @getFPUStateX86()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
long su() { return 0xffff7fffL; }


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

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

LLVM IR (-O0):
define i64 @su() {
ret i64 4294934527
}

LLVM IR (-O2):
define i64 @su() {
ret i64 4294934527
}
void PushTrueArgumentSyntaxMapping(void) {}


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

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

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

LLVM IR (-O2):
define void @PushTrueArgumentSyntaxMapping() {
ret void
}
int test_int_5(int a, int b, int c, int d, int e) { return -2144725863; }


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

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

LLVM IR (-O0):
define i32 @test_int_5(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
ret i32 -2144725863
}

LLVM IR (-O2):
define i32 @test_int_5(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
ret i32 -2144725863
}
/* Variables and functions */
int /*<<< orphan*/ crypt(char const *, char const *);
int /*<<< orphan*/ strcmp(int /*<<< orphan*/, char const *);
int checkpw(const char *passwd, const char *pws) {
  return !strcmp(crypt(passwd, pws), pws);
}


x86 assembly (clang, -O0):
<checkpw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <crypt@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkpw>:
push   %rbx
mov    %rsi,%rbx
call   1030 <crypt@plt>
mov    %eax,%edi
mov    %rbx,%rsi
call   1040 <strcmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @checkpw(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @crypt(i8* %5, i8* %6)
%8 = load i8*, i8** %4
%9 = call i32 @strcmp(i32 %7, i8* %8)
%10 = icmp ne i32 %9, 0
%11 = xor i1 %10, true
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @checkpw(i8* %0, i8* %1) {
%3 = tail call i32 @crypt(i8* %0, i8* %1)
%4 = tail call i32 @strcmp(i32 %3, i8* %1)
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("usage: netwrite [-v | --version]     print the version number "
         "and exit\n"
         "       netwrite [-h | -? | --help]   print this help message "
         "and exit\n"
         "       netwrite                      inject the network "
         "packets\n\n");
  printf("The netwrite program is used to inject packets it receive on "
         "its standard input\n"
         "into the network at a low level. To work properly, this "
         "program needs to be run\n"
         "as root or with the cap_net_raw capability. The injection "
         "stops when receiving\n"
         "an INT, QUIT or TERM signal or stdin closes.\n");
}


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

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

LLVM IR (-O0):
@.str = [207 x i8] c"usage: netwrite [-v | --version] print the version number and exit\0A netwrite [-h | -? | --help] print this help message and exit\0A netwrite inject the network packets\0A\0A\00"
@.str.1 = [285 x i8] c"The netwrite program is used to inject packets it receive on its standard input\0Ainto the network at a low level. To work properly, this program needs to be run\0Aas root or with the cap_net_raw capability. The injection stops when receiving\0Aan INT, QUIT or TERM signal or stdin closes.\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([207 x i8], [207 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([285 x i8], [285 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [206 x i8] c"usage: netwrite [-v | --version] print the version number and exit\0A netwrite [-h | -? | --help] print this help message and exit\0A netwrite inject the network packets\0A\00"
@str.2 = [284 x i8] c"The netwrite program is used to inject packets it receive on its standard input\0Ainto the network at a low level. To work properly, this program needs to be run\0Aas root or with the cap_net_raw capability. The injection stops when receiving\0Aan INT, QUIT or TERM signal or stdin closes.\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([206 x i8], [206 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([284 x i8], [284 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
void *dlsym(void *, char const *);
void *dynload_sym(void *handle, const char *symbol) {
  return dlsym(handle, symbol);
}


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

x86 assembly (clang, -O2):
<dynload_sym>:
jmp    1030 <dlsym@plt>

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

LLVM IR (-O2):
define i8* @dynload_sym(i8* %0, i8* %1) {
%3 = tail call i8* @dlsym(i8* %0, i8* %1)
ret i8* %3
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t ct_lt_u64(uint64_t x, uint64_t y) {
  return (x ^ ((x ^ y) | ((x - y) ^ y))) >> 63;
}


x86 assembly (clang, -O0):
<ct_lt_u64>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
xor    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%edx
sub    -0x8(%rbp),%edx
xor    -0x8(%rbp),%edx
or     %edx,%ecx
xor    %ecx,%eax
mov    $0x3f,%ecx
sar    %cl,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @ct_lt_u64(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = xor i32 %6, %7
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = sub nsw i32 %9, %10
%12 = load i32, i32* %4
%13 = xor i32 %11, %12
%14 = or i32 %8, %13
%15 = xor i32 %5, %14
%16 = ashr i32 %15, 63
ret i32 %16
}

LLVM IR (-O2):
define i32 @ct_lt_u64(i32 %0, i32 %1) {
ret i32 poison
}
unsigned long lword(unsigned char *p) {
  unsigned long n;
  n = p[1];
  n = (n << 8) + p[0];
  return n;
}


x86 assembly (clang, -O0):
<lword>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%eax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shl    $0x8,%rax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lword>:
movzwl (%rdi),%eax
ret

LLVM IR (-O0):
define i64 @lword(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i64
store i64 %7, i64* %3
%8 = load i64, i64* %3
%9 = shl i64 %8, 8
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i64 0
%12 = load i8, i8* %11
%13 = zext i8 %12 to i64
%14 = add i64 %9, %13
store i64 %14, i64* %3
%15 = load i64, i64* %3
ret i64 %15
}

LLVM IR (-O2):
define i64 @lword(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %2
%4 = zext i8 %3 to i64
%5 = shl nuw nsw i64 %4, 8
%6 = load i8, i8* %0
%7 = zext i8 %6 to i64
%8 = or i64 %5, %7
ret i64 %8
}
/* Variables and functions */
int /*<<< orphan*/ move(int, int);
void set_cell(int row, int col) {
  int y, x;
  y = 2 * row - 1;
  x = 4 * col - 2;
  move(y, x);
}


x86 assembly (clang, -O0):
<set_cell>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x2,%eax
sub    $0x2,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <move@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_cell>:
add    %edi,%edi
add    $0xffffffff,%edi
lea    -0x2(,%rsi,4),%esi
jmp    1030 <move@plt>

LLVM IR (-O0):
define void @set_cell(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
%7 = load i32, i32* %3
%8 = mul nsw i32 2, %7
%9 = sub nsw i32 %8, 1
store i32 %9, i32* %5
%10 = load i32, i32* %4
%11 = mul nsw i32 4, %10
%12 = sub nsw i32 %11, 2
store i32 %12, i32* %6
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = call i32 @move(i32 %13, i32 %14)
ret void
}

LLVM IR (-O2):
define void @set_cell(i32 %0, i32 %1) {
%3 = shl nsw i32 %0, 1
%4 = add nsw i32 %3, -1
%5 = shl nsw i32 %1, 2
%6 = add nsw i32 %5, -2
%7 = tail call i32 @move(i32 %4, i32 %6)
ret void
}
/* Variables and functions */
char *malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
void read_config_item(char **dest, const char *value) {
  *dest = malloc(strlen(value) + 1);
  strcpy(*dest, value);
}


x86 assembly (clang, -O0):
<read_config_item>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @read_config_item(i8** %0, i8* %1) {
%3 = alloca i8**
%4 = alloca i8*
store i8** %0, i8*** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i64 @strlen(i8* %5)
%7 = add nsw i64 %6, 1
%8 = call i8* @malloc(i64 %7)
%9 = load i8**, i8*** %3
store i8* %8, i8** %9
%10 = load i8**, i8*** %3
%11 = load i8*, i8** %10
%12 = load i8*, i8** %4
%13 = call i32 @strcpy(i8* %11, i8* %12)
ret void
}

LLVM IR (-O2):
define void @read_config_item(i8** nocapture writeonly %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = add nsw i64 %3, 1
%5 = tail call i8* @malloc(i64 %4)
store i8* %5, i8** %0
%6 = tail call i32 @strcpy(i8* %5, i8* %1)
ret void
}
void border_nw_ext_corner_special_sand_short_hori(unsigned char *pic,
                                                  unsigned char *mirr) {
  *pic = 0x2B;
  *mirr = 0x01 | 0x02;
}


x86 assembly (clang, -O0):
<border_nw_ext_corner_special_sand_short_hori>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x2b,(%rax)
mov    -0x10(%rbp),%rax
movb   $0x3,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<border_nw_ext_corner_special_sand_short_hori>:
movb   $0x2b,(%rdi)
movb   $0x3,(%rsi)
ret

LLVM IR (-O0):
define void @border_nw_ext_corner_special_sand_short_hori(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
store i8 43, i8* %5
%6 = load i8*, i8** %4
store i8 3, i8* %6
ret void
}

LLVM IR (-O2):
define void @border_nw_ext_corner_special_sand_short_hori(i8* nocapture writeonly %0, i8* nocapture writeonly %1) {
store i8 43, i8* %0
store i8 3, i8* %1
ret void
}
/* Variables and functions */
int PAPI_get_multiplex(int);
void PAPIF_GET_MULTIPLEX(int *EventSet, int *check) {
  *check = PAPI_get_multiplex(*EventSet);
}


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

x86 assembly (clang, -O2):
<PAPIF_GET_MULTIPLEX>:
push   %rbx
mov    %rsi,%rbx
mov    (%rdi),%edi
call   1030 <PAPI_get_multiplex@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @PAPIF_GET_MULTIPLEX(i32* nocapture %0, i32* nocapture writeonly %1) {
%3 = load i32, i32* %0
%4 = tail call i32 @PAPI_get_multiplex(i32 %3)
store i32 %4, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  int a, b, c, undefined;
  int *pointer;
  a = 1;
  b = 10;
  if (undefined) {
    pointer = &a;
  } else {
    pointer = &b;
  }
  *pointer = 42;
  assert(a != 42);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0xa,-0xc(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1144 <main+0x34>
lea    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    114c <main+0x3c>
lea    -0xc(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movl   $0x2a,(%rax)
cmpl   $0x2a,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
ret i32 0
}
int readallspl() { int i, j, k; }


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

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

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

LLVM IR (-O2):
define i32 @readallspl() {
ret i32 undef
}
void BGRAToUVRow_C() {}


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

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

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

LLVM IR (-O2):
define void @BGRAToUVRow_C() {
ret void
}
int main(int arg, char **argv) { return __alignof(int) + __alignof arg; }


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 8
}
/* Type definitions */
struct SN_env {
  int dummy;
};

/* Variables and functions */
struct SN_env *SN_create_env(int /*<<< orphan*/, int, int /*<<< orphan*/);
extern struct SN_env *italian_ISO_8859_1_create_env(void) {
  return SN_create_env(0, 3, 0);
}


x86 assembly (clang, -O0):
<italian_ISO_8859_1_create_env>:
push   %rbp
mov    %rsp,%rbp
xor    %edx,%edx
mov    $0x3,%esi
mov    %edx,%edi
call   1030 <SN_create_env@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<italian_ISO_8859_1_create_env>:
xor    %edi,%edi
mov    $0x3,%esi
xor    %edx,%edx
jmp    1030 <SN_create_env@plt>

LLVM IR (-O0):
%struct.SN_env = type { i32 }
define %struct.SN_env* @italian_ISO_8859_1_create_env() {
%1 = call %struct.SN_env* @SN_create_env(i32 0, i32 3, i32 0)
ret %struct.SN_env* %1
}

LLVM IR (-O2):
%struct.SN_env = type { i32 }
define %struct.SN_env* @italian_ISO_8859_1_create_env() {
%1 = tail call %struct.SN_env* @SN_create_env(i32 0, i32 3, i32 0)
ret %struct.SN_env* %1
}
void cc3000_clear_pin_WL_EN(void) {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define void @cc3000_clear_pin_WL_EN() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ milli_delay(int);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
void test_b() {
  int i = 1;
  while (1) {
    printf("for %x years\n", i++);
    milli_delay(10000);
  }
}


x86 assembly (clang, -O0):
<test_b>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    %eax,-0x4(%rbp)
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    $0x2710,%edi
call   1040 <milli_delay@plt>
jmp    112f <test_b+0xf>

x86 assembly (clang, -O2):
<test_b>:
push   %rbp
push   %rbx
push   %rax
mov    $0x1,%esi
lea    0xed1(%rip),%rbx
nop
lea    0x1(%rsi),%ebp
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    $0x2710,%edi
call   1040 <milli_delay@plt>
mov    %ebp,%esi
jmp    1130 <test_b+0x10>

LLVM IR (-O0):
@.str = [14 x i8] c"for %x years\0A\00"
define void @test_b() {
%1 = alloca i32
store i32 1, i32* %1
br label %2
2: ; preds = %0, %2
%3 = load i32, i32* %1
%4 = add nsw i32 %3, 1
store i32 %4, i32* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %3)
%6 = call i32 @milli_delay(i32 10000)
br label %2
}

LLVM IR (-O2):
@.str = [14 x i8] c"for %x years\0A\00"
define void @test_b() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 1, %0 ], [ %3, %1 ]
%3 = add nuw nsw i32 %2, 1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %2)
%5 = tail call i32 @milli_delay(i32 10000)
br label %1
}
int main() {
  static int localstatic;
  return 0;
}


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

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

LLVM IR (-O0):
@main.localstatic = internal global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
char *utf8_next_char(char const *);
char *utf8_offset_to_pointer(char const *str, int offset) {
  if (offset < 0) {
    return NULL;
  }
  for (; offset--;) {
    str = utf8_next_char(str);
  }
  return (char *)str;
}


x86 assembly (clang, -O0):
<utf8_offset_to_pointer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1136 <utf8_offset_to_pointer+0x26>
movq   $0x0,-0x8(%rbp)
jmp    1169 <utf8_offset_to_pointer+0x59>
jmp    113b <utf8_offset_to_pointer+0x2b>
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x14(%rbp)
cmp    $0x0,%eax
je     1161 <utf8_offset_to_pointer+0x51>
mov    -0x10(%rbp),%rdi
call   1030 <utf8_next_char@plt>
mov    %rax,-0x10(%rbp)
jmp    113b <utf8_offset_to_pointer+0x2b>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<utf8_offset_to_pointer>:
push   %rbx
test   %esi,%esi
js     112f <utf8_offset_to_pointer+0x1f>
mov    %rdi,%rax
je     112d <utf8_offset_to_pointer+0x1d>
mov    %esi,%ebx
nopl   0x0(%rax)
mov    %rax,%rdi
call   1030 <utf8_next_char@plt>
add    $0xffffffff,%ebx
jne    1120 <utf8_offset_to_pointer+0x10>
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @utf8_offset_to_pointer(i8* %0, i32 %1) {
%3 = icmp slt i32 %1, 0
br i1 %3, label %12, label %4
4: ; preds = %2
%5 = icmp eq i32 %1, 0
br i1 %5, label %12, label %6
6: ; preds = %4, %6
%7 = phi i32 [ %9, %6 ], [ %1, %4 ]
%8 = phi i8* [ %10, %6 ], [ %0, %4 ]
%9 = add nsw i32 %7, -1
%10 = tail call i8* @utf8_next_char(i8* %8)
%11 = icmp eq i32 %9, 0
br i1 %11, label %12, label %6
12: ; preds = %6, %4, %2
%13 = phi i8* [ null, %2 ], [ %0, %4 ], [ %10, %6 ]
ret i8* %13
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int main() {
  unsigned ma, mb;
  unsigned long long accu;
  int ea, eb;
  accu >>= 24;
  accu >>= 1;
  assert(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x10(%rbp),%rax
shr    $0x18,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shr    $0x1,%rax
mov    %rax,-0x10(%rbp)
xor    %edi,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i64
%4 = alloca i32
%5 = alloca i32
%6 = load i64, i64* %3
%7 = lshr i64 %6, 24
store i64 %7, i64* %3
%8 = load i64, i64* %3
%9 = lshr i64 %8, 1
store i64 %9, i64* %3
%10 = call i32 @assert(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 0)
ret i32 0
}
/* Variables and functions */
int lprintf(char *);
int /*<<< orphan*/ memset(char *, char, int);
int /*<<< orphan*/ outstr(char *);
void printw(char *str) {
  int width = 40;
  char white[40];
  memset(white, '.', 40);
  width = width - lprintf(str);
  white[width + 1] = '\0';
  if (width > 0) {
    outstr(white);
  }
}


x86 assembly (clang, -O0):
<printw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x28,-0xc(%rbp)
lea    -0x40(%rbp),%rdi
mov    $0x2e,%esi
mov    $0x28,%edx
call   1040 <memset@plt>
mov    -0xc(%rbp),%eax
mov    %eax,-0x44(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <lprintf@plt>
mov    %eax,%ecx
mov    -0x44(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
cltq
movb   $0x0,-0x40(%rbp,%rax,1)
cmpl   $0x0,-0xc(%rbp)
jle    118f <printw+0x5f>
lea    -0x40(%rbp),%rdi
call   1030 <outstr@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printw>:
push   %rbx
sub    $0x30,%rsp
mov    %rdi,%rbx
mov    %rsp,%rdi
mov    $0x2e,%esi
mov    $0x28,%edx
call   1040 <memset@plt>
mov    %rbx,%rdi
call   1050 <lprintf@plt>
mov    $0x29,%ecx
sub    %eax,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rsp,%rcx,1)
cmp    $0x27,%eax
jg     116d <printw+0x3d>
mov    %rsp,%rdi
call   1030 <outstr@plt>
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @printw(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca [40 x i8]
store i8* %0, i8** %2
store i32 40, i32* %3
%5 = getelementptr inbounds [40 x i8], [40 x i8]* %4, i64 0, i64 0
%6 = call i32 @memset(i8* %5, i8 signext 46, i32 40)
%7 = load i32, i32* %3
%8 = load i8*, i8** %2
%9 = call i32 @lprintf(i8* %8)
%10 = sub nsw i32 %7, %9
store i32 %10, i32* %3
%11 = load i32, i32* %3
%12 = add nsw i32 %11, 1
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [40 x i8], [40 x i8]* %4, i64 0, i64 %13
store i8 0, i8* %14
%15 = load i32, i32* %3
%16 = icmp sgt i32 %15, 0
br i1 %16, label %17, label %20
17: ; preds = %1
%18 = getelementptr inbounds [40 x i8], [40 x i8]* %4, i64 0, i64 0
%19 = call i32 @outstr(i8* %18)
br label %20
20: ; preds = %17, %1
ret void
}

LLVM IR (-O2):
define void @printw(i8* %0) {
%2 = alloca [40 x i8]
%3 = getelementptr inbounds [40 x i8], [40 x i8]* %2, i64 0, i64 0
%4 = call i32 @memset(i8* %3, i8 signext 46, i32 40)
%5 = call i32 @lprintf(i8* %0)
%6 = sub i32 41, %5
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds [40 x i8], [40 x i8]* %2, i64 0, i64 %7
store i8 0, i8* %8
%9 = icmp slt i32 %5, 40
br i1 %9, label %10, label %12
10: ; preds = %1
%11 = call i32 @outstr(i8* %3)
br label %12
12: ; preds = %10, %1
ret void
}
/* Variables and functions */
int floor(double);
int pow(int, int);
double Trunc(double x, int n) {
  int power = pow(10, n);
  return floor(x * power) / power;
}


x86 assembly (clang, -O0):
<Trunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%esi
mov    $0xa,%edi
call   1030 <pow@plt>
mov    %eax,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
cvtsi2sdl -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
call   1040 <floor@plt>
cltd
idivl  -0x10(%rbp)
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Trunc>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%esi
movsd  %xmm0,0x8(%rsp)
mov    $0xa,%edi
call   1030 <pow@plt>
mov    %eax,%ebx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x8(%rsp),%xmm0
call   1040 <floor@plt>
cltd
idiv   %ebx
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @Trunc(double %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
%5 = alloca i32
store double %0, double* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = call i32 @pow(i32 10, i32 %6)
store i32 %7, i32* %5
%8 = load double, double* %3
%9 = load i32, i32* %5
%10 = sitofp i32 %9 to double
%11 = fmul double %8, %10
%12 = call i32 @floor(double %11)
%13 = load i32, i32* %5
%14 = sdiv i32 %12, %13
%15 = sitofp i32 %14 to double
ret double %15
}

LLVM IR (-O2):
define double @Trunc(double %0, i32 %1) {
%3 = tail call i32 @pow(i32 10, i32 %1)
%4 = sitofp i32 %3 to double
%5 = fmul double %4, %0
%6 = tail call i32 @floor(double %5)
%7 = sdiv i32 %6, %3
%8 = sitofp i32 %7 to double
ret double %8
}
/* Type definitions */
typedef int /*<<< orphan*/ XPoint;

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
void free_XPoint(void *_p) {
  if (_p == NULL)
    abort();
  free((XPoint *)_p);
}


x86 assembly (clang, -O0):
<free_XPoint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113e <free_XPoint+0x1e>
mov    $0x0,%al
call   1040 <abort@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_XPoint>:
test   %rdi,%rdi
je     112a <free_XPoint+0xa>
jmp    1030 <free@plt>
push   %rax
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
define void @free_XPoint(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = bitcast i8* %8 to i32*
%10 = call i32 @free(i32* %9)
ret void
}

LLVM IR (-O2):
define void @free_XPoint(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %1
%6 = bitcast i8* %0 to i32*
%7 = tail call i32 @free(i32* %6)
ret void
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
bool softfloat_eq128(uint64_t a64, uint64_t a0, uint64_t b64, uint64_t b0) {
  return (a64 == b64) && (a0 == b0);
}


x86 assembly (clang, -O0):
<softfloat_eq128>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rcx
xor    %eax,%eax
cmp    -0x18(%rbp),%rcx
mov    %al,-0x21(%rbp)
jne    1135 <softfloat_eq128+0x35>
mov    -0x10(%rbp),%rax
cmp    -0x20(%rbp),%rax
sete   %al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<softfloat_eq128>:
xor    %rdx,%rdi
xor    %rcx,%rsi
xor    %eax,%eax
or     %rdi,%rsi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @softfloat_eq128(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = icmp eq i64 %0, %2
%6 = icmp eq i64 %1, %3
%7 = and i1 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}