xunge/DecIR huggingface dataset:
/* Type definitions */
struct rq_routing {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct rq_routing *);
int /*<<< orphan*/ rq_routing_clear(struct rq_routing *);
void rq_routing_free(struct rq_routing *p) {
  rq_routing_clear(p);
  free(p);
}


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

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

LLVM IR (-O0):
%struct.rq_routing = type { i32 }
define void @rq_routing_free(%struct.rq_routing* %0) {
%2 = alloca %struct.rq_routing*
store %struct.rq_routing* %0, %struct.rq_routing** %2
%3 = load %struct.rq_routing*, %struct.rq_routing** %2
%4 = call i32 @rq_routing_clear(%struct.rq_routing* %3)
%5 = load %struct.rq_routing*, %struct.rq_routing** %2
%6 = call i32 @free(%struct.rq_routing* %5)
ret void
}

LLVM IR (-O2):
%struct.rq_routing = type { i32 }
define void @rq_routing_free(%struct.rq_routing* %0) {
%2 = tail call i32 @rq_routing_clear(%struct.rq_routing* %0)
%3 = tail call i32 @free(%struct.rq_routing* %0)
ret void
}
/* Variables and functions */
int color_content(short, short *, short *, short *);
int wrap_color_content(short color, short *red, short *green, short *blue) {
  return color_content(color, red, green, blue);
}


x86 assembly (clang, -O0):
<wrap_color_content>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x2(%rbp),%ax
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
movswl %ax,%edi
call   1030 <color_content@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wrap_color_content>:
jmp    1030 <color_content@plt>

LLVM IR (-O0):
define i32 @wrap_color_content(i16 signext %0, i16* %1, i16* %2, i16* %3) {
%5 = alloca i16
%6 = alloca i16*
%7 = alloca i16*
%8 = alloca i16*
store i16 %0, i16* %5
store i16* %1, i16** %6
store i16* %2, i16** %7
store i16* %3, i16** %8
%9 = load i16, i16* %5
%10 = load i16*, i16** %6
%11 = load i16*, i16** %7
%12 = load i16*, i16** %8
%13 = call i32 @color_content(i16 signext %9, i16* %10, i16* %11, i16* %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @wrap_color_content(i16 signext %0, i16* %1, i16* %2, i16* %3) {
%5 = tail call i32 @color_content(i16 signext %0, i16* %1, i16* %2, i16* %3)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ do_arithemetic(int, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main(void) {
  int a, b;
  printf("Enter any two numbers to do arithemetic calculation: ");
  scanf("%d %d", &a, &b);
  do_arithemetic(a, b);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [54 x i8] c"Enter any two numbers to do arithemetic calculation: \00"
@.str.1 = [6 x i8] c"%d %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3)
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = call i32 @do_arithemetic(i32 %6, i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [54 x i8] c"Enter any two numbers to do arithemetic calculation: \00"
@.str.1 = [6 x i8] c"%d %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 @do_arithemetic(i32 %7, i32 %8)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int update_directory(const wchar_t *dirname) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @update_directory(i32* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int f86(int *);
int f87(int *p) { return f86(p); }


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

x86 assembly (clang, -O2):
<f87>:
jmp    1030 <f86@plt>

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

LLVM IR (-O2):
define i32 @f87(i32* %0) {
%2 = tail call i32 @f86(i32* %0)
ret i32 %2
}
int kol_process_kill_pid(unsigned process) {
  asm volatile("int $0x40" ::"a"(18), "b"(18), "c"(process));
}


x86 assembly (clang, -O0):
<kol_process_kill_pid>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %edi,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
mov    $0x12,%ebx
mov    %ebx,%eax
int    $0x40
mov    -0xc(%rbp),%eax
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<kol_process_kill_pid>:
push   %rbx
mov    %edi,%ecx
mov    $0x12,%eax
mov    $0x12,%ebx
int    $0x40
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @kol_process_kill_pid(i32 %0) {
tail call void asm sideeffect "int $$0x40", "{ax},{bx},{cx},~{dirflag},~{fpsr},~{flags}"(i32 18, i32 18, i32 %0)
ret i32 undef
}
/* Variables and functions */
int PTHREAD_MUTEX_DEFAULT;
void test_PTHREAD_MUTEX_DEFAULT(void) {
  int dummy = PTHREAD_MUTEX_DEFAULT;
  (void)dummy;
}


x86 assembly (clang, -O0):
<test_PTHREAD_MUTEX_DEFAULT>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
@PTHREAD_MUTEX_DEFAULT = global i32 0
define void @test_PTHREAD_MUTEX_DEFAULT() {
ret void
}
int execute_semctl() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_semctl() {
ret i32 0
}
/* Variables and functions */
char *strchr(char *, char);
extern char *index(char *a, char b) { return strchr(a, b); }


x86 assembly (clang, -O0):
<index>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
movsbl -0x9(%rbp),%esi
call   1030 <strchr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<index>:
jmp    1030 <strchr@plt>

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

LLVM IR (-O2):
define i8* @index(i8* %0, i8 signext %1) {
%3 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext %1)
ret i8* %3
}
int *get_elem_rec(int **array, int idx) {
  if (idx == 0)
    return array;
  else
    return get_elem_rec(array + 1, idx - 1);
}


x86 assembly (clang, -O0):
<get_elem_rec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1136 <get_elem_rec+0x26>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    114d <get_elem_rec+0x3d>
mov    -0x10(%rbp),%rdi
add    $0x8,%rdi
mov    -0x14(%rbp),%esi
sub    $0x1,%esi
call   1030 <get_elem_rec@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_elem_rec>:
lea    -0x1(%rsi),%eax
add    $0x1,%rax
xor    %ecx,%ecx
cmp    $0x1,%esi
cmovae %rax,%rcx
lea    (%rdi,%rcx,8),%rax
ret

LLVM IR (-O0):
define i32* @get_elem_rec(i32** %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32**
%5 = alloca i32
store i32** %0, i32*** %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i32**, i32*** %4
%10 = bitcast i32** %9 to i32*
store i32* %10, i32** %3
br label %17
11: ; preds = %2
%12 = load i32**, i32*** %4
%13 = getelementptr inbounds i32*, i32** %12, i64 1
%14 = load i32, i32* %5
%15 = sub nsw i32 %14, 1
%16 = call i32* @get_elem_rec(i32** %13, i32 %15)
store i32* %16, i32** %3
br label %17
17: ; preds = %11, %8
%18 = load i32*, i32** %3
ret i32* %18
}

LLVM IR (-O2):
define i32* @get_elem_rec(i32** readnone %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = add i32 %1, -1
%5 = zext i32 %4 to i64
%6 = add nuw nsw i64 %5, 1
%7 = select i1 %3, i64 0, i64 %6
%8 = getelementptr i32*, i32** %0, i64 %7
%9 = bitcast i32** %8 to i32*
ret i32* %9
}
float absf(float a) {
  if (a > 0)
    return a;
  else
    return -a;
}


x86 assembly (clang, -O0):
<absf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    1129 <absf+0x29>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1140 <absf+0x40>
movss  -0x8(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<absf>:
movaps 0xef9(%rip),%xmm1
xorps  %xmm0,%xmm1
xorps  %xmm2,%xmm2
cmpltss %xmm0,%xmm2
andps  %xmm2,%xmm0
andnps %xmm1,%xmm2
orps   %xmm2,%xmm0
ret

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

LLVM IR (-O2):
define float @absf(float %0) {
%2 = fcmp ogt float %0, 0.000000e+00
%3 = fneg float %0
%4 = select i1 %2, float %0, float %3
ret float %4
}
/* Variables and functions */
int mul(int, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, int *);
void main() {
  int x, y;
  printf("Enter x y: ");
  scanf("%d %d", &x, &y);
  printf("\n%d * %d =  %d\n", x, y, mul(x, y));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebf(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1050 <mul@plt>
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    %eax,%ecx
lea    0xe92(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xec6(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec4(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%ebx
mov    (%rsp),%ebp
mov    %ebx,%edi
mov    %ebp,%esi
call   1050 <mul@plt>
lea    0xea6(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %eax,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"Enter x y: \00"
@.str.1 = [6 x i8] c"%d %d\00"
@.str.2 = [16 x i8] c"\0A%d * %d = %d\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = call i32 @mul(i32 %7, i32 %8)
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %7, i32 %8, i32 %9)
ret void
}
struct ListNode *sortList(struct ListNode *head) {}


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

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

LLVM IR (-O0):
%struct.ListNode = type opaque
define %struct.ListNode* @sortList(%struct.ListNode* %0) {
%2 = alloca %struct.ListNode*
%3 = alloca %struct.ListNode*
store %struct.ListNode* %0, %struct.ListNode** %3
%4 = load %struct.ListNode*, %struct.ListNode** %2
ret %struct.ListNode* %4
}

LLVM IR (-O2):
%struct.ListNode = type opaque
define noalias %struct.ListNode* @sortList(%struct.ListNode* nocapture readnone %0) {
ret %struct.ListNode* undef
}
/* Variables and functions */
int /*<<< orphan*/ rib_freebuffs();
void rib_free(void) { rib_freebuffs(); }


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

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

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

LLVM IR (-O2):
define void @rib_free() {
%1 = tail call i32 (...) @rib_freebuffs()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ srand(int);
int time(int /*<<< orphan*/ *);
void set_seed(int seed) {
  if (seed >= 0) {
    srand(seed);
  } else {
    srand(time(NULL));
  }
}


x86 assembly (clang, -O0):
<set_seed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     1142 <set_seed+0x22>
mov    -0x4(%rbp),%edi
call   1030 <srand@plt>
jmp    1152 <set_seed+0x32>
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,%edi
call   1030 <srand@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_seed>:
test   %edi,%edi
js     1129 <set_seed+0x9>
jmp    1030 <srand@plt>
push   %rax
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%edi
add    $0x8,%rsp
jmp    1030 <srand@plt>

LLVM IR (-O0):
define void @set_seed(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = call i32 @srand(i32 %6)
br label %11
8: ; preds = %1
%9 = call i32 @time(i32* null)
%10 = call i32 @srand(i32 %9)
br label %11
11: ; preds = %8, %5
ret void
}

LLVM IR (-O2):
define void @set_seed(i32 %0) {
%2 = icmp sgt i32 %0, -1
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @time(i32* null)
br label %5
5: ; preds = %1, %3
%6 = phi i32 [ %4, %3 ], [ %0, %1 ]
%7 = tail call i32 @srand(i32 %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _hmt_register_covercase(char *, char *);
void _hmt_covercase_HMM_NormalizeVec2_init(void) {
  _hmt_register_covercase("HMM_NormalizeVec2", "2");
}


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

x86 assembly (clang, -O2):
<_hmt_covercase_HMM_NormalizeVec2_init>:
lea    0xee9(%rip),%rdi
lea    0xef2(%rip),%rsi
jmp    1030 <_hmt_register_covercase@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"HMM_NormalizeVec2\00"
@.str.1 = [2 x i8] c"2\00"
define void @_hmt_covercase_HMM_NormalizeVec2_init() {
%1 = call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"HMM_NormalizeVec2\00"
@.str.1 = [2 x i8] c"2\00"
define void @_hmt_covercase_HMM_NormalizeVec2_init() {
%1 = tail call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ nrf_802154_pib_auto_ack_set(int);
void nrf_802154_auto_ack_set(bool enabled) {
  nrf_802154_pib_auto_ack_set(enabled);
}


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

x86 assembly (clang, -O2):
<nrf_802154_auto_ack_set>:
jmp    1030 <nrf_802154_pib_auto_ack_set@plt>

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

LLVM IR (-O2):
define void @nrf_802154_auto_ack_set(i32 %0) {
%2 = tail call i32 @nrf_802154_pib_auto_ack_set(i32 %0)
ret void
}
/* Type definitions */
struct tms {
  int dummy;
};
typedef int /*<<< orphan*/ clock_t;

/* Variables and functions */
clock_t times(struct tms *buf) { return 0; }


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

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

LLVM IR (-O0):
%struct.tms = type { i32 }
define i32 @times(%struct.tms* %0) {
%2 = alloca %struct.tms*
store %struct.tms* %0, %struct.tms** %2
ret i32 0
}

LLVM IR (-O2):
%struct.tms = type { i32 }
define i32 @times(%struct.tms* nocapture readnone %0) {
ret i32 0
}
enable_interrupts(void) { __asm__ volatile("sti"); }


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

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

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

LLVM IR (-O2):
define i32 @enable_interrupts() {
tail call void asm sideeffect "sti", "~{dirflag},~{fpsr},~{flags}"()
ret i32 undef
}
int Base64encode_len(int len) { return ((len + 2) / 3 * 4) + 1; }


x86 assembly (clang, -O0):
<Base64encode_len>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x2,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
shl    $0x2,%eax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Base64encode_len>:
add    $0x2,%edi
movslq %edi,%rax
imul   $0x55555556,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
add    %ecx,%eax
lea    0x1(,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @Base64encode_len(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 2
%5 = sdiv i32 %4, 3
%6 = mul nsw i32 %5, 4
%7 = add nsw i32 %6, 1
ret i32 %7
}

LLVM IR (-O2):
define i32 @Base64encode_len(i32 %0) {
%2 = add nsw i32 %0, 2
%3 = sdiv i32 %2, 3
%4 = shl nsw i32 %3, 2
%5 = or i32 %4, 1
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ i;

/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ show_mem_rep(char *, int);
int main() {
  int i = 0x01234567;
  show_mem_rep((char *)&i, sizeof(i));
  getchar();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x1234567,0x4(%rsp)
01
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
call   1030 <show_mem_rep@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 19088743, i32* %2
%3 = bitcast i32* %2 to i8*
%4 = call i32 @show_mem_rep(i8* %3, i32 4)
%5 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 19088743, i32* %1
%3 = call i32 @show_mem_rep(i8* %2, i32 4)
%4 = call i32 (...) @getchar()
ret i32 0
}
/* Variables and functions */
int abs(int);
int rand();
int random_int(int lowerLimit, int upperLimit) {
  return lowerLimit + rand() % (abs(upperLimit - lowerLimit));
}


x86 assembly (clang, -O0):
<random_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1040 <rand@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
sub    -0x4(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
cltd
idiv   %ecx
mov    -0xc(%rbp),%eax
add    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_int>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <rand@plt>
sub    %ebp,%ebx
mov    %ebx,%ecx
neg    %ecx
cmovs  %ebx,%ecx
cltd
idiv   %ecx
add    %edx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @random_int(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = call i32 (...) @rand()
%7 = load i32, i32* %4
%8 = load i32, i32* %3
%9 = sub nsw i32 %7, %8
%10 = call i32 @abs(i32 %9)
%11 = srem i32 %6, %10
%12 = add nsw i32 %5, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @random_int(i32 %0, i32 %1) {
%3 = tail call i32 (...) @rand()
%4 = sub nsw i32 %1, %0
%5 = tail call i32 @llvm.abs.i32(i32 %4, i1 true)
%6 = srem i32 %3, %5
%7 = add nsw i32 %6, %0
ret i32 %7
}
void GPIOPortN_Handler(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<GPIOPortN_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <GPIOPortN_Handler+0x9>
jmp    1109 <GPIOPortN_Handler+0x9>

x86 assembly (clang, -O2):
<GPIOPortN_Handler>:
jmp    1100 <GPIOPortN_Handler>

LLVM IR (-O0):
define void @GPIOPortN_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @GPIOPortN_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void myPrintHelloMake(void) {
  printf("Hello makefiles!\n");
  printf("This is my first git programme");
  return;
}


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

x86 assembly (clang, -O2):
<myPrintHelloMake>:
push   %rax
lea    0xef7(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
pop    %rax
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"Hello makefiles!\0A\00"
@.str.1 = [31 x i8] c"This is my first git programme\00"
define void @myPrintHelloMake() {
%1 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [31 x i8] c"This is my first git programme\00"
@str = [17 x i8] c"Hello makefiles!\00"
define void @myPrintHelloMake() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
char toupper(char);
void uppercase(char *string) {
  int n;
  n = 0;
  while ((string[n] = toupper(string[n])) != '\0')
    ++n;
}


x86 assembly (clang, -O0):
<uppercase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <toupper@plt>
mov    -0x8(%rbp),%rcx
movslq -0xc(%rbp),%rdx
mov    %al,(%rcx,%rdx,1)
movsbl %al,%eax
cmp    $0x0,%eax
je     1159 <uppercase+0x49>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <uppercase+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uppercase>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl (%rbx),%edi
call   1030 <toupper@plt>
mov    %al,(%rbx)
add    $0x1,%rbx
test   %al,%al
jne    1120 <uppercase+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @uppercase(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %8, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = tail call signext i8 @toupper(i8 signext %5)
store i8 %6, i8* %4
%7 = icmp eq i8 %6, 0
%8 = add nuw i64 %3, 1
br i1 %7, label %9, label %2
9: ; preds = %2
ret void
}
/* Variables and functions */
scalar_t__ ft_strlen(char const *);
int /*<<< orphan*/ write(int, char const *, scalar_t__);
void ft_putstr_fd(char const *s, int fd) {
  (void)write(fd, s, ft_strlen(s) + 1);
  return;
}


x86 assembly (clang, -O0):
<ft_putstr_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <ft_strlen@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    %rax,%rdx
add    $0x1,%rdx
call   1030 <write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putstr_fd>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <ft_strlen@plt>
lea    0x1(%rax),%rdx
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <write@plt>

LLVM IR (-O0):
define void @ft_putstr_fd(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %3
%8 = call i64 @ft_strlen(i8* %7)
%9 = add nsw i64 %8, 1
%10 = call i32 @write(i32 %5, i8* %6, i64 %9)
ret void
}

LLVM IR (-O2):
define void @ft_putstr_fd(i8* %0, i32 %1) {
%3 = tail call i64 @ft_strlen(i8* %0)
%4 = add nsw i64 %3, 1
%5 = tail call i32 @write(i32 %1, i8* %0, i64 %4)
ret void
}
/* Variables and functions */
int GL_COLOR_BUFFER_BIT;
int GL_DEPTH_BUFFER_BIT;
int /*<<< orphan*/ glCallList(int);
int /*<<< orphan*/ glClear(int);
int /*<<< orphan*/ glutSwapBuffers();
void display(void) {
  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
  glCallList(1);
  glutSwapBuffers();
}


x86 assembly (clang, -O0):
<display>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
mov    0x2ea4(%rip),%rax
or     (%rax),%edi
call   1030 <glClear@plt>
mov    $0x1,%edi
call   1050 <glCallList@plt>
mov    $0x0,%al
call   1040 <glutSwapBuffers@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<display>:
push   %rax
mov    0x2ea0(%rip),%rax
mov    0x2ea9(%rip),%rcx
mov    (%rcx),%edi
or     (%rax),%edi
call   1030 <glClear@plt>
mov    $0x1,%edi
call   1050 <glCallList@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <glutSwapBuffers@plt>

LLVM IR (-O0):
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_DEPTH_BUFFER_BIT = global i32 0
define void @display() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = load i32, i32* @GL_DEPTH_BUFFER_BIT
%3 = or i32 %1, %2
%4 = call i32 @glClear(i32 %3)
%5 = call i32 @glCallList(i32 1)
%6 = call i32 (...) @glutSwapBuffers()
ret void
}

LLVM IR (-O2):
@GL_COLOR_BUFFER_BIT = global i32 0
@GL_DEPTH_BUFFER_BIT = global i32 0
define void @display() {
%1 = load i32, i32* @GL_COLOR_BUFFER_BIT
%2 = load i32, i32* @GL_DEPTH_BUFFER_BIT
%3 = or i32 %2, %1
%4 = tail call i32 @glClear(i32 %3)
%5 = tail call i32 @glCallList(i32 1)
%6 = tail call i32 (...) @glutSwapBuffers()
ret void
}
void access(int *buf, int n, int i) {
  if (i <= n)
    buf[i] = 0;
}


x86 assembly (clang, -O0):
<access>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     1129 <access+0x29>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<access>:
cmp    %esi,%edx
jg     110e <access+0xe>
movslq %edx,%rax
movl   $0x0,(%rdi,%rax,4)
ret

LLVM IR (-O0):
define void @access(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 = load i32, i32* %5
%9 = icmp sle i32 %7, %8
br i1 %9, label %10, label %15
10: ; preds = %3
%11 = load i32*, i32** %4
%12 = load i32, i32* %6
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
store i32 0, i32* %14
br label %15
15: ; preds = %10, %3
ret void
}

LLVM IR (-O2):
define void @access(i32* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %2, %1
br i1 %4, label %8, label %5
5: ; preds = %3
%6 = sext i32 %2 to i64
%7 = getelementptr inbounds i32, i32* %0, i64 %6
store i32 0, i32* %7
br label %8
8: ; preds = %5, %3
ret void
}
int sys_rmdir(int fd, const char *path) {}


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

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

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

LLVM IR (-O2):
define i32 @sys_rmdir(i32 %0, i8* nocapture readnone %1) {
ret i32 undef
}
void not_annotated_main2() {}


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

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

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

LLVM IR (-O2):
define void @not_annotated_main2() {
ret void
}
/* Variables and functions */
int crypto_hash_sha256(unsigned char *, unsigned char *, unsigned long long);
int SHA256_sodium(unsigned char *in, unsigned char *out,
                  unsigned long long inlen) {
  return crypto_hash_sha256(out, in, inlen);
}


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

x86 assembly (clang, -O2):
<SHA256_sodium>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <crypto_hash_sha256@plt>

LLVM IR (-O0):
define i32 @SHA256_sodium(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %5
%8 = load i8*, i8** %4
%9 = load i64, i64* %6
%10 = call i32 @crypto_hash_sha256(i8* %7, i8* %8, i64 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @SHA256_sodium(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @crypto_hash_sha256(i8* %1, i8* %0, i64 %2)
ret i32 %4
}
int atomic_inc_and_test_int(volatile int *var) {
  char ret;
  asm volatile("lock ;"
               " "
               "incl %0"
               "\n\t"
               "setz %1 \n\t"
               : "=m"(*var), "=qm"(ret)
               : "m"(*var)
               : "cc", "memory");
  return ret;
}


x86 assembly (clang, -O0):
<atomic_inc_and_test_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x8(%rbp),%rcx
lock incl (%rax)
sete   -0x9(%rbp)
movsbl -0x9(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<atomic_inc_and_test_int>:
lock incl (%rdi)
sete   -0x1(%rsp)
movsbl -0x1(%rsp),%eax
ret

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

LLVM IR (-O2):
define i32 @atomic_inc_and_test_int(i32* %0) {
%2 = alloca i8
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
double random_float();
int /*<<< orphan*/ srandom(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
main(int argc, char *argv[]) {
  int i;
  double x;
  srandom(time(NULL));
  for (i = 0; i < 10000; i++) {
    x = random_float();
    printf("%lf\n", x);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1060 <time@plt>
mov    %eax,%edi
call   1030 <srandom@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0x2710,-0x14(%rbp)
jge    11a5 <main+0x65>
mov    $0x0,%al
call   1040 <random_float@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
lea    0xe6e(%rip),%rdi
call   1050 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    116d <main+0x2d>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %edi,%edi
call   1060 <time@plt>
mov    %eax,%edi
call   1030 <srandom@plt>
mov    $0x2710,%ebp
lea    0xea3(%rip),%rbx
nopl   (%rax)
xor    %eax,%eax
call   1040 <random_float@plt>
mov    %rbx,%rdi
call   1050 <printf@plt>
add    $0xffffffff,%ebp
jne    1160 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%lf\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i32 @time(i32* null)
%9 = call i32 @srandom(i32 %8)
store i32 0, i32* %6
br label %10
10: ; preds = %17, %2
%11 = load i32, i32* %6
%12 = icmp slt i32 %11, 10000
br i1 %12, label %13, label %20
13: ; preds = %10
%14 = call double (...) @random_float()
store double %14, double* %7
%15 = load double, double* %7
%16 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double %15)
br label %17
17: ; preds = %13
%18 = load i32, i32* %6
%19 = add nsw i32 %18, 1
store i32 %19, i32* %6
br label %10
20: ; preds = %10
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
@.str = [5 x i8] c"%lf\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @time(i32* null)
%4 = tail call i32 @srandom(i32 %3)
br label %5
5: ; preds = %2, %5
%6 = phi i32 [ 0, %2 ], [ %9, %5 ]
%7 = tail call double (...) @random_float()
%8 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double %7)
%9 = add nuw nsw i32 %6, 1
%10 = icmp eq i32 %9, 10000
br i1 %10, label %11, label %5
11: ; preds = %5
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0x6a() {
  Assert_real((ispunct(106) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_ispunct.c",
              535, ("ispunct should be 0 for j"));
}


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 0 for j\00"
define void @t_ispunct_0x6a() {
%1 = call i64 @ispunct(i32 106)
%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 535, 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_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 0 for j\00"
define void @t_ispunct_0x6a() {
%1 = tail call i64 @ispunct(i32 106)
%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 535, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ err(int, char *);
void *malloc(size_t);
void *xmalloc(size_t size) {
  void *ptr;
  if ((ptr = malloc(size)) == NULL)
    err(128, "out of memory");
  return ptr;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1154 <xmalloc+0x34>
mov    $0x80,%edi
lea    0xeb1(%rip),%rsi
call   1030 <err@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbx
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113f <xmalloc+0x1f>
lea    0xecb(%rip),%rsi
mov    $0x80,%edi
call   1030 <err@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"out of memory\00"
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @err(i32 128, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
%10 = load i8*, i8** %3
ret i8* %10
}

LLVM IR (-O2):
@.str = [14 x i8] c"out of memory\00"
define noalias i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @err(i32 128, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  int a = 1;
  int *prt = &a;
  printf("p=%p \n", &a);
  printf("the val of a=%d \n", *prt);
  printf("ptr=%p \n", prt);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x1,0xc(%rsp)
lea    0xedc(%rip),%rdi
lea    0xc(%rsp),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0xc(%rsp),%esi
lea    0xec9(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"p=%p \0A\00"
@.str.1 = [18 x i8] c"the val of a=%d \0A\00"
@.str.2 = [9 x i8] c"ptr=%p \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
store i32 0, i32* %1
store i32 1, i32* %2
store i32* %2, i32** %3
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = load i32*, i32** %3
%6 = load i32, i32* %5
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = load i32*, i32** %3
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32* %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"p=%p \0A\00"
@.str.1 = [18 x i8] c"the val of a=%d \0A\00"
@.str.2 = [9 x i8] c"ptr=%p \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 1, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32* %1)
ret i32 0
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t fdSectorSize(void *VoidMe) { return 9; }


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

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

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

LLVM IR (-O2):
define i32 @fdSectorSize(i8* nocapture readnone %0) {
ret i32 9
}
/* Variables and functions */
char *getenv(char const *);
int /*<<< orphan*/ printf(char *, char const *, char *);
void testgetenv(const char *str) {
  printf("getenv (\"%s\") == %s\n", str, getenv(str) ? getenv(str) : "NULL");
}


x86 assembly (clang, -O0):
<testgetenv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <getenv@plt>
cmp    $0x0,%rax
je     1159 <testgetenv+0x39>
mov    -0x8(%rbp),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x18(%rbp)
jmp    1169 <testgetenv+0x49>
lea    0xeb5(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    1169 <testgetenv+0x49>
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    0xe88(%rip),%rdi
call   1040 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testgetenv>:
push   %rbx
mov    %rdi,%rbx
call   1030 <getenv@plt>
test   %rax,%rax
lea    0xee2(%rip),%rdx
cmovne %rax,%rdx
lea    0xec2(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"getenv (\22%s\22) == %s\0A\00"
@.str.1 = [5 x i8] c"NULL\00"
define void @testgetenv(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @getenv(i8* %4)
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = call i8* @getenv(i8* %8)
br label %11
10: ; preds = %1
br label %11
11: ; preds = %10, %7
%12 = phi i8* [ %9, %7 ], [ getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), %10 ]
%13 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %12)
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"getenv (\22%s\22) == %s\0A\00"
@.str.1 = [5 x i8] c"NULL\00"
define void @testgetenv(i8* %0) {
%2 = tail call i8* @getenv(i8* %0)
%3 = icmp eq i8* %2, null
%4 = select i1 %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %2
%5 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %4)
ret void
}
/* Variables and functions */
const char *default_scheme(void) { return ("GPT"); }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"GPT\00"
define i8* @default_scheme() {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [4 x i8] c"GPT\00"
define i8* @default_scheme() {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}
int diff(const void *a, const void *b) {
  const int *ia = a;
  const int *ib = b;
  return *ia - *ib;
}


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

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

LLVM IR (-O0):
define i32 @diff(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i32*
store i32* %8, i32** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i32*
store i32* %10, i32** %6
%11 = load i32*, i32** %5
%12 = load i32, i32* %11
%13 = load i32*, i32** %6
%14 = load i32, i32* %13
%15 = sub nsw i32 %12, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @diff(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = bitcast i8* %1 to i32*
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = sub nsw i32 %5, %6
ret i32 %7
}