xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ mill_yield(char *);
__attribute__((no)) void worker(long count) {
  long i;
  for (i = 0; i != count; ++i)
    mill_yield("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/dailypips/libmill/refs/heads/"
               "master/perf/ctxswitch.c"
               ":"
               "36");
}


x86 assembly (clang, -O0):
<worker>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x8(%rbp),%rax
je     114f <worker+0x3f>
lea    0xec7(%rip),%rdi
call   1030 <mill_yield@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <worker+0x14>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<worker>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     113e <worker+0x2e>
mov    %rdi,%rbx
lea    0xedd(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r14,%rdi
call   1030 <mill_yield@plt>
add    $0xffffffffffffffff,%rbx
jne    1130 <worker+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [146 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/dailypips/libmill/refs/heads/master/perf/ctxswitch.c:36\00"
define void @worker(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
store i64 0, i64* %3
br label %4
4: ; preds = %10, %1
%5 = load i64, i64* %3
%6 = load i64, i64* %2
%7 = icmp ne i64 %5, %6
br i1 %7, label %8, label %13
8: ; preds = %4
%9 = call i32 @mill_yield(i8* getelementptr inbounds ([146 x i8], [146 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8
%11 = load i64, i64* %3
%12 = add nsw i64 %11, 1
store i64 %12, i64* %3
br label %4
13: ; preds = %4
ret void
}

LLVM IR (-O2):
@.str = [146 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/dailypips/libmill/refs/heads/master/perf/ctxswitch.c:36\00"
define void @worker(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %6, %3 ], [ 0, %1 ]
%5 = tail call i32 @mill_yield(i8* getelementptr inbounds ([146 x i8], [146 x i8]* @.str, i64 0, i64 0))
%6 = add nuw nsw i64 %4, 1
%7 = icmp eq i64 %6, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t determ_abs_float(uint32_t a) { return a & 0x7FFFFFFF; }


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

x86 assembly (clang, -O2):
<determ_abs_float>:
mov    %edi,%eax
and    $0x7fffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @determ_abs_float(i32 %0) {
%2 = and i32 %0, 2147483647
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ lseek(int, int, int /*<<< orphan*/);
int read(int, char *, int);
int read_data(int f, char *buff, int len) {
  lseek(f, 0xb000, SEEK_SET);
  return read(f, buff, len);
}


x86 assembly (clang, -O0):
<read_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ea4(%rip),%rax
mov    (%rax),%edx
mov    $0xb000,%esi
call   1030 <lseek@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <read@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_data>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x2ead(%rip),%rax
mov    (%rax),%edx
mov    $0xb000,%esi
call   1030 <lseek@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14d,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <read@plt>

LLVM IR (-O0):
@SEEK_SET = global i32 0
define i32 @read_data(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* @SEEK_SET
%9 = call i32 @lseek(i32 %7, i32 45056, i32 %8)
%10 = load i32, i32* %4
%11 = load i8*, i8** %5
%12 = load i32, i32* %6
%13 = call i32 @read(i32 %10, i8* %11, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
@SEEK_SET = global i32 0
define i32 @read_data(i32 %0, i8* nocapture %1, i32 %2) {
%4 = load i32, i32* @SEEK_SET
%5 = tail call i32 @lseek(i32 %0, i32 45056, i32 %4)
%6 = tail call i32 @read(i32 %0, i8* %1, i32 %2)
ret i32 %6
}
/* Type definitions */
struct sched_dl_entity {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __dequeue_dl_entity(struct sched_dl_entity *);
void dequeue_dl_entity(struct sched_dl_entity *dl_se) {
  __dequeue_dl_entity(dl_se);
}


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

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

LLVM IR (-O0):
%struct.sched_dl_entity = type { i32 }
define void @dequeue_dl_entity(%struct.sched_dl_entity* %0) {
%2 = alloca %struct.sched_dl_entity*
store %struct.sched_dl_entity* %0, %struct.sched_dl_entity** %2
%3 = load %struct.sched_dl_entity*, %struct.sched_dl_entity** %2
%4 = call i32 @__dequeue_dl_entity(%struct.sched_dl_entity* %3)
ret void
}

LLVM IR (-O2):
%struct.sched_dl_entity = type { i32 }
define void @dequeue_dl_entity(%struct.sched_dl_entity* %0) {
%2 = tail call i32 @__dequeue_dl_entity(%struct.sched_dl_entity* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_format_info_set_channels() {
  printf("NOT IMPLEMENTED:"
         "pa_format_info_set_channels"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [45 x i8] c"NOT IMPLEMENTED:pa_format_info_set_channels\0A\00"
define i32 @pa_format_info_set_channels() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [44 x i8] c"NOT IMPLEMENTED:pa_format_info_set_channels\00"
define i32 @pa_format_info_set_channels() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
void RTZipBlockCompress(void) {}


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

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

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

LLVM IR (-O2):
define void @RTZipBlockCompress() {
ret void
}
float float_interpolate5(float v, float f0, float t0, float f1, float t1) {
  return t0 + ((v - f0) * (t1 - t0)) / (f1 - f0);
}


x86 assembly (clang, -O0):
<float_interpolate5>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  %xmm4,-0x14(%rbp)
movss  -0xc(%rbp),%xmm0
movss  -0x4(%rbp),%xmm1
subss  -0x8(%rbp),%xmm1
movss  -0x14(%rbp),%xmm2
subss  -0xc(%rbp),%xmm2
mulss  %xmm2,%xmm1
movss  -0x10(%rbp),%xmm2
subss  -0x8(%rbp),%xmm2
divss  %xmm2,%xmm1
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<float_interpolate5>:
subss  %xmm1,%xmm0
subss  %xmm2,%xmm4
mulss  %xmm4,%xmm0
subss  %xmm1,%xmm3
divss  %xmm3,%xmm0
addss  %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @float_interpolate5(float %0, float %1, float %2, float %3, float %4) {
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
store float %0, float* %6
store float %1, float* %7
store float %2, float* %8
store float %3, float* %9
store float %4, float* %10
%11 = load float, float* %8
%12 = load float, float* %6
%13 = load float, float* %7
%14 = fsub float %12, %13
%15 = load float, float* %10
%16 = load float, float* %8
%17 = fsub float %15, %16
%18 = fmul float %14, %17
%19 = load float, float* %9
%20 = load float, float* %7
%21 = fsub float %19, %20
%22 = fdiv float %18, %21
%23 = fadd float %11, %22
ret float %23
}

LLVM IR (-O2):
define float @float_interpolate5(float %0, float %1, float %2, float %3, float %4) {
%6 = fsub float %0, %1
%7 = fsub float %4, %2
%8 = fmul float %6, %7
%9 = fsub float %3, %1
%10 = fdiv float %8, %9
%11 = fadd float %10, %2
ret float %11
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_add_epi32(int /*<<< orphan*/, int /*<<< orphan*/);
int _mm_extract_epi32(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_srli_si128(int /*<<< orphan*/, int);
int sum_m128i_int(__m128i vec) {
  __m128i sum = _mm_add_epi32(vec, _mm_srli_si128(vec, 8));
  sum = _mm_add_epi32(sum, _mm_srli_si128(sum, 4));
  return _mm_extract_epi32(sum, 0);
}


x86 assembly (clang, -O0):
<sum_m128i_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x8,%esi
call   1050 <_mm_srli_si128@plt>
mov    -0x10(%rbp),%edi
mov    %eax,%esi
call   1040 <_mm_add_epi32@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x4,%esi
call   1050 <_mm_srli_si128@plt>
mov    -0xc(%rbp),%edi
mov    %eax,%esi
call   1040 <_mm_add_epi32@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
xor    %esi,%esi
call   1030 <_mm_extract_epi32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sum_m128i_int>:
push   %rbx
mov    %edi,%ebx
mov    $0x8,%esi
call   1050 <_mm_srli_si128@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1040 <_mm_add_epi32@plt>
mov    %eax,%ebx
mov    %eax,%edi
mov    $0x4,%esi
call   1050 <_mm_srli_si128@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1040 <_mm_add_epi32@plt>
mov    %eax,%edi
xor    %esi,%esi
pop    %rbx
jmp    1030 <_mm_extract_epi32@plt>

LLVM IR (-O0):
define i32 @sum_m128i_int(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* %2
%6 = call i32 @_mm_srli_si128(i32 %5, i32 8)
%7 = call i32 @_mm_add_epi32(i32 %4, i32 %6)
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = load i32, i32* %3
%10 = call i32 @_mm_srli_si128(i32 %9, i32 4)
%11 = call i32 @_mm_add_epi32(i32 %8, i32 %10)
store i32 %11, i32* %3
%12 = load i32, i32* %3
%13 = call i32 @_mm_extract_epi32(i32 %12, i32 0)
ret i32 %13
}

LLVM IR (-O2):
define i32 @sum_m128i_int(i32 %0) {
%2 = tail call i32 @_mm_srli_si128(i32 %0, i32 8)
%3 = tail call i32 @_mm_add_epi32(i32 %0, i32 %2)
%4 = tail call i32 @_mm_srli_si128(i32 %3, i32 4)
%5 = tail call i32 @_mm_add_epi32(i32 %3, i32 %4)
%6 = tail call i32 @_mm_extract_epi32(i32 %5, i32 0)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
void *malloc(unsigned int);
int /*<<< orphan*/ stderr;
void *myMalloc(unsigned int size) {
  void *ptr;
  ptr = malloc(size);
  if (ptr == NULL) {
    fprintf(stderr, "Not enough memory");
    exit(-1);
  }
  return ptr;
}


x86 assembly (clang, -O0):
<myMalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1171 <myMalloc+0x41>
mov    0x2e87(%rip),%rax
mov    (%rax),%edi
lea    0xe9e(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myMalloc>:
push   %rax
call   1040 <malloc@plt>
test   %rax,%rax
je     113d <myMalloc+0xd>
pop    %rcx
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [18 x i8] c"Not enough memory\00"
define i8* @myMalloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @exit(i32 -1)
unreachable
12: ; preds = %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [18 x i8] c"Not enough memory\00"
define noalias i8* @myMalloc(i32 %0) {
%2 = tail call i8* @malloc(i32 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 -1)
unreachable
8: ; preds = %1
ret i8* %2
}
/* Variables and functions */
int rand();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int acao() {
  int Ndado;
  Ndado = 0;
  srand(time(NULL));
  Ndado = rand() % 20;
  return Ndado;
}


x86 assembly (clang, -O0):
<acao>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%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    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<acao>:
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   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @acao() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @time(i32* null)
%3 = call i32 @srand(i32 %2)
%4 = call i32 (...) @rand()
%5 = srem i32 %4, 20
store i32 %5, i32* %1
%6 = load i32, i32* %1
ret i32 %6
}

LLVM IR (-O2):
define i32 @acao() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
%3 = tail call i32 (...) @rand()
%4 = srem i32 %3, 20
ret i32 %4
}
int test_nested4_1(int barfoo) { return barfoo; }


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

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

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

LLVM IR (-O2):
define i32 @test_nested4_1(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, void *);
int /*<<< orphan*/ stderr;
void rtpp_stream_get_rem_addr_fin(void *pub) {
  fprintf(stderr,
          "Method rtpp_stream@%p::get_rem_addr (rtpp_stream_get_rem_addr) is "
          "invoked after destruction\x0a",
          pub);
  abort();
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [93 x i8] c"Method rtpp_stream@%p::get_rem_addr (rtpp_stream_get_rem_addr) is invoked after destruction\0A\00"
define void @rtpp_stream_get_rem_addr_fin(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([93 x i8], [93 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [93 x i8] c"Method rtpp_stream@%p::get_rem_addr (rtpp_stream_get_rem_addr) is invoked after destruction\0A\00"
define void @rtpp_stream_get_rem_addr_fin(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([93 x i8], [93 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @abort()
unreachable
}
int test_imm_DEint64_midword_mem(long long *val) {
  return ((*val >> 16) & (0xDE << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_DEint64_midword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = ashr i64 %4, 16
%6 = and i64 %5, 222
%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_DEint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 14548992
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int test_imm_4Euint64_lowword_reg(unsigned long long val) {
  return ((val) & (0x4E << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_4Euint64_lowword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 78
%5 = icmp ne i64 %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_4Euint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 78
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
double fmod(double, int);
double fix_ang(double ang) {
  ang = fmod(ang, 360.);
  if (ang < 0.)
    ang += 360.;
  return (ang);
}


x86 assembly (clang, -O0):
<fix_ang>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x168,%edi
call   1030 <fmod@plt>
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1151 <fix_ang+0x41>
movsd  0xeb9(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fix_ang>:
push   %rax
mov    $0x168,%edi
call   1030 <fmod@plt>
movsd  0xedd(%rip),%xmm2
addsd  %xmm0,%xmm2
xorpd  %xmm3,%xmm3
movapd %xmm0,%xmm1
cmpltsd %xmm3,%xmm1
andpd  %xmm1,%xmm2
andnpd %xmm0,%xmm1
orpd   %xmm2,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @fix_ang(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @fmod(double %3, i32 360)
store double %4, double* %2
%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 = fadd double %8, 3.600000e+02
store double %9, double* %2
br label %10
10: ; preds = %7, %1
%11 = load double, double* %2
ret double %11
}

LLVM IR (-O2):
define double @fix_ang(double %0) {
%2 = tail call double @fmod(double %0, i32 360)
%3 = fcmp olt double %2, 0.000000e+00
%4 = fadd double %2, 3.600000e+02
%5 = select i1 %3, double %4, double %2
ret double %5
}
/* Type definitions */
struct evbuffer {
  int dummy;
};
struct bufferevent {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ bufferevent_free(struct bufferevent *);
struct evbuffer *bufferevent_get_output(struct bufferevent *);
scalar_t__ evbuffer_get_length(struct evbuffer *);
void close_on_finished_writecb(struct bufferevent *bev, void *ctx) {
  struct evbuffer *b = bufferevent_get_output(bev);
  if (evbuffer_get_length(b) == 0) {
    bufferevent_free(bev);
  }
}


x86 assembly (clang, -O0):
<close_on_finished_writecb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <bufferevent_get_output@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <evbuffer_get_length@plt>
cmp    $0x0,%rax
jne    1169 <close_on_finished_writecb+0x39>
mov    -0x8(%rbp),%rdi
call   1050 <bufferevent_free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<close_on_finished_writecb>:
push   %rbx
mov    %rdi,%rbx
call   1030 <bufferevent_get_output@plt>
mov    %rax,%rdi
call   1040 <evbuffer_get_length@plt>
test   %rax,%rax
je     1148 <close_on_finished_writecb+0x18>
pop    %rbx
ret
mov    %rbx,%rdi
pop    %rbx
jmp    1050 <bufferevent_free@plt>

LLVM IR (-O0):
%struct.bufferevent = type { i32 }
%struct.evbuffer = type { i32 }
define void @close_on_finished_writecb(%struct.bufferevent* %0, i8* %1) {
%3 = alloca %struct.bufferevent*
%4 = alloca i8*
%5 = alloca %struct.evbuffer*
store %struct.bufferevent* %0, %struct.bufferevent** %3
store i8* %1, i8** %4
%6 = load %struct.bufferevent*, %struct.bufferevent** %3
%7 = call %struct.evbuffer* @bufferevent_get_output(%struct.bufferevent* %6)
store %struct.evbuffer* %7, %struct.evbuffer** %5
%8 = load %struct.evbuffer*, %struct.evbuffer** %5
%9 = call i64 @evbuffer_get_length(%struct.evbuffer* %8)
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %2
%12 = load %struct.bufferevent*, %struct.bufferevent** %3
%13 = call i32 @bufferevent_free(%struct.bufferevent* %12)
br label %14
14: ; preds = %11, %2
ret void
}

LLVM IR (-O2):
%struct.bufferevent = type { i32 }
%struct.evbuffer = type { i32 }
define void @close_on_finished_writecb(%struct.bufferevent* %0, i8* nocapture readnone %1) {
%3 = tail call %struct.evbuffer* @bufferevent_get_output(%struct.bufferevent* %0)
%4 = tail call i64 @evbuffer_get_length(%struct.evbuffer* %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @bufferevent_free(%struct.bufferevent* %0)
br label %8
8: ; preds = %6, %2
ret void
}
long f() { return 0; }


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

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

LLVM IR (-O0):
define i64 @f() {
ret i64 0
}

LLVM IR (-O2):
define i64 @f() {
ret i64 0
}
/* Variables and functions */
int /*<<< orphan*/ xx(char *, char *, int /*<<< orphan*/, int /*<<< orphan*/,
                      int /*<<< orphan*/, int);
void n(char *pattern, char *str) { xx(pattern, str, 0, 0, 0, 1); }


x86 assembly (clang, -O0):
<n>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
xor    %r8d,%r8d
mov    $0x1,%r9d
mov    %r8d,%edx
mov    %r8d,%ecx
call   1030 <xx@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<n>:
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
mov    $0x1,%r9d
jmp    1030 <xx@plt>

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

LLVM IR (-O2):
define void @n(i8* %0, i8* %1) {
%3 = tail call i32 @xx(i8* %0, i8* %1, i32 0, i32 0, i32 0, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ is_name(char);
int is_validname(char *name) {
  char *p;
  for (p = name; *p != '\0'; p++) {
    if (!is_name(*p))
      return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<is_validname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     116b <is_validname+0x5b>
mov    -0x18(%rbp),%rax
movsbl (%rax),%edi
call   1030 <is_name@plt>
cmp    $0x0,%eax
jne    1155 <is_validname+0x45>
movl   $0x0,-0x4(%rbp)
jmp    1172 <is_validname+0x62>
jmp    115a <is_validname+0x4a>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1124 <is_validname+0x14>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_validname>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%al
mov    $0x1,%ebp
test   %al,%al
je     114b <is_validname+0x3b>
mov    %rdi,%rbx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nop
movsbl %al,%edi
call   1030 <is_name@plt>
test   %eax,%eax
je     1149 <is_validname+0x39>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <is_validname+0x20>
jmp    114b <is_validname+0x3b>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @is_validname(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %7
4: ; preds = %7
%5 = load i8, i8* %12
%6 = icmp eq i8 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %1, %4
%8 = phi i8 [ %5, %4 ], [ %2, %1 ]
%9 = phi i8* [ %12, %4 ], [ %0, %1 ]
%10 = tail call i32 @is_name(i8 signext %8)
%11 = icmp eq i32 %10, 0
%12 = getelementptr inbounds i8, i8* %9, i64 1
br i1 %11, label %13, label %4
13: ; preds = %7, %4, %1
%14 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %7 ]
ret i32 %14
}
int __default_cmp_func(const void *_a, const void *_b) {
  return _a > _b ? (-1) : _a == _b ? (0) : (1);
}


x86 assembly (clang, -O0):
<__default_cmp_func>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jbe    1127 <__default_cmp_func+0x27>
mov    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    113f <__default_cmp_func+0x3f>
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rsi
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    %rsi,%rdx
cmove  %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__default_cmp_func>:
xor    %ecx,%ecx
cmp    %rsi,%rdi
setne  %cl
mov    $0xffffffff,%eax
cmovbe %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @__default_cmp_func(i8* readnone %0, i8* readnone %1) {
%3 = icmp ugt i8* %0, %1
%4 = icmp ne i8* %0, %1
%5 = zext i1 %4 to i32
%6 = select i1 %3, i32 -1, i32 %5
ret i32 %6
}
void gtk_curve_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_curve_get_type() {
ret void
}
int power(int a, int b) {
  int result = 1;
  while (b != 0) {
    if (b % 2) {
      result = result * a;
      b--;
    } else {
      result = result * result;
      b = b / 2;
    }
  }
  return result;
}


x86 assembly (clang, -O0):
<power>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1164 <power+0x64>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1147 <power+0x47>
mov    -0xc(%rbp),%eax
imul   -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    115f <power+0x5f>
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
jmp    1111 <power+0x11>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<power>:
mov    $0x1,%eax
test   %esi,%esi
jne    111c <power+0x1c>
jmp    1136 <power+0x36>
nopl   0x0(%rax,%rax,1)
add    $0xffffffff,%esi
mov    %edi,%ecx
imul   %edi,%eax
test   %esi,%esi
je     1136 <power+0x36>
test   $0x1,%sil
jne    1110 <power+0x10>
mov    %esi,%ecx
shr    $0x1f,%ecx
add    %esi,%ecx
sar    %ecx
mov    %ecx,%esi
mov    %eax,%ecx
imul   %eax,%eax
test   %esi,%esi
jne    111c <power+0x1c>
ret

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

LLVM IR (-O2):
define i32 @power(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %18, label %4
4: ; preds = %2, %13
%5 = phi i32 [ %16, %13 ], [ 1, %2 ]
%6 = phi i32 [ %14, %13 ], [ %1, %2 ]
%7 = and i32 %6, 1
%8 = icmp eq i32 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %4
%10 = add nsw i32 %6, -1
br label %13
11: ; preds = %4
%12 = sdiv i32 %6, 2
br label %13
13: ; preds = %11, %9
%14 = phi i32 [ %10, %9 ], [ %12, %11 ]
%15 = phi i32 [ %0, %9 ], [ %5, %11 ]
%16 = mul nsw i32 %15, %5
%17 = icmp eq i32 %14, 0
br i1 %17, label %18, label %4
18: ; preds = %13, %2
%19 = phi i32 [ 1, %2 ], [ %16, %13 ]
ret i32 %19
}
void SIO1_pause(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @synchronize_sched() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void digitalWrite(int pin, int value) {
  printf("digitalWrite: pin=%d, value=%d\n", pin, value);
}


x86 assembly (clang, -O0):
<digitalWrite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [32 x i8] c"digitalWrite: pin=%d, value=%d\0A\00"
define void @digitalWrite(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ markAndProcessInterpreterRegisters();
int /*<<< orphan*/ markAndProcessObjectPointer(int);
int /*<<< orphan*/ markAndProcessVmRegisters();
void markPhase() {
  markAndProcessVmRegisters();
  markAndProcessInterpreterRegisters();
  markAndProcessObjectPointer((30 << 2));
}


x86 assembly (clang, -O0):
<markPhase>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <markAndProcessVmRegisters@plt>
mov    $0x0,%al
call   1050 <markAndProcessInterpreterRegisters@plt>
mov    $0x78,%edi
call   1040 <markAndProcessObjectPointer@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<markPhase>:
push   %rax
xor    %eax,%eax
call   1030 <markAndProcessVmRegisters@plt>
xor    %eax,%eax
call   1050 <markAndProcessInterpreterRegisters@plt>
mov    $0x78,%edi
pop    %rax
jmp    1040 <markAndProcessObjectPointer@plt>

LLVM IR (-O0):
define void @markPhase() {
%1 = call i32 (...) @markAndProcessVmRegisters()
%2 = call i32 (...) @markAndProcessInterpreterRegisters()
%3 = call i32 @markAndProcessObjectPointer(i32 120)
ret void
}

LLVM IR (-O2):
define void @markPhase() {
%1 = tail call i32 (...) @markAndProcessVmRegisters()
%2 = tail call i32 (...) @markAndProcessInterpreterRegisters()
%3 = tail call i32 @markAndProcessObjectPointer(i32 120)
ret void
}
/* Type definitions */
struct connection {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ Done(int /*<<< orphan*/);
void GotLogout(struct connection *c, char *d) { Done(0); }


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

x86 assembly (clang, -O2):
<GotLogout>:
xor    %edi,%edi
jmp    1030 <Done@plt>

LLVM IR (-O0):
%struct.connection = type { i32 }
define void @GotLogout(%struct.connection* %0, i8* %1) {
%3 = alloca %struct.connection*
%4 = alloca i8*
store %struct.connection* %0, %struct.connection** %3
store i8* %1, i8** %4
%5 = call i32 @Done(i32 0)
ret void
}

LLVM IR (-O2):
%struct.connection = type { i32 }
define void @GotLogout(%struct.connection* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i32 @Done(i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;
typedef int /*<<< orphan*/ locale_t;

/* Variables and functions */
int iswblank(int /*<<< orphan*/);
int __iswblank_l(wint_t c, locale_t l) { return iswblank(c); }


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

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

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

LLVM IR (-O2):
define i32 @__iswblank_l(i32 %0, i32 %1) {
%3 = tail call i32 @iswblank(i32 %0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, char *);
int /*<<< orphan*/ setLower(char *);
char *strCheck(char *);
int main(int argc, char *argv[]) {
  char buf[512];
  scanf("%s", buf);
  setLower(buf);
  printf("%s", strCheck(buf));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x210(%rbp),%rsi
lea    0xe99(%rip),%rdi
call   1060 <scanf@plt>
lea    -0x210(%rbp),%rdi
call   1030 <setLower@plt>
lea    -0x210(%rbp),%rdi
call   1040 <strCheck@plt>
mov    %rax,%rsi
lea    0xe72(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x208,%rsp
lea    0xeaf(%rip),%r14
mov    %rsp,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1060 <scanf@plt>
mov    %rbx,%rdi
call   1030 <setLower@plt>
mov    %rbx,%rdi
call   1040 <strCheck@plt>
mov    %r14,%rdi
mov    %rax,%rsi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x208,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [512 x i8]
%4 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @setLower(i8* %4)
%7 = call i8* @strCheck(i8* %4)
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ DrawBMP227(unsigned long);
void drawbmp(unsigned long c) { DrawBMP227(c); }


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

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

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

LLVM IR (-O2):
define void @drawbmp(i64 %0) {
%2 = tail call i32 @DrawBMP227(i64 %0)
ret void
}
/* Variables and functions */
const char *get_region_name_PS(int region_code) {
  switch (region_code) {
  case 1131:
    return "Gaza";
  case 1798:
    return "West Bank";
  default:
    return NULL;
  }
}


x86 assembly (clang, -O0):
<get_region_name_PS>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
sub    $0x46b,%eax
je     1130 <get_region_name_PS+0x30>
jmp    111d <get_region_name_PS+0x1d>
mov    -0x10(%rbp),%eax
sub    $0x706,%eax
je     1140 <get_region_name_PS+0x40>
jmp    1150 <get_region_name_PS+0x50>
lea    0xec9(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1158 <get_region_name_PS+0x58>
lea    0xebe(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1158 <get_region_name_PS+0x58>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_region_name_PS>:
xor    %ecx,%ecx
cmp    $0x706,%edi
lea    0xef6(%rip),%rax
cmove  %rax,%rcx
cmp    $0x46b,%edi
lea    0xee0(%rip),%rax
cmovne %rcx,%rax
ret

LLVM IR (-O0):
@.str = [5 x i8] c"Gaza\00"
@.str.1 = [10 x i8] c"West Bank\00"
define i8* @get_region_name_PS(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %7 [
i32 1131, label %5
i32 1798, label %6
]
5: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %2
br label %8
6: ; preds = %1
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %8
7: ; preds = %1
store i8* null, i8** %2
br label %8
8: ; preds = %7, %6, %5
%9 = load i8*, i8** %2
ret i8* %9
}

LLVM IR (-O2):
@.str = [5 x i8] c"Gaza\00"
@.str.1 = [10 x i8] c"West Bank\00"
define i8* @get_region_name_PS(i32 %0) {
%2 = icmp eq i32 %0, 1798
%3 = select i1 %2, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* null
%4 = icmp eq i32 %0, 1131
%5 = select i1 %4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %3
ret i8* %5
}
void foo(void) {
  unsigned int i;
#pragma acc kernels
  { i++; }
}


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

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

LLVM IR (-O0):
define void @foo() {
%1 = alloca i32
%2 = load i32, i32* %1
%3 = add i32 %2, 1
store i32 %3, i32* %1
ret void
}

LLVM IR (-O2):
define void @foo() {
ret void
}
void cvt_d_w(int *source, double *dest) { *dest = *source; }


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

x86 assembly (clang, -O2):
<cvt_d_w>:
cvtsi2sdl (%rdi),%xmm0
movsd  %xmm0,(%rsi)
ret

LLVM IR (-O0):
define void @cvt_d_w(i32* %0, double* %1) {
%3 = alloca i32*
%4 = alloca double*
store i32* %0, i32** %3
store double* %1, double** %4
%5 = load i32*, i32** %3
%6 = load i32, i32* %5
%7 = sitofp i32 %6 to double
%8 = load double*, double** %4
store double %7, double* %8
ret void
}

LLVM IR (-O2):
define void @cvt_d_w(i32* nocapture %0, double* nocapture writeonly %1) {
%3 = load i32, i32* %0
%4 = sitofp i32 %3 to double
store double %4, double* %1
ret void
}
/* Variables and functions */
long syscall(int, int, int, int *, int /*<<< orphan*/ *, int /*<<< orphan*/ *);
long scallinfo_s(int scinum, int pid) {
  if (scinum == 0)
    return -1;
  return syscall(323, scinum, pid, (int *)NULL, NULL, NULL);
}


x86 assembly (clang, -O0):
<scallinfo_s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1135 <scallinfo_s+0x25>
movq   $0xffffffffffffffff,-0x8(%rbp)
ff
jmp    1154 <scallinfo_s+0x44>
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    $0x143,%edi
xor    %eax,%eax
mov    %eax,%r9d
mov    %r9,%rcx
mov    %r9,%r8
call   1030 <syscall@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scallinfo_s>:
test   %edi,%edi
je     112a <scallinfo_s+0x1a>
mov    %esi,%edx
mov    %edi,%esi
mov    $0x143,%edi
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
jmp    1030 <syscall@plt>
mov    $0xffffffffffffffff,%rax
ret

LLVM IR (-O0):
define i64 @scallinfo_s(i32 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %2
store i64 -1, i64* %3
br label %13
9: ; preds = %2
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = call i64 @syscall(i32 323, i32 %10, i32 %11, i32* null, i32* null, i32* null)
store i64 %12, i64* %3
br label %13
13: ; preds = %9, %8
%14 = load i64, i64* %3
ret i64 %14
}

LLVM IR (-O2):
define i64 @scallinfo_s(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i64 @syscall(i32 323, i32 %0, i32 %1, i32* null, i32* null, i32* null)
br label %6
6: ; preds = %2, %4
%7 = phi i64 [ %5, %4 ], [ -1, %2 ]
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, double);
double sumf(int, double, double, double, double);
int sumi(int, int, int, int, int);
int main(void) {
  printf("%d %.1f", sumi(4, 1, 3, 5, 7), sumf(4, 2.0, 4.0, 6.0, 8.0));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x4,%edi
mov    $0x1,%esi
mov    $0x3,%edx
mov    $0x5,%ecx
mov    $0x7,%r8d
call   1040 <sumi@plt>
mov    %eax,-0x8(%rbp)
mov    $0x4,%edi
movsd  0xe92(%rip),%xmm0
movsd  0xe92(%rip),%xmm1
movsd  0xe92(%rip),%xmm2
movsd  0xe92(%rip),%xmm3
call   1050 <sumf@plt>
mov    -0x8(%rbp),%esi
lea    0xe8b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x4,%edi
mov    $0x1,%esi
mov    $0x3,%edx
mov    $0x5,%ecx
mov    $0x7,%r8d
call   1040 <sumi@plt>
mov    %eax,%ebx
movsd  0xea6(%rip),%xmm0
movsd  0xea6(%rip),%xmm1
movsd  0xea6(%rip),%xmm2
movsd  0xea6(%rip),%xmm3
mov    $0x4,%edi
call   1050 <sumf@plt>
lea    0xe9d(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"%d %.1f\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @sumi(i32 4, i32 1, i32 3, i32 5, i32 7)
%3 = call double @sumf(i32 4, double 2.000000e+00, double 4.000000e+00, double 6.000000e+00, double 8.000000e+00)
%4 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %2, double %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"%d %.1f\00"
define i32 @main() {
%1 = tail call i32 @sumi(i32 4, i32 1, i32 3, i32 5, i32 7)
%2 = tail call double @sumf(i32 4, double 2.000000e+00, double 4.000000e+00, double 6.000000e+00, double 8.000000e+00)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %1, double %2)
ret i32 0
}
void _ttywrch(__attribute__((unused)) int ch) {}


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

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

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

LLVM IR (-O2):
define void @_ttywrch(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ err(int, char *);
scalar_t__ fchmod(int, int);
void newmode(int m) {
  if (fchmod(2, m) < 0)
    err(1, "cannot change mode");
}


x86 assembly (clang, -O0):
<newmode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x2,%edi
call   1040 <fchmod@plt>
cmp    $0x0,%rax
jge    1153 <newmode+0x33>
mov    $0x1,%edi
lea    0xeb2(%rip),%rsi
call   1030 <err@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<newmode>:
push   %rax
mov    %edi,%esi
mov    $0x2,%edi
call   1040 <fchmod@plt>
test   %rax,%rax
js     1134 <newmode+0x14>
pop    %rax
ret
lea    0xec5(%rip),%rsi
mov    $0x1,%edi
pop    %rax
jmp    1030 <err@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"cannot change mode\00"
define void @newmode(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @fchmod(i32 2, i32 %3)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @err(i32 1, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"cannot change mode\00"
define void @newmode(i32 %0) {
%2 = tail call i64 @fchmod(i32 2, i32 %0)
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @err(i32 1, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret void
}
void gtk_misc_set_padding() {}


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

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

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

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