xunge/DecIR huggingface dataset:
unsigned long long __attribute__((no, noclone))
foo(unsigned int x, unsigned long long y) {
  x |= 0xffff;
  y -= 0xffULL;
  y %= 0xffff0000ffffffe7ULL;
  return x + y;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
or     $0xffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x10(%rbp),%rax
sub    $0xff,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movabs $0xffff0000ffffffe7,%rcx
xor    %edx,%edx
div    %rcx
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
or     $0xffff,%edi
lea    -0xff(%rsi),%rcx
movabs $0xfffeffffff1a,%rax
add    %rsi,%rax
movabs $0xffff0000ffffffe7,%rdx
cmp    %rdx,%rcx
cmovb  %rcx,%rax
add    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @foo(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%5 = load i32, i32* %3
%6 = or i32 %5, 65535
store i32 %6, i32* %3
%7 = load i64, i64* %4
%8 = sub i64 %7, 255
store i64 %8, i64* %4
%9 = load i64, i64* %4
%10 = urem i64 %9, -281470681743385
store i64 %10, i64* %4
%11 = load i32, i32* %3
%12 = zext i32 %11 to i64
%13 = load i64, i64* %4
%14 = add i64 %12, %13
ret i64 %14
}

LLVM IR (-O2):
define i64 @foo(i32 %0, i64 %1) {
%3 = or i32 %0, 65535
%4 = add i64 %1, -255
%5 = icmp ult i64 %4, -281470681743385
%6 = add i64 %1, 281470681743130
%7 = select i1 %5, i64 %4, i64 %6
%8 = zext i32 %3 to i64
%9 = add i64 %7, %8
ret i64 %9
}
/* Type definitions */
struct argp_state {
  int dummy;
};
typedef int /*<<< orphan*/ error_t;

/* Variables and functions */
int /*<<< orphan*/ ARGP_ERR_UNKNOWN;
int /*<<< orphan*/ setbuf(int /*<<< orphan*/, int /*<<< orphan*/ *);
int /*<<< orphan*/ stdout;
error_t parse_opt(int key, char *arg, struct argp_state *state) {
  switch (key) {
  case 'u':
    setbuf(stdout, NULL);
    break;
  default:
    return ARGP_ERR_UNKNOWN;
  }
  return 0;
}


x86 assembly (clang, -O0):
<parse_opt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x75,%eax
jne    114b <parse_opt+0x3b>
jmp    1134 <parse_opt+0x24>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <setbuf@plt>
jmp    115c <parse_opt+0x4c>
mov    0x2e8e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1163 <parse_opt+0x53>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_opt>:
push   %rbx
cmp    $0x75,%edi
jne    112a <parse_opt+0x1a>
mov    0x2ebb(%rip),%rax
mov    (%rax),%edi
xor    %ebx,%ebx
xor    %esi,%esi
call   1030 <setbuf@plt>
jmp    1133 <parse_opt+0x23>
mov    0x2eaf(%rip),%rax
mov    (%rax),%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.argp_state = type { i32 }
@stdout = global i32 0
@ARGP_ERR_UNKNOWN = global i32 0
define i32 @parse_opt(i32 %0, i8* %1, %struct.argp_state* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca %struct.argp_state*
store i32 %0, i32* %5
store i8* %1, i8** %6
store %struct.argp_state* %2, %struct.argp_state** %7
%8 = load i32, i32* %5
switch i32 %8, label %12 [
i32 117, label %9
]
9: ; preds = %3
%10 = load i32, i32* @stdout
%11 = call i32 @setbuf(i32 %10, i32* null)
br label %14
12: ; preds = %3
%13 = load i32, i32* @ARGP_ERR_UNKNOWN
store i32 %13, i32* %4
br label %15
14: ; preds = %9
store i32 0, i32* %4
br label %15
15: ; preds = %14, %12
%16 = load i32, i32* %4
ret i32 %16
}

LLVM IR (-O2):
%struct.argp_state = type { i32 }
@stdout = global i32 0
@ARGP_ERR_UNKNOWN = global i32 0
define i32 @parse_opt(i32 %0, i8* nocapture readnone %1, %struct.argp_state* nocapture readnone %2) {
%4 = icmp eq i32 %0, 117
br i1 %4, label %5, label %8
5: ; preds = %3
%6 = load i32, i32* @stdout
%7 = tail call i32 @setbuf(i32 %6, i32* null)
br label %10
8: ; preds = %3
%9 = load i32, i32* @ARGP_ERR_UNKNOWN
br label %10
10: ; preds = %5, %8
%11 = phi i32 [ 0, %5 ], [ %9, %8 ]
ret i32 %11
}
long long longfunc(long long x, long long y) { return x * y; }


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

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

LLVM IR (-O0):
define i64 @longfunc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = mul nsw i64 %5, %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @longfunc(i64 %0, i64 %1) {
%3 = mul nsw i64 %1, %0
ret i64 %3
}
double recip(double z) { return (1.00 / z); }


x86 assembly (clang, -O0):
<recip>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
divsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<recip>:
movsd  0xef8(%rip),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @recip(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double 1.000000e+00, %3
ret double %4
}

LLVM IR (-O2):
define double @recip(double %0) {
%2 = fdiv double 1.000000e+00, %0
ret double %2
}
/* Variables and functions */
int eaplogin(char const *, char const *);
int eaprefresh(char const *username, char const *password) {
  return eaplogin(username, password);
}


x86 assembly (clang, -O0):
<eaprefresh>:
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 <eaplogin@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eaprefresh>:
jmp    1030 <eaplogin@plt>

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

LLVM IR (-O2):
define i32 @eaprefresh(i8* %0, i8* %1) {
%3 = tail call i32 @eaplogin(i8* %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ clear_io_bit(int, int);
void TOSH_CLR_RED_LED_PIN() { clear_io_bit(0x34, 2); }


x86 assembly (clang, -O0):
<TOSH_CLR_RED_LED_PIN>:
push   %rbp
mov    %rsp,%rbp
mov    $0x34,%edi
mov    $0x2,%esi
call   1030 <clear_io_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_CLR_RED_LED_PIN>:
mov    $0x34,%edi
mov    $0x2,%esi
jmp    1030 <clear_io_bit@plt>

LLVM IR (-O0):
define void @TOSH_CLR_RED_LED_PIN() {
%1 = call i32 @clear_io_bit(i32 52, i32 2)
ret void
}

LLVM IR (-O2):
define void @TOSH_CLR_RED_LED_PIN() {
%1 = tail call i32 @clear_io_bit(i32 52, i32 2)
ret void
}
const char *getUsage() {
  return "Usage:\n"
         "jobexecutor [--version|-v] [--help|-h] [<boottime_how> "
         "<taskfileName> [boottime]]\n"
         "\n"
         "Exactly one of the optional argument sets must be specified\n"
         "i.e. either the version request, or this help request or some "
         "specification on what to do\n";
}


x86 assembly (clang, -O0):
<getUsage>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getUsage>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [241 x i8] c"Usage:\0Ajobexecutor [--version|-v] [--help|-h] [<boottime_how> <taskfileName> [boottime]]\0A\0AExactly one of the optional argument sets must be specified\0Ai.e. either the version request, or this help request or some specification on what to do\0A\00"
define i8* @getUsage() {
ret i8* getelementptr inbounds ([241 x i8], [241 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [241 x i8] c"Usage:\0Ajobexecutor [--version|-v] [--help|-h] [<boottime_how> <taskfileName> [boottime]]\0A\0AExactly one of the optional argument sets must be specified\0Ai.e. either the version request, or this help request or some specification on what to do\0A\00"
define i8* @getUsage() {
ret i8* getelementptr inbounds ([241 x i8], [241 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t bitCount_fun_uint32_t(uint32_t x) {
  uint32_t r = x & 1;
  while (x >>= 1)
    r += x & 1;
  return r;
}


x86 assembly (clang, -O0):
<bitCount_fun_uint32_t>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
je     1133 <bitCount_fun_uint32_t+0x33>
mov    -0x4(%rbp),%eax
and    $0x1,%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1110 <bitCount_fun_uint32_t+0x10>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitCount_fun_uint32_t>:
mov    %edi,%eax
and    $0x1,%eax
cmp    $0x2,%edi
jb     1120 <bitCount_fun_uint32_t+0x20>
mov    %edi,%ecx
nopl   0x0(%rax)
sar    %ecx
mov    %ecx,%edx
and    $0x1,%edx
add    %edx,%eax
cmp    $0x3,%edi
mov    %ecx,%edi
ja     1110 <bitCount_fun_uint32_t+0x10>
ret

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

LLVM IR (-O2):
define i32 @bitCount_fun_uint32_t(i32 %0) {
%2 = and i32 %0, 1
%3 = icmp ult i32 %0, 2
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ %0, %1 ]
%6 = phi i32 [ %9, %4 ], [ %2, %1 ]
%7 = ashr i32 %5, 1
%8 = and i32 %7, 1
%9 = add nuw nsw i32 %8, %6
%10 = icmp ult i32 %5, 4
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ %2, %1 ], [ %9, %4 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printLeftmostNBits(int number, int nBits) {
  int bitLocation;
  for (bitLocation = nBits - 1; bitLocation >= 0; bitLocation--) {
    printf("%d", (number >> bitLocation) & 1);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<printLeftmostNBits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     1158 <printLeftmostNBits+0x48>
mov    -0x4(%rbp),%esi
mov    -0xc(%rbp),%ecx
sar    %cl,%esi
and    $0x1,%esi
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <printLeftmostNBits+0x17>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printLeftmostNBits>:
push   %rbp
push   %r14
push   %rbx
test   %esi,%esi
jle    115c <printLeftmostNBits+0x3c>
mov    %esi,%ebx
mov    %edi,%ebp
add    $0x1,%ebx
lea    0xeca(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
lea    -0x2(%rbx),%ecx
mov    %ebp,%esi
shr    %cl,%esi
and    $0x1,%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0xffffffff,%ebx
cmp    $0x1,%ebx
ja     1140 <printLeftmostNBits+0x20>
mov    $0xa,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @printLeftmostNBits(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* %4
%7 = sub nsw i32 %6, 1
store i32 %7, i32* %5
br label %8
8: ; preds = %17, %2
%9 = load i32, i32* %5
%10 = icmp sge i32 %9, 0
br i1 %10, label %11, label %20
11: ; preds = %8
%12 = load i32, i32* %3
%13 = load i32, i32* %5
%14 = ashr i32 %12, %13
%15 = and i32 %14, 1
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %15)
br label %17
17: ; preds = %11
%18 = load i32, i32* %5
%19 = add nsw i32 %18, -1
store i32 %19, i32* %5
br label %8
20: ; preds = %8
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @printLeftmostNBits(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %11
4: ; preds = %2, %4
%5 = phi i32 [ %6, %4 ], [ %1, %2 ]
%6 = add nsw i32 %5, -1
%7 = lshr i32 %0, %6
%8 = and i32 %7, 1
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = icmp ugt i32 %5, 1
br i1 %10, label %4, label %11
11: ; preds = %4, %2
%12 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
scalar_t__ __gen_tempname(char *, int);
char *mktemp(char *template) {
  if (__gen_tempname(template, 3) < 0)
    template[0] = '\0';
  return template;
}


x86 assembly (clang, -O0):
<mktemp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x3,%esi
call   1030 <__gen_tempname@plt>
cmp    $0x0,%rax
jge    113b <mktemp+0x2b>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mktemp>:
push   %rbx
mov    %rdi,%rbx
mov    $0x3,%esi
call   1030 <__gen_tempname@plt>
test   %rax,%rax
jns    1126 <mktemp+0x16>
movb   $0x0,(%rbx)
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @mktemp(i8* returned %0) {
%2 = tail call i64 @__gen_tempname(i8* %0, i32 3)
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %1
store i8 0, i8* %0
br label %5
5: ; preds = %4, %1
ret i8* %0
}
void f(a, b) int a;
int b;
{}


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

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

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

LLVM IR (-O2):
define void @f(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
float sinf(float);
float __ocl_sin_float(float src) { return sinf(src); }


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

x86 assembly (clang, -O2):
<__ocl_sin_float>:
jmp    1030 <sinf@plt>

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

LLVM IR (-O2):
define float @__ocl_sin_float(float %0) {
%2 = tail call float @sinf(float %0)
ret float %2
}
double pow_10(int in_exp) {
  double result = 1;
  while (in_exp) {
    result *= 10;
    in_exp--;
  }
  return result;
}


x86 assembly (clang, -O0):
<pow_10>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movsd  0xef1(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     113e <pow_10+0x3e>
movsd  0xee2(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    1114 <pow_10+0x14>
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<pow_10>:
test   %edi,%edi
je     1134 <pow_10+0x34>
lea    -0x1(%rdi),%eax
mov    %edi,%ecx
and    $0x7,%ecx
je     113d <pow_10+0x3d>
xor    %edx,%edx
movsd  0xee8(%rip),%xmm0
movsd  0xee8(%rip),%xmm1
mulsd  %xmm1,%xmm0
add    $0x1,%edx
cmp    %edx,%ecx
jne    1120 <pow_10+0x20>
sub    %edx,%edi
cmp    $0x7,%eax
jae    114a <pow_10+0x4a>
jmp    1185 <pow_10+0x85>
movsd  0xec4(%rip),%xmm0
ret
movsd  0xebb(%rip),%xmm0
cmp    $0x7,%eax
jb     1185 <pow_10+0x85>
movsd  0xeb6(%rip),%xmm1
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
add    $0xfffffff8,%edi
jne    1160 <pow_10+0x60>
ret

LLVM IR (-O0):
define double @pow_10(i32 %0) {
%2 = alloca i32
%3 = alloca double
store i32 %0, i32* %2
store double 1.000000e+00, double* %3
br label %4
4: ; preds = %7, %1
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %4
%8 = load double, double* %3
%9 = fmul double %8, 1.000000e+01
store double %9, double* %3
%10 = load i32, i32* %2
%11 = add nsw i32 %10, -1
store i32 %11, i32* %2
br label %4
12: ; preds = %4
%13 = load double, double* %3
ret double %13
}

LLVM IR (-O2):
define double @pow_10(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %33, label %3
3: ; preds = %1
%4 = add i32 %0, -1
%5 = and i32 %0, 7
%6 = icmp eq i32 %5, 0
br i1 %6, label %15, label %7
7: ; preds = %3, %7
%8 = phi double [ %11, %7 ], [ 1.000000e+00, %3 ]
%9 = phi i32 [ %12, %7 ], [ %0, %3 ]
%10 = phi i32 [ %13, %7 ], [ 0, %3 ]
%11 = fmul double %8, 1.000000e+01
%12 = add nsw i32 %9, -1
%13 = add i32 %10, 1
%14 = icmp eq i32 %13, %5
br i1 %14, label %15, label %7
15: ; preds = %7, %3
%16 = phi double [ undef, %3 ], [ %11, %7 ]
%17 = phi double [ 1.000000e+00, %3 ], [ %11, %7 ]
%18 = phi i32 [ %0, %3 ], [ %12, %7 ]
%19 = icmp ult i32 %4, 7
br i1 %19, label %33, label %20
20: ; preds = %15, %20
%21 = phi double [ %30, %20 ], [ %17, %15 ]
%22 = phi i32 [ %31, %20 ], [ %18, %15 ]
%23 = fmul double %21, 1.000000e+01
%24 = fmul double %23, 1.000000e+01
%25 = fmul double %24, 1.000000e+01
%26 = fmul double %25, 1.000000e+01
%27 = fmul double %26, 1.000000e+01
%28 = fmul double %27, 1.000000e+01
%29 = fmul double %28, 1.000000e+01
%30 = fmul double %29, 1.000000e+01
%31 = add nsw i32 %22, -8
%32 = icmp eq i32 %31, 0
br i1 %32, label %33, label %20
33: ; preds = %15, %20, %1
%34 = phi double [ 1.000000e+00, %1 ], [ %16, %15 ], [ %30, %20 ]
ret double %34
}
int f(int x) {
  while (1) {
  }
  return x;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <f+0x7>

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

LLVM IR (-O0):
define i32 @f(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %1, %3
br label %3
}

LLVM IR (-O2):
define i32 @f(i32 %0) {
br label %2
2: ; preds = %1, %2
br label %2
}
void CRYPTO_set_dynlock_lock_callback(void) {}


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

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

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

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

/* Variables and functions */
int32_t littleEndian32(unsigned char b[]) {
  return (int32_t)b[0] | ((int32_t)b[1] << 8) | ((int32_t)b[2] << 16) |
         ((int32_t)b[3] << 24);
}


x86 assembly (clang, -O0):
<littleEndian32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x3(%rcx),%ecx
shl    $0x18,%ecx
or     %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @littleEndian32(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = shl i32 %10, 8
%12 = or i32 %6, %11
%13 = load i8*, i8** %2
%14 = getelementptr inbounds i8, i8* %13, i64 2
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = shl i32 %16, 16
%18 = or i32 %12, %17
%19 = load i8*, i8** %2
%20 = getelementptr inbounds i8, i8* %19, i64 3
%21 = load i8, i8* %20
%22 = zext i8 %21 to i32
%23 = shl i32 %22, 24
%24 = or i32 %18, %23
ret i32 %24
}

LLVM IR (-O2):
define i32 @littleEndian32(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = or i32 %7, %3
%9 = getelementptr inbounds i8, i8* %0, i64 2
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = shl nuw nsw i32 %11, 16
%13 = or i32 %8, %12
%14 = getelementptr inbounds i8, i8* %0, i64 3
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = shl nuw i32 %16, 24
%18 = or i32 %13, %17
ret i32 %18
}
void UpdateColorsNone(void) {}


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

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

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

LLVM IR (-O2):
define void @UpdateColorsNone() {
ret void
}
void ccp_userwait() { ; }


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

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

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

LLVM IR (-O2):
define void @ccp_userwait() {
ret void
}
/* Variables and functions */
char *strdup(char *);
char *config_param_val_str(char *val) { return strdup(val); }


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

x86 assembly (clang, -O2):
<config_param_val_str>:
jmp    1030 <strdup@plt>

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

LLVM IR (-O2):
define noalias i8* @config_param_val_str(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void JUNK_() { printf("upper case, _ "); }


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"upper case, _ \00"
define void @JUNK_() {
%1 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"upper case, _ \00"
define void @JUNK_() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int processo();
int main(void) {
  int resposta;
  resposta = processo();
  printf("%d\n", resposta);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <processo@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @processo()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
char *shortestPalindrome(char *);
int main(int argc, char *argv[]) {
  if (argc == 2) {
    printf("%s\n", shortestPalindrome(argv[1]));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    115c <main+0x3c>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <shortestPalindrome@plt>
mov    %rax,%rsi
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
cmp    $0x2,%edi
jne    1142 <main+0x22>
push   %rax
mov    0x8(%rsi),%rdi
call   1040 <shortestPalindrome@plt>
lea    0xeca(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i8* @shortestPalindrome(i8* %6)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %7)
br label %9
9: ; preds = %4, %2
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct buffer_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ game_process_stream(int /*<<< orphan*/, int /*<<< orphan*/,
                                       struct buffer_t *);
void game_process_stream_untimed(uint32_t conn, uint32_t index,
                                 struct buffer_t *stream) {
  game_process_stream(conn, index, stream);
}


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

x86 assembly (clang, -O2):
<game_process_stream_untimed>:
jmp    1030 <game_process_stream@plt>

LLVM IR (-O0):
%struct.buffer_t = type { i32 }
define void @game_process_stream_untimed(i32 %0, i32 %1, %struct.buffer_t* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca %struct.buffer_t*
store i32 %0, i32* %4
store i32 %1, i32* %5
store %struct.buffer_t* %2, %struct.buffer_t** %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load %struct.buffer_t*, %struct.buffer_t** %6
%10 = call i32 @game_process_stream(i32 %7, i32 %8, %struct.buffer_t* %9)
ret void
}

LLVM IR (-O2):
%struct.buffer_t = type { i32 }
define void @game_process_stream_untimed(i32 %0, i32 %1, %struct.buffer_t* %2) {
%4 = tail call i32 @game_process_stream(i32 %0, i32 %1, %struct.buffer_t* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int bar() {
  printf("Hello from bar.\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"Hello from bar.\0A\00"
define i32 @bar() {
%1 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [16 x i8] c"Hello from bar.\00"
define i32 @bar() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int f1(int *array) {
  int i;
  i = sizeof array / sizeof *array;
  i += sizeof array / sizeof array[0];
  i += sizeof(array) / sizeof(*array);
  i += sizeof(array) / sizeof(array[0]);
  i += (sizeof(array)) / (sizeof(array[0]));
  i += sizeof(array) / sizeof(int);
  i += sizeof(array) / sizeof(char);
  i += sizeof(*array) / sizeof(char);
  i += sizeof(array[0]) / sizeof(char);
  return i;
}


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
movslq -0xc(%rbp),%rax
add    $0x2,%rax
mov    %eax,-0xc(%rbp)
movslq -0xc(%rbp),%rax
add    $0x2,%rax
mov    %eax,-0xc(%rbp)
movslq -0xc(%rbp),%rax
add    $0x2,%rax
mov    %eax,-0xc(%rbp)
movslq -0xc(%rbp),%rax
add    $0x2,%rax
mov    %eax,-0xc(%rbp)
movslq -0xc(%rbp),%rax
add    $0x2,%rax
mov    %eax,-0xc(%rbp)
movslq -0xc(%rbp),%rax
add    $0x8,%rax
mov    %eax,-0xc(%rbp)
movslq -0xc(%rbp),%rax
add    $0x4,%rax
mov    %eax,-0xc(%rbp)
movslq -0xc(%rbp),%rax
add    $0x4,%rax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f1(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
store i32 2, i32* %3
%4 = load i32, i32* %3
%5 = sext i32 %4 to i64
%6 = add i64 %5, 2
%7 = trunc i64 %6 to i32
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = sext i32 %8 to i64
%10 = add i64 %9, 2
%11 = trunc i64 %10 to i32
store i32 %11, i32* %3
%12 = load i32, i32* %3
%13 = sext i32 %12 to i64
%14 = add i64 %13, 2
%15 = trunc i64 %14 to i32
store i32 %15, i32* %3
%16 = load i32, i32* %3
%17 = sext i32 %16 to i64
%18 = add i64 %17, 2
%19 = trunc i64 %18 to i32
store i32 %19, i32* %3
%20 = load i32, i32* %3
%21 = sext i32 %20 to i64
%22 = add i64 %21, 2
%23 = trunc i64 %22 to i32
store i32 %23, i32* %3
%24 = load i32, i32* %3
%25 = sext i32 %24 to i64
%26 = add i64 %25, 8
%27 = trunc i64 %26 to i32
store i32 %27, i32* %3
%28 = load i32, i32* %3
%29 = sext i32 %28 to i64
%30 = add i64 %29, 4
%31 = trunc i64 %30 to i32
store i32 %31, i32* %3
%32 = load i32, i32* %3
%33 = sext i32 %32 to i64
%34 = add i64 %33, 4
%35 = trunc i64 %34 to i32
store i32 %35, i32* %3
%36 = load i32, i32* %3
ret i32 %36
}

LLVM IR (-O2):
define i32 @f1(i32* nocapture readnone %0) {
ret i32 28
}
/* Type definitions */
struct hashEl {
  int dummy;
};
struct hash {
  int dummy;
};

/* Variables and functions */
struct hashEl *hashAdd(struct hash *, char *, void *);
scalar_t__ hashLookup(struct hash *, char *);
int /*<<< orphan*/ hashRemove(struct hash *, char *);
struct hashEl *hashReplace(struct hash *hash, char *name, void *val) {
  if (hashLookup(hash, name))
    hashRemove(hash, name);
  return hashAdd(hash, name, val);
}


x86 assembly (clang, -O0):
<hashReplace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <hashLookup@plt>
cmp    $0x0,%rax
je     1168 <hashReplace+0x38>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <hashRemove@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <hashAdd@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashReplace>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
call   1050 <hashLookup@plt>
test   %rax,%rax
je     1153 <hashReplace+0x23>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <hashRemove@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <hashAdd@plt>

LLVM IR (-O0):
%struct.hashEl = type { i32 }
%struct.hash = type { i32 }
define %struct.hashEl* @hashReplace(%struct.hash* %0, i8* %1, i8* %2) {
%4 = alloca %struct.hash*
%5 = alloca i8*
%6 = alloca i8*
store %struct.hash* %0, %struct.hash** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load %struct.hash*, %struct.hash** %4
%8 = load i8*, i8** %5
%9 = call i64 @hashLookup(%struct.hash* %7, i8* %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %3
%12 = load %struct.hash*, %struct.hash** %4
%13 = load i8*, i8** %5
%14 = call i32 @hashRemove(%struct.hash* %12, i8* %13)
br label %15
15: ; preds = %11, %3
%16 = load %struct.hash*, %struct.hash** %4
%17 = load i8*, i8** %5
%18 = load i8*, i8** %6
%19 = call %struct.hashEl* @hashAdd(%struct.hash* %16, i8* %17, i8* %18)
ret %struct.hashEl* %19
}

LLVM IR (-O2):
%struct.hashEl = type { i32 }
%struct.hash = type { i32 }
define %struct.hashEl* @hashReplace(%struct.hash* %0, i8* %1, i8* %2) {
%4 = tail call i64 @hashLookup(%struct.hash* %0, i8* %1)
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @hashRemove(%struct.hash* %0, i8* %1)
br label %8
8: ; preds = %6, %3
%9 = tail call %struct.hashEl* @hashAdd(%struct.hash* %0, i8* %1, i8* %2)
ret %struct.hashEl* %9
}
int json_isalpha(int ch) {
  return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z');
}


x86 assembly (clang, -O0):
<json_isalpha>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x61,-0x4(%rbp)
jl     1120 <json_isalpha+0x20>
mov    $0x1,%al
cmpl   $0x7a,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    113f <json_isalpha+0x3f>
xor    %eax,%eax
cmpl   $0x41,-0x4(%rbp)
mov    %al,-0x6(%rbp)
jl     1139 <json_isalpha+0x39>
cmpl   $0x5a,-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
pop    %rbp
ret

x86 assembly (clang, -O2):
<json_isalpha>:
and    $0xffffffdf,%edi
add    $0xffffffbf,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @json_isalpha(i32 %0) {
%2 = and i32 %0, -33
%3 = add i32 %2, -65
%4 = icmp ult i32 %3, 26
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printFloat(char headerMessage[], float value) {
  printf("%s", headerMessage);
  printf("%f\n", value);
}


x86 assembly (clang, -O0):
<printFloat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xec0(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printFloat>:
push   %rax
movss  %xmm0,0x4(%rsp)
mov    %rdi,%rsi
lea    0xedf(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xeca(%rip),%rdi
mov    $0x1,%al
pop    %rcx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"%f\0A\00"
define void @printFloat(i8* %0, float %1) {
%3 = alloca i8*
%4 = alloca float
store i8* %0, i8** %3
store float %1, float* %4
%5 = load i8*, i8** %3
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load float, float* %4
%8 = fpext float %7 to double
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %8)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"%f\0A\00"
define void @printFloat(i8* %0, float %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = fpext float %1 to double
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %4)
ret void
}
void RTLockValidatorRecExclReleaseOwnerUnchecked(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ assert(char **);
int sec_to_timestr(int /*<<< orphan*/, char *, char **);
int sec_to_timestr_full(time_t sec, char **time) {
  assert(time);
  return sec_to_timestr(sec, "%a %Y-%m-%d %H:%M:%S %Z", time);
}


x86 assembly (clang, -O0):
<sec_to_timestr_full>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <assert@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
lea    0xeba(%rip),%rsi
call   1040 <sec_to_timestr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sec_to_timestr_full>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1030 <assert@plt>
lea    0xec9(%rip),%rsi
mov    %ebp,%edi
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <sec_to_timestr@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"%a %Y-%m-%d %H:%M:%S %Z\00"
define i32 @sec_to_timestr_full(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i8**, i8*** %4
%6 = call i32 @assert(i8** %5)
%7 = load i32, i32* %3
%8 = load i8**, i8*** %4
%9 = call i32 @sec_to_timestr(i32 %7, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8** %8)
ret i32 %9
}

LLVM IR (-O2):
@.str = [24 x i8] c"%a %Y-%m-%d %H:%M:%S %Z\00"
define i32 @sec_to_timestr_full(i32 %0, i8** %1) {
%3 = tail call i32 @assert(i8** %1)
%4 = tail call i32 @sec_to_timestr(i32 %0, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8** %1)
ret i32 %4
}
/* Variables and functions */
void strncmp() {}


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

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

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

LLVM IR (-O2):
define void @strncmp() {
ret void
}
unsigned char f5(unsigned char x, int y) {
  x = (unsigned char)(y & 255);
  return x;
}


x86 assembly (clang, -O0):
<f5>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xff,%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f5>:
mov    %esi,%eax
ret

LLVM IR (-O0):
define zeroext i8 @f5(i8 zeroext %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 = and i32 %5, 255
%7 = trunc i32 %6 to i8
store i8 %7, i8* %3
%8 = load i8, i8* %3
ret i8 %8
}

LLVM IR (-O2):
define zeroext i8 @f5(i8 zeroext %0, i32 %1) {
%3 = trunc i32 %1 to i8
ret i8 %3
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ base58_encode_check(int *, int, char *, int);
int /*<<< orphan*/ memcpy(int *, int const *, int);
void wallet_get_wif(const uint8_t *priv_key, uint8_t version, char *wif,
                    int wifsize) {
  uint8_t data[34];
  data[0] = version;
  memcpy(data + 1, priv_key, 32);
  data[33] = 0x01;
  base58_encode_check(data, 34, wif, wifsize);
}


x86 assembly (clang, -O0):
<wallet_get_wif>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0xb0(%rbp)
lea    -0xb0(%rbp),%rdi
add    $0x4,%rdi
mov    -0x8(%rbp),%rsi
mov    $0x20,%edx
call   1030 <memcpy@plt>
movl   $0x1,-0x2c(%rbp)
lea    -0xb0(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    $0x22,%esi
call   1040 <base58_encode_check@plt>
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wallet_get_wif>:
push   %rbp
push   %rbx
sub    $0x88,%rsp
mov    %ecx,%ebp
mov    %rdx,%rbx
mov    %rdi,%rax
mov    %esi,(%rsp)
lea    0x4(%rsp),%rdi
mov    %rax,%rsi
mov    $0x20,%edx
call   1030 <memcpy@plt>
movl   $0x1,0x84(%rsp)
mov    %rsp,%rdi
mov    $0x22,%esi
mov    %rbx,%rdx
mov    %ebp,%ecx
call   1040 <base58_encode_check@plt>
add    $0x88,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @wallet_get_wif(i32* %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
%9 = alloca [34 x i32]
store i32* %0, i32** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%10 = load i32, i32* %6
%11 = getelementptr inbounds [34 x i32], [34 x i32]* %9, i64 0, i64 0
store i32 %10, i32* %11
%12 = getelementptr inbounds [34 x i32], [34 x i32]* %9, i64 0, i64 0
%13 = getelementptr inbounds i32, i32* %12, i64 1
%14 = load i32*, i32** %5
%15 = call i32 @memcpy(i32* %13, i32* %14, i32 32)
%16 = getelementptr inbounds [34 x i32], [34 x i32]* %9, i64 0, i64 33
store i32 1, i32* %16
%17 = getelementptr inbounds [34 x i32], [34 x i32]* %9, i64 0, i64 0
%18 = load i8*, i8** %7
%19 = load i32, i32* %8
%20 = call i32 @base58_encode_check(i32* %17, i32 34, i8* %18, i32 %19)
ret void
}

LLVM IR (-O2):
define void @wallet_get_wif(i32* %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca [34 x i32]
%6 = bitcast [34 x i32]* %5 to i8*
%7 = getelementptr inbounds [34 x i32], [34 x i32]* %5, i64 0, i64 0
store i32 %1, i32* %7
%8 = getelementptr inbounds [34 x i32], [34 x i32]* %5, i64 0, i64 1
%9 = call i32 @memcpy(i32* %8, i32* %0, i32 32)
%10 = getelementptr inbounds [34 x i32], [34 x i32]* %5, i64 0, i64 33
store i32 1, i32* %10
%11 = call i32 @base58_encode_check(i32* %7, i32 34, i8* %2, i32 %3)
ret void
}
void doit() {
  ;
  return;
}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ free(struct eiwic_plugin_trigger *);
void plug_trigger_destroy(void *data) {
  struct eiwic_plugin_trigger *ept = data;
  free(ept);
}


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

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

LLVM IR (-O0):
%struct.eiwic_plugin_trigger = type { i32 }
define void @plug_trigger_destroy(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.eiwic_plugin_trigger*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to %struct.eiwic_plugin_trigger*
store %struct.eiwic_plugin_trigger* %5, %struct.eiwic_plugin_trigger** %3
%6 = load %struct.eiwic_plugin_trigger*, %struct.eiwic_plugin_trigger** %3
%7 = call i32 @free(%struct.eiwic_plugin_trigger* %6)
ret void
}

LLVM IR (-O2):
%struct.eiwic_plugin_trigger = type { i32 }
define void @plug_trigger_destroy(i8* nocapture %0) {
%2 = bitcast i8* %0 to %struct.eiwic_plugin_trigger*
%3 = tail call i32 @free(%struct.eiwic_plugin_trigger* %2)
ret void
}
/* Variables and functions */
int fatfs_rename(char const *, char const *);
int rename(const char *old, const char *new) { return fatfs_rename(old, new); }


x86 assembly (clang, -O0):
<rename>:
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 <fatfs_rename@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rename>:
jmp    1030 <fatfs_rename@plt>

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

LLVM IR (-O2):
define i32 @rename(i8* %0, i8* %1) {
%3 = tail call i32 @fatfs_rename(i8* %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
double fabs(double);
double test1(double x) {
  double t = fabs(x);
  return t * t;
}


x86 assembly (clang, -O0):
<test1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movaps 0xeeb(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<test1>:
mulsd  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @test1(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call double @llvm.fabs.f64(double %4)
store double %5, double* %3
%6 = load double, double* %3
%7 = load double, double* %3
%8 = fmul double %6, %7
ret double %8
}

LLVM IR (-O2):
define double @test1(double %0) {
%2 = fmul double %0, %0
ret double %2
}
/* Type definitions */
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
float powf(float, float);
int16_t dds_scaling_dbov(float level) {
  return (int16_t)(powf(10.0f, (level - (-3.02f)) / 20.0f) * 32767.0f);
}


x86 assembly (clang, -O0):
<dds_scaling_dbov>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm1
movss  0xee2(%rip),%xmm0
subss  %xmm0,%xmm1
movss  0xed2(%rip),%xmm0
divss  %xmm0,%xmm1
movss  0xec2(%rip),%xmm0
call   1030 <powf@plt>
movss  0xeb1(%rip),%xmm1
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dds_scaling_dbov>:
push   %rax
movaps %xmm0,%xmm1
addss  0xee4(%rip),%xmm1
divss  0xee0(%rip),%xmm1
movss  0xedc(%rip),%xmm0
call   1030 <powf@plt>
mulss  0xed3(%rip),%xmm0
cvttss2si %xmm0,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @dds_scaling_dbov(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fsub float %3, 0xC00828F5C0000000
%5 = fdiv float %4, 2.000000e+01
%6 = call float @powf(float 1.000000e+01, float %5)
%7 = fmul float %6, 3.276700e+04
%8 = fptosi float %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @dds_scaling_dbov(float %0) {
%2 = fadd float %0, 0x400828F5C0000000
%3 = fdiv float %2, 2.000000e+01
%4 = tail call float @powf(float 1.000000e+01, float %3)
%5 = fmul float %4, 3.276700e+04
%6 = fptosi float %5 to i32
ret i32 %6
}
/* Variables and functions */
long long floor(double);
void floor_l_d(double *source, long long *dest) { *dest = floor(*source); }


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

x86 assembly (clang, -O2):
<floor_l_d>:
push   %rbx
mov    %rsi,%rbx
movsd  (%rdi),%xmm0
call   1030 <floor@plt>
mov    %rax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @floor_l_d(double* %0, i64* %1) {
%3 = alloca double*
%4 = alloca i64*
store double* %0, double** %3
store i64* %1, i64** %4
%5 = load double*, double** %3
%6 = load double, double* %5
%7 = call i64 @floor(double %6)
%8 = load i64*, i64** %4
store i64 %7, i64* %8
ret void
}

LLVM IR (-O2):
define void @floor_l_d(double* nocapture %0, i64* nocapture writeonly %1) {
%3 = load double, double* %0
%4 = tail call i64 @floor(double %3)
store i64 %4, i64* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(int, int *, int);
int info_putchar(int c) {
  write(2, &c, 1);
  return 0;
}


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

x86 assembly (clang, -O2):
<info_putchar>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x2,%edi
mov    $0x1,%edx
call   1030 <write@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @info_putchar(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @write(i32 2, i32* %2, i32 1)
ret i32 0
}