xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("__GNUC__ = %d\n", 9);
  printf("__GNUC_MINOR__ = %d\n", 4);
  printf("__GNUC_PATCHLEVEL__ = %d\n", 0);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"__GNUC__ = %d\0A\00"
@.str.1 = [21 x i8] c"__GNUC_MINOR__ = %d\0A\00"
@.str.2 = [26 x i8] c"__GNUC_PATCHLEVEL__ = %d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 9)
%3 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 4)
%4 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i32 0)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"__GNUC__ = %d\0A\00"
@.str.1 = [21 x i8] c"__GNUC_MINOR__ = %d\0A\00"
@.str.2 = [26 x i8] c"__GNUC_PATCHLEVEL__ = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 9)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 4)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i32 0)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ chtype;
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int /*<<< orphan*/ mvwaddch(int /*<<< orphan*/ *, int, int, int /*<<< orphan*/);
void lil(WINDOW *win) {
  mvwaddch(win, 0, 0, (chtype)'V');
  mvwaddch(win, 1, 0, (chtype)'@');
  mvwaddch(win, 1, 3, (chtype)'~');
}


x86 assembly (clang, -O0):
<lil>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %edx,%edx
mov    $0x56,%ecx
mov    %edx,%esi
call   1030 <mvwaddch@plt>
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
xor    %edx,%edx
mov    $0x40,%ecx
call   1030 <mvwaddch@plt>
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
mov    $0x3,%edx
mov    $0x7e,%ecx
call   1030 <mvwaddch@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lil>:
push   %rbx
mov    %rdi,%rbx
xor    %esi,%esi
xor    %edx,%edx
mov    $0x56,%ecx
call   1030 <mvwaddch@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %edx,%edx
mov    $0x40,%ecx
call   1030 <mvwaddch@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x3,%edx
mov    $0x7e,%ecx
pop    %rbx
jmp    1030 <mvwaddch@plt>

LLVM IR (-O0):
define void @lil(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @mvwaddch(i32* %3, i32 0, i32 0, i32 86)
%5 = load i32*, i32** %2
%6 = call i32 @mvwaddch(i32* %5, i32 1, i32 0, i32 64)
%7 = load i32*, i32** %2
%8 = call i32 @mvwaddch(i32* %7, i32 1, i32 3, i32 126)
ret void
}

LLVM IR (-O2):
define void @lil(i32* %0) {
%2 = tail call i32 @mvwaddch(i32* %0, i32 0, i32 0, i32 86)
%3 = tail call i32 @mvwaddch(i32* %0, i32 1, i32 0, i32 64)
%4 = tail call i32 @mvwaddch(i32* %0, i32 1, i32 3, i32 126)
ret void
}
/* Variables and functions */
int vrna_file_PS_rnaplot_a(char const *, char const *, char const *,
                           char const *, char const *, int /*<<< orphan*/ *);
int PS_rna_plot_a(char *string, char *structure, char *ssfile, char *pre,
                  char *post) {
  return vrna_file_PS_rnaplot_a((const char *)string, (const char *)structure,
                                (const char *)ssfile, (const char *)pre,
                                (const char *)post, NULL);
}


x86 assembly (clang, -O0):
<PS_rna_plot_a>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
xor    %eax,%eax
mov    %eax,%r9d
call   1030 <vrna_file_PS_rnaplot_a@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PS_rna_plot_a>:
xor    %r9d,%r9d
jmp    1030 <vrna_file_PS_rnaplot_a@plt>

LLVM IR (-O0):
define i32 @PS_rna_plot_a(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i8* %3, i8** %9
store i8* %4, i8** %10
%11 = load i8*, i8** %6
%12 = load i8*, i8** %7
%13 = load i8*, i8** %8
%14 = load i8*, i8** %9
%15 = load i8*, i8** %10
%16 = call i32 @vrna_file_PS_rnaplot_a(i8* %11, i8* %12, i8* %13, i8* %14, i8* %15, i32* null)
ret i32 %16
}

LLVM IR (-O2):
define i32 @PS_rna_plot_a(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4) {
%6 = tail call i32 @vrna_file_PS_rnaplot_a(i8* %0, i8* %1, i8* %2, i8* %3, i8* %4, i32* null)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ obtener_elemento(char *, char *, int, int);
scalar_t__ strcmp(char *, char *);
scalar_t__ strlen(char *);
int obtener_I(char *inst_o_dato) {
  char inst[3];
  obtener_elemento(inst_o_dato, inst, 3, 3);
  if (strcmp(inst, "I") == 0)
    return 1;
  if (strlen(inst) == 0)
    return 0;
  else
    return -1;
}


x86 assembly (clang, -O0):
<obtener_I>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x13(%rbp),%rsi
mov    $0x3,%ecx
mov    %ecx,%edx
call   1050 <obtener_elemento@plt>
lea    -0x13(%rbp),%rdi
lea    0xea5(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1176 <obtener_I+0x46>
movl   $0x1,-0x4(%rbp)
jmp    119c <obtener_I+0x6c>
lea    -0x13(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x0,%rax
jne    1195 <obtener_I+0x65>
movl   $0x0,-0x4(%rbp)
jmp    119c <obtener_I+0x6c>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<obtener_I>:
push   %rbx
sub    $0x10,%rsp
lea    0xd(%rsp),%rbx
mov    %rbx,%rsi
mov    $0x3,%edx
mov    $0x3,%ecx
call   1040 <obtener_elemento@plt>
lea    0xebd(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
cmp    0xd(%rsp),%cl
sbb    %ecx,%ecx
test   %rax,%rax
mov    $0x1,%eax
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"I\00"
define i32 @obtener_I(i8* %0) {
%2 = alloca [3 x i8]
%3 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 0
%4 = call i32 @obtener_elemento(i8* %0, i8* %3, i32 3, i32 3)
%5 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
%7 = load i8, i8* %3
%8 = icmp ne i8 %7, 0
%9 = sext i1 %8 to i32
%10 = select i1 %6, i32 1, i32 %9
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128d;

/* Variables and functions */
int /*<<< orphan*/ _mm_store_sd(void *, int /*<<< orphan*/);
void test_store_sd(__m128d x, void *y) { _mm_store_sd(y, x); }


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

x86 assembly (clang, -O2):
<test_store_sd>:
mov    %edi,%eax
mov    %rsi,%rdi
mov    %eax,%esi
jmp    1030 <_mm_store_sd@plt>

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

LLVM IR (-O2):
define void @test_store_sd(i32 %0, i8* %1) {
%3 = tail call i32 @_mm_store_sd(i8* %1, i32 %0)
ret void
}
/* Variables and functions */
int get_imtype();
int is_fcitx_on(char *);
int is_ibus_on();
int is_imeon(char *home_dir) {
  int imtype = get_imtype();
  if (imtype == 1) {
    return is_fcitx_on(home_dir);
  } else if (imtype == 2) {
    return is_ibus_on();
  }
  return 1;
}


x86 assembly (clang, -O0):
<is_imeon>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <get_imtype@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
jne    1161 <is_imeon+0x31>
mov    -0x10(%rbp),%rdi
call   1050 <is_fcitx_on@plt>
mov    %eax,-0x4(%rbp)
jmp    1186 <is_imeon+0x56>
cmpl   $0x2,-0x14(%rbp)
jne    117a <is_imeon+0x4a>
mov    $0x0,%al
call   1030 <is_ibus_on@plt>
mov    %eax,-0x4(%rbp)
jmp    1186 <is_imeon+0x56>
jmp    117f <is_imeon+0x4f>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_imeon>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <get_imtype@plt>
cmp    $0x2,%eax
je     114e <is_imeon+0x1e>
cmp    $0x1,%eax
jne    1156 <is_imeon+0x26>
mov    %rbx,%rdi
pop    %rbx
jmp    1050 <is_fcitx_on@plt>
xor    %eax,%eax
pop    %rbx
jmp    1030 <is_ibus_on@plt>
mov    $0x1,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @is_imeon(i8* %0) {
%2 = tail call i32 (...) @get_imtype()
switch i32 %2, label %7 [
i32 1, label %3
i32 2, label %5
]
3: ; preds = %1
%4 = tail call i32 @is_fcitx_on(i8* %0)
br label %7
5: ; preds = %1
%6 = tail call i32 (...) @is_ibus_on()
br label %7
7: ; preds = %1, %5, %3
%8 = phi i32 [ %4, %3 ], [ %6, %5 ], [ 1, %1 ]
ret i32 %8
}
/* Variables and functions */
int vga_crt_in(int);
int /*<<< orphan*/ vga_crt_out(int, int);
void tty_enable_cursor() {
  int csr = vga_crt_in(0xA);
  csr &= ~020;
  vga_crt_out(0xA, csr);
}


x86 assembly (clang, -O0):
<tty_enable_cursor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xa,%edi
call   1040 <vga_crt_in@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xffffffef,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0xa,%edi
call   1030 <vga_crt_out@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tty_enable_cursor>:
push   %rax
mov    $0xa,%edi
call   1040 <vga_crt_in@plt>
and    $0xffffffef,%eax
mov    $0xa,%edi
mov    %eax,%esi
pop    %rax
jmp    1030 <vga_crt_out@plt>

LLVM IR (-O0):
define void @tty_enable_cursor() {
%1 = alloca i32
%2 = call i32 @vga_crt_in(i32 10)
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = and i32 %3, -17
store i32 %4, i32* %1
%5 = load i32, i32* %1
%6 = call i32 @vga_crt_out(i32 10, i32 %5)
ret void
}

LLVM IR (-O2):
define void @tty_enable_cursor() {
%1 = tail call i32 @vga_crt_in(i32 10)
%2 = and i32 %1, -17
%3 = tail call i32 @vga_crt_out(i32 10, i32 %2)
ret void
}
/* Variables and functions */
char *allocate(int /*<<< orphan*/, int);
int /*<<< orphan*/ strcpy(char *, char const *);
int strlen(char const *);
char *copystr(const char *s) {
  char *c;
  c = allocate(0, (strlen(s) + 1) * sizeof(*c));
  strcpy(c, s);
  return c;
}


x86 assembly (clang, -O0):
<copystr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%esi
xor    %edi,%edi
call   1050 <allocate@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copystr>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%esi
xor    %edi,%edi
call   1050 <allocate@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @copystr(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = add nsw i32 %5, 1
%7 = sext i32 %6 to i64
%8 = mul i64 %7, 1
%9 = trunc i64 %8 to i32
%10 = call i8* @allocate(i32 0, i32 %9)
store i8* %10, i8** %3
%11 = load i8*, i8** %3
%12 = load i8*, i8** %2
%13 = call i32 @strcpy(i8* %11, i8* %12)
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
define i8* @copystr(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = tail call i8* @allocate(i32 0, i32 %3)
%5 = tail call i32 @strcpy(i8* %4, i8* %0)
ret i8* %4
}
int main(int x) {
  int y;
  x++;
  if (x > 0) {
    y = x;
  } else {
    y = 0 - x;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    112c <main+0x2c>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1134 <main+0x34>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ memset(unsigned char *, int /*<<< orphan*/, unsigned long);
int fb_clear_startpoint(unsigned char *start, unsigned long size) {
  memset(start, 0, size);
  return 0;
}


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

x86 assembly (clang, -O2):
<fb_clear_startpoint>:
push   %rax
mov    %rsi,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @fb_clear_startpoint(i8* %0, i64 %1) {
%3 = tail call i32 @memset(i8* %0, i32 0, i64 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  unsigned long n = 16;
  unsigned long size = 4912;
  assert(!(0xffffffffffffffffUL / size < n));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x10,-0x8(%rbp)
movq   $0x1330,-0x10(%rbp)
mov    $0xffffffffffffffff,%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x10(%rbp)
cmp    -0x8(%rbp),%rax
setb   %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i64
%2 = alloca i64
store i64 16, i64* %1
store i64 4912, i64* %2
%3 = load i64, i64* %2
%4 = udiv i64 -1, %3
%5 = load i64, i64* %1
%6 = icmp ult i64 %4, %5
%7 = xor i1 %6, true
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
ret i32 0
}

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

/* Variables and functions */
int iswcntrl(int /*<<< orphan*/);
int iswcntrl_l(wint_t c, locale_t l) { return iswcntrl(c); }


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

x86 assembly (clang, -O2):
<iswcntrl_l>:
jmp    1030 <iswcntrl@plt>

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

LLVM IR (-O2):
define i32 @iswcntrl_l(i32 %0, i32 %1) {
%3 = tail call i32 @iswcntrl(i32 %0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ cons_putc(int);
void cputch(int c, int *cnt) {
  cons_putc(c);
  (*cnt)++;
}


x86 assembly (clang, -O0):
<cputch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <cons_putc@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cputch>:
push   %rbx
mov    %rsi,%rbx
call   1030 <cons_putc@plt>
addl   $0x1,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @cputch(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
store i32* %1, i32** %4
%5 = load i32, i32* %3
%6 = call i32 @cons_putc(i32 %5)
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = add nsw i32 %8, 1
store i32 %9, i32* %7
ret void
}

LLVM IR (-O2):
define void @cputch(i32 %0, i32* nocapture %1) {
%3 = tail call i32 @cons_putc(i32 %0)
%4 = load i32, i32* %1
%5 = add nsw i32 %4, 1
store i32 %5, i32* %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
void closeForPrint(FILE *outFile) { fclose(outFile); }


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

x86 assembly (clang, -O2):
<closeForPrint>:
jmp    1030 <fclose@plt>

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

LLVM IR (-O2):
define void @closeForPrint(i32* nocapture %0) {
%2 = tail call i32 @fclose(i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ g(int);
main() {
  int sz = sizeof *(0 ? 0 : (int(*)[f()])0);
  g(sz);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <f@plt>
mov    %eax,%eax
shl    $0x2,%rax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <g@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <f@plt>
lea    0x0(,%rax,4),%edi
call   1040 <g@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @f()
%4 = zext i32 %3 to i64
%5 = mul nuw i64 4, %4
%6 = trunc i64 %5 to i32
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = call i32 @g(i32 %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @f()
%2 = shl i32 %1, 2
%3 = tail call i32 @g(i32 %2)
ret i32 0
}
int in_tunnel(char *bufp, struct sockaddr *sap) { return (-1); }


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

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

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

LLVM IR (-O2):
%struct.sockaddr = type opaque
define i32 @in_tunnel(i8* nocapture readnone %0, %struct.sockaddr* nocapture readnone %1) {
ret i32 -1
}
long double _Complex add_long_double_rr(long double a, long double b) {
  return a + b;
}


x86 assembly (clang, -O0):
<add_long_double_rr>:
push   %rbp
mov    %rsp,%rbp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x30(%rbp)
fstpt  -0x40(%rbp)
fldt   -0x30(%rbp)
fldt   -0x40(%rbp)
faddp  %st,%st(1)
fstpt  -0x20(%rbp)
fldz
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_long_double_rr>:
fldt   0x18(%rsp)
fldt   0x8(%rsp)
faddp  %st,%st(1)
fldz
fxch   %st(1)
ret

LLVM IR (-O0):
define { x86_fp80, x86_fp80 } @add_long_double_rr(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca { x86_fp80, x86_fp80 }
%4 = alloca x86_fp80
%5 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %4
store x86_fp80 %1, x86_fp80* %5
%6 = load x86_fp80, x86_fp80* %4
%7 = load x86_fp80, x86_fp80* %5
%8 = fadd x86_fp80 %6, %7
%9 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %3, i32 0, i32 0
%10 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %3, i32 0, i32 1
store x86_fp80 %8, x86_fp80* %9
store x86_fp80 0xK00000000000000000000, x86_fp80* %10
%11 = load { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %3
ret { x86_fp80, x86_fp80 } %11
}

LLVM IR (-O2):
define { x86_fp80, x86_fp80 } @add_long_double_rr(x86_fp80 %0, x86_fp80 %1) {
%3 = fadd x86_fp80 %0, %1
%4 = insertvalue { x86_fp80, x86_fp80 } poison, x86_fp80 %3, 0
%5 = insertvalue { x86_fp80, x86_fp80 } %4, x86_fp80 0xK00000000000000000000, 1
ret { x86_fp80, x86_fp80 } %5
}
/* Variables and functions */
float pow(float, float);
float Float_pow(float x, float y) { return pow(x, y); }


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

x86 assembly (clang, -O2):
<Float_pow>:
jmp    1030 <pow@plt>

LLVM IR (-O0):
define float @Float_pow(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 @pow(float %5, float %6)
ret float %7
}

LLVM IR (-O2):
define float @Float_pow(float %0, float %1) {
%3 = tail call float @pow(float %0, float %1)
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void postVisit() { printf(")"); }


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

x86 assembly (clang, -O2):
<postVisit>:
mov    $0x29,%edi
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @postVisit() {
%1 = tail call i32 @putchar(i32 41)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ read_user();
int /*<<< orphan*/ show_ingredients();
void ingredients() {
  show_ingredients();
  read_user();
}


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

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

LLVM IR (-O0):
define void @ingredients() {
%1 = call i32 (...) @show_ingredients()
%2 = call i32 (...) @read_user()
ret void
}

LLVM IR (-O2):
define void @ingredients() {
%1 = tail call i32 (...) @show_ingredients()
%2 = tail call i32 (...) @read_user()
ret void
}
void g_node_destroy() {}


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

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

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

LLVM IR (-O2):
define void @g_node_destroy() {
ret void
}
/* Variables and functions */
scalar_t__ isprint(int);
int isgraph(int c) { return isprint(c) && (c != ' '); }


x86 assembly (clang, -O0):
<isgraph>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isprint@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
je     113f <isgraph+0x2f>
cmpl   $0x20,-0x4(%rbp)
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isgraph>:
push   %rbx
mov    %edi,%ebx
call   1030 <isprint@plt>
test   %rax,%rax
setne  %al
cmp    $0x20,%ebx
setne  %cl
and    %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @isgraph(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @isprint(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp ne i32 %7, 32
br label %9
9: ; preds = %6, %1
%10 = phi i1 [ false, %1 ], [ %8, %6 ]
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @isgraph(i32 %0) {
%2 = tail call i64 @isprint(i32 %0)
%3 = icmp ne i64 %2, 0
%4 = icmp ne i32 %0, 32
%5 = and i1 %4, %3
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int /*<<< orphan*/ benchmark(int /*<<< orphan*/, int, char *, char *);
time_t benchmark_start() { return benchmark(0, 1, "", ""); }


x86 assembly (clang, -O0):
<benchmark_start>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x1,%esi
lea    0xede(%rip),%rcx
mov    %rcx,%rdx
call   1030 <benchmark@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<benchmark_start>:
lea    0xee9(%rip),%rcx
xor    %edi,%edi
mov    $0x1,%esi
mov    %rcx,%rdx
jmp    1030 <benchmark@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i32 @benchmark_start() {
%1 = call i32 @benchmark(i32 0, i32 1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i32 @benchmark_start() {
%1 = tail call i32 @benchmark(i32 0, i32 1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
double fd2ts(char *);
int /*<<< orphan*/ free(char *);
char *lt2fd();
double lt2ts() {
  double tsec;
  char *datestring;
  datestring = lt2fd();
  tsec = fd2ts(datestring);
  free(datestring);
  return (tsec);
}


x86 assembly (clang, -O0):
<lt2ts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <lt2fd@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <fd2ts@plt>
movsd  %xmm0,-0x8(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lt2ts>:
push   %rbx
sub    $0x10,%rsp
xor    %eax,%eax
call   1040 <lt2fd@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <fd2ts@plt>
movsd  %xmm0,0x8(%rsp)
mov    %rbx,%rdi
call   1030 <free@plt>
movsd  0x8(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @lt2ts() {
%1 = alloca double
%2 = alloca i8*
%3 = call i8* (...) @lt2fd()
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = call double @fd2ts(i8* %4)
store double %5, double* %1
%6 = load i8*, i8** %2
%7 = call i32 @free(i8* %6)
%8 = load double, double* %1
ret double %8
}

LLVM IR (-O2):
define double @lt2ts() {
%1 = tail call i8* (...) @lt2fd()
%2 = tail call double @fd2ts(i8* %1)
%3 = tail call i32 @free(i8* %1)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ set_MGW_fname(char *, char *, char *);
void set_MGW_moneysentfname(char *fname, char *NXTaddr) {
  set_MGW_fname(fname, "sent", NXTaddr);
}


x86 assembly (clang, -O0):
<set_MGW_moneysentfname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xed1(%rip),%rsi
call   1030 <set_MGW_fname@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_MGW_moneysentfname>:
mov    %rsi,%rdx
lea    0xee6(%rip),%rsi
jmp    1030 <set_MGW_fname@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"sent\00"
define void @set_MGW_moneysentfname(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 i32 @set_MGW_fname(i8* %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"sent\00"
define void @set_MGW_moneysentfname(i8* %0, i8* %1) {
%3 = tail call i32 @set_MGW_fname(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
/* Variables and functions */
int getpagesize();
size_t tp_utils_roundedstack(size_t stacksize) {
  int pagesize = getpagesize();
  if (stacksize % pagesize) {
    return stacksize + pagesize;
  }
  return stacksize;
}


x86 assembly (clang, -O0):
<tp_utils_roundedstack>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <getpagesize@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
xor    %edx,%edx
div    %rcx
cmp    $0x0,%rdx
je     1151 <tp_utils_roundedstack+0x41>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
jmp    1159 <tp_utils_roundedstack+0x49>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tp_utils_roundedstack>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <getpagesize@plt>
mov    %eax,%esi
movslq %eax,%rcx
mov    %rbx,%rax
or     %rcx,%rax
shr    $0x20,%rax
je     1136 <tp_utils_roundedstack+0x26>
mov    %rbx,%rax
xor    %edx,%edx
div    %rcx
jmp    113c <tp_utils_roundedstack+0x2c>
mov    %ebx,%eax
xor    %edx,%edx
div    %esi
test   %rdx,%rdx
cmove  %rdx,%rcx
add    %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @tp_utils_roundedstack(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
%5 = call i32 (...) @getpagesize()
store i32 %5, i32* %4
%6 = load i64, i64* %3
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = urem i64 %6, %8
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %16
11: ; preds = %1
%12 = load i64, i64* %3
%13 = load i32, i32* %4
%14 = sext i32 %13 to i64
%15 = add i64 %12, %14
store i64 %15, i64* %2
br label %18
16: ; preds = %1
%17 = load i64, i64* %3
store i64 %17, i64* %2
br label %18
18: ; preds = %16, %11
%19 = load i64, i64* %2
ret i64 %19
}

LLVM IR (-O2):
define i64 @tp_utils_roundedstack(i64 %0) {
%2 = tail call i32 (...) @getpagesize()
%3 = sext i32 %2 to i64
%4 = urem i64 %0, %3
%5 = icmp eq i64 %4, 0
%6 = select i1 %5, i64 0, i64 %3
%7 = add i64 %6, %0
ret i64 %7
}
void foo348(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo348(i32 %0) {
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int modbus_receive(uint8_t *addr, uint8_t *function, uint8_t *payload) {
  uint8_t len = 0;
  return len;
}


x86 assembly (clang, -O0):
<modbus_receive>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @modbus_receive(i32* %0, i32* %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
store i32 0, i32* %7
%8 = load i32, i32* %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @modbus_receive(i32* nocapture readnone %0, i32* nocapture readnone %1, i32* nocapture readnone %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Fwd(unsigned char);
int /*<<< orphan*/ OnEx(unsigned char, unsigned char);
int /*<<< orphan*/ SetPower(unsigned char, char);
void OnFwdEx(unsigned char Outputs, char Power, unsigned char reset) {
  Fwd(Outputs);
  if (Power != -127)
    SetPower(Outputs, Power);
  OnEx(Outputs, reset);
}


x86 assembly (clang, -O0):
<OnFwdEx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %sil,%cl
mov    %dil,%dl
mov    %dl,-0x1(%rbp)
mov    %cl,-0x2(%rbp)
mov    %al,-0x3(%rbp)
movzbl -0x1(%rbp),%edi
call   1030 <Fwd@plt>
movsbl -0x2(%rbp),%eax
cmp    $0xffffff81,%eax
je     116e <OnFwdEx+0x3e>
mov    -0x1(%rbp),%al
movzbl %al,%edi
movsbl -0x2(%rbp),%esi
call   1050 <SetPower@plt>
mov    -0x1(%rbp),%al
movzbl %al,%edi
movzbl -0x3(%rbp),%esi
call   1040 <OnEx@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OnFwdEx>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
call   1030 <Fwd@plt>
movzbl %bl,%ebx
cmp    $0x81,%bpl
je     1154 <OnFwdEx+0x24>
movsbl %bpl,%esi
mov    %ebx,%edi
call   1050 <SetPower@plt>
movzbl %r14b,%esi
mov    %ebx,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <OnEx@plt>

LLVM IR (-O0):
define void @OnFwdEx(i8 zeroext %0, i8 signext %1, i8 zeroext %2) {
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
store i8 %0, i8* %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%7 = load i8, i8* %4
%8 = call i32 @Fwd(i8 zeroext %7)
%9 = load i8, i8* %5
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %10, -127
br i1 %11, label %12, label %16
12: ; preds = %3
%13 = load i8, i8* %4
%14 = load i8, i8* %5
%15 = call i32 @SetPower(i8 zeroext %13, i8 signext %14)
br label %16
16: ; preds = %12, %3
%17 = load i8, i8* %4
%18 = load i8, i8* %6
%19 = call i32 @OnEx(i8 zeroext %17, i8 zeroext %18)
ret void
}

LLVM IR (-O2):
define void @OnFwdEx(i8 zeroext %0, i8 signext %1, i8 zeroext %2) {
%4 = tail call i32 @Fwd(i8 zeroext %0)
%5 = icmp eq i8 %1, -127
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @SetPower(i8 zeroext %0, i8 signext %1)
br label %8
8: ; preds = %6, %3
%9 = tail call i32 @OnEx(i8 zeroext %0, i8 zeroext %2)
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int initialize_standard_homotopy(int fixed_gamma, double regamma,
                                 double imgamma) {
  int fail, *b;
  double c[2];
  c[0] = regamma;
  c[1] = imgamma;
  fail = _ada_use_c2phc4c(500, &fixed_gamma, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<initialize_standard_homotopy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x28(%rbp),%rdx
lea    -0x40(%rbp),%rcx
mov    $0x1f4,%edi
lea    -0x4(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initialize_standard_homotopy>:
sub    $0x28,%rsp
mov    %edi,0xc(%rsp)
movsd  %xmm0,0x10(%rsp)
movsd  %xmm1,0x18(%rsp)
lea    0xc(%rsp),%rsi
lea    0x10(%rsp),%rcx
mov    $0x1f4,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
define i32 @initialize_standard_homotopy(i32 %0, double %1, double %2) {
%4 = alloca i32
%5 = alloca double
%6 = alloca double
%7 = alloca i32
%8 = alloca i32*
%9 = alloca [2 x double]
store i32 %0, i32* %4
store double %1, double* %5
store double %2, double* %6
%10 = load double, double* %5
%11 = getelementptr inbounds [2 x double], [2 x double]* %9, i64 0, i64 0
store double %10, double* %11
%12 = load double, double* %6
%13 = getelementptr inbounds [2 x double], [2 x double]* %9, i64 0, i64 1
store double %12, double* %13
%14 = load i32*, i32** %8
%15 = getelementptr inbounds [2 x double], [2 x double]* %9, i64 0, i64 0
%16 = call i32 @_ada_use_c2phc4c(i32 500, i32* %4, i32* %14, double* %15, i32 0)
store i32 %16, i32* %7
%17 = load i32, i32* %7
ret i32 %17
}

LLVM IR (-O2):
define i32 @initialize_standard_homotopy(i32 %0, double %1, double %2) {
%4 = alloca i32
%5 = alloca [2 x double]
store i32 %0, i32* %4
%6 = bitcast [2 x double]* %5 to i8*
%7 = getelementptr inbounds [2 x double], [2 x double]* %5, i64 0, i64 0
store double %1, double* %7
%8 = getelementptr inbounds [2 x double], [2 x double]* %5, i64 0, i64 1
store double %2, double* %8
%9 = call i32 @_ada_use_c2phc4c(i32 500, i32* %4, i32* undef, double* %7, i32 0)
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ f();
int /*<<< orphan*/ g();
int main() {
  f();
  while (1) {
  x:
    15;
  }
  g();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <f@plt>
jmp    112b <main+0x1b>
jmp    1126 <main+0x16>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <f@plt>
nopl   0x0(%rax,%rax,1)
jmp    1120 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @f()
br label %3
3: ; preds = %0, %4
br label %4
4: ; preds = %3
br label %3
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @f()
br label %2
2: ; preds = %0, %2
br label %2
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int vsnprintf(char *, int, char const *, int /*<<< orphan*/);
int vsprintf(char *buf, const char *fmt, va_list args) {
  return vsnprintf(buf, 0x7fffffff, fmt, args);
}


x86 assembly (clang, -O0):
<vsprintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    $0x7fffffff,%esi
call   1030 <vsnprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vsprintf>:
mov    %edx,%ecx
mov    %rsi,%rdx
mov    $0x7fffffff,%esi
jmp    1030 <vsnprintf@plt>

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

LLVM IR (-O2):
define i32 @vsprintf(i8* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @vsnprintf(i8* %0, i32 2147483647, i8* %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int f337(int *);
int f338(int *p) { return f337(p); }


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

x86 assembly (clang, -O2):
<f338>:
jmp    1030 <f337@plt>

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

LLVM IR (-O2):
define i32 @f338(i32* %0) {
%2 = tail call i32 @f337(i32* %0)
ret i32 %2
}
void ft_bzero(void *ptr, int size) {
  int index;
  index = 0;
  while (index < size) {
    ((char *)ptr)[index] = 0;
    ++index;
  }
}


x86 assembly (clang, -O0):
<ft_bzero>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1138 <ft_bzero+0x38>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <ft_bzero+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_bzero>:
test   %esi,%esi
jle    1122 <ft_bzero+0x12>
push   %rax
mov    %esi,%edx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @ft_bzero(i8* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %2
ret void
}
void apilogic_thread_yield(void) { return; }


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

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

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

LLVM IR (-O2):
define void @apilogic_thread_yield() {
ret void
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ printf(char *, int);
main() {
  int c = getchar();
  printf("getchar() != EOF? %d\n", c != EOF);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2eac(%rip),%rcx
cmp    (%rcx),%eax
setne  %al
and    $0x1,%al
movzbl %al,%esi
lea    0xeb3(%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 <getchar@plt>
mov    0x2eb9(%rip),%rcx
xor    %esi,%esi
cmp    (%rcx),%eax
setne  %sil
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"getchar() != EOF? %d\0A\00"
@EOF = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = call i32 (...) @getchar()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = load i32, i32* @EOF
%5 = icmp ne i32 %3, %4
%6 = zext i1 %5 to i32
%7 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"getchar() != EOF? %d\0A\00"
@EOF = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp ne i32 %1, %2
%4 = zext i1 %3 to i32
%5 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Variables and functions */
unsigned char opcode_bbb_set_addr_mode(unsigned char, unsigned char);
unsigned char opcode_CC01_set_addr_mode(unsigned char base,
                                        unsigned char addr_mode) {
  return opcode_bbb_set_addr_mode(base, addr_mode);
  ;
}


x86 assembly (clang, -O0):
<opcode_CC01_set_addr_mode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    -0x1(%rbp),%al
movzbl %al,%edi
movzbl -0x2(%rbp),%esi
call   1030 <opcode_bbb_set_addr_mode@plt>
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<opcode_CC01_set_addr_mode>:
jmp    1030 <opcode_bbb_set_addr_mode@plt>

LLVM IR (-O0):
define zeroext i8 @opcode_CC01_set_addr_mode(i8 zeroext %0, i8 zeroext %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 zeroext i8 @opcode_bbb_set_addr_mode(i8 zeroext %5, i8 zeroext %6)
ret i8 %7
}

LLVM IR (-O2):
define zeroext i8 @opcode_CC01_set_addr_mode(i8 zeroext %0, i8 zeroext %1) {
%3 = tail call zeroext i8 @opcode_bbb_set_addr_mode(i8 zeroext %0, i8 zeroext %1)
ret i8 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, unsigned int *);
unsigned int enterChoice(void) {
  unsigned int menuChoice;
  printf("%s", "\nEnter you choice\n"
               "1 - store a formatted tex file of accounts called\n"
               "    \"accounts.txt\" for printing\n"
               "2 - update an account\n"
               "3 - add a new account\n"
               "4 - delete an account\n"
               "5 - end program\n? ");
  scanf("%u", &menuChoice);
  return menuChoice;
}


x86 assembly (clang, -O0):
<enterChoice>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
lea    0xecd(%rip),%rsi
call   1030 <printf@plt>
lea    0xf7a(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<enterChoice>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed4(%rip),%rsi
call   1030 <printf@plt>
lea    0xf81(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [185 x i8] c"\0AEnter you choice\0A1 - store a formatted tex file of accounts called\0A \22accounts.txt\22 for printing\0A2 - update an account\0A3 - add a new account\0A4 - delete an account\0A5 - end program\0A? \00"
@.str.2 = [3 x i8] c"%u\00"
define i32 @enterChoice() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([185 x i8], [185 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [185 x i8] c"\0AEnter you choice\0A1 - store a formatted tex file of accounts called\0A \22accounts.txt\22 for printing\0A2 - update an account\0A3 - add a new account\0A4 - delete an account\0A5 - end program\0A? \00"
@.str.2 = [3 x i8] c"%u\00"
define i32 @enterChoice() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([185 x i8], [185 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
ret i32 %5
}
const char *ltr_int_master_fifo_name() {
  static const char main_fifo[] = "/tmp/ltr_fifi";
  return main_fifo;
}


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

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

LLVM IR (-O0):
@ltr_int_master_fifo_name.main_fifo = internal constant [14 x i8] c"/tmp/ltr_fifi\00"
define i8* @ltr_int_master_fifo_name() {
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @ltr_int_master_fifo_name.main_fifo, i64 0, i64 0)
}

LLVM IR (-O2):
@ltr_int_master_fifo_name.main_fifo = internal constant [14 x i8] c"/tmp/ltr_fifi\00"
define i8* @ltr_int_master_fifo_name() {
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @ltr_int_master_fifo_name.main_fifo, i64 0, i64 0)
}