xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0xec() {
  Assert_real((isalpha(236) == 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_isalpha.c",
              1185, ("isalpha should be 0 for 0xec"));
}


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

x86 assembly (clang, -O2):
<t_isalpha_0xec>:
push   %rax
mov    $0xec,%edi
call   1030 <isalpha@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4a1,%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_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0xec\00"
define void @t_isalpha_0xec() {
%1 = call i64 @isalpha(i32 236)
%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 1185, 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_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0xec\00"
define void @t_isalpha_0xec() {
%1 = tail call i64 @isalpha(i32 236)
%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 1185, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_array(char **);
int main(void) {
  char array[2][3] = {{'z', 'y', 'x'}, {'a', 'b', 'c'}};
  print_array(array);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
movzwl 0xeec(%rip),%eax
mov    %ax,0x4(%rsp)
mov    0xedd(%rip),%eax
mov    %eax,(%rsp)
mov    %rsp,%rdi
call   1030 <print_array@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.array = [2 x [3 x i8]] [[3 x i8] c"zyx", [3 x i8] c"abc"]
define i32 @main() {
%1 = alloca i32
%2 = alloca [2 x [3 x i8]]
store i32 0, i32* %1
%3 = bitcast [2 x [3 x i8]]* %2 to i8*
%4 = getelementptr inbounds [2 x [3 x i8]], [2 x [3 x i8]]* %2, i64 0, i64 0
%5 = bitcast [3 x i8]* %4 to i8**
%6 = call i32 @print_array(i8** %5)
ret i32 0
}

LLVM IR (-O2):
@__const.main.array = [2 x [3 x i8]] [[3 x i8] c"zyx", [3 x i8] c"abc"]
define i32 @main() {
%1 = alloca [2 x [3 x i8]]
%2 = getelementptr inbounds [2 x [3 x i8]], [2 x [3 x i8]]* %1, i64 0, i64 0, i64 0
%3 = bitcast [2 x [3 x i8]]* %1 to i8**
%4 = call i32 @print_array(i8** %3)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void set_chain_addr(uint32_t addr[8], uint32_t chain) { addr[6] = chain; }


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

x86 assembly (clang, -O2):
<set_chain_addr>:
mov    %esi,0x18(%rdi)
ret

LLVM IR (-O0):
define void @set_chain_addr(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32*, i32** %3
%7 = getelementptr inbounds i32, i32* %6, i64 6
store i32 %5, i32* %7
ret void
}

LLVM IR (-O2):
define void @set_chain_addr(i32* nocapture writeonly %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 6
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ BFS(int);
int /*<<< orphan*/ DFS(int);
int /*<<< orphan*/ create_mat(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int size, i, j;
  printf("Enter the size of matrix: ");
  scanf("%d", &size);
  create_mat(size);
  BFS(size);
  DFS(size);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe9a(%rip),%rdi
call   1040 <printf@plt>
lea    0xea9(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1070 <create_mat@plt>
mov    -0x8(%rbp),%edi
call   1030 <BFS@plt>
mov    -0x8(%rbp),%edi
call   1060 <DFS@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xea8(%rip),%rdi
call   1040 <printf@plt>
lea    0xeb7(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1070 <create_mat@plt>
mov    0x4(%rsp),%edi
call   1030 <BFS@plt>
mov    0x4(%rsp),%edi
call   1060 <DFS@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Enter the size of matrix: \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%7 = load i32, i32* %2
%8 = call i32 @create_mat(i32 %7)
%9 = load i32, i32* %2
%10 = call i32 @BFS(i32 %9)
%11 = load i32, i32* %2
%12 = call i32 @DFS(i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"Enter the size of matrix: \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @create_mat(i32 %5)
%7 = load i32, i32* %1
%8 = call i32 @BFS(i32 %7)
%9 = load i32, i32* %1
%10 = call i32 @DFS(i32 %9)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ by_ptr_pp(int /*<<< orphan*/);
int /*<<< orphan*/ shl();
void shl_by_ptr_pp(uint32_t x) {
  by_ptr_pp(x);
  shl();
}


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

x86 assembly (clang, -O2):
<shl_by_ptr_pp>:
push   %rax
call   1040 <by_ptr_pp@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <shl@plt>

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

LLVM IR (-O2):
define void @shl_by_ptr_pp(i32 %0) {
%2 = tail call i32 @by_ptr_pp(i32 %0)
%3 = tail call i32 (...) @shl()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bar4();
void foobar4() { bar4(); }


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

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

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

LLVM IR (-O2):
define void @foobar4() {
%1 = tail call i32 (...) @bar4()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_t;

/* Variables and functions */
int ENOSYS;
int pthread_detach(pthread_t thread) { return -ENOSYS; }


x86 assembly (clang, -O0):
<pthread_detach>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
mov    0x2ed8(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @pthread_detach(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @ENOSYS
%4 = sub nsw i32 0, %3
ret i32 %4
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @pthread_detach(i32 %0) {
%2 = load i32, i32* @ENOSYS
%3 = sub nsw i32 0, %2
ret i32 %3
}
/* Variables and functions */
scalar_t__ COND_LT();
int /*<<< orphan*/ EA_AL_8();
int /*<<< orphan*/ m68ki_write_8(int /*<<< orphan*/, int);
void m68k_op_slt_8_al(void) { m68ki_write_8(EA_AL_8(), COND_LT() ? 0xff : 0); }


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

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

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

LLVM IR (-O2):
define void @m68k_op_slt_8_al() {
%1 = tail call i32 (...) @EA_AL_8()
%2 = tail call i64 (...) @COND_LT()
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 0, i32 255
%5 = tail call i32 @m68ki_write_8(i32 %1, i32 %4)
ret void
}
unsigned long insert_bdp(insn, value, errmsg)
unsigned long insn;
long value;
const char **errmsg;
{
  if ((value & 0x8000) == 0)
    insn |= 1 << 21;
  return insn | (value & 0xfffc);
}


x86 assembly (clang, -O0):
<insert_bdp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
and    $0x8000,%rax
cmp    $0x0,%rax
jne    1132 <insert_bdp+0x32>
mov    -0x8(%rbp),%rax
or     $0x200000,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
and    $0xfffc,%rcx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<insert_bdp>:
mov    %esi,%eax
shl    $0x6,%eax
not    %eax
and    $0x200000,%eax
and    $0xfffc,%esi
or     %rdi,%rsi
or     %rsi,%rax
ret

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

LLVM IR (-O2):
define i64 @insert_bdp(i64 %0, i64 %1, i8** nocapture readnone %2) {
%4 = shl i64 %1, 6
%5 = and i64 %4, 2097152
%6 = xor i64 %5, 2097152
%7 = and i64 %1, 65532
%8 = or i64 %7, %0
%9 = or i64 %8, %6
ret i64 %9
}
void func1(int *a) { *a = 100; }


x86 assembly (clang, -O0):
<func1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x64,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<func1>:
movl   $0x64,(%rdi)
ret

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

LLVM IR (-O2):
define void @func1(i32* nocapture writeonly %0) {
store i32 100, i32* %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int pes_get_headerlength(int /*<<< orphan*/ *);
uint8_t *pes_payload(uint8_t *p_pes) {
  return p_pes + 6 + pes_get_headerlength(p_pes);
}


x86 assembly (clang, -O0):
<pes_payload>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x18,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <pes_get_headerlength@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pes_payload>:
push   %rbx
mov    %rdi,%rbx
call   1030 <pes_get_headerlength@plt>
cltq
lea    (%rbx,%rax,4),%rax
add    $0x18,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i32* @pes_payload(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 6
%5 = load i32*, i32** %2
%6 = call i32 @pes_get_headerlength(i32* %5)
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* %4, i64 %7
ret i32* %8
}

LLVM IR (-O2):
define i32* @pes_payload(i32* %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 6
%3 = tail call i32 @pes_get_headerlength(i32* %0)
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i32, i32* %2, i64 %4
ret i32* %5
}
void test6(void) {
  static unsigned char data[4] = {"\xFF\xFF\xFF\xFF"};
  unsigned int a = 0;
  __asm__ volatile("mov (%1), %0 \n" : "=r"(a) : "r"(data));
  assert(a == 0xffffffff);
}


x86 assembly (clang, -O0):
<test6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0x2f02(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
cmpl   $0xffffffff,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test6>:
lea    0x2f11(%rip),%rax
mov    (%rax),%eax
xor    %edi,%edi
cmp    $0xffffffff,%eax
sete   %dil
xor    %eax,%eax
jmp    1030 <assert@plt>

LLVM IR (-O0):
@test6.data = internal global [4 x i8] c"\FF\FF\FF\FF"
define void @test6() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 asm sideeffect "mov ($1), $0 \0A", "=r,r,~{dirflag},~{fpsr},~{flags}"(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @test6.data, i64 0, i64 0))
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = icmp eq i32 %3, -1
%5 = zext i1 %4 to i32
%6 = call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %5)
ret void
}

LLVM IR (-O2):
@test6.data = internal global [4 x i8] c"\FF\FF\FF\FF"
define void @test6() {
%1 = tail call i32 asm sideeffect "mov ($1), $0 \0A", "=r,r,~{dirflag},~{fpsr},~{flags}"(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @test6.data, i64 0, i64 0))
%2 = icmp eq i32 %1, -1
%3 = zext i1 %2 to i32
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char string[20] = "dfdfdgdfdgffdgd";
  char *string2;
  string2 = string;
  printf("%s\n", string2);
  printf("%p\n", string2);
  printf("%p\n", string);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xedc(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rsi
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
mov    -0x28(%rbp),%rsi
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
lea    -0x20(%rbp),%rsi
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
movaps 0xee2(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x0,0x10(%rsp)
lea    0xee3(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1030 <printf@plt>
lea    0xed5(%rip),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@__const.main.string = [20 x i8] c"dfdfdgdfdgffdgd\00\00\00\00\00"
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [4 x i8] c"%p\0A\00"
define i32 @main() {
%1 = alloca [20 x i8]
%2 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ sleep(int);
void eat(int argi) {
  printf("I'm philosopher #%d,I will eat for %d seconds\n", argi, argi + 3);
  sleep(argi + 3);
}


x86 assembly (clang, -O0):
<eat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x4(%rbp),%edx
add    $0x3,%edx
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
add    $0x3,%edi
call   1040 <sleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eat>:
push   %rbx
mov    %edi,%esi
lea    0x3(%rsi),%ebx
lea    0xed3(%rip),%rdi
mov    %ebx,%edx
call   1030 <printf@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <sleep@plt>

LLVM IR (-O0):
@.str = [47 x i8] c"I'm philosopher #%d,I will eat for %d seconds\0A\00"
define void @eat(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = add nsw i32 %4, 3
%6 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %5)
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 3
%9 = call i32 @sleep(i32 %8)
ret void
}

LLVM IR (-O2):
@.str = [47 x i8] c"I'm philosopher #%d,I will eat for %d seconds\0A\00"
define void @eat(i32 %0) {
%2 = add nsw i32 %0, 3
%3 = tail call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %2)
%4 = tail call i32 @sleep(i32 %2)
ret void
}
int RigaColonna(int rx, int ry, int rgx, int rgy) {
  int mangia = 0;
  if (rx == rgx || ry == rgy)
    mangia = 1;
  return (mangia);
}


x86 assembly (clang, -O0):
<RigaColonna>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     112f <RigaColonna+0x2f>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    1136 <RigaColonna+0x36>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<RigaColonna>:
cmp    %edx,%edi
sete   %al
cmp    %ecx,%esi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @RigaColonna(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp eq i32 %0, %2
%6 = icmp eq i32 %1, %3
%7 = or i1 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int pinyin_strncasecmp(unsigned short const *, unsigned short const *, int);
int pinyin_strcasecmp(const unsigned short *str1, const unsigned short *str2) {
  return pinyin_strncasecmp(str1, str2, -1);
}


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

x86 assembly (clang, -O2):
<pinyin_strcasecmp>:
mov    $0xffffffff,%edx
jmp    1030 <pinyin_strncasecmp@plt>

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

LLVM IR (-O2):
define i32 @pinyin_strcasecmp(i16* %0, i16* %1) {
%3 = tail call i32 @pinyin_strncasecmp(i16* %0, i16* %1, i32 -1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ gen_call(char *);
int /*<<< orphan*/ gen_pop();
void gen_greater_than(void) {
  gen_pop();
  gen_call("_gt");
}


x86 assembly (clang, -O0):
<gen_greater_than>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <gen_pop@plt>
lea    0xece(%rip),%rdi
call   1040 <gen_call@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_greater_than>:
push   %rax
xor    %eax,%eax
call   1030 <gen_pop@plt>
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1040 <gen_call@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"_gt\00"
define void @gen_greater_than() {
%1 = call i32 (...) @gen_pop()
%2 = call i32 @gen_call(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"_gt\00"
define void @gen_greater_than() {
%1 = tail call i32 (...) @gen_pop()
%2 = tail call i32 @gen_call(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
void destroy_ssl(struct http_data *hd) {}


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

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

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

LLVM IR (-O2):
%struct.http_data = type opaque
define void @destroy_ssl(%struct.http_data* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int syscall(int, int /*<<< orphan*/, int);
int kill(pid_t pid, int sig) { return syscall(37, pid, sig); }


x86 assembly (clang, -O0):
<kill>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    $0x25,%edi
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kill>:
mov    %esi,%edx
mov    %edi,%esi
mov    $0x25,%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
define i32 @kill(i32 %0, i32 %1) {
%3 = tail call i32 @syscall(i32 37, i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int, int, int);
int main(int argc, char **argv) {
  printf("%d %d %d %d %d\n", (int)sizeof(int), (int)sizeof(long),
         (int)sizeof(long *), (int)sizeof(short), (int)sizeof(long long));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rdi
mov    $0x4,%esi
mov    $0x8,%r9d
mov    $0x2,%r8d
mov    %r9d,%edx
mov    %r9d,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x4,%esi
mov    $0x8,%edx
mov    $0x8,%ecx
mov    $0x2,%r8d
mov    $0x8,%r9d
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"%d %d %d %d %d\0A\00"
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
%6 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 4, i32 8, i32 8, i32 2, i32 8)
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"%d %d %d %d %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 4, i32 8, i32 8, i32 2, i32 8)
ret i32 0
}
/* Variables and functions */
char *getPath2(int /*<<< orphan*/, char *);
int /*<<< orphan*/ getUserGameDataDir();
char *getUserSoundsDir() {
  static char *usersounds_dir = NULL;
  if (usersounds_dir == NULL)
    usersounds_dir = getPath2(getUserGameDataDir(), "sounds");
  return usersounds_dir;
}


x86 assembly (clang, -O0):
<getUserSoundsDir>:
push   %rbp
mov    %rsp,%rbp
cmpq   $0x0,0x2f0c(%rip)
jne    114e <getUserSoundsDir+0x2e>
mov    $0x0,%al
call   1030 <getUserGameDataDir@plt>
mov    %eax,%edi
lea    0xebe(%rip),%rsi
call   1040 <getPath2@plt>
mov    %rax,0x2eea(%rip)
mov    0x2ee3(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getUserSoundsDir>:
push   %rax
mov    0x2f10(%rip),%rax
test   %rax,%rax
je     112f <getUserSoundsDir+0xf>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <getUserGameDataDir@plt>
lea    0xec3(%rip),%rsi
mov    %eax,%edi
call   1040 <getPath2@plt>
mov    %rax,0x2eed(%rip)
pop    %rcx
ret

LLVM IR (-O0):
@getUserSoundsDir.usersounds_dir = internal global i8* null
@.str = [7 x i8] c"sounds\00"
define i8* @getUserSoundsDir() {
%1 = load i8*, i8** @getUserSoundsDir.usersounds_dir
%2 = icmp eq i8* %1, null
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = call i32 (...) @getUserGameDataDir()
%5 = call i8* @getPath2(i32 %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
store i8* %5, i8** @getUserSoundsDir.usersounds_dir
br label %6
6: ; preds = %3, %0
%7 = load i8*, i8** @getUserSoundsDir.usersounds_dir
ret i8* %7
}

LLVM IR (-O2):
@getUserSoundsDir.usersounds_dir = internal unnamed_addr global i8* null
@.str = [7 x i8] c"sounds\00"
define i8* @getUserSoundsDir() {
%1 = load i8*, i8** @getUserSoundsDir.usersounds_dir
%2 = icmp eq i8* %1, null
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = tail call i32 (...) @getUserGameDataDir()
%5 = tail call i8* @getPath2(i32 %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
store i8* %5, i8** @getUserSoundsDir.usersounds_dir
br label %6
6: ; preds = %3, %0
%7 = phi i8* [ %5, %3 ], [ %1, %0 ]
ret i8* %7
}
/* Variables and functions */
bool IsFieldDelimiter(char c) { return c == '.'; }


x86 assembly (clang, -O0):
<IsFieldDelimiter>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x2e,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsFieldDelimiter>:
xor    %eax,%eax
cmp    $0x2e,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @IsFieldDelimiter(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 46
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @IsFieldDelimiter(i8 signext %0) {
%2 = icmp eq i8 %0, 46
%3 = zext i1 %2 to i32
ret i32 %3
}
void _lib_exit() {}


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

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

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

LLVM IR (-O2):
define void @_lib_exit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ crcAlgorithm(char *, int, int);
int main() {
  char dataword[] = {'1', '0', '1', '1'};
  crcAlgorithm(dataword, 7, 4);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xee2(%rip),%eax
mov    %eax,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
mov    $0x7,%esi
mov    $0x4,%edx
call   1030 <crcAlgorithm@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x31313031,0x4(%rsp)
31
lea    0x4(%rsp),%rdi
mov    $0x7,%esi
mov    $0x4,%edx
call   1030 <crcAlgorithm@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.dataword = [4 x i8] c"1011"
define i32 @main() {
%1 = alloca [4 x i8]
%2 = bitcast [4 x i8]* %1 to i8*
%3 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%4 = call i32 @crcAlgorithm(i8* %3, i32 7, i32 4)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 825307185, i32* %1
%3 = call i32 @crcAlgorithm(i8* %2, i32 7, i32 4)
ret i32 0
}
const char *svn_version() {
  const char *SVN_Version = "0.42";
  return SVN_Version;
}


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

x86 assembly (clang, -O2):
<svn_version>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [5 x i8] c"0.42\00"
define i8* @svn_version() {
%1 = alloca i8*
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
ret i8* %2
}

LLVM IR (-O2):
@.str = [5 x i8] c"0.42\00"
define i8* @svn_version() {
ret i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
}
void transfer_BGR8888_to_BGR8888(unsigned char *(*output),
                                 unsigned char *input) {
  *(*output)++ = input[0];
  *(*output)++ = input[1];
  *(*output)++ = input[2];
  (*output)++;
}


x86 assembly (clang, -O0):
<transfer_BGR8888_to_BGR8888>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x8(%rbp),%rdx
mov    (%rdx),%rax
mov    %rax,%rsi
add    $0x1,%rsi
mov    %rsi,(%rdx)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x8(%rbp),%rdx
mov    (%rdx),%rax
mov    %rax,%rsi
add    $0x1,%rsi
mov    %rsi,(%rdx)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
mov    0x2(%rax),%cl
mov    -0x8(%rbp),%rdx
mov    (%rdx),%rax
mov    %rax,%rsi
add    $0x1,%rsi
mov    %rsi,(%rdx)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<transfer_BGR8888_to_BGR8888>:
mov    (%rsi),%al
mov    (%rdi),%rcx
lea    0x1(%rcx),%rdx
mov    %rdx,(%rdi)
mov    %al,(%rcx)
mov    0x1(%rsi),%al
mov    (%rdi),%rcx
lea    0x1(%rcx),%rdx
mov    %rdx,(%rdi)
mov    %al,(%rcx)
mov    0x2(%rsi),%al
mov    (%rdi),%rcx
lea    0x1(%rcx),%rdx
mov    %rdx,(%rdi)
mov    %al,(%rcx)
addq   $0x1,(%rdi)
ret

LLVM IR (-O0):
define void @transfer_BGR8888_to_BGR8888(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 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = load i8**, i8*** %3
%9 = load i8*, i8** %8
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %8
store i8 %7, i8* %9
%11 = load i8*, i8** %4
%12 = getelementptr inbounds i8, i8* %11, i64 1
%13 = load i8, i8* %12
%14 = load i8**, i8*** %3
%15 = load i8*, i8** %14
%16 = getelementptr inbounds i8, i8* %15, i32 1
store i8* %16, i8** %14
store i8 %13, i8* %15
%17 = load i8*, i8** %4
%18 = getelementptr inbounds i8, i8* %17, i64 2
%19 = load i8, i8* %18
%20 = load i8**, i8*** %3
%21 = load i8*, i8** %20
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %20
store i8 %19, i8* %21
%23 = load i8**, i8*** %3
%24 = load i8*, i8** %23
%25 = getelementptr inbounds i8, i8* %24, i32 1
store i8* %25, i8** %23
ret void
}

LLVM IR (-O2):
define void @transfer_BGR8888_to_BGR8888(i8** nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = load i8*, i8** %0
%5 = getelementptr inbounds i8, i8* %4, i64 1
store i8* %5, i8** %0
store i8 %3, i8* %4
%6 = getelementptr inbounds i8, i8* %1, i64 1
%7 = load i8, i8* %6
%8 = load i8*, i8** %0
%9 = getelementptr inbounds i8, i8* %8, i64 1
store i8* %9, i8** %0
store i8 %7, i8* %8
%10 = getelementptr inbounds i8, i8* %1, i64 2
%11 = load i8, i8* %10
%12 = load i8*, i8** %0
%13 = getelementptr inbounds i8, i8* %12, i64 1
store i8* %13, i8** %0
store i8 %11, i8* %12
%14 = load i8*, i8** %0
%15 = getelementptr inbounds i8, i8* %14, i64 1
store i8* %15, i8** %0
ret void
}
/* Variables and functions */
int pioneer_send_string(unsigned char *, int);
int carmen_base_direct_send_binary_data(unsigned char *data, int size) {
  return pioneer_send_string(data, size);
}


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

x86 assembly (clang, -O2):
<carmen_base_direct_send_binary_data>:
jmp    1030 <pioneer_send_string@plt>

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

LLVM IR (-O2):
define i32 @carmen_base_direct_send_binary_data(i8* %0, i32 %1) {
%3 = tail call i32 @pioneer_send_string(i8* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
char *skip_wdvarname(char const *, int);
int is_wdvarname(const char *s, int aok) {
  const char *p = skip_wdvarname(s, aok);
  return (p != s && p[0] == 0);
}


x86 assembly (clang, -O0):
<is_wdvarname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <skip_wdvarname@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rcx
xor    %eax,%eax
cmp    -0x8(%rbp),%rcx
mov    %al,-0x19(%rbp)
je     1152 <is_wdvarname+0x42>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
sete   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_wdvarname>:
push   %rbx
mov    %rdi,%rbx
call   1030 <skip_wdvarname@plt>
cmp    %rbx,%rax
je     112b <is_wdvarname+0x1b>
mov    %rax,%rcx
xor    %eax,%eax
cmpb   $0x0,(%rcx)
sete   %al
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @is_wdvarname(i8* %0, i32 %1) {
%3 = tail call i8* @skip_wdvarname(i8* %0, i32 %1)
%4 = icmp eq i8* %3, %0
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = load i8, i8* %3
%7 = icmp eq i8 %6, 0
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %5, %2
%10 = phi i32 [ 0, %2 ], [ %8, %5 ]
ret i32 %10
}
/* Variables and functions */
scalar_t__ sqrt(double);
float sqrt2(float x) { return (float)sqrt((double)x); }


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

x86 assembly (clang, -O2):
<sqrt2>:
push   %rax
cvtss2sd %xmm0,%xmm0
call   1030 <sqrt@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

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

LLVM IR (-O2):
define float @sqrt2(float %0) {
%2 = fpext float %0 to double
%3 = tail call i64 @sqrt(double %2)
%4 = sitofp i64 %3 to float
ret float %4
}
/* Type definitions */
struct vec3i {
  int dummy;
};
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ vec3i_project(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                                 int /*<<< orphan*/ *);
__attribute__((always_)) struct vec3i *
psvec3i_project(struct vec3i *result, struct vec3i *a, struct vec3i *b) {
  vec3i_project((int32_t *)result, (int32_t *)a, (int32_t *)b);
  return result;
}


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

x86 assembly (clang, -O2):
<psvec3i_project>:
push   %rbx
mov    %rdi,%rbx
call   1030 <vec3i_project@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.vec3i = type { i32 }
define %struct.vec3i* @psvec3i_project(%struct.vec3i* %0, %struct.vec3i* %1, %struct.vec3i* %2) {
%4 = alloca %struct.vec3i*
%5 = alloca %struct.vec3i*
%6 = alloca %struct.vec3i*
store %struct.vec3i* %0, %struct.vec3i** %4
store %struct.vec3i* %1, %struct.vec3i** %5
store %struct.vec3i* %2, %struct.vec3i** %6
%7 = load %struct.vec3i*, %struct.vec3i** %4
%8 = bitcast %struct.vec3i* %7 to i32*
%9 = load %struct.vec3i*, %struct.vec3i** %5
%10 = bitcast %struct.vec3i* %9 to i32*
%11 = load %struct.vec3i*, %struct.vec3i** %6
%12 = bitcast %struct.vec3i* %11 to i32*
%13 = call i32 @vec3i_project(i32* %8, i32* %10, i32* %12)
%14 = load %struct.vec3i*, %struct.vec3i** %4
ret %struct.vec3i* %14
}

LLVM IR (-O2):
%struct.vec3i = type { i32 }
define %struct.vec3i* @psvec3i_project(%struct.vec3i* returned %0, %struct.vec3i* %1, %struct.vec3i* %2) {
%4 = getelementptr %struct.vec3i, %struct.vec3i* %0, i64 0, i32 0
%5 = getelementptr %struct.vec3i, %struct.vec3i* %1, i64 0, i32 0
%6 = getelementptr %struct.vec3i, %struct.vec3i* %2, i64 0, i32 0
%7 = tail call i32 @vec3i_project(i32* %4, i32* %5, i32* %6)
ret %struct.vec3i* %0
}
/* Variables and functions */
int /*<<< orphan*/ printf2(char *);
void GenPrintOperandSeparator(void) { printf2(","); }


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

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

LLVM IR (-O0):
@.str = [2 x i8] c",\00"
define void @GenPrintOperandSeparator() {
%1 = call i32 @printf2(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c",\00"
define void @GenPrintOperandSeparator() {
%1 = tail call i32 @printf2(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ init_input_buf(char const *, unsigned long long);
void pevent_buffer_init(const char *buf, unsigned long long size) {
  init_input_buf(buf, size);
}


x86 assembly (clang, -O0):
<pevent_buffer_init>:
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 <init_input_buf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pevent_buffer_init>:
jmp    1030 <init_input_buf@plt>

LLVM IR (-O0):
define void @pevent_buffer_init(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 = call i32 @init_input_buf(i8* %5, i64 %6)
ret void
}

LLVM IR (-O2):
define void @pevent_buffer_init(i8* %0, i64 %1) {
%3 = tail call i32 @init_input_buf(i8* %0, i64 %1)
ret void
}
void foo330() {}


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

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

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

LLVM IR (-O2):
define void @foo330() {
ret void
}
int split_huge_page(struct page *page) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.page = type opaque
define i32 @split_huge_page(%struct.page* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ orgfx_wait(int);
void Set800x600_60(void) {
  *((volatile unsigned int *)((0x97000000 + 0x008))) =
      ((128 - 1) << 24) | ((88 - 1) << 16) | (800 - 1);
  *((volatile unsigned int *)((0x97000000 + 0x00c))) =
      ((4 - 1) << 24) | ((23 - 1) << 16) | (600 - 1);
  *((volatile unsigned int *)((0x97000000 + 0x010))) =
      ((1056 - 1) << 16) | (628 - 1);
  orgfx_wait(2);
  *((volatile unsigned int *)((0xB8000000 + 0x14))) = 800;
  *((volatile unsigned int *)((0xB8000000 + 0x18))) = 600;
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    $0x97000008,%eax
movl   $0x7f57031f,(%rax)
mov    $0x9700000c,%eax
movl   $0x3160257,(%rax)
mov    $0x97000010,%eax
movl   $0x41f0273,(%rax)
mov    $0x2,%edi
call   1030 <orgfx_wait@plt>
mov    $0xb8000014,%eax
movl   $0x320,(%rax)
mov    $0xb8000018,%eax
movl   $0x258,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %rbx
mov    $0x97000008,%ebx
movl   $0x7f57031f,(%rbx)
movl   $0x3160257,0x4(%rbx)
movl   $0x41f0273,0x8(%rbx)
mov    $0x2,%edi
call   1030 <orgfx_wait@plt>
movl   $0x320,0x2100000c(%rbx)
movl   $0x258,0x21000010(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @Set800x600_60() {
store volatile i32 2136408863, i32* inttoptr (i64 2533359624 to i32*)
store volatile i32 51774039, i32* inttoptr (i64 2533359628 to i32*)
store volatile i32 69141107, i32* inttoptr (i64 2533359632 to i32*)
%1 = call i32 @orgfx_wait(i32 2)
store volatile i32 800, i32* inttoptr (i64 3087007764 to i32*)
store volatile i32 600, i32* inttoptr (i64 3087007768 to i32*)
ret void
}

LLVM IR (-O2):
define void @Set800x600_60() {
store volatile i32 2136408863, i32* inttoptr (i64 2533359624 to i32*)
store volatile i32 51774039, i32* inttoptr (i64 2533359628 to i32*)
store volatile i32 69141107, i32* inttoptr (i64 2533359632 to i32*)
%1 = tail call i32 @orgfx_wait(i32 2)
store volatile i32 800, i32* inttoptr (i64 3087007764 to i32*)
store volatile i32 600, i32* inttoptr (i64 3087007768 to i32*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ insertion_sort();
int main(void) {
  insertion_sort();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @insertion_sort()
ret i32 0
}
int f3(int a[]) { return sizeof a / sizeof *a; }


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

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

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

LLVM IR (-O2):
define i32 @f3(i32* nocapture readnone %0) {
ret i32 2
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ nios_pkt_32x32_pack(int *, int, int, int /*<<< orphan*/,
                                       int /*<<< orphan*/);
void nios_pkt_32x32_resp_pack(uint8_t *buf, uint8_t target, bool write,
                              uint32_t addr, uint32_t data, bool success) {
  nios_pkt_32x32_pack(buf, target, write, addr, data);
  if (success) {
    buf[2] |= (1 << 1);
  }
}


x86 assembly (clang, -O0):
<nios_pkt_32x32_resp_pack>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9d,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
call   1030 <nios_pkt_32x32_pack@plt>
cmpl   $0x0,-0x1c(%rbp)
je     115a <nios_pkt_32x32_resp_pack+0x4a>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%ecx
or     $0x2,%ecx
mov    %ecx,0x8(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nios_pkt_32x32_resp_pack>:
push   %rbp
push   %rbx
push   %rax
mov    %r9d,%ebp
mov    %rdi,%rbx
call   1030 <nios_pkt_32x32_pack@plt>
test   %ebp,%ebp
je     1126 <nios_pkt_32x32_resp_pack+0x16>
orb    $0x2,0x8(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @nios_pkt_32x32_resp_pack(i32* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = tail call i32 @nios_pkt_32x32_pack(i32* %0, i32 %1, i32 %2, i32 %3, i32 %4)
%8 = icmp eq i32 %5, 0
br i1 %8, label %13, label %9
9: ; preds = %6
%10 = getelementptr inbounds i32, i32* %0, i64 2
%11 = load i32, i32* %10
%12 = or i32 %11, 2
store i32 %12, i32* %10
br label %13
13: ; preds = %9, %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() { printf("hello world\n "); }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"hello world\0A \00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"hello world\0A \00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}