xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void badusage(void) {
  fprintf(
      stderr,
      "Usage: gpcheckmult [-ip d/s[dr]] [-silent] [-v] [-l/-h] [-m maxeqns]\n");
  fprintf(stderr,
          "\t\t[-ow] [-mwd maxwdiffs] [-cos] [-wtlex] groupname [cosname]\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [70 x i8] c"Usage: gpcheckmult [-ip d/s[dr]] [-silent] [-v] [-l/-h] [-m maxeqns]\0A\00"
@.str.1 = [62 x i8] c"\09\09[-ow] [-mwd maxwdiffs] [-cos] [-wtlex] groupname [cosname]\0A\00"
define void @badusage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [70 x i8] c"Usage: gpcheckmult [-ip d/s[dr]] [-silent] [-v] [-l/-h] [-m maxeqns]\0A\00"
@.str.1 = [62 x i8] c"\09\09[-ow] [-mwd maxwdiffs] [-cos] [-wtlex] groupname [cosname]\0A\00"
define void @badusage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
double fabs(double);
double sin(double);
double sinc(double x) {
  if (fabs(x) < 1.0e-6)
    return 1.0;
  return sin(x) / x;
}


x86 assembly (clang, -O0):
<sinc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm1
movaps 0xee7(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xecb(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1151 <sinc+0x41>
movsd  0xec1(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1165 <sinc+0x55>
movsd  -0x10(%rbp),%xmm0
call   1030 <sin@plt>
divsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sinc>:
sub    $0x18,%rsp
movapd 0xee4(%rip),%xmm2
andpd  %xmm0,%xmm2
movsd  0xef0(%rip),%xmm1
ucomisd %xmm2,%xmm1
jbe    113b <sinc+0x2b>
movsd  0xeda(%rip),%xmm0
add    $0x18,%rsp
ret
movapd %xmm0,(%rsp)
call   1030 <sin@plt>
divsd  (%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @sinc(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = call double @llvm.fabs.f64(double %4)
%6 = fcmp olt double %5, 0x3EB0C6F7A0B5ED8D
br i1 %6, label %7, label %8
7: ; preds = %1
store double 1.000000e+00, double* %2
br label %13
8: ; preds = %1
%9 = load double, double* %3
%10 = call double @sin(double %9)
%11 = load double, double* %3
%12 = fdiv double %10, %11
store double %12, double* %2
br label %13
13: ; preds = %8, %7
%14 = load double, double* %2
ret double %14
}

LLVM IR (-O2):
define double @sinc(double %0) {
%2 = tail call double @llvm.fabs.f64(double %0)
%3 = fcmp olt double %2, 0x3EB0C6F7A0B5ED8D
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call double @sin(double %0)
%6 = fdiv double %5, %0
br label %7
7: ; preds = %1, %4
%8 = phi double [ %6, %4 ], [ 1.000000e+00, %1 ]
ret double %8
}
/* Variables and functions */
int abs(int);
void pioneer_int_to_buf(unsigned char *buf, int n) {
  if (n >= 0)
    buf[0] = 0x3B;
  else
    buf[0] = 0x1B;
  n = abs(n);
  buf[1] = n & 0x00FF;
  buf[2] = (n & 0xFF00) >> 8;
}


x86 assembly (clang, -O0):
<pioneer_int_to_buf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     1135 <pioneer_int_to_buf+0x25>
mov    -0x8(%rbp),%rax
movb   $0x3b,(%rax)
jmp    113c <pioneer_int_to_buf+0x2c>
mov    -0x8(%rbp),%rax
movb   $0x1b,(%rax)
mov    -0xc(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0xc(%rbp),%eax
and    $0xff00,%eax
sar    $0x8,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x2(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pioneer_int_to_buf>:
test   %esi,%esi
setns  %al
shl    $0x5,%al
or     $0x1b,%al
mov    %al,(%rdi)
mov    %esi,%eax
neg    %eax
cmovs  %esi,%eax
mov    %al,0x1(%rdi)
mov    %ah,0x2(%rdi)
ret

LLVM IR (-O0):
define void @pioneer_int_to_buf(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp sge i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 0
store i8 59, i8* %9
br label %13
10: ; preds = %2
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i64 0
store i8 27, i8* %12
br label %13
13: ; preds = %10, %7
%14 = load i32, i32* %4
%15 = call i32 @abs(i32 %14)
store i32 %15, i32* %4
%16 = load i32, i32* %4
%17 = and i32 %16, 255
%18 = trunc i32 %17 to i8
%19 = load i8*, i8** %3
%20 = getelementptr inbounds i8, i8* %19, i64 1
store i8 %18, i8* %20
%21 = load i32, i32* %4
%22 = and i32 %21, 65280
%23 = ashr i32 %22, 8
%24 = trunc i32 %23 to i8
%25 = load i8*, i8** %3
%26 = getelementptr inbounds i8, i8* %25, i64 2
store i8 %24, i8* %26
ret void
}

LLVM IR (-O2):
define void @pioneer_int_to_buf(i8* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, -1
%4 = select i1 %3, i8 59, i8 27
store i8 %4, i8* %0
%5 = tail call i32 @llvm.abs.i32(i32 %1, i1 true)
%6 = trunc i32 %5 to i8
%7 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %6, i8* %7
%8 = lshr i32 %5, 8
%9 = trunc i32 %8 to i8
%10 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %9, i8* %10
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, ...);
void stupid_definition(void) {
  int stupid_integer = 3;
  printf("\t&%s = %p\n", "stupid_integer", (&stupid_integer));
  printf("\t%s = %d\n", "stupid_integer", (stupid_integer));
}


x86 assembly (clang, -O0):
<stupid_definition>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x3,-0x4(%rbp)
lea    0xeda(%rip),%rdi
lea    0xede(%rip),%rsi
lea    -0x4(%rbp),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%edx
lea    0xed8(%rip),%rdi
lea    0xec2(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stupid_definition>:
push   %rbx
sub    $0x10,%rsp
movl   $0x3,0xc(%rsp)
lea    0xedc(%rip),%rdi
lea    0xee0(%rip),%rbx
lea    0xc(%rsp),%rdx
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0xc(%rsp),%edx
lea    0xed5(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"\09&%s = %p\0A\00"
@.str.1 = [15 x i8] c"stupid_integer\00"
@.str.2 = [10 x i8] c"\09%s = %d\0A\00"
define void @stupid_definition() {
%1 = alloca i32
store i32 3, i32* %1
%2 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%3 = load i32, i32* %1
%4 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"\09&%s = %p\0A\00"
@.str.1 = [15 x i8] c"stupid_integer\00"
@.str.2 = [10 x i8] c"\09%s = %d\0A\00"
define void @stupid_definition() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 3, i32* %1
%3 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret void
}
/* Type definitions */
struct TLVs {
  int dummy;
};

/* Variables and functions */
int add_next_param(struct TLVs *, int, int /*<<< orphan*/, double *);
int /*<<< orphan*/ get_type_length(int);
int add_next_float64(struct TLVs *params, double next_value) {
  return add_next_param(params, 1, get_type_length(1), &next_value);
}


x86 assembly (clang, -O0):
<add_next_float64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x1,%edi
call   1030 <get_type_length@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%edx
mov    $0x1,%esi
lea    -0x10(%rbp),%rcx
call   1040 <add_next_param@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_next_float64>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
movsd  %xmm0,0x8(%rsp)
mov    $0x1,%edi
call   1030 <get_type_length@plt>
lea    0x8(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    %eax,%edx
call   1040 <add_next_param@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.TLVs = type { i32 }
define i32 @add_next_float64(%struct.TLVs* %0, double %1) {
%3 = alloca %struct.TLVs*
%4 = alloca double
store %struct.TLVs* %0, %struct.TLVs** %3
store double %1, double* %4
%5 = load %struct.TLVs*, %struct.TLVs** %3
%6 = call i32 @get_type_length(i32 1)
%7 = call i32 @add_next_param(%struct.TLVs* %5, i32 1, i32 %6, double* %4)
ret i32 %7
}

LLVM IR (-O2):
%struct.TLVs = type { i32 }
define i32 @add_next_float64(%struct.TLVs* %0, double %1) {
%3 = alloca double
store double %1, double* %3
%4 = tail call i32 @get_type_length(i32 1)
%5 = call i32 @add_next_param(%struct.TLVs* %0, i32 1, i32 %4, double* %3)
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
uint64_t test_tagged_nonint_enum3(uint64_t val) { return val; }


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

x86 assembly (clang, -O2):
<test_tagged_nonint_enum3>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @test_tagged_nonint_enum3(i32 returned %0) {
ret i32 %0
}
int effectiveLen(const char *prompt) {
  int col = 0;
  char c;
  while ((c = *prompt++) != 0) {
    if (c == '\n') {
      col = 0;
    } else {
      col++;
    }
  }
  return col;
}


x86 assembly (clang, -O0):
<effectiveLen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%al
mov    %al,-0xd(%rbp)
movsbl %al,%eax
cmp    $0x0,%eax
je     1156 <effectiveLen+0x56>
movsbl -0xd(%rbp),%eax
cmp    $0xa,%eax
jne    1148 <effectiveLen+0x48>
movl   $0x0,-0xc(%rbp)
jmp    1151 <effectiveLen+0x51>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <effectiveLen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<effectiveLen>:
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %ecx,%eax
movzbl (%rdi),%edx
add    $0x1,%rdi
mov    $0x0,%ecx
cmp    $0xa,%dl
je     1110 <effectiveLen+0x10>
test   %dl,%dl
je     112e <effectiveLen+0x2e>
add    $0x1,%eax
mov    %eax,%ecx
jmp    1110 <effectiveLen+0x10>
ret

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

LLVM IR (-O2):
define i32 @effectiveLen(i8* nocapture %0) {
br label %2
2: ; preds = %7, %1
%3 = phi i32 [ 0, %1 ], [ %8, %7 ]
%4 = phi i8* [ %0, %1 ], [ %5, %7 ]
%5 = getelementptr inbounds i8, i8* %4, i64 1
%6 = load i8, i8* %4
switch i8 %6, label %9 [
i8 0, label %11
i8 10, label %7
]
7: ; preds = %2, %9
%8 = phi i32 [ %10, %9 ], [ 0, %2 ]
br label %2
9: ; preds = %2
%10 = add nsw i32 %3, 1
br label %7
11: ; preds = %2
ret i32 %3
}
void *bsearch(const void *key, const void *base, unsigned short num,
              unsigned short size,
              int (*comparator)(const void *a, const void *b)) {
  return 0;
}


x86 assembly (clang, -O0):
<bsearch>:
push   %rbp
mov    %rsp,%rbp
mov    %cx,%ax
mov    %dx,%cx
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %cx,-0x12(%rbp)
mov    %ax,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @bsearch(i8* %0, i8* %1, i16 zeroext %2, i16 zeroext %3, i32 (i8*, i8*)* %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i16
%9 = alloca i16
%10 = alloca i32 (i8*, i8*)*
store i8* %0, i8** %6
store i8* %1, i8** %7
store i16 %2, i16* %8
store i16 %3, i16* %9
store i32 (i8*, i8*)* %4, i32 (i8*, i8*)** %10
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @bsearch(i8* nocapture readnone %0, i8* nocapture readnone %1, i16 zeroext %2, i16 zeroext %3, i32 (i8*, i8*)* nocapture readnone %4) {
ret i8* null
}
int test_imm_9Euint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0x9E << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_9Euint64_highword_reg(i64 %0) {
%2 = and i64 %0, 678604832768
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
unsigned int leading_zero_num5(unsigned int x) {
  unsigned int nr;
  if (x == 0)
    return 32;
  nr = 0;
  while (x) {
    ++nr;
    x >>= 1;
  }
  return 32 - nr;
}


x86 assembly (clang, -O0):
<leading_zero_num5>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    111d <leading_zero_num5+0x1d>
movl   $0x20,-0x4(%rbp)
jmp    1150 <leading_zero_num5+0x50>
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1145 <leading_zero_num5+0x45>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1124 <leading_zero_num5+0x24>
mov    $0x20,%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<leading_zero_num5>:
mov    $0x20,%eax
test   %edi,%edi
je     111c <leading_zero_num5+0x1c>
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
shr    %ecx
add    $0xffffffff,%eax
cmp    $0x1,%edi
mov    %ecx,%edi
ja     1110 <leading_zero_num5+0x10>
ret

LLVM IR (-O0):
define i32 @leading_zero_num5(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 32, i32* %2
br label %20
8: ; preds = %1
store i32 0, i32* %4
br label %9
9: ; preds = %12, %8
%10 = load i32, i32* %3
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %17
12: ; preds = %9
%13 = load i32, i32* %4
%14 = add i32 %13, 1
store i32 %14, i32* %4
%15 = load i32, i32* %3
%16 = lshr i32 %15, 1
store i32 %16, i32* %3
br label %9
17: ; preds = %9
%18 = load i32, i32* %4
%19 = sub i32 32, %18
store i32 %19, i32* %2
br label %20
20: ; preds = %17, %7
%21 = load i32, i32* %2
ret i32 %21
}

LLVM IR (-O2):
define i32 @leading_zero_num5(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = phi i32 [ %7, %3 ], [ %0, %1 ]
%6 = add nuw nsw i32 %4, 1
%7 = lshr i32 %5, 1
%8 = icmp ult i32 %5, 2
br i1 %8, label %9, label %3
9: ; preds = %3
%10 = sub nsw i32 31, %4
br label %11
11: ; preds = %1, %9
%12 = phi i32 [ %10, %9 ], [ 32, %1 ]
ret i32 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ CMS_ContentInfo;

/* Variables and functions */
scalar_t__ cms_signed_data_init(int /*<<< orphan*/ *);
int CMS_SignedData_init(CMS_ContentInfo *cms) {
  if (cms_signed_data_init(cms))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<CMS_SignedData_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <cms_signed_data_init@plt>
cmp    $0x0,%rax
je     113b <CMS_SignedData_init+0x2b>
movl   $0x1,-0x4(%rbp)
jmp    1142 <CMS_SignedData_init+0x32>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @CMS_SignedData_init(i32* %0) {
%2 = tail call i64 @cms_signed_data_init(i32* %0)
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ key_t;

/* Variables and functions */
int IPC_CREAT;
int IPC_EXCL;
int /*<<< orphan*/ getkey(int);
int shmget(int /*<<< orphan*/, int, int);
int crearshm(int id, int size) {
  key_t clave;
  clave = getkey(id);
  return (shmget(clave, size, IPC_CREAT | IPC_EXCL | 0660));
}


x86 assembly (clang, -O0):
<crearshm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <getkey@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    0x2e92(%rip),%rax
mov    (%rax),%edx
mov    0x2ea1(%rip),%rax
or     (%rax),%edx
or     $0x1b0,%edx
call   1040 <shmget@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crearshm>:
push   %rbx
mov    %esi,%ebx
call   1030 <getkey@plt>
mov    0x2ea9(%rip),%rcx
mov    (%rcx),%edx
mov    0x2eb8(%rip),%rcx
or     (%rcx),%edx
or     $0x1b0,%edx
mov    %eax,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1040 <shmget@plt>

LLVM IR (-O0):
@IPC_CREAT = global i32 0
@IPC_EXCL = global i32 0
define i32 @crearshm(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = call i32 @getkey(i32 %6)
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = load i32, i32* %4
%10 = load i32, i32* @IPC_CREAT
%11 = load i32, i32* @IPC_EXCL
%12 = or i32 %10, %11
%13 = or i32 %12, 432
%14 = call i32 @shmget(i32 %8, i32 %9, i32 %13)
ret i32 %14
}

LLVM IR (-O2):
@IPC_CREAT = global i32 0
@IPC_EXCL = global i32 0
define i32 @crearshm(i32 %0, i32 %1) {
%3 = tail call i32 @getkey(i32 %0)
%4 = load i32, i32* @IPC_CREAT
%5 = load i32, i32* @IPC_EXCL
%6 = or i32 %4, %5
%7 = or i32 %6, 432
%8 = tail call i32 @shmget(i32 %3, i32 %1, i32 %7)
ret i32 %8
}
int fun1141() { return 1141; }


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

x86 assembly (clang, -O2):
<fun1141>:
mov    $0x475,%eax
ret

LLVM IR (-O0):
define i32 @fun1141() {
ret i32 1141
}

LLVM IR (-O2):
define i32 @fun1141() {
ret i32 1141
}
void fn_att_0_default(void) {}


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

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

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

LLVM IR (-O2):
define void @fn_att_0_default() {
ret void
}
unsigned int count_shift(unsigned int num) {
  unsigned int count = 0;
  while (num > (0x80 - 1)) {
    count++;
    num = num >> 7;
  }
  return count;
}


x86 assembly (clang, -O0):
<count_shift>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x7f,-0x4(%rbp)
jbe    112f <count_shift+0x2f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x7,%eax
mov    %eax,-0x4(%rbp)
jmp    110e <count_shift+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_shift>:
xor    %eax,%eax
cmp    $0x80,%edi
jb     1120 <count_shift+0x20>
xor    %eax,%eax
mov    %edi,%ecx
xchg   %ax,%ax
add    $0x1,%eax
shr    $0x7,%ecx
cmp    $0x3fff,%edi
mov    %ecx,%edi
ja     1110 <count_shift+0x10>
ret

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

LLVM IR (-O2):
define i32 @count_shift(i32 %0) {
%2 = icmp ugt i32 %0, 127
br i1 %2, label %3, label %9
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = phi i32 [ %7, %3 ], [ %0, %1 ]
%6 = add nuw nsw i32 %4, 1
%7 = lshr i32 %5, 7
%8 = icmp ugt i32 %5, 16383
br i1 %8, label %3, label %9
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %10
}
/* Variables and functions */
double pow(int, double);
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ scanf(char *, double *);
main() {
  double x;
  scanf("%lf", &x);
  x = pow(10, x);
  printf("%f\n", x);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movsd  -0x8(%rbp),%xmm0
mov    $0xa,%edi
call   1050 <pow@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
movsd  (%rsp),%xmm0
mov    $0xa,%edi
call   1050 <pow@plt>
movsd  %xmm0,(%rsp)
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = alloca double
%2 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %1)
%3 = load double, double* %1
%4 = call double @pow(i32 10, double %3)
store double %4, double* %1
%5 = load double, double* %1
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %1)
%4 = load double, double* %1
%5 = call double @pow(i32 10, double %4)
store double %5, double* %1
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %5)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
scalar_t__ betoh32(int /*<<< orphan*/);
long native___NativeString_fetch_4h_ffi___impl(char *self, long pos) {
  return (long)betoh32(*((uint32_t *)(self + pos)));
}


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

x86 assembly (clang, -O2):
<native___NativeString_fetch_4h_ffi___impl>:
mov    (%rdi,%rsi,1),%edi
jmp    1030 <betoh32@plt>

LLVM IR (-O0):
define i64 @native___NativeString_fetch_4h_ffi___impl(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 = getelementptr inbounds i8, i8* %5, i64 %6
%8 = bitcast i8* %7 to i32*
%9 = load i32, i32* %8
%10 = call i64 @betoh32(i32 %9)
ret i64 %10
}

LLVM IR (-O2):
define i64 @native___NativeString_fetch_4h_ffi___impl(i8* nocapture %0, i64 %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 %1
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
%6 = tail call i64 @betoh32(i32 %5)
ret i64 %6
}
int test_bit(unsigned long bit, unsigned long *b) {
  return ((b)[bit / (8 * sizeof(long))] & (1 << (bit % (8 * sizeof(long)))))
             ? 1
             : 0;
}


x86 assembly (clang, -O0):
<test_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
shr    $0x6,%rcx
mov    (%rax,%rcx,8),%rdx
mov    -0x8(%rbp),%rax
and    $0x3f,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
cltq
and    %rax,%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_bit>:
mov    %rdi,%rcx
mov    %rdi,%rdx
shr    $0x6,%rdx
mov    $0x1,%eax
shl    %cl,%eax
movslq %eax,%rcx
xor    %eax,%eax
test   %rcx,(%rsi,%rdx,8)
setne  %al
ret

LLVM IR (-O0):
define i32 @test_bit(i64 %0, i64* %1) {
%3 = alloca i64
%4 = alloca i64*
store i64 %0, i64* %3
store i64* %1, i64** %4
%5 = load i64*, i64** %4
%6 = load i64, i64* %3
%7 = udiv i64 %6, 64
%8 = getelementptr inbounds i64, i64* %5, i64 %7
%9 = load i64, i64* %8
%10 = load i64, i64* %3
%11 = urem i64 %10, 64
%12 = trunc i64 %11 to i32
%13 = shl i32 1, %12
%14 = sext i32 %13 to i64
%15 = and i64 %9, %14
%16 = icmp ne i64 %15, 0
%17 = zext i1 %16 to i64
%18 = select i1 %16, i32 1, i32 0
ret i32 %18
}

LLVM IR (-O2):
define i32 @test_bit(i64 %0, i64* nocapture %1) {
%3 = lshr i64 %0, 6
%4 = getelementptr inbounds i64, i64* %1, i64 %3
%5 = load i64, i64* %4
%6 = trunc i64 %0 to i32
%7 = and i32 %6, 63
%8 = shl nuw i32 1, %7
%9 = sext i32 %8 to i64
%10 = and i64 %5, %9
%11 = icmp ne i64 %10, 0
%12 = zext i1 %11 to i32
ret i32 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ EVP_PKEY;

/* Variables and functions */
int /*<<< orphan*/ EVP_PKEY_get0(int /*<<< orphan*/ *);
int /*<<< orphan*/ OBJ_nid2obj(int);
int gost94_nid_by_params(int /*<<< orphan*/);
int i2d_ASN1_OBJECT(int /*<<< orphan*/, unsigned char **);
int gost94_param_encode(const EVP_PKEY *pkey, unsigned char **pder) {
  int nid = gost94_nid_by_params(EVP_PKEY_get0((EVP_PKEY *)pkey));
  return i2d_ASN1_OBJECT(OBJ_nid2obj(nid), pder);
}


x86 assembly (clang, -O0):
<gost94_param_encode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <EVP_PKEY_get0@plt>
mov    %eax,%edi
call   1050 <gost94_nid_by_params@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <OBJ_nid2obj@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
call   1060 <i2d_ASN1_OBJECT@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gost94_param_encode>:
push   %rbx
mov    %rsi,%rbx
call   1040 <EVP_PKEY_get0@plt>
mov    %eax,%edi
call   1050 <gost94_nid_by_params@plt>
mov    %eax,%edi
call   1030 <OBJ_nid2obj@plt>
mov    %eax,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1060 <i2d_ASN1_OBJECT@plt>

LLVM IR (-O0):
define i32 @gost94_param_encode(i32* %0, i8** %1) {
%3 = alloca i32*
%4 = alloca i8**
%5 = alloca i32
store i32* %0, i32** %3
store i8** %1, i8*** %4
%6 = load i32*, i32** %3
%7 = call i32 @EVP_PKEY_get0(i32* %6)
%8 = call i32 @gost94_nid_by_params(i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = call i32 @OBJ_nid2obj(i32 %9)
%11 = load i8**, i8*** %4
%12 = call i32 @i2d_ASN1_OBJECT(i32 %10, i8** %11)
ret i32 %12
}

LLVM IR (-O2):
define i32 @gost94_param_encode(i32* %0, i8** %1) {
%3 = tail call i32 @EVP_PKEY_get0(i32* %0)
%4 = tail call i32 @gost94_nid_by_params(i32 %3)
%5 = tail call i32 @OBJ_nid2obj(i32 %4)
%6 = tail call i32 @i2d_ASN1_OBJECT(i32 %5, i8** %1)
ret i32 %6
}
void outer_inv_range(unsigned long start, unsigned long end) {}


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

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

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

LLVM IR (-O2):
define void @outer_inv_range(i64 %0, i64 %1) {
ret void
}
char upcase_char(char c) {
  return (c >= 'a' && c <= 'z') ? (c - 'a' + 'A') : c;
}


x86 assembly (clang, -O0):
<upcase_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x61,%eax
jl     1136 <upcase_char+0x36>
movsbl -0x1(%rbp),%eax
cmp    $0x7a,%eax
jg     1136 <upcase_char+0x36>
movsbl -0x1(%rbp),%eax
sub    $0x61,%eax
add    $0x41,%eax
mov    %eax,-0x8(%rbp)
jmp    113d <upcase_char+0x3d>
movsbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<upcase_char>:
lea    -0x61(%rdi),%eax
lea    -0x20(%rdi),%ecx
cmp    $0x1a,%al
movzbl %cl,%eax
cmovae %edi,%eax
ret

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

LLVM IR (-O2):
define signext i8 @upcase_char(i8 signext %0) {
%2 = add i8 %0, -97
%3 = icmp ult i8 %2, 26
%4 = add i8 %0, -32
%5 = select i1 %3, i8 %4, i8 %0
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, char, char);
void note_aftertouch(char a, char b, char c) {
  printf("note_aftertouch %d %d %d\n", a, b, c);
}


x86 assembly (clang, -O0):
<note_aftertouch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %sil,%cl
mov    %dil,%dl
mov    %dl,-0x1(%rbp)
mov    %cl,-0x2(%rbp)
mov    %al,-0x3(%rbp)
mov    -0x1(%rbp),%cl
mov    -0x2(%rbp),%al
lea    0xeca(%rip),%rdi
movsbl %cl,%esi
movsbl %al,%edx
movsbl -0x3(%rbp),%ecx
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<note_aftertouch>:
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
lea    0xee3(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"note_aftertouch %d %d %d\0A\00"
define void @note_aftertouch(i8 signext %0, i8 signext %1, i8 signext %2) {
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
store i8 %0, i8* %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%7 = load i8, i8* %4
%8 = load i8, i8* %5
%9 = load i8, i8* %6
%10 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8 signext %7, i8 signext %8, i8 signext %9)
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"note_aftertouch %d %d %d\0A\00"
define void @note_aftertouch(i8 signext %0, i8 signext %1, i8 signext %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8 signext %0, i8 signext %1, i8 signext %2)
ret void
}
void TIM8_TRG_COM_TIM14_IRQHandler() {}


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

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

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

LLVM IR (-O2):
define void @TIM8_TRG_COM_TIM14_IRQHandler() {
ret void
}
int func(int i) { int x, y; }


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

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

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

LLVM IR (-O2):
define i32 @func(i32 %0) {
ret i32 undef
}
void gtk_window_mnemonic_activate() {}


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

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

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

LLVM IR (-O2):
define void @gtk_window_mnemonic_activate() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Msp430GpioC__6__GeneralIO__clr();
void CC2420ControlP__VREN__clr(void) { Msp430GpioC__6__GeneralIO__clr(); }


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

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

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

LLVM IR (-O2):
define void @CC2420ControlP__VREN__clr() {
%1 = tail call i32 (...) @Msp430GpioC__6__GeneralIO__clr()
ret void
}
void *_glio_padmem(void *optr) {
  void *nptr;
  nptr = (char *)optr + (0 + (sizeof(long long)) - 1);
  nptr = (char *)((long long)nptr / (sizeof(long long)) * (sizeof(long long)));
  return (nptr);
}


x86 assembly (clang, -O0):
<_glio_padmem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x7,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shr    $0x3,%rax
shl    $0x3,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_glio_padmem>:
lea    0x7(%rdi),%rax
and    $0xfffffffffffffff8,%rax
ret

LLVM IR (-O0):
define i8* @_glio_padmem(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 7
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = ptrtoint i8* %6 to i64
%8 = udiv i64 %7, 8
%9 = mul i64 %8, 8
%10 = inttoptr i64 %9 to i8*
store i8* %10, i8** %3
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
define i8* @_glio_padmem(i8* %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 7
%3 = ptrtoint i8* %2 to i64
%4 = and i64 %3, -8
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}
void gtk_action_group_add_toggle_actions() {}


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

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

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

LLVM IR (-O2):
define void @gtk_action_group_add_toggle_actions() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ xip_fpo_div_flt(float *, float, float);
float xil_fpo_div_flt(float a, float b) {
  float res_flt;
  xip_fpo_div_flt(&res_flt, a, b);
  return res_flt;
}


x86 assembly (clang, -O0):
<xil_fpo_div_flt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
lea    -0xc(%rbp),%rdi
call   1030 <xip_fpo_div_flt@plt>
movss  -0xc(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xil_fpo_div_flt>:
push   %rax
lea    0x4(%rsp),%rdi
call   1030 <xip_fpo_div_flt@plt>
movss  0x4(%rsp),%xmm0
pop    %rax
ret

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

LLVM IR (-O2):
define float @xil_fpo_div_flt(float %0, float %1) {
%3 = alloca float
%4 = bitcast float* %3 to i8*
%5 = call i32 @xip_fpo_div_flt(float* %3, float %0, float %1)
%6 = load float, float* %3
ret float %6
}
/* Variables and functions */
double modf(double, double *);
int Meters_To_Feet(double m) {
  int ret = 0;
  double iptr;
  double in;
  m = m / 0.305;
  in = modf(m, &iptr);
  if (in >= 0.5)
    m++;
  ret = (int)m;
  return ret;
}


x86 assembly (clang, -O0):
<Meters_To_Feet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xed7(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    -0x18(%rbp),%rdi
call   1030 <modf@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xea6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1176 <Meters_To_Feet+0x66>
movsd  0xea4(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
cvttsd2si -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Meters_To_Feet>:
sub    $0x18,%rsp
divsd  0xee4(%rip),%xmm0
movapd %xmm0,(%rsp)
lea    0x10(%rsp),%rdi
call   1030 <modf@plt>
movsd  0xed5(%rip),%xmm1
movapd (%rsp),%xmm3
addsd  %xmm3,%xmm1
movsd  0xecc(%rip),%xmm2
cmpnlesd %xmm0,%xmm2
andpd  %xmm2,%xmm3
andnpd %xmm1,%xmm2
orpd   %xmm3,%xmm2
cvttsd2si %xmm2,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @Meters_To_Feet(double %0) {
%2 = alloca double
%3 = alloca i32
%4 = alloca double
%5 = alloca double
store double %0, double* %2
store i32 0, i32* %3
%6 = load double, double* %2
%7 = fdiv double %6, 3.050000e-01
store double %7, double* %2
%8 = load double, double* %2
%9 = call double @modf(double %8, double* %4)
store double %9, double* %5
%10 = load double, double* %5
%11 = fcmp oge double %10, 5.000000e-01
br i1 %11, label %12, label %15
12: ; preds = %1
%13 = load double, double* %2
%14 = fadd double %13, 1.000000e+00
store double %14, double* %2
br label %15
15: ; preds = %12, %1
%16 = load double, double* %2
%17 = fptosi double %16 to i32
store i32 %17, i32* %3
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @Meters_To_Feet(double %0) {
%2 = alloca double
%3 = bitcast double* %2 to i8*
%4 = fdiv double %0, 3.050000e-01
%5 = call double @modf(double %4, double* %2)
%6 = fcmp ult double %5, 5.000000e-01
%7 = fadd double %4, 1.000000e+00
%8 = select i1 %6, double %4, double %7
%9 = fptosi double %8 to i32
ret i32 %9
}
/* Type definitions */
typedef int int32_t;
typedef int int16_t;

/* Variables and functions */
int16_t get_offset(int32_t instruction) { return (instruction & 0x0000ffff); }


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

x86 assembly (clang, -O2):
<get_offset>:
movzwl %di,%eax
ret

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

LLVM IR (-O2):
define i32 @get_offset(i32 %0) {
%2 = and i32 %0, 65535
ret i32 %2
}
int gcd(int a, int b) {
  while (b != 0) {
    int r = a % b;
    a = b;
    b = r;
  }
  if (a < 0)
    return -a;
  else
    return a;
}


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     112f <gcd+0x2f>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    110a <gcd+0xa>
cmpl   $0x0,-0x8(%rbp)
jge    1146 <gcd+0x46>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114c <gcd+0x4c>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
mov    %edi,%eax
test   %esi,%esi
je     111d <gcd+0x1d>
mov    %esi,%edx
nopl   0x0(%rax,%rax,1)
mov    %edx,%ecx
cltd
idiv   %ecx
mov    %ecx,%eax
test   %edx,%edx
jne    1110 <gcd+0x10>
jmp    111f <gcd+0x1f>
mov    %eax,%ecx
mov    %ecx,%eax
neg    %eax
cmovs  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @gcd(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
br label %7
7: ; preds = %10, %2
%8 = load i32, i32* %5
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %16
10: ; preds = %7
%11 = load i32, i32* %4
%12 = load i32, i32* %5
%13 = srem i32 %11, %12
store i32 %13, i32* %6
%14 = load i32, i32* %5
store i32 %14, i32* %4
%15 = load i32, i32* %6
store i32 %15, i32* %5
br label %7
16: ; preds = %7
%17 = load i32, i32* %4
%18 = icmp slt i32 %17, 0
br i1 %18, label %19, label %22
19: ; preds = %16
%20 = load i32, i32* %4
%21 = sub nsw i32 0, %20
store i32 %21, i32* %3
br label %24
22: ; preds = %16
%23 = load i32, i32* %4
store i32 %23, i32* %3
br label %24
24: ; preds = %22, %19
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @gcd(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ %1, %2 ]
%6 = phi i32 [ %5, %4 ], [ %0, %2 ]
%7 = srem i32 %6, %5
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
%10 = phi i32 [ %0, %2 ], [ %5, %4 ]
%11 = tail call i32 @llvm.abs.i32(i32 %10, i1 true)
ret i32 %11
}
void XkbGetKeyActions() {}


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

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

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

LLVM IR (-O2):
define void @XkbGetKeyActions() {
ret void
}
/* Variables and functions */
int strtol(char const *, int /*<<< orphan*/ *, int);
int number(const char *string) { return strtol(string, NULL, 10); }


x86 assembly (clang, -O0):
<number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1030 <strtol@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<number>:
xor    %esi,%esi
mov    $0xa,%edx
jmp    1030 <strtol@plt>

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

LLVM IR (-O2):
define i32 @number(i8* nocapture %0) {
%2 = tail call i32 @strtol(i8* nocapture %0, i32* null, i32 10)
ret i32 %2
}
void forensics_private_unregister_signal_handlers() {}


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

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

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

LLVM IR (-O2):
define void @forensics_private_unregister_signal_handlers() {
ret void
}
unsigned char ___ia64_readb(void *addr) {
  return *(volatile unsigned char *)addr;
}


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

x86 assembly (clang, -O2):
<___ia64_readb>:
mov    (%rdi),%al
ret

LLVM IR (-O0):
define zeroext i8 @___ia64_readb(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load volatile i8, i8* %3
ret i8 %4
}

LLVM IR (-O2):
define zeroext i8 @___ia64_readb(i8* %0) {
%2 = load volatile i8, i8* %0
ret i8 %2
}
/* Variables and functions */
int core1_safe(char const *);
int U_EMRPOLYGON_safe(const char *record) { return (core1_safe(record)); }


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

x86 assembly (clang, -O2):
<U_EMRPOLYGON_safe>:
jmp    1030 <core1_safe@plt>

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

LLVM IR (-O2):
define i32 @U_EMRPOLYGON_safe(i8* %0) {
%2 = tail call i32 @core1_safe(i8* %0)
ret i32 %2
}
void caller_2_2_2_1_2_2_2() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @RTVfsObjQueryInfo() {
ret void
}
/* Variables and functions */
char *s_let(char *, char *);
char *macobracket(char *arg) { return (s_let("(", arg)); }


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

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

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

LLVM IR (-O2):
@.str = [2 x i8] c"(\00"
define i8* @macobracket(i8* %0) {
%2 = tail call i8* @s_let(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i8* %2
}