xunge/DecIR huggingface dataset:
int test_imm_2Auint64_midword_mem(unsigned long long *val) {
  return ((*val >> 16) & (0x2A << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_2Auint64_midword_mem>:
testb  $0x2a,0x2(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_2Auint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 2752512
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ gpio_mbus_sleep_all();
void operation_sleep_noirqreset(void) { gpio_mbus_sleep_all(); }


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

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

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

LLVM IR (-O2):
define void @operation_sleep_noirqreset() {
%1 = tail call i32 (...) @gpio_mbus_sleep_all()
ret void
}
/* Variables and functions */
scalar_t__ ceilf(float);
int /*<<< orphan*/ link_failure_ceilf();
void test_ceilf(float f) {
  if (ceilf(f) != ceilf(f))
    link_failure_ceilf();
}


x86 assembly (clang, -O0):
<test_ceilf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <ceilf@plt>
mov    %rax,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <ceilf@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
je     115c <test_ceilf+0x3c>
mov    $0x0,%al
call   1030 <link_failure_ceilf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_ceilf>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm0,0xc(%rsp)
call   1040 <ceilf@plt>
mov    %rax,%rbx
movss  0xc(%rsp),%xmm0
call   1040 <ceilf@plt>
cmp    %rax,%rbx
jne    1149 <test_ceilf+0x29>
add    $0x10,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
jmp    1030 <link_failure_ceilf@plt>

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

LLVM IR (-O2):
define void @test_ceilf(float %0) {
%2 = tail call i64 @ceilf(float %0)
%3 = tail call i64 @ceilf(float %0)
%4 = icmp eq i64 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @link_failure_ceilf()
br label %7
7: ; preds = %5, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ testerror(char *);
void t3() { testerror("error1"); }


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

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

LLVM IR (-O0):
@.str = [7 x i8] c"error1\00"
define void @t3() {
%1 = call i32 @testerror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"error1\00"
define void @t3() {
%1 = tail call i32 @testerror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}
void mdp4_mddi_overlay_restore(void) {}


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

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

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

LLVM IR (-O2):
define void @mdp4_mddi_overlay_restore() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ isfinite(float);
float scalbnf(float, int);
float ldexpf(float value, int exp) {
  if (!isfinite(value) || value == (float)0.0)
    return value;
  value = scalbnf(value, exp);
  return value;
}


x86 assembly (clang, -O0):
<ldexpf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
call   1040 <isfinite@plt>
cmp    $0x0,%eax
je     115a <ldexpf+0x3a>
movss  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    1169 <ldexpf+0x49>
jp     1169 <ldexpf+0x49>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1185 <ldexpf+0x65>
movss  -0x8(%rbp),%xmm0
mov    -0xc(%rbp),%edi
call   1030 <scalbnf@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ldexpf>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
movss  %xmm0,0xc(%rsp)
call   1040 <isfinite@plt>
xorps  %xmm0,%xmm0
movss  0xc(%rsp),%xmm1
ucomiss %xmm0,%xmm1
movaps %xmm1,%xmm0
jne    1145 <ldexpf+0x25>
jnp    1155 <ldexpf+0x35>
test   %eax,%eax
je     1155 <ldexpf+0x35>
mov    %ebx,%edi
add    $0x10,%rsp
pop    %rbx
jmp    1030 <scalbnf@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define float @ldexpf(float %0, i32 %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca i32
store float %0, float* %4
store i32 %1, i32* %5
%6 = load float, float* %4
%7 = call i32 @isfinite(float %6)
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = load float, float* %4
%11 = fcmp oeq float %10, 0.000000e+00
br i1 %11, label %12, label %14
12: ; preds = %9, %2
%13 = load float, float* %4
store float %13, float* %3
br label %19
14: ; preds = %9
%15 = load float, float* %4
%16 = load i32, i32* %5
%17 = call float @scalbnf(float %15, i32 %16)
store float %17, float* %4
%18 = load float, float* %4
store float %18, float* %3
br label %19
19: ; preds = %14, %12
%20 = load float, float* %3
ret float %20
}

LLVM IR (-O2):
define float @ldexpf(float %0, i32 %1) {
%3 = tail call i32 @isfinite(float %0)
%4 = icmp eq i32 %3, 0
%5 = fcmp oeq float %0, 0.000000e+00
%6 = or i1 %5, %4
br i1 %6, label %9, label %7
7: ; preds = %2
%8 = tail call float @scalbnf(float %0, i32 %1)
br label %9
9: ; preds = %2, %7
%10 = phi float [ %8, %7 ], [ %0, %2 ]
ret float %10
}
_Bool F1(_Bool B1, _Bool B2) {
  _Bool R;
  if (B1 && B2)
    R = 1;
  else
    R = 0;
  return R;
}


x86 assembly (clang, -O0):
<F1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
and    $0x1,%cl
mov    %cl,-0x1(%rbp)
and    $0x1,%al
mov    %al,-0x2(%rbp)
testb  $0x1,-0x1(%rbp)
je     1132 <F1+0x32>
testb  $0x1,-0x2(%rbp)
je     1132 <F1+0x32>
movb   $0x1,-0x3(%rbp)
jmp    1136 <F1+0x36>
movb   $0x0,-0x3(%rbp)
mov    -0x3(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i1 @F1(i1 zeroext %0, i1 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i8
%6 = zext i1 %0 to i8
store i8 %6, i8* %3
%7 = zext i1 %1 to i8
store i8 %7, i8* %4
%8 = load i8, i8* %3
%9 = trunc i8 %8 to i1
br i1 %9, label %10, label %14
10: ; preds = %2
%11 = load i8, i8* %4
%12 = trunc i8 %11 to i1
br i1 %12, label %13, label %14
13: ; preds = %10
store i8 1, i8* %5
br label %15
14: ; preds = %10, %2
store i8 0, i8* %5
br label %15
15: ; preds = %14, %13
%16 = load i8, i8* %5
%17 = trunc i8 %16 to i1
ret i1 %17
}

LLVM IR (-O2):
define zeroext i1 @F1(i1 zeroext %0, i1 zeroext %1) {
%3 = and i1 %0, %1
ret i1 %3
}
/* Variables and functions */
int /*<<< orphan*/ write(char *, char *, char *);
void function_empty_urole() { write("csv-task.csv", "%s\n", "PUBLIC"); }


x86 assembly (clang, -O0):
<function_empty_urole>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xeeb(%rip),%rsi
lea    0xee8(%rip),%rdx
call   1030 <write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<function_empty_urole>:
lea    0xee9(%rip),%rdi
lea    0xeef(%rip),%rsi
lea    0xeec(%rip),%rdx
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"csv-task.csv\00"
@.str.1 = [4 x i8] c"%s\0A\00"
@.str.2 = [7 x i8] c"PUBLIC\00"
define void @function_empty_urole() {
%1 = call i32 @write(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"csv-task.csv\00"
@.str.1 = [4 x i8] c"%s\0A\00"
@.str.2 = [7 x i8] c"PUBLIC\00"
define void @function_empty_urole() {
%1 = tail call i32 @write(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(int);
void move_left(void) {
  putchar(0x1b);
  putchar(0x5b);
  putchar(0x44);
}


x86 assembly (clang, -O0):
<move_left>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1b,%edi
call   1030 <putchar@plt>
mov    $0x5b,%edi
call   1030 <putchar@plt>
mov    $0x44,%edi
call   1030 <putchar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<move_left>:
push   %rax
mov    $0x1b,%edi
call   1030 <putchar@plt>
mov    $0x5b,%edi
call   1030 <putchar@plt>
mov    $0x44,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @move_left() {
%1 = call i32 @putchar(i32 27)
%2 = call i32 @putchar(i32 91)
%3 = call i32 @putchar(i32 68)
ret void
}

LLVM IR (-O2):
define void @move_left() {
%1 = tail call i32 @putchar(i32 27)
%2 = tail call i32 @putchar(i32 91)
%3 = tail call i32 @putchar(i32 68)
ret void
}
/* Variables and functions */
long computeFibonacciEven(int);
int /*<<< orphan*/ printf(char *, long);
int main(int argc, char *argv[]) {
  long result = computeFibonacciEven(4000000);
  printf("The Largest sum without going over the max is: %lu\n", result);
  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)
mov    $0x3d0900,%edi
call   1040 <computeFibonacciEven@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3d0900,%edi
call   1040 <computeFibonacciEven@plt>
lea    0xece(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [52 x i8] c"The Largest sum without going over the max is: %lu\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i64 @computeFibonacciEven(i32 4000000)
store i64 %7, i64* %6
%8 = load i64, i64* %6
%9 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i64 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [52 x i8] c"The Largest sum without going over the max is: %lu\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 @computeFibonacciEven(i32 4000000)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i64 %3)
ret i32 0
}
void cmpxchg_386_u8(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<cmpxchg_386_u8>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmpxchg_386_u8>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.cmpxchg_386_u8 = [15 x i8] c"cmpxchg_386_u8\00"
define void @cmpxchg_386_u8() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.cmpxchg_386_u8, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.cmpxchg_386_u8 = [15 x i8] c"cmpxchg_386_u8\00"
define void @cmpxchg_386_u8() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.cmpxchg_386_u8, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ switch_on_bits(unsigned char *, int);
void CTRL_REGSC_BITSET_mwup_rsp_latchd(unsigned char *data) {
  switch_on_bits(data, (0x08));
}


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

x86 assembly (clang, -O2):
<CTRL_REGSC_BITSET_mwup_rsp_latchd>:
mov    $0x8,%esi
jmp    1030 <switch_on_bits@plt>

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

LLVM IR (-O2):
define void @CTRL_REGSC_BITSET_mwup_rsp_latchd(i8* %0) {
%2 = tail call i32 @switch_on_bits(i8* %0, i32 8)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int creat(char *, int /*<<< orphan*/);
int libc_creat(char *p, mode_t mode) { return creat(p, mode); }


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

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

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

LLVM IR (-O2):
define i32 @libc_creat(i8* %0, i32 %1) {
%3 = tail call i32 @creat(i8* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
char *malloc(size_t);
int /*<<< orphan*/ strncpy(char *, char const *, size_t);
char *strdup_prefix(const char *src, size_t len) {
  char *p;
  p = malloc(len + 1);
  strncpy(p, src, len);
  p[len] = '\0';
  return p;
}


x86 assembly (clang, -O0):
<strdup_prefix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <strncpy@plt>
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdup_prefix>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r15
mov    %rdi,%r14
lea    0x1(%rsi),%rdi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1030 <strncpy@plt>
movb   $0x0,(%rbx,%r15,1)
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @strdup_prefix(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = add i64 %6, 1
%8 = call i8* @malloc(i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = load i8*, i8** %3
%11 = load i64, i64* %4
%12 = call i32 @strncpy(i8* %9, i8* %10, i64 %11)
%13 = load i8*, i8** %5
%14 = load i64, i64* %4
%15 = getelementptr inbounds i8, i8* %13, i64 %14
store i8 0, i8* %15
%16 = load i8*, i8** %5
ret i8* %16
}

LLVM IR (-O2):
define i8* @strdup_prefix(i8* %0, i64 %1) {
%3 = add i64 %1, 1
%4 = tail call i8* @malloc(i64 %3)
%5 = tail call i32 @strncpy(i8* %4, i8* %0, i64 %1)
%6 = getelementptr inbounds i8, i8* %4, i64 %1
store i8 0, i8* %6
ret i8* %4
}
/* Type definitions */
typedef int uid_t;
struct timespec {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SYS_getuid;
int clock_gettime(int, struct timespec *);
int getuid();
int syscall(int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  int res;
  struct timespec ts;
  uid_t uid1, uid2;
  res = clock_gettime(6667, &ts);
  uid1 = syscall(SYS_getuid);
  uid2 = getuid();
  return res + 1 + uid1 - uid2;
}


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)
mov    $0x1a0b,%edi
lea    -0x18(%rbp),%rsi
call   1030 <clock_gettime@plt>
mov    %eax,-0x14(%rbp)
mov    0x2e82(%rip),%rax
mov    (%rax),%edi
call   1050 <syscall@plt>
mov    %eax,-0x1c(%rbp)
mov    $0x0,%al
call   1040 <getuid@plt>
mov    %eax,-0x20(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
add    -0x1c(%rbp),%eax
sub    -0x20(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsp,%rsi
mov    $0x1a0b,%edi
call   1030 <clock_gettime@plt>
mov    %eax,%ebx
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
call   1050 <syscall@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1040 <getuid@plt>
add    %ebx,%ebp
sub    %eax,%ebp
add    $0x1,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.timespec = type { i32 }
@SYS_getuid = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca %struct.timespec
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = call i32 @clock_gettime(i32 6667, %struct.timespec* %7)
store i32 %10, i32* %6
%11 = load i32, i32* @SYS_getuid
%12 = call i32 @syscall(i32 %11)
store i32 %12, i32* %8
%13 = call i32 (...) @getuid()
store i32 %13, i32* %9
%14 = load i32, i32* %6
%15 = add nsw i32 %14, 1
%16 = load i32, i32* %8
%17 = add nsw i32 %15, %16
%18 = load i32, i32* %9
%19 = sub nsw i32 %17, %18
ret i32 %19
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
@SYS_getuid = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca %struct.timespec
%4 = bitcast %struct.timespec* %3 to i8*
%5 = call i32 @clock_gettime(i32 6667, %struct.timespec* %3)
%6 = load i32, i32* @SYS_getuid
%7 = call i32 @syscall(i32 %6)
%8 = call i32 (...) @getuid()
%9 = add nsw i32 %5, 1
%10 = add nsw i32 %9, %7
%11 = sub i32 %10, %8
ret i32 %11
}
/* Variables and functions */
scalar_t__ strcasecmp(void const *, void const *);
int dictSdsKeyCaseCompare(void *privdata, const void *key1, const void *key2) {
  ((void)privdata);
  return strcasecmp(key1, key2) == 0;
}


x86 assembly (clang, -O0):
<dictSdsKeyCaseCompare>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dictSdsKeyCaseCompare>:
push   %rax
mov    %rsi,%rdi
mov    %rdx,%rsi
call   1030 <strcasecmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @dictSdsKeyCaseCompare(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 i64 @strcasecmp(i8* %8, i8* %9)
%11 = icmp eq i64 %10, 0
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @dictSdsKeyCaseCompare(i8* nocapture readnone %0, i8* nocapture %1, i8* nocapture %2) {
%4 = tail call i64 @strcasecmp(i8* %1, i8* %2)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int, int);
char *strdup(char *);
char *get_process(int sleep_seconds) {
  char process[128];
  static int process_number = 0;
  process_number++;
  sprintf(process, "sleep %d; echo 'done %d'", sleep_seconds, process_number);
  return strdup(process);
}


x86 assembly (clang, -O0):
<get_process>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2f00(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2ef7(%rip)
lea    -0x90(%rbp),%rdi
mov    -0x4(%rbp),%edx
mov    0x2ee7(%rip),%ecx
lea    0xeac(%rip),%rsi
call   1030 <sprintf@plt>
lea    -0x90(%rbp),%rdi
call   1040 <strdup@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_process>:
push   %rbx
sub    $0x80,%rsp
mov    %edi,%edx
mov    0x2f04(%rip),%ecx
add    $0x1,%ecx
mov    %ecx,0x2efb(%rip)
lea    0xec0(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <strdup@plt>
add    $0x80,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@get_process.process_number = internal global i32 0
@.str = [25 x i8] c"sleep %d; echo 'done %d'\00"
define i8* @get_process(i32 %0) {
%2 = alloca i32
%3 = alloca [128 x i8]
store i32 %0, i32* %2
%4 = load i32, i32* @get_process.process_number
%5 = add nsw i32 %4, 1
store i32 %5, i32* @get_process.process_number
%6 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%7 = load i32, i32* %2
%8 = load i32, i32* @get_process.process_number
%9 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8)
%10 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%11 = call i8* @strdup(i8* %10)
ret i8* %11
}

LLVM IR (-O2):
@get_process.process_number = internal unnamed_addr global i32 0
@.str = [25 x i8] c"sleep %d; echo 'done %d'\00"
define noalias i8* @get_process(i32 %0) {
%2 = alloca [128 x i8]
%3 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%4 = load i32, i32* @get_process.process_number
%5 = add nsw i32 %4, 1
store i32 %5, i32* @get_process.process_number
%6 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %5)
%7 = call i8* @strdup(i8* %3)
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0x9b() {
  Assert_real((ispunct(155) == 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_ispunct.c",
              780, ("ispunct should be 0 for 0x9b"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0x9b>:
push   %rax
mov    $0x9b,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x30c,%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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0x9b\00"
define void @t_ispunct_0x9b() {
%1 = call i64 @ispunct(i32 155)
%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 780, 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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0x9b\00"
define void @t_ispunct_0x9b() {
%1 = tail call i64 @ispunct(i32 155)
%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 780, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int calc_v0_volt(struct smart_dimming *dimming, int color) { return 5939; }


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

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

LLVM IR (-O0):
%struct.smart_dimming = type opaque
define i32 @calc_v0_volt(%struct.smart_dimming* %0, i32 %1) {
%3 = alloca %struct.smart_dimming*
%4 = alloca i32
store %struct.smart_dimming* %0, %struct.smart_dimming** %3
store i32 %1, i32* %4
ret i32 5939
}

LLVM IR (-O2):
%struct.smart_dimming = type opaque
define i32 @calc_v0_volt(%struct.smart_dimming* nocapture readnone %0, i32 %1) {
ret i32 5939
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int x, y;
  scanf("%d%d", &x, &y);
  printf("%d", (5 * x - 3 * y) % 4);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
imul   $0x5,-0x8(%rbp),%eax
imul   $0x3,-0xc(%rbp),%ecx
sub    %ecx,%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
lea    (%rax,%rax,4),%esi
mov    (%rsp),%eax
lea    (%rax,%rax,2),%eax
sub    %eax,%esi
lea    0x3(%rsi),%eax
test   %esi,%esi
cmovns %esi,%eax
and    $0xfffffffc,%eax
sub    %eax,%esi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%d%d\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = mul nsw i32 %6, 5
%8 = load i32, i32* %2
%9 = mul i32 %8, -3
%10 = add i32 %9, %7
%11 = srem i32 %10, 4
%12 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %11)
ret i32 0
}
int dd() { return (1); }


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

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

LLVM IR (-O0):
define i32 @dd() {
ret i32 1
}

LLVM IR (-O2):
define i32 @dd() {
ret i32 1
}
drawarc(n, m, n1, m1) int m, n, m1, n1;
{}


x86 assembly (clang, -O0):
<drawarc>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @drawarc(i32 %0, i32 %1, i32 %2, i32 %3) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void odusage(void) {
  fprintf(stderr, "usage: od [-aBbcDdeFfHhIiLlOosvXx] [-A base] [-j skip] [-N "
                  "length] [-t type]\n");
  fprintf(stderr, "          [[+]offset[.][Bb]] [file ...]\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [78 x i8] c"usage: od [-aBbcDdeFfHhIiLlOosvXx] [-A base] [-j skip] [-N length] [-t type]\0A\00"
@.str.1 = [41 x i8] c" [[+]offset[.][Bb]] [file ...]\0A\00"
define void @odusage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [78 x i8] c"usage: od [-aBbcDdeFfHhIiLlOosvXx] [-A base] [-j skip] [-N length] [-t type]\0A\00"
@.str.1 = [41 x i8] c" [[+]offset[.][Bb]] [file ...]\0A\00"
define void @odusage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int rand();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int drawing(void) {
  srand(time(NULL));
  return rand() % 101 < 50 ? 1 : 2;
}


x86 assembly (clang, -O0):
<drawing>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
mov    $0x0,%al
call   1050 <rand@plt>
mov    $0x65,%ecx
cltd
idiv   %ecx
mov    $0x2,%eax
mov    $0x1,%ecx
cmp    $0x32,%edx
cmovl  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawing>:
push   %rax
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
cltq
imul   $0x288df0cb,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x24,%rcx
add    %edx,%ecx
imul   $0x65,%ecx,%ecx
sub    %ecx,%eax
xor    %ecx,%ecx
cmp    $0x32,%eax
setl   %cl
mov    $0x2,%eax
sub    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @drawing() {
%1 = call i32 @time(i32* null)
%2 = call i32 @srand(i32 %1)
%3 = call i32 (...) @rand()
%4 = srem i32 %3, 101
%5 = icmp slt i32 %4, 50
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 1, i32 2
ret i32 %7
}

LLVM IR (-O2):
define i32 @drawing() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
%3 = tail call i32 (...) @rand()
%4 = srem i32 %3, 101
%5 = icmp slt i32 %4, 50
%6 = select i1 %5, i32 1, i32 2
ret i32 %6
}
void AD_PowerDown() {
  (*((volatile unsigned long *)0xE0034000)) &= ~0x00200000;
}


x86 assembly (clang, -O0):
<AD_PowerDown>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe0034000,%eax
mov    (%rax),%rcx
and    $0xffffffffffdfffff,%rcx
mov    $0xe0034000,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<AD_PowerDown>:
mov    $0xe0034000,%eax
andq   $0xffffffffffdfffff,(%rax)
ret

LLVM IR (-O0):
define void @AD_PowerDown() {
%1 = load volatile i64, i64* inttoptr (i64 3758309376 to i64*)
%2 = and i64 %1, -2097153
store volatile i64 %2, i64* inttoptr (i64 3758309376 to i64*)
ret void
}

LLVM IR (-O2):
define void @AD_PowerDown() {
%1 = load volatile i64, i64* inttoptr (i64 3758309376 to i64*)
%2 = and i64 %1, -2097153
store volatile i64 %2, i64* inttoptr (i64 3758309376 to i64*)
ret void
}
int test_imm_36int8_reg(signed char val) {
  return ((val) & (-0x36 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_36int8_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, -54
%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_36int8_reg(i8 signext %0) {
%2 = and i8 %0, -54
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
int devices() {
  system("hcitool scan");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"hcitool scan\00"
define i32 @devices() {
%1 = call i32 @system(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"hcitool scan\00"
define i32 @devices() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int find_sum(int number, int sequence) {
  sequence--;
  if ((number % sequence) == 0) {
    if (sequence != 1) {
      return find_sum(number, sequence) + sequence;
    } else {
      return 1;
    }
  } else {
    return find_sum(number, sequence);
  }
}


x86 assembly (clang, -O0):
<find_sum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    1163 <find_sum+0x53>
cmpl   $0x1,-0xc(%rbp)
je     1157 <find_sum+0x47>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <find_sum@plt>
add    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1171 <find_sum+0x61>
movl   $0x1,-0x4(%rbp)
jmp    1171 <find_sum+0x61>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <find_sum@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_sum>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %eax,%r8d
mov    %esi,%ecx
neg    %ecx
add    $0xffffffff,%esi
nopw   0x0(%rax,%rax,1)
mov    %edi,%eax
cltd
idiv   %esi
add    $0x1,%ecx
add    $0xffffffff,%esi
test   %edx,%edx
jne    1120 <find_sum+0x20>
mov    %r8d,%eax
sub    %ecx,%eax
mov    %ecx,%esi
neg    %esi
cmp    $0xffffffff,%ecx
jne    1110 <find_sum+0x10>
add    $0x1,%r8d
mov    %r8d,%eax
ret

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

LLVM IR (-O2):
define i32 @find_sum(i32 %0, i32 %1) {
br label %3
3: ; preds = %11, %2
%4 = phi i32 [ %13, %11 ], [ 0, %2 ]
%5 = phi i32 [ %8, %11 ], [ %1, %2 ]
br label %6
6: ; preds = %3, %6
%7 = phi i32 [ %8, %6 ], [ %5, %3 ]
%8 = add nsw i32 %7, -1
%9 = srem i32 %0, %8
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %6
11: ; preds = %6
%12 = icmp eq i32 %8, 1
%13 = add nsw i32 %8, %4
br i1 %12, label %14, label %3
14: ; preds = %11
%15 = add nsw i32 %4, 1
ret i32 %15
}
void NotToRemove2() { return; }


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

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

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

LLVM IR (-O2):
define void @NotToRemove2() {
ret void
}
char *foo_strcpy(char *restrict dst, const char *restrict src) {
  char *ret = dst;
  for (; *src; ++src, ++dst)
    *dst = *src;
  return ret;
}


x86 assembly (clang, -O0):
<foo_strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     114a <foo_strcpy+0x4a>
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1114 <foo_strcpy+0x14>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo_strcpy>:
mov    %rdi,%rax
mov    (%rsi),%cl
test   %cl,%cl
je     1120 <foo_strcpy+0x20>
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
mov    %cl,(%rax,%rdx,1)
movzbl 0x1(%rsi,%rdx,1),%ecx
add    $0x1,%rdx
test   %cl,%cl
jne    1110 <foo_strcpy+0x10>
ret

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

LLVM IR (-O2):
define i8* @foo_strcpy(i8* noalias returned writeonly %0, i8* noalias nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %11, %5 ], [ %3, %2 ]
%7 = phi i8* [ %10, %5 ], [ %0, %2 ]
%8 = phi i8* [ %9, %5 ], [ %1, %2 ]
store i8 %6, i8* %7
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = getelementptr inbounds i8, i8* %7, i64 1
%11 = load i8, i8* %9
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
ret i8* %0
}
void kol_paint_string(unsigned x, unsigned y, char *ss, unsigned c) {
  asm volatile("int $0x40" ::"a"(4), "b"(x * 65536 + y), "c"(c), "d"(ss));
}


x86 assembly (clang, -O0):
<kol_paint_string>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0xc(%rbp),%ebx
shl    $0x10,%ebx
add    -0x10(%rbp),%ebx
mov    -0x1c(%rbp),%ecx
mov    -0x18(%rbp),%rdx
mov    $0x4,%eax
int    $0x40
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<kol_paint_string>:
push   %rbx
shl    $0x10,%edi
lea    (%rdi,%rsi,1),%ebx
mov    $0x4,%eax
int    $0x40
pop    %rbx
ret

LLVM IR (-O0):
define void @kol_paint_string(i32 %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = mul i32 %9, 65536
%11 = load i32, i32* %6
%12 = add i32 %10, %11
%13 = load i32, i32* %8
%14 = load i8*, i8** %7
ret void
}

LLVM IR (-O2):
define void @kol_paint_string(i32 %0, i32 %1, i8* %2, i32 %3) {
%5 = shl i32 %0, 16
%6 = add i32 %5, %1
tail call void asm sideeffect "int $$0x40", "{ax},{bx},{cx},{dx},~{dirflag},~{fpsr},~{flags}"(i32 4, i32 %6, i32 %3, i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void Debug_SysLog(char *log) { puts(log); }


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

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

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

LLVM IR (-O2):
define void @Debug_SysLog(i8* nocapture %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) %0)
ret void
}
/* Type definitions */
struct jit_state {
  int dummy;
};
typedef int /*<<< orphan*/ int8_t;

/* Variables and functions */
int /*<<< orphan*/ emit1(struct jit_state *, int /*<<< orphan*/);
int /*<<< orphan*/ emit_alu32(struct jit_state *, int, int, int);
void emit_alu32_imm8(struct jit_state *state, int op, int src, int dst,
                     int8_t imm) {
  emit_alu32(state, op, src, dst);
  emit1(state, imm);
}


x86 assembly (clang, -O0):
<emit_alu32_imm8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
call   1040 <emit_alu32@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%esi
call   1030 <emit1@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_alu32_imm8>:
push   %rbp
push   %rbx
push   %rax
mov    %r8d,%ebp
mov    %rdi,%rbx
call   1040 <emit_alu32@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <emit1@plt>

LLVM IR (-O0):
%struct.jit_state = type { i32 }
define void @emit_alu32_imm8(%struct.jit_state* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca %struct.jit_state*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store %struct.jit_state* %0, %struct.jit_state** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load %struct.jit_state*, %struct.jit_state** %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = call i32 @emit_alu32(%struct.jit_state* %11, i32 %12, i32 %13, i32 %14)
%16 = load %struct.jit_state*, %struct.jit_state** %6
%17 = load i32, i32* %10
%18 = call i32 @emit1(%struct.jit_state* %16, i32 %17)
ret void
}

LLVM IR (-O2):
%struct.jit_state = type { i32 }
define void @emit_alu32_imm8(%struct.jit_state* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @emit_alu32(%struct.jit_state* %0, i32 %1, i32 %2, i32 %3)
%7 = tail call i32 @emit1(%struct.jit_state* %0, i32 %4)
ret void
}
void concat_32_to_64_reg(unsigned int s0, unsigned int s1,
                         unsigned long long *dst) {
  *dst =
      (unsigned long long)(((unsigned long long)s0 << (unsigned long long)32) |
                           (unsigned long long)s1);
}


x86 assembly (clang, -O0):
<concat_32_to_64_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
shl    $0x20,%rcx
mov    -0x8(%rbp),%eax
or     %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<concat_32_to_64_reg>:
shl    $0x20,%rdi
mov    %esi,%eax
or     %rdi,%rax
mov    %rax,(%rdx)
ret

LLVM IR (-O0):
define void @concat_32_to_64_reg(i32 %0, i32 %1, i64* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i64*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i64* %2, i64** %6
%7 = load i32, i32* %4
%8 = zext i32 %7 to i64
%9 = shl i64 %8, 32
%10 = load i32, i32* %5
%11 = zext i32 %10 to i64
%12 = or i64 %9, %11
%13 = load i64*, i64** %6
store i64 %12, i64* %13
ret void
}

LLVM IR (-O2):
define void @concat_32_to_64_reg(i32 %0, i32 %1, i64* nocapture writeonly %2) {
%4 = zext i32 %0 to i64
%5 = shl nuw i64 %4, 32
%6 = zext i32 %1 to i64
%7 = or i64 %5, %6
store i64 %7, i64* %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int /*<<< orphan*/ utf8_char_to_wchar(char const *, size_t);
size_t vifm_wcwidth(int /*<<< orphan*/ const);
size_t chrsw(const char str[], size_t char_width) {
  const wchar_t wide = utf8_char_to_wchar(str, char_width);
  const size_t result = vifm_wcwidth(wide);
  return (result == (size_t)-1) ? 1 : result;
}


x86 assembly (clang, -O0):
<chrsw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <utf8_char_to_wchar@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <vifm_wcwidth@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0xffffffffffffffff,-0x20(%rbp)
jne    1165 <chrsw+0x45>
mov    $0x1,%eax
mov    %rax,-0x28(%rbp)
jmp    116d <chrsw+0x4d>
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chrsw>:
push   %rax
call   1040 <utf8_char_to_wchar@plt>
mov    %eax,%edi
call   1030 <vifm_wcwidth@plt>
cmp    $0xffffffffffffffff,%rax
mov    $0x1,%ecx
cmove  %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @chrsw(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32
%6 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%7 = load i8*, i8** %3
%8 = load i64, i64* %4
%9 = call i32 @utf8_char_to_wchar(i8* %7, i64 %8)
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = call i64 @vifm_wcwidth(i32 %10)
store i64 %11, i64* %6
%12 = load i64, i64* %6
%13 = icmp eq i64 %12, -1
br i1 %13, label %14, label %15
14: ; preds = %2
br label %17
15: ; preds = %2
%16 = load i64, i64* %6
br label %17
17: ; preds = %15, %14
%18 = phi i64 [ 1, %14 ], [ %16, %15 ]
ret i64 %18
}

LLVM IR (-O2):
define i64 @chrsw(i8* %0, i64 %1) {
%3 = tail call i32 @utf8_char_to_wchar(i8* %0, i64 %1)
%4 = tail call i64 @vifm_wcwidth(i32 %3)
%5 = icmp eq i64 %4, -1
%6 = select i1 %5, i64 1, i64 %4
ret i64 %6
}
double abs_val(double value) {
  double result = value;
  if (value < 0)
    result = -value;
  return result;
}


x86 assembly (clang, -O0):
<abs_val>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1142 <abs_val+0x42>
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<abs_val>:
movapd 0xef8(%rip),%xmm2
xorpd  %xmm0,%xmm2
xorpd  %xmm3,%xmm3
movapd %xmm0,%xmm1
cmpltsd %xmm3,%xmm1
andpd  %xmm1,%xmm2
andnpd %xmm0,%xmm1
orpd   %xmm2,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @abs_val(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
store double %4, double* %3
%5 = load double, double* %2
%6 = fcmp olt double %5, 0.000000e+00
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load double, double* %2
%9 = fneg double %8
store double %9, double* %3
br label %10
10: ; preds = %7, %1
%11 = load double, double* %3
ret double %11
}

LLVM IR (-O2):
define double @abs_val(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = fneg double %0
%4 = select i1 %2, double %3, double %0
ret double %4
}
void ff_hevc_put_hevc_bi_w_epel_hv64_8_sse4() {}


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

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

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

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