xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_v2(void) { printf("Goodbye\n"); }


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

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

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

LLVM IR (-O2):
@str = [8 x i8] c"Goodbye\00"
define void @print_v2() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret void
}
char *procprt_RGROW_e(struct tstat *curstat, int avgval, int nsecs) {
  return "    0K";
}


x86 assembly (clang, -O0):
<procprt_RGROW_e>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
lea    0xeeb(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.tstat = type opaque
@.str = [7 x i8] c" 0K\00"
define i8* @procprt_RGROW_e(%struct.tstat* %0, i32 %1, i32 %2) {
%4 = alloca %struct.tstat*
%5 = alloca i32
%6 = alloca i32
store %struct.tstat* %0, %struct.tstat** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
%struct.tstat = type opaque
@.str = [7 x i8] c" 0K\00"
define i8* @procprt_RGROW_e(%struct.tstat* nocapture readnone %0, i32 %1, i32 %2) {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ t5f();
void t5() { t5f(); }


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

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

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

LLVM IR (-O2):
define void @t5() {
%1 = tail call i32 (...) @t5f()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello Mundo! Bacon Rulez!\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [26 x i8] c"Hello Mundo! Bacon Rulez!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
ret i32 0
}
char *lcd_inputbuildinputline(char *src, int bol, int cursor) {
  return &src[bol];
}


x86 assembly (clang, -O0):
<lcd_inputbuildinputline>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcd_inputbuildinputline>:
movslq %esi,%rax
add    %rdi,%rax
ret

LLVM IR (-O0):
define i8* @lcd_inputbuildinputline(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %7, i64 %9
ret i8* %10
}

LLVM IR (-O2):
define i8* @lcd_inputbuildinputline(i8* readnone %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
ret i8* %5
}
void lex_octal_brace(int c, int *r) {
  if ('0' <= c && c <= '7')
    *r = (*r << 3) | (c - '0');
}


x86 assembly (clang, -O0):
<lex_octal_brace>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x30,%eax
cmp    -0x4(%rbp),%eax
jg     113a <lex_octal_brace+0x3a>
cmpl   $0x37,-0x4(%rbp)
jg     113a <lex_octal_brace+0x3a>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
shl    $0x3,%ecx
mov    -0x4(%rbp),%eax
sub    $0x30,%eax
or     %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<lex_octal_brace>:
mov    %edi,%eax
and    $0xfffffff8,%eax
cmp    $0x30,%eax
jne    1116 <lex_octal_brace+0x16>
mov    (%rsi),%eax
shl    $0x3,%eax
add    $0xffffffd0,%edi
or     %eax,%edi
mov    %edi,(%rsi)
ret

LLVM IR (-O0):
define void @lex_octal_brace(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 = icmp sle i32 48, %5
br i1 %6, label %7, label %18
7: ; preds = %2
%8 = load i32, i32* %3
%9 = icmp sle i32 %8, 55
br i1 %9, label %10, label %18
10: ; preds = %7
%11 = load i32*, i32** %4
%12 = load i32, i32* %11
%13 = shl i32 %12, 3
%14 = load i32, i32* %3
%15 = sub nsw i32 %14, 48
%16 = or i32 %13, %15
%17 = load i32*, i32** %4
store i32 %16, i32* %17
br label %18
18: ; preds = %10, %7, %2
ret void
}

LLVM IR (-O2):
define void @lex_octal_brace(i32 %0, i32* nocapture %1) {
%3 = and i32 %0, -8
%4 = icmp eq i32 %3, 48
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = load i32, i32* %1
%7 = shl i32 %6, 3
%8 = add nsw i32 %0, -48
%9 = or i32 %7, %8
store i32 %9, i32* %1
br label %10
10: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ my_free1(void *);
int /*<<< orphan*/ my_malloc1(void **, int);
void test11() {
  void *data = 0;
  my_malloc1(&data, 4);
  my_free1(data);
}


x86 assembly (clang, -O0):
<test11>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
mov    $0x4,%esi
call   1040 <my_malloc1@plt>
mov    -0x8(%rbp),%rdi
call   1030 <my_free1@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test11>:
push   %rax
movq   $0x0,(%rsp)
mov    %rsp,%rdi
mov    $0x4,%esi
call   1040 <my_malloc1@plt>
mov    (%rsp),%rdi
call   1030 <my_free1@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @test11() {
%1 = alloca i8*
store i8* null, i8** %1
%2 = call i32 @my_malloc1(i8** %1, i32 4)
%3 = load i8*, i8** %1
%4 = call i32 @my_free1(i8* %3)
ret void
}

LLVM IR (-O2):
define void @test11() {
%1 = alloca i8*
%2 = bitcast i8** %1 to i8*
store i8* null, i8** %1
%3 = call i32 @my_malloc1(i8** %1, i32 4)
%4 = load i8*, i8** %1
%5 = call i32 @my_free1(i8* %4)
ret void
}
float ddgl_radians(float degrees) {
  return degrees * (3.1415926535898f / 180.0f);
}


x86 assembly (clang, -O0):
<ddgl_radians>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ddgl_radians>:
mulss  0xef8(%rip),%xmm0
ret

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

LLVM IR (-O2):
define float @ddgl_radians(float %0) {
%2 = fmul float %0, 0x3F91DF46A0000000
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
long long strtoll(char *, char **, int /*<<< orphan*/);
void test6(char *array, char *endptr) {
  array[0] = ' ';
  array[1] = array[2] = 'z';
  long long r = strtoll(array, &endptr, 0);
  assert(array == endptr);
  assert(r == 0);
}


x86 assembly (clang, -O0):
<test6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x20,(%rax)
mov    -0x8(%rbp),%rax
movb   $0x7a,0x2(%rax)
mov    -0x8(%rbp),%rax
movb   $0x7a,0x1(%rax)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
xor    %edx,%edx
call   1030 <strtoll@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
cmpq   $0x0,-0x18(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test6>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    %rsi,(%rsp)
movw   $0x7a20,(%rdi)
movb   $0x7a,0x2(%rdi)
mov    %rsp,%rsi
xor    %edx,%edx
call   1030 <strtoll@plt>
mov    %rax,%r14
xor    %edi,%edi
cmp    %rbx,(%rsp)
sete   %dil
call   1040 <assert@plt>
xor    %edi,%edi
test   %r14,%r14
sete   %dil
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <assert@plt>

LLVM IR (-O0):
define void @test6(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = getelementptr inbounds i8, i8* %6, i64 0
store i8 32, i8* %7
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 2
store i8 122, i8* %9
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 1
store i8 122, i8* %11
%12 = load i8*, i8** %3
%13 = call i64 @strtoll(i8* %12, i8** %4, i32 0)
store i64 %13, i64* %5
%14 = load i8*, i8** %3
%15 = load i8*, i8** %4
%16 = icmp eq i8* %14, %15
%17 = zext i1 %16 to i32
%18 = call i32 @assert(i32 %17)
%19 = load i64, i64* %5
%20 = icmp eq i64 %19, 0
%21 = zext i1 %20 to i32
%22 = call i32 @assert(i32 %21)
ret void
}

LLVM IR (-O2):
define void @test6(i8* %0, i8* %1) {
%3 = alloca i8*
store i8* %1, i8** %3
store i8 32, i8* %0
%4 = getelementptr inbounds i8, i8* %0, i64 2
store i8 122, i8* %4
%5 = getelementptr inbounds i8, i8* %0, i64 1
store i8 122, i8* %5
%6 = call i64 @strtoll(i8* %0, i8** %3, i32 0)
%7 = load i8*, i8** %3
%8 = icmp eq i8* %7, %0
%9 = zext i1 %8 to i32
%10 = tail call i32 @assert(i32 %9)
%11 = icmp eq i64 %6, 0
%12 = zext i1 %11 to i32
%13 = tail call i32 @assert(i32 %12)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  int x = 0, y = 0;
  while (x != 5) {
    y = y + x;
    x = x + 1;
  }
  assert(y == 10);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x5,-0x8(%rbp)
je     114e <main+0x3e>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112d <main+0x1d>
cmpl   $0xa,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%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
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %7, %0
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 5
br i1 %6, label %7, label %13
7: ; preds = %4
%8 = load i32, i32* %3
%9 = load i32, i32* %2
%10 = add nsw i32 %8, %9
store i32 %10, i32* %3
%11 = load i32, i32* %2
%12 = add nsw i32 %11, 1
store i32 %12, i32* %2
br label %4
13: ; preds = %4
%14 = load i32, i32* %3
%15 = icmp eq i32 %14, 10
%16 = zext i1 %15 to i32
%17 = call i32 @assert(i32 %16)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
ret i32 0
}
void Write32(unsigned char *pByte, unsigned long value) {
  pByte[0] = (unsigned char)value;
  pByte[1] = (unsigned char)(value >> 8);
  pByte[2] = (unsigned char)(value >> 16);
  pByte[3] = (unsigned char)(value >> 24);
}


x86 assembly (clang, -O0):
<Write32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
shr    $0x8,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x10(%rbp),%rax
shr    $0x10,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x10(%rbp),%rax
shr    $0x18,%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x3(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @Write32(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i8
%7 = load i8*, i8** %3
%8 = getelementptr inbounds i8, i8* %7, i64 0
store i8 %6, i8* %8
%9 = load i64, i64* %4
%10 = lshr i64 %9, 8
%11 = trunc i64 %10 to i8
%12 = load i8*, i8** %3
%13 = getelementptr inbounds i8, i8* %12, i64 1
store i8 %11, i8* %13
%14 = load i64, i64* %4
%15 = lshr i64 %14, 16
%16 = trunc i64 %15 to i8
%17 = load i8*, i8** %3
%18 = getelementptr inbounds i8, i8* %17, i64 2
store i8 %16, i8* %18
%19 = load i64, i64* %4
%20 = lshr i64 %19, 24
%21 = trunc i64 %20 to i8
%22 = load i8*, i8** %3
%23 = getelementptr inbounds i8, i8* %22, i64 3
store i8 %21, i8* %23
ret void
}

LLVM IR (-O2):
define void @Write32(i8* nocapture writeonly %0, i64 %1) {
%3 = trunc i64 %1 to i8
store i8 %3, i8* %0
%4 = lshr i64 %1, 8
%5 = trunc i64 %4 to i8
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %5, i8* %6
%7 = lshr i64 %1, 16
%8 = trunc i64 %7 to i8
%9 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %8, i8* %9
%10 = lshr i64 %1, 24
%11 = trunc i64 %10 to i8
%12 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %11, i8* %12
ret void
}
/* Variables and functions */
int /*<<< orphan*/ smc(int);
void Yield(void) { smc(0x3); }


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

x86 assembly (clang, -O2):
<Yield>:
mov    $0x3,%edi
jmp    1030 <smc@plt>

LLVM IR (-O0):
define void @Yield() {
%1 = call i32 @smc(i32 3)
ret void
}

LLVM IR (-O2):
define void @Yield() {
%1 = tail call i32 @smc(i32 3)
ret void
}
void ft_swap_int(int *p1, int *p2) {
  int tmp;
  tmp = *p1;
  *p1 = *p2;
  *p2 = tmp;
}


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

x86 assembly (clang, -O2):
<ft_swap_int>:
mov    (%rdi),%eax
mov    (%rsi),%ecx
mov    %ecx,(%rdi)
mov    %eax,(%rsi)
ret

LLVM IR (-O0):
define void @ft_swap_int(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
store i32 %7, i32* %5
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
%10 = load i32*, i32** %3
store i32 %9, i32* %10
%11 = load i32, i32* %5
%12 = load i32*, i32** %4
store i32 %11, i32* %12
ret void
}

LLVM IR (-O2):
define void @ft_swap_int(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
main() {
  int i, old_i;
  i = 1;
  while (i > 0) {
    old_i = i;
    i = (i << 1) | 1;
  }
  printf("%d\n", old_i);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1147 <main+0x37>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
or     $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
mov    -0xc(%rbp),%esi
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 2147483647)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ prnitf(char *);
int main(int argc, char **argv) {
  prnitf("hello world!");
  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
call   1030 <prnitf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [13 x i8] c"hello world!\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 @prnitf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"hello world!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @prnitf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int sum, a, b;
  a = 0;
  b = 10;
  sum = 10;
  while (a < 9) {
    b--;
    sum = sum * b;
    a++;
  }
  printf("%i \n", sum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0xa,-0x10(%rbp)
movl   $0xa,-0x8(%rbp)
cmpl   $0x9,-0xc(%rbp)
jge    115f <main+0x4f>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
imul   -0x10(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1134 <main+0x24>
mov    -0x8(%rbp),%esi
lea    0xe97(%rip),%rdi
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    $0x375f00,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%i \0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 3628800)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int i, sum = 0;
  for (i = 0; i < 10; i++)
    sum += i;
  printf("%d\n", sum);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    114e <main+0x3e>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112d <main+0x1d>
mov    -0xc(%rbp),%esi
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 45)
ret i32 0
}
int ft_isdigit(int c) { return (47 < c && c < 58); }


x86 assembly (clang, -O0):
<ft_isdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
mov    $0x2f,%ecx
cmp    -0x4(%rbp),%ecx
mov    %al,-0x5(%rbp)
jge    1124 <ft_isdigit+0x24>
cmpl   $0x3a,-0x4(%rbp)
setl   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isdigit>:
add    $0xffffffd0,%edi
xor    %eax,%eax
cmp    $0xa,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @ft_isdigit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 47, %3
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 58
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @ft_isdigit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ IF_fctD_1(int /*<<< orphan*/);
int /*<<< orphan*/ j1;
void IF_j1(void) { IF_fctD_1(j1); }


x86 assembly (clang, -O0):
<IF_j1>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
call   1030 <IF_fctD_1@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<IF_j1>:
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <IF_fctD_1@plt>

LLVM IR (-O0):
@j1 = global i32 0
define void @IF_j1() {
%1 = load i32, i32* @j1
%2 = call i32 @IF_fctD_1(i32 %1)
ret void
}

LLVM IR (-O2):
@j1 = global i32 0
define void @IF_j1() {
%1 = load i32, i32* @j1
%2 = tail call i32 @IF_fctD_1(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
scalar_t__ strncmp(char *, char *, int);
void strncmp_diff_length_1() {
  char *x = "123";
  char *y = "23456";
  clang_analyzer_eval(strncmp(x, y, 5) < 0);
}


x86 assembly (clang, -O0):
<strncmp_diff_length_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x5,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncmp_diff_length_1>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed5(%rip),%rsi
mov    $0x5,%edx
call   1030 <strncmp@plt>
shr    $0x3f,%rax
mov    %eax,%edi
pop    %rax
jmp    1040 <clang_analyzer_eval@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"123\00"
@.str.1 = [6 x i8] c"23456\00"
define void @strncmp_diff_length_1() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %1
%4 = load i8*, i8** %2
%5 = call i64 @strncmp(i8* %3, i8* %4, i32 5)
%6 = icmp slt i64 %5, 0
%7 = zext i1 %6 to i32
%8 = call i32 @clang_analyzer_eval(i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"123\00"
@.str.1 = [6 x i8] c"23456\00"
define void @strncmp_diff_length_1() {
%1 = tail call i64 @strncmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 5)
%2 = lshr i64 %1, 63
%3 = trunc i64 %2 to i32
%4 = tail call i32 @clang_analyzer_eval(i32 %3)
ret void
}
/* Variables and functions */
int FlashSize();
int AddrFlag(void) { return (FlashSize() < 8192) ? 0x10 : 0; }


x86 assembly (clang, -O0):
<AddrFlag>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <FlashSize@plt>
mov    %eax,%edx
xor    %eax,%eax
mov    $0x10,%ecx
cmp    $0x2000,%edx
cmovl  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AddrFlag>:
push   %rax
xor    %eax,%eax
call   1030 <FlashSize@plt>
xor    %ecx,%ecx
cmp    $0x2000,%eax
setl   %cl
shl    $0x4,%ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @AddrFlag() {
%1 = call i32 (...) @FlashSize()
%2 = icmp slt i32 %1, 8192
%3 = zext i1 %2 to i64
%4 = select i1 %2, i32 16, i32 0
ret i32 %4
}

LLVM IR (-O2):
define i32 @AddrFlag() {
%1 = tail call i32 (...) @FlashSize()
%2 = icmp slt i32 %1, 8192
%3 = select i1 %2, i32 16, i32 0
ret i32 %3
}
void zpodd_post_poweron(struct ata_device *dev) {}


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

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

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

LLVM IR (-O2):
%struct.ata_device = type opaque
define void @zpodd_post_poweron(%struct.ata_device* nocapture %0) {
ret void
}
long long largefooneg(long long a) { return a ? 25089992 : -25089992; }


x86 assembly (clang, -O0):
<largefooneg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
mov    $0xfe812838,%eax
mov    $0x17ed7c8,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<largefooneg>:
test   %rdi,%rdi
mov    $0xfffffffffe812838,%rcx
mov    $0x17ed7c8,%eax
cmove  %rcx,%rax
ret

LLVM IR (-O0):
define i64 @largefooneg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp ne i64 %3, 0
%5 = zext i1 %4 to i64
%6 = select i1 %4, i32 25089992, i32 -25089992
%7 = sext i32 %6 to i64
ret i64 %7
}

LLVM IR (-O2):
define i64 @largefooneg(i64 %0) {
%2 = icmp eq i64 %0, 0
%3 = select i1 %2, i64 -25089992, i64 25089992
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void printUsage(char *command) {
  printf("Usage:\n %s -p|<input file name>\n\n This executable request one "
         "argument either:\n  -p : display the computation type(fixed or "
         "floating) and exit\nor\n  <input file name> : process the input file "
         "and write the output in a file with the same prefix a .out "
         "extension\n\n",
         command);
  exit(-1);
}


x86 assembly (clang, -O0):
<printUsage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<printUsage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [262 x i8] c"Usage:\0A %s -p|<input file name>\0A\0A This executable request one argument either:\0A -p : display the computation type(fixed or floating) and exit\0Aor\0A <input file name> : process the input file and write the output in a file with the same prefix a .out extension\0A\0A\00"
define void @printUsage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([262 x i8], [262 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@.str = [262 x i8] c"Usage:\0A %s -p|<input file name>\0A\0A This executable request one argument either:\0A -p : display the computation type(fixed or floating) and exit\0Aor\0A <input file name> : process the input file and write the output in a file with the same prefix a .out extension\0A\0A\00"
define void @printUsage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([262 x i8], [262 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 -1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ sem_t;

/* Variables and functions */
int /*<<< orphan*/ perror(char *);
scalar_t__ sem_wait(int /*<<< orphan*/ *);
int posix_synchronized(sem_t *sem_id) {
  if (sem_id) {
    if (sem_wait(sem_id) < 0) {
      perror("sem_wait");
      return -2;
    }
  } else {
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<posix_synchronized>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1167 <posix_synchronized+0x47>
mov    -0x10(%rbp),%rdi
call   1030 <sem_wait@plt>
cmp    $0x0,%rax
jge    1162 <posix_synchronized+0x42>
lea    0xeaf(%rip),%rdi
call   1040 <perror@plt>
movl   $0xfffffffe,-0x4(%rbp)
jmp    117a <posix_synchronized+0x5a>
jmp    1173 <posix_synchronized+0x53>
movl   $0xffffffff,-0x4(%rbp)
jmp    117a <posix_synchronized+0x5a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<posix_synchronized>:
push   %rax
test   %rdi,%rdi
je     1137 <posix_synchronized+0x17>
call   1030 <sem_wait@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
js     113e <posix_synchronized+0x1e>
pop    %rcx
ret
mov    $0xffffffff,%eax
pop    %rcx
ret
lea    0xebb(%rip),%rdi
call   1040 <perror@plt>
mov    $0xfffffffe,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"sem_wait\00"
define i32 @posix_synchronized(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i64 @sem_wait(i32* %0)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %3, %1, %6
%9 = phi i32 [ -2, %6 ], [ -1, %1 ], [ 0, %3 ]
ret i32 %9
}
/* Type definitions */
struct object {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ car(struct object *);
struct object *cdr(int /*<<< orphan*/);
struct object *prim_cdr(void *workspace, struct object *args) {
  return (cdr(car((args))));
}


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

x86 assembly (clang, -O2):
<prim_cdr>:
push   %rax
mov    %rsi,%rdi
call   1040 <car@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <cdr@plt>

LLVM IR (-O0):
%struct.object = type { i32 }
define %struct.object* @prim_cdr(i8* %0, %struct.object* %1) {
%3 = alloca i8*
%4 = alloca %struct.object*
store i8* %0, i8** %3
store %struct.object* %1, %struct.object** %4
%5 = load %struct.object*, %struct.object** %4
%6 = call i32 @car(%struct.object* %5)
%7 = call %struct.object* @cdr(i32 %6)
ret %struct.object* %7
}

LLVM IR (-O2):
%struct.object = type { i32 }
define %struct.object* @prim_cdr(i8* nocapture readnone %0, %struct.object* %1) {
%3 = tail call i32 @car(%struct.object* %1)
%4 = tail call %struct.object* @cdr(i32 %3)
ret %struct.object* %4
}
void glBindBuffer(unsigned int target, unsigned int buffer) {}


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

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

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

LLVM IR (-O2):
define void @glBindBuffer(i32 %0, i32 %1) {
ret void
}
/* Type definitions */
struct utsname {
  char *nodename;
};

/* Variables and functions */
int /*<<< orphan*/ strncpy_truncate(char *, char *, int);
int /*<<< orphan*/ uname(struct utsname *);
char *uname_get_host_name(char *hostname, char *domain) {
  struct utsname buf;
  uname(&buf);
  strncpy_truncate(hostname, buf.nodename, 64);
  strncpy_truncate(domain, "Unknown", 64);
  return hostname;
}


x86 assembly (clang, -O0):
<uname_get_host_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x18(%rbp),%rdi
call   1040 <uname@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x40,%edx
call   1030 <strncpy_truncate@plt>
mov    -0x10(%rbp),%rdi
lea    0xeaa(%rip),%rsi
mov    $0x40,%edx
call   1030 <strncpy_truncate@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uname_get_host_name>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsp,%rdi
call   1040 <uname@plt>
mov    (%rsp),%rsi
mov    %rbx,%rdi
mov    $0x40,%edx
call   1030 <strncpy_truncate@plt>
lea    0xeb6(%rip),%rsi
mov    %r14,%rdi
mov    $0x40,%edx
call   1030 <strncpy_truncate@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.utsname = type { i8* }
@.str = [8 x i8] c"Unknown\00"
define i8* @uname_get_host_name(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca %struct.utsname
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = call i32 @uname(%struct.utsname* %5)
%7 = load i8*, i8** %3
%8 = getelementptr inbounds %struct.utsname, %struct.utsname* %5, i32 0, i32 0
%9 = load i8*, i8** %8
%10 = call i32 @strncpy_truncate(i8* %7, i8* %9, i32 64)
%11 = load i8*, i8** %4
%12 = call i32 @strncpy_truncate(i8* %11, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 64)
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
%struct.utsname = type { i8* }
@.str = [8 x i8] c"Unknown\00"
define i8* @uname_get_host_name(i8* returned %0, i8* %1) {
%3 = alloca %struct.utsname
%4 = bitcast %struct.utsname* %3 to i8*
%5 = call i32 @uname(%struct.utsname* %3)
%6 = getelementptr inbounds %struct.utsname, %struct.utsname* %3, i64 0, i32 0
%7 = load i8*, i8** %6
%8 = tail call i32 @strncpy_truncate(i8* %0, i8* %7, i32 64)
%9 = tail call i32 @strncpy_truncate(i8* %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 64)
ret i8* %0
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ ENDSWAP_64X(int /*<<< orphan*/);
void endswap_int64_t_array(int64_t *ptr, int len) {
  int64_t value;
  while (--len >= 0) {
    value = ptr[len];
    ptr[len] = ENDSWAP_64X(value);
  };
}


x86 assembly (clang, -O0):
<endswap_int64_t_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
jl     1159 <endswap_int64_t_array+0x49>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edi
call   1030 <ENDSWAP_64X@plt>
mov    %eax,%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
jmp    111f <endswap_int64_t_array+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<endswap_int64_t_array>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    114b <endswap_int64_t_array+0x3b>
mov    %rdi,%r14
mov    %esi,%ebx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    -0x2(%rbx),%r15d
mov    (%r14,%r15,4),%edi
call   1030 <ENDSWAP_64X@plt>
mov    %eax,(%r14,%r15,4)
add    $0xffffffffffffffff,%rbx
cmp    $0x1,%rbx
ja     1130 <endswap_int64_t_array+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @endswap_int64_t_array(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ %5, %4 ], [ %8, %6 ]
%8 = add nsw i64 %7, -1
%9 = and i64 %8, 4294967295
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
%12 = tail call i32 @ENDSWAP_64X(i32 %11)
store i32 %12, i32* %10
%13 = icmp ugt i64 %7, 1
br i1 %13, label %6, label %14
14: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ qs(int *, int /*<<< orphan*/, int);
void quicksort(int lista[], int n) { qs(lista, 0, n - 1); }


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

x86 assembly (clang, -O2):
<quicksort>:
lea    -0x1(%rsi),%edx
xor    %esi,%esi
jmp    1030 <qs@plt>

LLVM IR (-O0):
define void @quicksort(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 = sub nsw i32 %6, 1
%8 = call i32 @qs(i32* %5, i32 0, i32 %7)
ret void
}

LLVM IR (-O2):
define void @quicksort(i32* %0, i32 %1) {
%3 = add nsw i32 %1, -1
%4 = tail call i32 @qs(i32* %0, i32 0, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ filecreate(char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  if (argc < 2) {
    fprintf(stderr, "Usage: touch filepath...\n");
    exit(0);
  }
  filecreate(argv[1]);
  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)
cmpl   $0x2,-0x8(%rbp)
jge    116c <main+0x3c>
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
lea    0xea0(%rip),%rsi
call   1040 <fprintf@plt>
xor    %edi,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <filecreate@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x1,%edi
jle    1143 <main+0x13>
mov    0x8(%rsi),%rdi
call   1030 <filecreate@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
lea    0xead(%rip),%rsi
call   1040 <fprintf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [26 x i8] c"Usage: touch filepath...\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 = load i32, i32* %4
%7 = icmp slt i32 %6, 2
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @exit(i32 0)
unreachable
12: ; preds = %2
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = call i32 @filecreate(i8* %15)
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [26 x i8] c"Usage: touch filepath...\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 0)
unreachable
8: ; preds = %2
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = tail call i32 @filecreate(i8* %10)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fwrite(unsigned char *, int, int, int /*<<< orphan*/ *);
int write_word(FILE *f, int value) {
  unsigned char buff[2];
  buff[0] = (unsigned char)value;
  buff[1] = (unsigned char)(value >> 8);
  return fwrite(buff, 1, 2, f);
}


x86 assembly (clang, -O0):
<write_word>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %al,-0xe(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x8,%eax
mov    %al,-0xd(%rbp)
lea    -0xe(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x1,%esi
mov    $0x2,%edx
call   1030 <fwrite@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_word>:
push   %rax
mov    %rdi,%rcx
mov    %si,0x6(%rsp)
lea    0x6(%rsp),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
call   1030 <fwrite@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @write_word(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca [2 x i8]
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = trunc i32 %6 to i8
%8 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
store i8 %7, i8* %8
%9 = load i32, i32* %4
%10 = ashr i32 %9, 8
%11 = trunc i32 %10 to i8
%12 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 1
store i8 %11, i8* %12
%13 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
%14 = load i32*, i32** %3
%15 = call i32 @fwrite(i8* %13, i32 1, i32 2, i32* %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @write_word(i32* nocapture %0, i32 %1) {
%3 = alloca [2 x i8]
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%5 = trunc i32 %1 to i8
store i8 %5, i8* %4
%6 = lshr i32 %1, 8
%7 = trunc i32 %6 to i8
%8 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 1
store i8 %7, i8* %8
%9 = call i32 @fwrite(i8* %4, i32 1, i32 2, i32* %0)
ret i32 %9
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int /*<<< orphan*/ *display;
};
struct TYPE_4__ {
  TYPE_1__ xkey;
};
typedef TYPE_2__ XEvent;
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
void set_XEvent_xkey_display(void *_p, void *_v) {
  ((XEvent *)_p)->xkey.display = (Display *)_v;
}


x86 assembly (clang, -O0):
<set_XEvent_xkey_display>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XEvent_xkey_display>:
mov    %rsi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i32* }
define void @set_XEvent_xkey_display(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 = bitcast i8* %5 to i32*
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to %struct.TYPE_4__*
%9 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %8, i32 0, i32 0
%10 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %9, i32 0, i32 0
store i32* %6, i32** %10
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xkey_display(i8* nocapture writeonly %0, i8* %1) {
%3 = bitcast i8* %0 to i8**
store i8* %1, i8** %3
ret void
}
void apdu_record_dump(void) {}


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

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

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

LLVM IR (-O2):
define void @apdu_record_dump() {
ret void
}
int char_gt(int c1, int c2) { return c1 > c2; }


x86 assembly (clang, -O0):
<char_gt>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<char_gt>:
xor    %eax,%eax
cmp    %esi,%edi
setg   %al
ret

LLVM IR (-O0):
define i32 @char_gt(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 = icmp sgt i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @char_gt(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int DBL_EPSILON;
int fabs(double);
bool is_zero_dbl(double a) { return (fabs(a) <= DBL_EPSILON * fabs(a)); }


x86 assembly (clang, -O0):
<is_zero_dbl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <fabs@plt>
mov    %eax,-0xc(%rbp)
mov    0x2eb7(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <fabs@plt>
mov    -0x10(%rbp),%ecx
mov    %eax,%edx
mov    -0xc(%rbp),%eax
imul   %edx,%ecx
cmp    %ecx,%eax
setle  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_zero_dbl>:
push   %rbp
push   %rbx
push   %rax
movsd  %xmm0,(%rsp)
call   1030 <fabs@plt>
mov    %eax,%ebx
mov    0x2ec2(%rip),%rax
mov    (%rax),%ebp
movsd  (%rsp),%xmm0
call   1030 <fabs@plt>
imul   %ebp,%eax
xor    %ecx,%ecx
cmp    %eax,%ebx
setle  %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@DBL_EPSILON = global i32 0
define i32 @is_zero_dbl(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @fabs(double %3)
%5 = load i32, i32* @DBL_EPSILON
%6 = load double, double* %2
%7 = call i32 @fabs(double %6)
%8 = mul nsw i32 %5, %7
%9 = icmp sle i32 %4, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
@DBL_EPSILON = global i32 0
define i32 @is_zero_dbl(double %0) {
%2 = tail call i32 @fabs(double %0)
%3 = load i32, i32* @DBL_EPSILON
%4 = tail call i32 @fabs(double %0)
%5 = mul nsw i32 %4, %3
%6 = icmp sle i32 %2, %5
%7 = zext i1 %6 to i32
ret i32 %7
}
int msm_fsusb_suspend_phy(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @msm_fsusb_suspend_phy() {
ret i32 0
}