xunge/DecIR huggingface dataset:
/* Variables and functions */
int EPOLLET;
int EPOLLOUT;
int /*<<< orphan*/ kore_platform_event_schedule(int, int, int /*<<< orphan*/,
                                                void *);
void kore_platform_schedule_write(int fd, void *data) {
  kore_platform_event_schedule(fd, EPOLLOUT | EPOLLET, 0, data);
}


x86 assembly (clang, -O0):
<kore_platform_schedule_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eb7(%rip),%rax
mov    (%rax),%esi
mov    0x2ea6(%rip),%rax
or     (%rax),%esi
mov    -0x10(%rbp),%rcx
xor    %edx,%edx
call   1030 <kore_platform_event_schedule@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kore_platform_schedule_write>:
mov    %rsi,%rcx
mov    0x2ec6(%rip),%rax
mov    0x2eb7(%rip),%rdx
mov    (%rdx),%esi
or     (%rax),%esi
xor    %edx,%edx
jmp    1030 <kore_platform_event_schedule@plt>

LLVM IR (-O0):
@EPOLLOUT = global i32 0
@EPOLLET = global i32 0
define void @kore_platform_schedule_write(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i32, i32* @EPOLLOUT
%7 = load i32, i32* @EPOLLET
%8 = or i32 %6, %7
%9 = load i8*, i8** %4
%10 = call i32 @kore_platform_event_schedule(i32 %5, i32 %8, i32 0, i8* %9)
ret void
}

LLVM IR (-O2):
@EPOLLOUT = global i32 0
@EPOLLET = global i32 0
define void @kore_platform_schedule_write(i32 %0, i8* %1) {
%3 = load i32, i32* @EPOLLOUT
%4 = load i32, i32* @EPOLLET
%5 = or i32 %4, %3
%6 = tail call i32 @kore_platform_event_schedule(i32 %0, i32 %5, i32 0, i8* %1)
ret void
}
int increase_buffer(int n) {
  if (n <= 0)
    return 4;
  if (n < 100)
    return 3 * n / 2;
  if (n < 1000)
    return 6 * n / 5;
  return 11 * n / 10;
}


x86 assembly (clang, -O0):
<increase_buffer>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jg     111d <increase_buffer+0x1d>
movl   $0x4,-0x4(%rbp)
jmp    116b <increase_buffer+0x6b>
cmpl   $0x64,-0x8(%rbp)
jge    113b <increase_buffer+0x3b>
imul   $0x3,-0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    116b <increase_buffer+0x6b>
cmpl   $0x3e8,-0x8(%rbp)
jge    115c <increase_buffer+0x5c>
imul   $0x6,-0x8(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    116b <increase_buffer+0x6b>
imul   $0xb,-0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<increase_buffer>:
test   %edi,%edi
jle    110f <increase_buffer+0xf>
cmp    $0x63,%edi
ja     1115 <increase_buffer+0x15>
lea    (%rdi,%rdi,2),%eax
shr    %eax
ret
mov    $0x4,%eax
ret
cmp    $0x3e7,%edi
ja     112f <increase_buffer+0x2f>
add    %edi,%edi
lea    (%rdi,%rdi,2),%eax
movzwl %ax,%eax
imul   $0xcccd,%eax,%eax
shr    $0x12,%eax
ret
lea    (%rdi,%rdi,4),%eax
lea    (%rdi,%rax,2),%eax
cltq
imul   $0x66666667,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @increase_buffer(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sle i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 4, i32* %2
br label %25
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp slt i32 %8, 100
br i1 %9, label %10, label %14
10: ; preds = %7
%11 = load i32, i32* %3
%12 = mul nsw i32 3, %11
%13 = sdiv i32 %12, 2
store i32 %13, i32* %2
br label %25
14: ; preds = %7
%15 = load i32, i32* %3
%16 = icmp slt i32 %15, 1000
br i1 %16, label %17, label %21
17: ; preds = %14
%18 = load i32, i32* %3
%19 = mul nsw i32 6, %18
%20 = sdiv i32 %19, 5
store i32 %20, i32* %2
br label %25
21: ; preds = %14
%22 = load i32, i32* %3
%23 = mul nsw i32 11, %22
%24 = sdiv i32 %23, 10
store i32 %24, i32* %2
br label %25
25: ; preds = %21, %17, %10, %6
%26 = load i32, i32* %2
ret i32 %26
}

LLVM IR (-O2):
define i32 @increase_buffer(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %18, label %3
3: ; preds = %1
%4 = icmp ult i32 %0, 100
br i1 %4, label %5, label %8
5: ; preds = %3
%6 = mul nuw nsw i32 %0, 3
%7 = lshr i32 %6, 1
br label %18
8: ; preds = %3
%9 = icmp ult i32 %0, 1000
br i1 %9, label %10, label %15
10: ; preds = %8
%11 = trunc i32 %0 to i16
%12 = mul nuw nsw i16 %11, 6
%13 = udiv i16 %12, 5
%14 = zext i16 %13 to i32
br label %18
15: ; preds = %8
%16 = mul nsw i32 %0, 11
%17 = sdiv i32 %16, 10
br label %18
18: ; preds = %1, %15, %10, %5
%19 = phi i32 [ %7, %5 ], [ %14, %10 ], [ %17, %15 ], [ 4, %1 ]
ret i32 %19
}
int cmpindex(const void *a, const void *b) {
  return (0x0000007f & (*((const int *)b))) -
         (0x0000007f & (*((const int *)a)));
}


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

x86 assembly (clang, -O2):
<cmpindex>:
mov    (%rsi),%eax
and    $0x7f,%eax
mov    (%rdi),%ecx
and    $0x7f,%ecx
sub    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @cmpindex(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i32*
%4 = load i32, i32* %3
%5 = and i32 %4, 127
%6 = bitcast i8* %0 to i32*
%7 = load i32, i32* %6
%8 = and i32 %7, 127
%9 = sub nsw i32 %5, %8
ret i32 %9
}
/* Type definitions */
typedef scalar_t__ uint64_t;
struct timeval {
  int tv_sec;
  scalar_t__ tv_usec;
};

/* Variables and functions */
int gettimeofday(struct timeval *, int /*<<< orphan*/ *);
uint64_t now() {
  struct timeval tv;
  int ret = gettimeofday(&tv, NULL);
  return tv.tv_sec * 1000000 + tv.tv_usec;
}


x86 assembly (clang, -O0):
<now>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
mov    %eax,-0x14(%rbp)
imul   $0xf4240,-0x10(%rbp),%eax
cltq
add    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<now>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
movslq 0x8(%rsp),%rax
imul   $0xf4240,%rax,%rax
add    0x10(%rsp),%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i64 }
define i64 @now() {
%1 = alloca %struct.timeval
%2 = alloca i32
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
store i32 %3, i32* %2
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%5 = load i32, i32* %4
%6 = mul nsw i32 %5, 1000000
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%9 = load i64, i64* %8
%10 = add nsw i64 %7, %9
ret i64 %10
}

LLVM IR (-O2):
%struct.timeval = type { i32, i64 }
define i64 @now() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load i32, i32* %4
%6 = mul nsw i32 %5, 1000000
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%9 = load i64, i64* %8
%10 = add nsw i64 %9, %7
ret i64 %10
}
/* Variables and functions */
double ceil(double);
long lround(double d) { return (long)(d > 0 ? d + 0.5 : ceil(d - 0.5)); }


x86 assembly (clang, -O0):
<lround>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1146 <lround+0x36>
movsd  0xec9(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1161 <lround+0x51>
movsd  -0x8(%rbp),%xmm0
movsd  0xead(%rip),%xmm1
subsd  %xmm1,%xmm0
call   1030 <ceil@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
cvttsd2si %xmm0,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lround>:
push   %rax
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1125 <lround+0x15>
addsd  0xee5(%rip),%xmm0
jmp    1132 <lround+0x22>
addsd  0xed3(%rip),%xmm0
call   1030 <ceil@plt>
cvttsd2si %xmm0,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @lround(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp ogt double %3, 0.000000e+00
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load double, double* %2
%7 = fadd double %6, 5.000000e-01
br label %12
8: ; preds = %1
%9 = load double, double* %2
%10 = fsub double %9, 5.000000e-01
%11 = call double @llvm.ceil.f64(double %10)
br label %12
12: ; preds = %8, %5
%13 = phi double [ %7, %5 ], [ %11, %8 ]
%14 = fptosi double %13 to i64
ret i64 %14
}

LLVM IR (-O2):
define i64 @lround(double %0) {
%2 = fcmp ogt double %0, 0.000000e+00
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = fadd double %0, 5.000000e-01
br label %8
5: ; preds = %1
%6 = fadd double %0, -5.000000e-01
%7 = tail call double @llvm.ceil.f64(double %6)
br label %8
8: ; preds = %5, %3
%9 = phi double [ %4, %3 ], [ %7, %5 ]
%10 = fptosi double %9 to i64
ret i64 %10
}
int op_xnor(int x, int y) { return ~(x ^ y); }


x86 assembly (clang, -O0):
<op_xnor>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_xnor>:
mov    %edi,%eax
xor    %esi,%eax
not    %eax
ret

LLVM IR (-O0):
define i32 @op_xnor(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 = xor i32 %5, %6
%8 = xor i32 %7, -1
ret i32 %8
}

LLVM IR (-O2):
define i32 @op_xnor(i32 %0, i32 %1) {
%3 = xor i32 %0, %1
%4 = xor i32 %3, -1
ret i32 %4
}
int kisspace(unsigned char ch) {
  return ch == ' ' || ch == '\f' || ch == '\n' || ch == '\r' || ch == '\t' ||
         ch == '\v';
}


x86 assembly (clang, -O0):
<kisspace>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x2(%rbp)
je     1171 <kisspace+0x71>
movzbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xc,%ecx
mov    %al,-0x2(%rbp)
je     1171 <kisspace+0x71>
movzbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xa,%ecx
mov    %al,-0x2(%rbp)
je     1171 <kisspace+0x71>
movzbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xd,%ecx
mov    %al,-0x2(%rbp)
je     1171 <kisspace+0x71>
movzbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x9,%ecx
mov    %al,-0x2(%rbp)
je     1171 <kisspace+0x71>
movzbl -0x1(%rbp),%eax
cmp    $0xb,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<kisspace>:
cmp    $0x20,%dil
ja     111e <kisspace+0x1e>
mov    $0x1,%eax
mov    %edi,%ecx
movabs $0x100003600,%rdx
bt     %rcx,%rdx
jae    111e <kisspace+0x1e>
ret
xor    %eax,%eax
cmp    $0xb,%dil
sete   %al
ret

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

LLVM IR (-O2):
define i32 @kisspace(i8 zeroext %0) {
switch i8 %0, label %2 [
i8 32, label %5
i8 13, label %5
i8 12, label %5
i8 10, label %5
i8 9, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 11
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ oof(char const *);
void bar() {
  const char *label2 = (*"*.L_sfnames_b" == '*') + "*.L_sfnames_b";
  oof(label2);
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsbl 0xee1(%rip),%eax
cmp    $0x2a,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
movslq %eax,%rcx
lea    0xecc(%rip),%rax
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <oof@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
lea    0xeea(%rip),%rdi
jmp    1030 <oof@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"*.L_sfnames_b\00"
define void @bar() {
%1 = alloca i8*
%2 = load i8, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
%3 = sext i8 %2 to i32
%4 = icmp eq i32 %3, 42
%5 = zext i1 %4 to i32
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i8, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i64 %6
store i8* %7, i8** %1
%8 = load i8*, i8** %1
%9 = call i32 @oof(i8* %8)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"*.L_sfnames_b\00"
define void @bar() {
%1 = tail call i32 @oof(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 1))
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int y1, y2;
  y1 = __VERIFIER_nondet_int();
  y2 = __VERIFIER_nondet_int();
  if (y1 >= 0 && y2 >= 0) {
    while (y1 != y2) {
      if (y1 > y2) {
        y1 = y1 - y2;
      } else {
        y2 = y2 - y1;
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1185 <main+0x75>
cmpl   $0x0,-0xc(%rbp)
jl     1185 <main+0x75>
jmp    114c <main+0x3c>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     1180 <main+0x70>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1172 <main+0x62>
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    117b <main+0x6b>
mov    -0xc(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    114c <main+0x3c>
jmp    1185 <main+0x75>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Variables and functions */
int fc8080_channel_deselect(void *, unsigned char, unsigned char);
int bbm_com_channel_deselect(void *handle, unsigned char subch_id,
                             unsigned char buf_id) {
  int res;
  res = fc8080_channel_deselect(handle, subch_id, buf_id);
  return res;
}


x86 assembly (clang, -O0):
<bbm_com_channel_deselect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x9(%rbp),%al
movzbl %al,%esi
movzbl -0xa(%rbp),%edx
call   1030 <fc8080_channel_deselect@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bbm_com_channel_deselect>:
jmp    1030 <fc8080_channel_deselect@plt>

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

LLVM IR (-O2):
define i32 @bbm_com_channel_deselect(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = tail call i32 @fc8080_channel_deselect(i8* %0, i8 zeroext %1, i8 zeroext %2)
ret i32 %4
}
void g_convert_error_quark() {}


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

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

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

LLVM IR (-O2):
define void @g_convert_error_quark() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(double *);
void free_array(double *A) { free(A); }


x86 assembly (clang, -O0):
<free_array>:
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):
<free_array>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @free_array(double* nocapture %0) {
%2 = tail call i32 @free(double* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int system(const char *command) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<system>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    0x2ed9(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec0(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<system>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @system(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @ENOSYS
store i32 %3, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @system(i8* nocapture readnone %0) {
%2 = load i32, i32* @ENOSYS
store i32 %2, i32* @errno
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ test(int, int, int);
int main(void) {
  for (int n = -10; n < 10; ++n)
    for (int offset = -33; offset <= 33; ++offset)
      test(n, n, offset);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xfffffff6,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1170 <main+0x60>
movl   $0xffffffdf,-0xc(%rbp)
cmpl   $0x21,-0xc(%rbp)
jg     115d <main+0x4d>
mov    -0x8(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <test@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1137 <main+0x27>
jmp    1162 <main+0x52>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    $0xfffffff6,%ebx
nopl   0x0(%rax,%rax,1)
mov    $0xffffffdf,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ebx,%edi
mov    %ebx,%esi
mov    %ebp,%edx
call   1030 <test@plt>
add    $0x1,%ebp
cmp    $0x22,%ebp
jne    1130 <main+0x20>
add    $0x1,%ebx
cmp    $0xa,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 -10, i32* %2
br label %4
4: ; preds = %20, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 10
br i1 %6, label %7, label %23
7: ; preds = %4
store i32 -33, i32* %3
br label %8
8: ; preds = %16, %7
%9 = load i32, i32* %3
%10 = icmp sle i32 %9, 33
br i1 %10, label %11, label %19
11: ; preds = %8
%12 = load i32, i32* %2
%13 = load i32, i32* %2
%14 = load i32, i32* %3
%15 = call i32 @test(i32 %12, i32 %13, i32 %14)
br label %16
16: ; preds = %11
%17 = load i32, i32* %3
%18 = add nsw i32 %17, 1
store i32 %18, i32* %3
br label %8
19: ; preds = %8
br label %20
20: ; preds = %19
%21 = load i32, i32* %2
%22 = add nsw i32 %21, 1
store i32 %22, i32* %2
br label %4
23: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %4
%2 = phi i32 [ -10, %0 ], [ %5, %4 ]
br label %7
3: ; preds = %4
ret i32 0
4: ; preds = %7
%5 = add nsw i32 %2, 1
%6 = icmp eq i32 %5, 10
br i1 %6, label %3, label %1
7: ; preds = %1, %7
%8 = phi i32 [ -33, %1 ], [ %10, %7 ]
%9 = tail call i32 @test(i32 %2, i32 %2, i32 %8)
%10 = add nsw i32 %8, 1
%11 = icmp eq i32 %10, 34
br i1 %11, label %4, label %7
}
/* Variables and functions */
int tolower(int);
int vowel(int c0) {
  int c;
  c = tolower(c0);
  return (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u' || c == 'y');
}


x86 assembly (clang, -O0):
<vowel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <tolower@plt>
mov    %eax,-0x8(%rbp)
mov    $0x1,%al
cmpl   $0x61,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     117b <vowel+0x6b>
mov    $0x1,%al
cmpl   $0x65,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     117b <vowel+0x6b>
mov    $0x1,%al
cmpl   $0x69,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     117b <vowel+0x6b>
mov    $0x1,%al
cmpl   $0x6f,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     117b <vowel+0x6b>
mov    $0x1,%al
cmpl   $0x75,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     117b <vowel+0x6b>
cmpl   $0x79,-0x8(%rbp)
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vowel>:
push   %rax
call   1030 <tolower@plt>
lea    -0x61(%rax),%edx
ror    %edx
cmp    $0xb,%edx
jae    112f <vowel+0x1f>
mov    $0x1,%ecx
mov    $0x495,%esi
bt     %edx,%esi
jb     1137 <vowel+0x27>
xor    %ecx,%ecx
cmp    $0x79,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @vowel(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @tolower(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, 97
br i1 %7, label %23, label %8
8: ; preds = %1
%9 = load i32, i32* %3
%10 = icmp eq i32 %9, 101
br i1 %10, label %23, label %11
11: ; preds = %8
%12 = load i32, i32* %3
%13 = icmp eq i32 %12, 105
br i1 %13, label %23, label %14
14: ; preds = %11
%15 = load i32, i32* %3
%16 = icmp eq i32 %15, 111
br i1 %16, label %23, label %17
17: ; preds = %14
%18 = load i32, i32* %3
%19 = icmp eq i32 %18, 117
br i1 %19, label %23, label %20
20: ; preds = %17
%21 = load i32, i32* %3
%22 = icmp eq i32 %21, 121
br label %23
23: ; preds = %20, %17, %14, %11, %8, %1
%24 = phi i1 [ true, %17 ], [ true, %14 ], [ true, %11 ], [ true, %8 ], [ true, %1 ], [ %22, %20 ]
%25 = zext i1 %24 to i32
ret i32 %25
}

LLVM IR (-O2):
define i32 @vowel(i32 %0) {
%2 = tail call i32 @tolower(i32 %0)
%3 = add i32 %2, -97
%4 = tail call i32 @llvm.fshl.i32(i32 %3, i32 %3, i32 31)
%5 = icmp ult i32 %4, 11
br i1 %5, label %9, label %6
6: ; preds = %9, %1
%7 = icmp eq i32 %2, 121
%8 = zext i1 %7 to i32
br label %14
9: ; preds = %1
%10 = trunc i32 %4 to i16
%11 = lshr i16 1173, %10
%12 = and i16 %11, 1
%13 = icmp eq i16 %12, 0
br i1 %13, label %6, label %14
14: ; preds = %9, %6
%15 = phi i32 [ %8, %6 ], [ 1, %9 ]
ret i32 %15
}
/* Variables and functions */
int *leak_pointer();
int read_after_stack_free() {
  int *x = leak_pointer();
  return *x;
}


x86 assembly (clang, -O0):
<read_after_stack_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <leak_pointer@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @read_after_stack_free() {
%1 = tail call i32* (...) @leak_pointer()
%2 = load i32, i32* %1
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ v;
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int);
void U32TO8_LITTLE(uint8_t *p, uint32_t v) { memcpy(p, &v, sizeof(v)); }


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

x86 assembly (clang, -O2):
<U32TO8_LITTLE>:
push   %rax
mov    %esi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @U32TO8_LITTLE(i32* %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = call i32 @memcpy(i32* %0, i32* %3, i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print(char *);
void arbitration_lost(void) { print("arbitration lost"); }


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

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

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

LLVM IR (-O2):
@.str = [17 x i8] c"arbitration lost\00"
define void @arbitration_lost() {
%1 = tail call i32 @print(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ posix_spawnattr_t;
typedef int /*<<< orphan*/ posix_spawn_file_actions_t;
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int posix_spawn(int /*<<< orphan*/ *, char const *, int /*<<< orphan*/ const *,
                int /*<<< orphan*/ const *, char *const *, char *const *);
int __wrap_posix_spawn(pid_t *pid, const char *path,
                       const posix_spawn_file_actions_t *file_actions,
                       const posix_spawnattr_t *attrp, char *const argv[],
                       char *const envp[]) {
  return posix_spawn(pid, path, file_actions, attrp, argv, envp);
}


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

x86 assembly (clang, -O2):
<__wrap_posix_spawn>:
jmp    1030 <posix_spawn@plt>

LLVM IR (-O0):
define i32 @__wrap_posix_spawn(i32* %0, i8* %1, i32* %2, i32* %3, i8** %4, i8** %5) {
%7 = alloca i32*
%8 = alloca i8*
%9 = alloca i32*
%10 = alloca i32*
%11 = alloca i8**
%12 = alloca i8**
store i32* %0, i32** %7
store i8* %1, i8** %8
store i32* %2, i32** %9
store i32* %3, i32** %10
store i8** %4, i8*** %11
store i8** %5, i8*** %12
%13 = load i32*, i32** %7
%14 = load i8*, i8** %8
%15 = load i32*, i32** %9
%16 = load i32*, i32** %10
%17 = load i8**, i8*** %11
%18 = load i8**, i8*** %12
%19 = call i32 @posix_spawn(i32* %13, i8* %14, i32* %15, i32* %16, i8** %17, i8** %18)
ret i32 %19
}

LLVM IR (-O2):
define i32 @__wrap_posix_spawn(i32* %0, i8* %1, i32* %2, i32* %3, i8** %4, i8** %5) {
%7 = tail call i32 @posix_spawn(i32* %0, i8* %1, i32* %2, i32* %3, i8** %4, i8** %5)
ret i32 %7
}
int test_imm_2Fuint16_reg(unsigned short val) {
  return ((val) & (0x2F << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_2Fuint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0x2f,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_2Fuint16_reg(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, 47
%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_2Fuint16_reg(i16 zeroext %0) {
%2 = and i16 %0, 47
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int skip(const char *text, char c, int from) {
  while (text[from] && text[from] == c) {
    from++;
  }
  return from;
}


x86 assembly (clang, -O0):
<skip>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     1143 <skip+0x43>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
movsbl -0x9(%rbp),%ecx
cmp    %ecx,%eax
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1153 <skip+0x53>
jmp    1161 <skip+0x61>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1111 <skip+0x11>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip>:
movslq %edx,%rcx
lea    -0x1(%rcx),%eax
add    %rcx,%rdi
nopl   0x0(%rax)
movzbl (%rdi),%ecx
add    $0x1,%eax
test   %cl,%cl
je     1123 <skip+0x23>
add    $0x1,%rdi
cmp    %sil,%cl
je     1110 <skip+0x10>
ret

LLVM IR (-O0):
define i32 @skip(i8* %0, i8 signext %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
br label %7
7: ; preds = %27, %3
%8 = load i8*, i8** %4
%9 = load i32, i32* %6
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %8, i64 %10
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %25
15: ; preds = %7
%16 = load i8*, i8** %4
%17 = load i32, i32* %6
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8, i8* %16, i64 %18
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = load i8, i8* %5
%23 = sext i8 %22 to i32
%24 = icmp eq i32 %21, %23
br label %25
25: ; preds = %15, %7
%26 = phi i1 [ false, %7 ], [ %24, %15 ]
br i1 %26, label %27, label %30
27: ; preds = %25
%28 = load i32, i32* %6
%29 = add nsw i32 %28, 1
store i32 %29, i32* %6
br label %7
30: ; preds = %25
%31 = load i32, i32* %6
ret i32 %31
}

LLVM IR (-O2):
define i32 @skip(i8* nocapture %0, i8 signext %1, i32 %2) {
%4 = sext i32 %2 to i64
br label %5
5: ; preds = %5, %3
%6 = phi i64 [ %12, %5 ], [ %4, %3 ]
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
%9 = icmp ne i8 %8, 0
%10 = icmp eq i8 %8, %1
%11 = and i1 %9, %10
%12 = add i64 %6, 1
br i1 %11, label %5, label %13
13: ; preds = %5
%14 = trunc i64 %6 to i32
ret i32 %14
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int ELFCLASS32;
char *readsoname32(char *, int /*<<< orphan*/ *, int, int *);
char *readsoname64(char *, int /*<<< orphan*/ *, int, int *);
char *readsoname(char *name, FILE *infile, int expected_type, int *type,
                 int elfclass) {
  char *res;
  if (elfclass == ELFCLASS32)
    res = readsoname32(name, infile, expected_type, type);
  else {
    res = readsoname64(name, infile, expected_type, type);
  }
  return res;
}


x86 assembly (clang, -O0):
<readsoname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    0x2e9b(%rip),%rcx
cmp    (%rcx),%eax
jne    116a <readsoname+0x4a>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
call   1040 <readsoname32@plt>
mov    %rax,-0x30(%rbp)
jmp    1182 <readsoname+0x62>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
call   1030 <readsoname64@plt>
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readsoname>:
mov    0x2eb9(%rip),%rax
cmp    %r8d,(%rax)
jne    1131 <readsoname+0x11>
jmp    1040 <readsoname32@plt>
jmp    1030 <readsoname64@plt>

LLVM IR (-O0):
@ELFCLASS32 = global i32 0
define i8* @readsoname(i8* %0, i32* %1, i32 %2, i32* %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32*
%10 = alloca i32
%11 = alloca i8*
store i8* %0, i8** %6
store i32* %1, i32** %7
store i32 %2, i32* %8
store i32* %3, i32** %9
store i32 %4, i32* %10
%12 = load i32, i32* %10
%13 = load i32, i32* @ELFCLASS32
%14 = icmp eq i32 %12, %13
br i1 %14, label %15, label %21
15: ; preds = %5
%16 = load i8*, i8** %6
%17 = load i32*, i32** %7
%18 = load i32, i32* %8
%19 = load i32*, i32** %9
%20 = call i8* @readsoname32(i8* %16, i32* %17, i32 %18, i32* %19)
store i8* %20, i8** %11
br label %27
21: ; preds = %5
%22 = load i8*, i8** %6
%23 = load i32*, i32** %7
%24 = load i32, i32* %8
%25 = load i32*, i32** %9
%26 = call i8* @readsoname64(i8* %22, i32* %23, i32 %24, i32* %25)
store i8* %26, i8** %11
br label %27
27: ; preds = %21, %15
%28 = load i8*, i8** %11
ret i8* %28
}

LLVM IR (-O2):
@ELFCLASS32 = global i32 0
define i8* @readsoname(i8* %0, i32* %1, i32 %2, i32* %3, i32 %4) {
%6 = load i32, i32* @ELFCLASS32
%7 = icmp eq i32 %6, %4
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = tail call i8* @readsoname32(i8* %0, i32* %1, i32 %2, i32* %3)
br label %12
10: ; preds = %5
%11 = tail call i8* @readsoname64(i8* %0, i32* %1, i32 %2, i32* %3)
br label %12
12: ; preds = %10, %8
%13 = phi i8* [ %9, %8 ], [ %11, %10 ]
ret i8* %13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Audible or visual alert. \a\n");
  printf("Form feed. \f\n");
  printf("This escape, \r, moves the active position to the initial position "
         "of the current line.\n");
  printf("Vertical tab \v is strange, as its behaviour is unspecified in "
         "certain conditions.\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xef7(%rip),%rdi
call   1030 <puts@plt>
lea    0xef8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf43(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"Audible or visual alert. \07\0A\00"
@.str.1 = [14 x i8] c"Form feed. \0C\0A\00"
@.str.2 = [88 x i8] c"This escape, \0D, moves the active position to the initial position of the current line.\0A\00"
@.str.3 = [83 x i8] c"Vertical tab \0B is strange, as its behaviour is unspecified in certain conditions.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([88 x i8], [88 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [27 x i8] c"Audible or visual alert. \07\00"
@str.4 = [13 x i8] c"Form feed. \0C\00"
@str.5 = [87 x i8] c"This escape, \0D, moves the active position to the initial position of the current line.\00"
@str.6 = [82 x i8] c"Vertical tab \0B is strange, as its behaviour is unspecified in certain conditions.\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([87 x i8], [87 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([82 x i8], [82 x i8]* @str.6, i64 0, i64 0))
ret i32 0
}
int foo(int x, int y) {
  if (x <= 0 || y <= 0)
    return 1;
  return 3 * foo(x - 6, y / 2);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1132 <foo+0x22>
cmpl   $0x0,-0xc(%rbp)
jg     113e <foo+0x2e>
movl   $0x1,-0x4(%rbp)
jmp    115c <foo+0x4c>
mov    -0x8(%rbp),%edi
sub    $0x6,%edi
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
call   1030 <foo@plt>
imul   $0x3,%eax,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
mov    $0x1,%eax
test   %edi,%edi
jle    1136 <foo+0x36>
test   %esi,%esi
jle    1136 <foo+0x36>
mov    $0x1,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    (%rax,%rax,2),%eax
cmp    $0x7,%edi
jb     1136 <foo+0x36>
add    $0xfffffffa,%edi
mov    %esi,%ecx
shr    %ecx
cmp    $0x1,%esi
mov    %ecx,%esi
ja     1120 <foo+0x20>
ret

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

LLVM IR (-O2):
define i32 @foo(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, 1
%4 = icmp slt i32 %1, 1
%5 = or i1 %3, %4
br i1 %5, label %16, label %6
6: ; preds = %2, %6
%7 = phi i32 [ %11, %6 ], [ %1, %2 ]
%8 = phi i32 [ %10, %6 ], [ %0, %2 ]
%9 = phi i32 [ %12, %6 ], [ 1, %2 ]
%10 = add nsw i32 %8, -6
%11 = lshr i32 %7, 1
%12 = mul nsw i32 %9, 3
%13 = icmp ult i32 %8, 7
%14 = icmp ult i32 %7, 2
%15 = or i1 %13, %14
br i1 %15, label %16, label %6
16: ; preds = %6, %2
%17 = phi i32 [ 1, %2 ], [ %12, %6 ]
ret i32 %17
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
bool SSIBusy(uint32_t ui32Base) {
  ;
  return (((*((volatile unsigned long *)(ui32Base + 0x0000000C))) & 0x00000010)
              ? true
              : false);
}


x86 assembly (clang, -O0):
<SSIBusy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%rdx
and    $0x10,%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SSIBusy>:
mov    0xc(%rdi),%rax
shr    $0x4,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @SSIBusy(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add nsw i64 %3, 12
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = and i64 %6, 16
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 1, i32 0
ret i32 %10
}

LLVM IR (-O2):
define i32 @SSIBusy(i64 %0) {
%2 = add nsw i64 %0, 12
%3 = inttoptr i64 %2 to i64*
%4 = load volatile i64, i64* %3
%5 = trunc i64 %4 to i32
%6 = lshr i32 %5, 4
%7 = and i32 %6, 1
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
void mscb_get_version(char *lib_version, char *prot_version) {
  strcpy(lib_version, "2.6.0");
  strcpy(prot_version, "5");
}


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

x86 assembly (clang, -O2):
<mscb_get_version>:
push   %rbx
mov    %rsi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <strcpy@plt>
lea    0xedf(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"2.6.0\00"
@.str.1 = [2 x i8] c"5\00"
define void @mscb_get_version(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 = call i32 @strcpy(i8* %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%7 = load i8*, i8** %4
%8 = call i32 @strcpy(i8* %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"2.6.0\00"
@.str.1 = [2 x i8] c"5\00"
define void @mscb_get_version(i8* %0, i8* %1) {
%3 = tail call i32 @strcpy(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ u_int32_t;

/* Variables and functions */
int /*<<< orphan*/ Interpolate_3(int /*<<< orphan*/, int, int /*<<< orphan*/,
                                 int, int /*<<< orphan*/, int, int);
u_int32_t Interp7(u_int32_t c1, u_int32_t c2, u_int32_t c3) {
  return Interpolate_3(c1, 6, c2, 1, c3, 1, 3);
}


x86 assembly (clang, -O0):
<Interp7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%r8d
mov    $0x6,%esi
mov    $0x1,%r9d
mov    %r9d,%ecx
movl   $0x3,(%rsp)
call   1030 <Interpolate_3@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Interp7>:
push   %rax
mov    %edx,%r8d
mov    %esi,%edx
movl   $0x3,(%rsp)
mov    $0x6,%esi
mov    $0x1,%ecx
mov    $0x1,%r9d
call   1030 <Interpolate_3@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @Interp7(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @Interpolate_3(i32 %0, i32 6, i32 %1, i32 1, i32 %2, i32 1, i32 3)
ret i32 %4
}
/* Variables and functions */
size_t read_file_segment(void *, size_t, int, char *);
size_t read_segment(void *buf, size_t size, int seg_num, char *filename) {
  return read_file_segment(buf, size, seg_num, filename);
}


x86 assembly (clang, -O0):
<read_segment>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
call   1030 <read_file_segment@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_segment>:
jmp    1030 <read_file_segment@plt>

LLVM IR (-O0):
define i64 @read_segment(i8* %0, i64 %1, i32 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i32
%8 = alloca i8*
store i8* %0, i8** %5
store i64 %1, i64* %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = load i32, i32* %7
%12 = load i8*, i8** %8
%13 = call i64 @read_file_segment(i8* %9, i64 %10, i32 %11, i8* %12)
ret i64 %13
}

LLVM IR (-O2):
define i64 @read_segment(i8* %0, i64 %1, i32 %2, i8* %3) {
%5 = tail call i64 @read_file_segment(i8* %0, i64 %1, i32 %2, i8* %3)
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void *malloc(unsigned int);
void *malloc_wrap(unsigned size) {
  void *ptr = malloc(size);
  if (ptr)
    return ptr;
  else
    abort();
}


x86 assembly (clang, -O0):
<malloc_wrap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     114c <malloc_wrap+0x2c>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<malloc_wrap>:
push   %rax
call   1040 <malloc@plt>
test   %rax,%rax
je     112d <malloc_wrap+0xd>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define noalias i8* @malloc_wrap(i32 %0) {
%2 = tail call i8* @malloc(i32 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %5, label %4
4: ; preds = %1
ret i8* %2
5: ; preds = %1
%6 = tail call i32 (...) @abort()
unreachable
}
float div(float a, float b) { return a / b; }


x86 assembly (clang, -O0):
<div>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
divss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<div>:
divss  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define float @div(float %0, float %1) {
%3 = fdiv float %0, %1
ret float %3
}