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


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

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

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

LLVM IR (-O2):
@str = [20 x i8] c"\0AOpenSHMEM Analyzer\00"
define void @shmem_udcflush() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret void
}
void gtk_tree_view_get_row_separator_func() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_view_get_row_separator_func() {
ret void
}
unsigned short vdp22_get_qos(unsigned short x) { return (x >> 12) & 0xf; }


x86 assembly (clang, -O0):
<vdp22_get_qos>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
sar    $0xc,%eax
and    $0xf,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vdp22_get_qos>:
mov    %edi,%eax
shr    $0xc,%eax
ret

LLVM IR (-O0):
define zeroext i16 @vdp22_get_qos(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = ashr i32 %4, 12
%6 = and i32 %5, 15
%7 = trunc i32 %6 to i16
ret i16 %7
}

LLVM IR (-O2):
define zeroext i16 @vdp22_get_qos(i16 zeroext %0) {
%2 = lshr i16 %0, 12
ret i16 %2
}
/* Type definitions */
struct Student {
  int dummy;
};

/* Variables and functions */
struct Student *CreatList();
int /*<<< orphan*/ PrintList(struct Student *);
int main(int argc, char *argv[]) {
  struct Student *head;
  head = CreatList();
  PrintList(head);
  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)
mov    $0x0,%al
call   1040 <CreatList@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <PrintList@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.Student = type { i32 }
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.Student*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call %struct.Student* (...) @CreatList()
store %struct.Student* %7, %struct.Student** %6
%8 = load %struct.Student*, %struct.Student** %6
%9 = call i32 @PrintList(%struct.Student* %8)
ret i32 0
}

LLVM IR (-O2):
%struct.Student = type { i32 }
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call %struct.Student* (...) @CreatList()
%4 = tail call i32 @PrintList(%struct.Student* %3)
ret i32 0
}
void RTLockValidatorClassCreateEx(void) {}


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

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

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

LLVM IR (-O2):
define void @RTLockValidatorClassCreateEx() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ FH_DU();
int /*<<< orphan*/ init();
int /*<<< orphan*/ interface();
int main(void) {
  unsigned int i;
  for (i = 0; i < 510; i++) {
    init();
    interface();
    FH_DU();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x1fe,-0x8(%rbp)
jae    1176 <main+0x46>
mov    $0x0,%al
call   1040 <init@plt>
mov    $0x0,%al
call   1030 <interface@plt>
mov    $0x0,%al
call   1050 <FH_DU@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1146 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x1fe,%ebx
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <init@plt>
xor    %eax,%eax
call   1030 <interface@plt>
xor    %eax,%eax
call   1050 <FH_DU@plt>
add    $0xffffffff,%ebx
jne    1140 <main+0x10>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %10, %0
%4 = load i32, i32* %2
%5 = icmp ult i32 %4, 510
br i1 %5, label %6, label %13
6: ; preds = %3
%7 = call i32 (...) @init()
%8 = call i32 (...) @interface()
%9 = call i32 (...) @FH_DU()
br label %10
10: ; preds = %6
%11 = load i32, i32* %2
%12 = add i32 %11, 1
store i32 %12, i32* %2
br label %3
13: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %6, %1 ]
%3 = tail call i32 (...) @init()
%4 = tail call i32 (...) @interface()
%5 = tail call i32 (...) @FH_DU()
%6 = add nuw nsw i32 %2, 1
%7 = icmp eq i32 %6, 510
br i1 %7, label %8, label %1
8: ; preds = %1
ret i32 0
}
void anc_max14744_invert_headset_control(int connect) { return; }


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

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

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

LLVM IR (-O2):
define void @anc_max14744_invert_headset_control(i32 %0) {
ret void
}
/* Type definitions */
struct pattern {
  int dummy;
};

/* Variables and functions */
int countlib(int);
int offset(int, int /*<<< orphan*/, int, int);
int autohelperowl_attackpat115(struct pattern *patt, int transformation,
                               int move, int color, int action) {
  int A;
  (void)patt;
  (void)color;
  (void)action;
  A = offset(-2, 0, move, transformation);
  return countlib(A) == 3;
}


x86 assembly (clang, -O0):
<autohelperowl_attackpat115>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x10(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    $0xfffffffe,%edi
xor    %esi,%esi
call   1030 <offset@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
call   1040 <countlib@plt>
cmp    $0x3,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<autohelperowl_attackpat115>:
push   %rax
mov    %esi,%ecx
mov    $0xfffffffe,%edi
xor    %esi,%esi
call   1030 <offset@plt>
mov    %eax,%edi
call   1040 <countlib@plt>
xor    %ecx,%ecx
cmp    $0x3,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.pattern = type { i32 }
define i32 @autohelperowl_attackpat115(%struct.pattern* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca %struct.pattern*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store %struct.pattern* %0, %struct.pattern** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%12 = load %struct.pattern*, %struct.pattern** %6
%13 = load i32, i32* %9
%14 = load i32, i32* %10
%15 = load i32, i32* %8
%16 = load i32, i32* %7
%17 = call i32 @offset(i32 -2, i32 0, i32 %15, i32 %16)
store i32 %17, i32* %11
%18 = load i32, i32* %11
%19 = call i32 @countlib(i32 %18)
%20 = icmp eq i32 %19, 3
%21 = zext i1 %20 to i32
ret i32 %21
}

LLVM IR (-O2):
%struct.pattern = type { i32 }
define i32 @autohelperowl_attackpat115(%struct.pattern* nocapture readnone %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @offset(i32 -2, i32 0, i32 %2, i32 %1)
%7 = tail call i32 @countlib(i32 %6)
%8 = icmp eq i32 %7, 3
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ nest1();
int /*<<< orphan*/ nest2();
int /*<<< orphan*/ nest3();
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Nest 1:\n");
  nest1();
  printf("Nest 2:\n");
  nest2();
  printf("Nest 3:\n");
  nest3();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <nest1@plt>
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1060 <nest2@plt>
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <nest3@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <nest1@plt>
lea    0xead(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1060 <nest2@plt>
lea    0xea2(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <nest3@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"Nest 1:\0A\00"
@.str.1 = [9 x i8] c"Nest 2:\0A\00"
@.str.2 = [9 x i8] c"Nest 3:\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @nest1()
%4 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 (...) @nest2()
%6 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 (...) @nest3()
ret i32 0
}

LLVM IR (-O2):
@str = [8 x i8] c"Nest 1:\00"
@str.3 = [8 x i8] c"Nest 2:\00"
@str.4 = [8 x i8] c"Nest 3:\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @nest1()
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.3, i64 0, i64 0))
%4 = tail call i32 (...) @nest2()
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.4, i64 0, i64 0))
%6 = tail call i32 (...) @nest3()
ret i32 0
}
int do_986() { return 986; }


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

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

LLVM IR (-O0):
define i32 @do_986() {
ret i32 986
}

LLVM IR (-O2):
define i32 @do_986() {
ret i32 986
}
/* Variables and functions */
int /*<<< orphan*/ Delay(int /*<<< orphan*/);
int /*<<< orphan*/ Port_Init();
void sys_init() {
  (*(volatile unsigned *)0x1e00008) = 0x0;
  (*(volatile unsigned *)0x1e00000) = 0x1;
  (*(volatile unsigned *)0x1e00024) = 0xffffffff;
  (*(volatile unsigned *)0x1d20054) = 0xf;
  Port_Init();
  Delay(0);
  (*(volatile unsigned *)0x1e0000c) = ~((0x1 << 26));
}


x86 assembly (clang, -O0):
<sys_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1e00008,%eax
movl   $0x0,(%rax)
mov    $0x1e00000,%eax
movl   $0x1,(%rax)
mov    $0x1e00024,%eax
movl   $0xffffffff,(%rax)
mov    $0x1d20054,%eax
movl   $0xf,(%rax)
mov    $0x0,%al
call   1040 <Port_Init@plt>
xor    %edi,%edi
call   1030 <Delay@plt>
mov    $0x1e0000c,%eax
movl   $0xfbffffff,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_init>:
push   %rax
movl   $0x0,0x1e00008
movl   $0x1,0x1e00000
movl   $0xffffffff,0x1e00024
ff ff ff ff
movl   $0xf,0x1d20054
xor    %eax,%eax
call   1040 <Port_Init@plt>
xor    %edi,%edi
call   1030 <Delay@plt>
movl   $0xfbffffff,0x1e0000c
ff ff ff fb
pop    %rax
ret

LLVM IR (-O0):
define void @sys_init() {
store volatile i32 0, i32* inttoptr (i64 31457288 to i32*)
store volatile i32 1, i32* inttoptr (i64 31457280 to i32*)
store volatile i32 -1, i32* inttoptr (i64 31457316 to i32*)
store volatile i32 15, i32* inttoptr (i64 30539860 to i32*)
%1 = call i32 (...) @Port_Init()
%2 = call i32 @Delay(i32 0)
store volatile i32 -67108865, i32* inttoptr (i64 31457292 to i32*)
ret void
}

LLVM IR (-O2):
define void @sys_init() {
store volatile i32 0, i32* inttoptr (i64 31457288 to i32*)
store volatile i32 1, i32* inttoptr (i64 31457280 to i32*)
store volatile i32 -1, i32* inttoptr (i64 31457316 to i32*)
store volatile i32 15, i32* inttoptr (i64 30539860 to i32*)
%1 = tail call i32 (...) @Port_Init()
%2 = tail call i32 @Delay(i32 0)
store volatile i32 -67108865, i32* inttoptr (i64 31457292 to i32*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ board_ti_get_rev();
scalar_t__ board_ti_is(char *);
int /*<<< orphan*/ strncmp(char *, int /*<<< orphan*/, int);
int board_is_icev2(void) {
  return board_ti_is("A335_ICE") && !strncmp("2", board_ti_get_rev(), 1);
}


x86 assembly (clang, -O0):
<board_is_icev2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1050 <board_ti_is@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x1(%rbp)
je     117b <board_is_icev2+0x4b>
mov    $0x0,%al
call   1040 <board_ti_get_rev@plt>
mov    %eax,%esi
lea    0xea3(%rip),%rdi
mov    $0x1,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<board_is_icev2>:
push   %rax
lea    0xec8(%rip),%rdi
call   1050 <board_ti_is@plt>
test   %rax,%rax
je     1167 <board_is_icev2+0x37>
xor    %eax,%eax
call   1040 <board_ti_get_rev@plt>
lea    0xeb9(%rip),%rdi
mov    %eax,%esi
mov    $0x1,%edx
call   1030 <strncmp@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"A335_ICE\00"
@.str.1 = [2 x i8] c"2\00"
define i32 @board_is_icev2() {
%1 = call i64 @board_ti_is(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %8
3: ; preds = %0
%4 = call i32 (...) @board_ti_get_rev()
%5 = call i32 @strncmp(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %4, i32 1)
%6 = icmp ne i32 %5, 0
%7 = xor i1 %6, true
br label %8
8: ; preds = %3, %0
%9 = phi i1 [ false, %0 ], [ %7, %3 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
@.str = [9 x i8] c"A335_ICE\00"
@.str.1 = [2 x i8] c"2\00"
define i32 @board_is_icev2() {
%1 = tail call i64 @board_ti_is(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
br i1 %2, label %8, label %3
3: ; preds = %0
%4 = tail call i32 (...) @board_ti_get_rev()
%5 = tail call i32 @strncmp(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %4, i32 1)
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %3, %0
%9 = phi i32 [ 0, %0 ], [ %7, %3 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void usage(char *progname) {
  printf("\nUsage: %s grib_in grib_out\n", progname);
  exit(1);
}


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

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

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

LLVM IR (-O2):
@.str = [29 x i8] c"\0AUsage: %s grib_in grib_out\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
int is_space(char c) {
  if (c == ' ' || c == '\n' || c == '\t')
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<is_space>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x20,%eax
je     1131 <is_space+0x31>
movsbl -0x5(%rbp),%eax
cmp    $0xa,%eax
je     1131 <is_space+0x31>
movsbl -0x5(%rbp),%eax
cmp    $0x9,%eax
jne    113d <is_space+0x3d>
movl   $0x1,-0x4(%rbp)
jmp    1144 <is_space+0x44>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_space>:
cmp    $0x20,%dil
ja     1120 <is_space+0x20>
mov    $0x1,%eax
movzbl %dil,%ecx
movabs $0x100000600,%rdx
bt     %rcx,%rdx
jae    1120 <is_space+0x20>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @is_space(i8 signext %0) {
switch i8 %0, label %2 [
i8 32, label %3
i8 10, label %3
i8 9, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
/* Type definitions */
typedef int __u_char;

/* Variables and functions */
int /*<<< orphan*/ _IO(int, int /*<<< orphan*/);
int ioctl(int, int /*<<< orphan*/, int);
int cbmarch_talk(int f, __u_char dev, __u_char secadr) {
  return ioctl(f, _IO(0xcb, 0), (dev << 8) | secadr);
}


x86 assembly (clang, -O0):
<cbmarch_talk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    $0xcb,%edi
xor    %esi,%esi
call   1030 <_IO@plt>
mov    -0x10(%rbp),%edi
mov    %eax,%esi
mov    -0x8(%rbp),%edx
shl    $0x8,%edx
or     -0xc(%rbp),%edx
call   1040 <ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbmarch_talk>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %esi,%ebp
mov    %edi,%r14d
mov    $0xcb,%edi
xor    %esi,%esi
call   1030 <_IO@plt>
shl    $0x8,%ebp
or     %ebp,%ebx
mov    %r14d,%edi
mov    %eax,%esi
mov    %ebx,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <ioctl@plt>

LLVM IR (-O0):
define i32 @cbmarch_talk(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = call i32 @_IO(i32 203, i32 0)
%9 = load i32, i32* %5
%10 = shl i32 %9, 8
%11 = load i32, i32* %6
%12 = or i32 %10, %11
%13 = call i32 @ioctl(i32 %7, i32 %8, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @cbmarch_talk(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @_IO(i32 203, i32 0)
%5 = shl i32 %1, 8
%6 = or i32 %5, %2
%7 = tail call i32 @ioctl(i32 %0, i32 %4, i32 %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0x97() {
  Assert_real((isalnum(151) == 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_isalnum.c",
              760, ("isalnum should be 0 for 0x97"));
}


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

x86 assembly (clang, -O2):
<t_isalnum_0x97>:
push   %rax
mov    $0x97,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2f8,%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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0x97\00"
define void @t_isalnum_0x97() {
%1 = call i64 @isalnum(i32 151)
%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 760, 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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0x97\00"
define void @t_isalnum_0x97() {
%1 = tail call i64 @isalnum(i32 151)
%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 760, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  char v[1024];
  int i;
  printf("BEFORE\n");
  for (i = 0; i < 1024; i++)
    printf("i=%d\n", i);
  printf("AFTER\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x414(%rbp)
cmpl   $0x400,-0x414(%rbp)
jge    1172 <main+0x62>
mov    -0x414(%rbp),%esi
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x414(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x414(%rbp)
jmp    113a <main+0x2a>
lea    0xe95(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xedc(%rip),%rdi
call   1030 <puts@plt>
lea    0xeca(%rip),%rbx
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%ebp
cmp    $0x400,%ebp
jne    1140 <main+0x20>
lea    0xeaf(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str.1 = [6 x i8] c"i=%d\0A\00"
@str = [7 x i8] c"BEFORE\00"
@str.3 = [6 x i8] c"AFTER\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))
br label %2
2: ; preds = %0, %2
%3 = phi i32 [ 0, %0 ], [ %5, %2 ]
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = add nuw nsw i32 %3, 1
%6 = icmp eq i32 %5, 1024
br i1 %6, label %7, label %2
7: ; preds = %2
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.3, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct addrinfo {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ freeaddrinfo(struct addrinfo *);
void gc_freeaddrinfo_callback(void *addr) {
  freeaddrinfo((struct addrinfo *)addr);
}


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

x86 assembly (clang, -O2):
<gc_freeaddrinfo_callback>:
jmp    1030 <freeaddrinfo@plt>

LLVM IR (-O0):
%struct.addrinfo = type { i32 }
define void @gc_freeaddrinfo_callback(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.addrinfo*
%5 = call i32 @freeaddrinfo(%struct.addrinfo* %4)
ret void
}

LLVM IR (-O2):
%struct.addrinfo = type { i32 }
define void @gc_freeaddrinfo_callback(i8* %0) {
%2 = bitcast i8* %0 to %struct.addrinfo*
%3 = tail call i32 @freeaddrinfo(%struct.addrinfo* %2)
ret void
}
int main(void) {
  int *p;
  p = 0;
  *p = 42;
  return 0;
}


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

x86 assembly (clang, -O2):
LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
store i32 0, i32* %1
store i32* null, i32** %2
%3 = load i32*, i32** %2
store i32 42, i32* %3
ret i32 0
}

LLVM IR (-O2):
/* Variables and functions */
int /*<<< orphan*/ nop(int *);
void interprocedural_nop_in_callee_bad() {
  int x;
  nop(&x);
  int y = x;
}


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

x86 assembly (clang, -O2):
<interprocedural_nop_in_callee_bad>:
push   %rax
lea    0x4(%rsp),%rdi
call   1030 <nop@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @interprocedural_nop_in_callee_bad() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @nop(i32* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ read(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stdout;
int main() {
  char buf[8];
  puts("pwn this!");
  fflush(stdout);
  read(0, buf, 1024);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e8e(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
lea    -0xc(%rbp),%rsi
xor    %edi,%edi
mov    $0x400,%edx
call   1040 <read@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    %rsp,%rsi
xor    %edi,%edi
mov    $0x400,%edx
call   1040 <read@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"pwn this!\00"
@stdout = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca [8 x i8]
store i32 0, i32* %1
%3 = call i32 @puts(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stdout
%5 = call i32 @fflush(i32 %4)
%6 = getelementptr inbounds [8 x i8], [8 x i8]* %2, i64 0, i64 0
%7 = call i32 @read(i32 0, i8* %6, i32 1024)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"pwn this!\00"
@stdout = global i32 0
define i32 @main() {
%1 = alloca [8 x i8]
%2 = getelementptr inbounds [8 x i8], [8 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stdout
%5 = tail call i32 @fflush(i32 %4)
%6 = call i32 @read(i32 0, i8* %2, i32 1024)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ set_rawer_terminal_mode();
void io_setup(void) { set_rawer_terminal_mode(); }


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

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

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

LLVM IR (-O2):
define void @io_setup() {
%1 = tail call i32 (...) @set_rawer_terminal_mode()
ret void
}
/* Variables and functions */
int omp_get_thread_num();
int /*<<< orphan*/ printf(char *, int);
int main() {
  int nthreads;
#pragma omp parallel
  {
    nthreads = omp_get_thread_num();
    printf("Hi I'am %d\n", nthreads);
  }
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"Hi I'am %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @omp_get_thread_num()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"Hi I'am %d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @omp_get_thread_num()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ run_tests();
int main(void) {
  run_tests();
  return 0;
}


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

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

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

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

/* Variables and functions */
scalar_t__ pthread_join(int /*<<< orphan*/, void **);
int /*<<< orphan*/ terminal_error(char *);
void join_pthread(pthread_t th, void **thread_return) {
  if (pthread_join(th, thread_return))
    terminal_error("pthread_join");
}


x86 assembly (clang, -O0):
<join_pthread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <pthread_join@plt>
cmp    $0x0,%rax
je     1151 <join_pthread+0x31>
lea    0xeb4(%rip),%rdi
call   1030 <terminal_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<join_pthread>:
push   %rax
call   1040 <pthread_join@plt>
test   %rax,%rax
je     1138 <join_pthread+0x18>
lea    0xece(%rip),%rdi
pop    %rax
jmp    1030 <terminal_error@plt>
pop    %rax
ret

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

LLVM IR (-O2):
@.str = [13 x i8] c"pthread_join\00"
define void @join_pthread(i32 %0, i8** %1) {
%3 = tail call i64 @pthread_join(i32 %0, i8** %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @terminal_error(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret void
}
/* Variables and functions */
int getValidInteger();
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int num1;
  printf("Enter integer string > ");
  num1 = getValidInteger();
  printf("num1 = %d\n", num1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getValidInteger@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xec7(%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    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getValidInteger@plt>
lea    0xedb(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Enter integer string > \00"
@.str.1 = [11 x i8] c"num1 = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @getValidInteger()
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"Enter integer string > \00"
@.str.1 = [11 x i8] c"num1 = %d\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @getValidInteger()
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %2)
ret i32 0
}
/* Variables and functions */
char *libintl_dgettext(char const *, char const *);
char *dgettext(const char *domainname, const char *msgid) {
  return libintl_dgettext(domainname, msgid);
}


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

x86 assembly (clang, -O2):
<dgettext>:
jmp    1030 <libintl_dgettext@plt>

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

LLVM IR (-O2):
define i8* @dgettext(i8* %0, i8* %1) {
%3 = tail call i8* @libintl_dgettext(i8* %0, i8* %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ DebugLogStatusHandle();
int /*<<< orphan*/ UAVObjUpdated(int /*<<< orphan*/);
void DebugLogStatusUpdated() { UAVObjUpdated(DebugLogStatusHandle()); }


x86 assembly (clang, -O0):
<DebugLogStatusUpdated>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <DebugLogStatusHandle@plt>
mov    %eax,%edi
call   1040 <UAVObjUpdated@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<DebugLogStatusUpdated>:
push   %rax
xor    %eax,%eax
call   1030 <DebugLogStatusHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <UAVObjUpdated@plt>

LLVM IR (-O0):
define void @DebugLogStatusUpdated() {
%1 = call i32 (...) @DebugLogStatusHandle()
%2 = call i32 @UAVObjUpdated(i32 %1)
ret void
}

LLVM IR (-O2):
define void @DebugLogStatusUpdated() {
%1 = tail call i32 (...) @DebugLogStatusHandle()
%2 = tail call i32 @UAVObjUpdated(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ say(char *, int);
void talk(void) { say("What a lovely stone!", 1); }


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"What a lovely stone!\00"
define void @talk() {
%1 = call i32 @say(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"What a lovely stone!\00"
define void @talk() {
%1 = tail call i32 @say(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}
int assemble(s)
char *s;
{ return (0); }


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

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

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

LLVM IR (-O2):
define i32 @assemble(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int reverse(int);
int main(int argc, char *argv[]) {
  printf("%d\n", reverse(123456));
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @reverse(i32 123456)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @reverse(i32 123456)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ get_string(char *);
scalar_t__ initPS(int /*<<< orphan*/, char *);
int /*<<< orphan*/ s_let(char *, char *);
char *macinitps(char *arg) {
  char target[10240];
  get_string(target);
  if (initPS(get_string(arg), target))
    s_let("none", arg);
  else
    *arg = '\0';
  return (arg);
}


x86 assembly (clang, -O0):
<macinitps>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2810,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x2810(%rbp),%rdi
call   1050 <get_string@plt>
mov    -0x8(%rbp),%rdi
call   1050 <get_string@plt>
mov    %eax,%edi
lea    -0x2810(%rbp),%rsi
call   1040 <initPS@plt>
cmp    $0x0,%rax
je     1181 <macinitps+0x51>
mov    -0x8(%rbp),%rsi
lea    0xe89(%rip),%rdi
call   1030 <s_let@plt>
jmp    1188 <macinitps+0x58>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
add    $0x2810,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<macinitps>:
push   %r14
push   %rbx
sub    $0x2808,%rsp
mov    %rdi,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
call   1050 <get_string@plt>
mov    %rbx,%rdi
call   1050 <get_string@plt>
mov    %eax,%edi
mov    %r14,%rsi
call   1040 <initPS@plt>
test   %rax,%rax
je     1170 <macinitps+0x40>
lea    0xe9a(%rip),%rdi
mov    %rbx,%rsi
call   1030 <s_let@plt>
jmp    1173 <macinitps+0x43>
movb   $0x0,(%rbx)
mov    %rbx,%rax
add    $0x2808,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"none\00"
define i8* @macinitps(i8* returned %0) {
%2 = alloca [10240 x i8]
%3 = getelementptr inbounds [10240 x i8], [10240 x i8]* %2, i64 0, i64 0
%4 = call i32 @get_string(i8* %3)
%5 = call i32 @get_string(i8* %0)
%6 = call i64 @initPS(i32 %5, i8* %3)
%7 = icmp eq i64 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %1
%9 = call i32 @s_let(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %11
10: ; preds = %1
store i8 0, i8* %0
br label %11
11: ; preds = %10, %8
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void whileloop(int i) {
  while (i < 5) {
    printf("%d\n", i);
    i++;
  }
}


x86 assembly (clang, -O0):
<whileloop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x5,-0x4(%rbp)
jge    1142 <whileloop+0x32>
mov    -0x4(%rbp),%esi
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111b <whileloop+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<whileloop>:
push   %r14
push   %rbx
push   %rax
cmp    $0x4,%edi
jg     1142 <whileloop+0x32>
mov    %edi,%ebx
lea    0xede(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x5,%ebx
jne    1130 <whileloop+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @whileloop(i32 %0) {
%2 = icmp slt i32 %0, 5
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ %0, %1 ]
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = add i32 %4, 1
%7 = icmp eq i32 %6, 5
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
/* Variables and functions */
char tolower(char);
char fhex(char c) {
  c = tolower(c);
  if ('0' <= c && c <= '9')
    return c - '0';
  else if ('a' <= c && c <= 'f')
    return (c - 'a') + 10;
  return 0xFF;
}


x86 assembly (clang, -O0):
<fhex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%edi
call   1030 <tolower@plt>
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%ecx
mov    $0x30,%eax
cmp    %ecx,%eax
jg     1157 <fhex+0x47>
movsbl -0x2(%rbp),%eax
cmp    $0x39,%eax
jg     1157 <fhex+0x47>
movsbl -0x2(%rbp),%eax
sub    $0x30,%eax
mov    %al,-0x1(%rbp)
jmp    1190 <fhex+0x80>
movsbl -0x2(%rbp),%ecx
mov    $0x61,%eax
cmp    %ecx,%eax
jg     1187 <fhex+0x77>
movsbl -0x2(%rbp),%eax
cmp    $0x66,%eax
jg     1187 <fhex+0x77>
movsbl -0x2(%rbp),%eax
sub    $0x61,%eax
add    $0xa,%eax
mov    %al,-0x1(%rbp)
jmp    1190 <fhex+0x80>
jmp    118c <fhex+0x7c>
movb   $0xff,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fhex>:
push   %rax
call   1030 <tolower@plt>
lea    -0x30(%rax),%ecx
lea    -0x61(%rax),%edx
add    $0xa9,%al
cmp    $0x6,%dl
movzbl %al,%eax
mov    $0xff,%edx
cmovb  %eax,%edx
cmp    $0xa,%cl
movzbl %cl,%eax
cmovae %edx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define signext i8 @fhex(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = call signext i8 @tolower(i8 signext %4)
store i8 %5, i8* %3
%6 = load i8, i8* %3
%7 = sext i8 %6 to i32
%8 = icmp sle i32 48, %7
br i1 %8, label %9, label %18
9: ; preds = %1
%10 = load i8, i8* %3
%11 = sext i8 %10 to i32
%12 = icmp sle i32 %11, 57
br i1 %12, label %13, label %18
13: ; preds = %9
%14 = load i8, i8* %3
%15 = sext i8 %14 to i32
%16 = sub nsw i32 %15, 48
%17 = trunc i32 %16 to i8
store i8 %17, i8* %2
br label %34
18: ; preds = %9, %1
%19 = load i8, i8* %3
%20 = sext i8 %19 to i32
%21 = icmp sle i32 97, %20
br i1 %21, label %22, label %32
22: ; preds = %18
%23 = load i8, i8* %3
%24 = sext i8 %23 to i32
%25 = icmp sle i32 %24, 102
br i1 %25, label %26, label %32
26: ; preds = %22
%27 = load i8, i8* %3
%28 = sext i8 %27 to i32
%29 = sub nsw i32 %28, 97
%30 = add nsw i32 %29, 10
%31 = trunc i32 %30 to i8
store i8 %31, i8* %2
br label %34
32: ; preds = %22, %18
br label %33
33: ; preds = %32
store i8 -1, i8* %2
br label %34
34: ; preds = %33, %26, %13
%35 = load i8, i8* %2
ret i8 %35
}

LLVM IR (-O2):
define signext i8 @fhex(i8 signext %0) {
%2 = tail call signext i8 @tolower(i8 signext %0)
%3 = add i8 %2, -48
%4 = icmp ult i8 %3, 10
%5 = add i8 %2, -97
%6 = icmp ult i8 %5, 6
%7 = add i8 %2, -87
%8 = select i1 %6, i8 %7, i8 -1
%9 = select i1 %4, i8 %3, i8 %8
ret i8 %9
}
void memcg_bind_pages(struct kmem_cache *s, int order) {}


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

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

LLVM IR (-O0):
%struct.kmem_cache = type opaque
define void @memcg_bind_pages(%struct.kmem_cache* %0, i32 %1) {
%3 = alloca %struct.kmem_cache*
%4 = alloca i32
store %struct.kmem_cache* %0, %struct.kmem_cache** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
%struct.kmem_cache = type opaque
define void @memcg_bind_pages(%struct.kmem_cache* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Cdgebr2d(int, char *, char *, int, int, double *, int, int,
                            int);
void wcc_Cdgebr2d(int ConTxt, char *scope, char *top, int m, int n, char *A,
                  int lda, int rsrc, int csrc) {
  Cdgebr2d(ConTxt, scope, top, m, n, (double *)A, lda, rsrc, csrc);
}


x86 assembly (clang, -O0):
<wcc_Cdgebr2d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x20(%rbp),%r8d
mov    -0x28(%rbp),%r9
mov    0x10(%rbp),%r11d
mov    0x18(%rbp),%r10d
mov    0x20(%rbp),%eax
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
call   1030 <Cdgebr2d@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wcc_Cdgebr2d>:
jmp    1030 <Cdgebr2d@plt>

LLVM IR (-O0):
define void @wcc_Cdgebr2d(i32 %0, i8* %1, i8* %2, i32 %3, i32 %4, i8* %5, i32 %6, i32 %7, i32 %8) {
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i32
%14 = alloca i32
%15 = alloca i8*
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
store i32 %0, i32* %10
store i8* %1, i8** %11
store i8* %2, i8** %12
store i32 %3, i32* %13
store i32 %4, i32* %14
store i8* %5, i8** %15
store i32 %6, i32* %16
store i32 %7, i32* %17
store i32 %8, i32* %18
%19 = load i32, i32* %10
%20 = load i8*, i8** %11
%21 = load i8*, i8** %12
%22 = load i32, i32* %13
%23 = load i32, i32* %14
%24 = load i8*, i8** %15
%25 = bitcast i8* %24 to double*
%26 = load i32, i32* %16
%27 = load i32, i32* %17
%28 = load i32, i32* %18
%29 = call i32 @Cdgebr2d(i32 %19, i8* %20, i8* %21, i32 %22, i32 %23, double* %25, i32 %26, i32 %27, i32 %28)
ret void
}

LLVM IR (-O2):
define void @wcc_Cdgebr2d(i32 %0, i8* %1, i8* %2, i32 %3, i32 %4, i8* %5, i32 %6, i32 %7, i32 %8) {
%10 = bitcast i8* %5 to double*
%11 = tail call i32 @Cdgebr2d(i32 %0, i8* %1, i8* %2, i32 %3, i32 %4, double* %10, i32 %6, i32 %7, i32 %8)
ret void
}