xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ _hmt_count_cover(char *, int);
float atan2f(float, float);
float HMM_ATan2F(float Left, float Right) {
  { _hmt_count_cover("HMM_ATan2F", 472); };
  float Result = atan2f(Left, Right);
  return (Result);
}


x86 assembly (clang, -O0):
<HMM_ATan2F>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
lea    0xec7(%rip),%rdi
mov    $0x1d8,%esi
call   1030 <_hmt_count_cover@plt>
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1040 <atan2f@plt>
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HMM_ATan2F>:
push   %rax
movss  %xmm1,0x4(%rsp)
movss  %xmm0,(%rsp)
lea    0xecd(%rip),%rdi
mov    $0x1d8,%esi
call   1030 <_hmt_count_cover@plt>
movss  (%rsp),%xmm0
movss  0x4(%rsp),%xmm1
pop    %rax
jmp    1040 <atan2f@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"HMM_ATan2F\00"
define float @HMM_ATan2F(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %3
store float %1, float* %4
%6 = call i32 @_hmt_count_cover(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 472)
%7 = load float, float* %3
%8 = load float, float* %4
%9 = call float @atan2f(float %7, float %8)
store float %9, float* %5
%10 = load float, float* %5
ret float %10
}

LLVM IR (-O2):
@.str = [11 x i8] c"HMM_ATan2F\00"
define float @HMM_ATan2F(float %0, float %1) {
%3 = tail call i32 @_hmt_count_cover(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 472)
%4 = tail call float @atan2f(float %0, float %1)
ret float %4
}
/* Variables and functions */
scalar_t__ opaquePropertyCheck(void *);
int *dynCastToInt(void *ptr) {
  if (opaquePropertyCheck(ptr))
    return (int *)ptr;
  return 0;
}


x86 assembly (clang, -O0):
<dynCastToInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <opaquePropertyCheck@plt>
cmp    $0x0,%rax
je     113c <dynCastToInt+0x2c>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1144 <dynCastToInt+0x34>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dynCastToInt>:
push   %rbx
mov    %rdi,%rbx
call   1030 <opaquePropertyCheck@plt>
test   %rax,%rax
cmovne %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32* @dynCastToInt(i8* %0) {
%2 = tail call i64 @opaquePropertyCheck(i8* %0)
%3 = icmp eq i64 %2, 0
%4 = bitcast i8* %0 to i32*
%5 = select i1 %3, i32* null, i32* %4
ret i32* %5
}
int ft_itoalen(int n) {
  int i;
  i = 1;
  n /= 10;
  while (n != 0) {
    n /= 10;
    i++;
  }
  return (i);
}


x86 assembly (clang, -O0):
<ft_itoalen>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1142 <ft_itoalen+0x42>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    111c <ft_itoalen+0x1c>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_itoalen>:
lea    0x9(%rdi),%ecx
mov    $0x1,%eax
cmp    $0x13,%ecx
jb     1145 <ft_itoalen+0x45>
mov    $0x1,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
lea    (%rcx,%rdx,1),%edi
add    $0x1,%eax
add    %edx,%ecx
add    $0x9,%ecx
cmp    $0x12,%ecx
ja     1120 <ft_itoalen+0x20>
ret

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

LLVM IR (-O2):
define i32 @ft_itoalen(i32 %0) {
%2 = add i32 %0, 9
%3 = icmp ult i32 %2, 19
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 1, %1 ]
%6 = phi i32 [ %7, %4 ], [ %0, %1 ]
%7 = sdiv i32 %6, 10
%8 = add nuw nsw i32 %5, 1
%9 = add nsw i32 %7, 9
%10 = icmp ult i32 %9, 19
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 1, %1 ], [ %8, %4 ]
ret i32 %12
}
void inc_zcache_failed_getfreepages(void) {}


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

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

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

LLVM IR (-O2):
define void @inc_zcache_failed_getfreepages() {
ret void
}
int low_sign_extend(int x, int len) {
  return (x >> 1) - ((x & 1) << (len - 1));
}


x86 assembly (clang, -O0):
<low_sign_extend>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    -0x4(%rbp),%edx
and    $0x1,%edx
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
shl    %cl,%edx
mov    %edx,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<low_sign_extend>:
mov    %edi,%eax
sar    %eax
and    $0x1,%edi
lea    -0x1(%rsi),%ecx
shl    %cl,%edi
sub    %edi,%eax
ret

LLVM IR (-O0):
define i32 @low_sign_extend(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 = ashr i32 %5, 1
%7 = load i32, i32* %3
%8 = and i32 %7, 1
%9 = load i32, i32* %4
%10 = sub nsw i32 %9, 1
%11 = shl i32 %8, %10
%12 = sub nsw i32 %6, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @low_sign_extend(i32 %0, i32 %1) {
%3 = ashr i32 %0, 1
%4 = and i32 %0, 1
%5 = add nsw i32 %1, -1
%6 = shl nuw i32 %4, %5
%7 = sub nsw i32 %3, %6
ret i32 %7
}
/* Variables and functions */
int assign_coefficient_of_slice(int /*<<< orphan*/, int /*<<< orphan*/,
                                double *);
int set_standard_trace_slice(int first) {
  int fail;
  double r[2];
  r[1] = 0.0;
  if (first == 1)
    r[0] = -1.0;
  else
    r[0] = +1.0;
  fail = assign_coefficient_of_slice(0, 0, r);
  return fail;
}


x86 assembly (clang, -O0):
<set_standard_trace_slice>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    113f <set_standard_trace_slice+0x2f>
movsd  0xed3(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    114c <set_standard_trace_slice+0x3c>
movsd  0xeb9(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
lea    -0x20(%rbp),%rdx
xor    %esi,%esi
mov    %esi,%edi
call   1030 <assign_coefficient_of_slice@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_standard_trace_slice>:
sub    $0x18,%rsp
xor    %eax,%eax
cmp    $0x1,%edi
sete   %al
movq   $0x0,0x8(%rsp)
lea    0xed4(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm0
movsd  %xmm0,(%rsp)
mov    %rsp,%rdx
xor    %edi,%edi
xor    %esi,%esi
call   1030 <assign_coefficient_of_slice@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @set_standard_trace_slice(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca [2 x double]
store i32 %0, i32* %2
%5 = getelementptr inbounds [2 x double], [2 x double]* %4, i64 0, i64 1
store double 0.000000e+00, double* %5
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = getelementptr inbounds [2 x double], [2 x double]* %4, i64 0, i64 0
store double -1.000000e+00, double* %9
br label %12
10: ; preds = %1
%11 = getelementptr inbounds [2 x double], [2 x double]* %4, i64 0, i64 0
store double 1.000000e+00, double* %11
br label %12
12: ; preds = %10, %8
%13 = getelementptr inbounds [2 x double], [2 x double]* %4, i64 0, i64 0
%14 = call i32 @assign_coefficient_of_slice(i32 0, i32 0, double* %13)
store i32 %14, i32* %3
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
define i32 @set_standard_trace_slice(i32 %0) {
%2 = alloca [2 x double]
%3 = bitcast [2 x double]* %2 to i8*
%4 = getelementptr inbounds [2 x double], [2 x double]* %2, i64 0, i64 1
store double 0.000000e+00, double* %4
%5 = icmp eq i32 %0, 1
%6 = select i1 %5, double -1.000000e+00, double 1.000000e+00
%7 = getelementptr inbounds [2 x double], [2 x double]* %2, i64 0, i64 0
store double %6, double* %7
%8 = call i32 @assign_coefficient_of_slice(i32 0, i32 0, double* %7)
ret i32 %8
}
/* Variables and functions */
bool is_spellable(const char *word) { return *word > 'k'; }


x86 assembly (clang, -O0):
<is_spellable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x6b,%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_spellable>:
xor    %eax,%eax
cmpb   $0x6c,(%rdi)
setge  %al
ret

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

LLVM IR (-O2):
define i32 @is_spellable(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp sgt i8 %2, 107
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
size_t heap_right(size_t i) { return 2 * i + 2; }


x86 assembly (clang, -O0):
<heap_right>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shl    $0x1,%rax
add    $0x2,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<heap_right>:
lea    (%rdi,%rdi,1),%rax
add    $0x2,%rax
ret

LLVM IR (-O0):
define i64 @heap_right(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = mul i64 2, %3
%5 = add i64 %4, 2
ret i64 %5
}

LLVM IR (-O2):
define i64 @heap_right(i64 %0) {
%2 = shl i64 %0, 1
%3 = add i64 %2, 2
ret i64 %3
}
/* Type definitions */
struct PMASK {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ deinit_pmask(struct PMASK *);
int /*<<< orphan*/ free(struct PMASK *);
void destroy_pmask(struct PMASK *mask) {
  deinit_pmask(mask);
  free(mask);
  return;
}


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

x86 assembly (clang, -O2):
<destroy_pmask>:
push   %rbx
mov    %rdi,%rbx
call   1040 <deinit_pmask@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.PMASK = type { i32 }
define void @destroy_pmask(%struct.PMASK* %0) {
%2 = alloca %struct.PMASK*
store %struct.PMASK* %0, %struct.PMASK** %2
%3 = load %struct.PMASK*, %struct.PMASK** %2
%4 = call i32 @deinit_pmask(%struct.PMASK* %3)
%5 = load %struct.PMASK*, %struct.PMASK** %2
%6 = call i32 @free(%struct.PMASK* %5)
ret void
}

LLVM IR (-O2):
%struct.PMASK = type { i32 }
define void @destroy_pmask(%struct.PMASK* %0) {
%2 = tail call i32 @deinit_pmask(%struct.PMASK* %0)
%3 = tail call i32 @free(%struct.PMASK* %0)
ret void
}
int _count_bytes_in_use(const unsigned char *data, const int length) {
  int i;
  for (i = length - 1; i >= 0; i--) {
    if (data[i] != 0) {
      return i + 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<_count_bytes_in_use>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jl     1154 <_count_bytes_in_use+0x54>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1141 <_count_bytes_in_use+0x41>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    115b <_count_bytes_in_use+0x5b>
jmp    1146 <_count_bytes_in_use+0x46>
mov    -0x18(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
jmp    1114 <_count_bytes_in_use+0x14>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_count_bytes_in_use>:
mov    %esi,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
test   %ecx,%ecx
jle    1126 <_count_bytes_in_use+0x26>
lea    -0x1(%rcx),%rax
cmpb   $0x0,-0x1(%rdi,%rcx,1)
mov    %rax,%rcx
je     1110 <_count_bytes_in_use+0x10>
add    $0x1,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @_count_bytes_in_use(i8* nocapture %0, i32 %1) {
%3 = zext i32 %1 to i64
br label %4
4: ; preds = %9, %2
%5 = phi i64 [ %6, %9 ], [ %3, %2 ]
%6 = add nsw i64 %5, -1
%7 = trunc i64 %5 to i32
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %15
9: ; preds = %4
%10 = getelementptr inbounds i8, i8* %0, i64 %6
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %4, label %13
13: ; preds = %9
%14 = trunc i64 %5 to i32
br label %15
15: ; preds = %4, %13
%16 = phi i32 [ %14, %13 ], [ 0, %4 ]
ret i32 %16
}
/* Variables and functions */
int lrand48();
int myrandom() { return lrand48() & 0xffffffff; }


x86 assembly (clang, -O0):
<myrandom>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <lrand48@plt>
and    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @myrandom() {
%1 = call i32 (...) @lrand48()
%2 = and i32 %1, -1
ret i32 %2
}

LLVM IR (-O2):
define i32 @myrandom() {
%1 = tail call i32 (...) @lrand48()
ret i32 %1
}
/* Type definitions */
struct PdSocket {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ IPPROTO_TCP;
int /*<<< orphan*/ TCP_NODELAY;
int pd_socket_int_option(struct PdSocket *, int /*<<< orphan*/,
                         int /*<<< orphan*/, int);
int pd_socket_tcp_nodelay(struct PdSocket *sock, int on) {
  return pd_socket_int_option(sock, IPPROTO_TCP, TCP_NODELAY, on);
}


x86 assembly (clang, -O0):
<pd_socket_tcp_nodelay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb6(%rip),%rax
mov    (%rax),%esi
mov    0x2eb5(%rip),%rax
mov    (%rax),%edx
mov    -0xc(%rbp),%ecx
call   1030 <pd_socket_int_option@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pd_socket_tcp_nodelay>:
mov    %esi,%ecx
mov    0x2ec7(%rip),%rax
mov    (%rax),%esi
mov    0x2ec6(%rip),%rax
mov    (%rax),%edx
jmp    1030 <pd_socket_int_option@plt>

LLVM IR (-O0):
%struct.PdSocket = type { i32 }
@IPPROTO_TCP = global i32 0
@TCP_NODELAY = global i32 0
define i32 @pd_socket_tcp_nodelay(%struct.PdSocket* %0, i32 %1) {
%3 = alloca %struct.PdSocket*
%4 = alloca i32
store %struct.PdSocket* %0, %struct.PdSocket** %3
store i32 %1, i32* %4
%5 = load %struct.PdSocket*, %struct.PdSocket** %3
%6 = load i32, i32* @IPPROTO_TCP
%7 = load i32, i32* @TCP_NODELAY
%8 = load i32, i32* %4
%9 = call i32 @pd_socket_int_option(%struct.PdSocket* %5, i32 %6, i32 %7, i32 %8)
ret i32 %9
}

LLVM IR (-O2):
%struct.PdSocket = type { i32 }
@IPPROTO_TCP = global i32 0
@TCP_NODELAY = global i32 0
define i32 @pd_socket_tcp_nodelay(%struct.PdSocket* %0, i32 %1) {
%3 = load i32, i32* @IPPROTO_TCP
%4 = load i32, i32* @TCP_NODELAY
%5 = tail call i32 @pd_socket_int_option(%struct.PdSocket* %0, i32 %3, i32 %4, i32 %1)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr, "npfs: -d -s -p port -w nthreads\n");
  exit(-1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [33 x i8] c"npfs: -d -s -p port -w nthreads\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [33 x i8] c"npfs: -d -s -p port -w nthreads\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 -1)
unreachable
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int /*<<< orphan*/ si_pid;
};
typedef TYPE_1__ siginfo_t;

/* Variables and functions */
int SIGCHLD;
int SIGUSR1;
int /*<<< orphan*/ notified(int, int /*<<< orphan*/, int /*<<< orphan*/);
void handler(int sig, siginfo_t *siginfo, void *ignore) {
  (void)siginfo;
  (void)ignore;
  ;
  if (sig == SIGUSR1) {
    notified(sig, siginfo->si_pid, 0);
  } else if (sig == SIGCHLD) {
    ;
  } else {
    ;
  }
}


x86 assembly (clang, -O0):
<handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2ebb(%rip),%rcx
cmp    (%rcx),%eax
jne    114a <handler+0x3a>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <notified@plt>
jmp    116b <handler+0x5b>
mov    -0x4(%rbp),%eax
mov    0x2e8c(%rip),%rcx
cmp    (%rcx),%eax
jne    1161 <handler+0x51>
jmp    1166 <handler+0x56>
jmp    1166 <handler+0x56>
jmp    116b <handler+0x5b>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handler>:
mov    0x2ed1(%rip),%rax
cmp    %edi,(%rax)
jne    1124 <handler+0x14>
mov    (%rsi),%esi
xor    %edx,%edx
jmp    1030 <notified@plt>
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32 }
@SIGUSR1 = global i32 0
@SIGCHLD = global i32 0
define void @handler(i32 %0, %struct.TYPE_3__* %1, i8* %2) {
%4 = alloca i32
%5 = alloca %struct.TYPE_3__*
%6 = alloca i8*
store i32 %0, i32* %4
store %struct.TYPE_3__* %1, %struct.TYPE_3__** %5
store i8* %2, i8** %6
%7 = load %struct.TYPE_3__*, %struct.TYPE_3__** %5
%8 = load i8*, i8** %6
%9 = load i32, i32* %4
%10 = load i32, i32* @SIGUSR1
%11 = icmp eq i32 %9, %10
br i1 %11, label %12, label %18
12: ; preds = %3
%13 = load i32, i32* %4
%14 = load %struct.TYPE_3__*, %struct.TYPE_3__** %5
%15 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %14, i32 0, i32 0
%16 = load i32, i32* %15
%17 = call i32 @notified(i32 %13, i32 %16, i32 0)
br label %25
18: ; preds = %3
%19 = load i32, i32* %4
%20 = load i32, i32* @SIGCHLD
%21 = icmp eq i32 %19, %20
br i1 %21, label %22, label %23
22: ; preds = %18
br label %24
23: ; preds = %18
br label %24
24: ; preds = %23, %22
br label %25
25: ; preds = %24, %12
ret void
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32 }
@SIGUSR1 = global i32 0
@SIGCHLD = global i32 0
define void @handler(i32 %0, %struct.TYPE_3__* nocapture %1, i8* nocapture readnone %2) {
%4 = load i32, i32* @SIGUSR1
%5 = icmp eq i32 %4, %0
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %1, i64 0, i32 0
%8 = load i32, i32* %7
%9 = tail call i32 @notified(i32 %0, i32 %8, i32 0)
br label %10
10: ; preds = %3, %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_version(void) {
  printf("hodie %s\n", "1.4");
  printf("\nCopyright (c) 2000, Mikael Johansson\n");
  printf("Released under MIT-style license. Please read the file\n");
  printf("LICENSE distributed with the source code for details\n");
}


x86 assembly (clang, -O0):
<print_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee8(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf21(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_version>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xedb(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed1(%rip),%rdi
call   1030 <puts@plt>
lea    0xeeb(%rip),%rdi
call   1030 <puts@plt>
lea    0xf16(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"hodie %s\0A\00"
@.str.1 = [4 x i8] c"1.4\00"
@.str.2 = [39 x i8] c"\0ACopyright (c) 2000, Mikael Johansson\0A\00"
@.str.3 = [56 x i8] c"Released under MIT-style license. Please read the file\0A\00"
@.str.4 = [54 x i8] c"LICENSE distributed with the source code for details\0A\00"
define void @print_version() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.3, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"hodie %s\0A\00"
@.str.1 = [4 x i8] c"1.4\00"
@str = [38 x i8] c"\0ACopyright (c) 2000, Mikael Johansson\00"
@str.5 = [55 x i8] c"Released under MIT-style license. Please read the file\00"
@str.6 = [53 x i8] c"LICENSE distributed with the source code for details\00"
define void @print_version() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.6, i64 0, i64 0))
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  long tv_sec;
};
struct itimerval {
  TYPE_1__ it_interval;
};

/* Variables and functions */
void _set_itimerval_interval_tvsec(struct itimerval *timer, long tv_sec) {
  timer->it_interval.tv_sec = tv_sec;
}


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

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

LLVM IR (-O0):
%struct.itimerval = type { %struct.TYPE_2__ }
%struct.TYPE_2__ = type { i64 }
define void @_set_itimerval_interval_tvsec(%struct.itimerval* %0, i64 %1) {
%3 = alloca %struct.itimerval*
%4 = alloca i64
store %struct.itimerval* %0, %struct.itimerval** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load %struct.itimerval*, %struct.itimerval** %3
%7 = getelementptr inbounds %struct.itimerval, %struct.itimerval* %6, i32 0, i32 0
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
%struct.itimerval = type { %struct.TYPE_2__ }
%struct.TYPE_2__ = type { i64 }
define void @_set_itimerval_interval_tvsec(%struct.itimerval* nocapture writeonly %0, i64 %1) {
%3 = getelementptr inbounds %struct.itimerval, %struct.itimerval* %0, i64 0, i32 0, i32 0
store i64 %1, i64* %3
ret void
}
struct _Locale_name_hint *
_Locale_get_messages_hint(struct _Locale_messages *messages
                          __attribute__((__unused__))) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct._Locale_name_hint = type opaque
%struct._Locale_messages = type opaque
define %struct._Locale_name_hint* @_Locale_get_messages_hint(%struct._Locale_messages* %0) {
%2 = alloca %struct._Locale_messages*
store %struct._Locale_messages* %0, %struct._Locale_messages** %2
ret %struct._Locale_name_hint* null
}

LLVM IR (-O2):
%struct._Locale_name_hint = type opaque
%struct._Locale_messages = type opaque
define noalias %struct._Locale_name_hint* @_Locale_get_messages_hint(%struct._Locale_messages* nocapture readnone %0) {
ret %struct._Locale_name_hint* null
}
int CClinkern_flipper_reset(ncount)
int ncount;
{ return 0; }


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

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

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

LLVM IR (-O2):
define i32 @CClinkern_flipper_reset(i32 %0) {
ret i32 0
}
/* Type definitions */
typedef unsigned long volatile uint32_t;

/* Variables and functions */
uint32_t I2CSlaveIntStatus(uint32_t ui32Base, bool bMasked) {
  ;
  if (bMasked) {
    return ((*((volatile unsigned long *)(0x40002000 + 0x00000014))));
  } else {
    return ((*((volatile unsigned long *)(0x40002000 + 0x00000010))));
  }
}


x86 assembly (clang, -O0):
<I2CSlaveIntStatus>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1126 <I2CSlaveIntStatus+0x26>
mov    $0x40002014,%eax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
jmp    1132 <I2CSlaveIntStatus+0x32>
mov    $0x40002010,%eax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2CSlaveIntStatus>:
mov    %rdi,-0x8(%rsp)
xor    %eax,%eax
test   %esi,%esi
setne  %al
mov    0x40002010(,%rax,4),%rax
40
ret

LLVM IR (-O0):
define i64 @I2CSlaveIntStatus(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i32
store volatile i64 %0, i64* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load volatile i64, i64* inttoptr (i64 1073750036 to i64*)
store i64 %9, i64* %3
br label %12
10: ; preds = %2
%11 = load volatile i64, i64* inttoptr (i64 1073750032 to i64*)
store i64 %11, i64* %3
br label %12
12: ; preds = %10, %8
%13 = load i64, i64* %3
ret i64 %13
}

LLVM IR (-O2):
define i64 @I2CSlaveIntStatus(i64 %0, i32 %1) {
%3 = alloca i64
store volatile i64 %0, i64* %3
%4 = icmp eq i32 %1, 0
%5 = select i1 %4, i64* inttoptr (i64 1073750032 to i64*), i64* inttoptr (i64 1073750036 to i64*)
%6 = load volatile i64, i64* %5
ret i64 %6
}
/* Variables and functions */
scalar_t__ connection_lookup(char *);
int connection_exist(char *name) { return (connection_lookup(name) != 0); }


x86 assembly (clang, -O0):
<connection_exist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <connection_lookup@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<connection_exist>:
push   %rax
call   1030 <connection_lookup@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @connection_exist(i8* %0) {
%2 = tail call i64 @connection_lookup(i8* %0)
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int getticks();
int sys_getticks(void) {
  int i = getticks();
  return i;
}


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

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

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

LLVM IR (-O2):
define i32 @sys_getticks() {
%1 = tail call i32 (...) @getticks()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char *s[4] = {"C Programming Language", "Asembly Language", "Data structure",
                "Natural Language"};
  printf("%s", s[0]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2cda(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0x2cd7(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0x2cd4(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2cd1(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x30(%rbp),%rsi
lea    0xef2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeff(%rip),%rdi
lea    0xee1(%rip),%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"C Programming Language\00"
@.str.1 = [17 x i8] c"Asembly Language\00"
@.str.2 = [15 x i8] c"Data structure\00"
@.str.3 = [17 x i8] c"Natural Language\00"
@__const.main.s = [4 x i8*] [i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i32 0, i32 0)]
@.str.4 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x i8*]
store i32 0, i32* %1
%3 = bitcast [4 x i8*]* %2 to i8*
%4 = getelementptr inbounds [4 x i8*], [4 x i8*]* %2, i64 0, i64 0
%5 = load i8*, i8** %4
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"C Programming Language\00"
@.str.4 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ skip(char *);
int /*<<< orphan*/ strcmp(int /*<<< orphan*/, int /*<<< orphan*/);
int equal(char *s1, char *s2) { return !strcmp(skip(s1), skip(s2)); }


x86 assembly (clang, -O0):
<equal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <skip@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <skip@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%esi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<equal>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
call   1030 <skip@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <skip@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1040 <strcmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @equal(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = call i32 @skip(i8* %5)
%7 = load i8*, i8** %4
%8 = call i32 @skip(i8* %7)
%9 = call i32 @strcmp(i32 %6, i32 %8)
%10 = icmp ne i32 %9, 0
%11 = xor i1 %10, true
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @equal(i8* %0, i8* %1) {
%3 = tail call i32 @skip(i8* %0)
%4 = tail call i32 @skip(i8* %1)
%5 = tail call i32 @strcmp(i32 %3, i32 %4)
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
char TOSH_READ_HUM_SDA_PIN();
char HUMIDITY_GET_DATA() { return TOSH_READ_HUM_SDA_PIN(); }


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

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

LLVM IR (-O0):
define signext i8 @HUMIDITY_GET_DATA() {
%1 = call signext i8 (...) @TOSH_READ_HUM_SDA_PIN()
ret i8 %1
}

LLVM IR (-O2):
define signext i8 @HUMIDITY_GET_DATA() {
%1 = tail call signext i8 (...) @TOSH_READ_HUM_SDA_PIN()
ret i8 %1
}
/* Type definitions */
struct dm_ioctl {
  int /*<<< orphan*/ uuid;
};

/* Variables and functions */
int /*<<< orphan*/ DM_UUID_LEN;
int copy_string(int /*<<< orphan*/, char const *, int /*<<< orphan*/);
int copy_uuid(struct dm_ioctl *ctl, const char *uuid) {
  return copy_string(ctl->uuid, uuid, DM_UUID_LEN);
}


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

x86 assembly (clang, -O2):
<copy_uuid>:
mov    (%rdi),%edi
mov    0x2ecf(%rip),%rax
mov    (%rax),%edx
jmp    1030 <copy_string@plt>

LLVM IR (-O0):
%struct.dm_ioctl = type { i32 }
@DM_UUID_LEN = global i32 0
define i32 @copy_uuid(%struct.dm_ioctl* %0, i8* %1) {
%3 = alloca %struct.dm_ioctl*
%4 = alloca i8*
store %struct.dm_ioctl* %0, %struct.dm_ioctl** %3
store i8* %1, i8** %4
%5 = load %struct.dm_ioctl*, %struct.dm_ioctl** %3
%6 = getelementptr inbounds %struct.dm_ioctl, %struct.dm_ioctl* %5, i32 0, i32 0
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = load i32, i32* @DM_UUID_LEN
%10 = call i32 @copy_string(i32 %7, i8* %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.dm_ioctl = type { i32 }
@DM_UUID_LEN = global i32 0
define i32 @copy_uuid(%struct.dm_ioctl* nocapture %0, i8* %1) {
%3 = getelementptr inbounds %struct.dm_ioctl, %struct.dm_ioctl* %0, i64 0, i32 0
%4 = load i32, i32* %3
%5 = load i32, i32* @DM_UUID_LEN
%6 = tail call i32 @copy_string(i32 %4, i8* %1, i32 %5)
ret i32 %6
}
int array_sum(int array[]) {
  int i, sum = 0;
  for (i = 0; i < 32; i++) {
    sum += array[i];
  }
  return sum;
}


x86 assembly (clang, -O0):
<array_sum>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x20,-0xc(%rbp)
jge    113f <array_sum+0x3f>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1116 <array_sum+0x16>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<array_sum>:
movdqu 0x50(%rdi),%xmm0
movdqu 0x70(%rdi),%xmm1
movdqu 0x40(%rdi),%xmm2
movdqu 0x60(%rdi),%xmm3
movdqu (%rdi),%xmm4
paddd  %xmm2,%xmm4
movdqu 0x10(%rdi),%xmm2
paddd  %xmm0,%xmm2
movdqu 0x20(%rdi),%xmm0
paddd  %xmm3,%xmm0
paddd  %xmm4,%xmm0
movdqu 0x30(%rdi),%xmm3
paddd  %xmm1,%xmm3
paddd  %xmm2,%xmm3
paddd  %xmm0,%xmm3
pshufd $0xee,%xmm3,%xmm0
paddd  %xmm3,%xmm0
pshufd $0x55,%xmm0,%xmm1
paddd  %xmm0,%xmm1
movd   %xmm1,%eax
ret

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

LLVM IR (-O2):
define i32 @array_sum(i32* nocapture %0) {
%2 = bitcast i32* %0 to <32 x i32>*
%3 = load <32 x i32>, <32 x i32>* %2
%4 = call i32 @llvm.vector.reduce.add.v32i32(<32 x i32> %3)
ret i32 %4
}
void rop3_101_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = ~T;
  stk2 = S | stk3;
  stk1 = *D ^ stk2;
  *D = stk1;
}


x86 assembly (clang, -O0):
<rop3_101_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xd(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xd(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_101_0_0>:
not    %dl
or     %sil,%dl
xor    %dl,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_101_0_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8, i8* %6
%11 = zext i8 %10 to i32
%12 = xor i32 %11, -1
%13 = trunc i32 %12 to i8
store i8 %13, i8* %9
%14 = load i8, i8* %5
%15 = zext i8 %14 to i32
%16 = load i8, i8* %9
%17 = zext i8 %16 to i32
%18 = or i32 %15, %17
%19 = trunc i32 %18 to i8
store i8 %19, i8* %8
%20 = load i8*, i8** %4
%21 = load i8, i8* %20
%22 = zext i8 %21 to i32
%23 = load i8, i8* %8
%24 = zext i8 %23 to i32
%25 = xor i32 %22, %24
%26 = trunc i32 %25 to i8
store i8 %26, i8* %7
%27 = load i8, i8* %7
%28 = load i8*, i8** %4
store i8 %27, i8* %28
ret void
}

LLVM IR (-O2):
define void @rop3_101_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = xor i8 %2, -1
%5 = or i8 %4, %1
%6 = load i8, i8* %0
%7 = xor i8 %6, %5
store i8 %7, i8* %0
ret void
}
/* Type definitions */
struct timeval {
  int tv_sec;
  long tv_usec;
};

/* Variables and functions */
long time_diff_us(struct timeval time1, struct timeval time2) {
  return (time2.tv_sec - time1.tv_sec) * 1000000 +
         (time2.tv_usec - time1.tv_usec);
}


x86 assembly (clang, -O0):
<time_diff_us>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x10(%rbp)
mov    %rsi,-0x8(%rbp)
mov    %edx,-0x20(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x20(%rbp),%eax
sub    -0x10(%rbp),%eax
imul   $0xf4240,%eax,%eax
cltq
mov    -0x18(%rbp),%rcx
sub    -0x8(%rbp),%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<time_diff_us>:
sub    %edi,%edx
imul   $0xf4240,%edx,%eax
cltq
sub    %rsi,%rcx
add    %rcx,%rax
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i64 }
define i64 @time_diff_us(i32 %0, i64 %1, i32 %2, i64 %3) {
%5 = alloca %struct.timeval
%6 = alloca %struct.timeval
%7 = bitcast %struct.timeval* %5 to { i32, i64 }*
%8 = getelementptr inbounds { i32, i64 }, { i32, i64 }* %7, i32 0, i32 0
store i32 %0, i32* %8
%9 = getelementptr inbounds { i32, i64 }, { i32, i64 }* %7, i32 0, i32 1
store i64 %1, i64* %9
%10 = bitcast %struct.timeval* %6 to { i32, i64 }*
%11 = getelementptr inbounds { i32, i64 }, { i32, i64 }* %10, i32 0, i32 0
store i32 %2, i32* %11
%12 = getelementptr inbounds { i32, i64 }, { i32, i64 }* %10, i32 0, i32 1
store i64 %3, i64* %12
%13 = getelementptr inbounds %struct.timeval, %struct.timeval* %6, i32 0, i32 0
%14 = load i32, i32* %13
%15 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i32 0, i32 0
%16 = load i32, i32* %15
%17 = sub nsw i32 %14, %16
%18 = mul nsw i32 %17, 1000000
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds %struct.timeval, %struct.timeval* %6, i32 0, i32 1
%21 = load i64, i64* %20
%22 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i32 0, i32 1
%23 = load i64, i64* %22
%24 = sub nsw i64 %21, %23
%25 = add nsw i64 %19, %24
ret i64 %25
}

LLVM IR (-O2):
define i64 @time_diff_us(i32 %0, i64 %1, i32 %2, i64 %3) {
%5 = sub nsw i32 %2, %0
%6 = mul nsw i32 %5, 1000000
%7 = sext i32 %6 to i64
%8 = sub i64 %3, %1
%9 = add nsw i64 %8, %7
ret i64 %9
}
/* Variables and functions */
int /*<<< orphan*/ SYS_setreuid;
int syscall(int /*<<< orphan*/, int, int);
int sreuid(int a, int b) { return syscall(SYS_setreuid, a, b); }


x86 assembly (clang, -O0):
<sreuid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    0x2ebb(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sreuid>:
mov    %esi,%edx
mov    %edi,%esi
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
@SYS_setreuid = global i32 0
define i32 @sreuid(i32 %0, i32 %1) {
%3 = load i32, i32* @SYS_setreuid
%4 = tail call i32 @syscall(i32 %3, i32 %0, i32 %1)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ X509_ALGOR;

/* Variables and functions */
scalar_t__ ASN1_item_new(int /*<<< orphan*/ *);
int /*<<< orphan*/ X509_ALGOR_it;
X509_ALGOR *X509_ALGOR_new(void) {
  return (X509_ALGOR *)ASN1_item_new(&X509_ALGOR_it);
}


x86 assembly (clang, -O0):
<X509_ALGOR_new>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rdi
call   1030 <ASN1_item_new@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<X509_ALGOR_new>:
mov    0x2ed1(%rip),%rdi
jmp    1030 <ASN1_item_new@plt>

LLVM IR (-O0):
@X509_ALGOR_it = global i32 0
define i32* @X509_ALGOR_new() {
%1 = call i64 @ASN1_item_new(i32* @X509_ALGOR_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}

LLVM IR (-O2):
@X509_ALGOR_it = global i32 0
define i32* @X509_ALGOR_new() {
%1 = tail call i64 @ASN1_item_new(i32* @X509_ALGOR_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}
/* Variables and functions */
int syscall_wait(int *);
int wait(int *status) { return syscall_wait(status); }


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

x86 assembly (clang, -O2):
<wait>:
jmp    1030 <syscall_wait@plt>

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

LLVM IR (-O2):
define i32 @wait(i32* %0) {
%2 = tail call i32 @syscall_wait(i32* %0)
ret i32 %2
}
/* Type definitions */
typedef int int8_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ fprintf(int /*<<< orphan*/ *, char *, int);
bool write_4(FILE *this, int8_t x) { return fprintf(this, "%c", x) >= 0; }


x86 assembly (clang, -O0):
<write_4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xed3(%rip),%rsi
call   1030 <fprintf@plt>
cmp    $0x0,%rax
setge  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_4>:
push   %rax
mov    %esi,%edx
lea    0xee6(%rip),%rsi
call   1030 <fprintf@plt>
shr    $0x3f,%rax
xor    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
define i32 @write_4(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 i64 @fprintf(i32* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = icmp sge i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define i32 @write_4(i32* nocapture %0, i32 %1) {
%3 = tail call i64 @fprintf(i32* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
%4 = lshr i64 %3, 63
%5 = trunc i64 %4 to i32
%6 = xor i32 %5, 1
ret i32 %6
}
/* Variables and functions */
unsigned long hash_long(uintptr_t, unsigned int);
unsigned long hash_ptr(void *ptr, unsigned int bits) {
  return hash_long((uintptr_t)ptr, bits);
}


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

x86 assembly (clang, -O2):
<hash_ptr>:
jmp    1030 <hash_long@plt>

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

LLVM IR (-O2):
define i64 @hash_ptr(i8* %0, i32 %1) {
%3 = ptrtoint i8* %0 to i64
%4 = tail call i64 @hash_long(i64 %3, i32 %1)
ret i64 %4
}
/* Variables and functions */
int __getdtablesize();
int _rpc_dtablesize(void) {
  static int size;
  if (size == 0)
    size = __getdtablesize();
  return size;
}


x86 assembly (clang, -O0):
<_rpc_dtablesize>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,0x2f11(%rip)
jne    112e <_rpc_dtablesize+0x1e>
mov    $0x0,%al
call   1030 <__getdtablesize@plt>
mov    %eax,0x2efe(%rip)
mov    0x2ef8(%rip),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_rpc_dtablesize>:
push   %rax
mov    0x2f15(%rip),%eax
test   %eax,%eax
je     111d <_rpc_dtablesize+0xd>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <__getdtablesize@plt>
mov    %eax,0x2f02(%rip)
pop    %rcx
ret

LLVM IR (-O0):
@_rpc_dtablesize.size = internal global i32 0
define i32 @_rpc_dtablesize() {
%1 = load i32, i32* @_rpc_dtablesize.size
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 (...) @__getdtablesize()
store i32 %4, i32* @_rpc_dtablesize.size
br label %5
5: ; preds = %3, %0
%6 = load i32, i32* @_rpc_dtablesize.size
ret i32 %6
}

LLVM IR (-O2):
@_rpc_dtablesize.size = internal unnamed_addr global i32 0
define i32 @_rpc_dtablesize() {
%1 = load i32, i32* @_rpc_dtablesize.size
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @__getdtablesize()
store i32 %4, i32* @_rpc_dtablesize.size
br label %5
5: ; preds = %3, %0
%6 = phi i32 [ %4, %3 ], [ %1, %0 ]
ret i32 %6
}
/* Variables and functions */
scalar_t__ strlen(char const *);
unsigned int size_name(const void *_name) {
  return (unsigned int)(1 + strlen((const char *)_name));
}


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

x86 assembly (clang, -O2):
<size_name>:
push   %rax
call   1030 <strlen@plt>
add    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @size_name(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strlen(i8* %3)
%5 = add nsw i64 1, %4
%6 = trunc i64 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @size_name(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = trunc i64 %2 to i32
%4 = add i32 %3, 1
ret i32 %4
}
void test_storage_class() {
  static a;
  auto b;
  register c;
  static int d;
  auto int e;
  register int f;
}


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

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

LLVM IR (-O0):
@test_storage_class.a = internal global i32 0
@test_storage_class.d = internal global i32 0
define void @test_storage_class() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
ret void
}

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