xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ assert(int);
void *ClearMem(void *buf, const unsigned char fill, const size_t sz) {
  size_t idx = 0;
  assert(buf != NULL);
  assert(sz > 0);
  for (idx = 0; idx < sz; ++idx) {
    ((char *)buf)[idx] = fill;
  }
  return buf;
}


x86 assembly (clang, -O0):
<ClearMem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpq   $0x0,-0x18(%rbp)
seta   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    1187 <ClearMem+0x77>
mov    -0x9(%rbp),%dl
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    115a <ClearMem+0x4a>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ClearMem>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %esi,%ebp
mov    %rdi,%r14
xor    %edi,%edi
test   %r14,%r14
setne  %dil
call   1040 <assert@plt>
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1040 <assert@plt>
test   %rbx,%rbx
je     115c <ClearMem+0x3c>
movzbl %bpl,%esi
mov    %r14,%rdi
mov    %rbx,%rdx
call   1030 <memset@plt>
mov    %r14,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i8* @ClearMem(i8* %0, i8 zeroext %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i64
%7 = alloca i64
store i8* %0, i8** %4
store i8 %1, i8* %5
store i64 %2, i64* %6
store i64 0, i64* %7
%8 = load i8*, i8** %4
%9 = icmp ne i8* %8, null
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
%12 = load i64, i64* %6
%13 = icmp ugt i64 %12, 0
%14 = zext i1 %13 to i32
%15 = call i32 @assert(i32 %14)
store i64 0, i64* %7
br label %16
16: ; preds = %25, %3
%17 = load i64, i64* %7
%18 = load i64, i64* %6
%19 = icmp ult i64 %17, %18
br i1 %19, label %20, label %28
20: ; preds = %16
%21 = load i8, i8* %5
%22 = load i8*, i8** %4
%23 = load i64, i64* %7
%24 = getelementptr inbounds i8, i8* %22, i64 %23
store i8 %21, i8* %24
br label %25
25: ; preds = %20
%26 = load i64, i64* %7
%27 = add i64 %26, 1
store i64 %27, i64* %7
br label %16
28: ; preds = %16
%29 = load i8*, i8** %4
ret i8* %29
}

LLVM IR (-O2):
define i8* @ClearMem(i8* returned writeonly %0, i8 zeroext %1, i64 %2) {
%4 = icmp ne i8* %0, null
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = icmp ne i64 %2, 0
%8 = zext i1 %7 to i32
%9 = tail call i32 @assert(i32 %8)
%10 = icmp eq i64 %2, 0
br i1 %10, label %12, label %11
11: ; preds = %3
br label %12
12: ; preds = %11, %3
ret i8* %0
}
int GetCharsNotDash(char *string) {
  static int count;
  static char *ptr;
  for (count = 0, ptr = string; *ptr != '\0'; ptr++) {
    if (*ptr != '-')
      count++;
  }
  return count;
}


x86 assembly (clang, -O0):
<GetCharsNotDash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,0x2f16(%rip)
mov    -0x8(%rbp),%rax
mov    %rax,0x2f13(%rip)
mov    0x2f0c(%rip),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     116e <GetCharsNotDash+0x6e>
mov    0x2ef9(%rip),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
je     1152 <GetCharsNotDash+0x52>
mov    0x2edf(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2ed6(%rip)
jmp    1157 <GetCharsNotDash+0x57>
mov    0x2ed2(%rip),%rax
add    $0x1,%rax
mov    %rax,0x2ec7(%rip)
jmp    111d <GetCharsNotDash+0x1d>
mov    0x2eb4(%rip),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetCharsNotDash>:
xor    %eax,%eax
jmp    1114 <GetCharsNotDash+0x14>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%rdi
movzbl (%rdi),%ecx
cmp    $0x2d,%cl
je     1110 <GetCharsNotDash+0x10>
test   %cl,%cl
je     1125 <GetCharsNotDash+0x25>
add    $0x1,%eax
jmp    1110 <GetCharsNotDash+0x10>
ret

LLVM IR (-O0):
@GetCharsNotDash.count = internal global i32 0
@GetCharsNotDash.ptr = internal global i8* null
define i32 @GetCharsNotDash(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
store i32 0, i32* @GetCharsNotDash.count
%3 = load i8*, i8** %2
store i8* %3, i8** @GetCharsNotDash.ptr
br label %4
4: ; preds = %18, %1
%5 = load i8*, i8** @GetCharsNotDash.ptr
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %21
9: ; preds = %4
%10 = load i8*, i8** @GetCharsNotDash.ptr
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp ne i32 %12, 45
br i1 %13, label %14, label %17
14: ; preds = %9
%15 = load i32, i32* @GetCharsNotDash.count
%16 = add nsw i32 %15, 1
store i32 %16, i32* @GetCharsNotDash.count
br label %17
17: ; preds = %14, %9
br label %18
18: ; preds = %17
%19 = load i8*, i8** @GetCharsNotDash.ptr
%20 = getelementptr inbounds i8, i8* %19, i32 1
store i8* %20, i8** @GetCharsNotDash.ptr
br label %4
21: ; preds = %4
%22 = load i32, i32* @GetCharsNotDash.count
ret i32 %22
}

LLVM IR (-O2):
define i32 @GetCharsNotDash(i8* %0) {
br label %2
2: ; preds = %8, %1
%3 = phi i32 [ 0, %1 ], [ %9, %8 ]
%4 = phi i8* [ %0, %1 ], [ %10, %8 ]
%5 = load i8, i8* %4
switch i8 %5, label %6 [
i8 0, label %11
i8 45, label %8
]
6: ; preds = %2
%7 = add nsw i32 %3, 1
br label %8
8: ; preds = %2, %6
%9 = phi i32 [ %3, %2 ], [ %7, %6 ]
%10 = getelementptr inbounds i8, i8* %4, i64 1
br label %2
11: ; preds = %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ e_umld(int, int);
void co__mld(int mr, int vr) { e_umld(mr, vr); }


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

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

LLVM IR (-O0):
define void @co__mld(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 @e_umld(i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @co__mld(i32 %0, i32 %1) {
%3 = tail call i32 @e_umld(i32 %0, i32 %1)
ret void
}
int test_imm_A2int32_mem(int *val) {
  return ((*val) & (0xA2 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_A2int32_mem(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 162
%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_A2int32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 162
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void worker_example_deinit(void *ctx) { return; }


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

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

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

LLVM IR (-O2):
define void @worker_example_deinit(i8* nocapture %0) {
ret void
}
/* Variables and functions */
char const *strchr(char const *, int);
const char *g_strchr(const char *text, int c) {
  if (text == 0) {
    return 0;
  }
  return strchr(text, c);
}


x86 assembly (clang, -O0):
<g_strchr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1137 <g_strchr+0x27>
movq   $0x0,-0x8(%rbp)
jmp    1147 <g_strchr+0x37>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <strchr@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g_strchr>:
test   %rdi,%rdi
je     111a <g_strchr+0xa>
jmp    1030 <strchr@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @g_strchr(i8* %0, i32 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i8* @strchr(i8* %0, i32 %1)
br label %6
6: ; preds = %2, %4
%7 = phi i8* [ %5, %4 ], [ null, %2 ]
ret i8* %7
}
/* Type definitions */
struct timeval {
  int tv_usec;
  int tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int /*<<< orphan*/ srand(int);
void rat_lib_random_init(void) {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  srand(tv.tv_usec * tv.tv_sec);
  return;
}


x86 assembly (clang, -O0):
<rat_lib_random_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
mov    -0x8(%rbp),%edi
imul   -0x4(%rbp),%edi
call   1040 <srand@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rat_lib_random_init>:
push   %rax
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
mov    0x4(%rsp),%edi
imul   (%rsp),%edi
pop    %rax
jmp    1040 <srand@plt>

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
define void @rat_lib_random_init() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load i32, i32* %3
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%6 = load i32, i32* %5
%7 = mul nsw i32 %4, %6
%8 = call i32 @srand(i32 %7)
ret void
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
define void @rat_lib_random_init() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load i32, i32* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%7 = load i32, i32* %6
%8 = mul nsw i32 %7, %5
%9 = tail call i32 @srand(i32 %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcmp(char const *, char const *);
int strlen(char const *);
int strend(const char *s, const char *t) {
  return !strcmp(s + strlen(s) - strlen(t), t);
}


x86 assembly (clang, -O0):
<strend>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x18(%rbp),%rdi
movslq %eax,%rcx
xor    %eax,%eax
sub    %rcx,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strend>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
call   1030 <strlen@plt>
movslq %eax,%rbx
add    %r15,%rbx
mov    %r14,%rdi
call   1030 <strlen@plt>
cltq
sub    %rax,%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <strcmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @strend(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** %3
%7 = call i32 @strlen(i8* %6)
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %5, i64 %8
%10 = load i8*, i8** %4
%11 = call i32 @strlen(i8* %10)
%12 = sext i32 %11 to i64
%13 = sub i64 0, %12
%14 = getelementptr inbounds i8, i8* %9, i64 %13
%15 = load i8*, i8** %4
%16 = call i32 @strcmp(i8* %14, i8* %15)
%17 = icmp ne i32 %16, 0
%18 = xor i1 %17, true
%19 = zext i1 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
define i32 @strend(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = tail call i32 @strlen(i8* %1)
%7 = sext i32 %6 to i64
%8 = sub nsw i64 0, %7
%9 = getelementptr inbounds i8, i8* %5, i64 %8
%10 = tail call i32 @strcmp(i8* dereferenceable(1) %9, i8* dereferenceable(1) %1)
%11 = icmp eq i32 %10, 0
%12 = zext i1 %11 to i32
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_authkey_load_auto() {
  printf("NOT IMPLEMENTED:"
         "pa_authkey_load_auto"
         "\n");
}


x86 assembly (clang, -O0):
<pa_authkey_load_auto>:
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_authkey_load_auto>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@str = [37 x i8] c"NOT IMPLEMENTED:pa_authkey_load_auto\00"
define i32 @pa_authkey_load_auto() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
void destroy_matrix(double **a, int size) {
  int i = 0;
  for (i = 0; i < size; i = i + 1) {
    free(a[i]);
  }
  free(a);
}


x86 assembly (clang, -O0):
<destroy_matrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1158 <destroy_matrix+0x48>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    112d <destroy_matrix+0x1d>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<destroy_matrix>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
jle    1142 <destroy_matrix+0x32>
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <destroy_matrix+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @destroy_matrix(double** %0, i32 %1) {
%3 = alloca double**
%4 = alloca i32
%5 = alloca i32
store double** %0, double*** %3
store i32 %1, i32* %4
store i32 0, i32* %5
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load double**, double*** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds double*, double** %11, i64 %13
%15 = load double*, double** %14
%16 = bitcast double* %15 to i8*
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
%21 = load double**, double*** %3
%22 = bitcast double** %21 to i8*
ret void
}

LLVM IR (-O2):
define void @destroy_matrix(double** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds double*, double** %0, i64 %7
%9 = bitcast double** %8 to i8**
%10 = load i8*, i8** %9
tail call void @free(i8* %10)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = bitcast double** %0 to i8*
tail call void @free(i8* %14)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ put32(unsigned int);
int /*<<< orphan*/ put8(int);
void mov_preg32pimm32_reg16(int reg32, unsigned int imm32, int reg16) {
  put8(0x66);
  put8(0x89);
  put8(0x80 | reg32 | (reg16 << 3));
  put32(imm32);
}


x86 assembly (clang, -O0):
<mov_preg32pimm32_reg16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    $0x66,%edi
call   1030 <put8@plt>
mov    $0x89,%edi
call   1030 <put8@plt>
mov    -0x4(%rbp),%edi
or     $0x80,%edi
mov    -0xc(%rbp),%eax
shl    $0x3,%eax
or     %eax,%edi
call   1030 <put8@plt>
mov    -0x8(%rbp),%edi
call   1040 <put32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mov_preg32pimm32_reg16>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %esi,%r14d
mov    %edi,%ebp
mov    $0x66,%edi
call   1030 <put8@plt>
mov    $0x89,%edi
call   1030 <put8@plt>
shl    $0x3,%ebx
or     %ebp,%ebx
or     $0x80,%ebx
mov    %ebx,%edi
call   1030 <put8@plt>
mov    %r14d,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <put32@plt>

LLVM IR (-O0):
define void @mov_preg32pimm32_reg16(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = call i32 @put8(i32 102)
%8 = call i32 @put8(i32 137)
%9 = load i32, i32* %4
%10 = or i32 128, %9
%11 = load i32, i32* %6
%12 = shl i32 %11, 3
%13 = or i32 %10, %12
%14 = call i32 @put8(i32 %13)
%15 = load i32, i32* %5
%16 = call i32 @put32(i32 %15)
ret void
}

LLVM IR (-O2):
define void @mov_preg32pimm32_reg16(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @put8(i32 102)
%5 = tail call i32 @put8(i32 137)
%6 = shl i32 %2, 3
%7 = or i32 %6, %0
%8 = or i32 %7, 128
%9 = tail call i32 @put8(i32 %8)
%10 = tail call i32 @put32(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ipcTest1();
int main(void) {
  ipcTest1();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @ipcTest1()
ret i32 0
}
int long_float_le_xxxx(long a, long b) {
  if (a < 0) {
    a = 0x8000000000000000lu - a;
  }
  if (b < 0) {
    b = 0x8000000000000000lu - b;
  }
  return a <= b;
}


x86 assembly (clang, -O0):
<long_float_le_xxxx>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    1129 <long_float_le_xxxx+0x29>
movabs $0x8000000000000000,%rax
sub    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x10(%rbp)
jge    1146 <long_float_le_xxxx+0x46>
movabs $0x8000000000000000,%rax
sub    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
setle  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<long_float_le_xxxx>:
movabs $0x8000000000000000,%rcx
mov    %rcx,%rdx
sub    %rdi,%rdx
test   %rdi,%rdi
cmovns %rdi,%rdx
sub    %rsi,%rcx
test   %rsi,%rsi
cmovns %rsi,%rcx
xor    %eax,%eax
cmp    %rcx,%rdx
setle  %al
ret

LLVM IR (-O0):
define i32 @long_float_le_xxxx(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = icmp slt i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i64, i64* %3
%9 = sub i64 -9223372036854775808, %8
store i64 %9, i64* %3
br label %10
10: ; preds = %7, %2
%11 = load i64, i64* %4
%12 = icmp slt i64 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = load i64, i64* %4
%15 = sub i64 -9223372036854775808, %14
store i64 %15, i64* %4
br label %16
16: ; preds = %13, %10
%17 = load i64, i64* %3
%18 = load i64, i64* %4
%19 = icmp sle i64 %17, %18
%20 = zext i1 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @long_float_le_xxxx(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, 0
%4 = sub i64 -9223372036854775808, %0
%5 = select i1 %3, i64 %4, i64 %0
%6 = icmp slt i64 %1, 0
%7 = sub i64 -9223372036854775808, %1
%8 = select i1 %6, i64 %7, i64 %1
%9 = icmp sle i64 %5, %8
%10 = zext i1 %9 to i32
ret i32 %10
}
int fun195() { return 195; }


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

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

LLVM IR (-O0):
define i32 @fun195() {
ret i32 195
}

LLVM IR (-O2):
define i32 @fun195() {
ret i32 195
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0x7e() {
  Assert_real((isupper(126) == 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_isupper.c",
              635, ("isupper should be 0 for ~"));
}


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

x86 assembly (clang, -O2):
<t_isupper_0x7e>:
push   %rax
mov    $0x7e,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x27b,%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_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 0 for ~\00"
define void @t_isupper_0x7e() {
%1 = call i64 @isupper(i32 126)
%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 635, i8* getelementptr inbounds ([26 x i8], [26 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_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 0 for ~\00"
define void @t_isupper_0x7e() {
%1 = tail call i64 @isupper(i32 126)
%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 635, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int evdns_init(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @evdns_init() {
ret i32 0
}

LLVM IR (-O2):
define i32 @evdns_init() {
ret i32 0
}
double obd_convert_62(int a, int b) { return (float)a - 125.0f; }


x86 assembly (clang, -O0):
<obd_convert_62>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cvtsi2ssl -0x4(%rbp),%xmm0
movss  0xee9(%rip),%xmm1
subss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<obd_convert_62>:
cvtsi2ss %edi,%xmm0
addss  0xef4(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @obd_convert_62(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 = sitofp i32 %5 to float
%7 = fsub float %6, 1.250000e+02
%8 = fpext float %7 to double
ret double %8
}

LLVM IR (-O2):
define double @obd_convert_62(i32 %0, i32 %1) {
%3 = sitofp i32 %0 to float
%4 = fadd float %3, -1.250000e+02
%5 = fpext float %4 to double
ret double %5
}
int annotated_inc_2_2(int i) { return ++i; }


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

x86 assembly (clang, -O2):
<annotated_inc_2_2>:
lea    0x1(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @annotated_inc_2_2(i32 %0) {
%2 = add nsw i32 %0, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ H();
void G() { H(); }


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

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

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

LLVM IR (-O2):
define void @G() {
%1 = tail call i32 (...) @H()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
main() { printf("Do your best!\n"); }


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"Do your best!\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [14 x i8] c"Do your best!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
const char *Float_Definition(void) {
  return "struct Float {\n"
         "  double val;\n"
         "};\n";
}


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

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

LLVM IR (-O0):
@.str = [33 x i8] c"struct Float {\0A double val;\0A};\0A\00"
define i8* @Float_Definition() {
ret i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [33 x i8] c"struct Float {\0A double val;\0A};\0A\00"
define i8* @Float_Definition() {
ret i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void *, size_t);
void uninitvar_memcpy(void) {
  void *ct;
  void *cs;
  size_t n;
  (void)memcpy(ct, cs, n);
}


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

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

LLVM IR (-O0):
define void @uninitvar_memcpy() {
%1 = alloca i8*
%2 = alloca i8*
%3 = alloca i64
%4 = load i8*, i8** %1
%5 = load i8*, i8** %2
%6 = load i64, i64* %3
%7 = call i32 @memcpy(i8* %4, i8* %5, i64 %6)
ret void
}

LLVM IR (-O2):
define void @uninitvar_memcpy() {
%1 = tail call i32 @memcpy(i8* undef, i8* undef, i64 undef)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ PrintMask(char const *, int /*<<< orphan*/ *);
int /*<<< orphan*/ SIG_SETMASK;
int /*<<< orphan*/ printf(char *, char const *);
scalar_t__ sigprocmask(int /*<<< orphan*/, int /*<<< orphan*/,
                       int /*<<< orphan*/ *);
void PrintCurrentMask(const char *prefix) {
  sigset_t mask;
  if (sigprocmask(SIG_SETMASK, 0, &mask) == 0)
    PrintMask(prefix, &mask);
  else
    printf("%s[ERROR]\n", prefix);
}


x86 assembly (clang, -O0):
<PrintCurrentMask>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
lea    -0xc(%rbp),%rdx
call   1030 <sigprocmask@plt>
cmp    $0x0,%rax
jne    116c <PrintCurrentMask+0x3c>
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <PrintMask@plt>
jmp    117c <PrintCurrentMask+0x4c>
mov    -0x8(%rbp),%rsi
lea    0xe89(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PrintCurrentMask>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
lea    0xc(%rsp),%rdx
xor    %esi,%esi
call   1030 <sigprocmask@plt>
test   %rax,%rax
je     1163 <PrintCurrentMask+0x33>
lea    0xea7(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
jmp    1170 <PrintCurrentMask+0x40>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <PrintMask@plt>
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@SIG_SETMASK = global i32 0
@.str = [11 x i8] c"%s[ERROR]\0A\00"
define void @PrintCurrentMask(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = load i32, i32* @SIG_SETMASK
%5 = call i64 @sigprocmask(i32 %4, i32 0, i32* %2)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @PrintMask(i8* %0, i32* %2)
br label %11
9: ; preds = %1
%10 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %11
11: ; preds = %9, %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printUnderScores(int count) {
  printf("\n");
  while (count-- > 0) {
    printf("_");
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<printUnderScores>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
jle    114c <printUnderScores+0x3c>
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
jmp    1127 <printUnderScores+0x17>
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printUnderScores>:
push   %rbx
mov    %edi,%ebx
mov    $0xa,%edi
call   1030 <putchar@plt>
test   %ebx,%ebx
jle    1142 <printUnderScores+0x32>
add    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0x5f,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
cmp    $0x1,%ebx
ja     1130 <printUnderScores+0x20>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @printUnderScores(i32 %0) {
%2 = tail call i32 @putchar(i32 10)
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %9
4: ; preds = %1, %4
%5 = phi i32 [ %6, %4 ], [ %0, %1 ]
%6 = add nsw i32 %5, -1
%7 = tail call i32 @putchar(i32 95)
%8 = icmp ugt i32 %5, 1
br i1 %8, label %4, label %9
9: ; preds = %4, %1
%10 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
void goto_hell(double *f) { printf("oo: %f\n", *f); }


x86 assembly (clang, -O0):
<goto_hell>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<goto_hell>:
movsd  (%rdi),%xmm0
lea    0xee5(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [8 x i8] c"oo: %f\0A\00"
define void @goto_hell(double* nocapture %0) {
%2 = load double, double* %0
%3 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_bus_send_to(void *bus, void *m, const char *destination, uint64_t *cookie) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_bus_send_to>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
xor    %eax,%eax
mov    0x2ec3(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_bus_send_to>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

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

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_bus_send_to(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i32* nocapture readnone %3) {
%5 = load i32, i32* @EINVAL
%6 = sub nsw i32 0, %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ rend_cache_purge();
int /*<<< orphan*/ rend_client_cancel_descriptor_fetches();
int /*<<< orphan*/ rend_client_purge_last_hid_serv_requests();
void rend_client_purge_state(void) {
  rend_cache_purge();
  rend_client_cancel_descriptor_fetches();
  rend_client_purge_last_hid_serv_requests();
}


x86 assembly (clang, -O0):
<rend_client_purge_state>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <rend_cache_purge@plt>
mov    $0x0,%al
call   1030 <rend_client_cancel_descriptor_fetches@plt>
mov    $0x0,%al
call   1040 <rend_client_purge_last_hid_serv_requests@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<rend_client_purge_state>:
push   %rax
xor    %eax,%eax
call   1050 <rend_cache_purge@plt>
xor    %eax,%eax
call   1030 <rend_client_cancel_descriptor_fetches@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <rend_client_purge_last_hid_serv_requests@plt>

LLVM IR (-O0):
define void @rend_client_purge_state() {
%1 = call i32 (...) @rend_cache_purge()
%2 = call i32 (...) @rend_client_cancel_descriptor_fetches()
%3 = call i32 (...) @rend_client_purge_last_hid_serv_requests()
ret void
}

LLVM IR (-O2):
define void @rend_client_purge_state() {
%1 = tail call i32 (...) @rend_cache_purge()
%2 = tail call i32 (...) @rend_client_cancel_descriptor_fetches()
%3 = tail call i32 (...) @rend_client_purge_last_hid_serv_requests()
ret void
}
int hexwide(unsigned long int j) {
  int i;
  for (i = 0; j; j >>= 1, i++)
    ;
  if (i == 0)
    return 1;
  else if (i % 4)
    return i / 4 + 1;
  return i / 4;
}


x86 assembly (clang, -O0):
<hexwide>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1139 <hexwide+0x39>
jmp    111f <hexwide+0x1f>
mov    -0x10(%rbp),%rax
shr    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    110f <hexwide+0xf>
cmpl   $0x0,-0x14(%rbp)
jne    114f <hexwide+0x4f>
movl   $0x1,-0x4(%rbp)
jmp    118c <hexwide+0x8c>
mov    -0x14(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1179 <hexwide+0x79>
mov    -0x14(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    118c <hexwide+0x8c>
jmp    117e <hexwide+0x7e>
mov    -0x14(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hexwide>:
test   %rdi,%rdi
je     112e <hexwide+0x2e>
xor    %eax,%eax
mov    %rdi,%rcx
nopw   0x0(%rax,%rax,1)
shr    %rcx
add    $0x1,%eax
cmp    $0x1,%rdi
mov    %rcx,%rdi
ja     1110 <hexwide+0x10>
mov    %eax,%ecx
and    $0x3,%ecx
shr    $0x2,%eax
cmp    $0x1,%ecx
sbb    $0xffffffff,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @hexwide(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %15, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i64 [ %6, %3 ], [ %0, %1 ]
%6 = lshr i64 %5, 1
%7 = add nuw nsw i32 %4, 1
%8 = icmp ult i64 %5, 2
br i1 %8, label %9, label %3
9: ; preds = %3
%10 = and i32 %7, 3
%11 = icmp ne i32 %10, 0
%12 = lshr i32 %7, 2
%13 = zext i1 %11 to i32
%14 = add nuw nsw i32 %12, %13
br label %15
15: ; preds = %9, %1
%16 = phi i32 [ 1, %1 ], [ %14, %9 ]
ret i32 %16
}
/* Variables and functions */
int isdigit(int);
int lex_isnumber(int ch) { return isdigit(ch); }


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

x86 assembly (clang, -O2):
<lex_isnumber>:
add    $0xffffffd0,%edi
xor    %eax,%eax
cmp    $0xa,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @lex_isnumber(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
char *strip(char sentence[]) {}


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

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

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

LLVM IR (-O2):
define noalias i8* @strip(i8* nocapture readnone %0) {
ret i8* undef
}
/* Variables and functions */
int /*<<< orphan*/ scache_flushSectors();
int fat_flushSectors(void) { scache_flushSectors(); }


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

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

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

LLVM IR (-O2):
define i32 @fat_flushSectors() {
%1 = tail call i32 (...) @scache_flushSectors()
ret i32 undef
}
int power_of_two_ceil(int n) {
  while (n & (n - 1))
    n++;
  return n;
}


x86 assembly (clang, -O0):
<power_of_two_ceil>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     1129 <power_of_two_ceil+0x29>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1107 <power_of_two_ceil+0x7>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<power_of_two_ceil>:
mov    %edi,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %eax,%ecx
lea    -0x1(%rcx),%edx
lea    0x1(%rcx),%eax
test   %edx,%ecx
jne    1110 <power_of_two_ceil+0x10>
add    $0xffffffff,%eax
ret

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

LLVM IR (-O2):
define i32 @power_of_two_ceil(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ %0, %1 ], [ %6, %2 ]
%4 = tail call i32 @llvm.ctpop.i32(i32 %3)
%5 = icmp ult i32 %4, 2
%6 = add nsw i32 %3, 1
br i1 %5, label %7, label %2
7: ; preds = %2
ret i32 %3
}
char *my_strcpy(char *dest, const char *src) {
  int i;
  for (i = 0; src[i]; i++)
    dest[i] = src[i];
  dest[i] = '\0';
  return (dest);
}


x86 assembly (clang, -O0):
<my_strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1149 <my_strcpy+0x49>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <my_strcpy+0x13>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_strcpy>:
mov    %rdi,%rax
mov    (%rsi),%cl
test   %cl,%cl
je     1127 <my_strcpy+0x27>
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 <my_strcpy+0x10>
mov    %edx,%ecx
movb   $0x0,(%rax,%rcx,1)
ret
xor    %ecx,%ecx
movb   $0x0,(%rax,%rcx,1)
ret

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

LLVM IR (-O2):
define i8* @my_strcpy(i8* returned writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %5
%6 = phi i64 [ %9, %5 ], [ 0, %2 ]
%7 = phi i8 [ %11, %5 ], [ %3, %2 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %6
store i8 %7, i8* %8
%9 = add nuw nsw i64 %6, 1
%10 = getelementptr inbounds i8, i8* %1, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5
%14 = and i64 %9, 4294967295
br label %15
15: ; preds = %13, %2
%16 = phi i64 [ 0, %2 ], [ %14, %13 ]
%17 = getelementptr inbounds i8, i8* %0, i64 %16
store i8 0, i8* %17
ret i8* %0
}
/* Type definitions */
typedef char *int64_t;

/* Variables and functions */
int64_t neg8(int64_t in) {
  int64_t out;
  asm("neg %%al" : "=a"(out) : "0"(in));
  return out;
}


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

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

LLVM IR (-O0):
define i8* @neg8(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* asm "neg %al", "={ax},0,~{dirflag},~{fpsr},~{flags}"(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
ret i8* %6
}

LLVM IR (-O2):
define i8* @neg8(i8* readnone %0) {
%2 = tail call i8* asm "neg %al", "={ax},0,~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ EX_USAGE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void emit_help(void) {
  fputs("Usage: [-q] [-f | -r | -R] ipv6-address\n", stderr);
  exit(EX_USAGE);
}


x86 assembly (clang, -O0):
<emit_help>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ead(%rip),%rax
mov    (%rax),%esi
lea    0xecc(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<emit_help>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
lea    0xecf(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [41 x i8] c"Usage: [-q] [-f | -r | -R] ipv6-address\0A\00"
@stderr = global i32 0
@EX_USAGE = global i32 0
define void @emit_help() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @EX_USAGE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@.str = [41 x i8] c"Usage: [-q] [-f | -r | -R] ipv6-address\0A\00"
@stderr = global i32 0
@EX_USAGE = global i32 0
define void @emit_help() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @EX_USAGE
%4 = tail call i32 @exit(i32 %3)
unreachable
}