xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ ehrpwm_reg_config(int /*<<< orphan*/, int, int, int);
int ehrpwm_aq_ot_frc(uint8_t module, unsigned char ch) {
  if (ch > 1)
    return -1;
  if (ch == 0)
    ehrpwm_reg_config(module, 0x1A, (1) << 0x2, (1 << 2));
  else
    ehrpwm_reg_config(module, 0x1A, (1) << 0x5, (1 << 5));
  return 0;
}


x86 assembly (clang, -O0):
<ehrpwm_aq_ot_frc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movzbl -0x9(%rbp),%eax
cmp    $0x1,%eax
jle    113a <ehrpwm_aq_ot_frc+0x2a>
movl   $0xffffffff,-0x4(%rbp)
jmp    117b <ehrpwm_aq_ot_frc+0x6b>
movzbl -0x9(%rbp),%eax
cmp    $0x0,%eax
jne    1160 <ehrpwm_aq_ot_frc+0x50>
mov    -0x8(%rbp),%edi
mov    $0x1a,%esi
mov    $0x4,%ecx
mov    %ecx,%edx
call   1030 <ehrpwm_reg_config@plt>
jmp    1174 <ehrpwm_aq_ot_frc+0x64>
mov    -0x8(%rbp),%edi
mov    $0x1a,%esi
mov    $0x20,%ecx
mov    %ecx,%edx
call   1030 <ehrpwm_reg_config@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ehrpwm_aq_ot_frc>:
push   %rax
mov    $0xffffffff,%eax
cmp    $0x1,%sil
ja     1148 <ehrpwm_aq_ot_frc+0x38>
test   %sil,%sil
je     1132 <ehrpwm_aq_ot_frc+0x22>
mov    $0x1a,%esi
mov    $0x20,%edx
mov    $0x20,%ecx
jmp    1141 <ehrpwm_aq_ot_frc+0x31>
mov    $0x1a,%esi
mov    $0x4,%edx
mov    $0x4,%ecx
call   1030 <ehrpwm_reg_config@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @ehrpwm_aq_ot_frc(i32 %0, i8 zeroext %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8
store i32 %0, i32* %4
store i8 %1, i8* %5
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = icmp sgt i32 %7, 1
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 -1, i32* %3
br label %21
10: ; preds = %2
%11 = load i8, i8* %5
%12 = zext i8 %11 to i32
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %10
%15 = load i32, i32* %4
%16 = call i32 @ehrpwm_reg_config(i32 %15, i32 26, i32 4, i32 4)
br label %20
17: ; preds = %10
%18 = load i32, i32* %4
%19 = call i32 @ehrpwm_reg_config(i32 %18, i32 26, i32 32, i32 32)
br label %20
20: ; preds = %17, %14
store i32 0, i32* %3
br label %21
21: ; preds = %20, %9
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
define i32 @ehrpwm_aq_ot_frc(i32 %0, i8 zeroext %1) {
%3 = icmp ugt i8 %1, 1
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = icmp eq i8 %1, 0
br i1 %5, label %6, label %8
6: ; preds = %4
%7 = tail call i32 @ehrpwm_reg_config(i32 %0, i32 26, i32 4, i32 4)
br label %10
8: ; preds = %4
%9 = tail call i32 @ehrpwm_reg_config(i32 %0, i32 26, i32 32, i32 32)
br label %10
10: ; preds = %6, %8, %2
%11 = phi i32 [ -1, %2 ], [ 0, %8 ], [ 0, %6 ]
ret i32 %11
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t rot_word(uint32_t word) { return (word << 8) | (word >> 24); }


x86 assembly (clang, -O0):
<rot_word>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x8,%eax
mov    -0x4(%rbp),%ecx
sar    $0x18,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rot_word>:
mov    %edi,%eax
shl    $0x8,%eax
sar    $0x18,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @rot_word(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 8
%5 = load i32, i32* %2
%6 = ashr i32 %5, 24
%7 = or i32 %4, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @rot_word(i32 %0) {
%2 = shl i32 %0, 8
%3 = ashr i32 %0, 24
%4 = or i32 %2, %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ incKeyAdd(int);
void decKeyAdd(int decaddnum) { incKeyAdd(-decaddnum); }


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

x86 assembly (clang, -O2):
<decKeyAdd>:
neg    %edi
jmp    1030 <incKeyAdd@plt>

LLVM IR (-O0):
define void @decKeyAdd(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 0, %3
%5 = call i32 @incKeyAdd(i32 %4)
ret void
}

LLVM IR (-O2):
define void @decKeyAdd(i32 %0) {
%2 = sub nsw i32 0, %0
%3 = tail call i32 @incKeyAdd(i32 %2)
ret void
}
void XAddPixel() {}


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

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

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

LLVM IR (-O2):
define void @XAddPixel() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ three_digits_num(int, int, int, int);
int main() {
  int a = 1, b = 2, c = 3, d = 4;
  three_digits_num(a, b, c, d);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
movl   $0x3,-0x10(%rbp)
movl   $0x4,-0x14(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
call   1030 <three_digits_num@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
call   1030 <three_digits_num@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @three_digits_num(i32 1, i32 2, i32 3, i32 4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ g(int);
f() {
  int seed;
  g(seed);
}


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

x86 assembly (clang, -O2):
<f>:
jmp    1030 <g@plt>

LLVM IR (-O0):
define i32 @f() {
%1 = alloca i32
%2 = alloca i32
%3 = load i32, i32* %2
%4 = call i32 @g(i32 %3)
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
define i32 @f() {
%1 = tail call i32 @g(i32 undef)
ret i32 undef
}
int __get_parent_index(int index) {
  if (index == 0)
    return 0;
  return (index - 1) / 2;
}


x86 assembly (clang, -O0):
<__get_parent_index>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    111d <__get_parent_index+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    112e <__get_parent_index+0x2e>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__get_parent_index>:
test   %edi,%edi
je     1114 <__get_parent_index+0x14>
mov    %edi,%eax
add    $0xffffffff,%eax
shr    $0x1f,%eax
add    %edi,%eax
add    $0xffffffff,%eax
sar    %eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @__get_parent_index(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = add nsw i32 %0, -1
%5 = sdiv i32 %4, 2
br label %6
6: ; preds = %1, %3
%7 = phi i32 [ %5, %3 ], [ 0, %1 ]
ret i32 %7
}
char *hash_plugin_summary(void) {
  return ("mscash \t\tDomain cached credentials plugin");
}


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

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

LLVM IR (-O0):
@.str = [42 x i8] c"mscash \09\09Domain cached credentials plugin\00"
define i8* @hash_plugin_summary() {
ret i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [42 x i8] c"mscash \09\09Domain cached credentials plugin\00"
define i8* @hash_plugin_summary() {
ret i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
char getchar();
int /*<<< orphan*/ printNextSecond(char *);
int main(void) {
  char arr[1000];
  int i;
  while ((arr[i] = getchar()) != '\n')
    i++;
  arr[i] = '\0';
  printNextSecond(arr);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x400,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
movslq -0x3f4(%rbp),%rcx
mov    %al,-0x3f0(%rbp,%rcx,1)
movsbl %al,%eax
cmp    $0xa,%eax
je     1167 <main+0x47>
mov    -0x3f4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3f4(%rbp)
jmp    1132 <main+0x12>
movslq -0x3f4(%rbp),%rax
movb   $0x0,-0x3f0(%rbp,%rax,1)
lea    -0x3f0(%rbp),%rdi
call   1030 <printNextSecond@plt>
xor    %eax,%eax
add    $0x400,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x3f0,%rsp
mov    %rsp,%rbx
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %al,(%rbx)
add    $0x1,%rbx
cmp    $0xa,%al
jne    1130 <main+0x10>
movb   $0x0,-0x1(%rbx)
mov    %rsp,%rdi
call   1030 <printNextSecond@plt>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
br label %3
3: ; preds = %3, %0
%4 = phi i64 [ %8, %3 ], [ 0, %0 ]
%5 = tail call signext i8 (...) @getchar()
%6 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 %4
store i8 %5, i8* %6
%7 = icmp eq i8 %5, 10
%8 = add i64 %4, 1
br i1 %7, label %9, label %3
9: ; preds = %3
%10 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 %4
store i8 0, i8* %10
%11 = call i32 @printNextSecond(i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ bar(int);
void foo(void) {
#pragma omp critical
  bar(0);
#pragma omp critical(foo)
  {
    bar(1);
    bar(2);
  }
#pragma omp critical
#pragma omp critical(foo)
  bar(3);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <bar@plt>
mov    $0x1,%edi
call   1030 <bar@plt>
mov    $0x2,%edi
call   1030 <bar@plt>
mov    $0x3,%edi
call   1030 <bar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rax
xor    %edi,%edi
call   1030 <bar@plt>
mov    $0x1,%edi
call   1030 <bar@plt>
mov    $0x2,%edi
call   1030 <bar@plt>
mov    $0x3,%edi
pop    %rax
jmp    1030 <bar@plt>

LLVM IR (-O0):
define void @foo() {
%1 = call i32 @bar(i32 0)
%2 = call i32 @bar(i32 1)
%3 = call i32 @bar(i32 2)
%4 = call i32 @bar(i32 3)
ret void
}

LLVM IR (-O2):
define void @foo() {
%1 = tail call i32 @bar(i32 0)
%2 = tail call i32 @bar(i32 1)
%3 = tail call i32 @bar(i32 2)
%4 = tail call i32 @bar(i32 3)
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ display;
};
struct TYPE_4__ {
  TYPE_1__ xselectionclear;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void *get_XEvent_xselectionclear_display(void *_p) {
  return (void *)((XEvent *)_p)->xselectionclear.display;
}


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

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

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

LLVM IR (-O2):
define i8* @get_XEvent_xselectionclear_display(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
void handle_MSG(sig) int sig;
{}


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

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

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

LLVM IR (-O2):
define void @handle_MSG(i32 %0) {
ret void
}
assert(int c) {
  if (!c) {
    extern void abort(void);
    abort();
  }
}


x86 assembly (clang, -O0):
<assert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    112a <assert+0x1a>
call   1030 <abort@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assert>:
test   %edi,%edi
je     1115 <assert+0x5>
ret
push   %rax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @assert(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp ne i32 %4, 0
br i1 %5, label %7, label %6
6: ; preds = %1
unreachable
7: ; preds = %1
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @assert(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %4
3: ; preds = %1
tail call void @abort()
unreachable
4: ; preds = %1
ret i32 undef
}
void vals(int *result[]) {
  int values[10];
  *result = values;
}


x86 assembly (clang, -O0):
<vals>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
lea    -0x30(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<vals>:
lea    -0x28(%rsp),%rax
mov    %rax,(%rdi)
ret

LLVM IR (-O0):
define void @vals(i32** %0) {
%2 = alloca i32**
%3 = alloca [10 x i32]
store i32** %0, i32*** %2
%4 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 0
%5 = load i32**, i32*** %2
store i32* %4, i32** %5
ret void
}

LLVM IR (-O2):
define void @vals(i32** nocapture writeonly %0) {
%2 = alloca [10 x i32]
%3 = bitcast [10 x i32]* %2 to i8*
%4 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
store i32* %4, i32** %0
ret void
}
int is_free(unsigned int free_mask, unsigned int mask) {
  return ((free_mask & mask) == 0);
}


x86 assembly (clang, -O0):
<is_free>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    -0x8(%rbp),%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_free>:
xor    %eax,%eax
test   %edi,%esi
sete   %al
ret

LLVM IR (-O0):
define i32 @is_free(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 = and i32 %5, %6
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @is_free(i32 %0, i32 %1) {
%3 = and i32 %1, %0
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
struct BasicObj {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _justify_d(int *, struct BasicObj const *,
                              struct BasicObj const *);
int /*<<< orphan*/ _justify_v(int *, struct BasicObj const *,
                              struct BasicObj const *);
void _justify_vd(int vox[3], const struct BasicObj *basic,
                 const struct BasicObj *parent_basic) {
  _justify_v(vox, basic, parent_basic);
  _justify_d(vox, basic, parent_basic);
}


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

x86 assembly (clang, -O2):
<_justify_vd>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
call   1040 <_justify_v@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <_justify_d@plt>

LLVM IR (-O0):
%struct.BasicObj = type { i32 }
define void @_justify_vd(i32* %0, %struct.BasicObj* %1, %struct.BasicObj* %2) {
%4 = alloca i32*
%5 = alloca %struct.BasicObj*
%6 = alloca %struct.BasicObj*
store i32* %0, i32** %4
store %struct.BasicObj* %1, %struct.BasicObj** %5
store %struct.BasicObj* %2, %struct.BasicObj** %6
%7 = load i32*, i32** %4
%8 = load %struct.BasicObj*, %struct.BasicObj** %5
%9 = load %struct.BasicObj*, %struct.BasicObj** %6
%10 = call i32 @_justify_v(i32* %7, %struct.BasicObj* %8, %struct.BasicObj* %9)
%11 = load i32*, i32** %4
%12 = load %struct.BasicObj*, %struct.BasicObj** %5
%13 = load %struct.BasicObj*, %struct.BasicObj** %6
%14 = call i32 @_justify_d(i32* %11, %struct.BasicObj* %12, %struct.BasicObj* %13)
ret void
}

LLVM IR (-O2):
%struct.BasicObj = type { i32 }
define void @_justify_vd(i32* %0, %struct.BasicObj* %1, %struct.BasicObj* %2) {
%4 = tail call i32 @_justify_v(i32* %0, %struct.BasicObj* %1, %struct.BasicObj* %2)
%5 = tail call i32 @_justify_d(i32* %0, %struct.BasicObj* %1, %struct.BasicObj* %2)
ret void
}
void pd_select_polarity(int polarity) {}


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

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

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

LLVM IR (-O2):
define void @pd_select_polarity(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
char *zlibVersion();
void print_zlib() { printf("LIB: %s\n", zlibVersion()); }


x86 assembly (clang, -O0):
<print_zlib>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <zlibVersion@plt>
mov    %rax,%rsi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [9 x i8] c"LIB: %s\0A\00"
define void @print_zlib() {
%1 = tail call i8* (...) @zlibVersion()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ prebuilt_func();
void app_main(void) { prebuilt_func(); }


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

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

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

LLVM IR (-O2):
define void @app_main() {
%1 = tail call i32 (...) @prebuilt_func()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
main() {
  printf("! DO NOT EDIT THIS FILE. \n");
  printf("! It is created from f90_unix_dir_const.c\n");
  printf("integer, parameter :: mode_kind = %d\n", sizeof(mode_t));
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [27 x i8] c"! DO NOT EDIT THIS FILE. \0A\00"
@.str.1 = [43 x i8] c"! It is created from f90_unix_dir_const.c\0A\00"
@.str.2 = [38 x i8] c"integer, parameter :: mode_kind = %d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i64 4)
ret i32 0
}

LLVM IR (-O2):
@.str.2 = [38 x i8] c"integer, parameter :: mode_kind = %d\0A\00"
@str = [26 x i8] c"! DO NOT EDIT THIS FILE. \00"
@str.3 = [42 x i8] c"! It is created from f90_unix_dir_const.c\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i64 4)
ret i32 0
}
float convert_float(float i) {
  float f;
  unsigned char *iptr = (unsigned char *)&i;
  unsigned char *optr = (unsigned char *)&f;
  *(optr + 3) = *iptr;
  *(optr + 2) = *(iptr + 1);
  *(optr + 1) = *(iptr + 2);
  *optr = *(iptr + 3);
  return f;
}


x86 assembly (clang, -O0):
<convert_float>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x3(%rax)
mov    -0x10(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x10(%rbp),%rax
mov    0x2(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x10(%rbp),%rax
mov    0x3(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert_float>:
movd   %xmm0,%eax
bswap  %eax
movd   %eax,%xmm0
ret

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

LLVM IR (-O2):
define float @convert_float(float %0) {
%2 = bitcast float %0 to i32
%3 = tail call i32 @llvm.bswap.i32(i32 %2)
%4 = bitcast i32 %3 to float
ret float %4
}
int c2(void) { return 2; }


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

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

LLVM IR (-O0):
define i32 @c2() {
ret i32 2
}

LLVM IR (-O2):
define i32 @c2() {
ret i32 2
}
long Long_bit_MINUS_shift_MINUS_left(long x, long y) { return x << y; }


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

x86 assembly (clang, -O2):
<Long_bit_MINUS_shift_MINUS_left>:
mov    %rsi,%rcx
mov    %rdi,%rax
shl    %cl,%rax
ret

LLVM IR (-O0):
define i64 @Long_bit_MINUS_shift_MINUS_left(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = shl i64 %5, %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @Long_bit_MINUS_shift_MINUS_left(i64 %0, i64 %1) {
%3 = shl i64 %0, %1
ret i64 %3
}
int main() {
  if (20 % 3 != 2)
    return 1;
  if (3 % 3 != 0)
    return 2;
  int a = 5, b = 13;
  if (a % b != 5)
    return 3;
  if (b % a != 3)
    return 4;
  long l = 3;
  if (a % l != 2)
    return 5;
  if (a % 1099511627776 != a)
    return 6;
  if (1099511627776 % a != 1)
    return 7;
  if (1099511627776 % 1099511627776 != 0)
    return 8;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movl   $0xd,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x5,%edx
je     1135 <main+0x35>
movl   $0x3,-0x4(%rbp)
jmp    11c9 <main+0xc9>
mov    -0xc(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cmp    $0x3,%edx
je     1151 <main+0x51>
movl   $0x4,-0x4(%rbp)
jmp    11c9 <main+0xc9>
movq   $0x3,-0x18(%rbp)
movslq -0x8(%rbp),%rax
cqto
idivq  -0x18(%rbp)
cmp    $0x2,%rdx
je     1179 <main+0x79>
movl   $0x5,-0x4(%rbp)
jmp    11c9 <main+0xc9>
movslq -0x8(%rbp),%rax
movabs $0x10000000000,%rcx
cqto
idiv   %rcx
movslq -0x8(%rbp),%rax
cmp    %rax,%rdx
je     11a5 <main+0xa5>
movl   $0x6,-0x4(%rbp)
jmp    11c9 <main+0xc9>
movslq -0x8(%rbp),%rcx
movabs $0x10000000000,%rax
cqto
idiv   %rcx
cmp    $0x1,%rdx
je     11c9 <main+0xc9>
movl   $0x7,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i64
store i32 0, i32* %1
store i32 5, i32* %2
store i32 13, i32* %3
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = srem i32 %5, %6
%8 = icmp ne i32 %7, 5
br i1 %8, label %9, label %10
9: ; preds = %0
store i32 3, i32* %1
br label %37
10: ; preds = %0
%11 = load i32, i32* %3
%12 = load i32, i32* %2
%13 = srem i32 %11, %12
%14 = icmp ne i32 %13, 3
br i1 %14, label %15, label %16
15: ; preds = %10
store i32 4, i32* %1
br label %37
16: ; preds = %10
store i64 3, i64* %4
%17 = load i32, i32* %2
%18 = sext i32 %17 to i64
%19 = load i64, i64* %4
%20 = srem i64 %18, %19
%21 = icmp ne i64 %20, 2
br i1 %21, label %22, label %23
22: ; preds = %16
store i32 5, i32* %1
br label %37
23: ; preds = %16
%24 = load i32, i32* %2
%25 = sext i32 %24 to i64
%26 = srem i64 %25, 1099511627776
%27 = load i32, i32* %2
%28 = sext i32 %27 to i64
%29 = icmp ne i64 %26, %28
br i1 %29, label %30, label %31
30: ; preds = %23
store i32 6, i32* %1
br label %37
31: ; preds = %23
%32 = load i32, i32* %2
%33 = sext i32 %32 to i64
%34 = srem i64 1099511627776, %33
%35 = icmp ne i64 %34, 1
br i1 %35, label %36, label %37
36: ; preds = %31
store i32 7, i32* %1
br label %37
37: ; preds = %9, %15, %22, %30, %36, %31
%38 = load i32, i32* %1
ret i32 %38
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ error(char *);
void usage_error() { error("Usage: ./mini_mips program [argument ...]\n"); }


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

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

LLVM IR (-O0):
@.str = [43 x i8] c"Usage: ./mini_mips program [argument ...]\0A\00"
define void @usage_error() {
%1 = call i32 @error(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [43 x i8] c"Usage: ./mini_mips program [argument ...]\0A\00"
define void @usage_error() {
%1 = tail call i32 @error(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct rlimit {
  int dummy;
};

/* Variables and functions */
int getrlimit(int, struct rlimit *);
__attribute__((__weak__, __always___)) int
softboundmpx_getrlimit(int resource, struct rlimit *rlim) {
  return getrlimit(resource, rlim);
}


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

x86 assembly (clang, -O2):
<softboundmpx_getrlimit>:
jmp    1030 <getrlimit@plt>

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

LLVM IR (-O2):
%struct.rlimit = type { i32 }
define weak i32 @softboundmpx_getrlimit(i32 %0, %struct.rlimit* %1) {
%3 = tail call i32 @getrlimit(i32 %0, %struct.rlimit* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void structure_padding() { printf("This is to illustrate structure padding"); }


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

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

LLVM IR (-O0):
@.str = [40 x i8] c"This is to illustrate structure padding\00"
define void @structure_padding() {
%1 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [40 x i8] c"This is to illustrate structure padding\00"
define void @structure_padding() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ filename;

/* Variables and functions */
int snprintf(char *, int, char *, int);
int write_int_to_file(char *, int);
int gpio_write(int gpio, int value) {
  int ret;
  char filename[128];
  ret = snprintf(filename, sizeof(filename), "/sys/class/gpio/gpio%d/value",
                 gpio);
  if (ret < 0)
    goto out;
  ret = write_int_to_file(filename, value);
out:
  return ret;
}


x86 assembly (clang, -O0):
<gpio_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    -0x90(%rbp),%rdi
mov    -0x4(%rbp),%ecx
mov    $0x80,%esi
lea    0xeb9(%rip),%rdx
call   1030 <snprintf@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    115e <gpio_write+0x3e>
jmp    1170 <gpio_write+0x50>
lea    -0x90(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1040 <write_int_to_file@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gpio_write>:
push   %rbx
sub    $0x80,%rsp
mov    %esi,%ebx
mov    %edi,%ecx
lea    0xecd(%rip),%rdx
mov    %rsp,%rdi
mov    $0x80,%esi
call   1030 <snprintf@plt>
test   %eax,%eax
js     114e <gpio_write+0x2e>
mov    %rsp,%rdi
mov    %ebx,%esi
call   1040 <write_int_to_file@plt>
add    $0x80,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"/sys/class/gpio/gpio%d/value\00"
define i32 @gpio_write(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca [128 x i8]
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = getelementptr inbounds [128 x i8], [128 x i8]* %6, i64 0, i64 0
%8 = load i32, i32* %3
%9 = call i32 @snprintf(i8* %7, i32 128, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %8)
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = icmp slt i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %2
br label %17
13: ; preds = %2
%14 = getelementptr inbounds [128 x i8], [128 x i8]* %6, i64 0, i64 0
%15 = load i32, i32* %4
%16 = call i32 @write_int_to_file(i8* %14, i32 %15)
store i32 %16, i32* %5
br label %17
17: ; preds = %13, %12
%18 = load i32, i32* %5
ret i32 %18
}

LLVM IR (-O2):
@.str = [29 x i8] c"/sys/class/gpio/gpio%d/value\00"
define i32 @gpio_write(i32 %0, i32 %1) {
%3 = alloca [128 x i8]
%4 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%5 = call i32 @snprintf(i8* %4, i32 128, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %0)
%6 = icmp slt i32 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %2
%8 = call i32 @write_int_to_file(i8* %4, i32 %1)
br label %9
9: ; preds = %2, %7
%10 = phi i32 [ %5, %2 ], [ %8, %7 ]
ret i32 %10
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int solcon_length_solution_diagnostics(int k, int *n) {
  int fail;
  double *c;
  fail = _ada_use_c2phc(206, &k, n, c);
  return fail;
}


x86 assembly (clang, -O0):
<solcon_length_solution_diagnostics>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0xce,%edi
lea    -0x4(%rbp),%rsi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solcon_length_solution_diagnostics>:
push   %rax
mov    %rsi,%rdx
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0xce,%edi
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @solcon_length_solution_diagnostics(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
%6 = alloca double*
store i32 %0, i32* %3
store i32* %1, i32** %4
%7 = load i32*, i32** %4
%8 = load double*, double** %6
%9 = call i32 @_ada_use_c2phc(i32 206, i32* %3, i32* %7, double* %8)
store i32 %9, i32* %5
%10 = load i32, i32* %5
ret i32 %10
}

LLVM IR (-O2):
define i32 @solcon_length_solution_diagnostics(i32 %0, i32* %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 @_ada_use_c2phc(i32 206, i32* %3, i32* %1, double* undef)
ret i32 %4
}
char *langRomTypePanasonicModem() { return "Panasonic Modem"; }


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"Panasonic Modem\00"
define i8* @langRomTypePanasonicModem() {
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [16 x i8] c"Panasonic Modem\00"
define i8* @langRomTypePanasonicModem() {
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int foo();
int hoge() { return foo(); }


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

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

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

LLVM IR (-O2):
define i32 @hoge() {
%1 = tail call i32 (...) @foo()
ret i32 %1
}
void CFGMR3QueryU8(void) {}


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

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

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

LLVM IR (-O2):
define void @CFGMR3QueryU8() {
ret void
}
/* Variables and functions */
int get_uint24(unsigned char *, int);
int /*<<< orphan*/ set_uint24(unsigned char *, int, int);
void dec_uint24(unsigned char *buf, int block) {
  int value;
  value = get_uint24(buf, block);
  set_uint24(buf, block, --value);
}


x86 assembly (clang, -O0):
<dec_uint24>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <get_uint24@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
add    $0xffffffff,%edx
mov    %edx,-0x10(%rbp)
call   1030 <set_uint24@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dec_uint24>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <get_uint24@plt>
lea    -0x1(%rax),%edx
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <set_uint24@plt>

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

LLVM IR (-O2):
define void @dec_uint24(i8* %0, i32 %1) {
%3 = tail call i32 @get_uint24(i8* %0, i32 %1)
%4 = add nsw i32 %3, -1
%5 = tail call i32 @set_uint24(i8* %0, i32 %1, i32 %4)
ret void
}
int clip(int v, int M) { return v < 0 ? 0 : v > M ? M : v; }


x86 assembly (clang, -O0):
<clip>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    111e <clip+0x1e>
xor    %eax,%eax
mov    %eax,-0xc(%rbp)
jmp    1141 <clip+0x41>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1135 <clip+0x35>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    113b <clip+0x3b>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clip>:
cmp    %esi,%edi
cmovle %edi,%esi
xor    %eax,%eax
test   %edi,%edi
cmovns %esi,%eax
ret

LLVM IR (-O0):
define i32 @clip(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 = icmp slt i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %2
br label %18
8: ; preds = %2
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = icmp sgt i32 %9, %10
br i1 %11, label %12, label %14
12: ; preds = %8
%13 = load i32, i32* %4
br label %16
14: ; preds = %8
%15 = load i32, i32* %3
br label %16
16: ; preds = %14, %12
%17 = phi i32 [ %13, %12 ], [ %15, %14 ]
br label %18
18: ; preds = %16, %7
%19 = phi i32 [ 0, %7 ], [ %17, %16 ]
ret i32 %19
}

LLVM IR (-O2):
define i32 @clip(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, 0
%4 = icmp sgt i32 %0, %1
%5 = select i1 %4, i32 %1, i32 %0
%6 = select i1 %3, i32 0, i32 %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ __builtin_aarch64_set_fpsr(int);
void f1(int *x) { __builtin_aarch64_set_fpsr(*x); }


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

x86 assembly (clang, -O2):
<f1>:
mov    (%rdi),%edi
jmp    1030 <__builtin_aarch64_set_fpsr@plt>

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

LLVM IR (-O2):
define void @f1(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @__builtin_aarch64_set_fpsr(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() { printf("usage: carps-decode <file> [--header]\n"); }


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

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

LLVM IR (-O0):
@.str = [39 x i8] c"usage: carps-decode <file> [--header]\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [38 x i8] c"usage: carps-decode <file> [--header]\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct vec3 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ vec3_snap(float *, float *, float *);
__attribute__((always_)) struct vec3 *
psvec3_snap(struct vec3 *result, struct vec3 *a, struct vec3 *b) {
  vec3_snap((float *)result, (float *)a, (float *)b);
  return result;
}


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

x86 assembly (clang, -O2):
<psvec3_snap>:
push   %rbx
mov    %rdi,%rbx
call   1030 <vec3_snap@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.vec3 = type { i32 }
define %struct.vec3* @psvec3_snap(%struct.vec3* %0, %struct.vec3* %1, %struct.vec3* %2) {
%4 = alloca %struct.vec3*
%5 = alloca %struct.vec3*
%6 = alloca %struct.vec3*
store %struct.vec3* %0, %struct.vec3** %4
store %struct.vec3* %1, %struct.vec3** %5
store %struct.vec3* %2, %struct.vec3** %6
%7 = load %struct.vec3*, %struct.vec3** %4
%8 = bitcast %struct.vec3* %7 to float*
%9 = load %struct.vec3*, %struct.vec3** %5
%10 = bitcast %struct.vec3* %9 to float*
%11 = load %struct.vec3*, %struct.vec3** %6
%12 = bitcast %struct.vec3* %11 to float*
%13 = call i32 @vec3_snap(float* %8, float* %10, float* %12)
%14 = load %struct.vec3*, %struct.vec3** %4
ret %struct.vec3* %14
}

LLVM IR (-O2):
%struct.vec3 = type { i32 }
define %struct.vec3* @psvec3_snap(%struct.vec3* returned %0, %struct.vec3* %1, %struct.vec3* %2) {
%4 = bitcast %struct.vec3* %0 to float*
%5 = bitcast %struct.vec3* %1 to float*
%6 = bitcast %struct.vec3* %2 to float*
%7 = tail call i32 @vec3_snap(float* %4, float* %5, float* %6)
ret %struct.vec3* %0
}
long erase(string)
char *string[];
{
  if (!char_erase())
    return (0);
  return (1);
}


x86 assembly (clang, -O0):
<erase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <char_erase@plt>
cmp    $0x0,%eax
jne    1139 <erase+0x29>
movq   $0x0,-0x8(%rbp)
jmp    1141 <erase+0x31>
movq   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<erase>:
push   %rax
xor    %eax,%eax
call   1030 <char_erase@plt>
xor    %ecx,%ecx
test   %eax,%eax
setne  %cl
mov    %rcx,%rax
pop    %rcx
ret

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

LLVM IR (-O2):
define i64 @erase(i8** nocapture readnone %0) {
%2 = tail call i32 (...) @char_erase()
%3 = icmp ne i32 %2, 0
%4 = zext i1 %3 to i64
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void _mesa_free(void *ptr) { free(ptr); }


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

x86 assembly (clang, -O2):
<_mesa_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @_mesa_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ scrl(int);
void gui_status_add_start() { scrl(1); }


x86 assembly (clang, -O0):
<gui_status_add_start>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <scrl@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gui_status_add_start>:
mov    $0x1,%edi
jmp    1030 <scrl@plt>

LLVM IR (-O0):
define void @gui_status_add_start() {
%1 = call i32 @scrl(i32 1)
ret void
}

LLVM IR (-O2):
define void @gui_status_add_start() {
%1 = tail call i32 @scrl(i32 1)
ret void
}
void PEM_read_bio_RSAPrivateKey(void) {}


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

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

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

LLVM IR (-O2):
define void @PEM_read_bio_RSAPrivateKey() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abc(int *);
int def(int Y, int Z) {
  abc(&Z);
  return Y;
}


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

x86 assembly (clang, -O2):
<def>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
mov    %esi,0xc(%rsp)
lea    0xc(%rsp),%rdi
call   1030 <abc@plt>
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @def(i32 returned %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = call i32 @abc(i32* %3)
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int scanf(char *, int *, int *);
int main(int argc, char *argv[]) {
  int ret;
  int a, b;
  ret = scanf("%d %d", &a, &b);
  printf("a:%d, b:%d, ret:%d\n", a, b, ret);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x1c(%rbp),%rdx
call   1040 <scanf@plt>
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    -0x14(%rbp),%ecx
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
mov    (%rsp),%edx
lea    0xec3(%rip),%rdi
mov    %eax,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [20 x i8] c"a:%d, b:%d, ret:%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
%6 = bitcast i32* %4 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %3, i32* %4)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 %9, i32 %7)
ret i32 0
}