xunge/DecIR huggingface dataset:
/* Type definitions */
struct Cyc_IOEffect_Fenv {
  int dummy;
};
struct Cyc_Absyn_Exp {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/
Cyc_IOEffect_register_exp_succs_generic(struct Cyc_IOEffect_Fenv *,
                                        struct Cyc_Absyn_Exp *,
                                        int /*<<< orphan*/, int);
void Cyc_IOEffect_register_exp_throwsany(struct Cyc_IOEffect_Fenv *env,
                                         struct Cyc_Absyn_Exp *e) {
  ({ Cyc_IOEffect_register_exp_succs_generic(env, e, 0, 1); });
}


x86 assembly (clang, -O0):
<Cyc_IOEffect_register_exp_throwsany>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
xor    %edx,%edx
mov    $0x1,%ecx
call   1030 <Cyc_IOEffect_register_exp_succs_generic@plt>
mov    %eax,-0x14(%rbp)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_IOEffect_register_exp_throwsany>:
xor    %edx,%edx
mov    $0x1,%ecx
jmp    1030 <Cyc_IOEffect_register_exp_succs_generic@plt>

LLVM IR (-O0):
%struct.Cyc_IOEffect_Fenv = type { i32 }
%struct.Cyc_Absyn_Exp = type { i32 }
define void @Cyc_IOEffect_register_exp_throwsany(%struct.Cyc_IOEffect_Fenv* %0, %struct.Cyc_Absyn_Exp* %1) {
%3 = alloca %struct.Cyc_IOEffect_Fenv*
%4 = alloca %struct.Cyc_Absyn_Exp*
%5 = alloca i32
store %struct.Cyc_IOEffect_Fenv* %0, %struct.Cyc_IOEffect_Fenv** %3
store %struct.Cyc_Absyn_Exp* %1, %struct.Cyc_Absyn_Exp** %4
%6 = load %struct.Cyc_IOEffect_Fenv*, %struct.Cyc_IOEffect_Fenv** %3
%7 = load %struct.Cyc_Absyn_Exp*, %struct.Cyc_Absyn_Exp** %4
%8 = call i32 @Cyc_IOEffect_register_exp_succs_generic(%struct.Cyc_IOEffect_Fenv* %6, %struct.Cyc_Absyn_Exp* %7, i32 0, i32 1)
store i32 %8, i32* %5
%9 = load i32, i32* %5
ret void
}

LLVM IR (-O2):
%struct.Cyc_IOEffect_Fenv = type { i32 }
%struct.Cyc_Absyn_Exp = type { i32 }
define void @Cyc_IOEffect_register_exp_throwsany(%struct.Cyc_IOEffect_Fenv* %0, %struct.Cyc_Absyn_Exp* %1) {
%3 = tail call i32 @Cyc_IOEffect_register_exp_succs_generic(%struct.Cyc_IOEffect_Fenv* %0, %struct.Cyc_Absyn_Exp* %1, i32 0, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ns_sleep(int);
void ms_sleep(int ms) { ns_sleep(ms * 1e6); }


x86 assembly (clang, -O0):
<ms_sleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xed8(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <ns_sleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ms_sleep>:
cvtsi2sd %edi,%xmm0
mulsd  0xee4(%rip),%xmm0
cvttsd2si %xmm0,%edi
jmp    1030 <ns_sleep@plt>

LLVM IR (-O0):
define void @ms_sleep(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sitofp i32 %3 to double
%5 = fmul double %4, 1.000000e+06
%6 = fptosi double %5 to i32
%7 = call i32 @ns_sleep(i32 %6)
ret void
}

LLVM IR (-O2):
define void @ms_sleep(i32 %0) {
%2 = sitofp i32 %0 to double
%3 = fmul double %2, 1.000000e+06
%4 = fptosi double %3 to i32
%5 = tail call i32 @ns_sleep(i32 %4)
ret void
}
/* Type definitions */
struct nlattr {
  int nla_type;
};

/* Variables and functions */
int nla_type(const struct nlattr *nla) { return nla->nla_type & ~0; }


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

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

LLVM IR (-O0):
%struct.nlattr = type { i32 }
define i32 @nla_type(%struct.nlattr* %0) {
%2 = alloca %struct.nlattr*
store %struct.nlattr* %0, %struct.nlattr** %2
%3 = load %struct.nlattr*, %struct.nlattr** %2
%4 = getelementptr inbounds %struct.nlattr, %struct.nlattr* %3, i32 0, i32 0
%5 = load i32, i32* %4
%6 = and i32 %5, -1
ret i32 %6
}

LLVM IR (-O2):
%struct.nlattr = type { i32 }
define i32 @nla_type(%struct.nlattr* nocapture %0) {
%2 = getelementptr inbounds %struct.nlattr, %struct.nlattr* %0, i64 0, i32 0
%3 = load i32, i32* %2
ret i32 %3
}
main() {
  int i;
  while (1)
    i++;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    %eax,-0x8(%rbp)
jmp    110b <main+0xb>

x86 assembly (clang, -O2):
<main>:
jmp    1100 <main>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %0, %3
%4 = load i32, i32* %2
%5 = add nsw i32 %4, 1
store i32 %5, i32* %2
br label %3
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
struct lldp_tlv {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ validate_length_max_256(struct lldp_tlv *);
uint8_t validate_port_id_tlv(struct lldp_tlv *tlv) {
  return validate_length_max_256(tlv);
}


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

x86 assembly (clang, -O2):
<validate_port_id_tlv>:
jmp    1030 <validate_length_max_256@plt>

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

LLVM IR (-O2):
%struct.lldp_tlv = type { i32 }
define i32 @validate_port_id_tlv(%struct.lldp_tlv* %0) {
%2 = tail call i32 @validate_length_max_256(%struct.lldp_tlv* %0)
ret i32 %2
}
int array_value_count(int number, int array[]) {
  int count = 0;
  int counter = 0;
  while (array[counter] > 0) {
    if (array[counter] == number) {
      count++;
    }
    counter++;
  }
  return count;
}


x86 assembly (clang, -O0):
<array_value_count>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jle    1156 <array_value_count+0x56>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x4(%rbp),%eax
jne    1148 <array_value_count+0x48>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1119 <array_value_count+0x19>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<array_value_count>:
mov    (%rsi),%ecx
test   %ecx,%ecx
jle    1124 <array_value_count+0x24>
add    $0x4,%rsi
xor    %eax,%eax
nopl   0x0(%rax)
xor    %edx,%edx
cmp    %edi,%ecx
sete   %dl
add    %edx,%eax
mov    (%rsi),%ecx
add    $0x4,%rsi
test   %ecx,%ecx
jg     1110 <array_value_count+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @array_value_count(i32 %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %16
5: ; preds = %2, %5
%6 = phi i64 [ %12, %5 ], [ 0, %2 ]
%7 = phi i32 [ %14, %5 ], [ %3, %2 ]
%8 = phi i32 [ %11, %5 ], [ 0, %2 ]
%9 = icmp eq i32 %7, %0
%10 = zext i1 %9 to i32
%11 = add nuw nsw i32 %8, %10
%12 = add nuw nsw i64 %6, 1
%13 = getelementptr inbounds i32, i32* %1, i64 %12
%14 = load i32, i32* %13
%15 = icmp sgt i32 %14, 0
br i1 %15, label %5, label %16
16: ; preds = %5, %2
%17 = phi i32 [ 0, %2 ], [ %11, %5 ]
ret i32 %17
}
void i2d_ASN1_T61STRING(void) {}


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

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

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

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

/* Variables and functions */
__attribute__((always_)) uint32_t detexPixel32GetB8(uint32_t pixel) {
  return (pixel & 0xFF0000) >> 16;
}


x86 assembly (clang, -O0):
<detexPixel32GetB8>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff0000,%eax
sar    $0x10,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<detexPixel32GetB8>:
shr    $0x10,%edi
movzbl %dil,%eax
ret

LLVM IR (-O0):
define i32 @detexPixel32GetB8(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 16711680
%5 = ashr i32 %4, 16
ret i32 %5
}

LLVM IR (-O2):
define i32 @detexPixel32GetB8(i32 %0) {
%2 = lshr i32 %0, 16
%3 = and i32 %2, 255
ret i32 %3
}
int isPowerOfTwo(unsigned int x) {
  unsigned int numberOfOneBits = 0;
  while (x && numberOfOneBits <= 1) {
    if ((x & 1) == 1) {
      numberOfOneBits++;
    }
    x >>= 1;
  }
  return (numberOfOneBits == 1);
}


x86 assembly (clang, -O0):
<isPowerOfTwo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x9(%rbp)
je     1127 <isPowerOfTwo+0x27>
cmpl   $0x1,-0x8(%rbp)
setbe  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1137 <isPowerOfTwo+0x37>
jmp    115d <isPowerOfTwo+0x5d>
mov    -0x4(%rbp),%eax
and    $0x1,%eax
cmp    $0x1,%eax
jne    114f <isPowerOfTwo+0x4f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110e <isPowerOfTwo+0xe>
cmpl   $0x1,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isPowerOfTwo>:
test   %edi,%edi
je     112e <isPowerOfTwo+0x2e>
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
mov    %ecx,%eax
mov    %edi,%ecx
and    $0x1,%ecx
add    %eax,%ecx
cmp    $0x2,%edi
jb     1125 <isPowerOfTwo+0x25>
shr    %edi
cmp    $0x2,%ecx
jb     1110 <isPowerOfTwo+0x10>
xor    %eax,%eax
cmp    $0x1,%ecx
sete   %al
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @isPowerOfTwo(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %19, %1
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %4
%8 = load i32, i32* %3
%9 = icmp ule i32 %8, 1
br label %10
10: ; preds = %7, %4
%11 = phi i1 [ false, %4 ], [ %9, %7 ]
br i1 %11, label %12, label %22
12: ; preds = %10
%13 = load i32, i32* %2
%14 = and i32 %13, 1
%15 = icmp eq i32 %14, 1
br i1 %15, label %16, label %19
16: ; preds = %12
%17 = load i32, i32* %3
%18 = add i32 %17, 1
store i32 %18, i32* %3
br label %19
19: ; preds = %16, %12
%20 = load i32, i32* %2
%21 = lshr i32 %20, 1
store i32 %21, i32* %2
br label %4
22: ; preds = %10
%23 = load i32, i32* %3
%24 = icmp eq i32 %23, 1
%25 = zext i1 %24 to i32
ret i32 %25
}

LLVM IR (-O2):
define i32 @isPowerOfTwo(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %15, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %8, %3 ], [ %0, %1 ]
%6 = and i32 %5, 1
%7 = add nuw nsw i32 %4, %6
%8 = lshr i32 %5, 1
%9 = icmp ugt i32 %5, 1
%10 = icmp ult i32 %7, 2
%11 = select i1 %9, i1 %10, i1 false
br i1 %11, label %3, label %12
12: ; preds = %3
%13 = icmp eq i32 %7, 1
%14 = zext i1 %13 to i32
br label %15
15: ; preds = %12, %1
%16 = phi i32 [ 0, %1 ], [ %14, %12 ]
ret i32 %16
}
void _dummy(int c) { (void)c; }


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

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

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

LLVM IR (-O2):
define void @_dummy(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void printEofError() { fprintf(stderr, "Unexpected end of file\n"); }


x86 assembly (clang, -O0):
<printEofError>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<printEofError>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"Unexpected end of file\0A\00"
define void @printEofError() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"Unexpected end of file\0A\00"
define void @printEofError() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ mbstate_t;

/* Variables and functions */
int /*<<< orphan*/ mbrlen(char const *, size_t, int /*<<< orphan*/ *);
void uninitvar_mbrlen(const char *p, size_t m, mbstate_t *s) {
  char *pmb;
  size_t max;
  mbstate_t *ps;
  (void)mbrlen(pmb, max, ps);
  (void)mbrlen(pmb, m, s);
  (void)mbrlen(p, max, s);
  (void)mbrlen(p, m, ps);
  (void)mbrlen(p, m, s);
}


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

x86 assembly (clang, -O2):
<uninitvar_mbrlen>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
call   1030 <mbrlen@plt>
mov    %r15,%rsi
mov    %r14,%rdx
call   1030 <mbrlen@plt>
mov    %rbx,%rdi
mov    %r14,%rdx
call   1030 <mbrlen@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <mbrlen@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <mbrlen@plt>

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

LLVM IR (-O2):
define void @uninitvar_mbrlen(i8* %0, i64 %1, i32* %2) {
%4 = tail call i32 @mbrlen(i8* undef, i64 undef, i32* undef)
%5 = tail call i32 @mbrlen(i8* undef, i64 %1, i32* %2)
%6 = tail call i32 @mbrlen(i8* %0, i64 undef, i32* %2)
%7 = tail call i32 @mbrlen(i8* %0, i64 %1, i32* undef)
%8 = tail call i32 @mbrlen(i8* %0, i64 %1, i32* %2)
ret void
}
/* Variables and functions */
scalar_t__ isdigit(int);
int isxdigit(int c) {
  return isdigit(c) || (c >= 'A' && c <= 'F') || (c >= 'a' && c <= 'f');
}


x86 assembly (clang, -O0):
<isxdigit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isdigit@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    116d <isxdigit+0x5d>
cmpl   $0x41,-0x4(%rbp)
jl     114e <isxdigit+0x3e>
mov    $0x1,%al
cmpl   $0x46,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    116d <isxdigit+0x5d>
xor    %eax,%eax
cmpl   $0x61,-0x4(%rbp)
mov    %al,-0x6(%rbp)
jl     1167 <isxdigit+0x57>
cmpl   $0x66,-0x4(%rbp)
setle  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isxdigit>:
push   %rbx
mov    %edi,%ebx
call   1030 <isdigit@plt>
test   %rax,%rax
setne  %al
and    $0xffffffdf,%ebx
add    $0xffffffbf,%ebx
cmp    $0x6,%ebx
setb   %cl
or     %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @isxdigit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @isdigit(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %20, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp sge i32 %7, 65
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %2
%11 = icmp sle i32 %10, 70
br i1 %11, label %20, label %12
12: ; preds = %9, %6
%13 = load i32, i32* %2
%14 = icmp sge i32 %13, 97
br i1 %14, label %15, label %18
15: ; preds = %12
%16 = load i32, i32* %2
%17 = icmp sle i32 %16, 102
br label %18
18: ; preds = %15, %12
%19 = phi i1 [ false, %12 ], [ %17, %15 ]
br label %20
20: ; preds = %18, %9, %1
%21 = phi i1 [ true, %9 ], [ true, %1 ], [ %19, %18 ]
%22 = zext i1 %21 to i32
ret i32 %22
}

LLVM IR (-O2):
define i32 @isxdigit(i32 %0) {
%2 = tail call i64 @isdigit(i32 %0)
%3 = icmp ne i64 %2, 0
%4 = and i32 %0, -33
%5 = add i32 %4, -65
%6 = icmp ult i32 %5, 6
%7 = or i1 %6, %3
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
void OSDDummyDeInit(void) {}


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

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

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

LLVM IR (-O2):
define void @OSDDummyDeInit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  const int n = 55;
  if (n == (100)) {
    printf("color: %s\n", ("red"));
  } else if (n == (-23)) {
    printf("color: %s\n", ("green"));
  } else if (n == (55)) {
    printf("color: %s\n", ("blue"));
  } else {
    printf("unknown color\n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x37,-0x4(%rbp)
lea    0xeda(%rip),%rdi
lea    0xede(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [11 x i8] c"color: %s\0A\00"
@.str.1 = [5 x i8] c"blue\00"
define i32 @main() {
%1 = alloca i32
store i32 55, i32* %1
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"color: %s\0A\00"
@.str.1 = [5 x i8] c"blue\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
int bounds_bit_check(unsigned int capability, unsigned int idx) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @bounds_bit_check(i32 %0, i32 %1) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int powercap_sysfs_zone_get_enabled(char *, int /*<<< orphan*/ *, int,
                                    int /*<<< orphan*/ *);
int rapl_sysfs_zone_get_enabled(uint32_t zone, uint32_t sz, int is_sz,
                                uint32_t *val) {
  uint32_t zones[2];
  zones[0] = zone;
  zones[1] = sz;
  ;
  return powercap_sysfs_zone_get_enabled("intel-rapl", zones, (is_sz ? 2 : 1),
                                         val);
}


x86 assembly (clang, -O0):
<rapl_sysfs_zone_get_enabled>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x1c(%rbp)
lea    -0x20(%rbp),%rsi
mov    -0xc(%rbp),%ecx
mov    $0x1,%edx
mov    $0x2,%eax
cmp    $0x0,%ecx
cmovne %eax,%edx
mov    -0x18(%rbp),%rcx
lea    0xead(%rip),%rdi
call   1030 <powercap_sysfs_zone_get_enabled@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rapl_sysfs_zone_get_enabled>:
push   %rax
mov    %edi,(%rsp)
mov    %esi,0x4(%rsp)
cmp    $0x1,%edx
mov    $0x2,%edx
sbb    $0x0,%edx
lea    0xed6(%rip),%rdi
mov    %rsp,%rsi
call   1030 <powercap_sysfs_zone_get_enabled@plt>
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"intel-rapl\00"
define i32 @rapl_sysfs_zone_get_enabled(i32 %0, i32 %1, i32 %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32*
%9 = alloca [2 x i32]
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32* %3, i32** %8
%10 = load i32, i32* %5
%11 = getelementptr inbounds [2 x i32], [2 x i32]* %9, i64 0, i64 0
store i32 %10, i32* %11
%12 = load i32, i32* %6
%13 = getelementptr inbounds [2 x i32], [2 x i32]* %9, i64 0, i64 1
store i32 %12, i32* %13
%14 = getelementptr inbounds [2 x i32], [2 x i32]* %9, i64 0, i64 0
%15 = load i32, i32* %7
%16 = icmp ne i32 %15, 0
%17 = zext i1 %16 to i64
%18 = select i1 %16, i32 2, i32 1
%19 = load i32*, i32** %8
%20 = call i32 @powercap_sysfs_zone_get_enabled(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32* %14, i32 %18, i32* %19)
ret i32 %20
}

LLVM IR (-O2):
@.str = [11 x i8] c"intel-rapl\00"
define i32 @rapl_sysfs_zone_get_enabled(i32 %0, i32 %1, i32 %2, i32* %3) {
%5 = alloca [2 x i32]
%6 = bitcast [2 x i32]* %5 to i8*
%7 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
store i32 %0, i32* %7
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 1
store i32 %1, i32* %8
%9 = icmp eq i32 %2, 0
%10 = select i1 %9, i32 1, i32 2
%11 = call i32 @powercap_sysfs_zone_get_enabled(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32* %7, i32 %10, i32* %3)
ret i32 %11
}
void pwm_set(const char *name, unsigned int *reg, int value) { *reg = value; }


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

x86 assembly (clang, -O2):
<pwm_set>:
mov    %edx,(%rsi)
ret

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

LLVM IR (-O2):
define void @pwm_set(i8* nocapture readnone %0, i32* nocapture writeonly %1, i32 %2) {
store i32 %2, i32* %1
ret void
}
void dmat_profile() {}


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

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

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

LLVM IR (-O2):
define void @dmat_profile() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
void turn_off(int fpointer) { write(fpointer, "1", 1); }


x86 assembly (clang, -O0):
<turn_off>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    0xedb(%rip),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<turn_off>:
lea    0xee9(%rip),%rsi
mov    $0x1,%edx
jmp    1030 <write@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"1\00"
define void @turn_off(i32 %0) {
%2 = tail call i32 @write(i32 %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}
/* Variables and functions */
int myfunction4(int);
int myfunction3(int arg) { return myfunction4(arg); }


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

x86 assembly (clang, -O2):
<myfunction3>:
jmp    1030 <myfunction4@plt>

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

LLVM IR (-O2):
define i32 @myfunction3(i32 %0) {
%2 = tail call i32 @myfunction4(i32 %0)
ret i32 %2
}
double rock_temperature(double S, double a, double e) {
  double T = 0.0;
  return T;
}


x86 assembly (clang, -O0):
<rock_temperature>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<rock_temperature>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @rock_temperature(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
store double 0.000000e+00, double* %7
%8 = load double, double* %7
ret double %8
}

LLVM IR (-O2):
define double @rock_temperature(double %0, double %1, double %2) {
ret double 0.000000e+00
}
/* Variables and functions */
int munmap(void *, size_t);
int _dl_munmap(void *start, size_t len) { return munmap(start, len); }


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

x86 assembly (clang, -O2):
<_dl_munmap>:
jmp    1030 <munmap@plt>

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

LLVM IR (-O2):
define i32 @_dl_munmap(i8* %0, i64 %1) {
%3 = tail call i32 @munmap(i8* %0, i64 %1)
ret i32 %3
}
/* Variables and functions */
int temper_type_init(char **);
bool tempered_init(char **error) { return temper_type_init(error); }


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

x86 assembly (clang, -O2):
<tempered_init>:
jmp    1030 <temper_type_init@plt>

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

LLVM IR (-O2):
define i32 @tempered_init(i8** %0) {
%2 = tail call i32 @temper_type_init(i8** %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ test(int);
int main(void) {
  test(-1);
  test(0);
  test(1);
  test(5);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @test(i32 -1)
%2 = tail call i32 @test(i32 0)
%3 = tail call i32 @test(i32 1)
%4 = tail call i32 @test(i32 5)
ret i32 0
}
int first_partition() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @first_partition() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ gl2psEndSVGLine();
void gl2psPrintSVGFinalPrimitive(void) { gl2psEndSVGLine(); }


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

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

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

LLVM IR (-O2):
define void @gl2psPrintSVGFinalPrimitive() {
%1 = tail call i32 (...) @gl2psEndSVGLine()
ret void
}
/* Variables and functions */
double fb_FIXDouble(double);
double fb_FRACd(double x) { return x - fb_FIXDouble(x); }


x86 assembly (clang, -O0):
<fb_FRACd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <fb_FIXDouble@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
subsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fb_FRACd>:
push   %rax
movsd  %xmm0,(%rsp)
call   1030 <fb_FIXDouble@plt>
movsd  (%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @fb_FRACd(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = call double @fb_FIXDouble(double %4)
%6 = fsub double %3, %5
ret double %6
}

LLVM IR (-O2):
define double @fb_FRACd(double %0) {
%2 = tail call double @fb_FIXDouble(double %0)
%3 = fsub double %0, %2
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ err(int, char *);
void *malloc(size_t);
void *xmalloc(size_t size) {
  void *p;
  p = malloc(size);
  if (p == NULL)
    err(1, "malloc");
  return p;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1155 <xmalloc+0x35>
mov    $0x1,%edi
lea    0xeb0(%rip),%rsi
call   1030 <err@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbx
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113f <xmalloc+0x1f>
lea    0xecb(%rip),%rsi
mov    $0x1,%edi
call   1030 <err@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"malloc\00"
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 @err(i32 1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
@.str = [7 x i8] c"malloc\00"
define noalias i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @err(i32 1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
void DMA1_Stream1_IRQHandler() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @lcd_port_config() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ good1();
void CWE367_TOC_TOU__stat_01_good() { good1(); }


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

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

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

LLVM IR (-O2):
define void @CWE367_TOC_TOU__stat_01_good() {
%1 = tail call i32 (...) @good1()
ret void
}
float obdConvert_4D(unsigned int A, unsigned int B, unsigned int C,
                    unsigned int D) {
  return (float)A * 256.0f + (float)B;
}


x86 assembly (clang, -O0):
<obdConvert_4D>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cvtsi2ss %rax,%xmm0
mov    -0x8(%rbp),%eax
cvtsi2ss %rax,%xmm1
movss  0xed8(%rip),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<obdConvert_4D>:
mov    %edi,%eax
cvtsi2ss %rax,%xmm0
mov    %esi,%eax
cvtsi2ss %rax,%xmm1
mulss  0xeea(%rip),%xmm0
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @obdConvert_4D(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = uitofp i32 %9 to float
%11 = load i32, i32* %6
%12 = uitofp i32 %11 to float
%13 = call float @llvm.fmuladd.f32(float %10, float 2.560000e+02, float %12)
ret float %13
}

LLVM IR (-O2):
define float @obdConvert_4D(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = uitofp i32 %0 to float
%6 = uitofp i32 %1 to float
%7 = tail call float @llvm.fmuladd.f32(float %5, float 2.560000e+02, float %6)
ret float %7
}
/* Variables and functions */
scalar_t__ floor(int /*<<< orphan*/);
int /*<<< orphan*/ sqrt(int);
int isSquare(int N, int *ans) {
  int root = (int)floor(sqrt(N));
  if (root * root == N) {
    *ans = root;
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<isSquare>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <sqrt@plt>
mov    %eax,%edi
call   1040 <floor@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
imul   -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1166 <isSquare+0x46>
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    116d <isSquare+0x4d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isSquare>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
call   1030 <sqrt@plt>
mov    %eax,%edi
call   1040 <floor@plt>
mov    %eax,%edx
imul   %eax,%edx
xor    %ecx,%ecx
cmp    %ebp,%edx
jne    1146 <isSquare+0x26>
mov    %eax,(%rbx)
mov    $0x1,%ecx
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @isSquare(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 = call i32 @sqrt(i32 %7)
%9 = call i64 @floor(i32 %8)
%10 = trunc i64 %9 to i32
store i32 %10, i32* %6
%11 = load i32, i32* %6
%12 = load i32, i32* %6
%13 = mul nsw i32 %11, %12
%14 = load i32, i32* %4
%15 = icmp eq i32 %13, %14
br i1 %15, label %16, label %19
16: ; preds = %2
%17 = load i32, i32* %6
%18 = load i32*, i32** %5
store i32 %17, i32* %18
store i32 1, i32* %3
br label %20
19: ; preds = %2
store i32 0, i32* %3
br label %20
20: ; preds = %19, %16
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @isSquare(i32 %0, i32* nocapture writeonly %1) {
%3 = tail call i32 @sqrt(i32 %0)
%4 = tail call i64 @floor(i32 %3)
%5 = trunc i64 %4 to i32
%6 = mul nsw i32 %5, %5
%7 = icmp eq i32 %6, %0
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 %5, i32* %1
br label %9
9: ; preds = %2, %8
%10 = phi i32 [ 1, %8 ], [ 0, %2 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ g();
int /*<<< orphan*/ populate(int *, int);
int sum(int *, int);
f(int n) {
  int x[n + g()];
  populate(x, sizeof x / sizeof *x);
  return sum(x, sizeof x / sizeof *x);
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x2c(%rbp)
xor    %eax,%eax
call   1050 <g@plt>
mov    %eax,%ecx
mov    -0x2c(%rbp),%eax
add    %ecx,%eax
mov    %rax,-0x20(%rbp)
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
lea    0xf(,%rax,4),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x28(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x18(%rbp)
shl    $0x2,%rax
shr    $0x2,%rax
mov    %eax,%esi
call   1030 <populate@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rax
shl    $0x2,%rax
shr    $0x2,%rax
mov    %eax,%esi
call   1040 <sum@plt>
mov    -0x10(%rbp),%rcx
mov    %rcx,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
mov    %edi,%r14d
xor    %eax,%eax
call   1050 <g@plt>
add    %eax,%r14d
lea    0xf(,%r14,4),%rax
and    $0xfffffffffffffff0,%rax
mov    %rsp,%rbx
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %rbx,%rdi
mov    %r14d,%esi
call   1030 <populate@plt>
mov    %rbx,%rdi
mov    %r14d,%esi
call   1040 <sum@plt>
lea    -0x10(%rbp),%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @f(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = call i32 (...) @g()
%7 = add nsw i32 %5, %6
%8 = zext i32 %7 to i64
%9 = call i8* @llvm.stacksave()
store i8* %9, i8** %3
%10 = alloca i32, i64 %8
store i64 %8, i64* %4
%11 = mul nuw i64 4, %8
%12 = udiv i64 %11, 4
%13 = trunc i64 %12 to i32
%14 = call i32 @populate(i32* %10, i32 %13)
%15 = mul nuw i64 4, %8
%16 = udiv i64 %15, 4
%17 = trunc i64 %16 to i32
%18 = call i32 @sum(i32* %10, i32 %17)
%19 = load i8*, i8** %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @f(i32 %0) {
%2 = tail call i32 (...) @g()
%3 = add nsw i32 %2, %0
%4 = zext i32 %3 to i64
%5 = alloca i32, i64 %4
%6 = call i32 @populate(i32* %5, i32 %3)
%7 = call i32 @sum(i32* %5, i32 %3)
ret i32 %7
}
void shodbl() {}


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

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

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

LLVM IR (-O2):
define void @shodbl() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void ILibChain_Safe_Destroy(void *object) { free(object); }


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

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

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

LLVM IR (-O2):
define void @ILibChain_Safe_Destroy(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
__float128 from_single_load(float *a) { return (__float128)*a; }


x86 assembly (clang, -O0):
<from_single_load>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
call   1120 <__extendsftf2>
add    $0x10,%rsp
pop    %rbp
ret
nop

x86 assembly (clang, -O2):
<from_single_load>:
movss  (%rdi),%xmm0
jmp    1110 <__extendsftf2>
nopl   0x0(%rax)

LLVM IR (-O0):
define fp128 @from_single_load(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = load float, float* %3
%5 = fpext float %4 to fp128
ret fp128 %5
}

LLVM IR (-O2):
define fp128 @from_single_load(float* nocapture %0) {
%2 = load float, float* %0
%3 = fpext float %2 to fp128
ret fp128 %3
}
void SSIDisable(unsigned long ulBase) {
  ;
  (*((volatile unsigned long *)(ulBase + 0x00000004))) &= ~(0x00000002);
}


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

x86 assembly (clang, -O2):
<SSIDisable>:
andq   $0xfffffffffffffffd,0x4(%rdi)
ret

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

LLVM IR (-O2):
define void @SSIDisable(i64 %0) {
%2 = add i64 %0, 4
%3 = inttoptr i64 %2 to i64*
%4 = load volatile i64, i64* %3
%5 = and i64 %4, -3
store volatile i64 %5, i64* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void print(char *msg) { printf("%s\n", msg); }


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

x86 assembly (clang, -O2):
<print>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @print(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int slog(int n) {
  int i = 0;
  while (n >>= 1)
    ++i;
  return i;
}


x86 assembly (clang, -O0):
<slog>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
je     112e <slog+0x2e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <slog+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<slog>:
xor    %eax,%eax
cmp    $0x2,%edi
jb     111c <slog+0x1c>
xor    %eax,%eax
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
sar    %ecx
add    $0x1,%eax
cmp    $0x3,%edi
mov    %ecx,%edi
ja     1110 <slog+0x10>
ret

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

LLVM IR (-O2):
define i32 @slog(i32 %0) {
%2 = icmp ult i32 %0, 2
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = ashr i32 %5, 1
%7 = add nuw nsw i32 %4, 1
%8 = icmp ult i32 %5, 4
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int DropIndex(int argc, char **argv) {
  printf("Calling from DropIndex\n");
  return 1;
}


x86 assembly (clang, -O0):
<DropIndex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [24 x i8] c"Calling from DropIndex\0A\00"
define i32 @DropIndex(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@str = [23 x i8] c"Calling from DropIndex\00"
define i32 @DropIndex(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ fgets(char *, int, int /*<<< orphan*/ *);
int vsscanf(char *, char const *, int /*<<< orphan*/);
int vfscanf_lib(FILE *fp, const char *fmt, va_list ap) {
  int count;
  char buf[12 + 1];
  if (fgets(buf, 12, fp) == 0)
    return (-1);
  count = vsscanf(buf, fmt, ap);
  return (count);
}


x86 assembly (clang, -O0):
<vfscanf_lib>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
lea    -0x2d(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    $0xc,%esi
call   1030 <fgets@plt>
cmp    $0x0,%rax
jne    115b <vfscanf_lib+0x3b>
movl   $0xffffffff,-0x4(%rbp)
jmp    1174 <vfscanf_lib+0x54>
lea    -0x2d(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1040 <vsscanf@plt>
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vfscanf_lib>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
mov    %edx,%ebp
mov    %rsi,%rbx
mov    %rdi,%rdx
lea    0xb(%rsp),%rdi
mov    $0xc,%esi
call   1030 <fgets@plt>
test   %rax,%rax
je     1153 <vfscanf_lib+0x33>
lea    0xb(%rsp),%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
call   1040 <vsscanf@plt>
jmp    1158 <vfscanf_lib+0x38>
mov    $0xffffffff,%eax
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @vfscanf_lib(i32* %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca [13 x i8]
store i32* %0, i32** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%10 = getelementptr inbounds [13 x i8], [13 x i8]* %9, i64 0, i64 0
%11 = load i32*, i32** %5
%12 = call i64 @fgets(i8* %10, i32 12, i32* %11)
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %3
store i32 -1, i32* %4
br label %21
15: ; preds = %3
%16 = getelementptr inbounds [13 x i8], [13 x i8]* %9, i64 0, i64 0
%17 = load i8*, i8** %6
%18 = load i32, i32* %7
%19 = call i32 @vsscanf(i8* %16, i8* %17, i32 %18)
store i32 %19, i32* %8
%20 = load i32, i32* %8
store i32 %20, i32* %4
br label %21
21: ; preds = %15, %14
%22 = load i32, i32* %4
ret i32 %22
}

LLVM IR (-O2):
define i32 @vfscanf_lib(i32* nocapture %0, i8* %1, i32 %2) {
%4 = alloca [13 x i8]
%5 = getelementptr inbounds [13 x i8], [13 x i8]* %4, i64 0, i64 0
%6 = call i64 @fgets(i8* %5, i32 12, i32* %0)
%7 = icmp eq i64 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %3
%9 = call i32 @vsscanf(i8* %5, i8* %1, i32 %2)
br label %10
10: ; preds = %3, %8
%11 = phi i32 [ %9, %8 ], [ -1, %3 ]
ret i32 %11
}