xunge/DecIR huggingface dataset:
int test_imm_A9int64_highword_mem(long long *val) {
  return ((*val >> 32) & (0xA9 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_A9int64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x20,%rdx
and    $0xa9,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_A9int64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 725849473024
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void uart_init(void) {}


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

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

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

LLVM IR (-O2):
define void @uart_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ usage(char *);
int watch(char *);
int main(int argc, char *argv[]) {
  if (argc < 2) {
    usage(argv[0]);
    return 0;
  }
  return watch(argv[1]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1158 <main+0x38>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1040 <usage@plt>
movl   $0x0,-0x4(%rbp)
jmp    1168 <main+0x48>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <watch@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x1,%edi
jg     1132 <main+0x12>
mov    (%rsi),%rdi
call   1040 <usage@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    0x8(%rsi),%rdi
pop    %rax
jmp    1030 <watch@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = tail call i32 @usage(i8* %5)
br label %11
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 @watch(i8* %9)
br label %11
11: ; preds = %7, %4
%12 = phi i32 [ 0, %4 ], [ %10, %7 ]
ret i32 %12
}
/* Variables and functions */
float _d2f(int /*<<< orphan*/);
int /*<<< orphan*/ _dmul(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _f2d(int);
float _fmul(int a, int b) { return _d2f(_dmul(_f2d(a), _f2d(b))); }


x86 assembly (clang, -O0):
<_fmul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <_f2d@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <_f2d@plt>
mov    -0xc(%rbp),%edi
mov    %eax,%esi
call   1050 <_dmul@plt>
mov    %eax,%edi
call   1030 <_d2f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_fmul>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
call   1040 <_f2d@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1040 <_f2d@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1050 <_dmul@plt>
mov    %eax,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <_d2f@plt>

LLVM IR (-O0):
define float @_fmul(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 @_f2d(i32 %5)
%7 = load i32, i32* %4
%8 = call i32 @_f2d(i32 %7)
%9 = call i32 @_dmul(i32 %6, i32 %8)
%10 = call float @_d2f(i32 %9)
ret float %10
}

LLVM IR (-O2):
define float @_fmul(i32 %0, i32 %1) {
%3 = tail call i32 @_f2d(i32 %0)
%4 = tail call i32 @_f2d(i32 %1)
%5 = tail call i32 @_dmul(i32 %3, i32 %4)
%6 = tail call float @_d2f(i32 %5)
ret float %6
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void usage(const char *progname, int status) {
  fprintf(stderr, "Usage: %s\n", progname);
  fprintf(stderr, "Not enough arguments given");
  exit(status);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xebd(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e8f(%rip),%rax
mov    (%rax),%edi
lea    0xeb1(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0xc(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%rdx
mov    0x2eb0(%rip),%r14
mov    (%r14),%edi
lea    0xec6(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xec0(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [11 x i8] c"Usage: %s\0A\00"
@.str.1 = [27 x i8] c"Not enough arguments given\00"
define void @usage(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i32, i32* @stderr
%9 = call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%10 = load i32, i32* %4
%11 = call i32 @exit(i32 %10)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"Usage: %s\0A\00"
@.str.1 = [27 x i8] c"Not enough arguments given\00"
define void @usage(i8* %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = load i32, i32* @stderr
%6 = tail call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @exit(i32 %1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ max(float, float);
float min(int /*<<< orphan*/, float);
float Clamp01(float a) { return min(max(0.0f, a), 1.0f); }


x86 assembly (clang, -O0):
<Clamp01>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm1
xorps  %xmm0,%xmm0
call   1040 <max@plt>
mov    %eax,%edi
movss  0xebc(%rip),%xmm0
call   1030 <min@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Clamp01>:
push   %rax
movaps %xmm0,%xmm1
xorps  %xmm0,%xmm0
call   1040 <max@plt>
movss  0xecc(%rip),%xmm0
mov    %eax,%edi
pop    %rax
jmp    1030 <min@plt>

LLVM IR (-O0):
define float @Clamp01(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i32 @max(float 0.000000e+00, float %3)
%5 = call float @min(i32 %4, float 1.000000e+00)
ret float %5
}

LLVM IR (-O2):
define float @Clamp01(float %0) {
%2 = tail call i32 @max(float 0.000000e+00, float %0)
%3 = tail call float @min(i32 %2, float 1.000000e+00)
ret float %3
}
void leds_arch_set(unsigned char leds) {}


x86 assembly (clang, -O0):
<leds_arch_set>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @leds_arch_set(i8 zeroext %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __io_putchar(char);
int _write(int f, char *pointer, int length) {
  int i = 0;
  while (i < length) {
    __io_putchar(*(pointer + i));
    i++;
  }
  return length;
}


x86 assembly (clang, -O0):
<_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1154 <_write+0x44>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <__io_putchar@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1129 <_write+0x19>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_write>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%r14d
test   %edx,%edx
jle    1143 <_write+0x33>
mov    %rsi,%r15
mov    %r14d,%ebp
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
movsbl (%r15,%rbx,1),%edi
call   1030 <__io_putchar@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1130 <_write+0x20>
mov    %r14d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @_write(i32 %0, i8* nocapture %1, i32 returned %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %14
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ 0, %5 ], [ %12, %7 ]
%9 = getelementptr inbounds i8, i8* %1, i64 %8
%10 = load i8, i8* %9
%11 = tail call i32 @__io_putchar(i8 signext %10)
%12 = add nuw nsw i64 %8, 1
%13 = icmp eq i64 %12, %6
br i1 %13, label %14, label %7
14: ; preds = %7, %3
ret i32 %2
}
double getCPUTime() { return -1; }


x86 assembly (clang, -O0):
<getCPUTime>:
push   %rbp
mov    %rsp,%rbp
movsd  0xef4(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<getCPUTime>:
movsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @getCPUTime() {
ret double -1.000000e+00
}

LLVM IR (-O2):
define double @getCPUTime() {
ret double -1.000000e+00
}
/* Variables and functions */
scalar_t__ mmalloc(int);
char *ccstring() {
  char *newstr = (char *)mmalloc(1);
  *newstr = 0;
  return newstr;
}


x86 assembly (clang, -O0):
<ccstring>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
call   1030 <mmalloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ccstring>:
push   %rax
mov    $0x1,%edi
call   1030 <mmalloc@plt>
movb   $0x0,(%rax)
pop    %rcx
ret

LLVM IR (-O0):
define i8* @ccstring() {
%1 = alloca i8*
%2 = call i64 @mmalloc(i32 1)
%3 = inttoptr i64 %2 to i8*
store i8* %3, i8** %1
%4 = load i8*, i8** %1
store i8 0, i8* %4
%5 = load i8*, i8** %1
ret i8* %5
}

LLVM IR (-O2):
define i8* @ccstring() {
%1 = tail call i64 @mmalloc(i32 1)
%2 = inttoptr i64 %1 to i8*
store i8 0, i8* %2
ret i8* %2
}
int wait(s)
int *s;
{ return (0); }


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

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

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

LLVM IR (-O2):
define i32 @wait(i32* nocapture readnone %0) {
ret i32 0
}
void rewrite(char *src) {
  src += 8;
  *src = '\0';
}


x86 assembly (clang, -O0):
<rewrite>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rewrite>:
movb   $0x0,0x8(%rdi)
ret

LLVM IR (-O0):
define void @rewrite(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 8
store i8* %4, i8** %2
%5 = load i8*, i8** %2
store i8 0, i8* %5
ret void
}

LLVM IR (-O2):
define void @rewrite(i8* nocapture writeonly %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 8
store i8 0, i8* %2
ret void
}
int test_bit(unsigned char *b, unsigned int off) {
  unsigned char mask = 1 << off;
  return (((b[0] & mask) == mask) ? 1 : 0);
}


x86 assembly (clang, -O0):
<test_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %al,-0xd(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
movzbl -0xd(%rbp),%eax
and    %eax,%edx
movzbl -0xd(%rbp),%esi
xor    %eax,%eax
mov    $0x1,%ecx
cmp    %esi,%edx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_bit>:
mov    %esi,%ecx
movzbl (%rdi),%eax
or     $0xffffff00,%eax
shr    %cl,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @test_bit(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = shl i32 1, %6
%8 = trunc i32 %7 to i8
store i8 %8, i8* %5
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 0
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = load i8, i8* %5
%14 = zext i8 %13 to i32
%15 = and i32 %12, %14
%16 = load i8, i8* %5
%17 = zext i8 %16 to i32
%18 = icmp eq i32 %15, %17
%19 = zext i1 %18 to i64
%20 = select i1 %18, i32 1, i32 0
ret i32 %20
}

LLVM IR (-O2):
define i32 @test_bit(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = zext i8 %3 to i32
%5 = or i32 %4, -256
%6 = lshr i32 %5, %1
%7 = and i32 %6, 1
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ GLfloat;

/* Variables and functions */
int /*<<< orphan*/ glVertex4f(int /*<<< orphan*/, int /*<<< orphan*/,
                              int /*<<< orphan*/, int /*<<< orphan*/);
void Vertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat a) {
  glVertex4f(x, y, z, a);
}


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

x86 assembly (clang, -O2):
<Vertex4f>:
jmp    1030 <glVertex4f@plt>

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

LLVM IR (-O2):
define void @Vertex4f(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @glVertex4f(i32 %0, i32 %1, i32 %2, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void freeLogThreadName(void *ptr) { free(ptr); }


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

LLVM IR (-O0):
define void @freeLogThreadName(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 @freeLogThreadName(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
void intr_usr_cstr(rep, cc, nm, ex) int *rep, *cc, *nm, ex;
{ intr_usr_lib(rep, cc, ex, nm, 1); }


x86 assembly (clang, -O0):
<intr_usr_cstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    $0x1,%r8d
mov    $0x0,%al
call   1030 <intr_usr_lib@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intr_usr_cstr>:
mov    %rdx,%rax
mov    %ecx,%edx
mov    %rax,%rcx
mov    $0x1,%r8d
xor    %eax,%eax
jmp    1030 <intr_usr_lib@plt>

LLVM IR (-O0):
define void @intr_usr_cstr(i32* %0, i32* %1, i32* %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32
store i32* %0, i32** %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store i32 %3, i32* %8
%9 = load i32*, i32** %5
%10 = load i32*, i32** %6
%11 = load i32, i32* %8
%12 = load i32*, i32** %7
%13 = call i32 (i32*, i32*, i32, i32*, i32, ...) bitcast (i32 (...)* @intr_usr_lib to i32 (i32*, i32*, i32, i32*, i32, ...)*)(i32* %9, i32* %10, i32 %11, i32* %12, i32 1)
ret void
}

LLVM IR (-O2):
define void @intr_usr_cstr(i32* %0, i32* %1, i32* %2, i32 %3) {
%5 = tail call i32 (i32*, i32*, i32, i32*, i32, ...) bitcast (i32 (...)* @intr_usr_lib to i32 (i32*, i32*, i32, i32*, i32, ...)*)(i32* %0, i32* %1, i32 %3, i32* %2, i32 1)
ret void
}
signed short signedshort_ignoring_unsignedlongint(signed short x,
                                                  unsigned long int y) {
  return x;
}


x86 assembly (clang, -O0):
<signedshort_ignoring_unsignedlongint>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<signedshort_ignoring_unsignedlongint>:
mov    %edi,%eax
ret

LLVM IR (-O0):
define signext i16 @signedshort_ignoring_unsignedlongint(i16 signext %0, i64 %1) {
%3 = alloca i16
%4 = alloca i64
store i16 %0, i16* %3
store i64 %1, i64* %4
%5 = load i16, i16* %3
ret i16 %5
}

LLVM IR (-O2):
define signext i16 @signedshort_ignoring_unsignedlongint(i16 returned signext %0, i64 %1) {
ret i16 %0
}
void auth_pwd_cleanup() {}


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

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

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

LLVM IR (-O2):
define void @auth_pwd_cleanup() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LC_ALL;
int ispunct(int);
int /*<<< orphan*/ setlocale(int /*<<< orphan*/, char *);
int ls_ispunct(int c) {
  int ret;
  setlocale(LC_ALL, "");
  ret = ispunct(c);
  setlocale(LC_ALL, "C");
  return ret;
}


x86 assembly (clang, -O0):
<ls_ispunct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec6(%rip),%rsi
call   1040 <setlocale@plt>
mov    -0x4(%rbp),%edi
call   1030 <ispunct@plt>
mov    %eax,-0x8(%rbp)
mov    0x2e8e(%rip),%rax
mov    (%rax),%edi
lea    0xea5(%rip),%rsi
call   1040 <setlocale@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ls_ispunct>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
mov    0x2eb3(%rip),%r14
mov    (%r14),%edi
lea    0xeca(%rip),%rsi
call   1040 <setlocale@plt>
mov    %ebx,%edi
call   1030 <ispunct@plt>
mov    %eax,%ebx
mov    (%r14),%edi
lea    0xeb1(%rip),%rsi
call   1040 <setlocale@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@LC_ALL = global i32 0
@.str = [1 x i8] zeroinitializer
@.str.1 = [2 x i8] c"C\00"
define i32 @ls_ispunct(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* @LC_ALL
%5 = call i32 @setlocale(i32 %4, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* %2
%7 = call i32 @ispunct(i32 %6)
store i32 %7, i32* %3
%8 = load i32, i32* @LC_ALL
%9 = call i32 @setlocale(i32 %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
@LC_ALL = global i32 0
@.str = [1 x i8] zeroinitializer
@.str.1 = [2 x i8] c"C\00"
define i32 @ls_ispunct(i32 %0) {
%2 = load i32, i32* @LC_ALL
%3 = tail call i32 @setlocale(i32 %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @ispunct(i32 %0)
%5 = load i32, i32* @LC_ALL
%6 = tail call i32 @setlocale(i32 %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret i32 %4
}
/* Variables and functions */
float powf(float, int);
float exponential_out(float step, float max_steps, float max_val) {
  return (step == max_steps)
             ? max_val
             : max_val - powf(max_val, 1 - (float)step / max_steps);
}


x86 assembly (clang, -O0):
<exponential_out>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jne    114b <exponential_out+0x3b>
jp     114b <exponential_out+0x3b>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    118a <exponential_out+0x7a>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0xc(%rbp),%xmm0
movss  -0x4(%rbp),%xmm2
divss  -0x8(%rbp),%xmm2
movss  0xe94(%rip),%xmm1
subss  %xmm2,%xmm1
cvttss2si %xmm1,%edi
call   1030 <powf@plt>
movaps %xmm0,%xmm1
movss  -0x14(%rbp),%xmm0
subss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exponential_out>:
ucomiss %xmm1,%xmm0
jne    111b <exponential_out+0xb>
jp     111b <exponential_out+0xb>
movaps %xmm2,%xmm0
ret
push   %rax
divss  %xmm1,%xmm0
movss  0xed8(%rip),%xmm1
subss  %xmm0,%xmm1
cvttss2si %xmm1,%edi
movaps %xmm2,%xmm0
movss  %xmm2,0x4(%rsp)
call   1030 <powf@plt>
movss  0x4(%rsp),%xmm2
subss  %xmm0,%xmm2
add    $0x8,%rsp
movaps %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @exponential_out(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = load float, float* %5
%9 = fcmp oeq float %7, %8
br i1 %9, label %10, label %12
10: ; preds = %3
%11 = load float, float* %6
br label %22
12: ; preds = %3
%13 = load float, float* %6
%14 = load float, float* %6
%15 = load float, float* %4
%16 = load float, float* %5
%17 = fdiv float %15, %16
%18 = fsub float 1.000000e+00, %17
%19 = fptosi float %18 to i32
%20 = call float @powf(float %14, i32 %19)
%21 = fsub float %13, %20
br label %22
22: ; preds = %12, %10
%23 = phi float [ %11, %10 ], [ %21, %12 ]
ret float %23
}

LLVM IR (-O2):
define float @exponential_out(float %0, float %1, float %2) {
%4 = fcmp oeq float %0, %1
br i1 %4, label %11, label %5
5: ; preds = %3
%6 = fdiv float %0, %1
%7 = fsub float 1.000000e+00, %6
%8 = fptosi float %7 to i32
%9 = tail call float @powf(float %2, i32 %8)
%10 = fsub float %2, %9
br label %11
11: ; preds = %3, %5
%12 = phi float [ %10, %5 ], [ %2, %3 ]
ret float %12
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assume(int);
int main() {
  int x = 2;
  __VERIFIER_assume(x == 5);
  return x;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assume@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 2, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 5
%5 = zext i1 %4 to i32
%6 = call i32 @__VERIFIER_assume(i32 %5)
%7 = load i32, i32* %2
ret i32 %7
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @__VERIFIER_assume(i32 0)
ret i32 2
}
int do_321() { return 321; }


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

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

LLVM IR (-O0):
define i32 @do_321() {
ret i32 321
}

LLVM IR (-O2):
define i32 @do_321() {
ret i32 321
}
main() {
  int y, a, b;
  int *p, *q;
  q = &a;
  p = q;
  *p = 5;
  p = &b;
  y = *q;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x5,(%rax)
lea    -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
unsigned int BKDRHash(char *str, unsigned int mod) {
  unsigned int seed = 131;
  unsigned int hash = 0;
  while (*str) {
    hash = hash * seed + (*str++);
  }
  return (hash & 0x7FFFFFFF) % mod;
}


x86 assembly (clang, -O0):
<BKDRHash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x83,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1149 <BKDRHash+0x49>
mov    -0x14(%rbp),%eax
imul   -0x10(%rbp),%eax
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
movsbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
jmp    1119 <BKDRHash+0x19>
mov    -0x14(%rbp),%eax
and    $0x7fffffff,%eax
xor    %edx,%edx
divl   -0xc(%rbp)
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<BKDRHash>:
mov    (%rdi),%cl
test   %cl,%cl
je     112d <BKDRHash+0x2d>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
imul   $0x83,%eax,%edx
movsbl %cl,%eax
add    %edx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <BKDRHash+0x10>
and    $0x7fffffff,%eax
jmp    112f <BKDRHash+0x2f>
xor    %eax,%eax
xor    %edx,%edx
div    %esi
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @BKDRHash(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
store i32 131, i32* %5
store i32 0, i32* %6
br label %7
7: ; preds = %11, %2
%8 = load i8*, i8** %3
%9 = load i8, i8* %8
%10 = icmp ne i8 %9, 0
br i1 %10, label %11, label %20
11: ; preds = %7
%12 = load i32, i32* %6
%13 = load i32, i32* %5
%14 = mul i32 %12, %13
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i32 1
store i8* %16, i8** %3
%17 = load i8, i8* %15
%18 = sext i8 %17 to i32
%19 = add i32 %14, %18
store i32 %19, i32* %6
br label %7
20: ; preds = %7
%21 = load i32, i32* %6
%22 = and i32 %21, 2147483647
%23 = load i32, i32* %4
%24 = urem i32 %22, %23
ret i32 %24
}

LLVM IR (-O2):
define i32 @BKDRHash(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %17, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %13, %5 ], [ %3, %2 ]
%7 = phi i32 [ %12, %5 ], [ 0, %2 ]
%8 = phi i8* [ %10, %5 ], [ %0, %2 ]
%9 = mul i32 %7, 131
%10 = getelementptr inbounds i8, i8* %8, i64 1
%11 = sext i8 %6 to i32
%12 = add i32 %9, %11
%13 = load i8, i8* %10
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %5
15: ; preds = %5
%16 = and i32 %12, 2147483647
br label %17
17: ; preds = %15, %2
%18 = phi i32 [ 0, %2 ], [ %16, %15 ]
%19 = urem i32 %18, %1
ret i32 %19
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void sagetv_free2(void *p, int line) { free(p); }


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

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

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

LLVM IR (-O2):
define void @sagetv_free2(i8* nocapture %0, i32 %1) {
%3 = tail call i32 @free(i8* %0)
ret void
}
void succeed(struct test *test) {
  (void)test;
  ;
}


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

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

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

LLVM IR (-O2):
%struct.test = type opaque
define void @succeed(%struct.test* nocapture %0) {
ret void
}
/* Variables and functions */
int getopt_internal(int, char *const *, char const *, int /*<<< orphan*/ *,
                    int /*<<< orphan*/ *, int /*<<< orphan*/);
int getopt(int nargc, char *const *nargv, const char *options) {
  return (getopt_internal(nargc, nargv, options, NULL, NULL, 0));
}


x86 assembly (clang, -O0):
<getopt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
xor    %eax,%eax
mov    %eax,%r8d
xor    %r9d,%r9d
mov    %r8,%rcx
call   1030 <getopt_internal@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getopt>:
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
jmp    1030 <getopt_internal@plt>

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

LLVM IR (-O2):
define i32 @getopt(i32 %0, i8** %1, i8* %2) {
%4 = tail call i32 @getopt_internal(i32 %0, i8** %1, i8* %2, i32* null, i32* null, i32 0)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
int main(void) {
  float a = 1.5;
  float b = 2.5;
  __VERIFIER_assert(a >= b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xedd(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xecc(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
store i32 0, i32* %1
store float 1.500000e+00, float* %2
store float 2.500000e+00, float* %3
%4 = load float, float* %2
%5 = load float, float* %3
%6 = fcmp oge float %4, %5
%7 = zext i1 %6 to i32
%8 = call i32 @__VERIFIER_assert(i32 %7)
ret i32 0
}

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

/* Variables and functions */
unsigned short ehrpwm_read(int /*<<< orphan*/, int);
int ehrpwm_tb_read_status(uint8_t module, unsigned short *val) {
  *val = ehrpwm_read(module, 0x2);
  return 0;
}


x86 assembly (clang, -O0):
<ehrpwm_tb_read_status>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x2,%esi
call   1030 <ehrpwm_read@plt>
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,(%rax)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ehrpwm_tb_read_status>:
push   %rbx
mov    %rsi,%rbx
mov    $0x2,%esi
call   1030 <ehrpwm_read@plt>
mov    %ax,(%rbx)
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ehrpwm_tb_read_status(i32 %0, i16* %1) {
%3 = alloca i32
%4 = alloca i16*
store i32 %0, i32* %3
store i16* %1, i16** %4
%5 = load i32, i32* %3
%6 = call zeroext i16 @ehrpwm_read(i32 %5, i32 2)
%7 = load i16*, i16** %4
store i16 %6, i16* %7
ret i32 0
}

LLVM IR (-O2):
define i32 @ehrpwm_tb_read_status(i32 %0, i16* nocapture writeonly %1) {
%3 = tail call zeroext i16 @ehrpwm_read(i32 %0, i32 2)
store i16 %3, i16* %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ O_NONBLOCK;
int set_sock_flags(int, int /*<<< orphan*/, char *);
int unblock(int sock, char *errorstr) {
  return set_sock_flags(sock, O_NONBLOCK, errorstr);
}


x86 assembly (clang, -O0):
<unblock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ebf(%rip),%rax
mov    (%rax),%esi
mov    -0x10(%rbp),%rdx
call   1030 <set_sock_flags@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unblock>:
mov    %rsi,%rdx
mov    0x2ece(%rip),%rax
mov    (%rax),%esi
jmp    1030 <set_sock_flags@plt>

LLVM IR (-O0):
@O_NONBLOCK = global i32 0
define i32 @unblock(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* @O_NONBLOCK
%7 = load i8*, i8** %4
%8 = call i32 @set_sock_flags(i32 %5, i32 %6, i8* %7)
ret i32 %8
}

LLVM IR (-O2):
@O_NONBLOCK = global i32 0
define i32 @unblock(i32 %0, i8* %1) {
%3 = load i32, i32* @O_NONBLOCK
%4 = tail call i32 @set_sock_flags(i32 %0, i32 %3, i8* %1)
ret i32 %4
}
int dcompare(double a, double b) {
  double d = a - b;
  if (d != d)
    return a == b ? 0 : 0xAABBCCDD;
  return d == 0. ? 0 : (d > 0. ? 1 : -1);
}


x86 assembly (clang, -O0):
<dcompare>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
ucomisd -0x20(%rbp),%xmm0
jne    1138 <dcompare+0x38>
jp     1138 <dcompare+0x38>
jmp    1162 <dcompare+0x62>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
mov    $0xaabbccdd,%eax
xor    %ecx,%ecx
ucomisd %xmm1,%xmm0
setnp  %sil
sete   %dl
test   %sil,%dl
cmovne %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    11a6 <dcompare+0xa6>
movsd  -0x20(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1184 <dcompare+0x84>
jp     1184 <dcompare+0x84>
xor    %eax,%eax
mov    %eax,-0x24(%rbp)
jmp    11a0 <dcompare+0xa0>
movsd  -0x20(%rbp),%xmm0
xorps  %xmm1,%xmm1
mov    $0xffffffff,%eax
mov    $0x1,%ecx
ucomisd %xmm1,%xmm0
cmova  %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dcompare>:
movapd %xmm0,%xmm2
subsd  %xmm1,%xmm2
ucomisd %xmm2,%xmm2
jp     1128 <dcompare+0x28>
xor    %eax,%eax
xorpd  %xmm0,%xmm0
xor    %ecx,%ecx
ucomisd %xmm0,%xmm2
seta   %cl
lea    -0x1(%rcx,%rcx,1),%ecx
cmovne %ecx,%eax
cmovp  %ecx,%eax
ret
ucomisd %xmm1,%xmm0
setnp  %al
sete   %cl
xor    %edx,%edx
test   %al,%cl
mov    $0xaabbccdd,%eax
cmovne %edx,%eax
ret

LLVM IR (-O0):
define i32 @dcompare(double %0, double %1) {
%3 = alloca i32
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
%7 = load double, double* %4
%8 = load double, double* %5
%9 = fsub double %7, %8
store double %9, double* %6
%10 = load double, double* %6
%11 = load double, double* %6
%12 = fcmp une double %10, %11
br i1 %12, label %13, label %19
13: ; preds = %2
%14 = load double, double* %4
%15 = load double, double* %5
%16 = fcmp oeq double %14, %15
%17 = zext i1 %16 to i64
%18 = select i1 %16, i32 0, i32 -1430532899
store i32 %18, i32* %3
br label %30
19: ; preds = %2
%20 = load double, double* %6
%21 = fcmp oeq double %20, 0.000000e+00
br i1 %21, label %22, label %23
22: ; preds = %19
br label %28
23: ; preds = %19
%24 = load double, double* %6
%25 = fcmp ogt double %24, 0.000000e+00
%26 = zext i1 %25 to i64
%27 = select i1 %25, i32 1, i32 -1
br label %28
28: ; preds = %23, %22
%29 = phi i32 [ 0, %22 ], [ %27, %23 ]
store i32 %29, i32* %3
br label %30
30: ; preds = %28, %13
%31 = load i32, i32* %3
ret i32 %31
}

LLVM IR (-O2):
define i32 @dcompare(double %0, double %1) {
%3 = fsub double %0, %1
%4 = fcmp uno double %3, 0.000000e+00
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = fcmp oeq double %0, %1
%7 = select i1 %6, i32 0, i32 -1430532899
br label %13
8: ; preds = %2
%9 = fcmp oeq double %3, 0.000000e+00
%10 = fcmp ogt double %3, 0.000000e+00
%11 = select i1 %10, i32 1, i32 -1
%12 = select i1 %9, i32 0, i32 %11
br label %13
13: ; preds = %8, %5
%14 = phi i32 [ %7, %5 ], [ %12, %8 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void ERROR() {
  printf("Invalid Expression\n");
  exit(1);
}


x86 assembly (clang, -O0):
<ERROR>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<ERROR>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"Invalid Expression\0A\00"
define void @ERROR() {
%1 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [19 x i8] c"Invalid Expression\00"
define void @ERROR() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
void wproc_reap(int jobs, int msecs) {}


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

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

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

LLVM IR (-O2):
define void @wproc_reap(i32 %0, i32 %1) {
ret void
}
int islessequal(float f1, float f2) {
  int r = __builtin_islessequal(f1, f2);
  return !r ? -1 : 1;
}


x86 assembly (clang, -O0):
<islessequal>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
setne  %dl
xor    $0xff,%dl
mov    $0x1,%eax
mov    $0xffffffff,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<islessequal>:
xor    %eax,%eax
ucomiss %xmm0,%xmm1
setae  %al
add    %eax,%eax
add    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @islessequal(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca i32
store float %0, float* %3
store float %1, float* %4
%6 = load float, float* %3
%7 = load float, float* %4
%8 = fcmp ole float %6, %7
%9 = zext i1 %8 to i32
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = icmp ne i32 %10, 0
%12 = xor i1 %11, true
%13 = zext i1 %12 to i64
%14 = select i1 %12, i32 -1, i32 1
ret i32 %14
}

LLVM IR (-O2):
define i32 @islessequal(float %0, float %1) {
%3 = fcmp ugt float %0, %1
%4 = select i1 %3, i32 -1, i32 1
ret i32 %4
}
/* Variables and functions */
bool nrf52_errata_200(void) { return false; }


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @nrf52_errata_200() {
ret i32 0
}

LLVM IR (-O2):
define i32 @nrf52_errata_200() {
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
uint32_t VMStringLength(const char *str) {
  uint32_t Length = 0;
  while (*str) {
    str++;
    Length++;
  }
  return Length;
}


x86 assembly (clang, -O0):
<VMStringLength>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     113a <VMStringLength+0x3a>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <VMStringLength+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<VMStringLength>:
cmpb   $0x0,(%rdi)
je     111f <VMStringLength+0x1f>
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
lea    0x1(%rcx),%rax
cmpb   $0x0,0x1(%rdi,%rcx,1)
mov    %rax,%rcx
jne    1110 <VMStringLength+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @VMStringLength(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add nuw nsw i64 %5, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i64 [ 0, %1 ], [ %8, %4 ]
ret i64 %12
}
void XDisplayHeightMM() {}


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

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

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

LLVM IR (-O2):
define void @XDisplayHeightMM() {
ret void
}
/* Variables and functions */
unsigned int reg_read32(int);
int /*<<< orphan*/ reg_write32(int, unsigned int);
void pic_enablefiq(unsigned int fiq) {
  reg_write32(0x14000028, reg_read32(0x14000028) & fiq);
}


x86 assembly (clang, -O0):
<pic_enablefiq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x14000028,%edi
call   1030 <reg_read32@plt>
mov    %eax,%esi
and    -0x4(%rbp),%esi
mov    $0x14000028,%edi
call   1040 <reg_write32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pic_enablefiq>:
push   %rbx
mov    %edi,%ebx
mov    $0x14000028,%edi
call   1030 <reg_read32@plt>
and    %eax,%ebx
mov    $0x14000028,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1040 <reg_write32@plt>

LLVM IR (-O0):
define void @pic_enablefiq(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @reg_read32(i32 335544360)
%4 = load i32, i32* %2
%5 = and i32 %3, %4
%6 = call i32 @reg_write32(i32 335544360, i32 %5)
ret void
}

LLVM IR (-O2):
define void @pic_enablefiq(i32 %0) {
%2 = tail call i32 @reg_read32(i32 335544360)
%3 = and i32 %2, %0
%4 = tail call i32 @reg_write32(i32 335544360, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sla_cldj_(int *, int *, int *, double *, int *);
void slaCldj(int iy, int im, int id, double *djm, int *j) {
  sla_cldj_(&iy, &im, &id, djm, j);
}


x86 assembly (clang, -O0):
<slaCldj>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
lea    -0x4(%rbp),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1030 <sla_cldj_@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<slaCldj>:
sub    $0x18,%rsp
mov    %edi,0x14(%rsp)
mov    %esi,0x10(%rsp)
mov    %edx,0xc(%rsp)
lea    0x14(%rsp),%rdi
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
call   1030 <sla_cldj_@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @slaCldj(i32 %0, i32 %1, i32 %2, double* %3, i32* %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca double*
%10 = alloca i32*
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store double* %3, double** %9
store i32* %4, i32** %10
%11 = load double*, double** %9
%12 = load i32*, i32** %10
%13 = call i32 @sla_cldj_(i32* %6, i32* %7, i32* %8, double* %11, i32* %12)
ret void
}

LLVM IR (-O2):
define void @slaCldj(i32 %0, i32 %1, i32 %2, double* %3, i32* %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
%9 = call i32 @sla_cldj_(i32* %6, i32* %7, i32* %8, double* %3, i32* %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;
typedef int /*<<< orphan*/ char32_t;

/* Variables and functions */
int /*<<< orphan*/ fc_lcsubstr_extract(int /*<<< orphan*/ const *,
                                       int /*<<< orphan*/,
                                       int /*<<< orphan*/ const *,
                                       int /*<<< orphan*/,
                                       int /*<<< orphan*/ *);
int32_t fc_lcsubstr(const char32_t *seq1, int32_t len1, const char32_t *seq2,
                    int32_t len2) {
  return fc_lcsubstr_extract(seq1, len1, seq2, len2, NULL);
}


x86 assembly (clang, -O0):
<fc_lcsubstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
xor    %eax,%eax
mov    %eax,%r8d
call   1030 <fc_lcsubstr_extract@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fc_lcsubstr>:
xor    %r8d,%r8d
jmp    1030 <fc_lcsubstr_extract@plt>

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

LLVM IR (-O2):
define i32 @fc_lcsubstr(i32* %0, i32 %1, i32* %2, i32 %3) {
%5 = tail call i32 @fc_lcsubstr_extract(i32* %0, i32 %1, i32* %2, i32 %3, i32* null)
ret i32 %5
}
const char *scs_version(void) { return ("1.1.8"); }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"1.1.8\00"
define i8* @scs_version() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
int is_lwcse(const char c) {
  if (c >= 'a' && c <= 'z')
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<is_lwcse>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jl     1130 <is_lwcse+0x30>
movsbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
jg     1130 <is_lwcse+0x30>
movl   $0x1,-0x4(%rbp)
jmp    1137 <is_lwcse+0x37>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_lwcse>:
add    $0x9f,%dil
xor    %eax,%eax
cmp    $0x1a,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @is_lwcse(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 97
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 122
br i1 %10, label %11, label %12
11: ; preds = %7
store i32 1, i32* %2
br label %13
12: ; preds = %7, %1
store i32 0, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @is_lwcse(i8 signext %0) {
%2 = add i8 %0, -97
%3 = icmp ult i8 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
void donothing(void) {}


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

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

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

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