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

/* Variables and functions */
int /*<<< orphan*/ SOL_SOCKET;
int /*<<< orphan*/ SO_RCVBUF;
int /*<<< orphan*/ die_perror(char *);
scalar_t__ setsockopt(int, int /*<<< orphan*/, int /*<<< orphan*/, int *, int);
void set_receive_buffer_size(int fd, int bytes) {
  if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &bytes, sizeof(bytes)) < 0)
    die_perror("setsockopt SOL_SOCKET SO_RCVBUF");
}


x86 assembly (clang, -O0):
<set_receive_buffer_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
mov    0x2e97(%rip),%rax
mov    (%rax),%edx
lea    -0x8(%rbp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
cmp    $0x0,%rax
jge    1168 <set_receive_buffer_size+0x48>
lea    0xe9d(%rip),%rdi
call   1040 <die_perror@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_receive_buffer_size>:
push   %rax
mov    %esi,0x4(%rsp)
mov    0x2ebc(%rip),%rax
mov    (%rax),%esi
mov    0x2ea3(%rip),%rax
mov    (%rax),%edx
lea    0x4(%rsp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
test   %rax,%rax
js     114e <set_receive_buffer_size+0x2e>
pop    %rax
ret
lea    0xeab(%rip),%rdi
call   1040 <die_perror@plt>
pop    %rax
ret

LLVM IR (-O0):
@SOL_SOCKET = global i32 0
@SO_RCVBUF = global i32 0
@.str = [32 x i8] c"setsockopt SOL_SOCKET SO_RCVBUF\00"
define void @set_receive_buffer_size(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* @SOL_SOCKET
%7 = load i32, i32* @SO_RCVBUF
%8 = call i64 @setsockopt(i32 %5, i32 %6, i32 %7, i32* %4, i32 4)
%9 = icmp slt i64 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 @die_perror(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %10, %2
ret void
}

LLVM IR (-O2):
@SOL_SOCKET = global i32 0
@SO_RCVBUF = global i32 0
@.str = [32 x i8] c"setsockopt SOL_SOCKET SO_RCVBUF\00"
define void @set_receive_buffer_size(i32 %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = load i32, i32* @SOL_SOCKET
%5 = load i32, i32* @SO_RCVBUF
%6 = call i64 @setsockopt(i32 %0, i32 %4, i32 %5, i32* %3, i32 4)
%7 = icmp slt i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @die_perror(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %2
ret void
}
void ff_hevc_put_hevc_bi_qpel_h48_8_avx2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_qpel_h48_8_avx2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pr_info(char *);
void myexit(void) { pr_info("panic myexit\n"); }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"panic myexit\0A\00"
define void @myexit() {
%1 = call i32 @pr_info(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"panic myexit\0A\00"
define void @myexit() {
%1 = tail call i32 @pr_info(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}
int modulo(int x, int k) {
  int mod = x % k;
  return (mod < 0 ? mod + k : mod);
}


x86 assembly (clang, -O0):
<modulo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    112c <modulo+0x2c>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1132 <modulo+0x32>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<modulo>:
mov    %edi,%eax
cltd
idiv   %esi
mov    %edx,%eax
sar    $0x1f,%eax
and    %esi,%eax
add    %edx,%eax
ret

LLVM IR (-O0):
define i32 @modulo(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = srem i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %2
%12 = load i32, i32* %5
%13 = load i32, i32* %4
%14 = add nsw i32 %12, %13
br label %17
15: ; preds = %2
%16 = load i32, i32* %5
br label %17
17: ; preds = %15, %11
%18 = phi i32 [ %14, %11 ], [ %16, %15 ]
ret i32 %18
}

LLVM IR (-O2):
define i32 @modulo(i32 %0, i32 %1) {
%3 = srem i32 %0, %1
%4 = icmp slt i32 %3, 0
%5 = select i1 %4, i32 %1, i32 0
%6 = add nsw i32 %5, %3
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ col_stride_smul_2x1(double const *, double *, int);
void col_stride_smul_2x2(const double *scalar, double *a, int a_col_stride) {
  col_stride_smul_2x1(scalar, &a[(0) + (0) * a_col_stride], a_col_stride);
  col_stride_smul_2x1(scalar, &a[(0) + (1) * a_col_stride], a_col_stride);
}


x86 assembly (clang, -O0):
<col_stride_smul_2x2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
imul   $0x0,-0x14(%rbp),%eax
add    $0x0,%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
mov    -0x14(%rbp),%edx
call   1030 <col_stride_smul_2x1@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%eax
shl    $0x0,%eax
add    $0x0,%eax
cltq
shl    $0x3,%rax
add    %rax,%rsi
mov    -0x14(%rbp),%edx
call   1030 <col_stride_smul_2x1@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<col_stride_smul_2x2>:
push   %r15
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %rsi,%r14
mov    %rdi,%r15
call   1030 <col_stride_smul_2x1@plt>
movslq %ebx,%rdx
lea    (%r14,%rdx,8),%rsi
mov    %r15,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <col_stride_smul_2x1@plt>

LLVM IR (-O0):
define void @col_stride_smul_2x2(double* %0, double* %1, i32 %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca i32
store double* %0, double** %4
store double* %1, double** %5
store i32 %2, i32* %6
%7 = load double*, double** %4
%8 = load double*, double** %5
%9 = load i32, i32* %6
%10 = mul nsw i32 0, %9
%11 = add nsw i32 0, %10
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds double, double* %8, i64 %12
%14 = load i32, i32* %6
%15 = call i32 @col_stride_smul_2x1(double* %7, double* %13, i32 %14)
%16 = load double*, double** %4
%17 = load double*, double** %5
%18 = load i32, i32* %6
%19 = mul nsw i32 1, %18
%20 = add nsw i32 0, %19
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds double, double* %17, i64 %21
%23 = load i32, i32* %6
%24 = call i32 @col_stride_smul_2x1(double* %16, double* %22, i32 %23)
ret void
}

LLVM IR (-O2):
define void @col_stride_smul_2x2(double* %0, double* %1, i32 %2) {
%4 = tail call i32 @col_stride_smul_2x1(double* %0, double* %1, i32 %2)
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds double, double* %1, i64 %5
%7 = tail call i32 @col_stride_smul_2x1(double* %0, double* %6, i32 %2)
ret void
}
void test_1(float x, int *out) { *out = (int)x; }


x86 assembly (clang, -O0):
<test_1>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
mov    %rdi,-0x10(%rbp)
cvttss2si -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_1>:
cvttss2si %xmm0,%eax
mov    %eax,(%rdi)
ret

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

LLVM IR (-O2):
define void @test_1(float %0, i32* nocapture writeonly %1) {
%3 = fptosi float %0 to i32
store i32 %3, i32* %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ fputc(int, int /*<<< orphan*/);
scalar_t__ rd_byte(int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void eputs(uint64_t loc) {
  int c;
  while (c = (int)rd_byte(loc++))
    fputc(c, stdout);
  return;
}


x86 assembly (clang, -O0):
<eputs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
call   1040 <rd_byte@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
je     115d <eputs+0x3d>
mov    -0x8(%rbp),%edi
mov    0x2e8f(%rip),%rax
mov    (%rax),%esi
call   1030 <fputc@plt>
jmp    112b <eputs+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eputs>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
call   1040 <rd_byte@plt>
test   %eax,%eax
je     1158 <eputs+0x38>
add    $0x1,%ebx
mov    0x2ea7(%rip),%r14
nopl   0x0(%rax)
mov    (%r14),%esi
mov    %eax,%edi
call   1030 <fputc@plt>
mov    %ebx,%edi
call   1040 <rd_byte@plt>
add    $0x1,%ebx
test   %eax,%eax
jne    1140 <eputs+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stdout = global i32 0
define void @eputs(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
br label %4
4: ; preds = %10, %1
%5 = load i32, i32* %2
%6 = add nsw i32 %5, 1
store i32 %6, i32* %2
%7 = call i64 @rd_byte(i32 %5)
%8 = trunc i64 %7 to i32
store i32 %8, i32* %3
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %4
%11 = load i32, i32* %3
%12 = load i32, i32* @stdout
%13 = call i32 @fputc(i32 %11, i32 %12)
br label %4
14: ; preds = %4
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @eputs(i32 %0) {
%2 = tail call i64 @rd_byte(i32 %0)
%3 = trunc i64 %2 to i32
%4 = icmp eq i32 %3, 0
br i1 %4, label %14, label %5
5: ; preds = %1, %5
%6 = phi i32 [ %12, %5 ], [ %3, %1 ]
%7 = phi i32 [ %8, %5 ], [ %0, %1 ]
%8 = add nsw i32 %7, 1
%9 = load i32, i32* @stdout
%10 = tail call i32 @fputc(i32 %6, i32 %9)
%11 = tail call i64 @rd_byte(i32 %8)
%12 = trunc i64 %11 to i32
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %5
14: ; preds = %5, %1
ret void
}
int test_imm_EBint64_highword_reg(long long val) {
  return ((val >> 32) & (0xEB << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_EBint64_highword_reg>:
movabs $0xeb00000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_EBint64_highword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 32
%5 = and i64 %4, 235
%6 = icmp ne i64 %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_EBint64_highword_reg(i64 %0) {
%2 = and i64 %0, 1009317314560
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ f(int);
int main() {
  f(0x0100000000000000ull);
  abort();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
call   1040 <f@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1040 <f@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @f(i32 0)
%3 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i32 0)
%2 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int sum_multiples_below(int, int, int);
int main(int argc, char *argv[]) {
  printf("The sum of the multiples of 3 and 5 below 10 is: %d\n",
         sum_multiples_below(10, 3, 5));
  printf("The sum of the multiples of 3 and 5 below 1000 is: %d\n",
         sum_multiples_below(1000, 3, 5));
  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    $0xa,%edi
mov    $0x3,%esi
mov    $0x5,%edx
call   1040 <sum_multiples_below@plt>
mov    %eax,%esi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
mov    $0x3e8,%edi
mov    $0x3,%esi
mov    $0x5,%edx
call   1040 <sum_multiples_below@plt>
mov    %eax,%esi
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xa,%edi
mov    $0x3,%esi
mov    $0x5,%edx
call   1040 <sum_multiples_below@plt>
lea    0xec4(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x3e8,%edi
mov    $0x3,%esi
mov    $0x5,%edx
call   1040 <sum_multiples_below@plt>
lea    0xed7(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [53 x i8] c"The sum of the multiples of 3 and 5 below 10 is: %d\0A\00"
@.str.1 = [55 x i8] c"The sum of the multiples of 3 and 5 below 1000 is: %d\0A\00"
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 = call i32 @sum_multiples_below(i32 10, i32 3, i32 5)
%7 = call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = call i32 @sum_multiples_below(i32 1000, i32 3, i32 5)
%9 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [53 x i8] c"The sum of the multiples of 3 and 5 below 10 is: %d\0A\00"
@.str.1 = [55 x i8] c"The sum of the multiples of 3 and 5 below 1000 is: %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @sum_multiples_below(i32 10, i32 3, i32 5)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @sum_multiples_below(i32 1000, i32 3, i32 5)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}
int fun() {}


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

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

LLVM IR (-O0):
define i32 @fun() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @fun() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ swap(int *, int *);
int main() {
  int x = 1;
  int y = 123;
  printf("before swapping: x:%d y:%d\n", x, y);
  swap(&x, &y);
  printf("after swapping: x:%d y:%d\n", x, y);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x7b,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
lea    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <swap@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x1,0x4(%rsp)
movl   $0x7b,(%rsp)
lea    0xec9(%rip),%rdi
mov    $0x1,%esi
mov    $0x7b,%edx
call   1030 <printf@plt>
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1040 <swap@plt>
mov    0x4(%rsp),%esi
mov    (%rsp),%edx
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"before swapping: x:%d y:%d\0A\00"
@.str.1 = [27 x i8] c"after swapping: x:%d y:%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
store i32 123, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %5)
%7 = call i32 @swap(i32* %2, i32* %3)
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [28 x i8] c"before swapping: x:%d y:%d\0A\00"
@.str.1 = [27 x i8] c"after swapping: x:%d y:%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 1, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 123, i32* %2
%5 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 1, i32 123)
%6 = call i32 @swap(i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i32 %7, i32 %8)
ret i32 0
}
/* Variables and functions */
char const *getenv(char *);
const char *IoTHubAccount_GetEventhubListenName(void) {
  return getenv("IOTHUB_EVENTHUB_LISTEN_NAME");
}


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

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

LLVM IR (-O0):
@.str = [28 x i8] c"IOTHUB_EVENTHUB_LISTEN_NAME\00"
define i8* @IoTHubAccount_GetEventhubListenName() {
%1 = call i8* @getenv(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [28 x i8] c"IOTHUB_EVENTHUB_LISTEN_NAME\00"
define i8* @IoTHubAccount_GetEventhubListenName() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
int is_name_character(char c) {
  if (c >= 'a' && c <= 'z')
    return 1;
  else if (c >= 'A' && c <= 'Z')
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<is_name_character>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jl     1130 <is_name_character+0x30>
movsbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
jg     1130 <is_name_character+0x30>
movl   $0x1,-0x4(%rbp)
jmp    115d <is_name_character+0x5d>
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     1156 <is_name_character+0x56>
movsbl -0x5(%rbp),%eax
cmp    $0x5a,%eax
jg     1156 <is_name_character+0x56>
movl   $0x1,-0x4(%rbp)
jmp    115d <is_name_character+0x5d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_name_character>:
and    $0xdf,%dil
add    $0xbf,%dil
xor    %eax,%eax
cmp    $0x1a,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @is_name_character(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 97
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 122
br i1 %10, label %11, label %12
11: ; preds = %7
store i32 1, i32* %2
br label %22
12: ; preds = %7, %1
%13 = load i8, i8* %3
%14 = sext i8 %13 to i32
%15 = icmp sge i32 %14, 65
br i1 %15, label %16, label %21
16: ; preds = %12
%17 = load i8, i8* %3
%18 = sext i8 %17 to i32
%19 = icmp sle i32 %18, 90
br i1 %19, label %20, label %21
20: ; preds = %16
store i32 1, i32* %2
br label %22
21: ; preds = %16, %12
store i32 0, i32* %2
br label %22
22: ; preds = %21, %20, %11
%23 = load i32, i32* %2
ret i32 %23
}

LLVM IR (-O2):
define i32 @is_name_character(i8 signext %0) {
%2 = and i8 %0, -33
%3 = add i8 %2, -65
%4 = icmp ult i8 %3, 26
%5 = zext i1 %4 to i32
ret i32 %5
}
void foo677(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo677(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ac();
int main() {
  ac();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @ac()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @ac()
ret i32 0
}
char *xrealloc(ptr, size)
char *ptr;
unsigned size;
{
  char *tem = realloc(ptr, size);
  if (!tem)
    memory_out();
  return tem;
}


x86 assembly (clang, -O0):
<xrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%eax
mov    %eax,%esi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1153 <xrealloc+0x33>
mov    $0x0,%al
call   1030 <memory_out@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrealloc>:
push   %rbx
mov    %esi,%esi
call   1040 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1137 <xrealloc+0x17>
xor    %eax,%eax
call   1030 <memory_out@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @xrealloc(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = zext i32 %7 to i64
%9 = call i8* @realloc(i8* %6, i64 %8)
store i8* %9, i8** %5
%10 = load i8*, i8** %5
%11 = icmp ne i8* %10, null
br i1 %11, label %14, label %12
12: ; preds = %2
%13 = call i32 (...) @memory_out()
br label %14
14: ; preds = %12, %2
%15 = load i8*, i8** %5
ret i8* %15
}

LLVM IR (-O2):
define noalias i8* @xrealloc(i8* nocapture %0, i32 %1) {
%3 = zext i32 %1 to i64
%4 = tail call i8* @realloc(i8* %0, i64 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 (...) @memory_out()
br label %8
8: ; preds = %6, %2
ret i8* %4
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t mp2vpicx_get_fcode10(const uint8_t *p_mp2vpicx) {
  return (p_mp2vpicx[5] & 0xf);
}


x86 assembly (clang, -O0):
<mp2vpicx_get_fcode10>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%eax
and    $0xf,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp2vpicx_get_fcode10>:
mov    0x14(%rdi),%eax
and    $0xf,%eax
ret

LLVM IR (-O0):
define i32 @mp2vpicx_get_fcode10(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 5
%5 = load i32, i32* %4
%6 = and i32 %5, 15
ret i32 %6
}

LLVM IR (-O2):
define i32 @mp2vpicx_get_fcode10(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 5
%3 = load i32, i32* %2
%4 = and i32 %3, 15
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ __builtin_allegrex_sqrt_s(float);
float pspFpuAtan(int /*<<< orphan*/);
float pspFpuAcos(float x) {
  x = x * x;
  return pspFpuAtan(__builtin_allegrex_sqrt_s((1.0f - x) / x));
}


x86 assembly (clang, -O0):
<pspFpuAcos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  0xebc(%rip),%xmm0
subss  -0x4(%rbp),%xmm0
divss  -0x4(%rbp),%xmm0
call   1030 <__builtin_allegrex_sqrt_s@plt>
mov    %eax,%edi
call   1040 <pspFpuAtan@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pspFpuAcos>:
push   %rax
mulss  %xmm0,%xmm0
movss  0xed3(%rip),%xmm1
subss  %xmm0,%xmm1
divss  %xmm0,%xmm1
movaps %xmm1,%xmm0
call   1030 <__builtin_allegrex_sqrt_s@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <pspFpuAtan@plt>

LLVM IR (-O0):
define float @pspFpuAcos(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* %2
%5 = fmul float %3, %4
store float %5, float* %2
%6 = load float, float* %2
%7 = fsub float 1.000000e+00, %6
%8 = load float, float* %2
%9 = fdiv float %7, %8
%10 = call i32 @__builtin_allegrex_sqrt_s(float %9)
%11 = call float @pspFpuAtan(i32 %10)
ret float %11
}

LLVM IR (-O2):
define float @pspFpuAcos(float %0) {
%2 = fmul float %0, %0
%3 = fsub float 1.000000e+00, %2
%4 = fdiv float %3, %2
%5 = tail call i32 @__builtin_allegrex_sqrt_s(float %4)
%6 = tail call float @pspFpuAtan(i32 %5)
ret float %6
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ stdin;
int vfscanf(int /*<<< orphan*/, char const *, int /*<<< orphan*/);
int vscanf(const char *restrict fmt, va_list ap) {
  return vfscanf(stdin, fmt, ap);
}


x86 assembly (clang, -O0):
<vscanf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <vfscanf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vscanf>:
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x2ecc(%rip),%rax
mov    (%rax),%edi
jmp    1030 <vfscanf@plt>

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

LLVM IR (-O2):
@stdin = global i32 0
define i32 @vscanf(i8* noalias %0, i32 %1) {
%3 = load i32, i32* @stdin
%4 = tail call i32 @vfscanf(i32 %3, i8* %0, i32 %1)
ret i32 %4
}
/* Type definitions */
struct min_heap_node {
  int dummy;
};

/* Variables and functions */
struct min_heap_node *build_huffman_tree(char *, int *, int);
int /*<<< orphan*/ print_code(struct min_heap_node *, int *, int);
void huffman_code(char data[], int freq[], int size) {
  struct min_heap_node *root = build_huffman_tree(data, freq, size);
  int arr[100], top = 0;
  print_code(root, arr, top);
}


x86 assembly (clang, -O0):
<huffman_code>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1c0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <build_huffman_tree@plt>
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x1b4(%rbp)
mov    -0x20(%rbp),%rdi
lea    -0x1b0(%rbp),%rsi
mov    -0x1b4(%rbp),%edx
call   1040 <print_code@plt>
add    $0x1c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<huffman_code>:
sub    $0x198,%rsp
call   1030 <build_huffman_tree@plt>
mov    %rsp,%rsi
mov    %rax,%rdi
xor    %edx,%edx
call   1040 <print_code@plt>
add    $0x198,%rsp
ret

LLVM IR (-O0):
%struct.min_heap_node = type { i32 }
define void @huffman_code(i8* %0, i32* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32
%7 = alloca %struct.min_heap_node*
%8 = alloca [100 x i32]
%9 = alloca i32
store i8* %0, i8** %4
store i32* %1, i32** %5
store i32 %2, i32* %6
%10 = load i8*, i8** %4
%11 = load i32*, i32** %5
%12 = load i32, i32* %6
%13 = call %struct.min_heap_node* @build_huffman_tree(i8* %10, i32* %11, i32 %12)
store %struct.min_heap_node* %13, %struct.min_heap_node** %7
store i32 0, i32* %9
%14 = load %struct.min_heap_node*, %struct.min_heap_node** %7
%15 = getelementptr inbounds [100 x i32], [100 x i32]* %8, i64 0, i64 0
%16 = load i32, i32* %9
%17 = call i32 @print_code(%struct.min_heap_node* %14, i32* %15, i32 %16)
ret void
}

LLVM IR (-O2):
%struct.min_heap_node = type { i32 }
define void @huffman_code(i8* %0, i32* %1, i32 %2) {
%4 = alloca [100 x i32]
%5 = tail call %struct.min_heap_node* @build_huffman_tree(i8* %0, i32* %1, i32 %2)
%6 = bitcast [100 x i32]* %4 to i8*
%7 = getelementptr inbounds [100 x i32], [100 x i32]* %4, i64 0, i64 0
%8 = call i32 @print_code(%struct.min_heap_node* %5, i32* %7, i32 0)
ret void
}
/* Variables and functions */
unsigned short assemble(int, int);
int /*<<< orphan*/ printf(char *, unsigned short);
int main() {
  unsigned short x = assemble(1, 2);
  printf("%d\n", x);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
mov    $0x2,%esi
call   1040 <assemble@plt>
mov    %ax,-0x6(%rbp)
lea    0xeb7(%rip),%rdi
movzwl -0x6(%rbp),%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x2,%esi
call   1040 <assemble@plt>
movzwl %ax,%esi
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i16
store i32 0, i32* %1
%3 = call zeroext i16 @assemble(i32 1, i32 2)
store i16 %3, i16* %2
%4 = load i16, i16* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i16 zeroext %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call zeroext i16 @assemble(i32 1, i32 2)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i16 zeroext %1)
ret i32 0
}
int unary_z(char *s) { return !*s; }


x86 assembly (clang, -O0):
<unary_z>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unary_z>:
xor    %eax,%eax
cmpb   $0x0,(%rdi)
sete   %al
ret

LLVM IR (-O0):
define i32 @unary_z(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = icmp ne i8 %4, 0
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @unary_z(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void errorexit() { exit(1); }


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

x86 assembly (clang, -O2):
<errorexit>:
push   %rax
mov    $0x1,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @errorexit() {
%1 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @errorexit() {
%1 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int i, a, b, c;
  a = 2;
  b = 1;
  i = 1;
  c = 0;
  for (i >= 0; i <= 100; i++) {
    c = a + b;
    a = b;
    b = c;
    printf("%d ~ %d/n", i, c);
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x64,-0x8(%rbp)
jg     117a <main+0x6a>
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%esi
mov    -0x14(%rbp),%edx
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113b <main+0x2b>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    $0x2,%ebx
mov    $0x1,%eax
lea    0xed8(%rip),%r14
mov    $0x1,%ebp
nopl   (%rax)
mov    %eax,%r15d
add    %eax,%ebx
mov    %r14,%rdi
mov    %ebp,%esi
mov    %ebx,%edx
call   1030 <printf@plt>
add    $0x1,%ebp
mov    %ebx,%eax
mov    %r15d,%ebx
cmp    $0x65,%ebp
jne    1130 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"%d ~ %d/n\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 2, i32* %3
store i32 1, i32* %4
store i32 1, i32* %2
store i32 0, i32* %5
%6 = load i32, i32* %2
%7 = icmp sge i32 %6, 0
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %21, %0
%10 = load i32, i32* %2
%11 = icmp sle i32 %10, 100
br i1 %11, label %12, label %24
12: ; preds = %9
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = add nsw i32 %13, %14
store i32 %15, i32* %5
%16 = load i32, i32* %4
store i32 %16, i32* %3
%17 = load i32, i32* %5
store i32 %17, i32* %4
%18 = load i32, i32* %2
%19 = load i32, i32* %5
%20 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %18, i32 %19)
br label %21
21: ; preds = %12
%22 = load i32, i32* %2
%23 = add nsw i32 %22, 1
store i32 %23, i32* %2
br label %9
24: ; preds = %9
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"%d ~ %d/n\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 1, %0 ], [ %5, %1 ]
%3 = phi i32 [ 2, %0 ], [ %2, %1 ]
%4 = phi i32 [ 1, %0 ], [ %7, %1 ]
%5 = add nsw i32 %2, %3
%6 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %5)
%7 = add nuw nsw i32 %4, 1
%8 = icmp eq i32 %7, 101
br i1 %8, label %9, label %1
9: ; preds = %1
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ strftime(char *, int, char *, struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
char *rfc2822date(char *buf) {
  time_t raw_time;
  time(&raw_time);
  struct tm *time_info;
  time_info = localtime(&raw_time);
  strftime(buf, 33, "%a, %d %b %Y %T %z", time_info);
  return buf;
}


x86 assembly (clang, -O0):
<rfc2822date>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xc(%rbp),%rdi
call   1040 <time@plt>
lea    -0xc(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    $0x21,%esi
lea    0xe9a(%rip),%rdx
call   1050 <strftime@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rfc2822date>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0x4(%rsp),%r14
mov    %r14,%rdi
call   1040 <time@plt>
mov    %r14,%rdi
call   1030 <localtime@plt>
lea    0xead(%rip),%rdx
mov    %rbx,%rdi
mov    $0x21,%esi
mov    %rax,%rcx
call   1050 <strftime@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [19 x i8] c"%a, %d %b %Y %T %z\00"
define i8* @rfc2822date(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca %struct.tm*
store i8* %0, i8** %2
%5 = call i32 @time(i32* %3)
%6 = call %struct.tm* @localtime(i32* %3)
store %struct.tm* %6, %struct.tm** %4
%7 = load i8*, i8** %2
%8 = load %struct.tm*, %struct.tm** %4
%9 = call i32 @strftime(i8* %7, i32 33, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), %struct.tm* %8)
%10 = load i8*, i8** %2
ret i8* %10
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [19 x i8] c"%a, %d %b %Y %T %z\00"
define i8* @rfc2822date(i8* returned %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @time(i32* %2)
%5 = call %struct.tm* @localtime(i32* %2)
%6 = call i32 @strftime(i8* %0, i32 33, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), %struct.tm* %5)
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ register_resm_function_list();
void resm_init() { register_resm_function_list(); }


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

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

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

LLVM IR (-O2):
define void @resm_init() {
%1 = tail call i32 (...) @register_resm_function_list()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gen_call(char *);
int /*<<< orphan*/ gen_pop();
gen_greater_than() {
  gen_pop();
  gen_call("ccgt");
}


x86 assembly (clang, -O0):
<gen_greater_than>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <gen_pop@plt>
lea    0xeca(%rip),%rdi
call   1040 <gen_call@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_greater_than>:
push   %rax
xor    %eax,%eax
call   1030 <gen_pop@plt>
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1040 <gen_call@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"ccgt\00"
define i32 @gen_greater_than() {
%1 = alloca i32
%2 = call i32 (...) @gen_pop()
%3 = call i32 @gen_call(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
@.str = [5 x i8] c"ccgt\00"
define i32 @gen_greater_than() {
%1 = tail call i32 (...) @gen_pop()
%2 = tail call i32 @gen_call(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
int get_ProcessID(unsigned char *pds) { return pds[5]; }


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

x86 assembly (clang, -O2):
<get_ProcessID>:
movzbl 0x5(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @get_ProcessID(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 5
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @get_ProcessID(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 5
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
ret i32 %4
}
/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ snprintf(char *, int, char *, int);
char *set_prime_string(int prime) {
  char *prime_string = malloc(sizeof(char) * 32 + 1);
  snprintf(prime_string, 32, "%d", prime);
  return prime_string;
}


x86 assembly (clang, -O0):
<set_prime_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x21,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%ecx
mov    $0x20,%esi
lea    0xeb4(%rip),%rdx
call   1030 <snprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_prime_string>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
mov    $0x21,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
lea    0xec7(%rip),%rdx
mov    %rax,%rdi
mov    $0x20,%esi
mov    %ebp,%ecx
call   1030 <snprintf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i8* @set_prime_string(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = call i8* @malloc(i32 33)
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = load i32, i32* %2
%7 = call i32 @snprintf(i8* %5, i32 32, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i8*, i8** %3
ret i8* %8
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i8* @set_prime_string(i32 %0) {
%2 = tail call dereferenceable_or_null(33) i8* @malloc(i32 33)
%3 = tail call i32 @snprintf(i8* %2, i32 32, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i8* %2
}
char get_value() {
  char nume[40];
  printf("Enter name: ");
  scanf("%d", &nume);
  return nume;
}


x86 assembly (clang, -O0):
<get_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed0(%rip),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    -0x30(%rbp),%rax
movsbl %al,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_value>:
push   %rbx
sub    $0x30,%rsp
lea    0xed4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed3(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    %ebx,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Enter name: \00"
@.str.1 = [3 x i8] c"%d\00"
define signext i8 @get_value() {
%1 = alloca [40 x i8]
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), [40 x i8]* %1)
%4 = getelementptr inbounds [40 x i8], [40 x i8]* %1, i64 0, i64 0
%5 = ptrtoint i8* %4 to i8
ret i8 %5
}

LLVM IR (-O2):
@.str = [13 x i8] c"Enter name: \00"
@.str.1 = [3 x i8] c"%d\00"
define signext i8 @get_value() {
%1 = alloca [40 x i8]
%2 = getelementptr inbounds [40 x i8], [40 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), [40 x i8]* %1)
%5 = ptrtoint [40 x i8]* %1 to i64
%6 = trunc i64 %5 to i8
ret i8 %6
}
swap(int *x, int *y) {
  int t;
  t = *x;
  *x = *y;
  *y = t;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x1c(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret i32 undef
}
void RAWToYRow_C() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @DaoObjectLogger_PrintProfile() {
ret void
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int stat(char const *, struct stat *);
int state_GetFileInfo(const char *path) {
  struct stat buffer;
  int status = stat(path, &buffer);
  return !status;
}


x86 assembly (clang, -O0):
<state_GetFileInfo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <stat@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<state_GetFileInfo>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @state_GetFileInfo(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @stat(i8* %5, %struct.stat* %3)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @state_GetFileInfo(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
float cmToIn(float cm) { return cm / 2.54; }


x86 assembly (clang, -O0):
<cmToIn>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xee6(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmToIn>:
cvtss2sd %xmm0,%xmm0
divsd  0xef4(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @cmToIn(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fdiv double %4, 2.540000e+00
%6 = fptrunc double %5 to float
ret float %6
}

LLVM IR (-O2):
define float @cmToIn(float %0) {
%2 = fpext float %0 to double
%3 = fdiv double %2, 2.540000e+00
%4 = fptrunc double %3 to float
ret float %4
}
void X509_REVOKED_delete_ext(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @gtk_cell_renderer_activate() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ const uint8_t;

/* Variables and functions */
uint8_t hfp_subevent_microphone_volume_get_gain(const uint8_t *event) {
  return event[4];
}


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

x86 assembly (clang, -O2):
<hfp_subevent_microphone_volume_get_gain>:
mov    0x10(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @hfp_subevent_microphone_volume_get_gain(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 4
%3 = load i32, i32* %2
ret i32 %3
}
int foo3b(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @foo3b() {
ret i32 0
}
int run_test_always_win(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @run_test_always_win() {
ret i32 0
}
void gtk_tree_view_column_set_max_width() {}


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

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

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

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