xunge/DecIR huggingface dataset:
int Cyc_Absyn_hash_ptr(void *a) {
  void *_T0;
  unsigned _T1;
  int _T2;
  _T0 = a;
  _T1 = (unsigned)_T0;
  _T2 = (int)_T1;
  return _T2;
}


x86 assembly (clang, -O0):
<Cyc_Absyn_hash_ptr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @Cyc_Absyn_hash_ptr(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %2
%6 = load i8*, i8** %2
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = ptrtoint i8* %7 to i32
store i32 %8, i32* %4
%9 = load i32, i32* %4
store i32 %9, i32* %5
%10 = load i32, i32* %5
ret i32 %10
}

LLVM IR (-O2):
define i32 @Cyc_Absyn_hash_ptr(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void freeFn(void *data) { free(data); }


x86 assembly (clang, -O0):
<freeFn>:
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):
<freeFn>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @freeFn(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 @freeFn(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ emitf(int, char *, char *);
void emit_jmp(char *label) {
  emitf(666,
        "\t"
        "jmp %s",
        label);
}


x86 assembly (clang, -O0):
<emit_jmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
mov    $0x29a,%edi
lea    0xed4(%rip),%rsi
call   1030 <emitf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_jmp>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rsi
mov    $0x29a,%edi
jmp    1030 <emitf@plt>

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

LLVM IR (-O2):
@.str = [8 x i8] c"\09jmp %s\00"
define void @emit_jmp(i8* %0) {
%2 = tail call i32 @emitf(i32 666, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
float scalarprod2(float *v1, float *v2) {
  return v1[0] * v2[0] + v1[1] * v2[1];
}


x86 assembly (clang, -O0):
<scalarprod2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulss  0x4(%rax),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<scalarprod2>:
movss  0x4(%rdi),%xmm1
mulss  0x4(%rsi),%xmm1
movss  (%rdi),%xmm0
mulss  (%rsi),%xmm0
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @scalarprod2(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %3
%6 = getelementptr inbounds float, float* %5, i64 0
%7 = load float, float* %6
%8 = load float*, float** %4
%9 = getelementptr inbounds float, float* %8, i64 0
%10 = load float, float* %9
%11 = load float*, float** %3
%12 = getelementptr inbounds float, float* %11, i64 1
%13 = load float, float* %12
%14 = load float*, float** %4
%15 = getelementptr inbounds float, float* %14, i64 1
%16 = load float, float* %15
%17 = fmul float %13, %16
%18 = call float @llvm.fmuladd.f32(float %7, float %10, float %17)
ret float %18
}

LLVM IR (-O2):
define float @scalarprod2(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %0
%4 = load float, float* %1
%5 = getelementptr inbounds float, float* %0, i64 1
%6 = load float, float* %5
%7 = getelementptr inbounds float, float* %1, i64 1
%8 = load float, float* %7
%9 = fmul float %6, %8
%10 = tail call float @llvm.fmuladd.f32(float %3, float %4, float %9)
ret float %10
}
void dummy_free(void *ptr) {}


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

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

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

LLVM IR (-O2):
define void @dummy_free(i8* nocapture %0) {
ret void
}
void RTLockValidatorRecExclUnwindMixed(void) {}


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

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

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

LLVM IR (-O2):
define void @RTLockValidatorRecExclUnwindMixed() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void hello_world() { printf("Hello World!\n"); }


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

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

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

LLVM IR (-O2):
@str = [13 x i8] c"Hello World!\00"
define void @hello_world() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int count_envs(char **envp) {
  int count = 0;
  for (; *envp != NULL; envp++)
    count++;
  return count;
}


x86 assembly (clang, -O0):
<count_envs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1137 <count_envs+0x37>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <count_envs+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_envs>:
cmpq   $0x0,(%rdi)
je     111d <count_envs+0x1d>
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
cmpq   $0x0,0x8(%rdi,%rax,8)
lea    0x1(%rax),%rax
jne    1110 <count_envs+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @count_envs(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ 0, %1 ]
%6 = phi i8** [ %8, %4 ], [ %0, %1 ]
%7 = add nuw nsw i32 %5, 1
%8 = getelementptr inbounds i8*, i8** %6, i64 1
%9 = load i8*, i8** %8
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %12
}
int test_imm_EBuint32_reg(unsigned int val) {
  return ((val) & (0xEB << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_EBuint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0xeb,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_EBuint32_reg(i32 %0) {
%2 = and i32 %0, 235
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void func(int *p) { *p = 777; }


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

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

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

LLVM IR (-O2):
define void @func(i32* nocapture writeonly %0) {
store i32 777, i32* %0
ret void
}
void nrf_csh() { *(unsigned char *)0x500A |= (1 << 4); }


x86 assembly (clang, -O0):
<nrf_csh>:
push   %rbp
mov    %rsp,%rbp
mov    $0x500a,%eax
movzbl (%rax),%eax
or     $0x10,%eax
mov    %al,%cl
mov    $0x500a,%eax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<nrf_csh>:
orb    $0x10,0x500a
10
ret

LLVM IR (-O0):
define void @nrf_csh() {
%1 = load i8, i8* inttoptr (i64 20490 to i8*)
%2 = zext i8 %1 to i32
%3 = or i32 %2, 16
%4 = trunc i32 %3 to i8
store i8 %4, i8* inttoptr (i64 20490 to i8*)
ret void
}

LLVM IR (-O2):
define void @nrf_csh() {
%1 = load i8, i8* inttoptr (i64 20490 to i8*)
%2 = or i8 %1, 16
store i8 %2, i8* inttoptr (i64 20490 to i8*)
ret void
}
__attribute__((visibility("default"))) void xax_arg(void) {}


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

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

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

LLVM IR (-O2):
define void @xax_arg() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int chdir(const char *path) {
  (void)path;
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<chdir>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    0x2ed9(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec0(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<chdir>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @chdir(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @ENOSYS
store i32 %4, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @chdir(i8* nocapture readnone %0) {
%2 = load i32, i32* @ENOSYS
store i32 %2, i32* @errno
ret i32 -1
}
/* Variables and functions */
double strtod(char const *, char **);
int parse_double(const char *start, const char *end, double *out) {
  char *endptr;
  double val = strtod(start, &endptr);
  if (endptr != end)
    return 0;
  *out = val;
  return 1;
}


x86 assembly (clang, -O0):
<parse_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x28(%rbp),%rsi
call   1030 <strtod@plt>
movsd  %xmm0,-0x30(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x18(%rbp),%rax
je     1150 <parse_double+0x40>
movl   $0x0,-0x4(%rbp)
jmp    1164 <parse_double+0x54>
movsd  -0x30(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_double>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rsp,%rsi
call   1030 <strtod@plt>
xor    %eax,%eax
cmp    %rbx,(%rsp)
jne    1134 <parse_double+0x24>
movsd  %xmm0,(%r14)
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @parse_double(i8* %0, i8* readnone %1, double* nocapture writeonly %2) {
%4 = alloca i8*
%5 = bitcast i8** %4 to i8*
%6 = call double @strtod(i8* %0, i8** %4)
%7 = load i8*, i8** %4
%8 = icmp eq i8* %7, %1
br i1 %8, label %9, label %10
9: ; preds = %3
store double %6, double* %2
br label %10
10: ; preds = %3, %9
%11 = phi i32 [ 1, %9 ], [ 0, %3 ]
ret i32 %11
}
void foo781() {}


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

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

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

LLVM IR (-O2):
define void @foo781() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cbmarch_lock(int);
void cbm_lock(int HandleDevice) {
  ;
  cbmarch_lock(HandleDevice);
  return;
}


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

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

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

LLVM IR (-O2):
define void @cbm_lock(i32 %0) {
%2 = tail call i32 @cbmarch_lock(i32 %0)
ret void
}
int test_imm_0Cuint8_reg(unsigned char val) {
  return ((val) & (0x0C << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_0Cuint8_reg(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 12
%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_0Cuint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 12
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int setup_detour_execution(struct kprobe *p, struct pt_regs *regs,
                           int reenter) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.kprobe = type opaque
%struct.pt_regs = type opaque
define i32 @setup_detour_execution(%struct.kprobe* %0, %struct.pt_regs* %1, i32 %2) {
%4 = alloca %struct.kprobe*
%5 = alloca %struct.pt_regs*
%6 = alloca i32
store %struct.kprobe* %0, %struct.kprobe** %4
store %struct.pt_regs* %1, %struct.pt_regs** %5
store i32 %2, i32* %6
ret i32 0
}

LLVM IR (-O2):
%struct.kprobe = type opaque
%struct.pt_regs = type opaque
define i32 @setup_detour_execution(%struct.kprobe* nocapture readnone %0, %struct.pt_regs* nocapture readnone %1, i32 %2) {
ret i32 0
}
void process_message(const char *msg, int msglen) {}


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

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

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

LLVM IR (-O2):
define void @process_message(i8* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
float __infer_nondet_float();
float fminf(float x, float y) { return __infer_nondet_float(); }


x86 assembly (clang, -O0):
<fminf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_float@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define float @fminf(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = call float (...) @__infer_nondet_float()
ret float %5
}

LLVM IR (-O2):
define float @fminf(float %0, float %1) {
%3 = tail call float (...) @__infer_nondet_float()
ret float %3
}
/* Variables and functions */
scalar_t__ allocate(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
char *strsave(char *s) {
  char *ptr = NULL;
  if (s != NULL) {
    ptr = (char *)allocate(strlen(s) + 1);
    strcpy(ptr, s);
  }
  return (ptr);
}


x86 assembly (clang, -O0):
<strsave>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1175 <strsave+0x45>
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <allocate@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strsave>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     115a <strsave+0x2a>
mov    %rdi,%rbx
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <allocate@plt>
mov    %rax,%r14
mov    %rax,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
jmp    115d <strsave+0x2d>
xor    %r14d,%r14d
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @strsave(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
store i8* null, i8** %3
%4 = load i8*, i8** %2
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %15
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i64 @strlen(i8* %7)
%9 = add nsw i64 %8, 1
%10 = call i64 @allocate(i64 %9)
%11 = inttoptr i64 %10 to i8*
store i8* %11, i8** %3
%12 = load i8*, i8** %3
%13 = load i8*, i8** %2
%14 = call i32 @strcpy(i8* %12, i8* %13)
br label %15
15: ; preds = %6, %1
%16 = load i8*, i8** %3
ret i8* %16
}

LLVM IR (-O2):
define i8* @strsave(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = tail call i64 @strlen(i8* %0)
%5 = add nsw i64 %4, 1
%6 = tail call i64 @allocate(i64 %5)
%7 = inttoptr i64 %6 to i8*
%8 = tail call i32 @strcpy(i8* %7, i8* %0)
br label %9
9: ; preds = %3, %1
%10 = phi i8* [ %7, %3 ], [ null, %1 ]
ret i8* %10
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int db_sql_exec_fn(char **, int, char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int db_sql_playcount_increment(char **pe, int id) {
  time_t now = time(NULL);
  return db_sql_exec_fn(pe, 5,
                        "update songs set play_count=play_count + 1"
                        ", time_played=%d where id=%d",
                        now, id);
}


x86 assembly (clang, -O0):
<db_sql_playcount_increment>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%ecx
mov    -0xc(%rbp),%r8d
mov    $0x5,%esi
lea    0xeae(%rip),%rdx
call   1030 <db_sql_exec_fn@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<db_sql_playcount_increment>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %edi,%edi
call   1040 <time@plt>
lea    0xeca(%rip),%rdx
mov    %rbx,%rdi
mov    $0x5,%esi
mov    %eax,%ecx
mov    %ebp,%r8d
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <db_sql_exec_fn@plt>

LLVM IR (-O0):
@.str = [71 x i8] c"update songs set play_count=play_count + 1, time_played=%d where id=%d\00"
define i32 @db_sql_playcount_increment(i8** %0, i32 %1) {
%3 = alloca i8**
%4 = alloca i32
%5 = alloca i32
store i8** %0, i8*** %3
store i32 %1, i32* %4
%6 = call i32 @time(i32* null)
store i32 %6, i32* %5
%7 = load i8**, i8*** %3
%8 = load i32, i32* %5
%9 = load i32, i32* %4
%10 = call i32 @db_sql_exec_fn(i8** %7, i32 5, i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
@.str = [71 x i8] c"update songs set play_count=play_count + 1, time_played=%d where id=%d\00"
define i32 @db_sql_playcount_increment(i8** %0, i32 %1) {
%3 = tail call i32 @time(i32* null)
%4 = tail call i32 @db_sql_exec_fn(i8** %0, i32 5, i8* getelementptr inbounds ([71 x i8], [71 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %1)
ret i32 %4
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ x_root;
};
typedef TYPE_1__ XMotionEvent;

/* Variables and functions */
int get_XMotionEvent_x_root(void *_p) {
  return (int)((XMotionEvent *)_p)->x_root;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i32 @get_XMotionEvent_x_root(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
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_XMotionEvent_x_root(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int binom(int, int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main(int argc, char **argv) {
  int y, x;
  scanf("%d %d", &y, &x);
  printf("%d\n", binom(y, x));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
lea    -0x14(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1050 <scanf@plt>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1040 <binom@plt>
mov    %eax,%esi
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
mov    (%rsp),%esi
call   1040 <binom@plt>
lea    0xeae(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
%6 = bitcast i32* %4 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %3, i32* %4)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @binom(i32 %8, i32 %9)
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "usage: makeann [-l limit [-L]] infile [outfile_template]\n");
  exit(1);
}


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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [58 x i8] c"usage: makeann [-l limit [-L]] infile [outfile_template]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [58 x i8] c"usage: makeann [-l limit [-L]] infile [outfile_template]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ parentheses(int, int);
int main() {
  parentheses(1, 2);
  getchar();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
mov    $0x2,%esi
call   1030 <parentheses@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x2,%esi
call   1030 <parentheses@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @parentheses(i32 1, i32 2)
%2 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @parentheses(i32 1, i32 2)
%2 = tail call i32 (...) @getchar()
ret i32 0
}
void set_bitoff(unsigned char *bitarray, int item) {
  bitarray[item / 8] &= ~(1 << (item % 8));
}


x86 assembly (clang, -O0):
<set_bitoff>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %edx,%ecx
mov    $0x1,%esi
shl    %cl,%esi
xor    $0xffffffff,%esi
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
movzbl (%rax,%rcx,1),%edx
and    %esi,%edx
mov    %dl,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_bitoff>:
mov    %esi,%ecx
and    $0x7,%cl
mov    $0x1,%eax
shl    %cl,%eax
lea    0x7(%rsi),%ecx
test   %esi,%esi
cmovns %esi,%ecx
sar    $0x3,%ecx
movslq %ecx,%rcx
not    %al
and    %al,(%rdi,%rcx,1)
ret

LLVM IR (-O0):
define void @set_bitoff(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = srem i32 %5, 8
%7 = shl i32 1, %6
%8 = xor i32 %7, -1
%9 = load i8*, i8** %3
%10 = load i32, i32* %4
%11 = sdiv i32 %10, 8
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i8, i8* %9, i64 %12
%14 = load i8, i8* %13
%15 = zext i8 %14 to i32
%16 = and i32 %15, %8
%17 = trunc i32 %16 to i8
store i8 %17, i8* %13
ret void
}

LLVM IR (-O2):
define void @set_bitoff(i8* nocapture %0, i32 %1) {
%3 = and i32 %1, 7
%4 = shl nuw nsw i32 1, %3
%5 = sdiv i32 %1, 8
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
%9 = trunc i32 %4 to i8
%10 = xor i8 %9, -1
%11 = and i8 %8, %10
store i8 %11, i8* %7
ret void
}
/* Type definitions */
struct b6_sref {
  int dummy;
};
struct b6_deque {
  int dummy;
};

/* Variables and functions */
struct b6_sref *b6_deque_add_after(struct b6_deque *, int /*<<< orphan*/,
                                   struct b6_sref *);
int /*<<< orphan*/ b6_deque_head(struct b6_deque *);
struct b6_sref *b6_deque_add_first(struct b6_deque *deque,
                                   struct b6_sref *sref) {
  return b6_deque_add_after(deque, b6_deque_head(deque), sref);
}


x86 assembly (clang, -O0):
<b6_deque_add_first>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <b6_deque_head@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
mov    -0x10(%rbp),%rdx
call   1030 <b6_deque_add_after@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<b6_deque_add_first>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <b6_deque_head@plt>
mov    %rbx,%rdi
mov    %eax,%esi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <b6_deque_add_after@plt>

LLVM IR (-O0):
%struct.b6_deque = type { i32 }
%struct.b6_sref = type { i32 }
define %struct.b6_sref* @b6_deque_add_first(%struct.b6_deque* %0, %struct.b6_sref* %1) {
%3 = alloca %struct.b6_deque*
%4 = alloca %struct.b6_sref*
store %struct.b6_deque* %0, %struct.b6_deque** %3
store %struct.b6_sref* %1, %struct.b6_sref** %4
%5 = load %struct.b6_deque*, %struct.b6_deque** %3
%6 = load %struct.b6_deque*, %struct.b6_deque** %3
%7 = call i32 @b6_deque_head(%struct.b6_deque* %6)
%8 = load %struct.b6_sref*, %struct.b6_sref** %4
%9 = call %struct.b6_sref* @b6_deque_add_after(%struct.b6_deque* %5, i32 %7, %struct.b6_sref* %8)
ret %struct.b6_sref* %9
}

LLVM IR (-O2):
%struct.b6_deque = type { i32 }
%struct.b6_sref = type { i32 }
define %struct.b6_sref* @b6_deque_add_first(%struct.b6_deque* %0, %struct.b6_sref* %1) {
%3 = tail call i32 @b6_deque_head(%struct.b6_deque* %0)
%4 = tail call %struct.b6_sref* @b6_deque_add_after(%struct.b6_deque* %0, i32 %3, %struct.b6_sref* %1)
ret %struct.b6_sref* %4
}
/* Variables and functions */
int omp_get_thread_num();
int /*<<< orphan*/ printf(char *, int);
void funcA() {
  printf("En funcA: esta sección la ejecuta el thread %d\n",
         omp_get_thread_num());
}


x86 assembly (clang, -O0):
<funcA>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <omp_get_thread_num@plt>
mov    %eax,%esi
lea    0xecc(%rip),%rdi
call   1040 <printf@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [49 x i8] c"En funcA: esta secci\C3\B3n la ejecuta el thread %d\0A\00"
define void @funcA() {
%1 = call i32 (...) @omp_get_thread_num()
%2 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}

LLVM IR (-O2):
@.str = [49 x i8] c"En funcA: esta secci\C3\B3n la ejecuta el thread %d\0A\00"
define void @funcA() {
%1 = tail call i32 (...) @omp_get_thread_num()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void freeAllocationWithoutMacro(void *memory) { free(memory); }


x86 assembly (clang, -O0):
<freeAllocationWithoutMacro>:
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):
<freeAllocationWithoutMacro>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @freeAllocationWithoutMacro(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 @freeAllocationWithoutMacro(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0x99() {
  Assert_real((isspace(153) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isspace.c",
              770, ("isspace should be 0 for 0x99"));
}


x86 assembly (clang, -O0):
<t_isspace_0x99>:
push   %rbp
mov    %rsp,%rbp
mov    $0x99,%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x302,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isspace_0x99>:
push   %rax
mov    $0x99,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x302,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0x99\00"
define void @t_isspace_0x99() {
%1 = call i64 @isspace(i32 153)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 770, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0x99\00"
define void @t_isspace_0x99() {
%1 = tail call i64 @isspace(i32 153)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 770, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void dtp_clear_call_records(void) {}


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

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

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

LLVM IR (-O2):
define void @dtp_clear_call_records() {
ret void
}
/* Variables and functions */
long __semihost_syscall(long, long *);
long __syscall_error();
long syscall_errno(long id, long *data_block) {
  long res = __semihost_syscall(id, data_block);
  if (res < 0)
    return __syscall_error();
  return res;
}


x86 assembly (clang, -O0):
<syscall_errno>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <__semihost_syscall@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jge    115c <syscall_errno+0x3c>
mov    $0x0,%al
call   1030 <__syscall_error@plt>
mov    %rax,-0x8(%rbp)
jmp    1164 <syscall_errno+0x44>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscall_errno>:
push   %rax
call   1040 <__semihost_syscall@plt>
test   %rax,%rax
js     112d <syscall_errno+0xd>
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
jmp    1030 <__syscall_error@plt>

LLVM IR (-O0):
define i64 @syscall_errno(i64 %0, i64* %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64*
%6 = alloca i64
store i64 %0, i64* %4
store i64* %1, i64** %5
%7 = load i64, i64* %4
%8 = load i64*, i64** %5
%9 = call i64 @__semihost_syscall(i64 %7, i64* %8)
store i64 %9, i64* %6
%10 = load i64, i64* %6
%11 = icmp slt i64 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = call i64 (...) @__syscall_error()
store i64 %13, i64* %3
br label %16
14: ; preds = %2
%15 = load i64, i64* %6
store i64 %15, i64* %3
br label %16
16: ; preds = %14, %12
%17 = load i64, i64* %3
ret i64 %17
}

LLVM IR (-O2):
define i64 @syscall_errno(i64 %0, i64* %1) {
%3 = tail call i64 @__semihost_syscall(i64 %0, i64* %1)
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i64 (...) @__syscall_error()
br label %7
7: ; preds = %2, %5
%8 = phi i64 [ %6, %5 ], [ %3, %2 ]
ret i64 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
time_t get_now(void) {
  time_t now;
  time(&now);
  return now;
}


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

x86 assembly (clang, -O2):
<get_now>:
push   %rax
lea    0x4(%rsp),%rdi
call   1030 <time@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @get_now() {
%1 = alloca i32
%2 = call i32 @time(i32* %1)
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @get_now() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @time(i32* %1)
%4 = load i32, i32* %1
ret i32 %4
}
void write2ToEco(unsigned char *p, unsigned short data) {
  p[0] = data >> 8;
  p[1] = data >> 0;
}


x86 assembly (clang, -O0):
<write2ToEco>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
movzwl -0xa(%rbp),%eax
sar    $0x8,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
movzwl -0xa(%rbp),%eax
sar    $0x0,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<write2ToEco>:
rol    $0x8,%si
mov    %si,(%rdi)
ret

LLVM IR (-O0):
define void @write2ToEco(i8* %0, i16 zeroext %1) {
%3 = alloca i8*
%4 = alloca i16
store i8* %0, i8** %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = zext i16 %5 to i32
%7 = ashr i32 %6, 8
%8 = trunc i32 %7 to i8
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 0
store i8 %8, i8* %10
%11 = load i16, i16* %4
%12 = zext i16 %11 to i32
%13 = ashr i32 %12, 0
%14 = trunc i32 %13 to i8
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i64 1
store i8 %14, i8* %16
ret void
}

LLVM IR (-O2):
define void @write2ToEco(i8* nocapture writeonly %0, i16 zeroext %1) {
%3 = lshr i16 %1, 8
%4 = trunc i16 %3 to i8
store i8 %4, i8* %0
%5 = trunc i16 %1 to i8
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %5, i8* %6
ret void
}
void tomtomgo_backlight_on(void) {
  unsigned gpbdat = *((volatile unsigned *)0x56000014);
  gpbdat |= (0x1 << 0);
  *((volatile unsigned *)0x56000014) = gpbdat;
}


x86 assembly (clang, -O0):
<tomtomgo_backlight_on>:
push   %rbp
mov    %rsp,%rbp
mov    $0x56000014,%eax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
or     $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x56000014,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<tomtomgo_backlight_on>:
orl    $0x1,0x56000014
01
ret

LLVM IR (-O0):
define void @tomtomgo_backlight_on() {
%1 = alloca i32
%2 = load volatile i32, i32* inttoptr (i64 1442840596 to i32*)
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = or i32 %3, 1
store i32 %4, i32* %1
%5 = load i32, i32* %1
store volatile i32 %5, i32* inttoptr (i64 1442840596 to i32*)
ret void
}

LLVM IR (-O2):
define void @tomtomgo_backlight_on() {
%1 = load volatile i32, i32* inttoptr (i64 1442840596 to i32*)
%2 = or i32 %1, 1
store volatile i32 %2, i32* inttoptr (i64 1442840596 to i32*)
ret void
}
/* Type definitions */
struct timeval {
  int dummy;
};
struct ntp_time_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int /*<<< orphan*/ unix_time_to_ntp_time(struct timeval *, struct ntp_time_t *);
void get_ntp_time(struct timeval *tv, struct ntp_time_t *ntp) {
  gettimeofday(tv, NULL);
  unix_time_to_ntp_time(tv, ntp);
}


x86 assembly (clang, -O0):
<get_ntp_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <gettimeofday@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <unix_time_to_ntp_time@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_ntp_time>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %esi,%esi
call   1040 <gettimeofday@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <unix_time_to_ntp_time@plt>

LLVM IR (-O0):
%struct.timeval = type { i32 }
%struct.ntp_time_t = type { i32 }
define void @get_ntp_time(%struct.timeval* %0, %struct.ntp_time_t* %1) {
%3 = alloca %struct.timeval*
%4 = alloca %struct.ntp_time_t*
store %struct.timeval* %0, %struct.timeval** %3
store %struct.ntp_time_t* %1, %struct.ntp_time_t** %4
%5 = load %struct.timeval*, %struct.timeval** %3
%6 = call i32 @gettimeofday(%struct.timeval* %5, i32* null)
%7 = load %struct.timeval*, %struct.timeval** %3
%8 = load %struct.ntp_time_t*, %struct.ntp_time_t** %4
%9 = call i32 @unix_time_to_ntp_time(%struct.timeval* %7, %struct.ntp_time_t* %8)
ret void
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
%struct.ntp_time_t = type { i32 }
define void @get_ntp_time(%struct.timeval* %0, %struct.ntp_time_t* %1) {
%3 = tail call i32 @gettimeofday(%struct.timeval* %0, i32* null)
%4 = tail call i32 @unix_time_to_ntp_time(%struct.timeval* %0, %struct.ntp_time_t* %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int read8(int /*<<< orphan*/ *);
int read16(FILE *f) {
  int i, j, k;
  i = read8(f);
  j = read8(f);
  k = 256 * j + i;
  return (k);
}


x86 assembly (clang, -O0):
<read16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <read8@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <read8@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
shl    $0x8,%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read16>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <read8@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <read8@plt>
shl    $0x8,%eax
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @read16(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %2
%6 = load i32*, i32** %2
%7 = call i32 @read8(i32* %6)
store i32 %7, i32* %3
%8 = load i32*, i32** %2
%9 = call i32 @read8(i32* %8)
store i32 %9, i32* %4
%10 = load i32, i32* %4
%11 = mul nsw i32 256, %10
%12 = load i32, i32* %3
%13 = add nsw i32 %11, %12
store i32 %13, i32* %5
%14 = load i32, i32* %5
ret i32 %14
}

LLVM IR (-O2):
define i32 @read16(i32* %0) {
%2 = tail call i32 @read8(i32* %0)
%3 = tail call i32 @read8(i32* %0)
%4 = shl nsw i32 %3, 8
%5 = add nsw i32 %4, %2
ret i32 %5
}
/* Variables and functions */
int htons(int);
int htonl(int value) {
  return htons((value >> 16) & 0xffff) | (htons(value & 0xffff) << 16);
}


x86 assembly (clang, -O0):
<htonl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
sar    $0x10,%edi
and    $0xffff,%edi
call   1030 <htons@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
and    $0xffff,%edi
call   1030 <htons@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
shl    $0x10,%ecx
or     %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<htonl>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
shr    $0x10,%edi
call   1030 <htons@plt>
mov    %eax,%ebp
movzwl %bx,%edi
call   1030 <htons@plt>
shl    $0x10,%eax
or     %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @htonl(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 16
%5 = and i32 %4, 65535
%6 = call i32 @htons(i32 %5)
%7 = load i32, i32* %2
%8 = and i32 %7, 65535
%9 = call i32 @htons(i32 %8)
%10 = shl i32 %9, 16
%11 = or i32 %6, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @htonl(i32 %0) {
%2 = lshr i32 %0, 16
%3 = tail call i32 @htons(i32 %2)
%4 = and i32 %0, 65535
%5 = tail call i32 @htons(i32 %4)
%6 = shl i32 %5, 16
%7 = or i32 %6, %3
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ load_file(char *);
int /*<<< orphan*/ make_startup_vm();
int /*<<< orphan*/ panic(char *);
int /*<<< orphan*/ running();
int main(int argc, char **argv) {
  if (2 != argc)
    panic("Usage: elv filename");
  load_file(argv[1]);
  make_startup_vm();
  running();
  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)
mov    $0x2,%eax
cmp    -0x8(%rbp),%eax
je     1170 <main+0x30>
lea    0xe95(%rip),%rdi
call   1040 <panic@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <load_file@plt>
mov    $0x0,%al
call   1030 <make_startup_vm@plt>
mov    $0x0,%al
call   1060 <running@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
cmp    $0x2,%edi
je     1155 <main+0x15>
lea    0xeb0(%rip),%rdi
call   1040 <panic@plt>
mov    0x8(%rbx),%rdi
call   1050 <load_file@plt>
xor    %eax,%eax
call   1030 <make_startup_vm@plt>
xor    %eax,%eax
call   1060 <running@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Usage: elv filename\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 ne i32 2, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @panic(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = call i32 @load_file(i8* %13)
%15 = call i32 (...) @make_startup_vm()
%16 = call i32 (...) @running()
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"Usage: elv filename\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @panic(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = tail call i32 @load_file(i8* %8)
%10 = tail call i32 (...) @make_startup_vm()
%11 = tail call i32 (...) @running()
ret i32 0
}
/* Variables and functions */
int __bswapd(int);
int test__bswapd(int X) { return __bswapd(X); }


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

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

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

LLVM IR (-O2):
define i32 @test__bswapd(i32 %0) {
%2 = tail call i32 @__bswapd(i32 %0)
ret i32 %2
}
/* Variables and functions */
char *capture(char const *, char *);
char *get_file_size(const char *rawString) {
  char *res;
  char *regexString = "[ \t]+([0-9]+) [A-Z][a-z]{2}[ ]+[0-9]+";
  res = capture(rawString, regexString);
  return res;
}


x86 assembly (clang, -O0):
<get_file_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <capture@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_file_size>:
lea    0xee9(%rip),%rsi
jmp    1030 <capture@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"[ \09]+([0-9]+) [A-Z][a-z]{2}[ ]+[0-9]+\00"
define i8* @get_file_size(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %2
store i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8** %4
%5 = load i8*, i8** %2
%6 = load i8*, i8** %4
%7 = call i8* @capture(i8* %5, i8* %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
ret i8* %8
}

LLVM IR (-O2):
@.str = [38 x i8] c"[ \09]+([0-9]+) [A-Z][a-z]{2}[ ]+[0-9]+\00"
define i8* @get_file_size(i8* %0) {
%2 = tail call i8* @capture(i8* %0, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
ret i8* %2
}