xunge/DecIR huggingface dataset:
/* Variables and functions */
int strcoll(char *const, char *const);
int qsort_compar(const void *a, const void *b) {
  return strcoll(*(char *const *)a, *(char *const *)b);
}


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

x86 assembly (clang, -O2):
<qsort_compar>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcoll@plt>

LLVM IR (-O0):
define i32 @qsort_compar(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i8**
%7 = load i8*, i8** %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i8**
%10 = load i8*, i8** %9
%11 = call i32 @strcoll(i8* %7, i8* %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @qsort_compar(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcoll(i8* %4, i8* %6)
ret i32 %7
}
void rte_pause(void) {}


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

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

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

LLVM IR (-O2):
define void @rte_pause() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
unsigned int fread(void *, int, int, int /*<<< orphan*/ *);
unsigned int read4k(FILE *fp, void *buf4k_p) {
  if (!fp)
    return 0;
  if (!buf4k_p)
    return 0;
  return fread(buf4k_p, 1, 128, fp);
}


x86 assembly (clang, -O0):
<read4k>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1137 <read4k+0x27>
movl   $0x0,-0x4(%rbp)
jmp    1168 <read4k+0x58>
cmpq   $0x0,-0x18(%rbp)
jne    114e <read4k+0x3e>
movl   $0x0,-0x4(%rbp)
jmp    1168 <read4k+0x58>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x1,%esi
mov    $0x80,%edx
call   1030 <fread@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read4k>:
test   %rdi,%rdi
je     112f <read4k+0x1f>
test   %rsi,%rsi
je     112f <read4k+0x1f>
mov    %rdi,%rcx
mov    %rsi,%rdi
mov    $0x1,%esi
mov    $0x80,%edx
jmp    1030 <fread@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @read4k(i32* %0, i8* %1) {
%3 = icmp eq i32* %0, null
%4 = icmp eq i8* %1, null
%5 = or i1 %3, %4
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @fread(i8* %1, i32 1, i32 128, i32* %0)
br label %8
8: ; preds = %2, %6
%9 = phi i32 [ %7, %6 ], [ 0, %2 ]
ret i32 %9
}
double index_initializer(int i, int j) { return 10 * (i + 1) + (j + 1); }


x86 assembly (clang, -O0):
<index_initializer>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
imul   $0xa,%eax,%eax
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
add    %ecx,%eax
cvtsi2sd %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<index_initializer>:
lea    (%rdi,%rdi,4),%eax
lea    (%rsi,%rax,2),%eax
add    $0xb,%eax
cvtsi2sd %eax,%xmm0
ret

LLVM IR (-O0):
define double @index_initializer(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 = add nsw i32 %5, 1
%7 = mul nsw i32 10, %6
%8 = load i32, i32* %4
%9 = add nsw i32 %8, 1
%10 = add nsw i32 %7, %9
%11 = sitofp i32 %10 to double
ret double %11
}

LLVM IR (-O2):
define double @index_initializer(i32 %0, i32 %1) {
%3 = mul i32 %0, 10
%4 = add i32 %1, 11
%5 = add i32 %4, %3
%6 = sitofp i32 %5 to double
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void a(void) { printf("PASS\n"); }


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

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

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

LLVM IR (-O2):
@str = [5 x i8] c"PASS\00"
define void @a() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret void
}
int f2(int (*p)[], int (*q)[3]) { return p <= q; }


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
cmp    %rcx,%rax
setbe  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
xor    %eax,%eax
cmp    %rdi,%rsi
setae  %al
ret

LLVM IR (-O0):
define i32 @f2([0 x i32]* %0, [3 x i32]* %1) {
%3 = alloca [0 x i32]*
%4 = alloca [3 x i32]*
store [0 x i32]* %0, [0 x i32]** %3
store [3 x i32]* %1, [3 x i32]** %4
%5 = load [0 x i32]*, [0 x i32]** %3
%6 = load [3 x i32]*, [3 x i32]** %4
%7 = bitcast [3 x i32]* %6 to [0 x i32]*
%8 = icmp ule [0 x i32]* %5, %7
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @f2([0 x i32]* readnone %0, [3 x i32]* readnone %1) {
%3 = bitcast [3 x i32]* %1 to [0 x i32]*
%4 = icmp uge [0 x i32]* %3, %0
%5 = zext i1 %4 to i32
ret i32 %5
}
int qux(void) {
  int a;
  return _Generic(0, long long : a, default : 0);
}


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

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

LLVM IR (-O0):
define i32 @qux() {
%1 = alloca i32
ret i32 0
}

LLVM IR (-O2):
define i32 @qux() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ simple_test();
int /*<<< orphan*/ test_complex();
int main() {
  simple_test();
  test_complex();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @simple_test()
%2 = tail call i32 (...) @test_complex()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __emit_string_literal_range(char *, int, int, int);
void test_multitoken_macro(void) {
  __emit_string_literal_range(("0123456789"), 4, 3, 6);
}


x86 assembly (clang, -O0):
<test_multitoken_macro>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x4,%esi
mov    $0x3,%edx
mov    $0x6,%ecx
call   1030 <__emit_string_literal_range@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_multitoken_macro>:
lea    0xee9(%rip),%rdi
mov    $0x4,%esi
mov    $0x3,%edx
mov    $0x6,%ecx
jmp    1030 <__emit_string_literal_range@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"0123456789\00"
define void @test_multitoken_macro() {
%1 = call i32 @__emit_string_literal_range(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 4, i32 3, i32 6)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"0123456789\00"
define void @test_multitoken_macro() {
%1 = tail call i32 @__emit_string_literal_range(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 4, i32 3, i32 6)
ret void
}
/* Variables and functions */
char *tgetstr(char *, int /*<<< orphan*/ *);
char *ft_trmgetcmd(char *tc_cmd) {
  if (tc_cmd)
    return (tgetstr(tc_cmd, NULL));
  return (NULL);
}


x86 assembly (clang, -O0):
<ft_trmgetcmd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     113d <ft_trmgetcmd+0x2d>
mov    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <tgetstr@plt>
mov    %rax,-0x8(%rbp)
jmp    1145 <ft_trmgetcmd+0x35>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_trmgetcmd>:
test   %rdi,%rdi
je     111c <ft_trmgetcmd+0xc>
xor    %esi,%esi
jmp    1030 <tgetstr@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @ft_trmgetcmd(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i8*, i8** %3
%8 = call i8* @tgetstr(i8* %7, i32* null)
store i8* %8, i8** %2
br label %10
9: ; preds = %1
store i8* null, i8** %2
br label %10
10: ; preds = %9, %6
%11 = load i8*, i8** %2
ret i8* %11
}

LLVM IR (-O2):
define i8* @ft_trmgetcmd(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i8* @tgetstr(i8* %0, i32* null)
br label %5
5: ; preds = %1, %3
%6 = phi i8* [ %4, %3 ], [ null, %1 ]
ret i8* %6
}
char *ft_strchr(const char *s, int c) {
  char ch;
  ch = (char)c;
  while (*s != ch) {
    if (*s == '\0')
      return (0);
    s++;
  }
  return ((char *)s);
}


x86 assembly (clang, -O0):
<ft_strchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %al,-0x15(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x15(%rbp),%ecx
cmp    %ecx,%eax
je     1152 <ft_strchr+0x52>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1141 <ft_strchr+0x41>
movq   $0x0,-0x8(%rbp)
jmp    115a <ft_strchr+0x5a>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1111 <ft_strchr+0x11>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strchr>:
mov    %rdi,%rax
movsbl %sil,%ecx
movsbl (%rdi),%edx
cmp    %edx,%ecx
je     1120 <ft_strchr+0x20>
xchg   %ax,%ax
test   %dl,%dl
je     1121 <ft_strchr+0x21>
movsbl 0x1(%rax),%edx
add    $0x1,%rax
cmp    %edx,%ecx
jne    1110 <ft_strchr+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @ft_strchr(i8* %0, i32 %1) {
%3 = shl i32 %1, 24
%4 = ashr exact i32 %3, 24
%5 = load i8, i8* %0
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %4, %6
br i1 %7, label %17, label %8
8: ; preds = %2, %12
%9 = phi i8 [ %14, %12 ], [ %5, %2 ]
%10 = phi i8* [ %13, %12 ], [ %0, %2 ]
%11 = icmp eq i8 %9, 0
br i1 %11, label %17, label %12
12: ; preds = %8
%13 = getelementptr inbounds i8, i8* %10, i64 1
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %4, %15
br i1 %16, label %17, label %8
17: ; preds = %8, %12, %2
%18 = phi i8* [ %0, %2 ], [ %13, %12 ], [ null, %8 ]
ret i8* %18
}
/* Variables and functions */
int /*<<< orphan*/ ShutGraph();
int /*<<< orphan*/ VPE_Shut();
int /*<<< orphan*/ VPE_Stop();
void _vpe_fin() {
  VPE_Stop();
  VPE_Shut();
  ShutGraph();
}


x86 assembly (clang, -O0):
<_vpe_fin>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <VPE_Stop@plt>
mov    $0x0,%al
call   1040 <VPE_Shut@plt>
mov    $0x0,%al
call   1050 <ShutGraph@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_vpe_fin>:
push   %rax
xor    %eax,%eax
call   1030 <VPE_Stop@plt>
xor    %eax,%eax
call   1040 <VPE_Shut@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <ShutGraph@plt>

LLVM IR (-O0):
define void @_vpe_fin() {
%1 = call i32 (...) @VPE_Stop()
%2 = call i32 (...) @VPE_Shut()
%3 = call i32 (...) @ShutGraph()
ret void
}

LLVM IR (-O2):
define void @_vpe_fin() {
%1 = tail call i32 (...) @VPE_Stop()
%2 = tail call i32 (...) @VPE_Shut()
%3 = tail call i32 (...) @ShutGraph()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ testMSG_in();
main() {
  testMSG_in();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @testMSG_in()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void say_nobody_can_deny(void) { printf("Which nobody can deny!\n"); }


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

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

LLVM IR (-O0):
@.str = [24 x i8] c"Which nobody can deny!\0A\00"
define void @say_nobody_can_deny() {
%1 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [23 x i8] c"Which nobody can deny!\00"
define void @say_nobody_can_deny() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int *malloc(int);
extern int *ReturnInt() {
  int *i = malloc(sizeof(int));
  *i = 101;
  return i;
}


x86 assembly (clang, -O0):
<ReturnInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x65,(%rax)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReturnInt>:
push   %rax
mov    $0x4,%edi
call   1030 <malloc@plt>
movl   $0x65,(%rax)
pop    %rcx
ret

LLVM IR (-O0):
define i32* @ReturnInt() {
%1 = alloca i32*
%2 = call i32* @malloc(i32 4)
store i32* %2, i32** %1
%3 = load i32*, i32** %1
store i32 101, i32* %3
%4 = load i32*, i32** %1
ret i32* %4
}

LLVM IR (-O2):
define noalias i32* @ReturnInt() {
%1 = tail call i32* @malloc(i32 4)
store i32 101, i32* %1
ret i32* %1
}
int libmain_add(int a, int b) { return a + b; }


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

x86 assembly (clang, -O2):
<libmain_add>:
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @libmain_add(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 = add nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @libmain_add(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
const char *get_extension(const char *s) {
  while (*s) {
    if (*(s++) == '.')
      break;
  }
  return s;
}


x86 assembly (clang, -O0):
<get_extension>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     113a <get_extension+0x3a>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
cmp    $0x2e,%eax
jne    1135 <get_extension+0x35>
jmp    113a <get_extension+0x3a>
jmp    1108 <get_extension+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_extension>:
mov    %rdi,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%rax),%ecx
test   %cl,%cl
je     1120 <get_extension+0x20>
add    $0x1,%rax
cmp    $0x2e,%cl
jne    1110 <get_extension+0x10>
ret

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

LLVM IR (-O2):
define i8* @get_extension(i8* %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i8* [ %0, %1 ], [ %7, %6 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %2
%7 = getelementptr inbounds i8, i8* %3, i64 1
%8 = icmp eq i8 %4, 46
br i1 %8, label %9, label %2
9: ; preds = %6, %2
%10 = phi i8* [ %7, %6 ], [ %3, %2 ]
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0xd8() {
  Assert_real((ispunct(216) == 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_ispunct.c",
              1085, ("ispunct should be 0 for 0xd8"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0xd8>:
push   %rax
mov    $0xd8,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x43d,%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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xd8\00"
define void @t_ispunct_0xd8() {
%1 = call i64 @ispunct(i32 216)
%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 1085, 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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xd8\00"
define void @t_ispunct_0xd8() {
%1 = tail call i64 @ispunct(i32 216)
%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 1085, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
OP(fd, d3) {
  illegal_1();
  op_d3();
}


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

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_1()
%4 = tail call i32 (...) @op_d3()
ret i32 undef
}
/* Variables and functions */
char **readdir_raw(char *, int /*<<< orphan*/, int /*<<< orphan*/ *);
char **stb_readdir_files(char *dir) { return readdir_raw(dir, 0, NULL); }


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

x86 assembly (clang, -O2):
<stb_readdir_files>:
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <readdir_raw@plt>

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

LLVM IR (-O2):
define i8** @stb_readdir_files(i8* %0) {
%2 = tail call i8** @readdir_raw(i8* %0, i32 0, i32* null)
ret i8** %2
}
/* Variables and functions */
scalar_t__ __builtin_jnl(int, long double);
int /*<<< orphan*/ link_failure_builtin_jnl();
void test_builtin_jnl(int x, long double ld) {
  if (__builtin_jnl(x, ld) != __builtin_jnl(x, ld))
    link_failure_builtin_jnl();
}


x86 assembly (clang, -O0):
<test_builtin_jnl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
fldt   0x10(%rbp)
mov    %edi,-0x4(%rbp)
fstpt  -0x20(%rbp)
mov    -0x4(%rbp),%edi
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <__builtin_jnl@plt>
mov    %rax,-0x28(%rbp)
mov    -0x4(%rbp),%edi
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <__builtin_jnl@plt>
mov    %rax,%rcx
mov    -0x28(%rbp),%rax
cmp    %rcx,%rax
je     116c <test_builtin_jnl+0x4c>
mov    $0x0,%al
call   1040 <link_failure_builtin_jnl@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_builtin_jnl>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %edi,%ebx
fldt   0x40(%rsp)
fld    %st(0)
fstpt  0x1c(%rsp)
fstpt  (%rsp)
call   1030 <__builtin_jnl@plt>
mov    %rax,%r14
fldt   0x1c(%rsp)
fstpt  (%rsp)
mov    %ebx,%edi
call   1030 <__builtin_jnl@plt>
cmp    %rax,%r14
jne    1159 <test_builtin_jnl+0x39>
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r14
jmp    1040 <link_failure_builtin_jnl@plt>

LLVM IR (-O0):
define void @test_builtin_jnl(i32 %0, x86_fp80 %1) {
%3 = alloca i32
%4 = alloca x86_fp80
store i32 %0, i32* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load i32, i32* %3
%6 = load x86_fp80, x86_fp80* %4
%7 = call i64 @__builtin_jnl(i32 %5, x86_fp80 %6)
%8 = load i32, i32* %3
%9 = load x86_fp80, x86_fp80* %4
%10 = call i64 @__builtin_jnl(i32 %8, x86_fp80 %9)
%11 = icmp ne i64 %7, %10
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = call i32 (...) @link_failure_builtin_jnl()
br label %14
14: ; preds = %12, %2
ret void
}

LLVM IR (-O2):
define void @test_builtin_jnl(i32 %0, x86_fp80 %1) {
%3 = tail call i64 @__builtin_jnl(i32 %0, x86_fp80 %1)
%4 = tail call i64 @__builtin_jnl(i32 %0, x86_fp80 %1)
%5 = icmp eq i64 %3, %4
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 (...) @link_failure_builtin_jnl()
br label %8
8: ; preds = %6, %2
ret void
}
int strcmp(s1, s2) const char *s1, *s2;
{
  while (*s1 == *s2++)
    if (*s1++ == 0)
      return (0);
  return (*(const unsigned char *)s1 - *(const unsigned char *)--s2);
}


x86 assembly (clang, -O0):
<strcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    1159 <strcmp+0x59>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1154 <strcmp+0x54>
movl   $0x0,-0x4(%rbp)
jmp    1178 <strcmp+0x78>
jmp    110c <strcmp+0xc>
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0xffffffffffffffff,%rdx
mov    %rdx,-0x18(%rbp)
movzbl -0x1(%rcx),%ecx
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp>:
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rdi,%rcx,1),%eax
movzbl (%rsi,%rcx,1),%edx
cmp    %dl,%al
jne    1127 <strcmp+0x27>
add    $0x1,%rcx
test   %eax,%eax
jne    1110 <strcmp+0x10>
xor    %eax,%eax
ret
sub    %edx,%eax
ret

LLVM IR (-O0):
define i32 @strcmp(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
br label %6
6: ; preds = %22, %2
%7 = load i8*, i8** %4
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = load i8*, i8** %5
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %5
%12 = load i8, i8* %10
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %9, %13
br i1 %14, label %15, label %23
15: ; preds = %6
%16 = load i8*, i8** %4
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %4
%18 = load i8, i8* %16
%19 = sext i8 %18 to i32
%20 = icmp eq i32 %19, 0
br i1 %20, label %21, label %22
21: ; preds = %15
store i32 0, i32* %3
br label %32
22: ; preds = %15
br label %6
23: ; preds = %6
%24 = load i8*, i8** %4
%25 = load i8, i8* %24
%26 = zext i8 %25 to i32
%27 = load i8*, i8** %5
%28 = getelementptr inbounds i8, i8* %27, i32 -1
store i8* %28, i8** %5
%29 = load i8, i8* %28
%30 = zext i8 %29 to i32
%31 = sub nsw i32 %26, %30
store i32 %31, i32* %3
br label %32
32: ; preds = %23, %21
%33 = load i32, i32* %3
ret i32 %33
}

LLVM IR (-O2):
define i32 @strcmp(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %9, %2
%4 = phi i8* [ %0, %2 ], [ %11, %9 ]
%5 = phi i8* [ %1, %2 ], [ %10, %9 ]
%6 = load i8, i8* %4
%7 = load i8, i8* %5
%8 = icmp eq i8 %6, %7
br i1 %8, label %9, label %13
9: ; preds = %3
%10 = getelementptr inbounds i8, i8* %5, i64 1
%11 = getelementptr inbounds i8, i8* %4, i64 1
%12 = icmp eq i8 %6, 0
br i1 %12, label %17, label %3
13: ; preds = %3
%14 = zext i8 %6 to i32
%15 = zext i8 %7 to i32
%16 = sub nsw i32 %14, %15
br label %17
17: ; preds = %9, %13
%18 = phi i32 [ %16, %13 ], [ 0, %9 ]
ret i32 %18
}
int hwlist_bluetooth_chip(const char *value) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @hwlist_bluetooth_chip(i8* nocapture readnone %0) {
ret i32 0
}
void ffp(float *f) {}


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

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

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

LLVM IR (-O2):
define void @ffp(float* nocapture %0) {
ret void
}
void gtk_editable_get_editable() {}


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

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

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

LLVM IR (-O2):
define void @gtk_editable_get_editable() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ grava_li(int, char *);
void rot6_sem() { grava_li(1, "$ROTC"); }


x86 assembly (clang, -O0):
<rot6_sem>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
lea    0xee0(%rip),%rsi
call   1030 <grava_li@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<rot6_sem>:
lea    0xee9(%rip),%rsi
mov    $0x1,%edi
jmp    1030 <grava_li@plt>

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

LLVM IR (-O2):
@.str = [6 x i8] c"$ROTC\00"
define void @rot6_sem() {
%1 = tail call i32 @grava_li(i32 1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, float, float, float);
char *AccelText(float x, float y, float z) {
  static char text[80];
  sprintf(text, "X:%2.5f  Y:%2.5f  Z:%2.5f", x, y, z);
  return (text);
}


x86 assembly (clang, -O0):
<AccelText>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
lea    0x2f03(%rip),%rdi
lea    0xebc(%rip),%rsi
call   1030 <sprintf@plt>
lea    0x2ef0(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AccelText>:
push   %rbx
lea    0x2f28(%rip),%rbx
lea    0xee1(%rip),%rsi
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@AccelText.text = internal global [80 x i8] zeroinitializer
@.str = [26 x i8] c"X:%2.5f Y:%2.5f Z:%2.5f\00"
define i8* @AccelText(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = load float, float* %5
%9 = load float, float* %6
%10 = call i32 @sprintf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @AccelText.text, i64 0, i64 0), i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), float %7, float %8, float %9)
ret i8* getelementptr inbounds ([80 x i8], [80 x i8]* @AccelText.text, i64 0, i64 0)
}

LLVM IR (-O2):
@AccelText.text = internal global [80 x i8] zeroinitializer
@.str = [26 x i8] c"X:%2.5f Y:%2.5f Z:%2.5f\00"
define i8* @AccelText(float %0, float %1, float %2) {
%4 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @AccelText.text, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), float %0, float %1, float %2)
ret i8* getelementptr inbounds ([80 x i8], [80 x i8]* @AccelText.text, i64 0, i64 0)
}
int t(int s, void **p) {
  int i;
  for (i; i < 10000; i += s)
    p[i] = 0;
}


x86 assembly (clang, -O0):
<t>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2710,-0x14(%rbp)
jge    1136 <t+0x36>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movq   $0x0,(%rax,%rcx,8)
mov    -0x8(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    110b <t+0xb>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @t(i32 %0, i8** nocapture writeonly %1) {
ret i32 undef
}
_Complex int pass_complex_int(_Complex int arg) { return arg; }


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

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

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

LLVM IR (-O2):
define i64 @pass_complex_int(i64 returned %0) {
ret i64 %0
}
int get_i(int pos, int len, int rev) {
  if (!rev)
    return pos;
  else
    return len - 1 - pos;
}


x86 assembly (clang, -O0):
<get_i>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jne    1122 <get_i+0x22>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    112e <get_i+0x2e>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_i>:
mov    %edi,%eax
not    %eax
add    %esi,%eax
test   %edx,%edx
cmove  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @get_i(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %2, 0
%5 = xor i32 %0, -1
%6 = add i32 %5, %1
%7 = select i1 %4, i32 %0, i32 %6
ret i32 %7
}
void *ta_func(void *ptr) {}


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

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

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

LLVM IR (-O2):
define noalias i8* @ta_func(i8* nocapture readnone %0) {
ret i8* undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char s[5] = {'75', '75', '75', '75', '75'};
  s[0] = 71;
  s[1] = 65;
  s[2] = 89;
  s[4] = '\0';
  printf("%s\n", s);
  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,-0x9(%rbp)
mov    0xed6(%rip),%al
mov    %al,-0x5(%rbp)
movb   $0x47,-0x9(%rbp)
movb   $0x41,-0x8(%rbp)
movb   $0x59,-0x7(%rbp)
movb   $0x0,-0x5(%rbp)
lea    -0x9(%rbp),%rsi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x35594147,0x3(%rsp)
35
movb   $0x0,0x7(%rsp)
lea    0xedb(%rip),%rdi
lea    0x3(%rsp),%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [5 x i8]
%2 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%3 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 3
store i8 53, i8* %3
store i8 71, i8* %2
%4 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 1
store i8 65, i8* %4
%5 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 2
store i8 89, i8* %5
%6 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 4
store i8 0, i8* %6
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Variables and functions */
size_t align_up(size_t size) { return (size + 1 - 1) & ~(1 - 1); }


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

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

LLVM IR (-O0):
define i64 @align_up(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add i64 %3, 1
%5 = sub i64 %4, 1
%6 = and i64 %5, -1
ret i64 %6
}

LLVM IR (-O2):
define i64 @align_up(i64 returned %0) {
ret i64 %0
}
/* Variables and functions */
int /*<<< orphan*/ exit_handler(int /*<<< orphan*/);
void exit_gracefully() { exit_handler(0); }


x86 assembly (clang, -O0):
<exit_gracefully>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <exit_handler@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<exit_gracefully>:
xor    %edi,%edi
jmp    1030 <exit_handler@plt>

LLVM IR (-O0):
define void @exit_gracefully() {
%1 = call i32 @exit_handler(i32 0)
ret void
}

LLVM IR (-O2):
define void @exit_gracefully() {
%1 = tail call i32 @exit_handler(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/, int, int /*<<< orphan*/);
void print_version(void) {
  printf("beeuniq v%d.%d.%d - "
         "by Marius Tolzmann <m@rius.berlin> 2011-2016\n",
         0, 1, 0);
}


x86 assembly (clang, -O0):
<print_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
xor    %ecx,%ecx
mov    $0x1,%edx
mov    %ecx,%esi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_version>:
lea    0xee9(%rip),%rdi
xor    %esi,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [66 x i8] c"beeuniq v%d.%d.%d - by Marius Tolzmann <m@rius.berlin> 2011-2016\0A\00"
define void @print_version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0), i32 0, i32 1, i32 0)
ret void
}

LLVM IR (-O2):
@.str = [66 x i8] c"beeuniq v%d.%d.%d - by Marius Tolzmann <m@rius.berlin> 2011-2016\0A\00"
define void @print_version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0), i32 0, i32 1, i32 0)
ret void
}
void endElement(void *userData, const char *name) {}


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

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

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

LLVM IR (-O2):
define void @endElement(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ f(int);
main() {
  f(7);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x7,%edi
call   1030 <f@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x7,%edi
call   1030 <f@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @f(i32 7)
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i32 7)
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ itemPickup();
void input_pickup(void) { itemPickup(); }


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

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

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

LLVM IR (-O2):
define void @input_pickup() {
%1 = tail call i32 (...) @itemPickup()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ stdout;
int main(int argc, char *argv[]) {
  int a = 0;
  while (1) {
    printf("%d\t", a++);
    fflush(stdout);
    sleep(1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    %eax,-0x14(%rbp)
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e72(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
jmp    114d <main+0x1d>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
xor    %esi,%esi
lea    0xec3(%rip),%r14
mov    0x2e9c(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    0x1(%rsi),%ebp
mov    %r14,%rdi
call   1030 <printf@plt>
mov    (%rbx),%edi
call   1040 <fflush@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
mov    %ebp,%esi
jmp    1150 <main+0x20>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\09\00"
@stdout = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ 0, %2 ], [ %5, %3 ]
%5 = add nuw nsw i32 %4, 1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
%7 = load i32, i32* @stdout
%8 = tail call i32 @fflush(i32 %7)
%9 = tail call i32 @sleep(i32 1)
br label %3
}
/* Variables and functions */
int /*<<< orphan*/ write_instr(int);
void eval_mul(void) { write_instr(0x12); }


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

x86 assembly (clang, -O2):
<eval_mul>:
mov    $0x12,%edi
jmp    1030 <write_instr@plt>

LLVM IR (-O0):
define void @eval_mul() {
%1 = call i32 @write_instr(i32 18)
ret void
}

LLVM IR (-O2):
define void @eval_mul() {
%1 = tail call i32 @write_instr(i32 18)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
void h264avcc_set_profile_compatibility(uint8_t *p, uint8_t val) { p[2] = val; }


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

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

LLVM IR (-O0):
define void @h264avcc_set_profile_compatibility(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 2
store i32 %5, i32* %7
ret void
}

LLVM IR (-O2):
define void @h264avcc_set_profile_compatibility(i32* nocapture writeonly %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void error(char *msg) {
  fprintf(stderr, "%s\n", msg);
  exit(-1);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  printf("Hello world from Miles Lilly\n");
  printf("I learned that 2+2= %d\n", 4);
  printf("The grade I am working for is:%c\n", 'A');
  printf("The temperature outside is barely %f degrees\n", 32.000);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xee2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef2(%rip),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef7(%rip),%rdi
mov    $0x41,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf06(%rip),%rdi
movsd  0xe9e(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf48(%rip),%rdi
call   1030 <puts@plt>
lea    0xed4(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed9(%rip),%rdi
mov    $0x41,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee8(%rip),%rdi
movsd  0xe9e(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"Hello world from Miles Lilly\0A\00"
@.str.1 = [24 x i8] c"I learned that 2+2= %d\0A\00"
@.str.2 = [34 x i8] c"The grade I am working for is:%c\0A\00"
@.str.3 = [46 x i8] c"The temperature outside is barely %f degrees\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 4)
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i32 65)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.3, i64 0, i64 0), double 3.200000e+01)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [24 x i8] c"I learned that 2+2= %d\0A\00"
@.str.2 = [34 x i8] c"The grade I am working for is:%c\0A\00"
@.str.3 = [46 x i8] c"The temperature outside is barely %f degrees\0A\00"
@str = [29 x i8] c"Hello world from Miles Lilly\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 4)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i32 65)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @.str.3, i64 0, i64 0), double 3.200000e+01)
ret i32 0
}
void ff_hevc_put_hevc_bi_w_epel_hv64_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_w_epel_hv64_12_sse4() {
ret void
}