xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int XStoreColors() {
  printf("XStoreColors called\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [20 x i8] c"XStoreColors called\00"
define i32 @XStoreColors() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret i32 0
}
unsigned long foo(int y) {
  unsigned long x;
  return y ? x : (void *)0;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     111e <foo+0x1e>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1129 <foo+0x29>
xor    %eax,%eax
mov    %rax,-0x18(%rbp)
jmp    1129 <foo+0x29>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i64 @foo(i32 %0) {
ret i64 0
}
/* Variables and functions */
int atoi(char *);
int ctoi(char c) {
  char tmp[2];
  tmp[1] = 0;
  tmp[0] = c;
  return atoi(tmp);
}


x86 assembly (clang, -O0):
<ctoi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movb   $0x0,-0x2(%rbp)
mov    -0x1(%rbp),%al
mov    %al,-0x3(%rbp)
lea    -0x3(%rbp),%rdi
call   1030 <atoi@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ctoi>:
push   %rax
movb   $0x0,0x7(%rsp)
mov    %dil,0x6(%rsp)
lea    0x6(%rsp),%rdi
call   1030 <atoi@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @ctoi(i8 signext %0) {
%2 = alloca i8
%3 = alloca [2 x i8]
store i8 %0, i8* %2
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 1
store i8 0, i8* %4
%5 = load i8, i8* %2
%6 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
store i8 %5, i8* %6
%7 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%8 = call i32 @atoi(i8* %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @ctoi(i8 signext %0) {
%2 = alloca [2 x i8]
%3 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 0
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 1
store i8 0, i8* %4
store i8 %0, i8* %3
%5 = call i32 @atoi(i8* %3)
ret i32 %5
}
void ne_http_auth_stage(struct SessionHandle *data, int stage) {}


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

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

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

LLVM IR (-O2):
%struct.SessionHandle = type opaque
define void @ne_http_auth_stage(%struct.SessionHandle* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void test(int *testp, int size) {
  for (int i = 0; i < size; i++)
    printf("%d, ", testp[i]);
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1157 <test+0x47>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <test+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1145 <test+0x35>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <test+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%d, \00"
define void @test(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %7
6: ; preds = %7, %2
ret void
7: ; preds = %4, %7
%8 = phi i64 [ 0, %4 ], [ %12, %7 ]
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = load i32, i32* %9
%11 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = add nuw nsw i64 %8, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %6, label %7
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void _mcp_free(void *ptr) {
  ;
  free(ptr);
}


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

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

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

LLVM IR (-O2):
define void @_mcp_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
int gpmScreenHandler_getPointer(int *column, int *row) {
  int ok = 0;
  return ok;
}


x86 assembly (clang, -O0):
<gpmScreenHandler_getPointer>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @gpmScreenHandler_getPointer(i32* nocapture readnone %0, i32* nocapture readnone %1) {
ret i32 0
}
int test_imm_F9int32_mem(int *val) {
  return ((*val) & (0xF9 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_F9int32_mem(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 249
%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_F9int32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 249
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
struct TFunction {
  int dummy;
};

/* Variables and functions */
struct TFunction *FindFunctionOpcode(int iOpcode) {
  return NULL;
}


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

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

LLVM IR (-O0):
%struct.TFunction = type { i32 }
define %struct.TFunction* @FindFunctionOpcode(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret %struct.TFunction* null
}

LLVM IR (-O2):
%struct.TFunction = type { i32 }
define noalias %struct.TFunction* @FindFunctionOpcode(i32 %0) {
ret %struct.TFunction* null
}
/* Variables and functions */
scalar_t__ __cc_db_smaller(double const *, double const *, double const *);
int __cc_db_in_range_c_o(const double rd, const double small,
                         const double large, const double res) {
  return !__cc_db_smaller(&rd, &small, &res) &&
         __cc_db_smaller(&rd, &large, &res);
}


x86 assembly (clang, -O0):
<__cc_db_in_range_c_o>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
lea    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x20(%rbp),%rdx
call   1030 <__cc_db_smaller@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x21(%rbp)
jne    116a <__cc_db_in_range_c_o+0x5a>
lea    -0x8(%rbp),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdx
call   1030 <__cc_db_smaller@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__cc_db_in_range_c_o>:
sub    $0x28,%rsp
movsd  %xmm0,0x10(%rsp)
movsd  %xmm1,0x20(%rsp)
movsd  %xmm2,0x18(%rsp)
movsd  %xmm3,0x8(%rsp)
lea    0x10(%rsp),%rdi
lea    0x20(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1030 <__cc_db_smaller@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     114f <__cc_db_in_range_c_o+0x3f>
add    $0x28,%rsp
ret
lea    0x10(%rsp),%rdi
lea    0x18(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1030 <__cc_db_smaller@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
add    $0x28,%rsp
ret

LLVM IR (-O0):
define i32 @__cc_db_in_range_c_o(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = call i64 @__cc_db_smaller(double* %5, double* %6, double* %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %14, label %11
11: ; preds = %4
%12 = call i64 @__cc_db_smaller(double* %5, double* %7, double* %8)
%13 = icmp ne i64 %12, 0
br label %14
14: ; preds = %11, %4
%15 = phi i1 [ false, %4 ], [ %13, %11 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @__cc_db_in_range_c_o(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = call i64 @__cc_db_smaller(double* %5, double* %6, double* %8)
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %4
%12 = call i64 @__cc_db_smaller(double* %5, double* %7, double* %8)
%13 = icmp ne i64 %12, 0
%14 = zext i1 %13 to i32
br label %15
15: ; preds = %11, %4
%16 = phi i32 [ 0, %4 ], [ %14, %11 ]
ret i32 %16
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fwrite(char *, int, int, int /*<<< orphan*/ *);
void checkbuffer(char *buf, int *idx, int max, FILE *f) {
  int n = *idx;
  if (n >= max) {
    fwrite(buf, 1, n, f);
    *idx = 0;
  }
}


x86 assembly (clang, -O0):
<checkbuffer>:
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    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x14(%rbp),%eax
jl     115b <checkbuffer+0x4b>
mov    -0x8(%rbp),%rdi
mov    -0x24(%rbp),%edx
mov    -0x20(%rbp),%rcx
mov    $0x1,%esi
call   1030 <fwrite@plt>
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkbuffer>:
push   %rbx
mov    %edx,%eax
mov    (%rsi),%edx
cmp    %eax,%edx
jl     112c <checkbuffer+0x1c>
mov    %rsi,%rbx
mov    $0x1,%esi
call   1030 <fwrite@plt>
movl   $0x0,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @checkbuffer(i8* nocapture %0, i32* nocapture %1, i32 %2, i32* nocapture %3) {
%5 = load i32, i32* %1
%6 = icmp slt i32 %5, %2
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = tail call i32 @fwrite(i8* %0, i32 1, i32 %5, i32* %3)
store i32 0, i32* %1
br label %9
9: ; preds = %7, %4
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ __hsail_firstbit_u64(int /*<<< orphan*/);
uint32_t __hsail_firstbit_s64(int64_t src0) {
  uint64_t converted = src0 >= 0 ? src0 : ~src0;
  return __hsail_firstbit_u64(converted);
}


x86 assembly (clang, -O0):
<__hsail_firstbit_s64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     1130 <__hsail_firstbit_s64+0x20>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1139 <__hsail_firstbit_s64+0x29>
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <__hsail_firstbit_u64@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__hsail_firstbit_s64>:
mov    %edi,%eax
sar    $0x1f,%eax
xor    %eax,%edi
jmp    1030 <__hsail_firstbit_u64@plt>

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

LLVM IR (-O2):
define i32 @__hsail_firstbit_s64(i32 %0) {
%2 = ashr i32 %0, 31
%3 = xor i32 %2, %0
%4 = tail call i32 @__hsail_firstbit_u64(i32 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void style_property_free_iter(void *prop, void *_) { free(prop); }


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

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

LLVM IR (-O0):
define void @style_property_free_iter(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 @free(i8* %5)
ret void
}

LLVM IR (-O2):
define void @style_property_free_iter(i8* nocapture %0, i8* nocapture readnone %1) {
%3 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int i2c_close(int fd) {
  if (fd > 0) {
    close(fd);
  }
  return 0;
}


x86 assembly (clang, -O0):
<i2c_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    112d <i2c_close+0x1d>
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2c_close>:
test   %edi,%edi
jle    111e <i2c_close+0xe>
push   %rax
call   1030 <close@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @i2c_close(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @close(i32 %0)
br label %5
5: ; preds = %3, %1
ret i32 0
}
/* Type definitions */
struct blk_mq_ctx {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ put_cpu_light();
void blk_mq_put_ctx(struct blk_mq_ctx *ctx) { put_cpu_light(); }


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

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

LLVM IR (-O0):
%struct.blk_mq_ctx = type { i32 }
define void @blk_mq_put_ctx(%struct.blk_mq_ctx* %0) {
%2 = alloca %struct.blk_mq_ctx*
store %struct.blk_mq_ctx* %0, %struct.blk_mq_ctx** %2
%3 = call i32 (...) @put_cpu_light()
ret void
}

LLVM IR (-O2):
%struct.blk_mq_ctx = type { i32 }
define void @blk_mq_put_ctx(%struct.blk_mq_ctx* nocapture readnone %0) {
%2 = tail call i32 (...) @put_cpu_light()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Sieve(int);
int /*<<< orphan*/ printf(char *);
int main() {
  int n = 40;
  printf("Following are the prime numbers smaller than or equal to n \n");
  Sieve(n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x28,-0x8(%rbp)
lea    0xec3(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%edi
call   1030 <Sieve@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <puts@plt>
mov    $0x28,%edi
call   1030 <Sieve@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [61 x i8] c"Following are the prime numbers smaller than or equal to n \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 40, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = call i32 @Sieve(i32 %4)
ret i32 0
}

LLVM IR (-O2):
@str = [60 x i8] c"Following are the prime numbers smaller than or equal to n \00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @Sieve(i32 40)
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
void CANEnable(uint32_t ui32Base) {
  ;
  (*((volatile unsigned long *)(ui32Base + 0x00000000))) &= ~0x00000001;
}


x86 assembly (clang, -O0):
<CANEnable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
and    $0xfffffffffffffffe,%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<CANEnable>:
andq   $0xfffffffffffffffe,(%rdi)
ret

LLVM IR (-O0):
define void @CANEnable(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add nsw i64 %3, 0
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = and i64 %6, -2
store volatile i64 %7, i64* %5
ret void
}

LLVM IR (-O2):
define void @CANEnable(i64 %0) {
%2 = inttoptr i64 %0 to i64*
%3 = load volatile i64, i64* %2
%4 = and i64 %3, -2
store volatile i64 %4, i64* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exynos_5410_gpio_write_mask(unsigned int, unsigned int,
                                               unsigned int);
void odroid_xu_gpio_write_14(unsigned int data) {
  unsigned int bank_offset = 0x0C40;
  unsigned int bit_index = 3;
  exynos_5410_gpio_write_mask(bank_offset, ((data & 1U) << bit_index),
                              (1U << bit_index));
}


x86 assembly (clang, -O0):
<odroid_xu_gpio_write_14>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0xc40,-0x8(%rbp)
movl   $0x3,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
and    $0x1,%esi
mov    -0xc(%rbp),%ecx
shl    %cl,%esi
mov    -0xc(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
call   1030 <exynos_5410_gpio_write_mask@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<odroid_xu_gpio_write_14>:
lea    0x0(,%rdi,8),%esi
and    $0x8,%esi
mov    $0xc40,%edi
mov    $0x8,%edx
jmp    1030 <exynos_5410_gpio_write_mask@plt>

LLVM IR (-O0):
define void @odroid_xu_gpio_write_14(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 3136, i32* %3
store i32 3, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = and i32 %6, 1
%8 = load i32, i32* %4
%9 = shl i32 %7, %8
%10 = load i32, i32* %4
%11 = shl i32 1, %10
%12 = call i32 @exynos_5410_gpio_write_mask(i32 %5, i32 %9, i32 %11)
ret void
}

LLVM IR (-O2):
define void @odroid_xu_gpio_write_14(i32 %0) {
%2 = shl i32 %0, 3
%3 = and i32 %2, 8
%4 = tail call i32 @exynos_5410_gpio_write_mask(i32 3136, i32 %3, i32 8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exec(char **);
void skip() {
  char *s[3] = {"mmusicd", "skip", NULL};
  exec(s);
}


x86 assembly (clang, -O0):
<skip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x2ce1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2cde(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0x2cdb(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
call   1030 <exec@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip>:
sub    $0x18,%rsp
mov    0x2cf5(%rip),%rax
mov    %rax,0x10(%rsp)
movaps 0x2cd9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
call   1030 <exec@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"mmusicd\00"
@.str.1 = [5 x i8] c"skip\00"
@__const.skip.s = [3 x i8*] [i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i32 0, i32 0), i8* null]
define void @skip() {
%1 = alloca [3 x i8*]
%2 = bitcast [3 x i8*]* %1 to i8*
%3 = getelementptr inbounds [3 x i8*], [3 x i8*]* %1, i64 0, i64 0
%4 = call i32 @exec(i8** %3)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"mmusicd\00"
@.str.1 = [5 x i8] c"skip\00"
@__const.skip.s = [3 x i8*] [i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i32 0, i32 0), i8* null]
define void @skip() {
%1 = alloca [3 x i8*]
%2 = bitcast [3 x i8*]* %1 to i8*
%3 = getelementptr inbounds [3 x i8*], [3 x i8*]* %1, i64 0, i64 0
%4 = call i32 @exec(i8** %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ exit(int);
unsigned long i2c_smbus_read_word_data(int, unsigned char);
unsigned short bmp180_read_16bit(int fd, unsigned char address) {
  unsigned long res = i2c_smbus_read_word_data(fd, address);
  if (res < 0) {
    close(fd);
    exit(1);
  }
  res = ((res << 8) & 0xFF00) | ((res >> 8) & 0xFF);
  return res;
}


x86 assembly (clang, -O0):
<bmp180_read_16bit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%edi
movzbl -0x5(%rbp),%esi
call   1040 <i2c_smbus_read_word_data@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jae    116e <bmp180_read_16bit+0x3e>
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
shl    $0x8,%rax
and    $0xff00,%rax
mov    -0x10(%rbp),%rcx
shr    $0x8,%rcx
and    $0xff,%rcx
or     %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzwl %ax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bmp180_read_16bit>:
push   %rax
call   1030 <i2c_smbus_read_word_data@plt>
rol    $0x8,%ax
pop    %rcx
ret

LLVM IR (-O0):
define zeroext i16 @bmp180_read_16bit(i32 %0, i8 zeroext %1) {
%3 = alloca i32
%4 = alloca i8
%5 = alloca i64
store i32 %0, i32* %3
store i8 %1, i8* %4
%6 = load i32, i32* %3
%7 = load i8, i8* %4
%8 = call i64 @i2c_smbus_read_word_data(i32 %6, i8 zeroext %7)
store i64 %8, i64* %5
%9 = load i64, i64* %5
%10 = icmp ult i64 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %2
%12 = load i32, i32* %3
%13 = call i32 @close(i32 %12)
%14 = call i32 @exit(i32 1)
unreachable
15: ; preds = %2
%16 = load i64, i64* %5
%17 = shl i64 %16, 8
%18 = and i64 %17, 65280
%19 = load i64, i64* %5
%20 = lshr i64 %19, 8
%21 = and i64 %20, 255
%22 = or i64 %18, %21
store i64 %22, i64* %5
%23 = load i64, i64* %5
%24 = trunc i64 %23 to i16
ret i16 %24
}

LLVM IR (-O2):
define zeroext i16 @bmp180_read_16bit(i32 %0, i8 zeroext %1) {
%3 = tail call i64 @i2c_smbus_read_word_data(i32 %0, i8 zeroext %1)
%4 = trunc i64 %3 to i16
%5 = tail call i16 @llvm.bswap.i16(i16 %4)
ret i16 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void MG_update_mu(double mu_tmLQCD, double odd_tmLQCD) {
  printf("ERROR: MG_update_mu called but DDalphaAMG library not included.\n");
  exit(1);
}


x86 assembly (clang, -O0):
<MG_update_mu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [65 x i8] c"ERROR: MG_update_mu called but DDalphaAMG library not included.\0A\00"
define void @MG_update_mu(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = call i32 @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [64 x i8] c"ERROR: MG_update_mu called but DDalphaAMG library not included.\00"
define void @MG_update_mu(double %0, double %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int GetSlewStatus();
int /*<<< orphan*/ StopSlew(int);
int /*<<< orphan*/ StopTrack();
int /*<<< orphan*/ usleep(int);
void FullStop(void) {
  if (GetSlewStatus() == 1) {
    StopSlew(1);
    usleep(250000.);
    StopSlew(2);
    usleep(250000.);
    StopSlew(4);
    usleep(250000.);
    StopSlew(8);
    usleep(250000.);
  }
  StopTrack();
}


x86 assembly (clang, -O0):
<FullStop>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <GetSlewStatus@plt>
cmp    $0x1,%eax
jne    11a4 <FullStop+0x64>
mov    $0x1,%edi
call   1040 <StopSlew@plt>
mov    $0x3d090,%edi
call   1060 <usleep@plt>
mov    $0x2,%edi
call   1040 <StopSlew@plt>
mov    $0x3d090,%edi
call   1060 <usleep@plt>
mov    $0x4,%edi
call   1040 <StopSlew@plt>
mov    $0x3d090,%edi
call   1060 <usleep@plt>
mov    $0x8,%edi
call   1040 <StopSlew@plt>
mov    $0x3d090,%edi
call   1060 <usleep@plt>
mov    $0x0,%al
call   1050 <StopTrack@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<FullStop>:
push   %rax
xor    %eax,%eax
call   1030 <GetSlewStatus@plt>
cmp    $0x1,%eax
jne    119d <FullStop+0x5d>
mov    $0x1,%edi
call   1040 <StopSlew@plt>
mov    $0x3d090,%edi
call   1060 <usleep@plt>
mov    $0x2,%edi
call   1040 <StopSlew@plt>
mov    $0x3d090,%edi
call   1060 <usleep@plt>
mov    $0x4,%edi
call   1040 <StopSlew@plt>
mov    $0x3d090,%edi
call   1060 <usleep@plt>
mov    $0x8,%edi
call   1040 <StopSlew@plt>
mov    $0x3d090,%edi
call   1060 <usleep@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <StopTrack@plt>

LLVM IR (-O0):
define void @FullStop() {
%1 = call i32 (...) @GetSlewStatus()
%2 = icmp eq i32 %1, 1
br i1 %2, label %3, label %12
3: ; preds = %0
%4 = call i32 @StopSlew(i32 1)
%5 = call i32 @usleep(i32 250000)
%6 = call i32 @StopSlew(i32 2)
%7 = call i32 @usleep(i32 250000)
%8 = call i32 @StopSlew(i32 4)
%9 = call i32 @usleep(i32 250000)
%10 = call i32 @StopSlew(i32 8)
%11 = call i32 @usleep(i32 250000)
br label %12
12: ; preds = %3, %0
%13 = call i32 (...) @StopTrack()
ret void
}

LLVM IR (-O2):
define void @FullStop() {
%1 = tail call i32 (...) @GetSlewStatus()
%2 = icmp eq i32 %1, 1
br i1 %2, label %3, label %12
3: ; preds = %0
%4 = tail call i32 @StopSlew(i32 1)
%5 = tail call i32 @usleep(i32 250000)
%6 = tail call i32 @StopSlew(i32 2)
%7 = tail call i32 @usleep(i32 250000)
%8 = tail call i32 @StopSlew(i32 4)
%9 = tail call i32 @usleep(i32 250000)
%10 = tail call i32 @StopSlew(i32 8)
%11 = tail call i32 @usleep(i32 250000)
br label %12
12: ; preds = %3, %0
%13 = tail call i32 (...) @StopTrack()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fputs_callee(char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
main() {
  printf("Hello, world(1)\n");
  fputs_callee("Hello, world(2)\n", stdout);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%esi
lea    0xed1(%rip),%rdi
call   1040 <fputs_callee@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee9(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%esi
lea    0xec3(%rip),%rdi
call   1040 <fputs_callee@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Hello, world(1)\0A\00"
@.str.1 = [17 x i8] c"Hello, world(2)\0A\00"
@stdout = global i32 0
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = call i32 @fputs_callee(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [17 x i8] c"Hello, world(2)\0A\00"
@stdout = global i32 0
@str = [16 x i8] c"Hello, world(1)\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = tail call i32 @fputs_callee(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %2)
ret i32 0
}
int test_imm_8Eint16_reg(short val) {
  return ((val) & (0x8E << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_8Eint16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, 142
%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_8Eint16_reg(i16 signext %0) {
%2 = and i16 %0, 142
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
void gamma_dummy_print_help(FILE *f) {
  fputs("Does not affect the display but prints the color temperature to the "
        "terminal.\n",
        f);
  fputs("\n", f);
}


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

x86 assembly (clang, -O2):
<gamma_dummy_print_help>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
mov    $0x4e,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <fputc@plt>

LLVM IR (-O0):
@.str = [79 x i8] c"Does not affect the display but prints the color temperature to the terminal.\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @gamma_dummy_print_help(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fputs(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0), i32* %3)
%5 = load i32*, i32** %2
%6 = call i32 @fputs(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32* %5)
ret void
}

LLVM IR (-O2):
@.str = [79 x i8] c"Does not affect the display but prints the color temperature to the terminal.\0A\00"
define void @gamma_dummy_print_help(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0), i64 78, i64 1, i32* %0)
%3 = tail call i32 @fputc(i32 10, i32* %0)
ret void
}
/* Variables and functions */
float sla_rverot_(float *, float *, float *, float *);
float slaRverot(float phi, float ra, float dec, float st) {
  float PHI;
  float RA;
  float DEC;
  float ST;
  float result;
  PHI = phi;
  RA = ra;
  DEC = dec;
  ST = st;
  result = sla_rverot_(&PHI, &RA, &DEC, &ST);
  return result;
}


x86 assembly (clang, -O0):
<slaRverot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x20(%rbp)
lea    -0x14(%rbp),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x1c(%rbp),%rdx
lea    -0x20(%rbp),%rcx
call   1030 <sla_rverot_@plt>
movss  %xmm0,-0x24(%rbp)
movss  -0x24(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<slaRverot>:
sub    $0x18,%rsp
movss  %xmm0,0x14(%rsp)
movss  %xmm1,0x10(%rsp)
movss  %xmm2,0xc(%rsp)
movss  %xmm3,0x8(%rsp)
lea    0x14(%rsp),%rdi
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
lea    0x8(%rsp),%rcx
call   1030 <sla_rverot_@plt>
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define float @slaRverot(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = bitcast float* %5 to i8*
%10 = bitcast float* %6 to i8*
%11 = bitcast float* %7 to i8*
%12 = bitcast float* %8 to i8*
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%13 = call float @sla_rverot_(float* %5, float* %6, float* %7, float* %8)
ret float %13
}
/* Variables and functions */
int bar();
int omp_get_num_threads();
int omp_get_thread_num();
int /*<<< orphan*/ printf(char *, int, int);
void f6(void) {
  int i;
#pragma omp parallel
  {
    int bb = bar();
#pragma omp for schedule(runtime)
    for (i = 0; i < 10000; i++)
      printf("section1 %d/%d\n", omp_get_thread_num(), omp_get_num_threads());
  }
}


x86 assembly (clang, -O0):
<f6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <bar@plt>
mov    %eax,-0x8(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0x2710,-0x4(%rbp)
jge    1196 <f6+0x56>
mov    $0x0,%al
call   1030 <omp_get_thread_num@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1060 <omp_get_num_threads@plt>
mov    -0xc(%rbp),%esi
mov    %eax,%edx
lea    0xe7d(%rip),%rdi
call   1050 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1159 <f6+0x19>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f6>:
push   %rbp
push   %r14
push   %rbx
xor    %eax,%eax
call   1040 <bar@plt>
mov    $0x2710,%ebx
lea    0xea9(%rip),%r14
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <omp_get_thread_num@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1060 <omp_get_num_threads@plt>
mov    %r14,%rdi
mov    %ebp,%esi
mov    %eax,%edx
call   1050 <printf@plt>
add    $0xffffffff,%ebx
jne    1160 <f6+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [16 x i8] c"section1 %d/%d\0A\00"
define void @f6() {
%1 = tail call i32 (...) @bar()
br label %2
2: ; preds = %0, %2
%3 = phi i32 [ 0, %0 ], [ %7, %2 ]
%4 = tail call i32 (...) @omp_get_thread_num()
%5 = tail call i32 (...) @omp_get_num_threads()
%6 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %5)
%7 = add nuw nsw i32 %3, 1
%8 = icmp eq i32 %7, 10000
br i1 %8, label %9, label %2
9: ; preds = %2
ret void
}
double min_wrapper(double *arg_list) {
  if (arg_list[0] > arg_list[1])
    return arg_list[1];
  return arg_list[0];
}


x86 assembly (clang, -O0):
<min_wrapper>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
ucomisd 0x8(%rax),%xmm0
jbe    1132 <min_wrapper+0x32>
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    113f <min_wrapper+0x3f>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<min_wrapper>:
movsd  0x8(%rdi),%xmm0
minsd  (%rdi),%xmm0
ret

LLVM IR (-O0):
define double @min_wrapper(double* %0) {
%2 = alloca double
%3 = alloca double*
store double* %0, double** %3
%4 = load double*, double** %3
%5 = getelementptr inbounds double, double* %4, i64 0
%6 = load double, double* %5
%7 = load double*, double** %3
%8 = getelementptr inbounds double, double* %7, i64 1
%9 = load double, double* %8
%10 = fcmp ogt double %6, %9
br i1 %10, label %11, label %15
11: ; preds = %1
%12 = load double*, double** %3
%13 = getelementptr inbounds double, double* %12, i64 1
%14 = load double, double* %13
store double %14, double* %2
br label %19
15: ; preds = %1
%16 = load double*, double** %3
%17 = getelementptr inbounds double, double* %16, i64 0
%18 = load double, double* %17
store double %18, double* %2
br label %19
19: ; preds = %15, %11
%20 = load double, double* %2
ret double %20
}

LLVM IR (-O2):
define double @min_wrapper(double* nocapture %0) {
%2 = load double, double* %0
%3 = getelementptr inbounds double, double* %0, i64 1
%4 = load double, double* %3
%5 = fcmp ogt double %2, %4
%6 = select i1 %5, double %4, double %2
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ my_rev_params(int, char **);
int main(int argc, char *argv[]) {
  my_rev_params(argc, argv);
  return (0);
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @my_rev_params(i32 %0, i8** %1)
ret i32 0
}
/* Type definitions */
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ socklen_t;

/* Variables and functions */
int EAI_SYSTEM;
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int getnameinfo(const struct sockaddr *sa, socklen_t salen, char *host,
                socklen_t hostlen, char *serv, socklen_t servlen, int flags) {
  errno = ENOSYS;
  return EAI_SYSTEM;
}


x86 assembly (clang, -O0):
<getnameinfo>:
push   %rbp
mov    %rsp,%rbp
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
mov    0x2ec4(%rip),%rax
mov    (%rax),%ecx
mov    0x2ea3(%rip),%rax
mov    %ecx,(%rax)
mov    0x2eaa(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getnameinfo>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec0(%rip),%rcx
mov    %eax,(%rcx)
mov    0x2ec7(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
@EAI_SYSTEM = global i32 0
define i32 @getnameinfo(%struct.sockaddr* %0, i32 %1, i8* %2, i32 %3, i8* %4, i32 %5, i32 %6) {
%8 = alloca %struct.sockaddr*
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i32
%14 = alloca i32
store %struct.sockaddr* %0, %struct.sockaddr** %8
store i32 %1, i32* %9
store i8* %2, i8** %10
store i32 %3, i32* %11
store i8* %4, i8** %12
store i32 %5, i32* %13
store i32 %6, i32* %14
%15 = load i32, i32* @ENOSYS
store i32 %15, i32* @errno
%16 = load i32, i32* @EAI_SYSTEM
ret i32 %16
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
@EAI_SYSTEM = global i32 0
define i32 @getnameinfo(%struct.sockaddr* nocapture readnone %0, i32 %1, i8* nocapture readnone %2, i32 %3, i8* nocapture readnone %4, i32 %5, i32 %6) {
%8 = load i32, i32* @ENOSYS
store i32 %8, i32* @errno
%9 = load i32, i32* @EAI_SYSTEM
ret i32 %9
}
/* Variables and functions */
char toupper(char);
void strupr(char *in) {
  for (; *in = toupper(*in); in++)
    ;
}


x86 assembly (clang, -O0):
<strupr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <toupper@plt>
mov    -0x8(%rbp),%rcx
mov    %al,(%rcx)
cmp    $0x0,%al
je     114c <strupr+0x3c>
jmp    113b <strupr+0x2b>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <strupr+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strupr>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl (%rbx),%edi
call   1030 <toupper@plt>
mov    %al,(%rbx)
add    $0x1,%rbx
test   %al,%al
jne    1120 <strupr+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @strupr(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = tail call signext i8 @toupper(i8 signext %4)
store i8 %5, i8* %3
%6 = icmp eq i8 %5, 0
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret void
}
void f60(void) {
  ({
    ({ 0; });
    ({
      goto a;
    a:
      0;
    });
    0;
  });
  ({
    ({ 0; });
    ({ 0; });
    0;
  });
  0;
}


x86 assembly (clang, -O0):
<f60>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @f60() {
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t softfloat_shortShift32Right1Jam(uint32_t a) {
  return a >> 1 | (a & 1);
}


x86 assembly (clang, -O0):
<softfloat_shortShift32Right1Jam>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    -0x4(%rbp),%ecx
and    $0x1,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<softfloat_shortShift32Right1Jam>:
mov    %edi,%eax
sar    %eax
and    $0x1,%edi
or     %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @softfloat_shortShift32Right1Jam(i32 %0) {
%2 = ashr i32 %0, 1
%3 = and i32 %0, 1
%4 = or i32 %2, %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ rdns_process_read(int, void *);
void rdns_libevent_read_event(int fd, short what, void *ud) {
  rdns_process_read(fd, ud);
}


x86 assembly (clang, -O0):
<rdns_libevent_read_event>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %edi,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <rdns_process_read@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rdns_libevent_read_event>:
mov    %rdx,%rsi
jmp    1030 <rdns_process_read@plt>

LLVM IR (-O0):
define void @rdns_libevent_read_event(i32 %0, i16 signext %1, i8* %2) {
%4 = alloca i32
%5 = alloca i16
%6 = alloca i8*
store i32 %0, i32* %4
store i16 %1, i16* %5
store i8* %2, i8** %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %6
%9 = call i32 @rdns_process_read(i32 %7, i8* %8)
ret void
}

LLVM IR (-O2):
define void @rdns_libevent_read_event(i32 %0, i16 signext %1, i8* %2) {
%4 = tail call i32 @rdns_process_read(i32 %0, i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMR7B_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_WMR7B_swap>:
jmp    1030 <U_WMRNOTIMPLEMENTED_swap@plt>

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

LLVM IR (-O2):
define void @U_WMR7B_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}