xunge/DecIR huggingface dataset:
int isBranch(instr)
unsigned char *instr;
{
  if (((((int)instr & 2) || (((unsigned char *)instr)[0] & 0x80) == 0)
           ? 2
           : 4) == 2)
    return isShortBranch(instr);
  else
    return isLongBranch(instr);
}


x86 assembly (clang, -O0):
<isBranch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,%ecx
and    $0x2,%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
jne    1158 <isBranch+0x38>
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
and    $0x80,%eax
cmp    $0x0,%eax
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%dl
mov    $0x4,%eax
mov    $0x2,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
cmp    $0x2,%eax
jne    1187 <isBranch+0x67>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1040 <isShortBranch@plt>
mov    %eax,-0x4(%rbp)
jmp    1195 <isBranch+0x75>
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <isLongBranch@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isBranch>:
test   $0x2,%dil
jne    112b <isBranch+0xb>
cmpb   $0x0,(%rdi)
js     1132 <isBranch+0x12>
xor    %eax,%eax
jmp    1040 <isShortBranch@plt>
xor    %eax,%eax
jmp    1030 <isLongBranch@plt>

LLVM IR (-O0):
define i32 @isBranch(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = ptrtoint i8* %4 to i32
%6 = and i32 %5, 2
%7 = icmp ne i32 %6, 0
br i1 %7, label %15, label %8
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 0
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = and i32 %12, 128
%14 = icmp eq i32 %13, 0
br label %15
15: ; preds = %8, %1
%16 = phi i1 [ true, %1 ], [ %14, %8 ]
%17 = zext i1 %16 to i64
%18 = select i1 %16, i32 2, i32 4
%19 = icmp eq i32 %18, 2
br i1 %19, label %20, label %23
20: ; preds = %15
%21 = load i8*, i8** %3
%22 = call i32 (i8*, ...) bitcast (i32 (...)* @isShortBranch to i32 (i8*, ...)*)(i8* %21)
store i32 %22, i32* %2
br label %26
23: ; preds = %15
%24 = load i8*, i8** %3
%25 = call i32 (i8*, ...) bitcast (i32 (...)* @isLongBranch to i32 (i8*, ...)*)(i8* %24)
store i32 %25, i32* %2
br label %26
26: ; preds = %23, %20
%27 = load i32, i32* %2
ret i32 %27
}

LLVM IR (-O2):
define i32 @isBranch(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = and i64 %2, 2
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8, i8* %0
%7 = icmp sgt i8 %6, -1
br i1 %7, label %8, label %10
8: ; preds = %1, %5
%9 = tail call i32 (i8*, ...) bitcast (i32 (...)* @isShortBranch to i32 (i8*, ...)*)(i8* %0)
br label %12
10: ; preds = %5
%11 = tail call i32 (i8*, ...) bitcast (i32 (...)* @isLongBranch to i32 (i8*, ...)*)(i8* %0)
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}
unsigned long long int PowUI(unsigned int a, unsigned int b) {
  unsigned int i;
  unsigned long long int r = 1;
  for (i = 0; i < b; i++)
    r = r * a;
  return r;
}


x86 assembly (clang, -O0):
<PowUI>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movq   $0x1,-0x18(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jae    1142 <PowUI+0x42>
mov    -0x18(%rbp),%rax
mov    -0x4(%rbp),%ecx
imul   %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1119 <PowUI+0x19>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<PowUI>:
test   %esi,%esi
je     111a <PowUI+0x1a>
mov    %edi,%ecx
lea    -0x1(%rsi),%eax
mov    %esi,%edx
and    $0x7,%edx
cmp    $0x7,%eax
jae    1120 <PowUI+0x20>
mov    $0x1,%eax
jmp    1155 <PowUI+0x55>
mov    $0x1,%eax
ret
and    $0xfffffff8,%esi
mov    $0x1,%eax
nopl   0x0(%rax,%rax,1)
imul   %rcx,%rax
imul   %rcx,%rax
imul   %rcx,%rax
imul   %rcx,%rax
imul   %rcx,%rax
imul   %rcx,%rax
imul   %rcx,%rax
imul   %rcx,%rax
add    $0xfffffff8,%esi
jne    1130 <PowUI+0x30>
test   %edx,%edx
je     1169 <PowUI+0x69>
nopl   0x0(%rax)
imul   %rcx,%rax
add    $0xffffffff,%edx
jne    1160 <PowUI+0x60>
ret

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

LLVM IR (-O2):
define i64 @PowUI(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %34, label %4
4: ; preds = %2
%5 = zext i32 %0 to i64
%6 = add i32 %1, -1
%7 = and i32 %1, 7
%8 = icmp ult i32 %6, 7
br i1 %8, label %24, label %9
9: ; preds = %4
%10 = and i32 %1, -8
br label %11
11: ; preds = %11, %9
%12 = phi i64 [ 1, %9 ], [ %21, %11 ]
%13 = phi i32 [ 0, %9 ], [ %22, %11 ]
%14 = mul i64 %12, %5
%15 = mul i64 %14, %5
%16 = mul i64 %15, %5
%17 = mul i64 %16, %5
%18 = mul i64 %17, %5
%19 = mul i64 %18, %5
%20 = mul i64 %19, %5
%21 = mul i64 %20, %5
%22 = add i32 %13, 8
%23 = icmp eq i32 %22, %10
br i1 %23, label %24, label %11
24: ; preds = %11, %4
%25 = phi i64 [ undef, %4 ], [ %21, %11 ]
%26 = phi i64 [ 1, %4 ], [ %21, %11 ]
%27 = icmp eq i32 %7, 0
br i1 %27, label %34, label %28
28: ; preds = %24, %28
%29 = phi i64 [ %31, %28 ], [ %26, %24 ]
%30 = phi i32 [ %32, %28 ], [ 0, %24 ]
%31 = mul i64 %29, %5
%32 = add i32 %30, 1
%33 = icmp eq i32 %32, %7
br i1 %33, label %34, label %28
34: ; preds = %24, %28, %2
%35 = phi i64 [ 1, %2 ], [ %25, %24 ], [ %31, %28 ]
ret i64 %35
}
/* Variables and functions */
int ENXIO;
int pm8921_is_battery_present(void) { return -ENXIO; }


x86 assembly (clang, -O0):
<pm8921_is_battery_present>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    0x2ed3(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pm8921_is_battery_present>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@ENXIO = global i32 0
define i32 @pm8921_is_battery_present() {
%1 = load i32, i32* @ENXIO
%2 = sub nsw i32 0, %1
ret i32 %2
}

LLVM IR (-O2):
@ENXIO = global i32 0
define i32 @pm8921_is_battery_present() {
%1 = load i32, i32* @ENXIO
%2 = sub nsw i32 0, %1
ret i32 %2
}
/* Variables and functions */
int cbuf(int, int, int);
cbuf12(int f, int n) { return (cbuf(f, n, 12)); }


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

x86 assembly (clang, -O2):
<cbuf12>:
mov    $0xc,%edx
jmp    1030 <cbuf@plt>

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

LLVM IR (-O2):
define i32 @cbuf12(i32 %0, i32 %1) {
%3 = tail call i32 @cbuf(i32 %0, i32 %1, i32 12)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ test_asm();
int /*<<< orphan*/ test_phi(int);
int main() {
  test_asm();
  test_phi(1);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_asm()
%2 = tail call i32 @test_phi(i32 1)
ret i32 0
}
/* Type definitions */
struct inotify_event {
  int dummy;
};

/* Variables and functions */
int inotifytools_fprintf(int /*<<< orphan*/, struct inotify_event *, char *);
int /*<<< orphan*/ stdout;
int inotifytools_printf(struct inotify_event *event, char *fmt) {
  return inotifytools_fprintf(stdout, event, fmt);
}


x86 assembly (clang, -O0):
<inotifytools_printf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <inotifytools_fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inotifytools_printf>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    0x2ec3(%rip),%rax
mov    (%rax),%edi
jmp    1030 <inotifytools_fprintf@plt>

LLVM IR (-O0):
%struct.inotify_event = type { i32 }
@stdout = global i32 0
define i32 @inotifytools_printf(%struct.inotify_event* %0, i8* %1) {
%3 = alloca %struct.inotify_event*
%4 = alloca i8*
store %struct.inotify_event* %0, %struct.inotify_event** %3
store i8* %1, i8** %4
%5 = load i32, i32* @stdout
%6 = load %struct.inotify_event*, %struct.inotify_event** %3
%7 = load i8*, i8** %4
%8 = call i32 @inotifytools_fprintf(i32 %5, %struct.inotify_event* %6, i8* %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.inotify_event = type { i32 }
@stdout = global i32 0
define i32 @inotifytools_printf(%struct.inotify_event* %0, i8* %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @inotifytools_fprintf(i32 %3, %struct.inotify_event* %0, i8* %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ lprcat(char *);
void dnd_2hed(void) {
  lprcat("Welcome to the Larn Thrift Shoppe.  We stock many items explorers "
         "find useful\n");
  lprcat(
      " in their adventures.  Feel free to browse to your hearts content.\n");
  lprcat("Also be advised, if you break 'em, you pay for 'em.");
}


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

x86 assembly (clang, -O2):
<dnd_2hed>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <lprcat@plt>
lea    0xf2b(%rip),%rdi
call   1030 <lprcat@plt>
lea    0xf63(%rip),%rdi
pop    %rax
jmp    1030 <lprcat@plt>

LLVM IR (-O0):
@.str = [79 x i8] c"Welcome to the Larn Thrift Shoppe. We stock many items explorers find useful\0A\00"
@.str.1 = [68 x i8] c" in their adventures. Feel free to browse to your hearts content.\0A\00"
@.str.2 = [52 x i8] c"Also be advised, if you break 'em, you pay for 'em.\00"
define void @dnd_2hed() {
%1 = call i32 @lprcat(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @lprcat(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @lprcat(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [79 x i8] c"Welcome to the Larn Thrift Shoppe. We stock many items explorers find useful\0A\00"
@.str.1 = [68 x i8] c" in their adventures. Feel free to browse to your hearts content.\0A\00"
@.str.2 = [52 x i8] c"Also be advised, if you break 'em, you pay for 'em.\00"
define void @dnd_2hed() {
%1 = tail call i32 @lprcat(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @lprcat(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @lprcat(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ bar(char *, char *);
int main() {
  char *p = "a", *q = "b";
  if (p)
    if (bar(p, q))
      return 0;
  abort();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xec1(%rip),%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1174 <main+0x54>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <bar@plt>
cmp    $0x0,%rax
je     116f <main+0x4f>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret
jmp    1174 <main+0x54>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed3(%rip),%rsi
call   1040 <bar@plt>
test   %rax,%rax
je     113d <main+0x1d>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"a\00"
@.str.1 = [2 x i8] c"b\00"
define i32 @main() {
%1 = tail call i64 @bar(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
br i1 %2, label %4, label %3
3: ; preds = %0
ret i32 0
4: ; preds = %0
%5 = tail call i32 (...) @abort()
unreachable
}
void add_suites() {
  extern void _add_suite_tests_niffs_cfg_tests(void);
  _add_suite_tests_niffs_cfg_tests();
  ;
  extern void _add_suite_tests_niffs_func_tests(void);
  _add_suite_tests_niffs_func_tests();
  ;
  extern void _add_suite_tests_niffs_sys_tests(void);
  _add_suite_tests_niffs_sys_tests();
  ;
  extern void _add_suite_tests_niffs_run_tests(void);
  _add_suite_tests_niffs_run_tests();
  ;
}


x86 assembly (clang, -O0):
<add_suites>:
push   %rbp
mov    %rsp,%rbp
call   1060 <_add_suite_tests_niffs_cfg_tests@plt>
call   1050 <_add_suite_tests_niffs_func_tests@plt>
call   1030 <_add_suite_tests_niffs_sys_tests@plt>
call   1040 <_add_suite_tests_niffs_run_tests@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_suites>:
push   %rax
call   1060 <_add_suite_tests_niffs_cfg_tests@plt>
call   1050 <_add_suite_tests_niffs_func_tests@plt>
call   1030 <_add_suite_tests_niffs_sys_tests@plt>
pop    %rax
jmp    1040 <_add_suite_tests_niffs_run_tests@plt>

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

LLVM IR (-O2):
define void @add_suites() {
tail call void @_add_suite_tests_niffs_cfg_tests()
tail call void @_add_suite_tests_niffs_func_tests()
tail call void @_add_suite_tests_niffs_sys_tests()
tail call void @_add_suite_tests_niffs_run_tests()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0x57() {
  Assert_real((iscntrl(87) == 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_iscntrl.c",
              440, ("iscntrl should be 0 for W"));
}


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

x86 assembly (clang, -O2):
<t_iscntrl_0x57>:
push   %rax
mov    $0x57,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x1b8,%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_iscntrl.c\00"
@.str.1 = [26 x i8] c"iscntrl should be 0 for W\00"
define void @t_iscntrl_0x57() {
%1 = call i64 @iscntrl(i32 87)
%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 440, i8* getelementptr inbounds ([26 x i8], [26 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_iscntrl.c\00"
@.str.1 = [26 x i8] c"iscntrl should be 0 for W\00"
define void @t_iscntrl_0x57() {
%1 = tail call i64 @iscntrl(i32 87)
%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 440, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *xstrdup(char *);
char *get_sysconfdir(void) { return xstrdup("/etc"); }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"/etc\00"
define i8* @get_sysconfdir() {
%1 = call i8* @xstrdup(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [5 x i8] c"/etc\00"
define i8* @get_sysconfdir() {
%1 = tail call i8* @xstrdup(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ call7j(unsigned int, char, int, short, long, float,
                          unsigned char, double, unsigned short, unsigned long);
void call7i(unsigned long ul, unsigned int ui, char c, int i, short s, long l,
            float f, unsigned char uc, double d, unsigned short us) {
  call7j(ui, c, i, s, l, f, uc, d, us, ul);
}


x86 assembly (clang, -O0):
<call7i>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %r8w,%ax
mov    0x18(%rbp),%r8w
mov    0x10(%rbp),%r8b
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %dl,-0xd(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %ax,-0x16(%rbp)
mov    %r9,-0x20(%rbp)
movss  %xmm0,-0x24(%rbp)
movsd  %xmm1,-0x30(%rbp)
mov    -0xc(%rbp),%edi
mov    -0xd(%rbp),%sil
mov    -0x14(%rbp),%edx
mov    -0x16(%rbp),%cx
mov    -0x20(%rbp),%r8
movss  -0x24(%rbp),%xmm0
mov    0x10(%rbp),%r9b
movsd  -0x30(%rbp),%xmm1
mov    0x18(%rbp),%r10w
mov    -0x8(%rbp),%rax
movsbl %sil,%esi
movswl %cx,%ecx
movzbl %r9b,%r9d
movzwl %r10w,%r10d
mov    %r10d,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <call7j@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call7i>:
push   %rax
mov    %r9,%r10
mov    %rdi,%rax
movzbl 0x10(%rsp),%r9d
movzwl 0x18(%rsp),%r11d
mov    %esi,%edi
mov    %edx,%esi
mov    %ecx,%edx
mov    %r8d,%ecx
mov    %r10,%r8
push   %rax
push   %r11
call   1030 <call7j@plt>
add    $0x10,%rsp
pop    %rax
ret

LLVM IR (-O0):
define void @call7i(i64 %0, i32 %1, i8 signext %2, i32 %3, i16 signext %4, i64 %5, float %6, i8 zeroext %7, double %8, i16 zeroext %9) {
%11 = alloca i64
%12 = alloca i32
%13 = alloca i8
%14 = alloca i32
%15 = alloca i16
%16 = alloca i64
%17 = alloca float
%18 = alloca i8
%19 = alloca double
%20 = alloca i16
store i64 %0, i64* %11
store i32 %1, i32* %12
store i8 %2, i8* %13
store i32 %3, i32* %14
store i16 %4, i16* %15
store i64 %5, i64* %16
store float %6, float* %17
store i8 %7, i8* %18
store double %8, double* %19
store i16 %9, i16* %20
%21 = load i32, i32* %12
%22 = load i8, i8* %13
%23 = load i32, i32* %14
%24 = load i16, i16* %15
%25 = load i64, i64* %16
%26 = load float, float* %17
%27 = load i8, i8* %18
%28 = load double, double* %19
%29 = load i16, i16* %20
%30 = load i64, i64* %11
%31 = call i32 @call7j(i32 %21, i8 signext %22, i32 %23, i16 signext %24, i64 %25, float %26, i8 zeroext %27, double %28, i16 zeroext %29, i64 %30)
ret void
}

LLVM IR (-O2):
define void @call7i(i64 %0, i32 %1, i8 signext %2, i32 %3, i16 signext %4, i64 %5, float %6, i8 zeroext %7, double %8, i16 zeroext %9) {
%11 = tail call i32 @call7j(i32 %1, i8 signext %2, i32 %3, i16 signext %4, i64 %5, float %6, i8 zeroext %7, double %8, i16 zeroext %9, i64 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int num = 10;
  printf("%d", num++);
  num = 10;
  printf("%d", ++num);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 10)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 11)
ret i32 0
}
/* Variables and functions */
int htons(int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int port = 10086;
  int *p = &port;
  printf("%d\n", htons(10086));
  printf("%d\n", htons(*p));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x2766,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x2766,%edi
call   1030 <htons@plt>
mov    %eax,%esi
lea    0xeb6(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
call   1030 <htons@plt>
mov    %eax,%esi
lea    0xe9d(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @htons(i32 10086)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @htons(i32 10086)
%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 */
scalar_t__ islower(int);
int toupper(int c) {
  if (islower(c))
    return c + 'A' - 'a';
  return c;
}


x86 assembly (clang, -O0):
<toupper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
je     113e <toupper+0x2e>
mov    -0x8(%rbp),%eax
add    $0x41,%eax
sub    $0x61,%eax
mov    %eax,-0x4(%rbp)
jmp    1144 <toupper+0x34>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<toupper>:
push   %rbx
mov    %edi,%ebx
call   1030 <islower@plt>
lea    -0x20(%rbx),%ecx
test   %rax,%rax
cmove  %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @toupper(i32 %0) {
%2 = tail call i64 @islower(i32 %0)
%3 = icmp eq i64 %2, 0
%4 = add nsw i32 %0, -32
%5 = select i1 %3, i32 %0, i32 %4
ret i32 %5
}
/* Variables and functions */
char *strrchr(char const *, char);
const char *_gpgme_debug_srcname(const char *file) {
  const char *s = strrchr(file, '/');
  return s ? s + 1 : file;
}


x86 assembly (clang, -O0):
<_gpgme_debug_srcname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     114a <_gpgme_debug_srcname+0x3a>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1152 <_gpgme_debug_srcname+0x42>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_gpgme_debug_srcname>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2f,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @_gpgme_debug_srcname(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strrchr(i8* %4, i8 signext 47)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 1
br label %13
11: ; preds = %1
%12 = load i8*, i8** %2
br label %13
13: ; preds = %11, %8
%14 = phi i8* [ %10, %8 ], [ %12, %11 ]
ret i8* %14
}

LLVM IR (-O2):
define i8* @_gpgme_debug_srcname(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 47)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* %0, i8* %4
ret i8* %5
}
void FLASH_READY_intr(void) {}


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

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

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

LLVM IR (-O2):
define void @FLASH_READY_intr() {
ret void
}
min(a, b) {
  if (a > b)
    return (b);
  return (a);
}


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1121 <min+0x21>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1127 <min+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
mov    %edi,%eax
cmp    %esi,%edi
cmovg  %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @min(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
/* Variables and functions */
unsigned long long GET_UAA64BE(unsigned long long *, int /*<<< orphan*/);
unsigned long long BE64(unsigned long long x) { return GET_UAA64BE(&x, 0); }


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

x86 assembly (clang, -O2):
<BE64>:
push   %rax
mov    %rdi,(%rsp)
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <GET_UAA64BE@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i64 @BE64(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i64 @GET_UAA64BE(i64* %2, i32 0)
ret i64 %3
}

LLVM IR (-O2):
define i64 @BE64(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i64 @GET_UAA64BE(i64* %2, i32 0)
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int s2e_version();
void main(int argc, char *argv[], char *envp[]) {
  printf("S2E Version is: %d", s2e_version());
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x0,%al
call   1040 <s2e_version@plt>
mov    %eax,%esi
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [19 x i8] c"S2E Version is: %d\00"
define void @main(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8**
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8** %2, i8*** %6
%7 = call i32 (...) @s2e_version()
%8 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"S2E Version is: %d\00"
define void @main(i32 %0, i8** nocapture readnone %1, i8** nocapture readnone %2) {
%4 = tail call i32 (...) @s2e_version()
%5 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ menu_print_border();
int /*<<< orphan*/ menu_print_header(char *);
int /*<<< orphan*/ menu_print_options(int, int);
void menu_show(char *version, int lo, int fo) {
  menu_print_header(version);
  menu_print_border();
  menu_print_options(lo, fo);
}


x86 assembly (clang, -O0):
<menu_show>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <menu_print_header@plt>
mov    $0x0,%al
call   1040 <menu_print_border@plt>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <menu_print_options@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<menu_show>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%ebp
call   1050 <menu_print_header@plt>
xor    %eax,%eax
call   1040 <menu_print_border@plt>
mov    %ebp,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <menu_print_options@plt>

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

LLVM IR (-O2):
define void @menu_show(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 @menu_print_header(i8* %0)
%5 = tail call i32 (...) @menu_print_border()
%6 = tail call i32 @menu_print_options(i32 %1, i32 %2)
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *, char const *);
int h_echo(const char *msg) {
  printf("%s\n", msg);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<h_echo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ead(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h_echo>:
push   %rax
mov    %rdi,%rsi
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eb9(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @h_echo(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i32, i32* @EXIT_SUCCESS
ret i32 %5
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @h_echo(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}
void emit_type_definition_int32(
    struct processor_explicatory_state *process_state,
    struct modern_stream *stream, void *stream_state,
    struct modern_vfile *vfile, void *vfile_state) {}


x86 assembly (clang, -O0):
<emit_type_definition_int32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.processor_explicatory_state = type opaque
%struct.modern_stream = type opaque
%struct.modern_vfile = type opaque
define void @emit_type_definition_int32(%struct.processor_explicatory_state* %0, %struct.modern_stream* %1, i8* %2, %struct.modern_vfile* %3, i8* %4) {
%6 = alloca %struct.processor_explicatory_state*
%7 = alloca %struct.modern_stream*
%8 = alloca i8*
%9 = alloca %struct.modern_vfile*
%10 = alloca i8*
store %struct.processor_explicatory_state* %0, %struct.processor_explicatory_state** %6
store %struct.modern_stream* %1, %struct.modern_stream** %7
store i8* %2, i8** %8
store %struct.modern_vfile* %3, %struct.modern_vfile** %9
store i8* %4, i8** %10
ret void
}

LLVM IR (-O2):
%struct.processor_explicatory_state = type opaque
%struct.modern_stream = type opaque
%struct.modern_vfile = type opaque
define void @emit_type_definition_int32(%struct.processor_explicatory_state* nocapture %0, %struct.modern_stream* nocapture %1, i8* nocapture %2, %struct.modern_vfile* nocapture %3, i8* nocapture %4) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bar(int);
int /*<<< orphan*/ caller(int /*<<< orphan*/);
int /*<<< orphan*/ foo(int);
int main(int argc, char **argv) {
  caller(foo(argc));
  caller(bar(argc));
  return 123;
}


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    -0x8(%rbp),%edi
call   1050 <foo@plt>
mov    %eax,%edi
call   1040 <caller@plt>
mov    -0x8(%rbp),%edi
call   1030 <bar@plt>
mov    %eax,%edi
call   1040 <caller@plt>
mov    $0x7b,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %edi,%ebx
call   1050 <foo@plt>
mov    %eax,%edi
call   1040 <caller@plt>
mov    %ebx,%edi
call   1030 <bar@plt>
mov    %eax,%edi
call   1040 <caller@plt>
mov    $0x7b,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = call i32 @foo(i32 %6)
%8 = call i32 @caller(i32 %7)
%9 = load i32, i32* %4
%10 = call i32 @bar(i32 %9)
%11 = call i32 @caller(i32 %10)
ret i32 123
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @foo(i32 %0)
%4 = tail call i32 @caller(i32 %3)
%5 = tail call i32 @bar(i32 %0)
%6 = tail call i32 @caller(i32 %5)
ret i32 123
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char ch;
  scanf("%c", &ch);
  printf("%c\n", ch);
  char str[256];
  scanf("%s", str);
  printf("%s\n", str);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec7(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1040 <scanf@plt>
movsbl -0x5(%rbp),%esi
lea    0xeb6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x110(%rbp),%rsi
lea    0xea5(%rip),%rdi
call   1040 <scanf@plt>
lea    -0x110(%rbp),%rsi
lea    0xe95(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x110,%rsp
lea    0xec1(%rip),%rdi
lea    0xf(%rsp),%rsi
call   1050 <scanf@plt>
movsbl 0xf(%rsp),%esi
lea    0xeae(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xea4(%rip),%rdi
lea    0x10(%rsp),%rbx
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x110,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
@.str.1 = [4 x i8] c"%c\0A\00"
@.str.2 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca [256 x i8]
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%4 = load i8, i8* %1
%5 = sext i8 %4 to i32
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %7)
%9 = call i32 @puts(i8* %7)
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint16_t vc4_get_le16(const uint8_t *b) {
  return (uint16_t)b[0] | ((uint16_t)b[1] << 8);
}


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

x86 assembly (clang, -O2):
<vc4_get_le16>:
mov    0x8(%rdi),%eax
shl    $0x8,%eax
or     (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @vc4_get_le16(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = trunc i64 %2 to i32
%4 = getelementptr inbounds i64, i64* %0, i64 1
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = shl i32 %6, 8
%8 = or i32 %7, %3
ret i32 %8
}
void check_options_tcp_stream(struct options *opts, struct callbacks *cb) {}


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

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

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

LLVM IR (-O2):
%struct.options = type opaque
%struct.callbacks = type opaque
define void @check_options_tcp_stream(%struct.options* nocapture %0, %struct.callbacks* nocapture %1) {
ret void
}
int test_imm_D9uint16_mem(unsigned short *val) {
  return ((*val) & (0xD9 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_D9uint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%edx
and    $0xd9,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_D9uint16_mem>:
testb  $0xd9,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_D9uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 217
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ DbgDisplayVersion();
void GdbmiHandleShowVersion(void) { DbgDisplayVersion(); }


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

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

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

LLVM IR (-O2):
define void @GdbmiHandleShowVersion() {
%1 = tail call i32 (...) @DbgDisplayVersion()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ GenPrintInstr2Operands(int, int /*<<< orphan*/, int,
                                          int /*<<< orphan*/, int, int);
void GenGrowStack(int size) {
  if (!size)
    return;
  GenPrintInstr2Operands(0x0B, 0, 0x20, 0, 0x80, size);
}


x86 assembly (clang, -O0):
<GenGrowStack>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    112a <GenGrowStack+0x1a>
jmp    1147 <GenGrowStack+0x37>
mov    -0x4(%rbp),%r9d
mov    $0xb,%edi
xor    %ecx,%ecx
mov    $0x20,%edx
mov    $0x80,%r8d
mov    %ecx,%esi
call   1030 <GenPrintInstr2Operands@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GenGrowStack>:
test   %edi,%edi
je     1130 <GenGrowStack+0x20>
mov    %edi,%r9d
mov    $0xb,%edi
xor    %esi,%esi
mov    $0x20,%edx
xor    %ecx,%ecx
mov    $0x80,%r8d
jmp    1030 <GenPrintInstr2Operands@plt>
ret

LLVM IR (-O0):
define void @GenGrowStack(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %6, label %5
5: ; preds = %1
br label %9
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i32 @GenPrintInstr2Operands(i32 11, i32 0, i32 32, i32 0, i32 128, i32 %7)
br label %9
9: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
define void @GenGrowStack(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @GenPrintInstr2Operands(i32 11, i32 0, i32 32, i32 0, i32 128, i32 %0)
br label %5
5: ; preds = %1, %3
ret void
}
int main(void) {
  5 << 1;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void unconfigured_after_hook(struct wsgi_request *wsgi_req) { return; }


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

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

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

LLVM IR (-O2):
%struct.wsgi_request = type opaque
define void @unconfigured_after_hook(%struct.wsgi_request* nocapture %0) {
ret void
}
void rop3_164_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = S | T;
  stk3 = ~stk3;
  stk2 = *D | stk3;
  stk1 = T ^ stk2;
  stk1 = ~stk1;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_164_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xa(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xd(%rbp)
movzbl -0xd(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xd(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xd(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_164_1_0>:
mov    %edx,%eax
or     %sil,%al
not    %al
mov    (%rdi),%cl
or     %cl,%al
xor    %dl,%al
or     %sil,%al
not    %al
and    %sil,%cl
or     %al,%cl
mov    %cl,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_164_1_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8, i8* %5
%11 = zext i8 %10 to i32
%12 = load i8, i8* %6
%13 = zext i8 %12 to i32
%14 = or i32 %11, %13
%15 = trunc i32 %14 to i8
store i8 %15, i8* %9
%16 = load i8, i8* %9
%17 = zext i8 %16 to i32
%18 = xor i32 %17, -1
%19 = trunc i32 %18 to i8
store i8 %19, i8* %9
%20 = load i8*, i8** %4
%21 = load i8, i8* %20
%22 = zext i8 %21 to i32
%23 = load i8, i8* %9
%24 = zext i8 %23 to i32
%25 = or i32 %22, %24
%26 = trunc i32 %25 to i8
store i8 %26, i8* %8
%27 = load i8, i8* %6
%28 = zext i8 %27 to i32
%29 = load i8, i8* %8
%30 = zext i8 %29 to i32
%31 = xor i32 %28, %30
%32 = trunc i32 %31 to i8
store i8 %32, i8* %7
%33 = load i8, i8* %7
%34 = zext i8 %33 to i32
%35 = xor i32 %34, -1
%36 = trunc i32 %35 to i8
store i8 %36, i8* %7
%37 = load i8, i8* %7
%38 = zext i8 %37 to i32
%39 = load i8, i8* %5
%40 = zext i8 %39 to i32
%41 = xor i32 %40, -1
%42 = and i32 %38, %41
%43 = load i8*, i8** %4
%44 = load i8, i8* %43
%45 = zext i8 %44 to i32
%46 = load i8, i8* %5
%47 = zext i8 %46 to i32
%48 = and i32 %45, %47
%49 = or i32 %42, %48
%50 = trunc i32 %49 to i8
%51 = load i8*, i8** %4
store i8 %50, i8* %51
ret void
}

LLVM IR (-O2):
define void @rop3_164_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = or i8 %2, %1
%5 = xor i8 %4, -1
%6 = load i8, i8* %0
%7 = or i8 %6, %5
%8 = xor i8 %7, %2
%9 = or i8 %8, %1
%10 = xor i8 %9, -1
%11 = and i8 %6, %1
%12 = or i8 %11, %10
store i8 %12, i8* %0
ret void
}