xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uintmax_t;
typedef int bits;

/* Variables and functions */
int UINTMAX_C(int);
uintmax_t bit_mask_nz(unsigned bits) {
  return (UINTMAX_C(1) << ((bits)-1) << 1) - 1;
}


x86 assembly (clang, -O0):
<bit_mask_nz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1,%edi
call   1030 <UINTMAX_C@plt>
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
shl    %cl,%eax
shl    $0x1,%eax
sub    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit_mask_nz>:
push   %rbx
mov    %edi,%ebx
mov    $0x1,%edi
call   1030 <UINTMAX_C@plt>
add    $0xff,%bl
mov    %ebx,%ecx
shl    %cl,%eax
add    %eax,%eax
add    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @bit_mask_nz(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @UINTMAX_C(i32 1)
%4 = load i32, i32* %2
%5 = sub i32 %4, 1
%6 = shl i32 %3, %5
%7 = shl i32 %6, 1
%8 = sub nsw i32 %7, 1
ret i32 %8
}

LLVM IR (-O2):
define i32 @bit_mask_nz(i32 %0) {
%2 = tail call i32 @UINTMAX_C(i32 1)
%3 = add i32 %0, -1
%4 = shl i32 %2, %3
%5 = shl i32 %4, 1
%6 = add nsw i32 %5, -1
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void mm_free(void *ptr) { free(ptr); }


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

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

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

LLVM IR (-O2):
define void @mm_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
char *strstr(char *, char *);
int conta(char *frase, char *palavra) {
  int count = 0;
  for (;;) {
    char *ptr = strstr(frase, palavra);
    if (!ptr) {
      break;
    }
    ++count;
    frase = ptr + 1;
  }
  return count;
}


x86 assembly (clang, -O0):
<conta>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strstr@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1148 <conta+0x38>
jmp    1162 <conta+0x52>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1127 <conta+0x17>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<conta>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    $0xffffffff,%ebp
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rsi
call   1030 <strstr@plt>
lea    0x1(%rax),%rdi
add    $0x1,%ebp
test   %rax,%rax
jne    1120 <conta+0x10>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @conta(i8* %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ 0, %2 ], [ %8, %3 ]
%5 = phi i8* [ %0, %2 ], [ %9, %3 ]
%6 = tail call i8* @strstr(i8* dereferenceable(1) %5, i8* dereferenceable(1) %1)
%7 = icmp eq i8* %6, null
%8 = add nuw nsw i32 %4, 1
%9 = getelementptr inbounds i8, i8* %6, i64 1
br i1 %7, label %10, label %3
10: ; preds = %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ emit(char *);
void emit_prologue() {
  emit(".text\n");
  emit("# Begin prologue\n");
  emit("true:\n\t.byte 1\n");
  emit("false:\n\t.byte 0\n");
  emit("nil:\n\t.byte 0\n");
  emit("# End prologue\n");
}


x86 assembly (clang, -O0):
<emit_prologue>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <emit@plt>
lea    0xee0(%rip),%rdi
call   1030 <emit@plt>
lea    0xee6(%rip),%rdi
call   1030 <emit@plt>
lea    0xeea(%rip),%rdi
call   1030 <emit@plt>
lea    0xeef(%rip),%rdi
call   1030 <emit@plt>
lea    0xef2(%rip),%rdi
call   1030 <emit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_prologue>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <emit@plt>
lea    0xee3(%rip),%rdi
call   1030 <emit@plt>
lea    0xee9(%rip),%rdi
call   1030 <emit@plt>
lea    0xeed(%rip),%rdi
call   1030 <emit@plt>
lea    0xef2(%rip),%rdi
call   1030 <emit@plt>
lea    0xef5(%rip),%rdi
pop    %rax
jmp    1030 <emit@plt>

LLVM IR (-O0):
@.str = [7 x i8] c".text\0A\00"
@.str.1 = [18 x i8] c"# Begin prologue\0A\00"
@.str.2 = [16 x i8] c"true:\0A\09.byte 1\0A\00"
@.str.3 = [17 x i8] c"false:\0A\09.byte 0\0A\00"
@.str.4 = [15 x i8] c"nil:\0A\09.byte 0\0A\00"
@.str.5 = [16 x i8] c"# End prologue\0A\00"
define void @emit_prologue() {
%1 = call i32 @emit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @emit(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @emit(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @emit(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @emit(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @emit(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c".text\0A\00"
@.str.1 = [18 x i8] c"# Begin prologue\0A\00"
@.str.2 = [16 x i8] c"true:\0A\09.byte 1\0A\00"
@.str.3 = [17 x i8] c"false:\0A\09.byte 0\0A\00"
@.str.4 = [15 x i8] c"nil:\0A\09.byte 0\0A\00"
@.str.5 = [16 x i8] c"# End prologue\0A\00"
define void @emit_prologue() {
%1 = tail call i32 @emit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @emit(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @emit(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @emit(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @emit(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0))
%6 = tail call i32 @emit(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0))
ret void
}
/* Type definitions */
union bpf_attr {
  int map_fd;
  int /*<<< orphan*/ key;
};
typedef int /*<<< orphan*/ attr;

/* Variables and functions */
int /*<<< orphan*/ BPF_MAP_DELETE_ELEM;
int /*<<< orphan*/ bzero(union bpf_attr *, int);
int /*<<< orphan*/ ptr_to_u64(void const *);
int sys_bpf(int /*<<< orphan*/, union bpf_attr *, int);
int bpf_map_delete_elem(int fd, const void *key) {
  union bpf_attr attr;
  bzero(&attr, sizeof(attr));
  attr.map_fd = fd;
  attr.key = ptr_to_u64(key);
  return sys_bpf(BPF_MAP_DELETE_ELEM, &attr, sizeof(attr));
}


x86 assembly (clang, -O0):
<bpf_map_delete_elem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x18(%rbp),%rdi
mov    $0x4,%esi
call   1050 <bzero@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <ptr_to_u64@plt>
mov    %eax,-0x18(%rbp)
mov    0x2e72(%rip),%rax
mov    (%rax),%edi
lea    -0x18(%rbp),%rsi
mov    $0x4,%edx
call   1030 <sys_bpf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bpf_map_delete_elem>:
push   %rax
mov    %rsi,%rdi
call   1040 <ptr_to_u64@plt>
mov    %eax,(%rsp)
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
mov    $0x4,%edx
call   1030 <sys_bpf@plt>
pop    %rcx
ret

LLVM IR (-O0):
%union.bpf_attr = type { i32 }
@BPF_MAP_DELETE_ELEM = global i32 0
define i32 @bpf_map_delete_elem(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca %union.bpf_attr
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = call i32 @bzero(%union.bpf_attr* %5, i32 4)
%7 = load i32, i32* %3
%8 = bitcast %union.bpf_attr* %5 to i32*
store i32 %7, i32* %8
%9 = load i8*, i8** %4
%10 = call i32 @ptr_to_u64(i8* %9)
%11 = bitcast %union.bpf_attr* %5 to i32*
store i32 %10, i32* %11
%12 = load i32, i32* @BPF_MAP_DELETE_ELEM
%13 = call i32 @sys_bpf(i32 %12, %union.bpf_attr* %5, i32 4)
ret i32 %13
}

LLVM IR (-O2):
%union.bpf_attr = type { i32 }
@BPF_MAP_DELETE_ELEM = global i32 0
define i32 @bpf_map_delete_elem(i32 %0, i8* %1) {
%3 = alloca %union.bpf_attr
%4 = bitcast %union.bpf_attr* %3 to i8*
%5 = getelementptr inbounds %union.bpf_attr, %union.bpf_attr* %3, i64 0, i32 0
%6 = tail call i32 @ptr_to_u64(i8* %1)
store i32 %6, i32* %5
%7 = load i32, i32* @BPF_MAP_DELETE_ELEM
%8 = call i32 @sys_bpf(i32 %7, %union.bpf_attr* %3, i32 4)
ret i32 %8
}
void eapol_sm_notify_ctrl_attached(struct eapol_sm *sm) {}


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

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

LLVM IR (-O0):
%struct.eapol_sm = type opaque
define void @eapol_sm_notify_ctrl_attached(%struct.eapol_sm* %0) {
%2 = alloca %struct.eapol_sm*
store %struct.eapol_sm* %0, %struct.eapol_sm** %2
ret void
}

LLVM IR (-O2):
%struct.eapol_sm = type opaque
define void @eapol_sm_notify_ctrl_attached(%struct.eapol_sm* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_rwlock_t;

/* Variables and functions */
int EINVAL;
int /*<<< orphan*/ printf(char *, ...);
int pthread_rwlock_unlock(int /*<<< orphan*/ *);
int main(void) {
  static pthread_rwlock_t rwlock;
  int rc;
  printf("Unlocking uninitialized rwlock is undefined on Linux\n");
  return 4;
  rc = pthread_rwlock_unlock(&rwlock);
  if (rc != 0) {
    if (rc == EINVAL) {
      printf("Test PASSED\n");
      return 0;
    }
    printf("Test FAILED: Incorrect error code, expected 0 or EINVAL, got %d\n",
           rc);
    return 1;
  }
  printf("Test PASSED: Note*: Returned 0 instead of EINVAL, but standard "
         "specified _may_ fail.\n");
  return 0;
}


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

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

LLVM IR (-O0):
@main.rwlock = internal global i32 0
@.str = [54 x i8] c"Unlocking uninitialized rwlock is undefined on Linux\0A\00"
@EINVAL = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
ret i32 4
}

LLVM IR (-O2):
@EINVAL = global i32 0
@str = [53 x i8] c"Unlocking uninitialized rwlock is undefined on Linux\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str, i64 0, i64 0))
ret i32 4
}
void cellgen_dma_prep_stop(int loop __attribute__((unused))) {}


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

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

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

LLVM IR (-O2):
define void @cellgen_dma_prep_stop(i32 %0) {
ret void
}
/* Variables and functions */
int d04(int);
int d05(int a) { return d04(d04(a)); }


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

x86 assembly (clang, -O2):
<d05>:
push   %rax
call   1030 <d04@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <d04@plt>

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

LLVM IR (-O2):
define i32 @d05(i32 %0) {
%2 = tail call i32 @d04(i32 %0)
%3 = tail call i32 @d04(i32 %2)
ret i32 %3
}
int do_195() { return 195; }


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

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

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

LLVM IR (-O2):
define i32 @do_195() {
ret i32 195
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t pred_not_comma_newline(char c) {
  if (c == '\n' || c == ',')
    return 0;
  return 1;
}


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

x86 assembly (clang, -O2):
<pred_not_comma_newline>:
cmp    $0x2c,%dil
setne  %al
cmp    $0xa,%dil
setne  %cl
and    %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @pred_not_comma_newline(i8 signext %0) {
%2 = icmp ne i8 %0, 44
%3 = icmp ne i8 %0, 10
%4 = and i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void sdsOomAbort(void) {
  fprintf(stderr, "SDS: Out Of Memory (SDS_ABORT_ON_OOM defined)\n");
  abort();
}


x86 assembly (clang, -O0):
<sdsOomAbort>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [47 x i8] c"SDS: Out Of Memory (SDS_ABORT_ON_OOM defined)\0A\00"
define void @sdsOomAbort() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [47 x i8] c"SDS: Out Of Memory (SDS_ABORT_ON_OOM defined)\0A\00"
define void @sdsOomAbort() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @abort()
unreachable
}
unsigned long int cast_uint_ulong(unsigned int x) {
  return (unsigned long int)x;
}


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

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

LLVM IR (-O0):
define i64 @cast_uint_ulong(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = zext i32 %3 to i64
ret i64 %4
}

LLVM IR (-O2):
define i64 @cast_uint_ulong(i32 %0) {
%2 = zext i32 %0 to i64
ret i64 %2
}
int h(int a) { return a + 33; }


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

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

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

LLVM IR (-O2):
define i32 @h(i32 %0) {
%2 = add nsw i32 %0, 33
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ ft_bzero(void *, size_t);
void *malloc(size_t);
void *ft_memalloc(size_t size) {
  void *new;
  new = NULL;
  if (size) {
    new = malloc(size);
    if (new)
      ft_bzero(new, size);
  }
  return (new);
}


x86 assembly (clang, -O0):
<ft_memalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1169 <ft_memalloc+0x49>
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1164 <ft_memalloc+0x44>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <ft_bzero@plt>
jmp    1169 <ft_memalloc+0x49>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_memalloc>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     1146 <ft_memalloc+0x26>
mov    %rdi,%rbx
call   1040 <malloc@plt>
test   %rax,%rax
je     1146 <ft_memalloc+0x26>
mov    %rax,%r14
mov    %rax,%rdi
mov    %rbx,%rsi
call   1030 <ft_bzero@plt>
jmp    1149 <ft_memalloc+0x29>
xor    %r14d,%r14d
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @ft_memalloc(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i8* @malloc(i64 %0)
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @ft_bzero(i8* %4, i64 %0)
br label %8
8: ; preds = %3, %6, %1
%9 = phi i8* [ %4, %6 ], [ null, %3 ], [ null, %1 ]
ret i8* %9
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ memcpy(char *, char const *, int);
int strlen(char const *);
char *my_strdup(const char *src) {
  int len;
  char *ptr;
  if (src == NULL)
    return NULL;
  len = strlen(src);
  ptr = (char *)malloc(len + 1);
  if (ptr)
    memcpy(ptr, src, len + 1);
  return ptr;
}


x86 assembly (clang, -O0):
<my_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1154 <my_strdup+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1195 <my_strdup+0x65>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
add    $0x1,%edi
call   1050 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     118d <my_strdup+0x5d>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
add    $0x1,%edx
call   1040 <memcpy@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_strdup>:
push   %rbp
push   %r14
push   %rbx
test   %rdi,%rdi
je     1164 <my_strdup+0x34>
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %eax,%ebp
add    $0x1,%ebp
mov    %ebp,%edi
call   1050 <malloc@plt>
mov    %rax,%r14
test   %rax,%rax
je     1167 <my_strdup+0x37>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
call   1040 <memcpy@plt>
jmp    1167 <my_strdup+0x37>
xor    %r14d,%r14d
mov    %r14,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i8* @my_strdup(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %11, label %3
3: ; preds = %1
%4 = tail call i32 @strlen(i8* %0)
%5 = add nsw i32 %4, 1
%6 = tail call i64 @malloc(i32 %5)
%7 = inttoptr i64 %6 to i8*
%8 = icmp eq i64 %6, 0
br i1 %8, label %11, label %9
9: ; preds = %3
%10 = tail call i32 @memcpy(i8* %7, i8* %0, i32 %5)
br label %11
11: ; preds = %3, %9, %1
%12 = phi i8* [ null, %1 ], [ %7, %9 ], [ %7, %3 ]
ret i8* %12
}
/* Variables and functions */
int /*<<< orphan*/ RET();
int /*<<< orphan*/ hardwareTick();
scalar_t__ testFlag(int);
void RET_NC(void) {
  hardwareTick();
  if (testFlag(4) == 0) {
    RET();
  }
}


x86 assembly (clang, -O0):
<RET_NC>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <hardwareTick@plt>
mov    $0x4,%edi
call   1050 <testFlag@plt>
cmp    $0x0,%rax
jne    1156 <RET_NC+0x26>
mov    $0x0,%al
call   1030 <RET@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<RET_NC>:
push   %rax
xor    %eax,%eax
call   1040 <hardwareTick@plt>
mov    $0x4,%edi
call   1050 <testFlag@plt>
test   %rax,%rax
je     1149 <RET_NC+0x19>
pop    %rax
ret
xor    %eax,%eax
pop    %rcx
jmp    1030 <RET@plt>

LLVM IR (-O0):
define void @RET_NC() {
%1 = call i32 (...) @hardwareTick()
%2 = call i64 @testFlag(i32 4)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @RET()
br label %6
6: ; preds = %4, %0
ret void
}

LLVM IR (-O2):
define void @RET_NC() {
%1 = tail call i32 (...) @hardwareTick()
%2 = tail call i64 @testFlag(i32 4)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 (...) @RET()
br label %6
6: ; preds = %4, %0
ret void
}
int isPalindrome(int n) {
  int rev = 0, digit = 0, _n = n;
  while (_n > 0) {
    digit = _n % 10;
    rev = rev * 10 + digit;
    _n = _n / 10;
  }
  return rev == n ? 1 : 0;
}


x86 assembly (clang, -O0):
<isPalindrome>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jle    1150 <isPalindrome+0x50>
mov    -0x10(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
imul   $0xa,-0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
jmp    111b <isPalindrome+0x1b>
mov    -0x8(%rbp),%edx
mov    -0x4(%rbp),%esi
xor    %eax,%eax
mov    $0x1,%ecx
cmp    %esi,%edx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isPalindrome>:
xor    %edx,%edx
test   %edi,%edi
jle    1133 <isPalindrome+0x33>
mov    $0xcccccccd,%r8d
mov    %edi,%ecx
xchg   %ax,%ax
lea    (%rdx,%rdx,4),%r9d
mov    %ecx,%esi
imul   %r8,%rsi
shr    $0x23,%rsi
lea    (%rsi,%rsi,1),%eax
lea    (%rax,%rax,4),%eax
mov    %ecx,%edx
sub    %eax,%edx
lea    (%rdx,%r9,2),%edx
cmp    $0x9,%ecx
mov    %esi,%ecx
ja     1110 <isPalindrome+0x10>
xor    %eax,%eax
cmp    %edi,%edx
sete   %al
ret

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

LLVM IR (-O2):
define i32 @isPalindrome(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %11
3: ; preds = %1, %3
%4 = phi i32 [ %9, %3 ], [ %0, %1 ]
%5 = phi i32 [ %8, %3 ], [ 0, %1 ]
%6 = urem i32 %4, 10
%7 = mul nsw i32 %5, 10
%8 = add nsw i32 %6, %7
%9 = udiv i32 %4, 10
%10 = icmp ult i32 %4, 10
br i1 %10, label %11, label %3
11: ; preds = %3, %1
%12 = phi i32 [ 0, %1 ], [ %8, %3 ]
%13 = icmp eq i32 %12, %0
%14 = zext i1 %13 to i32
ret i32 %14
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
void bswap24(uint8_t *buf) { (void)buf; }


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

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

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

LLVM IR (-O2):
define void @bswap24(i32* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ key_t;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int semget(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int sem_open(key_t key) {
  int semid = semget(key, 0, 0);
  if (semid == -1)
    do {
      perror("semget");
      exit(EXIT_FAILURE);
    } while (0);
  return semid;
}


x86 assembly (clang, -O0):
<sem_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    %edx,%edx
mov    %edx,%esi
call   1030 <semget@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jne    1173 <sem_open+0x43>
jmp    1159 <sem_open+0x29>
lea    0xea0(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e74(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sem_open>:
push   %rax
xor    %esi,%esi
xor    %edx,%edx
call   1030 <semget@plt>
cmp    $0xffffffff,%eax
je     1141 <sem_open+0x11>
pop    %rcx
ret
lea    0xeb8(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"semget\00"
@EXIT_FAILURE = global i32 0
define i32 @sem_open(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @semget(i32 %4, i32 0, i32 0)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %14
8: ; preds = %1
br label %9
9: ; preds = %8
%10 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%11 = load i32, i32* @EXIT_FAILURE
%12 = call i32 @exit(i32 %11)
unreachable
13: ; No predecessors!
br label %14
14: ; preds = %13, %1
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
@.str = [7 x i8] c"semget\00"
@EXIT_FAILURE = global i32 0
define i32 @sem_open(i32 %0) {
%2 = tail call i32 @semget(i32 %0, i32 0, i32 0)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
8: ; preds = %1
ret i32 %2
}
/* Variables and functions */
char *malloc(size_t);
int /*<<< orphan*/ strcpy(char *, char const *);
size_t string_length(char const *);
size_t string_init_copy(char **string, const char *src_string) {
  size_t src_length = string_length(src_string);
  if (src_length) {
    *string = malloc(src_length + 1);
    strcpy(*string, src_string);
  } else
    *string = 0;
  return src_length;
}


x86 assembly (clang, -O0):
<string_init_copy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <string_length@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1184 <string_init_copy+0x54>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
jmp    118f <string_init_copy+0x5f>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_init_copy>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rsi,%rdi
call   1040 <string_length@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1167 <string_init_copy+0x37>
mov    %rbx,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,(%r15)
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
jmp    116e <string_init_copy+0x3e>
movq   $0x0,(%r15)
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i64 @string_init_copy(i8** nocapture writeonly %0, i8* %1) {
%3 = tail call i64 @string_length(i8* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = add i64 %3, 1
%7 = tail call i8* @malloc(i64 %6)
store i8* %7, i8** %0
%8 = tail call i32 @strcpy(i8* %7, i8* %1)
br label %10
9: ; preds = %2
store i8* null, i8** %0
br label %10
10: ; preds = %9, %5
ret i64 %3
}
void swap(int *a, int *b) {
  int *temp;
  temp = *a;
  *a = *b;
  *b = temp;
}


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

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

LLVM IR (-O0):
define void @swap(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i32*
store i32* %9, i32** %5
%10 = load i32*, i32** %4
%11 = load i32, i32* %10
%12 = load i32*, i32** %3
store i32 %11, i32* %12
%13 = load i32*, i32** %5
%14 = ptrtoint i32* %13 to i32
%15 = load i32*, i32** %4
store i32 %14, i32* %15
ret void
}

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
void desalocaMatriz(int **matriz, int linhas) {
  free(matriz[0]);
  free(matriz);
}


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

x86 assembly (clang, -O2):
<desalocaMatriz>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @desalocaMatriz(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 = getelementptr inbounds i32*, i32** %5, i64 0
%7 = load i32*, i32** %6
%8 = bitcast i32* %7 to i8*
%9 = load i32**, i32*** %3
%10 = bitcast i32** %9 to i8*
ret void
}

LLVM IR (-O2):
define void @desalocaMatriz(i32** nocapture %0, i32 %1) {
%3 = bitcast i32** %0 to i8**
%4 = load i8*, i8** %3
tail call void @free(i8* %4)
%5 = bitcast i32** %0 to i8*
tail call void @free(i8* %5)
ret void
}
void RandomFunc(unsigned long input[1], unsigned long output[1]) {
  unsigned long state[1];
  unsigned long local1;
  {
    state[0UL] = input[0UL] + 0xffffffffff660b45UL;
    local1 = 0UL;
    while (local1 < 1UL) {
      if (!(state[0UL] > local1)) {
        state[0UL] += state[0UL];
      }
      local1 += 2UL;
    }
    output[0UL] = (state[0UL] - 792422477UL) - 0xfffffffff7856444UL;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
add    $0xffffffffff660b45,%rax
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
cmpq   $0x1,-0x20(%rbp)
jae    115b <RandomFunc+0x5b>
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
ja     114a <RandomFunc+0x4a>
mov    -0x18(%rbp),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x20(%rbp)
jmp    1125 <RandomFunc+0x25>
mov    -0x18(%rbp),%rcx
sub    $0x2f3b684d,%rcx
sub    $0xfffffffff7856444,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
mov    $0xffffffffd8a53eb4,%rax
add    (%rdi),%rax
mov    %rax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i64* %0, i64* %1) {
%3 = alloca i64*
%4 = alloca i64*
%5 = alloca [1 x i64]
%6 = alloca i64
store i64* %0, i64** %3
store i64* %1, i64** %4
%7 = load i64*, i64** %3
%8 = getelementptr inbounds i64, i64* %7, i64 0
%9 = load i64, i64* %8
%10 = add i64 %9, -10089659
%11 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
store i64 %10, i64* %11
store i64 0, i64* %6
br label %12
12: ; preds = %26, %2
%13 = load i64, i64* %6
%14 = icmp ult i64 %13, 1
br i1 %14, label %15, label %29
15: ; preds = %12
%16 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%17 = load i64, i64* %16
%18 = load i64, i64* %6
%19 = icmp ugt i64 %17, %18
br i1 %19, label %26, label %20
20: ; preds = %15
%21 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%22 = load i64, i64* %21
%23 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%24 = load i64, i64* %23
%25 = add i64 %24, %22
store i64 %25, i64* %23
br label %26
26: ; preds = %20, %15
%27 = load i64, i64* %6
%28 = add i64 %27, 2
store i64 %28, i64* %6
br label %12
29: ; preds = %12
%30 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%31 = load i64, i64* %30
%32 = sub i64 %31, 792422477
%33 = sub i64 %32, -142252988
%34 = load i64*, i64** %4
%35 = getelementptr inbounds i64, i64* %34, i64 0
store i64 %33, i64* %35
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i64* nocapture %0, i64* nocapture writeonly %1) {
%3 = load i64, i64* %0
%4 = add i64 %3, -660259148
store i64 %4, i64* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memmove(int *, int *, int);
void copy_list(int *list1, int *list2, int n) {
  if (n == 0)
    return;
  memmove(list2, list1, n * sizeof(int));
}


x86 assembly (clang, -O0):
<copy_list>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1132 <copy_list+0x22>
jmp    1149 <copy_list+0x39>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
movslq -0x14(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edx
call   1030 <memmove@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_list>:
test   %edx,%edx
je     1125 <copy_list+0x15>
mov    %rdi,%rax
shl    $0x2,%edx
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <memmove@plt>
ret

LLVM IR (-O0):
define void @copy_list(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 = load i32, i32* %6
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %3
br label %18
10: ; preds = %3
%11 = load i32*, i32** %5
%12 = load i32*, i32** %4
%13 = load i32, i32* %6
%14 = sext i32 %13 to i64
%15 = mul i64 %14, 4
%16 = trunc i64 %15 to i32
%17 = call i32 @memmove(i32* %11, i32* %12, i32 %16)
br label %18
18: ; preds = %10, %9
ret void
}

LLVM IR (-O2):
define void @copy_list(i32* %0, i32* %1, i32 %2) {
%4 = icmp eq i32 %2, 0
br i1 %4, label %8, label %5
5: ; preds = %3
%6 = shl i32 %2, 2
%7 = tail call i32 @memmove(i32* %1, i32* %0, i32 %6)
br label %8
8: ; preds = %3, %5
ret void
}
int test_imm_3Euint8_mem(unsigned char *val) {
  return ((*val) & (0x3E << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_3Euint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = and i32 %5, 62
%7 = icmp ne i32 %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_3Euint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 62
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int mymain();
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  printf("%d\n", mymain());
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <mymain@plt>
mov    %eax,%esi
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @mymain()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
scalar_t__ S_ISCHR(long);
scalar_t__ S_ISDIR(long);
scalar_t__ S_ISREG(long);
char ftypelet(long int bits) {
  if (S_ISCHR(bits))
    return 'c';
  if (S_ISDIR(bits))
    return 'd';
  if (S_ISREG(bits))
    return '-';
  return '?';
}


x86 assembly (clang, -O0):
<ftypelet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <S_ISCHR@plt>
cmp    $0x0,%rax
je     1158 <ftypelet+0x28>
movb   $0x63,-0x1(%rbp)
jmp    1194 <ftypelet+0x64>
mov    -0x10(%rbp),%rdi
call   1030 <S_ISDIR@plt>
cmp    $0x0,%rax
je     1174 <ftypelet+0x44>
movb   $0x64,-0x1(%rbp)
jmp    1194 <ftypelet+0x64>
mov    -0x10(%rbp),%rdi
call   1040 <S_ISREG@plt>
cmp    $0x0,%rax
je     1190 <ftypelet+0x60>
movb   $0x2d,-0x1(%rbp)
jmp    1194 <ftypelet+0x64>
movb   $0x3f,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ftypelet>:
push   %rbx
mov    %rdi,%rbx
call   1050 <S_ISCHR@plt>
mov    %rax,%rcx
mov    $0x63,%al
test   %rcx,%rcx
je     1145 <ftypelet+0x15>
pop    %rbx
ret
mov    %rbx,%rdi
call   1030 <S_ISDIR@plt>
mov    %rax,%rcx
mov    $0x64,%al
test   %rcx,%rcx
jne    1143 <ftypelet+0x13>
mov    %rbx,%rdi
call   1040 <S_ISREG@plt>
test   %rax,%rax
mov    $0x3f,%ecx
mov    $0x2d,%eax
cmove  %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define signext i8 @ftypelet(i64 %0) {
%2 = alloca i8
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = call i64 @S_ISCHR(i64 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i8 99, i8* %2
br label %19
8: ; preds = %1
%9 = load i64, i64* %3
%10 = call i64 @S_ISDIR(i64 %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %8
store i8 100, i8* %2
br label %19
13: ; preds = %8
%14 = load i64, i64* %3
%15 = call i64 @S_ISREG(i64 %14)
%16 = icmp ne i64 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %13
store i8 45, i8* %2
br label %19
18: ; preds = %13
store i8 63, i8* %2
br label %19
19: ; preds = %18, %17, %12, %7
%20 = load i8, i8* %2
ret i8 %20
}

LLVM IR (-O2):
define signext i8 @ftypelet(i64 %0) {
%2 = tail call i64 @S_ISCHR(i64 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %11
4: ; preds = %1
%5 = tail call i64 @S_ISDIR(i64 %0)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = tail call i64 @S_ISREG(i64 %0)
%9 = icmp eq i64 %8, 0
%10 = select i1 %9, i8 63, i8 45
br label %11
11: ; preds = %7, %4, %1
%12 = phi i8 [ 99, %1 ], [ 100, %4 ], [ %10, %7 ]
ret i8 %12
}
/* Variables and functions */
int pigpio_command(int, int, unsigned int, unsigned int, int);
int i2c_read_byte_data(int pi, unsigned handle, unsigned reg) {
  return pigpio_command(pi, 61, handle, reg, 1);
}


x86 assembly (clang, -O0):
<i2c_read_byte_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    $0x3d,%esi
mov    $0x1,%r8d
call   1030 <pigpio_command@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2c_read_byte_data>:
mov    %edx,%ecx
mov    %esi,%edx
mov    $0x3d,%esi
mov    $0x1,%r8d
jmp    1030 <pigpio_command@plt>

LLVM IR (-O0):
define i32 @i2c_read_byte_data(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 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @pigpio_command(i32 %7, i32 61, i32 %8, i32 %9, i32 1)
ret i32 %10
}

LLVM IR (-O2):
define i32 @i2c_read_byte_data(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @pigpio_command(i32 %0, i32 61, i32 %1, i32 %2, i32 1)
ret i32 %4
}
/* Variables and functions */
unsigned int hasPPafterTheOffset(unsigned int, int);
int getLastPageOffset(unsigned int startOffset, int limit) {
  int offset = 0;
  while ((startOffset = hasPPafterTheOffset(startOffset, limit)) != 0) {
    offset = startOffset;
  }
  return offset;
}


x86 assembly (clang, -O0):
<getLastPageOffset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <hasPPafterTheOffset@plt>
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
je     1147 <getLastPageOffset+0x37>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1125 <getLastPageOffset+0x15>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getLastPageOffset>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%eax
xor    %ecx,%ecx
nopl   0x0(%rax)
mov    %ecx,%ebp
mov    %eax,%edi
mov    %ebx,%esi
call   1030 <hasPPafterTheOffset@plt>
mov    %eax,%ecx
test   %eax,%eax
jne    1120 <getLastPageOffset+0x10>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @getLastPageOffset(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 0, i32* %5
br label %6
6: ; preds = %11, %2
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = call i32 @hasPPafterTheOffset(i32 %7, i32 %8)
store i32 %9, i32* %3
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %6
%12 = load i32, i32* %3
store i32 %12, i32* %5
br label %6
13: ; preds = %6
%14 = load i32, i32* %5
ret i32 %14
}

LLVM IR (-O2):
define i32 @getLastPageOffset(i32 %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ %0, %2 ], [ %6, %3 ]
%5 = phi i32 [ 0, %2 ], [ %6, %3 ]
%6 = tail call i32 @hasPPafterTheOffset(i32 %4, i32 %1)
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %3
8: ; preds = %3
ret i32 %5
}
unsigned char rev_byte_9(unsigned char val) {
  unsigned char tmp = 0;
  unsigned char i;
  for (i = 0; i < 8; i++)
    if (val & (1 << (7 - i)))
      tmp |= 1 << i;
  return (tmp);
}


x86 assembly (clang, -O0):
<rev_byte_9>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movb   $0x0,-0x2(%rbp)
movb   $0x0,-0x3(%rbp)
movzbl -0x3(%rbp),%eax
cmp    $0x8,%eax
jge    116a <rev_byte_9+0x6a>
movzbl -0x1(%rbp),%eax
movzbl -0x3(%rbp),%edx
mov    $0x7,%ecx
sub    %edx,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     1158 <rev_byte_9+0x58>
movzbl -0x3(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,%ecx
movzbl -0x2(%rbp),%eax
or     %ecx,%eax
mov    %al,-0x2(%rbp)
jmp    115d <rev_byte_9+0x5d>
mov    -0x3(%rbp),%al
add    $0x1,%al
mov    %al,-0x3(%rbp)
jmp    1112 <rev_byte_9+0x12>
movzbl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rev_byte_9>:
rol    $0x4,%dil
mov    %edi,%eax
and    $0x33,%al
shl    $0x2,%al
shr    $0x2,%dil
and    $0x33,%dil
or     %dil,%al
mov    %eax,%ecx
and    $0x55,%cl
add    %cl,%cl
shr    %al
and    $0x55,%al
or     %cl,%al
ret

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

LLVM IR (-O2):
define zeroext i8 @rev_byte_9(i8 zeroext %0) {
%2 = call i8 @llvm.bitreverse.i8(i8 %0)
ret i8 %2
}
void break_statement() {
  int i = 0;
  while (i < 1) {
    int x = 0;
    int *ptr = &x;
    break;
  }
}


x86 assembly (clang, -O0):
<break_statement>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
jge    1124 <break_statement+0x24>
movl   $0x0,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
pop    %rbp
ret

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

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

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