xunge/DecIR huggingface dataset:
unsigned int bitreverse(unsigned int x) {
  x = ((x >> 16) & 0x0000ffff) | ((x << 16) & 0xffff0000);
  x = ((x >> 8) & 0x00ff00ff) | ((x << 8) & 0xff00ff00);
  x = ((x >> 4) & 0x0f0f0f0f) | ((x << 4) & 0xf0f0f0f0);
  x = ((x >> 2) & 0x33333333) | ((x << 2) & 0xcccccccc);
  return ((x >> 1) & 0x55555555) | ((x << 1) & 0xaaaaaaaa);
}


x86 assembly (clang, -O0):
<bitreverse>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x10,%eax
and    $0xffff,%eax
mov    -0x4(%rbp),%ecx
shl    $0x10,%ecx
and    $0xffff0000,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x8,%eax
and    $0xff00ff,%eax
mov    -0x4(%rbp),%ecx
shl    $0x8,%ecx
and    $0xff00ff00,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x4,%eax
and    $0xf0f0f0f,%eax
mov    -0x4(%rbp),%ecx
shl    $0x4,%ecx
and    $0xf0f0f0f0,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x2,%eax
and    $0x33333333,%eax
mov    -0x4(%rbp),%ecx
shl    $0x2,%ecx
and    $0xcccccccc,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
and    $0x55555555,%eax
mov    -0x4(%rbp),%ecx
shl    $0x1,%ecx
and    $0xaaaaaaaa,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitreverse>:
bswap  %edi
mov    %edi,%eax
and    $0xf0f0f0f,%eax
shl    $0x4,%eax
shr    $0x4,%edi
and    $0xf0f0f0f,%edi
or     %eax,%edi
mov    %edi,%eax
and    $0x33333333,%eax
shr    $0x2,%edi
and    $0x33333333,%edi
lea    (%rdi,%rax,4),%eax
mov    %eax,%ecx
and    $0x55555555,%ecx
shr    %eax
and    $0x55555555,%eax
lea    (%rax,%rcx,2),%eax
ret

LLVM IR (-O0):
define i32 @bitreverse(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = lshr i32 %3, 16
%5 = and i32 %4, 65535
%6 = load i32, i32* %2
%7 = shl i32 %6, 16
%8 = and i32 %7, -65536
%9 = or i32 %5, %8
store i32 %9, i32* %2
%10 = load i32, i32* %2
%11 = lshr i32 %10, 8
%12 = and i32 %11, 16711935
%13 = load i32, i32* %2
%14 = shl i32 %13, 8
%15 = and i32 %14, -16711936
%16 = or i32 %12, %15
store i32 %16, i32* %2
%17 = load i32, i32* %2
%18 = lshr i32 %17, 4
%19 = and i32 %18, 252645135
%20 = load i32, i32* %2
%21 = shl i32 %20, 4
%22 = and i32 %21, -252645136
%23 = or i32 %19, %22
store i32 %23, i32* %2
%24 = load i32, i32* %2
%25 = lshr i32 %24, 2
%26 = and i32 %25, 858993459
%27 = load i32, i32* %2
%28 = shl i32 %27, 2
%29 = and i32 %28, -858993460
%30 = or i32 %26, %29
store i32 %30, i32* %2
%31 = load i32, i32* %2
%32 = lshr i32 %31, 1
%33 = and i32 %32, 1431655765
%34 = load i32, i32* %2
%35 = shl i32 %34, 1
%36 = and i32 %35, -1431655766
%37 = or i32 %33, %36
ret i32 %37
}

LLVM IR (-O2):
define i32 @bitreverse(i32 %0) {
%2 = tail call i32 @llvm.bitreverse.i32(i32 %0)
ret i32 %2
}
/* Variables and functions */
char *getenv(char *);
const char *conf_get_configname(void) {
  char *name = getenv("KCONFIG_CONFIG");
  return name ? name : ".config";
}


x86 assembly (clang, -O0):
<conf_get_configname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1140 <conf_get_configname+0x30>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1150 <conf_get_configname+0x40>
lea    0xec8(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1150 <conf_get_configname+0x40>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<conf_get_configname>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
lea    0xee8(%rip),%rcx
cmove  %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"KCONFIG_CONFIG\00"
@.str.1 = [8 x i8] c".config\00"
define i8* @conf_get_configname() {
%1 = alloca i8*
%2 = call i8* @getenv(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = load i8*, i8** %1
br label %8
7: ; preds = %0
br label %8
8: ; preds = %7, %5
%9 = phi i8* [ %6, %5 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %7 ]
ret i8* %9
}

LLVM IR (-O2):
@.str = [15 x i8] c"KCONFIG_CONFIG\00"
@.str.1 = [8 x i8] c".config\00"
define i8* @conf_get_configname() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i8* %1, null
%3 = select i1 %2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %1
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ ProcessOutputFile(char *, int);
int ReadDataFromConfigFile(char *, char *);
void MeasureFromLIS(char *ConfigFile, char *OutputFile) {
  int k;
  k = ReadDataFromConfigFile(ConfigFile, OutputFile);
  if (k)
    ProcessOutputFile(OutputFile, 3);
}


x86 assembly (clang, -O0):
<MeasureFromLIS>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <ReadDataFromConfigFile@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1158 <MeasureFromLIS+0x38>
mov    -0x10(%rbp),%rdi
mov    $0x3,%esi
call   1030 <ProcessOutputFile@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MeasureFromLIS>:
push   %rbx
mov    %rsi,%rbx
call   1040 <ReadDataFromConfigFile@plt>
test   %eax,%eax
je     113b <MeasureFromLIS+0x1b>
mov    %rbx,%rdi
mov    $0x3,%esi
pop    %rbx
jmp    1030 <ProcessOutputFile@plt>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @MeasureFromLIS(i8* %0, i8* %1) {
%3 = tail call i32 @ReadDataFromConfigFile(i8* %0, i8* %1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @ProcessOutputFile(i8* %1, i32 3)
br label %7
7: ; preds = %5, %2
ret void
}
/* Variables and functions */
scalar_t__ calloc(long, long);
char *_alloc(long size) {
  char *new = (char *)calloc(1L, size);
  return (new);
}


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

x86 assembly (clang, -O2):
<_alloc>:
mov    %rdi,%rsi
mov    $0x1,%edi
jmp    1030 <calloc@plt>

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

LLVM IR (-O2):
define i8* @_alloc(i64 %0) {
%2 = tail call i64 @calloc(i64 1, i64 %0)
%3 = inttoptr i64 %2 to i8*
ret i8* %3
}
int compare_scores_desc(const void *score_a, const void *score_b) {
  int a = *(int *)score_a;
  int b = *(int *)score_b;
  return b - a;
}


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

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

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

LLVM IR (-O2):
define i32 @compare_scores_desc(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %6, %4
ret i32 %7
}
/* Type definitions */
struct _RegionHandle {
  int dummy;
};

/* Variables and functions */
int region_get_total_bytes(struct _RegionHandle *);
int region_alloc_bytes(struct _RegionHandle *r) {
  return region_get_total_bytes(r);
}


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

x86 assembly (clang, -O2):
<region_alloc_bytes>:
jmp    1030 <region_get_total_bytes@plt>

LLVM IR (-O0):
%struct._RegionHandle = type { i32 }
define i32 @region_alloc_bytes(%struct._RegionHandle* %0) {
%2 = alloca %struct._RegionHandle*
store %struct._RegionHandle* %0, %struct._RegionHandle** %2
%3 = load %struct._RegionHandle*, %struct._RegionHandle** %2
%4 = call i32 @region_get_total_bytes(%struct._RegionHandle* %3)
ret i32 %4
}

LLVM IR (-O2):
%struct._RegionHandle = type { i32 }
define i32 @region_alloc_bytes(%struct._RegionHandle* %0) {
%2 = tail call i32 @region_get_total_bytes(%struct._RegionHandle* %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128d;

/* Variables and functions */
int /*<<< orphan*/ _mm_cmpnlt_pd(int /*<<< orphan*/, int /*<<< orphan*/);
__m128d test_mm_cmpnlt_pd(__m128d A, __m128d B) { return _mm_cmpnlt_pd(A, B); }


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

x86 assembly (clang, -O2):
<test_mm_cmpnlt_pd>:
jmp    1030 <_mm_cmpnlt_pd@plt>

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

LLVM IR (-O2):
define i32 @test_mm_cmpnlt_pd(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_cmpnlt_pd(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
void *realloc(void *, size_t);
__attribute__((weak)) void *e_realloc(void *ptr, size_t size) {
  return realloc(ptr, size);
}


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

x86 assembly (clang, -O2):
<e_realloc>:
jmp    1030 <realloc@plt>

LLVM IR (-O0):
define weak i8* @e_realloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i8* @realloc(i8* %5, i64 %6)
ret i8* %7
}

LLVM IR (-O2):
define weak i8* @e_realloc(i8* %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
ret i8* %3
}
void genjal_out() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @g_value_dup_boxed() {
ret void
}
void catcherror(s) char *s;
{
  char buffer[300];
  sprintf(buffer, "no catch for this tag [%s]", s);
  gerror(buffer);
}


x86 assembly (clang, -O0):
<catcherror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x140,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x140(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xebf(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
lea    -0x140(%rbp),%rdi
mov    $0x0,%al
call   1030 <gerror@plt>
add    $0x140,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<catcherror>:
push   %rbx
sub    $0x130,%rsp
mov    %rdi,%rdx
lea    0xece(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <sprintf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <gerror@plt>
add    $0x130,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"no catch for this tag [%s]\00"
define void @catcherror(i8* %0) {
%2 = alloca i8*
%3 = alloca [300 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [300 x i8], [300 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = call i32 (i8*, i8*, ...) @sprintf(i8* %4, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [300 x i8], [300 x i8]* %3, i64 0, i64 0
%8 = call i32 (i8*, ...) bitcast (i32 (...)* @gerror to i32 (i8*, ...)*)(i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"no catch for this tag [%s]\00"
define void @catcherror(i8* %0) {
%2 = alloca [300 x i8]
%3 = getelementptr inbounds [300 x i8], [300 x i8]* %2, i64 0, i64 0
%4 = call i32 (i8*, i8*, ...) @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @gerror to i32 (i8*, ...)*)(i8* %3)
ret void
}
void ecm_nss_ipv6_exit(void) { return; }


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

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

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

LLVM IR (-O2):
define void @ecm_nss_ipv6_exit() {
ret void
}
/* Variables and functions */
scalar_t__ stb_is_pow2(unsigned int);
int stb_log2_floor(unsigned int);
int stb_log2_ceil(unsigned int n) {
  if (stb_is_pow2(n))
    return stb_log2_floor(n);
  else
    return 1 + stb_log2_floor(n);
}


x86 assembly (clang, -O0):
<stb_log2_ceil>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <stb_is_pow2@plt>
cmp    $0x0,%rax
je     114d <stb_log2_ceil+0x2d>
mov    -0x8(%rbp),%edi
call   1040 <stb_log2_floor@plt>
mov    %eax,-0x4(%rbp)
jmp    115b <stb_log2_ceil+0x3b>
mov    -0x8(%rbp),%edi
call   1040 <stb_log2_floor@plt>
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stb_log2_ceil>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
call   1030 <stb_is_pow2@plt>
mov    %rax,%r14
mov    %ebx,%edi
call   1040 <stb_log2_floor@plt>
cmp    $0x1,%r14
adc    $0x0,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @stb_log2_ceil(i32 %0) {
%2 = tail call i64 @stb_is_pow2(i32 %0)
%3 = icmp eq i64 %2, 0
%4 = tail call i32 @stb_log2_floor(i32 %0)
%5 = zext i1 %3 to i32
%6 = add nsw i32 %4, %5
ret i32 %6
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int member_2;
  int /*<<< orphan*/ member_1;
  int /*<<< orphan*/ member_0;
};

/* Variables and functions */
int /*<<< orphan*/ a(long double);
void b() {
  union {
    int c[4];
    long double d;
  } e = {{0, 0, 4}};
  a(e.d);
}


x86 assembly (clang, -O0):
<b>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movaps 0xee1(%rip),%xmm0
movaps %xmm0,-0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <a@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<b>:
sub    $0x18,%rsp
fldt   0xee6(%rip)
fstpt  (%rsp)
call   1030 <a@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%union.anon = type { x86_fp80 }
@__const.b.e = { [4 x i32] } { [4 x i32] [i32 0, i32 0, i32 4, i32 0] }
define void @b() {
%1 = alloca %union.anon
%2 = bitcast %union.anon* %1 to i8*
%3 = bitcast %union.anon* %1 to x86_fp80*
%4 = load x86_fp80, x86_fp80* %3
%5 = call i32 @a(x86_fp80 %4)
ret void
}

LLVM IR (-O2):
define void @b() {
%1 = tail call i32 @a(x86_fp80 0xK7FFF0000000000000000)
ret void
}
/* Variables and functions */
float ANTweenTimingFunctionLinear(float, int /*<<< orphan*/, int, float);
float ANTweenProgressTimingFunctionLinear(float time, float duration) {
  return ANTweenTimingFunctionLinear(time, 0, 1, duration);
}


x86 assembly (clang, -O0):
<ANTweenProgressTimingFunctionLinear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <ANTweenTimingFunctionLinear@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ANTweenProgressTimingFunctionLinear>:
xor    %edi,%edi
mov    $0x1,%esi
jmp    1030 <ANTweenTimingFunctionLinear@plt>

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

LLVM IR (-O2):
define float @ANTweenProgressTimingFunctionLinear(float %0, float %1) {
%3 = tail call float @ANTweenTimingFunctionLinear(float %0, i32 0, i32 1, float %1)
ret float %3
}
int test_imm_21int16_mem(short *val) {
  return ((*val) & (0x21 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_21int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 33
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
struct section_list_link {
  int dummy;
};
struct section_list {
  int dummy;
};
struct section {
  int dummy;
};
struct genlist_link {
  int dummy;
};
struct genlist {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ genlist_insert_after(struct genlist *, struct section *,
                                        struct genlist_link *);
void section_list_insert_after(struct section_list *tthis, struct section *pfoo,
                               struct section_list_link *plink) {
  genlist_insert_after((struct genlist *)tthis, pfoo,
                       (struct genlist_link *)plink);
}


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

x86 assembly (clang, -O2):
<section_list_insert_after>:
jmp    1030 <genlist_insert_after@plt>

LLVM IR (-O0):
%struct.section_list = type { i32 }
%struct.section = type { i32 }
%struct.section_list_link = type { i32 }
%struct.genlist = type { i32 }
%struct.genlist_link = type { i32 }
define void @section_list_insert_after(%struct.section_list* %0, %struct.section* %1, %struct.section_list_link* %2) {
%4 = alloca %struct.section_list*
%5 = alloca %struct.section*
%6 = alloca %struct.section_list_link*
store %struct.section_list* %0, %struct.section_list** %4
store %struct.section* %1, %struct.section** %5
store %struct.section_list_link* %2, %struct.section_list_link** %6
%7 = load %struct.section_list*, %struct.section_list** %4
%8 = bitcast %struct.section_list* %7 to %struct.genlist*
%9 = load %struct.section*, %struct.section** %5
%10 = load %struct.section_list_link*, %struct.section_list_link** %6
%11 = bitcast %struct.section_list_link* %10 to %struct.genlist_link*
%12 = call i32 @genlist_insert_after(%struct.genlist* %8, %struct.section* %9, %struct.genlist_link* %11)
ret void
}

LLVM IR (-O2):
%struct.section_list = type { i32 }
%struct.section = type { i32 }
%struct.section_list_link = type { i32 }
%struct.genlist = type { i32 }
%struct.genlist_link = type { i32 }
define void @section_list_insert_after(%struct.section_list* %0, %struct.section* %1, %struct.section_list_link* %2) {
%4 = bitcast %struct.section_list* %0 to %struct.genlist*
%5 = bitcast %struct.section_list_link* %2 to %struct.genlist_link*
%6 = tail call i32 @genlist_insert_after(%struct.genlist* %4, %struct.section* %1, %struct.genlist_link* %5)
ret void
}
/* Type definitions */
typedef scalar_t__ uid_t;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *, char *);
int /*<<< orphan*/ snprintf(char *, int, char *, unsigned long);
int /*<<< orphan*/ stderr;
void __loguid(uid_t uid, char *comment) {
  char buffer[32];
  snprintf(buffer, 32, "%lu", (long unsigned)uid);
  (void)fprintf(stderr, "[%s] %s (%s)\n", "DEBUG", buffer, comment);
}


x86 assembly (clang, -O0):
<__loguid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x20,%esi
lea    0xebc(%rip),%rdx
call   1030 <snprintf@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
lea    -0x30(%rbp),%rcx
mov    -0x10(%rbp),%r8
lea    0xea3(%rip),%rsi
lea    0xeaa(%rip),%rdx
call   1040 <fprintf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__loguid>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rsi,%rbx
mov    %rdi,%rcx
lea    0xecc(%rip),%rdx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x20,%esi
call   1030 <snprintf@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
lea    0xeb7(%rip),%rdx
mov    %r14,%rcx
mov    %rbx,%r8
call   1040 <fprintf@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%lu\00"
@stderr = global i32 0
@.str.1 = [14 x i8] c"[%s] %s (%s)\0A\00"
@.str.2 = [6 x i8] c"DEBUG\00"
define void @__loguid(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
%5 = alloca [32 x i8]
store i64 %0, i64* %3
store i8* %1, i8** %4
%6 = getelementptr inbounds [32 x i8], [32 x i8]* %5, i64 0, i64 0
%7 = load i64, i64* %3
%8 = call i32 @snprintf(i8* %6, i32 32, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %7)
%9 = load i32, i32* @stderr
%10 = getelementptr inbounds [32 x i8], [32 x i8]* %5, i64 0, i64 0
%11 = load i8*, i8** %4
%12 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* %10, i8* %11)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lu\00"
@stderr = global i32 0
@.str.1 = [14 x i8] c"[%s] %s (%s)\0A\00"
@.str.2 = [6 x i8] c"DEBUG\00"
define void @__loguid(i64 %0, i8* %1) {
%3 = alloca [32 x i8]
%4 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%5 = call i32 @snprintf(i8* %4, i32 32, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %0)
%6 = load i32, i32* @stderr
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* %4, i8* %1)
ret void
}
void bm_timestamp(void) {}


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

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

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

LLVM IR (-O2):
define void @bm_timestamp() {
ret void
}
int fn1(int a, int b, int m) {
  int tem1 = a & ~m;
  int tem2 = b & m;
  return tem1 | tem2;
}


x86 assembly (clang, -O0):
<fn1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
and    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
or     -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn1>:
mov    %esi,%eax
xor    %edi,%eax
and    %edx,%eax
xor    %edi,%eax
ret

LLVM IR (-O0):
define i32 @fn1(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32, i32* %4
%10 = load i32, i32* %6
%11 = xor i32 %10, -1
%12 = and i32 %9, %11
store i32 %12, i32* %7
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = and i32 %13, %14
store i32 %15, i32* %8
%16 = load i32, i32* %7
%17 = load i32, i32* %8
%18 = or i32 %16, %17
ret i32 %18
}

LLVM IR (-O2):
define i32 @fn1(i32 %0, i32 %1, i32 %2) {
%4 = xor i32 %2, -1
%5 = and i32 %4, %0
%6 = and i32 %2, %1
%7 = or i32 %5, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ abort_safe_block();
int /*<<< orphan*/ errno;
int /*<<< orphan*/ tap_error_errno_at(char *, int /*<<< orphan*/, char const *,
                                      int);
int handle_fcntl_res(int res, const char *filename, int line) {
  if (res < 0) {
    tap_error_errno_at("fcntl()", errno, filename, line);
    abort_safe_block();
  }
  return res;
}


x86 assembly (clang, -O0):
<handle_fcntl_res>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    115f <handle_fcntl_res+0x3f>
mov    0x2e9d(%rip),%rax
mov    (%rax),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
lea    0xead(%rip),%rdi
call   1040 <tap_error_errno_at@plt>
mov    $0x0,%al
call   1030 <abort_safe_block@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_fcntl_res>:
push   %rbx
mov    %edi,%ebx
test   %edi,%edi
jns    1148 <handle_fcntl_res+0x28>
mov    %edx,%ecx
mov    %rsi,%rdx
mov    0x2ead(%rip),%rax
mov    (%rax),%esi
lea    0xec4(%rip),%rdi
call   1040 <tap_error_errno_at@plt>
xor    %eax,%eax
call   1030 <abort_safe_block@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"fcntl()\00"
@errno = global i32 0
define i32 @handle_fcntl_res(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 0
br i1 %8, label %9, label %15
9: ; preds = %3
%10 = load i32, i32* @errno
%11 = load i8*, i8** %5
%12 = load i32, i32* %6
%13 = call i32 @tap_error_errno_at(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %10, i8* %11, i32 %12)
%14 = call i32 (...) @abort_safe_block()
br label %15
15: ; preds = %9, %3
%16 = load i32, i32* %4
ret i32 %16
}

LLVM IR (-O2):
@.str = [8 x i8] c"fcntl()\00"
@errno = global i32 0
define i32 @handle_fcntl_res(i32 returned %0, i8* %1, i32 %2) {
%4 = icmp slt i32 %0, 0
br i1 %4, label %5, label %9
5: ; preds = %3
%6 = load i32, i32* @errno
%7 = tail call i32 @tap_error_errno_at(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %6, i8* %1, i32 %2)
%8 = tail call i32 (...) @abort_safe_block()
br label %9
9: ; preds = %5, %3
ret i32 %0
}
void INT_Excep_TPU6_TCI6V(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_TPU6_TCI6V() {
ret void
}
double JHKeyframeAnimationFunctionLinear(double t, double b, double c,
                                         double d) {
  return c * (t /= d) + b;
}


x86 assembly (clang, -O0):
<JHKeyframeAnimationFunctionLinear>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm2
divsd  %xmm1,%xmm2
movsd  %xmm2,-0x8(%rbp)
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<JHKeyframeAnimationFunctionLinear>:
divsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @JHKeyframeAnimationFunctionLinear(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 = load double, double* %7
%10 = load double, double* %8
%11 = load double, double* %5
%12 = fdiv double %11, %10
store double %12, double* %5
%13 = load double, double* %6
%14 = call double @llvm.fmuladd.f64(double %9, double %12, double %13)
ret double %14
}

LLVM IR (-O2):
define double @JHKeyframeAnimationFunctionLinear(double %0, double %1, double %2, double %3) {
%5 = fdiv double %0, %3
%6 = tail call double @llvm.fmuladd.f64(double %2, double %5, double %1)
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
unsigned long get_cputime(void) {
  printf("\nError, the function getrusage is not available\n");
  exit(1);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [49 x i8] c"\0AError, the function getrusage is not available\0A\00"
define i64 @get_cputime() {
%1 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [48 x i8] c"\0AError, the function getrusage is not available\00"
define i64 @get_cputime() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ SIGNAL_VALID(int);
char const *signal_to_string(int);
const char *signal_to_string_with_check(int n) {
  if (!SIGNAL_VALID(n))
    return NULL;
  return signal_to_string(n);
}


x86 assembly (clang, -O0):
<signal_to_string_with_check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <SIGNAL_VALID@plt>
cmp    $0x0,%eax
jne    1149 <signal_to_string_with_check+0x29>
movq   $0x0,-0x8(%rbp)
jmp    1155 <signal_to_string_with_check+0x35>
mov    -0xc(%rbp),%edi
call   1040 <signal_to_string@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<signal_to_string_with_check>:
push   %rbx
mov    %edi,%ebx
call   1030 <SIGNAL_VALID@plt>
test   %eax,%eax
je     1134 <signal_to_string_with_check+0x14>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <signal_to_string@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @signal_to_string_with_check(i32 %0) {
%2 = tail call i32 @SIGNAL_VALID(i32 %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i8* @signal_to_string(i32 %0)
br label %6
6: ; preds = %1, %4
%7 = phi i8* [ %5, %4 ], [ null, %1 ]
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ Rad2Deg(double const);
int /*<<< orphan*/ convertDecimal2DegMinSec(int /*<<< orphan*/, int *, int *,
                                            float *);
void convertRad2DegMinSec(const double rad, int *deg, int *min, float *sec) {
  convertDecimal2DegMinSec(Rad2Deg(rad), deg, min, sec);
}


x86 assembly (clang, -O0):
<convertRad2DegMinSec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <Rad2Deg@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1040 <convertDecimal2DegMinSec@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<convertRad2DegMinSec>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
call   1030 <Rad2Deg@plt>
mov    %eax,%edi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <convertDecimal2DegMinSec@plt>

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

LLVM IR (-O2):
define void @convertRad2DegMinSec(double %0, i32* %1, i32* %2, float* %3) {
%5 = tail call i32 @Rad2Deg(double %0)
%6 = tail call i32 @convertDecimal2DegMinSec(i32 %5, i32* %1, i32* %2, float* %3)
ret void
}
int product_cmd(cp)
char *cp;
{ return sum_product(cp, 1); }


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

x86 assembly (clang, -O2):
<product_cmd>:
mov    $0x1,%esi
xor    %eax,%eax
jmp    1030 <sum_product@plt>

LLVM IR (-O0):
define i32 @product_cmd(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @sum_product to i32 (i8*, i32, ...)*)(i8* %3, i32 1)
ret i32 %4
}

LLVM IR (-O2):
define i32 @product_cmd(i8* %0) {
%2 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @sum_product to i32 (i8*, i32, ...)*)(i8* %0, i32 1)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ gen_pop();
int /*<<< orphan*/ output_line(char *);
void gen_xor(void) {
  output_line("eorb ,s");
  output_line("eora 1,s");
  gen_pop();
}


x86 assembly (clang, -O0):
<gen_xor>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <output_line@plt>
lea    0xed1(%rip),%rdi
call   1040 <output_line@plt>
mov    $0x0,%al
call   1030 <gen_pop@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_xor>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <output_line@plt>
lea    0xed4(%rip),%rdi
call   1040 <output_line@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <gen_pop@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"eorb ,s\00"
@.str.1 = [9 x i8] c"eora 1,s\00"
define void @gen_xor() {
%1 = call i32 @output_line(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @output_line(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (...) @gen_pop()
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"eorb ,s\00"
@.str.1 = [9 x i8] c"eora 1,s\00"
define void @gen_xor() {
%1 = tail call i32 @output_line(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @output_line(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 (...) @gen_pop()
ret void
}
void yy_1_Signature(char *yytext, int yyleng) {
  ;
  ;
}


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

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

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

LLVM IR (-O2):
define void @yy_1_Signature(i8* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ init_port();
void run_apps(void) { init_port(); }


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

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

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

LLVM IR (-O2):
define void @run_apps() {
%1 = tail call i32 (...) @init_port()
ret void
}
int test_imm_B0uint16_reg(unsigned short val) {
  return ((val) & (0xB0 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_B0uint16_reg(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, 176
%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_B0uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, 176
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ month_day(int, int, int *, int *);
int /*<<< orphan*/ printf(char *, int, int, int, int, int);
int main() {
  int month;
  int day;
  int year = 2014;
  int doy = 32;
  month_day(year, doy, &month, &day);
  printf("%d/365 (%d) -> %d-%d-%d\n", doy, year, year, month, day);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x7de,-0x10(%rbp)
movl   $0x20,-0x14(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
lea    -0x8(%rbp),%rdx
lea    -0xc(%rbp),%rcx
call   1030 <month_day@plt>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x8(%rbp),%r8d
mov    -0xc(%rbp),%r9d
lea    0xe98(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0x4(%rsp),%rdx
mov    %rsp,%rcx
mov    $0x7de,%edi
mov    $0x20,%esi
call   1030 <month_day@plt>
mov    0x4(%rsp),%r8d
mov    (%rsp),%r9d
lea    0xeb8(%rip),%rdi
mov    $0x20,%esi
mov    $0x7de,%edx
mov    $0x7de,%ecx
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"%d/365 (%d) -> %d-%d-%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 2014, i32* %4
store i32 32, i32* %5
%6 = load i32, i32* %4
%7 = load i32, i32* %5
%8 = call i32 @month_day(i32 %6, i32 %7, i32* %2, i32* %3)
%9 = load i32, i32* %5
%10 = load i32, i32* %4
%11 = load i32, i32* %4
%12 = load i32, i32* %2
%13 = load i32, i32* %3
%14 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10, i32 %11, i32 %12, i32 %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [25 x i8] c"%d/365 (%d) -> %d-%d-%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @month_day(i32 2014, i32 32, i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 32, i32 2014, i32 2014, i32 %6, i32 %7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ foo(unsigned int);
void test2(unsigned a) {
help:
  if (a > 0)
    return;
  if (a == 0)
    return;
  foo(a);
  goto help;
}


x86 assembly (clang, -O0):
<test2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jbe    112a <test2+0x1a>
jmp    1146 <test2+0x36>
cmpl   $0x0,-0x4(%rbp)
jne    1139 <test2+0x29>
jmp    1146 <test2+0x36>
mov    -0x4(%rbp),%edi
call   1030 <foo@plt>
jmp    111b <test2+0xb>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @test2(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(int *, int const *, long);
void ivec_cpy(int *vdest, const int *vsource, long n) {
  memcpy(vdest, vsource, n * sizeof(*vdest));
}


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

x86 assembly (clang, -O2):
<ivec_cpy>:
shl    $0x2,%rdx
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @ivec_cpy(i32* %0, i32* %1, i64 %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i64
store i32* %0, i32** %4
store i32* %1, i32** %5
store i64 %2, i64* %6
%7 = load i32*, i32** %4
%8 = load i32*, i32** %5
%9 = load i64, i64* %6
%10 = mul i64 %9, 4
%11 = call i32 @memcpy(i32* %7, i32* %8, i64 %10)
ret void
}

LLVM IR (-O2):
define void @ivec_cpy(i32* %0, i32* %1, i64 %2) {
%4 = shl i64 %2, 2
%5 = tail call i32 @memcpy(i32* %0, i32* %1, i64 %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, unsigned int);
const char *auth_name_id(unsigned id) {
  static char buf[16];
  snprintf(buf, sizeof(buf), "_ID%d", id);
  return buf;
}


x86 assembly (clang, -O0):
<auth_name_id>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
lea    0x2f1b(%rip),%rdi
mov    $0x10,%esi
lea    0xecf(%rip),%rdx
call   1030 <snprintf@plt>
lea    0x2f03(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<auth_name_id>:
push   %rbx
mov    %edi,%ecx
lea    0x2f26(%rip),%rbx
lea    0xedf(%rip),%rdx
mov    %rbx,%rdi
mov    $0x10,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@auth_name_id.buf = internal global [16 x i8] zeroinitializer
@.str = [6 x i8] c"_ID%d\00"
define i8* @auth_name_id(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @snprintf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @auth_name_id.buf, i64 0, i64 0), i32 16, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @auth_name_id.buf, i64 0, i64 0)
}

LLVM IR (-O2):
@auth_name_id.buf = internal global [16 x i8] zeroinitializer
@.str = [6 x i8] c"_ID%d\00"
define i8* @auth_name_id(i32 %0) {
%2 = tail call i32 @snprintf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @auth_name_id.buf, i64 0, i64 0), i32 16, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i8* getelementptr inbounds ([16 x i8], [16 x i8]* @auth_name_id.buf, i64 0, i64 0)
}
/* Variables and functions */
double pow(double, double);
double my_cbrt(double x) {
  if (x >= 0)
    return pow(x, 1.0 / 3.0);
  else
    return -pow(-x, 1.0 / 3.0);
}


x86 assembly (clang, -O0):
<my_cbrt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     114b <my_cbrt+0x3b>
movsd  -0x10(%rbp),%xmm0
movsd  0xec4(%rip),%xmm1
call   1030 <pow@plt>
movsd  %xmm0,-0x8(%rbp)
jmp    1190 <my_cbrt+0x80>
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xe91(%rip),%xmm1
call   1030 <pow@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_cbrt>:
push   %rax
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jae    113a <my_cbrt+0x2a>
xorpd  0xeed(%rip),%xmm0
movsd  0xed5(%rip),%xmm1
call   1030 <pow@plt>
xorpd  0xed8(%rip),%xmm0
pop    %rax
ret
movsd  0xebe(%rip),%xmm1
pop    %rax
jmp    1030 <pow@plt>

LLVM IR (-O0):
define double @my_cbrt(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp oge double %4, 0.000000e+00
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load double, double* %3
%8 = call double @pow(double %7, double 0x3FD5555555555555)
store double %8, double* %2
br label %14
9: ; preds = %1
%10 = load double, double* %3
%11 = fneg double %10
%12 = call double @pow(double %11, double 0x3FD5555555555555)
%13 = fneg double %12
store double %13, double* %2
br label %14
14: ; preds = %9, %6
%15 = load double, double* %2
ret double %15
}

LLVM IR (-O2):
define double @my_cbrt(double %0) {
%2 = fcmp ult double %0, 0.000000e+00
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call double @pow(double %0, double 0x3FD5555555555555)
br label %9
5: ; preds = %1
%6 = fneg double %0
%7 = tail call double @pow(double %6, double 0x3FD5555555555555)
%8 = fneg double %7
br label %9
9: ; preds = %5, %3
%10 = phi double [ %4, %3 ], [ %8, %5 ]
ret double %10
}
/* Type definitions */
struct group {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ EPERM;
int /*<<< orphan*/ errno;
struct group *getgrent(void) {
  errno = EPERM;
  return 0;
}


x86 assembly (clang, -O0):
<getgrent>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%ecx
mov    0x2ecc(%rip),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getgrent>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%eax
mov    0x2ed0(%rip),%rcx
mov    %eax,(%rcx)
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.group = type { i32 }
@EPERM = global i32 0
@errno = global i32 0
define %struct.group* @getgrent() {
%1 = load i32, i32* @EPERM
store i32 %1, i32* @errno
ret %struct.group* null
}

LLVM IR (-O2):
%struct.group = type { i32 }
@EPERM = global i32 0
@errno = global i32 0
define noalias %struct.group* @getgrent() {
%1 = load i32, i32* @EPERM
store i32 %1, i32* @errno
ret %struct.group* null
}
void test__ip6_addr(void) {}


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

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

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

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