xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ go_to_other_pane();
int /*<<< orphan*/ try_switch_into_view_mode();
void go_to_other_window(void) {
  if (!try_switch_into_view_mode()) {
    go_to_other_pane();
  }
}


x86 assembly (clang, -O0):
<go_to_other_window>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <try_switch_into_view_mode@plt>
cmp    $0x0,%eax
jne    113b <go_to_other_window+0x1b>
mov    $0x0,%al
call   1030 <go_to_other_pane@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<go_to_other_window>:
push   %rax
xor    %eax,%eax
call   1040 <try_switch_into_view_mode@plt>
test   %eax,%eax
je     112e <go_to_other_window+0xe>
pop    %rax
ret
xor    %eax,%eax
pop    %rcx
jmp    1030 <go_to_other_pane@plt>

LLVM IR (-O0):
define void @go_to_other_window() {
%1 = call i32 (...) @try_switch_into_view_mode()
%2 = icmp ne i32 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = call i32 (...) @go_to_other_pane()
br label %5
5: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
define void @go_to_other_window() {
%1 = tail call i32 (...) @try_switch_into_view_mode()
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @go_to_other_pane()
br label %5
5: ; preds = %3, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void thread_init(void) { printf("No threads.\n"); }


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

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

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

LLVM IR (-O2):
@str = [12 x i8] c"No threads.\00"
define void @thread_init() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret void
}
void do_long_math(long int *x) {
  printf("%s: X before: %ld\n", __func__, *x);
  *x += 5;
  printf("%s: X after: %ld\n", __func__, *x);
}


x86 assembly (clang, -O0):
<do_long_math>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
lea    0xed6(%rip),%rdi
lea    0xee2(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x5,%rcx
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
lea    0xecc(%rip),%rdi
lea    0xeb8(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_long_math>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    (%rdi),%rdx
lea    0xedf(%rip),%rdi
lea    0xeeb(%rip),%r14
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
mov    (%rbx),%rdx
add    $0x5,%rdx
mov    %rdx,(%rbx)
lea    0xedd(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"%s: X before: %ld\0A\00"
@__func__.do_long_math = [13 x i8] c"do_long_math\00"
@.str.1 = [18 x i8] c"%s: X after: %ld\0A\00"
define void @do_long_math(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__func__.do_long_math, i64 0, i64 0), i64 %4)
%6 = load i64*, i64** %2
%7 = load i64, i64* %6
%8 = add nsw i64 %7, 5
store i64 %8, i64* %6
%9 = load i64*, i64** %2
%10 = load i64, i64* %9
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__func__.do_long_math, i64 0, i64 0), i64 %10)
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"%s: X before: %ld\0A\00"
@__func__.do_long_math = [13 x i8] c"do_long_math\00"
@.str.1 = [18 x i8] c"%s: X after: %ld\0A\00"
define void @do_long_math(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__func__.do_long_math, i64 0, i64 0), i64 %2)
%4 = load i64, i64* %0
%5 = add nsw i64 %4, 5
store i64 %5, i64* %0
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__func__.do_long_math, i64 0, i64 0), i64 %5)
ret void
}
int test_imm_8Buint8_reg(unsigned char val) {
  return ((val) & (-0x8B << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_8Buint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xffffff75,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_8Buint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 117
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ diag_l2_timer();
int /*<<< orphan*/ diag_l3_timer();
void diag_os_sigalrm(int unused __attribute__((unused))) {
  diag_l3_timer();
  diag_l2_timer();
}


x86 assembly (clang, -O0):
<diag_os_sigalrm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <diag_l3_timer@plt>
mov    $0x0,%al
call   1040 <diag_l2_timer@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @diag_os_sigalrm(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @diag_l3_timer()
%4 = call i32 (...) @diag_l2_timer()
ret void
}

LLVM IR (-O2):
define void @diag_os_sigalrm(i32 %0) {
%2 = tail call i32 (...) @diag_l3_timer()
%3 = tail call i32 (...) @diag_l2_timer()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ die(char *);
void signal_handler(int sig) {
  die("received SIGINT");
  die("received SIGTERM");
}


x86 assembly (clang, -O0):
<signal_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
call   1030 <die@plt>
lea    0xee2(%rip),%rdi
call   1030 <die@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<signal_handler>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <die@plt>
lea    0xeec(%rip),%rdi
pop    %rax
jmp    1030 <die@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"received SIGINT\00"
@.str.1 = [17 x i8] c"received SIGTERM\00"
define void @signal_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @die(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @die(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"received SIGINT\00"
@.str.1 = [17 x i8] c"received SIGTERM\00"
define void @signal_handler(i32 %0) {
%2 = tail call i32 @die(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @die(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int getchar();
int /*<<< orphan*/ printf(char *, int);
main() {
  int code;
  int end = getchar();
  int newLineCounter = 0;
  while ((code = getchar()) != end) {
    if (code == '\n') {
      ++newLineCounter;
    }
    printf("%d\n", newLineCounter);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
cmp    -0xc(%rbp),%eax
je     117a <main+0x5a>
cmpl   $0xa,-0x8(%rbp)
jne    1166 <main+0x46>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xe90(%rip),%rdi
call   1030 <printf@plt>
jmp    1140 <main+0x20>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    %ebx,%eax
je     116f <main+0x4f>
lea    0xec1(%rip),%r14
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %ecx,%ecx
cmp    $0xa,%eax
sete   %cl
add    %ecx,%ebp
mov    %r14,%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    %ebx,%eax
jne    1150 <main+0x30>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = tail call i32 (...) @getchar()
%3 = icmp eq i32 %2, %1
br i1 %3, label %13, label %4
4: ; preds = %0, %4
%5 = phi i32 [ %11, %4 ], [ %2, %0 ]
%6 = phi i32 [ %9, %4 ], [ 0, %0 ]
%7 = icmp eq i32 %5, 10
%8 = zext i1 %7 to i32
%9 = add nuw nsw i32 %6, %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = tail call i32 (...) @getchar()
%12 = icmp eq i32 %11, %1
br i1 %12, label %13, label %4
13: ; preds = %4, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ CE_High();
int /*<<< orphan*/ CE_Low();
unsigned char Get_Byte();
int /*<<< orphan*/ Send_Byte(int);
unsigned char Read_Status_Register() {
  unsigned char byte = 0;
  CE_Low();
  Send_Byte(0x05);
  byte = Get_Byte();
  CE_High();
  return byte;
}


x86 assembly (clang, -O0):
<Read_Status_Register>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x0,-0x1(%rbp)
mov    $0x0,%al
call   1060 <CE_Low@plt>
mov    $0x5,%edi
call   1040 <Send_Byte@plt>
mov    $0x0,%al
call   1030 <Get_Byte@plt>
mov    %al,-0x1(%rbp)
mov    $0x0,%al
call   1050 <CE_High@plt>
movzbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Read_Status_Register>:
push   %rbx
xor    %eax,%eax
call   1060 <CE_Low@plt>
mov    $0x5,%edi
call   1040 <Send_Byte@plt>
xor    %eax,%eax
call   1030 <Get_Byte@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <CE_High@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define zeroext i8 @Read_Status_Register() {
%1 = alloca i8
store i8 0, i8* %1
%2 = call i32 (...) @CE_Low()
%3 = call i32 @Send_Byte(i32 5)
%4 = call zeroext i8 (...) @Get_Byte()
store i8 %4, i8* %1
%5 = call i32 (...) @CE_High()
%6 = load i8, i8* %1
ret i8 %6
}

LLVM IR (-O2):
define zeroext i8 @Read_Status_Register() {
%1 = tail call i32 (...) @CE_Low()
%2 = tail call i32 @Send_Byte(i32 5)
%3 = tail call zeroext i8 (...) @Get_Byte()
%4 = tail call i32 (...) @CE_High()
ret i8 %3
}
void foo231() {}


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

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

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

LLVM IR (-O2):
define void @foo231() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EX_SOFTWARE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           char const *, int);
int /*<<< orphan*/ pgp_show_stacktrace();
int /*<<< orphan*/ stderr;
void __pgp_range(const char *_function_name, const char *_file_name,
                 int _line_number) {
  fprintf(stderr,
          "Out of range error occurred: file=%s, function=%s, line=%d\n",
          _file_name, _function_name, _line_number);
  pgp_show_stacktrace();
  exit(EX_SOFTWARE);
}


x86 assembly (clang, -O0):
<__pgp_range>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%rcx
mov    -0x14(%rbp),%r8d
lea    0xea1(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x0,%al
call   1040 <pgp_show_stacktrace@plt>
mov    0x2e66(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<__pgp_range>:
push   %rax
mov    %edx,%r8d
mov    %rsi,%rdx
mov    %rdi,%rcx
mov    0x2e9f(%rip),%rax
mov    (%rax),%edi
lea    0xeb6(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
call   1040 <pgp_show_stacktrace@plt>
mov    0x2e7b(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [60 x i8] c"Out of range error occurred: file=%s, function=%s, line=%d\0A\00"
@EX_SOFTWARE = global i32 0
define void @__pgp_range(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 i32, i32* @stderr
%8 = load i8*, i8** %5
%9 = load i8*, i8** %4
%10 = load i32, i32* %6
%11 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %9, i32 %10)
%12 = call i32 (...) @pgp_show_stacktrace()
%13 = load i32, i32* @EX_SOFTWARE
%14 = call i32 @exit(i32 %13)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [60 x i8] c"Out of range error occurred: file=%s, function=%s, line=%d\0A\00"
@EX_SOFTWARE = global i32 0
define void @__pgp_range(i8* %0, i8* %1, i32 %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %0, i32 %2)
%6 = tail call i32 (...) @pgp_show_stacktrace()
%7 = load i32, i32* @EX_SOFTWARE
%8 = tail call i32 @exit(i32 %7)
unreachable
}
int test_imm_51uint8_mem(unsigned char *val) {
  return ((*val) & (0x51 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_51uint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = and i32 %5, 81
%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_51uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 81
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int b(int);
int /*<<< orphan*/ printf(char *, int);
int l(int param1) {
  int g1;
  printf("l(%d)\n", param1);
  g1 = param1;
  if (param1 > 1) {
    g1 = b(param1 + 2);
  }
  return g1;
}


x86 assembly (clang, -O0):
<l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x1,-0x4(%rbp)
jle    1158 <l+0x38>
mov    -0x4(%rbp),%edi
add    $0x2,%edi
call   1030 <b@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<l>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
mov    %ebx,%esi
call   1040 <printf@plt>
cmp    $0x2,%ebx
jl     1141 <l+0x21>
add    $0x2,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1030 <b@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"l(%d)\0A\00"
define i32 @l(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = add nuw nsw i32 %0, 2
%6 = tail call i32 @b(i32 %5)
br label %7
7: ; preds = %4, %1
%8 = phi i32 [ %6, %4 ], [ %0, %1 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
extern void shmem_short_wait(short *ivar, short cmp_value) {
  printf("\nOpenSHMEM Analyzer\n");
}


x86 assembly (clang, -O0):
<shmem_short_wait>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@str = [20 x i8] c"\0AOpenSHMEM Analyzer\00"
define void @shmem_short_wait(i16* nocapture readnone %0, i16 signext %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret void
}
int compare(const void *p, const void *q) {
  return *(const int *)p - *(const int *)q;
}


x86 assembly (clang, -O0):
<compare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare>:
mov    (%rdi),%eax
sub    (%rsi),%eax
ret

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

LLVM IR (-O2):
define i32 @compare(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
scalar_t__ isupper(int);
int tolower(int c) { return isupper(c) ? (c | 0x20) : c; }


x86 assembly (clang, -O0):
<tolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isupper@plt>
cmp    $0x0,%rax
je     113b <tolower+0x2b>
mov    -0x4(%rbp),%eax
or     $0x20,%eax
mov    %eax,-0x8(%rbp)
jmp    1141 <tolower+0x31>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @tolower(i32 %0) {
%2 = tail call i64 @isupper(i32 %0)
%3 = icmp eq i64 %2, 0
%4 = or i32 %0, 32
%5 = select i1 %3, i32 %0, i32 %4
ret i32 %5
}
/* Variables and functions */
int cont_add(int);
int main() {
  cont_add(4);
  return cont_add(7);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4,%edi
call   1030 <cont_add@plt>
mov    $0x7,%edi
pop    %rax
jmp    1030 <cont_add@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @cont_add(i32 4)
%2 = tail call i32 @cont_add(i32 7)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ bcm2835_write(int, int);
int bcm2835_rng_init(void) {
  bcm2835_write(((0 + 0x104000) + 0x4), 0x40000);
  bcm2835_write(((0 + 0x104000) + 0x0), 0x1);
  return 0;
}


x86 assembly (clang, -O0):
<bcm2835_rng_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x104004,%edi
mov    $0x40000,%esi
call   1030 <bcm2835_write@plt>
mov    $0x104000,%edi
mov    $0x1,%esi
call   1030 <bcm2835_write@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bcm2835_rng_init>:
push   %rax
mov    $0x104004,%edi
mov    $0x40000,%esi
call   1030 <bcm2835_write@plt>
mov    $0x104000,%edi
mov    $0x1,%esi
call   1030 <bcm2835_write@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @bcm2835_rng_init() {
%1 = call i32 @bcm2835_write(i32 1064964, i32 262144)
%2 = call i32 @bcm2835_write(i32 1064960, i32 1)
ret i32 0
}

LLVM IR (-O2):
define i32 @bcm2835_rng_init() {
%1 = tail call i32 @bcm2835_write(i32 1064964, i32 262144)
%2 = tail call i32 @bcm2835_write(i32 1064960, i32 1)
ret i32 0
}
/* Variables and functions */
unsigned char inb(int);
int /*<<< orphan*/ outb(int, unsigned char);
void writeAttr(unsigned char index, unsigned char data, unsigned char videoOn) {
  unsigned char v;
  v = inb(0x3da);
  if (videoOn)
    outb(0x3c0, (index & 0x1F) | 0x20);
  else
    outb(0x3c0, (index & 0x1F));
  outb(0x3c0, data);
}


x86 assembly (clang, -O0):
<writeAttr>:
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)
mov    $0x3da,%edi
call   1040 <inb@plt>
mov    %al,-0x4(%rbp)
cmpb   $0x0,-0x3(%rbp)
je     116c <writeAttr+0x4c>
movzbl -0x1(%rbp),%eax
and    $0x1f,%eax
or     $0x20,%eax
mov    $0x3c0,%edi
movzbl %al,%esi
call   1030 <outb@plt>
jmp    1180 <writeAttr+0x60>
movzbl -0x1(%rbp),%eax
and    $0x1f,%eax
mov    $0x3c0,%edi
movzbl %al,%esi
call   1030 <outb@plt>
mov    $0x3c0,%edi
movzbl -0x2(%rbp),%esi
call   1030 <outb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeAttr>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %esi,%r14d
mov    %edi,%ebp
mov    $0x3da,%edi
call   1040 <inb@plt>
and    $0x1f,%bpl
lea    0x20(%rbp),%eax
test   %ebx,%ebx
movzbl %bpl,%ecx
movzbl %al,%eax
cmove  %ecx,%eax
movzbl %al,%esi
mov    $0x3c0,%edi
call   1030 <outb@plt>
mov    $0x3c0,%edi
mov    %r14d,%esi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @writeAttr(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
store i8 %0, i8* %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%8 = call zeroext i8 @inb(i32 986)
store i8 %8, i8* %7
%9 = load i8, i8* %6
%10 = icmp ne i8 %9, 0
br i1 %10, label %11, label %18
11: ; preds = %3
%12 = load i8, i8* %4
%13 = zext i8 %12 to i32
%14 = and i32 %13, 31
%15 = or i32 %14, 32
%16 = trunc i32 %15 to i8
%17 = call i32 @outb(i32 960, i8 zeroext %16)
br label %24
18: ; preds = %3
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = and i32 %20, 31
%22 = trunc i32 %21 to i8
%23 = call i32 @outb(i32 960, i8 zeroext %22)
br label %24
24: ; preds = %18, %11
%25 = load i8, i8* %5
%26 = call i32 @outb(i32 960, i8 zeroext %25)
ret void
}

LLVM IR (-O2):
define void @writeAttr(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2) {
%4 = tail call zeroext i8 @inb(i32 986)
%5 = icmp eq i8 %2, 0
%6 = and i8 %0, 31
%7 = or i8 %6, 32
%8 = select i1 %5, i8 %6, i8 %7
%9 = tail call i32 @outb(i32 960, i8 zeroext %8)
%10 = tail call i32 @outb(i32 960, i8 zeroext %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fun(int *);
int main(int argc, char **argv) {
  int i;
  int arr[4] = {10, 20, 30, 40};
  fun(arr);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xed3(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xed0(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    -0x30(%rbp),%rdi
call   1030 <fun@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
call   1030 <fun@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.arr = [4 x i32] [i32 10, i32 20, i32 30, i32 40]
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca [4 x i32]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = bitcast [4 x i32]* %7 to i8*
%9 = getelementptr inbounds [4 x i32], [4 x i32]* %7, i64 0, i64 0
%10 = call i32 @fun(i32* %9)
ret i32 0
}

LLVM IR (-O2):
@__const.main.arr = [4 x i32] [i32 10, i32 20, i32 30, i32 40]
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [4 x i32]
%4 = bitcast [4 x i32]* %3 to i8*
%5 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%6 = call i32 @fun(i32* %5)
ret i32 0
}
int f2(int *p) {
  int s = ({
    int r;
#pragma omp atomic capture
    {
      r = *p;
      (*p)++;
    }
    r;
  });
  return s;
}


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
mov    (%rdi),%eax
lea    0x1(%rax),%ecx
mov    %ecx,(%rdi)
ret

LLVM IR (-O0):
define i32 @f2(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %2
%6 = load i32*, i32** %2
%7 = load i32, i32* %6
store i32 %7, i32* %4
%8 = load i32*, i32** %2
%9 = load i32, i32* %8
%10 = add nsw i32 %9, 1
store i32 %10, i32* %8
%11 = load i32, i32* %4
store i32 %11, i32* %5
%12 = load i32, i32* %5
store i32 %12, i32* %3
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @f2(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = add nsw i32 %2, 1
store i32 %3, i32* %0
ret i32 %2
}
void ps_print_title() {}


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

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

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

LLVM IR (-O2):
define void @ps_print_title() {
ret void
}
/* Variables and functions */
scalar_t__ gammal(long double);
int /*<<< orphan*/ link_failure_gammal();
void test_gammal(long double ld) {
  if (gammal(ld) != gammal(ld))
    link_failure_gammal();
}


x86 assembly (clang, -O0):
<test_gammal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <gammal@plt>
mov    %rax,-0x18(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <gammal@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
je     1163 <test_gammal+0x43>
mov    $0x0,%al
call   1030 <link_failure_gammal@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_gammal>:
push   %rbx
sub    $0x20,%rsp
fldt   0x30(%rsp)
fld    %st(0)
fstpt  0x14(%rsp)
fstpt  (%rsp)
call   1040 <gammal@plt>
mov    %rax,%rbx
fldt   0x14(%rsp)
fstpt  (%rsp)
call   1040 <gammal@plt>
cmp    %rax,%rbx
jne    1151 <test_gammal+0x31>
add    $0x20,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
jmp    1030 <link_failure_gammal@plt>

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

LLVM IR (-O2):
define void @test_gammal(x86_fp80 %0) {
%2 = tail call i64 @gammal(x86_fp80 %0)
%3 = tail call i64 @gammal(x86_fp80 %0)
%4 = icmp eq i64 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @link_failure_gammal()
br label %7
7: ; preds = %5, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int file_exists(const char *fname) {
  FILE *file;
  if ((file = fopen(fname, "r")) != NULL) {
    fclose(file);
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<file_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     115f <file_exists+0x3f>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x1,-0x4(%rbp)
jmp    1166 <file_exists+0x46>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_exists>:
push   %rax
lea    0xed8(%rip),%rsi
call   1040 <fopen@plt>
test   %rax,%rax
je     1141 <file_exists+0x21>
mov    %rax,%rdi
call   1030 <fclose@plt>
mov    $0x1,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define i32 @file_exists(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @fclose(i32* %2)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %7
}
__attribute__((always_)) unsigned int
cpumask_next_zero(int n, const struct cpumask *srcp) {
  return n + 1;
}


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

x86 assembly (clang, -O2):
<cpumask_next_zero>:
lea    0x1(%rdi),%eax
ret

LLVM IR (-O0):
%struct.cpumask = type opaque
define i32 @cpumask_next_zero(i32 %0, %struct.cpumask* %1) {
%3 = alloca i32
%4 = alloca %struct.cpumask*
store i32 %0, i32* %3
store %struct.cpumask* %1, %struct.cpumask** %4
%5 = load i32, i32* %3
%6 = add nsw i32 %5, 1
ret i32 %6
}

LLVM IR (-O2):
%struct.cpumask = type opaque
define i32 @cpumask_next_zero(i32 %0, %struct.cpumask* nocapture readnone %1) {
%3 = add nsw i32 %0, 1
ret i32 %3
}
int cairo_code_draw_envCurrentLabel_get_height() { return 7; }


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

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

LLVM IR (-O0):
define i32 @cairo_code_draw_envCurrentLabel_get_height() {
ret i32 7
}

LLVM IR (-O2):
define i32 @cairo_code_draw_envCurrentLabel_get_height() {
ret i32 7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int recursiveMinmum(int *, int);
int main(int argc, char const *argv[]) {
  int array[10] = {9, 8, 7, 6, 5, 4, 356, 29879, 41, 50};
  int i;
  int result;
  result = recursiveMinmum(array, 10);
  printf("%d\n", result);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xeaf(%rip),%rsi
mov    $0x28,%edx
call   1040 <memcpy@plt>
lea    -0x40(%rbp),%rdi
mov    $0xa,%esi
call   1050 <recursiveMinmum@plt>
mov    %eax,-0x48(%rbp)
mov    -0x48(%rbp),%esi
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
mov    0xef5(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xebd(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0xa,%esi
call   1040 <recursiveMinmum@plt>
lea    0xecd(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.array = [10 x i32] [i32 9, i32 8, i32 7, i32 6, i32 5, i32 4, i32 356, i32 29879, i32 41, i32 50]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [10 x i32]
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = bitcast [10 x i32]* %6 to i8*
%10 = getelementptr inbounds [10 x i32], [10 x i32]* %6, i64 0, i64 0
%11 = call i32 @recursiveMinmum(i32* %10, i32 10)
store i32 %11, i32* %8
%12 = load i32, i32* %8
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %12)
ret i32 0
}

LLVM IR (-O2):
@__const.main.array = [10 x i32] [i32 9, i32 8, i32 7, i32 6, i32 5, i32 4, i32 356, i32 29879, i32 41, i32 50]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [10 x i32]
%4 = bitcast [10 x i32]* %3 to i8*
%5 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 0
%6 = call i32 @recursiveMinmum(i32* %5, i32 10)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}
void gdk_pango_context_get_for_screen() {}


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

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

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

LLVM IR (-O2):
define void @gdk_pango_context_get_for_screen() {
ret void
}
int do_269() { return 269; }


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

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

LLVM IR (-O0):
define i32 @do_269() {
ret i32 269
}

LLVM IR (-O2):
define i32 @do_269() {
ret i32 269
}
float module(float val) {
  if (val < 0.0f)
    return -val;
  return val;
}


x86 assembly (clang, -O0):
<module>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    1132 <module+0x32>
movss  -0x8(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    113c <module+0x3c>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<module>:
movaps 0xef9(%rip),%xmm2
xorps  %xmm0,%xmm2
xorps  %xmm3,%xmm3
movaps %xmm0,%xmm1
cmpltss %xmm3,%xmm1
andps  %xmm1,%xmm2
andnps %xmm0,%xmm1
orps   %xmm2,%xmm1
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @module(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = fcmp olt float %4, 0.000000e+00
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load float, float* %3
%8 = fneg float %7
store float %8, float* %2
br label %11
9: ; preds = %1
%10 = load float, float* %3
store float %10, float* %2
br label %11
11: ; preds = %9, %6
%12 = load float, float* %2
ret float %12
}

LLVM IR (-O2):
define float @module(float %0) {
%2 = fcmp olt float %0, 0.000000e+00
%3 = fneg float %0
%4 = select i1 %2, float %3, float %0
ret float %4
}
/* Variables and functions */
double tan(double);
__attribute__((__weak__, __always___)) double softboundcets_tan(double x) {
  return tan(x);
}


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

x86 assembly (clang, -O2):
<softboundcets_tan>:
jmp    1030 <tan@plt>

LLVM IR (-O0):
define weak double @softboundcets_tan(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @tan(double %3)
ret double %4
}

LLVM IR (-O2):
define weak double @softboundcets_tan(double %0) {
%2 = tail call double @tan(double %0)
ret double %2
}
void main() {
  int a;
  int b;
  int y;
  int i;
  int x = 0;
  if (a < 0) {
    x = -a;
  } else {
    x = a;
  }
  y = b * a;
  if (y > x) {
    i = 0;
  } else {
    i = 1;
  }
  while (b > 0) {
    if (i == 0) {
      x = x + y;
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x14(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1122 <main+0x22>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1128 <main+0x28>
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
imul   -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x14(%rbp),%eax
jle    114a <main+0x4a>
movl   $0x0,-0x10(%rbp)
jmp    1151 <main+0x51>
movl   $0x1,-0x10(%rbp)
jmp    1156 <main+0x56>
cmpl   $0x0,-0x8(%rbp)
jle    1178 <main+0x78>
cmpl   $0x0,-0x10(%rbp)
jne    1173 <main+0x73>
mov    -0x14(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1156 <main+0x56>
pop    %rbp
ret

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

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

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


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

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

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

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

/* Variables and functions */
struct hostent *_gethostbynis(char const *, char *, int);
struct hostent *_gethostbynisname(const char *name, int af) {
  return _gethostbynis(name, "hosts.byname", af);
}


x86 assembly (clang, -O0):
<_gethostbynisname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xed3(%rip),%rsi
call   1030 <_gethostbynis@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_gethostbynisname>:
mov    %esi,%edx
lea    0xee7(%rip),%rsi
jmp    1030 <_gethostbynis@plt>

LLVM IR (-O0):
%struct.hostent = type { i32 }
@.str = [13 x i8] c"hosts.byname\00"
define %struct.hostent* @_gethostbynisname(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call %struct.hostent* @_gethostbynis(i8* %5, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %6)
ret %struct.hostent* %7
}

LLVM IR (-O2):
%struct.hostent = type { i32 }
@.str = [13 x i8] c"hosts.byname\00"
define %struct.hostent* @_gethostbynisname(i8* %0, i32 %1) {
%3 = tail call %struct.hostent* @_gethostbynis(i8* %0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %1)
ret %struct.hostent* %3
}
int fun637() { return 637; }


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

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

LLVM IR (-O0):
define i32 @fun637() {
ret i32 637
}

LLVM IR (-O2):
define i32 @fun637() {
ret i32 637
}
unsigned int bits_ffs(unsigned int x) { return __builtin_ffs(x); }


x86 assembly (clang, -O0):
<bits_ffs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
bsf    %edx,%eax
add    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x0,%edx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bits_ffs>:
bsf    %edi,%ecx
mov    $0xffffffff,%eax
cmovne %ecx,%eax
add    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @bits_ffs(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @llvm.cttz.i32(i32 %3, i1 true)
%5 = add i32 %4, 1
%6 = icmp eq i32 %3, 0
%7 = select i1 %6, i32 0, i32 %5
ret i32 %7
}

LLVM IR (-O2):
define i32 @bits_ffs(i32 %0) {
%2 = tail call i32 @llvm.cttz.i32(i32 %0, i1 true)
%3 = add nuw nsw i32 %2, 1
%4 = icmp eq i32 %0, 0
%5 = select i1 %4, i32 0, i32 %3
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ print(char *);
void bmain(void) {
  print("Hello World!");
  for (;;)
    ;
}


x86 assembly (clang, -O0):
<bmain>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <print@plt>
jmp    1120 <bmain+0x10>

x86 assembly (clang, -O2):
<bmain>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <print@plt>
nopl   (%rax)
jmp    1120 <bmain+0x10>

LLVM IR (-O0):
@.str = [13 x i8] c"Hello World!\00"
define void @bmain() {
%1 = call i32 @print(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %2, %0
br label %2
}

LLVM IR (-O2):
@.str = [13 x i8] c"Hello World!\00"
define void @bmain() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %2, %0
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ system(char *);
int x21_teardown() {
  char cmd[256];
  sprintf(cmd,
          "iptables -D INPUT -p tcp -m multiport --sport 53,80 --tcp-flags "
          "SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d",
          1);
  system(cmd);
  return 0;
}


x86 assembly (clang, -O0):
<x21_teardown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
lea    -0x100(%rbp),%rdi
lea    0xec7(%rip),%rsi
mov    $0x1,%edx
call   1040 <sprintf@plt>
lea    -0x100(%rbp),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x21_teardown>:
push   %rbx
sub    $0x100,%rsp
lea    0xed1(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x1,%edx
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [106 x i8] c"iptables -D INPUT -p tcp -m multiport --sport 53,80 --tcp-flags SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d\00"
define i32 @x21_teardown() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* getelementptr inbounds ([106 x i8], [106 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%5 = call i32 @system(i8* %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [106 x i8] c"iptables -D INPUT -p tcp -m multiport --sport 53,80 --tcp-flags SYN,ACK SYN,ACK -j NFQUEUE --queue-num %d\00"
define i32 @x21_teardown() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @sprintf(i8* %2, i8* dereferenceable(1) getelementptr inbounds ([106 x i8], [106 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = call i32 @system(i8* %2)
ret i32 0
}
int towlower(int wc) {
  return (wc >= 'A') && (wc <= 'Z') ? wc + 'a' - 'A' : wc;
}


x86 assembly (clang, -O0):
<towlower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x41,-0x4(%rbp)
jl     112c <towlower+0x2c>
cmpl   $0x5a,-0x4(%rbp)
jg     112c <towlower+0x2c>
mov    -0x4(%rbp),%eax
add    $0x61,%eax
sub    $0x41,%eax
mov    %eax,-0x8(%rbp)
jmp    1132 <towlower+0x32>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<towlower>:
lea    -0x41(%rdi),%ecx
lea    0x20(%rdi),%eax
cmp    $0x1a,%ecx
cmovae %edi,%eax
ret

LLVM IR (-O0):
define i32 @towlower(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 65
br i1 %4, label %5, label %12
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 90
br i1 %7, label %8, label %12
8: ; preds = %5
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 97
%11 = sub nsw i32 %10, 65
br label %14
12: ; preds = %5, %1
%13 = load i32, i32* %2
br label %14
14: ; preds = %12, %8
%15 = phi i32 [ %11, %8 ], [ %13, %12 ]
ret i32 %15
}

LLVM IR (-O2):
define i32 @towlower(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 26
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}