xunge/DecIR huggingface dataset:
/* Variables and functions */
int write(int, char *, int);
int write_(int *fd, char buf[], int *n) { return (write(*fd, buf, *n)); }


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

x86 assembly (clang, -O2):
<write_>:
mov    (%rdi),%edi
mov    (%rdx),%edx
jmp    1030 <write@plt>

LLVM IR (-O0):
define i32 @write_(i32* %0, i8* %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i32*
store i32* %0, i32** %4
store i8* %1, i8** %5
store i32* %2, i32** %6
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = load i8*, i8** %5
%10 = load i32*, i32** %6
%11 = load i32, i32* %10
%12 = call i32 @write(i32 %8, i8* %9, i32 %11)
ret i32 %12
}

LLVM IR (-O2):
define i32 @write_(i32* nocapture %0, i8* nocapture %1, i32* nocapture %2) {
%4 = load i32, i32* %0
%5 = load i32, i32* %2
%6 = tail call i32 @write(i32 %4, i8* %1, i32 %5)
ret i32 %6
}
void foo008(int p) {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define void @foo008(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f(int);
int /*<<< orphan*/ print(char *);
int main(void) {
  int i;
  for (i = 0; i < 4; ++i)
    f(i);
  print("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x4,-0x8(%rbp)
jge    1156 <main+0x36>
mov    -0x8(%rbp),%edi
call   1030 <f@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
lea    0xea3(%rip),%rdi
call   1040 <print@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <f@plt>
mov    $0x1,%edi
call   1030 <f@plt>
mov    $0x2,%edi
call   1030 <f@plt>
mov    $0x3,%edi
call   1030 <f@plt>
lea    0xeb3(%rip),%rdi
call   1040 <print@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = tail call i32 @f(i32 0)
%2 = tail call i32 @f(i32 1)
%3 = tail call i32 @f(i32 2)
%4 = tail call i32 @f(i32 3)
%5 = tail call i32 @print(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ filtrar_etiqueta(char *, char *);
int /*<<< orphan*/ instruccion_o_dato(char *, int);
int /*<<< orphan*/ pseudo_instruccion(char *, int);
void crear_codigo_mv(char *linea, int num_linea) {
  char inst_o_dato[50];
  filtrar_etiqueta(linea, inst_o_dato);
  if (!pseudo_instruccion(inst_o_dato, num_linea))
    instruccion_o_dato(inst_o_dato, num_linea);
}


x86 assembly (clang, -O0):
<crear_codigo_mv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x40(%rbp),%rsi
call   1030 <filtrar_etiqueta@plt>
lea    -0x40(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1050 <pseudo_instruccion@plt>
cmp    $0x0,%eax
jne    116d <crear_codigo_mv+0x3d>
lea    -0x40(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <instruccion_o_dato@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crear_codigo_mv>:
push   %r14
push   %rbx
sub    $0x38,%rsp
mov    %esi,%ebx
mov    %rsp,%r14
mov    %r14,%rsi
call   1030 <filtrar_etiqueta@plt>
mov    %r14,%rdi
mov    %ebx,%esi
call   1050 <pseudo_instruccion@plt>
test   %eax,%eax
jne    115c <crear_codigo_mv+0x2c>
mov    %rsp,%rdi
mov    %ebx,%esi
call   1040 <instruccion_o_dato@plt>
add    $0x38,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @crear_codigo_mv(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca [50 x i8]
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = getelementptr inbounds [50 x i8], [50 x i8]* %5, i64 0, i64 0
%8 = call i32 @filtrar_etiqueta(i8* %6, i8* %7)
%9 = getelementptr inbounds [50 x i8], [50 x i8]* %5, i64 0, i64 0
%10 = load i32, i32* %4
%11 = call i32 @pseudo_instruccion(i8* %9, i32 %10)
%12 = icmp ne i32 %11, 0
br i1 %12, label %17, label %13
13: ; preds = %2
%14 = getelementptr inbounds [50 x i8], [50 x i8]* %5, i64 0, i64 0
%15 = load i32, i32* %4
%16 = call i32 @instruccion_o_dato(i8* %14, i32 %15)
br label %17
17: ; preds = %13, %2
ret void
}

LLVM IR (-O2):
define void @crear_codigo_mv(i8* %0, i32 %1) {
%3 = alloca [50 x i8]
%4 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%5 = call i32 @filtrar_etiqueta(i8* %0, i8* %4)
%6 = call i32 @pseudo_instruccion(i8* %4, i32 %1)
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @instruccion_o_dato(i8* %4, i32 %1)
br label %10
10: ; preds = %8, %2
ret void
}
/* Type definitions */
struct fs_file {
  int dummy;
};
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ fs_posix_read_to(struct fs_file *, void *, size_t, int);
ssize_t fs_posix_read(struct fs_file *f, void *buf, size_t count) {
  return fs_posix_read_to(f, buf, count, -1);
}


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

x86 assembly (clang, -O2):
<fs_posix_read>:
mov    $0xffffffff,%ecx
jmp    1030 <fs_posix_read_to@plt>

LLVM IR (-O0):
%struct.fs_file = type { i32 }
define i32 @fs_posix_read(%struct.fs_file* %0, i8* %1, i64 %2) {
%4 = alloca %struct.fs_file*
%5 = alloca i8*
%6 = alloca i64
store %struct.fs_file* %0, %struct.fs_file** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load %struct.fs_file*, %struct.fs_file** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i32 @fs_posix_read_to(%struct.fs_file* %7, i8* %8, i64 %9, i32 -1)
ret i32 %10
}

LLVM IR (-O2):
%struct.fs_file = type { i32 }
define i32 @fs_posix_read(%struct.fs_file* %0, i8* %1, i64 %2) {
%4 = tail call i32 @fs_posix_read_to(%struct.fs_file* %0, i8* %1, i64 %2, i32 -1)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint_least16_t;
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ endian_16(int /*<<< orphan*/ const,
                             int /*<<< orphan*/ const);
uint_least16_t endian_little16(const uint8_t ptr[2]) {
  return endian_16(ptr[1], ptr[0]);
}


x86 assembly (clang, -O0):
<endian_little16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%edi
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
call   1030 <endian_16@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<endian_little16>:
mov    (%rdi),%esi
mov    0x4(%rdi),%edi
jmp    1030 <endian_16@plt>

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

LLVM IR (-O2):
define i32 @endian_little16(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
%3 = load i32, i32* %2
%4 = load i32, i32* %0
%5 = tail call i32 @endian_16(i32 %3, i32 %4)
ret i32 %5
}
void component_rock_free(void *handle) {}


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

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

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

LLVM IR (-O2):
define void @component_rock_free(i8* nocapture %0) {
ret void
}
int f1(enum {AA, BB} E) { return BB; }


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

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

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

LLVM IR (-O2):
define i32 @f1(i32 %0) {
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ random_uint32();
uint8_t random_uint8(void) { return random_uint32(); }


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

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

LLVM IR (-O0):
define i32 @random_uint8() {
%1 = call i32 (...) @random_uint32()
ret i32 %1
}

LLVM IR (-O2):
define i32 @random_uint8() {
%1 = tail call i32 (...) @random_uint32()
ret i32 %1
}
int _DtHelpCeStrHashToKey(const char *str) {
  register char c;
  register const char *tstr;
  register int key = 0;
  if (!str)
    return 0;
  for (tstr = str; (c = *tstr++);)
    key = (key << 1) + c;
  return key;
}


x86 assembly (clang, -O0):
<_DtHelpCeStrHashToKey>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x24(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1126 <_DtHelpCeStrHashToKey+0x26>
movl   $0x0,-0x4(%rbp)
jmp    1164 <_DtHelpCeStrHashToKey+0x64>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
mov    (%rax),%al
mov    %al,-0x11(%rbp)
cmp    $0x0,%al
je     115e <_DtHelpCeStrHashToKey+0x5e>
mov    -0x24(%rbp),%eax
shl    $0x1,%eax
movsbl -0x11(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x24(%rbp)
jmp    112e <_DtHelpCeStrHashToKey+0x2e>
mov    -0x24(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_DtHelpCeStrHashToKey>:
xor    %eax,%eax
test   %rdi,%rdi
je     1131 <_DtHelpCeStrHashToKey+0x31>
mov    (%rdi),%cl
test   %cl,%cl
je     1131 <_DtHelpCeStrHashToKey+0x31>
add    $0x1,%rdi
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsbl %cl,%ecx
lea    (%rcx,%rax,2),%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1120 <_DtHelpCeStrHashToKey+0x20>
ret

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

LLVM IR (-O2):
define i32 @_DtHelpCeStrHashToKey(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %16, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %16, label %6
6: ; preds = %3, %6
%7 = phi i8 [ %14, %6 ], [ %4, %3 ]
%8 = phi i32 [ %13, %6 ], [ 0, %3 ]
%9 = phi i8* [ %10, %6 ], [ %0, %3 ]
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = shl i32 %8, 1
%12 = sext i8 %7 to i32
%13 = add nsw i32 %11, %12
%14 = load i8, i8* %10
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %6
16: ; preds = %6, %3, %1
%17 = phi i32 [ 0, %1 ], [ 0, %3 ], [ %13, %6 ]
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int test_MAAllocMemoryBlock();
int main() {
  int nret = 0;
  nret = test_MAAllocMemoryBlock();
  if (nret) {
    printf("Testing failure\n");
  } else {
    printf("All is ok\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1040 <test_MAAllocMemoryBlock@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     115b <main+0x3b>
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
jmp    1167 <main+0x47>
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [17 x i8] c"Testing failure\0A\00"
@.str.1 = [11 x i8] c"All is ok\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i32 (...) @test_MAAllocMemoryBlock()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
br label %10
8: ; preds = %0
%9 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8, %6
ret i32 0
}

LLVM IR (-O2):
@str = [10 x i8] c"All is ok\00"
@str.2 = [16 x i8] c"Testing failure\00"
define i32 @main() {
%1 = tail call i32 (...) @test_MAAllocMemoryBlock()
%2 = icmp eq i32 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @str.2, i64 0, i64 0)
%4 = tail call i32 @puts(i8* dereferenceable(1) %3)
ret i32 0
}
/* Variables and functions */
int assert_true(char *, char const *, int);
int /*<<< orphan*/ sprintf(char *, char *, char const *, char const *);
int assert_with_name(const char *name, const char *arg, const char *func,
                     int cond) {
  char buf[256];
  sprintf(buf, "%s: \"%s\"", name, arg);
  return assert_true(buf, func, cond);
}


x86 assembly (clang, -O0):
<assert_with_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
lea    -0x120(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xeb0(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x120(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <assert_true@plt>
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assert_with_name>:
push   %rbp
push   %r14
push   %rbx
sub    $0x100,%rsp
mov    %ecx,%ebp
mov    %rdx,%rbx
mov    %rsi,%rcx
mov    %rdi,%rdx
lea    0xec3(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
call   1040 <sprintf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
call   1030 <assert_true@plt>
add    $0x100,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%s: \22%s\22\00"
define i32 @assert_with_name(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca [256 x i8]
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%10 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%11 = load i8*, i8** %5
%12 = load i8*, i8** %6
%13 = call i32 @sprintf(i8* %10, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %11, i8* %12)
%14 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%15 = load i8*, i8** %7
%16 = load i32, i32* %8
%17 = call i32 @assert_true(i8* %14, i8* %15, i32 %16)
ret i32 %17
}

LLVM IR (-O2):
@.str = [9 x i8] c"%s: \22%s\22\00"
define i32 @assert_with_name(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca [256 x i8]
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%7 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%8 = call i32 @assert_true(i8* %6, i8* %2, i32 %3)
ret i32 %8
}
/* Variables and functions */
scalar_t__ has_kernel_opt(char *);
char *strchr(char *, char);
char *has_kernel_filter(char *buf) {
  char *opt = strchr(buf, '@');
  if (opt && has_kernel_opt(opt + 1))
    return opt;
  return NULL;
}


x86 assembly (clang, -O0):
<has_kernel_filter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x40,%esi
call   1030 <strchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     116d <has_kernel_filter+0x4d>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
call   1040 <has_kernel_opt@plt>
cmp    $0x0,%rax
je     116d <has_kernel_filter+0x4d>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1175 <has_kernel_filter+0x55>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<has_kernel_filter>:
push   %rbx
mov    $0x40,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1144 <has_kernel_filter+0x24>
mov    %rax,%rbx
mov    %rax,%rdi
add    $0x1,%rdi
call   1040 <has_kernel_opt@plt>
test   %rax,%rax
jne    1146 <has_kernel_filter+0x26>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @has_kernel_filter(i8* %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 64)
%3 = icmp eq i8* %2, null
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = getelementptr inbounds i8, i8* %2, i64 1
%6 = tail call i64 @has_kernel_opt(i8* %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %4, %1
br label %9
9: ; preds = %4, %8
%10 = phi i8* [ null, %8 ], [ %2, %4 ]
ret i8* %10
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef scalar_t__ int8_t;
typedef int int32_t;

/* Variables and functions */
int32_t ld_i32_le(const void *x) {
  return (
      (((((int32_t)(((int8_t *)x)[3])) << 8) | ((int32_t)(((uint8_t *)x)[2])))
       << 16) |
      ((((int32_t)(((uint8_t *)x)[1])) << 8) | ((int32_t)(((uint8_t *)x)[0]))));
}


x86 assembly (clang, -O0):
<ld_i32_le>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%rax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
mov    0x10(%rcx),%rcx
or     %ecx,%eax
shl    $0x10,%eax
mov    -0x8(%rbp),%rcx
mov    0x8(%rcx),%rcx
shl    $0x8,%ecx
mov    -0x8(%rbp),%rdx
mov    (%rdx),%rdx
or     %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ld_i32_le>:
mov    0x18(%rdi),%ecx
mov    0x8(%rdi),%edx
mov    0x10(%rdi),%eax
shl    $0x18,%ecx
shl    $0x10,%eax
or     %ecx,%eax
shl    $0x8,%edx
or     (%rdi),%eax
or     %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @ld_i32_le(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = getelementptr inbounds i8, i8* %0, i64 24
%4 = bitcast i8* %3 to i64*
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = getelementptr inbounds i8, i8* %0, i64 16
%8 = bitcast i8* %7 to i64*
%9 = load i64, i64* %8
%10 = trunc i64 %9 to i32
%11 = shl i32 %6, 24
%12 = shl i32 %10, 16
%13 = getelementptr inbounds i8, i8* %0, i64 8
%14 = bitcast i8* %13 to i64*
%15 = load i64, i64* %14
%16 = trunc i64 %15 to i32
%17 = shl i32 %16, 8
%18 = load i64, i64* %2
%19 = trunc i64 %18 to i32
%20 = or i32 %12, %11
%21 = or i32 %20, %19
%22 = or i32 %21, %17
ret i32 %22
}
__typeof__(fputs(1, (void *)1)) test_fputs_210(void) {
  return fputs(1, (void *)1);
}


x86 assembly (clang, -O0):
<test_fputs_210>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
mov    $0x1,%esi
mov    $0x0,%al
call   1030 <fputs@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_fputs_210>:
mov    $0x1,%esi
mov    $0x1,%edi
xor    %eax,%eax
jmp    1030 <fputs@plt>

LLVM IR (-O0):
define i32 @test_fputs_210() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @fputs to i32 (i32, i8*, ...)*)(i32 1, i8* inttoptr (i64 1 to i8*))
ret i32 %1
}

LLVM IR (-O2):
define i32 @test_fputs_210() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @fputs to i32 (i32, i8*, ...)*)(i32 1, i8* inttoptr (i64 1 to i8*))
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ tswrite_help_debug();
void print_help_debugging() { tswrite_help_debug(); }


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

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

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

LLVM IR (-O2):
define void @print_help_debugging() {
%1 = tail call i32 (...) @tswrite_help_debug()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ uartTx(char *, int);
void lcdUnderlineCursorOff() { uartTx("\xFE\x0C", 2); }


x86 assembly (clang, -O0):
<lcdUnderlineCursorOff>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x2,%esi
call   1030 <uartTx@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcdUnderlineCursorOff>:
lea    0xee9(%rip),%rdi
mov    $0x2,%esi
jmp    1030 <uartTx@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"\FE\0C\00"
define void @lcdUnderlineCursorOff() {
%1 = tail call i32 @uartTx(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ posix_memalign(void **, int, int);
void *simple_pool_memalign(int alignment, int size) {
  void *p = NULL;
  posix_memalign(&p, alignment, size);
  return p;
}


x86 assembly (clang, -O0):
<simple_pool_memalign>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    -0x10(%rbp),%rdi
call   1030 <posix_memalign@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<simple_pool_memalign>:
push   %rax
mov    %esi,%edx
mov    %edi,%esi
movq   $0x0,(%rsp)
mov    %rsp,%rdi
call   1030 <posix_memalign@plt>
mov    (%rsp),%rax
pop    %rcx
ret

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

LLVM IR (-O2):
define i8* @simple_pool_memalign(i32 %0, i32 %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
store i8* null, i8** %3
%5 = call i32 @posix_memalign(i8** %3, i32 %0, i32 %1)
%6 = load i8*, i8** %3
ret i8* %6
}
int test_imm_67int32_reg(int val) { return ((val) & (0x67 << 0)) ? -20 : -40; }


x86 assembly (clang, -O0):
<test_imm_67int32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x67,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_67int32_reg>:
test   $0x67,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_67int32_reg(i32 %0) {
%2 = and i32 %0, 103
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int open(char *dir_file) {
  int int_num = 3;
  int tmp;
  __asm__("int $0x80" : "=a"(tmp) : "a"(int_num), "b"(dir_file));
  return tmp;
}


x86 assembly (clang, -O0):
<open>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %rdi,-0x10(%rbp)
movl   $0x3,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x10(%rbp),%rbx
int    $0x80
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<open>:
push   %rbx
mov    %rdi,%rbx
mov    $0x3,%eax
int    $0x80
pop    %rbx
ret

LLVM IR (-O0):
define i32 @open(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
store i32 3, i32* %3
%5 = load i32, i32* %3
%6 = load i8*, i8** %2
%7 = call i32 asm "int $$0x80", "={ax},{ax},{bx},~{dirflag},~{fpsr},~{flags}"(i32 %5, i8* %6)
store i32 %7, i32* %4
%8 = load i32, i32* %4
ret i32 %8
}

LLVM IR (-O2):
define i32 @open(i8* readnone %0) {
%2 = tail call i32 asm "int $$0x80", "={ax},{ax},{bx},~{dirflag},~{fpsr},~{flags}"(i32 3, i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ q(int);
void T(float c) {
  c = .5 + 255 * c;
  q(0 > c ? 0 : c > 255 ? 255 : c);
}


x86 assembly (clang, -O0):
<T>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  0xee3(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xeca(%rip),%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0x4(%rbp),%xmm0
jbe    115d <T+0x4d>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    1199 <T+0x89>
movss  -0x4(%rbp),%xmm0
movss  0xe9e(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    1185 <T+0x75>
movss  0xe8d(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    118f <T+0x7f>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
cvttss2si %xmm0,%edi
call   1030 <q@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<T>:
movss  0xee8(%rip),%xmm1
mulss  %xmm1,%xmm0
addss  0xee0(%rip),%xmm0
minss  %xmm0,%xmm1
xorps  %xmm2,%xmm2
cmpltss %xmm2,%xmm0
andnps %xmm1,%xmm0
cvttss2si %xmm0,%edi
jmp    1030 <q@plt>

LLVM IR (-O0):
define void @T(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float 2.550000e+02, %3
%5 = fpext float %4 to double
%6 = fadd double 5.000000e-01, %5
%7 = fptrunc double %6 to float
store float %7, float* %2
%8 = load float, float* %2
%9 = fcmp ogt float 0.000000e+00, %8
br i1 %9, label %10, label %11
10: ; preds = %1
br label %19
11: ; preds = %1
%12 = load float, float* %2
%13 = fcmp ogt float %12, 2.550000e+02
br i1 %13, label %14, label %15
14: ; preds = %11
br label %17
15: ; preds = %11
%16 = load float, float* %2
br label %17
17: ; preds = %15, %14
%18 = phi float [ 2.550000e+02, %14 ], [ %16, %15 ]
br label %19
19: ; preds = %17, %10
%20 = phi float [ 0.000000e+00, %10 ], [ %18, %17 ]
%21 = fptosi float %20 to i32
%22 = call i32 @q(i32 %21)
ret void
}

LLVM IR (-O2):
define void @T(float %0) {
%2 = fmul float %0, 2.550000e+02
%3 = fadd float %2, 5.000000e-01
%4 = fcmp olt float %3, 0.000000e+00
%5 = fcmp ogt float %3, 2.550000e+02
%6 = select i1 %5, float 2.550000e+02, float %3
%7 = select i1 %4, float 0.000000e+00, float %6
%8 = fptosi float %7 to i32
%9 = tail call i32 @q(i32 %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcat(char *, char *);
int sprintf_buffer(char *s, int i) {
  int j;
  if (i <= 0)
    return 0;
  for (j = 0; j < i; j++)
    strcat(s, " ");
  return 0;
}


x86 assembly (clang, -O0):
<sprintf_buffer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jg     1135 <sprintf_buffer+0x25>
movl   $0x0,-0x4(%rbp)
jmp    116d <sprintf_buffer+0x5d>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1166 <sprintf_buffer+0x56>
mov    -0x10(%rbp),%rdi
lea    0xead(%rip),%rsi
call   1030 <strcat@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    113c <sprintf_buffer+0x2c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sprintf_buffer>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1140 <sprintf_buffer+0x30>
mov    %esi,%ebx
mov    %rdi,%r14
lea    0xedb(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r14,%rdi
mov    %r15,%rsi
call   1030 <strcat@plt>
add    $0xffffffff,%ebx
jne    1130 <sprintf_buffer+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c" \00"
define i32 @sprintf_buffer(i8* %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %9
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ 0, %2 ]
%6 = tail call i32 @strcat(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%7 = add nuw nsw i32 %5, 1
%8 = icmp eq i32 %7, %1
br i1 %8, label %9, label %4
9: ; preds = %4, %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ *get_builtin(char *);
int /*<<< orphan*/ puts(char *);
int builtin_type(size_t argc, char **argv) {
  if (argc < 2) {
    return 1;
  }
  if (get_builtin(argv[1]) == NULL) {
    puts("Not builtin");
  } else {
    puts("Builtin");
  }
  return 0;
}


x86 assembly (clang, -O0):
<builtin_type>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x2,-0x10(%rbp)
jae    1147 <builtin_type+0x27>
movl   $0x1,-0x4(%rbp)
jmp    1182 <builtin_type+0x62>
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <get_builtin@plt>
cmp    $0x0,%rax
jne    116f <builtin_type+0x4f>
lea    0xe9b(%rip),%rdi
call   1040 <puts@plt>
jmp    117b <builtin_type+0x5b>
lea    0xe96(%rip),%rdi
call   1040 <puts@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<builtin_type>:
mov    $0x1,%eax
cmp    $0x2,%rdi
jb     1155 <builtin_type+0x35>
push   %rax
mov    0x8(%rsi),%rdi
call   1030 <get_builtin@plt>
test   %rax,%rax
lea    0xec1(%rip),%rax
lea    0xec6(%rip),%rdi
cmove  %rax,%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"Not builtin\00"
@.str.1 = [8 x i8] c"Builtin\00"
define i32 @builtin_type(i64 %0, i8** nocapture %1) {
%3 = icmp ult i64 %0, 2
br i1 %3, label %11, label %4
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32* @get_builtin(i8* %6)
%8 = icmp eq i32* %7, null
%9 = select i1 %8, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0)
%10 = tail call i32 @puts(i8* dereferenceable(1) %9)
br label %11
11: ; preds = %4, %2
%12 = phi i32 [ 1, %2 ], [ 0, %4 ]
ret i32 %12
}
void board_prov_complete(void) {}


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

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

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

LLVM IR (-O2):
define void @board_prov_complete() {
ret void
}
/* Type definitions */
struct task_struct {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __vtime_account_system(struct task_struct *);
int /*<<< orphan*/ irqtime_account_irq(struct task_struct *);
void vtime_account_irq_exit(struct task_struct *tsk) {
  __vtime_account_system(tsk);
  irqtime_account_irq(tsk);
}


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

x86 assembly (clang, -O2):
<vtime_account_irq_exit>:
push   %rbx
mov    %rdi,%rbx
call   1040 <__vtime_account_system@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <irqtime_account_irq@plt>

LLVM IR (-O0):
%struct.task_struct = type { i32 }
define void @vtime_account_irq_exit(%struct.task_struct* %0) {
%2 = alloca %struct.task_struct*
store %struct.task_struct* %0, %struct.task_struct** %2
%3 = load %struct.task_struct*, %struct.task_struct** %2
%4 = call i32 @__vtime_account_system(%struct.task_struct* %3)
%5 = load %struct.task_struct*, %struct.task_struct** %2
%6 = call i32 @irqtime_account_irq(%struct.task_struct* %5)
ret void
}

LLVM IR (-O2):
%struct.task_struct = type { i32 }
define void @vtime_account_irq_exit(%struct.task_struct* %0) {
%2 = tail call i32 @__vtime_account_system(%struct.task_struct* %0)
%3 = tail call i32 @irqtime_account_irq(%struct.task_struct* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *gmtime_r(int /*<<< orphan*/ const *, struct tm *);
struct tm *localtime_r(const time_t *timep, struct tm *tmp) {
  return gmtime_r(timep, tmp);
}


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

x86 assembly (clang, -O2):
<localtime_r>:
jmp    1030 <gmtime_r@plt>

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

LLVM IR (-O2):
%struct.tm = type { i32 }
define %struct.tm* @localtime_r(i32* %0, %struct.tm* %1) {
%3 = tail call %struct.tm* @gmtime_r(i32* %0, %struct.tm* %1)
ret %struct.tm* %3
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void clscr() { system("clear"); }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"clear\00"
define void @clscr() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ invalid_phase(char *);
void phase_6(char *input) { invalid_phase("6a"); }


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

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

LLVM IR (-O0):
@.str = [3 x i8] c"6a\00"
define void @phase_6(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @invalid_phase(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"6a\00"
define void @phase_6(i8* nocapture readnone %0) {
%2 = tail call i32 @invalid_phase(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  unsigned int a = (unsigned int)-1;
  if (a < 10) {
    printf("a < 10\n");
  } else {
    printf("a > 10\n");
  }
  printf("(unsigned int) -1 = %u\n", a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xffffffff,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jae    1143 <main+0x33>
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1151 <main+0x41>
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [8 x i8] c"a < 10\0A\00"
@.str.1 = [8 x i8] c"a > 10\0A\00"
@.str.2 = [24 x i8] c"(unsigned int) -1 = %u\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 -1, i32* %2
%3 = load i32, i32* %2
%4 = icmp ult i32 %3, 10
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %9
7: ; preds = %0
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %7, %5
%10 = load i32, i32* %2
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str.2 = [24 x i8] c"(unsigned int) -1 = %u\0A\00"
@str = [7 x i8] c"a > 10\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 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.2, i64 0, i64 0), i32 -1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0xd4() {
  Assert_real((isbdigit(212) == 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_isbdigit.c",
              1065, ("isbdigit should be 0 for 0xd4"));
}


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

x86 assembly (clang, -O2):
<t_isbdigit_0xd4>:
push   %rax
mov    $0xd4,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x429,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0xd4\00"
define void @t_isbdigit_0xd4() {
%1 = call i64 @isbdigit(i32 212)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1065, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0xd4\00"
define void @t_isbdigit_0xd4() {
%1 = tail call i64 @isbdigit(i32 212)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1065, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SFMKTSToMPH(double);
double SFMMPHToMPC(int /*<<< orphan*/);
double SFMKTSToMPC(double kts) { return SFMMPHToMPC(SFMKTSToMPH(kts)); }


x86 assembly (clang, -O0):
<SFMKTSToMPC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <SFMKTSToMPH@plt>
mov    %eax,%edi
call   1040 <SFMMPHToMPC@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SFMKTSToMPC>:
push   %rax
call   1030 <SFMKTSToMPH@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <SFMMPHToMPC@plt>

LLVM IR (-O0):
define double @SFMKTSToMPC(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @SFMKTSToMPH(double %3)
%5 = call double @SFMMPHToMPC(i32 %4)
ret double %5
}

LLVM IR (-O2):
define double @SFMKTSToMPC(double %0) {
%2 = tail call i32 @SFMKTSToMPH(double %0)
%3 = tail call double @SFMMPHToMPC(i32 %2)
ret double %3
}
float Sleef_hypotf_u05(float x, float y) { return __builtin_hypotf(x, y); }


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

x86 assembly (clang, -O2):
<Sleef_hypotf_u05>:
jmp    1030 <hypotf@plt>

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

LLVM IR (-O2):
define float @Sleef_hypotf_u05(float %0, float %1) {
%3 = tail call float @hypotf(float %0, float %1)
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ nrf_802154_cca_done(int);
void nrf_802154_notify_cca(bool is_free) { nrf_802154_cca_done(is_free); }


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

x86 assembly (clang, -O2):
<nrf_802154_notify_cca>:
jmp    1030 <nrf_802154_cca_done@plt>

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

LLVM IR (-O2):
define void @nrf_802154_notify_cca(i32 %0) {
%2 = tail call i32 @nrf_802154_cca_done(i32 %0)
ret void
}
/* Forward declarations */
typedef struct TYPE_5__ TYPE_2__;
typedef struct TYPE_4__ TYPE_1__;

/* Type definitions */
struct TYPE_4__ {
  scalar_t__ *gregs;
};
struct TYPE_5__ {
  TYPE_1__ uc_mcontext;
};
typedef TYPE_2__ ucontext_t;

/* Variables and functions */
void *getMcontextEip(ucontext_t *uc) {
  return (void *)uc->uc_mcontext.gregs[16];
}


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

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

LLVM IR (-O0):
%struct.TYPE_5__ = type { %struct.TYPE_4__ }
%struct.TYPE_4__ = type { i64* }
define i8* @getMcontextEip(%struct.TYPE_5__* %0) {
%2 = alloca %struct.TYPE_5__*
store %struct.TYPE_5__* %0, %struct.TYPE_5__** %2
%3 = load %struct.TYPE_5__*, %struct.TYPE_5__** %2
%4 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %3, i32 0, i32 0
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = load i64*, i64** %5
%7 = getelementptr inbounds i64, i64* %6, i64 16
%8 = load i64, i64* %7
%9 = inttoptr i64 %8 to i8*
ret i8* %9
}

LLVM IR (-O2):
%struct.TYPE_5__ = type { %struct.TYPE_4__ }
%struct.TYPE_4__ = type { i64* }
define i8* @getMcontextEip(%struct.TYPE_5__* nocapture %0) {
%2 = getelementptr inbounds %struct.TYPE_5__, %struct.TYPE_5__* %0, i64 0, i32 0, i32 0
%3 = load i64*, i64** %2
%4 = getelementptr inbounds i64, i64* %3, i64 16
%5 = load i64, i64* %4
%6 = inttoptr i64 %5 to i8*
ret i8* %6
}
void gtk_text_iter_backward_sentence_start() {}


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

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

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

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