xunge/DecIR huggingface dataset:
int test_imm_2Eint8_reg(signed char val) {
  return ((val) & (-0x2E << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_2Eint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xffffffd2,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_2Eint8_reg>:
test   $0xd2,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_2Eint8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, -46
%6 = icmp ne i32 %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_2Eint8_reg(i8 signext %0) {
%2 = and i8 %0, -46
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ abort_crypto_lib(char *);
void *malloc(int);
void *malloc_wrapper(int size) {
  if (size > 8192)
    abort_crypto_lib("Requested humongous malloc!!!!!!!!");
  void *result = malloc(size);
  if (result == 0)
    abort_crypto_lib("Malloc failed");
  return result;
}


x86 assembly (clang, -O0):
<malloc_wrapper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x2000,-0x4(%rbp)
jle    1144 <malloc_wrapper+0x24>
lea    0xec1(%rip),%rdi
call   1040 <abort_crypto_lib@plt>
mov    -0x4(%rbp),%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1167 <malloc_wrapper+0x47>
lea    0xec1(%rip),%rdi
call   1040 <abort_crypto_lib@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<malloc_wrapper>:
push   %rbx
mov    %edi,%ebx
cmp    $0x2001,%edi
jl     1137 <malloc_wrapper+0x17>
lea    0xece(%rip),%rdi
call   1040 <abort_crypto_lib@plt>
mov    %ebx,%edi
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1152 <malloc_wrapper+0x32>
lea    0xed6(%rip),%rdi
call   1040 <abort_crypto_lib@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [35 x i8] c"Requested humongous malloc!!!!!!!!\00"
@.str.1 = [14 x i8] c"Malloc failed\00"
define i8* @malloc_wrapper(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp sgt i32 %4, 8192
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @abort_crypto_lib(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
%9 = load i32, i32* %2
%10 = call i8* @malloc(i32 %9)
store i8* %10, i8** %3
%11 = load i8*, i8** %3
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %15
13: ; preds = %8
%14 = call i32 @abort_crypto_lib(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
br label %15
15: ; preds = %13, %8
%16 = load i8*, i8** %3
ret i8* %16
}

LLVM IR (-O2):
@.str = [35 x i8] c"Requested humongous malloc!!!!!!!!\00"
@.str.1 = [14 x i8] c"Malloc failed\00"
define noalias i8* @malloc_wrapper(i32 %0) {
%2 = icmp sgt i32 %0, 8192
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @abort_crypto_lib(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %1
%6 = tail call i8* @malloc(i32 %0)
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = tail call i32 @abort_crypto_lib(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8, %5
ret i8* %6
}
/* Variables and functions */
char *Concatenate2(char *, char *, char *, int);
char *Concatenate(char *output, char *first, char *second) {
  return Concatenate2(output, first, second, -1);
}


x86 assembly (clang, -O0):
<Concatenate>:
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
mov    -0x18(%rbp),%rdx
mov    $0xffffffff,%ecx
call   1030 <Concatenate2@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Concatenate>:
mov    $0xffffffff,%ecx
jmp    1030 <Concatenate2@plt>

LLVM IR (-O0):
define i8* @Concatenate(i8* %0, i8* %1, i8* %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 i8* @Concatenate2(i8* %7, i8* %8, i8* %9, i32 -1)
ret i8* %10
}

LLVM IR (-O2):
define i8* @Concatenate(i8* %0, i8* %1, i8* %2) {
%4 = tail call i8* @Concatenate2(i8* %0, i8* %1, i8* %2, i32 -1)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void sk_free(void *ptr) { free(ptr); }


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

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

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

LLVM IR (-O2):
define void @sk_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Type definitions */
typedef scalar_t__ int64_t;

/* Variables and functions */
double sumpw(scalar_t__ const, double const *, scalar_t__ const, scalar_t__ *);
double stdlib_strided_dnannsumpw(const int64_t N, const double *X,
                                 const int64_t stride, int64_t *n) {
  *n = 0;
  return sumpw(N, X, stride, n);
}


x86 assembly (clang, -O0):
<stdlib_strided_dnannsumpw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movq   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <sumpw@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stdlib_strided_dnannsumpw>:
movq   $0x0,(%rcx)
jmp    1030 <sumpw@plt>

LLVM IR (-O0):
define double @stdlib_strided_dnannsumpw(i64 %0, double* %1, i64 %2, i64* %3) {
%5 = alloca i64
%6 = alloca double*
%7 = alloca i64
%8 = alloca i64*
store i64 %0, i64* %5
store double* %1, double** %6
store i64 %2, i64* %7
store i64* %3, i64** %8
%9 = load i64*, i64** %8
store i64 0, i64* %9
%10 = load i64, i64* %5
%11 = load double*, double** %6
%12 = load i64, i64* %7
%13 = load i64*, i64** %8
%14 = call double @sumpw(i64 %10, double* %11, i64 %12, i64* %13)
ret double %14
}

LLVM IR (-O2):
define double @stdlib_strided_dnannsumpw(i64 %0, double* %1, i64 %2, i64* %3) {
store i64 0, i64* %3
%5 = tail call double @sumpw(i64 %0, double* %1, i64 %2, i64* %3)
ret double %5
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ parent;
};
typedef TYPE_1__ XConfigureRequestEvent;

/* Variables and functions */
unsigned long get_XConfigureRequestEvent_parent(void *_p) {
  return (unsigned long)((XConfigureRequestEvent *)_p)->parent;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i64 @get_XConfigureRequestEvent_parent(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @get_XConfigureRequestEvent_parent(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
unsigned xrop3_125_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = T ^ S;
  stk2 = ~stk2;
  stk1 = D & stk2;
  stk1 = ~stk1;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_125_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
and    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_125_0_0>:
xor    %esi,%edi
lea    -0x100(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @xrop3_125_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = xor i8 %1, %0
%4 = zext i8 %3 to i32
%5 = or i32 %4, -256
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ warning(char *, char *);
void warn_nyi(char *name) { warning("%s is not yet implemented", name); }


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

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

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

LLVM IR (-O2):
@.str = [26 x i8] c"%s is not yet implemented\00"
define void @warn_nyi(i8* %0) {
%2 = tail call i32 @warning(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
int /*<<< orphan*/ TIOCGSID;
scalar_t__ ioctl(int, int /*<<< orphan*/, int *);
pid_t tcgetsid(int fd) {
  int sid;
  if (ioctl(fd, TIOCGSID, &sid) < 0)
    return -1;
  return sid;
}


x86 assembly (clang, -O0):
<tcgetsid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2ebb(%rip),%rax
mov    (%rax),%esi
lea    -0xc(%rbp),%rdx
call   1030 <ioctl@plt>
cmp    $0x0,%rax
jge    1146 <tcgetsid+0x36>
movl   $0xffffffff,-0x4(%rbp)
jmp    114c <tcgetsid+0x3c>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tcgetsid>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
lea    0x4(%rsp),%rdx
call   1030 <ioctl@plt>
mov    %rax,%rcx
mov    $0xffffffff,%eax
test   %rcx,%rcx
js     1135 <tcgetsid+0x25>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@TIOCGSID = global i32 0
define i32 @tcgetsid(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = load i32, i32* @TIOCGSID
%7 = call i64 @ioctl(i32 %5, i32 %6, i32* %4)
%8 = icmp slt i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 -1, i32* %2
br label %12
10: ; preds = %1
%11 = load i32, i32* %4
store i32 %11, i32* %2
br label %12
12: ; preds = %10, %9
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
@TIOCGSID = global i32 0
define i32 @tcgetsid(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = load i32, i32* @TIOCGSID
%5 = call i64 @ioctl(i32 %0, i32 %4, i32* %2)
%6 = icmp slt i64 %5, 0
%7 = load i32, i32* %2
%8 = select i1 %6, i32 -1, i32 %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ solveKT();
int main() {
  solveKT();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @solveKT()
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t storage_get_block_size(void) { return (512); }


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

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

LLVM IR (-O0):
define i32 @storage_get_block_size() {
ret i32 512
}

LLVM IR (-O2):
define i32 @storage_get_block_size() {
ret i32 512
}
/* Variables and functions */
int /*<<< orphan*/ MIPS_CLEAR_BIT(int, int);
void xburst_cgm_ungate_hdmi() { MIPS_CLEAR_BIT((0xB0000000 + 0x28), 9); }


x86 assembly (clang, -O0):
<xburst_cgm_ungate_hdmi>:
push   %rbp
mov    %rsp,%rbp
mov    $0xb0000028,%edi
mov    $0x9,%esi
call   1030 <MIPS_CLEAR_BIT@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<xburst_cgm_ungate_hdmi>:
mov    $0xb0000028,%edi
mov    $0x9,%esi
jmp    1030 <MIPS_CLEAR_BIT@plt>

LLVM IR (-O0):
define void @xburst_cgm_ungate_hdmi() {
%1 = call i32 @MIPS_CLEAR_BIT(i32 -1342177240, i32 9)
ret void
}

LLVM IR (-O2):
define void @xburst_cgm_ungate_hdmi() {
%1 = tail call i32 @MIPS_CLEAR_BIT(i32 -1342177240, i32 9)
ret void
}
void foo495() {}


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

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

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

LLVM IR (-O2):
define void @foo495() {
ret void
}
/* Variables and functions */
scalar_t__ argint(int /*<<< orphan*/, int *);
int kkill(int);
int sys_kill(void) {
  int pid;
  if (argint(0, &pid) < 0)
    return -1;
  return kkill(pid);
}


x86 assembly (clang, -O0):
<sys_kill>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
lea    -0x8(%rbp),%rsi
call   1040 <argint@plt>
cmp    $0x0,%rax
jge    1149 <sys_kill+0x29>
movl   $0xffffffff,-0x4(%rbp)
jmp    1154 <sys_kill+0x34>
mov    -0x8(%rbp),%edi
call   1030 <kkill@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_kill>:
push   %rax
lea    0x4(%rsp),%rsi
xor    %edi,%edi
call   1040 <argint@plt>
test   %rax,%rax
js     113d <sys_kill+0x1d>
mov    0x4(%rsp),%edi
call   1030 <kkill@plt>
pop    %rcx
ret
mov    $0xffffffff,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @sys_kill() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i64 @argint(i32 0, i32* %1)
%4 = icmp slt i64 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %0
%6 = load i32, i32* %1
%7 = call i32 @kkill(i32 %6)
br label %8
8: ; preds = %0, %5
%9 = phi i32 [ %7, %5 ], [ -1, %0 ]
ret i32 %9
}
/* Variables and functions */
unsigned int XXH32(char const *, int /*<<< orphan*/, int);
int /*<<< orphan*/ strlen(char const *);
int main(int argc, const char **argv) {
  const char *exename = argv[0];
  unsigned result = XXH32(exename, strlen(exename), argc);
  return !result;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x28(%rbp),%rdi
mov    %eax,%esi
mov    -0x8(%rbp),%edx
call   1040 <XXH32@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i8**, i8*** %5
%9 = getelementptr inbounds i8*, i8** %8, i64 0
%10 = load i8*, i8** %9
store i8* %10, i8** %6
%11 = load i8*, i8** %6
%12 = load i8*, i8** %6
%13 = call i32 @strlen(i8* %12)
%14 = load i32, i32* %4
%15 = call i32 @XXH32(i8* %11, i32 %13, i32 %14)
store i32 %15, i32* %7
%16 = load i32, i32* %7
%17 = icmp ne i32 %16, 0
%18 = xor i1 %17, true
%19 = zext i1 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = tail call i32 @strlen(i8* %3)
%5 = tail call i32 @XXH32(i8* %3, i32 %4, i32 %0)
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}
void RTMpIsCpuOnline(void) {}


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

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

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

LLVM IR (-O2):
define void @RTMpIsCpuOnline() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ Visual;
typedef int /*<<< orphan*/ Pixmap;
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
int alock_blur_pixmap(Display *display, Visual *visual, const Pixmap src_pm,
                      Pixmap dst_pm, unsigned char blur, int src_x, int src_y,
                      int dst_x, int dst_y, unsigned int width,
                      unsigned int height) {
  if (!blur)
    return 1;
  (void)display;
  (void)visual;
  return 0;
}


x86 assembly (clang, -O0):
<alock_blur_pixmap>:
push   %rbp
mov    %rsp,%rbp
mov    %r8b,%al
mov    0x30(%rbp),%r8d
mov    0x28(%rbp),%r8d
mov    0x20(%rbp),%r8d
mov    0x18(%rbp),%r8d
mov    0x10(%rbp),%r8d
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %ecx,-0x20(%rbp)
mov    %al,-0x21(%rbp)
mov    %r9d,-0x28(%rbp)
cmpb   $0x0,-0x21(%rbp)
jne    1146 <alock_blur_pixmap+0x46>
movl   $0x1,-0x4(%rbp)
jmp    114d <alock_blur_pixmap+0x4d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<alock_blur_pixmap>:
xor    %eax,%eax
test   %r8d,%r8d
sete   %al
ret

LLVM IR (-O0):
define i32 @alock_blur_pixmap(i32* %0, i32* %1, i32 %2, i32 %3, i8 zeroext %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9, i32 %10) {
%12 = alloca i32
%13 = alloca i32*
%14 = alloca i32*
%15 = alloca i32
%16 = alloca i32
%17 = alloca i8
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
store i32* %0, i32** %13
store i32* %1, i32** %14
store i32 %2, i32* %15
store i32 %3, i32* %16
store i8 %4, i8* %17
store i32 %5, i32* %18
store i32 %6, i32* %19
store i32 %7, i32* %20
store i32 %8, i32* %21
store i32 %9, i32* %22
store i32 %10, i32* %23
%24 = load i8, i8* %17
%25 = icmp ne i8 %24, 0
br i1 %25, label %27, label %26
26: ; preds = %11
store i32 1, i32* %12
br label %30
27: ; preds = %11
%28 = load i32*, i32** %13
%29 = load i32*, i32** %14
store i32 0, i32* %12
br label %30
30: ; preds = %27, %26
%31 = load i32, i32* %12
ret i32 %31
}

LLVM IR (-O2):
define i32 @alock_blur_pixmap(i32* nocapture readnone %0, i32* nocapture readnone %1, i32 %2, i32 %3, i8 zeroext %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9, i32 %10) {
%12 = icmp eq i8 %4, 0
%13 = zext i1 %12 to i32
ret i32 %13
}
int iswhite(char c) {
  if (c == ' ' || c == '\t')
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<iswhite>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x20,%eax
je     1124 <iswhite+0x24>
movsbl -0x5(%rbp),%eax
cmp    $0x9,%eax
jne    1130 <iswhite+0x30>
movl   $0x1,-0x4(%rbp)
jmp    1137 <iswhite+0x37>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iswhite>:
cmp    $0x20,%dil
sete   %al
cmp    $0x9,%dil
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @iswhite(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 32
br i1 %6, label %11, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 9
br i1 %10, label %11, label %12
11: ; preds = %7, %1
store i32 1, i32* %2
br label %13
12: ; preds = %7
store i32 0, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @iswhite(i8 signext %0) {
%2 = icmp eq i8 %0, 32
%3 = icmp eq i8 %0, 9
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int f99(int *);
int f100(int *p) { return f99(p); }


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

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

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

LLVM IR (-O2):
define i32 @f100(i32* %0) {
%2 = tail call i32 @f99(i32* %0)
ret i32 %2
}
void changeval(float *a) { *a = 3; }


x86 assembly (clang, -O0):
<changeval>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  0xeec(%rip),%xmm0
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<changeval>:
movl   $0x40400000,(%rdi)
ret

LLVM IR (-O0):
define void @changeval(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
store float 3.000000e+00, float* %3
ret void
}

LLVM IR (-O2):
define void @changeval(float* nocapture writeonly %0) {
store float 3.000000e+00, float* %0
ret void
}
void XtLastEventProcessed() {}


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

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

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

LLVM IR (-O2):
define void @XtLastEventProcessed() {
ret void
}
double foo(double x, double y) {
  volatile int i = 0;
  return i <= 0 ? x : y;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    $0x0,%eax
jg     1130 <foo+0x30>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    113a <foo+0x3a>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
movl   $0x0,-0x4(%rsp)
cmpl   $0x0,-0x4(%rsp)
jle    1112 <foo+0x12>
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @foo(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca i32
store double %0, double* %3
store double %1, double* %4
store volatile i32 0, i32* %5
%6 = load volatile i32, i32* %5
%7 = icmp sle i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load double, double* %3
br label %12
10: ; preds = %2
%11 = load double, double* %4
br label %12
12: ; preds = %10, %8
%13 = phi double [ %9, %8 ], [ %11, %10 ]
ret double %13
}

LLVM IR (-O2):
define double @foo(double %0, double %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store volatile i32 0, i32* %3
%5 = load volatile i32, i32* %3
%6 = icmp slt i32 %5, 1
%7 = select i1 %6, double %0, double %1
ret double %7
}
void usb_cb_ep3_out_complete(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @start_server()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ recharger_enter_state(int);
void recharger_fsa_rotate() { recharger_enter_state(5); }


x86 assembly (clang, -O0):
<recharger_fsa_rotate>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5,%edi
call   1030 <recharger_enter_state@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<recharger_fsa_rotate>:
mov    $0x5,%edi
jmp    1030 <recharger_enter_state@plt>

LLVM IR (-O0):
define void @recharger_fsa_rotate() {
%1 = call i32 @recharger_enter_state(i32 5)
ret void
}

LLVM IR (-O2):
define void @recharger_fsa_rotate() {
%1 = tail call i32 @recharger_enter_state(i32 5)
ret void
}
/* Variables and functions */
int syscall(int);
int __yield() { return syscall(158); }


x86 assembly (clang, -O0):
<__yield>:
push   %rbp
mov    %rsp,%rbp
mov    $0x9e,%edi
call   1030 <syscall@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<__yield>:
mov    $0x9e,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i32 @__yield() {
%1 = call i32 @syscall(i32 158)
ret i32 %1
}

LLVM IR (-O2):
define i32 @__yield() {
%1 = tail call i32 @syscall(i32 158)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ syscall(int, int, char *, int);
int main() {
  syscall(1, 1, "Hello World", 11);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%esi
lea    0xed5(%rip),%rdx
mov    $0xb,%ecx
mov    %esi,%edi
call   1030 <syscall@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdx
mov    $0x1,%edi
mov    $0x1,%esi
mov    $0xb,%ecx
call   1030 <syscall@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"Hello World\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @syscall(i32 1, i32 1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 11)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"Hello World\00"
define i32 @main() {
%1 = tail call i32 @syscall(i32 1, i32 1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 11)
ret i32 0
}
unsigned short unsignedShortTest(unsigned short value) { return value; }


x86 assembly (clang, -O0):
<unsignedShortTest>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define zeroext i16 @unsignedShortTest(i16 returned zeroext %0) {
ret i16 %0
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "usage: slock [-o <OPACITY>] [-v]\n");
  exit(EXIT_FAILURE);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [34 x i8] c"usage: slock [-o <OPACITY>] [-v]\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_FAILURE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [34 x i8] c"usage: slock [-o <OPACITY>] [-v]\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
void assemble() {}


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

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

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

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

/* Variables and functions */
char *asctime(int /*<<< orphan*/);
int /*<<< orphan*/ localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void get_time_asctime() {
  time_t timer = time(NULL);
  printf("The current time is %s\n", asctime(localtime(&timer)));
}


x86 assembly (clang, -O0):
<get_time_asctime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
mov    %eax,%edi
call   1060 <time@plt>
mov    %eax,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
call   1030 <localtime@plt>
mov    %eax,%edi
call   1040 <asctime@plt>
mov    %rax,%rsi
lea    0xe92(%rip),%rdi
call   1050 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_time_asctime>:
push   %rax
xor    %edi,%edi
call   1060 <time@plt>
mov    %eax,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <localtime@plt>
mov    %eax,%edi
call   1040 <asctime@plt>
lea    0xe9c(%rip),%rdi
mov    %rax,%rsi
call   1050 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [24 x i8] c"The current time is %s\0A\00"
define void @get_time_asctime() {
%1 = alloca i32
%2 = call i32 @time(i32* null)
store i32 %2, i32* %1
%3 = call i32 @localtime(i32* %1)
%4 = call i8* @asctime(i32 %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"The current time is %s\0A\00"
define void @get_time_asctime() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @time(i32* null)
store i32 %3, i32* %1
%4 = call i32 @localtime(i32* %1)
%5 = call i8* @asctime(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ tx_error(char const *);
void tx_abort(const char *err) {
  if (err)
    tx_error(err);
  exit(1);
}


x86 assembly (clang, -O0):
<tx_abort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1140 <tx_abort+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <tx_error@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<tx_abort>:
push   %rax
test   %rdi,%rdi
je     112b <tx_abort+0xb>
call   1030 <tx_error@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @tx_abort(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @tx_error(i8* %6)
br label %8
8: ; preds = %5, %1
%9 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @tx_abort(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @tx_error(i8* %0)
br label %5
5: ; preds = %3, %1
%6 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *openPipe(char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, char *, char *);
FILE *readZippedFile(char *command, char *fileName) {
  char buf[512];
  sprintf(buf, "%s < %s 2>/dev/null", command, fileName);
  return openPipe(buf, "r");
}


x86 assembly (clang, -O0):
<readZippedFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x210(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xeb7(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x210(%rbp),%rdi
lea    0xeb8(%rip),%rsi
call   1030 <openPipe@plt>
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readZippedFile>:
push   %rbx
sub    $0x200,%rsp
mov    %rsi,%rcx
mov    %rdi,%rdx
lea    0xecb(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
lea    0xecd(%rip),%rsi
mov    %rbx,%rdi
call   1030 <openPipe@plt>
add    $0x200,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"%s < %s 2>/dev/null\00"
@.str.1 = [2 x i8] c"r\00"
define i32* @readZippedFile(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [512 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%7 = load i8*, i8** %3
%8 = load i8*, i8** %4
%9 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %7, i8* %8)
%10 = getelementptr inbounds [512 x i8], [512 x i8]* %5, i64 0, i64 0
%11 = call i32* @openPipe(i8* %10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret i32* %11
}

LLVM IR (-O2):
@.str = [20 x i8] c"%s < %s 2>/dev/null\00"
@.str.1 = [2 x i8] c"r\00"
define i32* @readZippedFile(i8* %0, i8* %1) {
%3 = alloca [512 x i8]
%4 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%6 = call i32* @openPipe(i8* %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret i32* %6
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *);
int /*<<< orphan*/ puts(char *);
void say(char *msg) {
  debug("say");
  puts(msg);
}


x86 assembly (clang, -O0):
<say>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1040 <debug@plt>
mov    -0x8(%rbp),%rdi
call   1030 <puts@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<say>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1040 <debug@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"say\00"
define void @say(i8* nocapture %0) {
%2 = tail call i32 @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fig09_24();
int main(void) {
  fig09_24();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @fig09_24()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ grecs_line_acc_free();
void grecs_lex_end(int err) { grecs_line_acc_free(); }


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

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

LLVM IR (-O0):
define void @grecs_lex_end(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @grecs_line_acc_free()
ret void
}

LLVM IR (-O2):
define void @grecs_lex_end(i32 %0) {
%2 = tail call i32 (...) @grecs_line_acc_free()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ gmvexit();
int /*<<< orphan*/ stderr;
void readx3d_error(char *filename) {
  fprintf(stderr, "Error reading x3d file %s\n", filename);
  gmvexit();
}


x86 assembly (clang, -O0):
<readx3d_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x0,%al
call   1040 <gmvexit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readx3d_error>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <gmvexit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [27 x i8] c"Error reading x3d file %s\0A\00"
define void @readx3d_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @gmvexit()
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [27 x i8] c"Error reading x3d file %s\0A\00"
define void @readx3d_error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @gmvexit()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SEC_GPIO_INT0_IRQ1_DriverIRQHandler();
__attribute__((weak)) void SEC_GPIO_INT0_IRQ1_IRQHandler(void) {
  SEC_GPIO_INT0_IRQ1_DriverIRQHandler();
}


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

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

LLVM IR (-O0):
define weak void @SEC_GPIO_INT0_IRQ1_IRQHandler() {
%1 = call i32 (...) @SEC_GPIO_INT0_IRQ1_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @SEC_GPIO_INT0_IRQ1_IRQHandler() {
%1 = tail call i32 (...) @SEC_GPIO_INT0_IRQ1_DriverIRQHandler()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gpio_init();
int spi_init();
int /*<<< orphan*/ timer_init();
int nrf_init(void) {
  gpio_init();
  timer_init();
  return spi_init();
}


x86 assembly (clang, -O0):
<nrf_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <gpio_init@plt>
mov    $0x0,%al
call   1040 <timer_init@plt>
mov    $0x0,%al
call   1030 <spi_init@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<nrf_init>:
push   %rax
xor    %eax,%eax
call   1050 <gpio_init@plt>
xor    %eax,%eax
call   1040 <timer_init@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <spi_init@plt>

LLVM IR (-O0):
define i32 @nrf_init() {
%1 = call i32 (...) @gpio_init()
%2 = call i32 (...) @timer_init()
%3 = call i32 (...) @spi_init()
ret i32 %3
}

LLVM IR (-O2):
define i32 @nrf_init() {
%1 = tail call i32 (...) @gpio_init()
%2 = tail call i32 (...) @timer_init()
%3 = tail call i32 (...) @spi_init()
ret i32 %3
}
double sin(double x) {
  double r;
  if (isinf(x))
    return __domain_error();
  __asm__ __volatile__("fsin" : "=t"(r) : "0"(x));
  return r;
}


x86 assembly (clang, -O0):
<sin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    $0x1,%al
call   1040 <isinf@plt>
cmp    $0x0,%eax
je     1157 <sin+0x37>
mov    $0x0,%al
call   1030 <__domain_error@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    117d <sin+0x5d>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
fldl   -0x20(%rbp)
fsin
fstpl  -0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sin>:
sub    $0x18,%rsp
movsd  %xmm0,(%rsp)
mov    $0x1,%al
call   1040 <isinf@plt>
test   %eax,%eax
je     1147 <sin+0x27>
xor    %eax,%eax
call   1030 <__domain_error@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
add    $0x18,%rsp
ret
movsd  (%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
fldl   0x10(%rsp)
fsin
fstpl  0x8(%rsp)
movsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @sin(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %3
%5 = load double, double* %3
%6 = call i32 (double, ...) bitcast (i32 (...)* @isinf to i32 (double, ...)*)(double %5)
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = call i32 (...) @__domain_error()
%10 = sitofp i32 %9 to double
store double %10, double* %2
br label %15
11: ; preds = %1
%12 = load double, double* %3
%13 = call double asm sideeffect "fsin", "={st},0,~{dirflag},~{fpsr},~{flags}"(double %12)
store double %13, double* %4
%14 = load double, double* %4
store double %14, double* %2
br label %15
15: ; preds = %11, %8
%16 = load double, double* %2
ret double %16
}

LLVM IR (-O2):
define double @sin(double %0) {
%2 = tail call i32 (double, ...) bitcast (i32 (...)* @isinf to i32 (double, ...)*)(double %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i32 (...) @__domain_error()
%6 = sitofp i32 %5 to double
br label %9
7: ; preds = %1
%8 = tail call double asm sideeffect "fsin", "={st},0,~{dirflag},~{fpsr},~{flags}"(double %0)
br label %9
9: ; preds = %7, %4
%10 = phi double [ %6, %4 ], [ %8, %7 ]
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void func1() { printf("Calling up func1\n"); }


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

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

LLVM IR (-O0):
@.str = [18 x i8] c"Calling up func1\0A\00"
define void @func1() {
%1 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [17 x i8] c"Calling up func1\00"
define void @func1() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int syscon_write_multprec_Laurent_system(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(571, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<syscon_write_multprec_Laurent_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x23b,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscon_write_multprec_Laurent_system>:
mov    $0x23b,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @syscon_write_multprec_Laurent_system() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc4c(i32 571, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @syscon_write_multprec_Laurent_system() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 571, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
int send_sms() { system("python send_sms.py"); }


x86 assembly (clang, -O0):
<send_sms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <system@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [19 x i8] c"python send_sms.py\00"
define i32 @send_sms() {
%1 = alloca i32
%2 = call i32 @system(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [19 x i8] c"python send_sms.py\00"
define i32 @send_sms() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
int factorial(int n) {
  if (n != 1)
    return n * factorial(n - 1);
}


x86 assembly (clang, -O0):
<factorial>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
je     1141 <factorial+0x31>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <factorial@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @factorial(i32 %0) {
ret i32 0
}