xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float, float);
void relu_forward(float a, float b) { printf("relu_forward: %f, %f\n", a, b); }


x86 assembly (clang, -O0):
<relu_forward>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [22 x i8] c"relu_forward: %f, %f\0A\00"
define void @relu_forward(float %0, float %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), float %0, float %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void ReportError(char *errorcontext, int errorcode) {
  printf("ERROR CONDITION\nContext: %s\n", errorcontext);
  printf("Code: %d", errorcode);
  return;
}


x86 assembly (clang, -O0):
<ReportError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xee2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReportError>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rsi
lea    0xee3(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef2(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"ERROR CONDITION\0AContext: %s\0A\00"
@.str.1 = [9 x i8] c"Code: %d\00"
define void @ReportError(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load i32, i32* %4
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"ERROR CONDITION\0AContext: %s\0A\00"
@.str.1 = [9 x i8] c"Code: %d\00"
define void @ReportError(i8* %0, i32 %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ proc(char *);
int /*<<< orphan*/ strcpy(char *, char *);
int main() {
  char *msg = malloc(6);
  strcpy(msg, "12345");
  printf("Before proc\n%s", msg);
  proc(msg);
  printf("After proc\n%s\nFIM", msg);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x6,%edi
call   1060 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe9f(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rsi
lea    0xe95(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1050 <proc@plt>
mov    -0x8(%rbp),%rsi
lea    0xe8b(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x6,%edi
call   1060 <malloc@plt>
mov    %rax,%rbx
lea    0xeab(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
lea    0xea2(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1050 <proc@plt>
lea    0xe9a(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"12345\00"
@.str.1 = [15 x i8] c"Before proc\0A%s\00"
@.str.2 = [18 x i8] c"After proc\0A%s\0AFIM\00"
define i32 @main() {
%1 = alloca i8*
%2 = call i8* @malloc(i32 6)
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @strcpy(i8* %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%5 = load i8*, i8** %1
%6 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%7 = load i8*, i8** %1
%8 = call i32 @proc(i8* %7)
%9 = load i8*, i8** %1
%10 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i8* %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"12345\00"
@.str.1 = [15 x i8] c"Before proc\0A%s\00"
@.str.2 = [18 x i8] c"After proc\0A%s\0AFIM\00"
define i32 @main() {
%1 = tail call dereferenceable_or_null(6) i8* @malloc(i32 6)
%2 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%4 = tail call i32 @proc(i8* %1)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i8* %1)
ret i32 0
}
int fn5(int i) { return i == 1 >> (sizeof(int) * 8); }


x86 assembly (clang, -O0):
<fn5>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmp    %eax,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @fn5(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, poison
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @fn5(i32 %0) {
ret i32 poison
}
void free_matrix(short **matrix, int size_x, int size_y) {
  int i;
  for (i = 0; i < size_x; ++i) {
    free(matrix[i]);
  }
  free(matrix);
}


x86 assembly (clang, -O0):
<free_matrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1154 <free_matrix+0x44>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1129 <free_matrix+0x19>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @free_matrix(i16** nocapture %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %14
5: ; preds = %3
%6 = zext i32 %1 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ 0, %5 ], [ %12, %7 ]
%9 = getelementptr inbounds i16*, i16** %0, i64 %8
%10 = bitcast i16** %9 to i8**
%11 = load i8*, i8** %10
tail call void @free(i8* %11)
%12 = add nuw nsw i64 %8, 1
%13 = icmp eq i64 %12, %6
br i1 %13, label %14, label %7
14: ; preds = %7, %3
%15 = bitcast i16** %0 to i8*
tail call void @free(i8* %15)
ret void
}
int test_imm_76uint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0x76 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_76uint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 506806140928
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
struct slName {
  int dummy;
};

/* Variables and functions */
struct slName *newSlName(char *);
int /*<<< orphan*/ slAddTail(struct slName **, struct slName *);
struct slName *slNameAddTail(struct slName **pList, char *name) {
  struct slName *el = newSlName(name);
  slAddTail(pList, el);
  return el;
}


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

x86 assembly (clang, -O2):
<slNameAddTail>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <newSlName@plt>
mov    %rax,%rbx
mov    %r14,%rdi
mov    %rax,%rsi
call   1030 <slAddTail@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.slName = type { i32 }
define %struct.slName* @slNameAddTail(%struct.slName** %0, i8* %1) {
%3 = alloca %struct.slName**
%4 = alloca i8*
%5 = alloca %struct.slName*
store %struct.slName** %0, %struct.slName*** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call %struct.slName* @newSlName(i8* %6)
store %struct.slName* %7, %struct.slName** %5
%8 = load %struct.slName**, %struct.slName*** %3
%9 = load %struct.slName*, %struct.slName** %5
%10 = call i32 @slAddTail(%struct.slName** %8, %struct.slName* %9)
%11 = load %struct.slName*, %struct.slName** %5
ret %struct.slName* %11
}

LLVM IR (-O2):
%struct.slName = type { i32 }
define %struct.slName* @slNameAddTail(%struct.slName** %0, i8* %1) {
%3 = tail call %struct.slName* @newSlName(i8* %1)
%4 = tail call i32 @slAddTail(%struct.slName** %0, %struct.slName* %3)
ret %struct.slName* %3
}
void glUniformMatrix3fv(void) { return; }


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @f6() {
ret void
}
/* Type definitions */
struct seccomp_notif_sizes {
  int dummy;
};
typedef int /*<<< orphan*/ sizes;

/* Variables and functions */
int main(void) {
  struct seccomp_notif_sizes sizes;
  (void)sizes;
  return sizeof(sizes);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    $0x4,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 4
}
void charcat(char s[], char t) {
  int i = 0;
  while (s[i] != '\0')
    i++;
  s[i++] = t;
  s[i++] = '\0';
}


x86 assembly (clang, -O0):
<charcat>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1138 <charcat+0x38>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1115 <charcat+0x15>
mov    -0x9(%rbp),%dl
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x10(%rbp)
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x10(%rbp)
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<charcat>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmpb   $0x0,(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <charcat+0x10>
lea    -0x1(%rax),%ecx
mov    %sil,(%rdi,%rcx,1)
mov    %eax,%eax
movb   $0x0,(%rdi,%rax,1)
ret

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

LLVM IR (-O2):
define void @charcat(i8* nocapture %0, i8 signext %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i64 [ %8, %3 ], [ 0, %2 ]
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
%8 = add nuw i64 %4, 1
br i1 %7, label %9, label %3
9: ; preds = %3
%10 = and i64 %4, 4294967295
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = add i64 %4, 1
store i8 %1, i8* %11
%13 = and i64 %12, 4294967295
%14 = getelementptr inbounds i8, i8* %0, i64 %13
store i8 0, i8* %14
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long);
void thread_cleanup(void *arg) {
  printf("cleaning up 0x%lx\n", (long)arg);
  return;
}


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

x86 assembly (clang, -O2):
<thread_cleanup>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"cleaning up 0x%lx\0A\00"
define void @thread_cleanup(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
%5 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i64 %4)
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"cleaning up 0x%lx\0A\00"
define void @thread_cleanup(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i64 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int fun() {
  puts("haha");
  return 1;
}


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"haha\00"
define i32 @fun() {
%1 = call i32 @puts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@.str = [5 x i8] c"haha\00"
define i32 @fun() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 1
}
void wx11rs() {}


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

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

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

LLVM IR (-O2):
define void @wx11rs() {
ret void
}
void lgtd_lifx_wire_encode_tag_labels(struct lgtd_lifx_packet_tag_labels *pkt) {
  (void)pkt;
}


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

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

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

LLVM IR (-O2):
%struct.lgtd_lifx_packet_tag_labels = type opaque
define void @lgtd_lifx_wire_encode_tag_labels(%struct.lgtd_lifx_packet_tag_labels* nocapture %0) {
ret void
}
/* Type definitions */
struct wl_proxy {
  int dummy;
};
struct wl_buffer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ wl_proxy_set_user_data(struct wl_proxy *, void *);
void wl_buffer_set_user_data(struct wl_buffer *wl_buffer, void *user_data) {
  wl_proxy_set_user_data((struct wl_proxy *)wl_buffer, user_data);
}


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

x86 assembly (clang, -O2):
<wl_buffer_set_user_data>:
jmp    1030 <wl_proxy_set_user_data@plt>

LLVM IR (-O0):
%struct.wl_buffer = type { i32 }
%struct.wl_proxy = type { i32 }
define void @wl_buffer_set_user_data(%struct.wl_buffer* %0, i8* %1) {
%3 = alloca %struct.wl_buffer*
%4 = alloca i8*
store %struct.wl_buffer* %0, %struct.wl_buffer** %3
store i8* %1, i8** %4
%5 = load %struct.wl_buffer*, %struct.wl_buffer** %3
%6 = bitcast %struct.wl_buffer* %5 to %struct.wl_proxy*
%7 = load i8*, i8** %4
%8 = call i32 @wl_proxy_set_user_data(%struct.wl_proxy* %6, i8* %7)
ret void
}

LLVM IR (-O2):
%struct.wl_buffer = type { i32 }
%struct.wl_proxy = type { i32 }
define void @wl_buffer_set_user_data(%struct.wl_buffer* %0, i8* %1) {
%3 = bitcast %struct.wl_buffer* %0 to %struct.wl_proxy*
%4 = tail call i32 @wl_proxy_set_user_data(%struct.wl_proxy* %3, i8* %1)
ret void
}
/* Type definitions */
typedef scalar_t__ uint16_t;

/* Variables and functions */
int gca_search_uint16(const void *aa, void *bb) {
  const uint16_t a = *(const uint16_t *)aa;
  const uint16_t b = *(uint16_t *)bb;
  return (((a) > (b)) - ((b) > (a)));
}


x86 assembly (clang, -O0):
<gca_search_uint16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
setg   %al
and    $0x1,%al
movzbl %al,%eax
mov    -0x20(%rbp),%rcx
cmp    -0x18(%rbp),%rcx
setg   %cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gca_search_uint16>:
mov    (%rdi),%rcx
mov    (%rsi),%rdx
xor    %eax,%eax
xor    %esi,%esi
cmp    %rdx,%rcx
setg   %al
setl   %sil
sub    %esi,%eax
ret

LLVM IR (-O0):
define i32 @gca_search_uint16(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i64*
%9 = load i64, i64* %8
store i64 %9, i64* %5
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i64*
%12 = load i64, i64* %11
store i64 %12, i64* %6
%13 = load i64, i64* %5
%14 = load i64, i64* %6
%15 = icmp sgt i64 %13, %14
%16 = zext i1 %15 to i32
%17 = load i64, i64* %6
%18 = load i64, i64* %5
%19 = icmp sgt i64 %17, %18
%20 = zext i1 %19 to i32
%21 = sub nsw i32 %16, %20
ret i32 %21
}

LLVM IR (-O2):
define i32 @gca_search_uint16(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = icmp sgt i64 %4, %6
%8 = zext i1 %7 to i32
%9 = icmp sgt i64 %6, %4
%10 = sext i1 %9 to i32
%11 = add nsw i32 %10, %8
ret i32 %11
}
int test_imm_8Bint32_mem(int *val) {
  return ((*val) & (0x8B << 0)) ? -20 : -40;
}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @a() {
%1 = tail call i32 (...) @shared_function()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sendBlink(int, int, int, int);
int /*<<< orphan*/ sendConf(int, int);
void setPurpleRedBlink(int sockfd, int timeOn, int period) {
  sendConf(sockfd, (1 << 7) | (3 << 3) | (3 << 1));
  sendBlink(sockfd, 0x11, 201, 200);
  sendBlink(sockfd, 0x13, timeOn + 1, period);
}


x86 assembly (clang, -O0):
<setPurpleRedBlink>:
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    $0x9e,%esi
call   1040 <sendConf@plt>
mov    -0x4(%rbp),%edi
mov    $0x11,%esi
mov    $0xc9,%edx
mov    $0xc8,%ecx
call   1030 <sendBlink@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%edx
add    $0x1,%edx
mov    -0xc(%rbp),%ecx
mov    $0x13,%esi
call   1030 <sendBlink@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setPurpleRedBlink>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
mov    $0x9e,%esi
call   1040 <sendConf@plt>
mov    %ebx,%edi
mov    $0x11,%esi
mov    $0xc9,%edx
mov    $0xc8,%ecx
call   1030 <sendBlink@plt>
add    $0x1,%ebp
mov    %ebx,%edi
mov    $0x13,%esi
mov    %ebp,%edx
mov    %r14d,%ecx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <sendBlink@plt>

LLVM IR (-O0):
define void @setPurpleRedBlink(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 = call i32 @sendConf(i32 %7, i32 158)
%9 = load i32, i32* %4
%10 = call i32 @sendBlink(i32 %9, i32 17, i32 201, i32 200)
%11 = load i32, i32* %4
%12 = load i32, i32* %5
%13 = add nsw i32 %12, 1
%14 = load i32, i32* %6
%15 = call i32 @sendBlink(i32 %11, i32 19, i32 %13, i32 %14)
ret void
}

LLVM IR (-O2):
define void @setPurpleRedBlink(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @sendConf(i32 %0, i32 158)
%5 = tail call i32 @sendBlink(i32 %0, i32 17, i32 201, i32 200)
%6 = add nsw i32 %1, 1
%7 = tail call i32 @sendBlink(i32 %0, i32 19, i32 %6, i32 %2)
ret void
}
/* Type definitions */
struct phyloTree {
  int dummy;
};
struct lineFile {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ lineFileClose(struct lineFile **);
struct lineFile *lineFileOpen(char *, int);
struct phyloTree *phyloReadTree(struct lineFile *);
struct phyloTree *phyloOpenTree(char *fileName) {
  struct lineFile *lf = lineFileOpen(fileName, 1);
  struct phyloTree *tree = phyloReadTree(lf);
  lineFileClose(&lf);
  return tree;
}


x86 assembly (clang, -O0):
<phyloOpenTree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1050 <lineFileOpen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <phyloReadTree@plt>
mov    %rax,-0x18(%rbp)
lea    -0x10(%rbp),%rdi
call   1030 <lineFileClose@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<phyloOpenTree>:
push   %rbx
sub    $0x10,%rsp
mov    $0x1,%esi
call   1050 <lineFileOpen@plt>
mov    %rax,0x8(%rsp)
mov    %rax,%rdi
call   1040 <phyloReadTree@plt>
mov    %rax,%rbx
lea    0x8(%rsp),%rdi
call   1030 <lineFileClose@plt>
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.phyloTree = type { i32 }
%struct.lineFile = type { i32 }
define %struct.phyloTree* @phyloOpenTree(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.lineFile*
%4 = alloca %struct.phyloTree*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call %struct.lineFile* @lineFileOpen(i8* %5, i32 1)
store %struct.lineFile* %6, %struct.lineFile** %3
%7 = load %struct.lineFile*, %struct.lineFile** %3
%8 = call %struct.phyloTree* @phyloReadTree(%struct.lineFile* %7)
store %struct.phyloTree* %8, %struct.phyloTree** %4
%9 = call i32 @lineFileClose(%struct.lineFile** %3)
%10 = load %struct.phyloTree*, %struct.phyloTree** %4
ret %struct.phyloTree* %10
}

LLVM IR (-O2):
%struct.phyloTree = type { i32 }
%struct.lineFile = type { i32 }
define %struct.phyloTree* @phyloOpenTree(i8* %0) {
%2 = alloca %struct.lineFile*
%3 = bitcast %struct.lineFile** %2 to i8*
%4 = tail call %struct.lineFile* @lineFileOpen(i8* %0, i32 1)
store %struct.lineFile* %4, %struct.lineFile** %2
%5 = tail call %struct.phyloTree* @phyloReadTree(%struct.lineFile* %4)
%6 = call i32 @lineFileClose(%struct.lineFile** %2)
ret %struct.phyloTree* %5
}
void __pid_loop(void) {}


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

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

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

LLVM IR (-O2):
define void @__pid_loop() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ strncmp(char *, char *, int);
void strncmp_greater() {
  Assert_real((strncmp("equal", "EQUAL", 5) > 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/string/strncmp.c",
              25, ("Should be > 0"));
}


x86 assembly (clang, -O0):
<strncmp_greater>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed4(%rip),%rsi
mov    $0x5,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
setg   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebd(%rip),%rsi
mov    $0x19,%edx
lea    0xf55(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncmp_greater>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed7(%rip),%rsi
mov    $0x5,%edx
call   1030 <strncmp@plt>
xor    %edi,%edi
test   %rax,%rax
setg   %dil
lea    0xec3(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x19,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"equal\00"
@.str.1 = [6 x i8] c"EQUAL\00"
@.str.2 = [164 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/string/strncmp.c\00"
@.str.3 = [14 x i8] c"Should be > 0\00"
define void @strncmp_greater() {
%1 = call i64 @strncmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 5)
%2 = icmp sgt i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([164 x i8], [164 x i8]* @.str.2, i64 0, i64 0), i32 25, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"equal\00"
@.str.1 = [6 x i8] c"EQUAL\00"
@.str.2 = [164 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/string/strncmp.c\00"
@.str.3 = [14 x i8] c"Should be > 0\00"
define void @strncmp_greater() {
%1 = tail call i64 @strncmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 5)
%2 = icmp sgt i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([164 x i8], [164 x i8]* @.str.2, i64 0, i64 0), i32 25, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
ret void
}
/* Variables and functions */
void *a2(int);
void *a1(int x) { return (((x >> 1) & 1) ? a2(x) : a2(x)); }


x86 assembly (clang, -O0):
<a1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     113e <a1+0x2e>
mov    -0x4(%rbp),%edi
call   1030 <a2@plt>
mov    %rax,-0x10(%rbp)
jmp    114a <a1+0x3a>
mov    -0x4(%rbp),%edi
call   1030 <a2@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<a1>:
jmp    1030 <a2@plt>

LLVM IR (-O0):
define i8* @a1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 1
%5 = and i32 %4, 1
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* %2
%9 = call i8* @a2(i32 %8)
br label %13
10: ; preds = %1
%11 = load i32, i32* %2
%12 = call i8* @a2(i32 %11)
br label %13
13: ; preds = %10, %7
%14 = phi i8* [ %9, %7 ], [ %12, %10 ]
ret i8* %14
}

LLVM IR (-O2):
define i8* @a1(i32 %0) {
%2 = tail call i8* @a2(i32 %0)
ret i8* %2
}
char *os_get_save_ext() { return 0; }


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

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

LLVM IR (-O0):
define i8* @os_get_save_ext() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @os_get_save_ext() {
ret i8* null
}
/* Variables and functions */
char toupper(char);
char towupper(char x) { return toupper(x); }


x86 assembly (clang, -O0):
<towupper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <toupper@plt>
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<towupper>:
jmp    1030 <toupper@plt>

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

LLVM IR (-O2):
define signext i8 @towupper(i8 signext %0) {
%2 = tail call signext i8 @toupper(i8 signext %0)
ret i8 %2
}
void imv_window_get_framebuffer_size(struct imv_window *window, int *w,
                                     int *h) {
  (void)window;
  (void)w;
  (void)h;
}


x86 assembly (clang, -O0):
<imv_window_get_framebuffer_size>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.imv_window = type opaque
define void @imv_window_get_framebuffer_size(%struct.imv_window* %0, i32* %1, i32* %2) {
%4 = alloca %struct.imv_window*
%5 = alloca i32*
%6 = alloca i32*
store %struct.imv_window* %0, %struct.imv_window** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%7 = load %struct.imv_window*, %struct.imv_window** %4
%8 = load i32*, i32** %5
%9 = load i32*, i32** %6
ret void
}

LLVM IR (-O2):
%struct.imv_window = type opaque
define void @imv_window_get_framebuffer_size(%struct.imv_window* nocapture %0, i32* nocapture %1, i32* nocapture %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ BlackmanHarris70(int, double *);
void BlackmanHarris(int sizeWindow, double *pFWindow) {
  BlackmanHarris70(sizeWindow, pFWindow);
}


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

x86 assembly (clang, -O2):
<BlackmanHarris>:
jmp    1030 <BlackmanHarris70@plt>

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

LLVM IR (-O2):
define void @BlackmanHarris(i32 %0, double* %1) {
%3 = tail call i32 @BlackmanHarris70(i32 %0, double* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char);
void Info_EncodeChar(unsigned char chr, unsigned char *encodedchr) {
  sprintf((char *)encodedchr, "%%%X", (char)chr);
}


x86 assembly (clang, -O0):
<Info_EncodeChar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed3(%rip),%rsi
movsbl -0x1(%rbp),%edx
call   1030 <sprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Info_EncodeChar>:
mov    %rsi,%rax
movsbl %dil,%edx
lea    0xee2(%rip),%rsi
mov    %rax,%rdi
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%%%X\00"
define void @Info_EncodeChar(i8 zeroext %0, i8* %1) {
%3 = alloca i8
%4 = alloca i8*
store i8 %0, i8* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i8, i8* %3
%7 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8 signext %6)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%%%X\00"
define void @Info_EncodeChar(i8 zeroext %0, i8* nocapture writeonly %1) {
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %1, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8 signext %0)
ret void
}
int round2(int n) {
  int result = 1;
  while (result < n) {
    result = result << 1;
  }
  return result;
}


x86 assembly (clang, -O0):
<round2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1128 <round2+0x28>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <round2+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<round2>:
mov    $0x1,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ecx,%eax
lea    (%rax,%rax,1),%ecx
cmp    %edi,%eax
jl     1110 <round2+0x10>
ret

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

LLVM IR (-O2):
define i32 @round2(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 1, %1 ], [ %5, %2 ]
%4 = icmp slt i32 %3, %0
%5 = shl i32 %3, 1
br i1 %4, label %2, label %6
6: ; preds = %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ xprintf(char *);
unsigned char SL11Read(unsigned char address) {
  if (address > 0xff) {
    xprintf("Invalid register access, register %x\n");
    return (0x0);
  }
  *((volatile unsigned char *)(((long unsigned int)(int)0xa0000000) |
                               (0x100C0000))) = (address);
  return ((*((volatile unsigned char *)(((long unsigned int)(int)0xa0000000) |
                                        (0x100C0000 + 8)))));
}


x86 assembly (clang, -O0):
<SL11Read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movzbl -0x2(%rbp),%eax
cmp    $0xff,%eax
jle    1142 <SL11Read+0x32>
lea    0xecc(%rip),%rdi
call   1030 <xprintf@plt>
movb   $0x0,-0x1(%rbp)
jmp    115a <SL11Read+0x4a>
mov    -0x2(%rbp),%cl
mov    $0xffffffffb00c0000,%rax
mov    %cl,(%rax)
mov    $0xffffffffb00c0008,%rax
mov    (%rax),%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SL11Read>:
mov    %dil,0xffffffffb00c0000
b0
mov    0xffffffffb00c0008,%al
ret

LLVM IR (-O0):
@.str = [38 x i8] c"Invalid register access, register %x\0A\00"
define zeroext i8 @SL11Read(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = icmp sgt i32 %5, 255
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @xprintf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
store i8 0, i8* %2
br label %12
9: ; preds = %1
%10 = load i8, i8* %3
store volatile i8 %10, i8* inttoptr (i64 -1341390848 to i8*)
%11 = load volatile i8, i8* inttoptr (i64 -1341390840 to i8*)
store i8 %11, i8* %2
br label %12
12: ; preds = %9, %7
%13 = load i8, i8* %2
ret i8 %13
}

LLVM IR (-O2):
define zeroext i8 @SL11Read(i8 zeroext %0) {
store volatile i8 %0, i8* inttoptr (i64 -1341390848 to i8*)
%2 = load volatile i8, i8* inttoptr (i64 -1341390840 to i8*)
ret i8 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ const uint8_t;

/* Variables and functions */
uint8_t rfcomm_event_remote_line_status_get_line_status(const uint8_t *event) {
  return event[4];
}


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

x86 assembly (clang, -O2):
<rfcomm_event_remote_line_status_get_line_status>:
mov    0x10(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @rfcomm_event_remote_line_status_get_line_status(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 4
%3 = load i32, i32* %2
ret i32 %3
}
/* Variables and functions */
scalar_t__ calloc(int, int);
char **findWords(char **, int, int *, int *);
char *testUnit() {
  int wordsSize = 2;
  int errorCode = 0;
  int returnSize = 1;
  char **words = (char **)calloc(wordsSize, sizeof(char *));
  char **expected = (char **)calloc(returnSize, sizeof(char *));
  char **result = findWords(words, wordsSize, &returnSize, &errorCode);
  do {
    if (!(1 == 1))
      return "error, testUnit 1 != 1";
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<testUnit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x2,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x8,%esi
call   1030 <calloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%edi
mov    $0x8,%esi
call   1030 <calloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x4(%rbp),%esi
lea    -0xc(%rbp),%rdx
lea    -0x8(%rbp),%rcx
call   1040 <findWords@plt>
mov    %rax,-0x28(%rbp)
jmp    117c <testUnit+0x5c>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testUnit>:
push   %rbx
sub    $0x10,%rsp
movl   $0x0,0xc(%rsp)
movl   $0x1,0x8(%rsp)
mov    $0x2,%edi
mov    $0x8,%esi
call   1030 <calloc@plt>
mov    %rax,%rbx
mov    $0x1,%edi
mov    $0x8,%esi
call   1030 <calloc@plt>
lea    0x8(%rsp),%rdx
lea    0xc(%rsp),%rcx
mov    %rbx,%rdi
mov    $0x2,%esi
call   1040 <findWords@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define noalias i8* @testUnit() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 1, i32* %2
%5 = tail call i64 @calloc(i32 2, i32 8)
%6 = inttoptr i64 %5 to i8**
%7 = tail call i64 @calloc(i32 1, i32 8)
%8 = call i8** @findWords(i8** %6, i32 2, i32* %2, i32* %1)
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ nearly_main();
int /*<<< orphan*/ stderr;
int main(void) {
  nearly_main();
  fprintf(stderr, "---------------------\n");
  nearly_main();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <nearly_main@plt>
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
lea    0xec8(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
call   1040 <nearly_main@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [23 x i8] c"---------------------\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @nearly_main()
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (...) @nearly_main()
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [23 x i8] c"---------------------\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @nearly_main()
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 (...) @nearly_main()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
void count_overload3(int p1, int p2, int p3) {
  printf("Three params: %c %d %d\n", p1, p2, p3);
}


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

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

LLVM IR (-O0):
@.str = [24 x i8] c"Three params: %c %d %d\0A\00"
define void @count_overload3(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 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8, i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"Three params: %c %d %d\0A\00"
define void @count_overload3(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %2)
ret void
}
int lower_bits(int x, int n) {
  int mask = (2 << (n - 1)) - 1;
  return x & mask;
}


x86 assembly (clang, -O0):
<lower_bits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
mov    $0x2,%eax
shl    %cl,%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
and    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lower_bits>:
lea    -0x1(%rsi),%ecx
mov    $0x2,%eax
shl    %cl,%eax
add    $0xffffffff,%eax
and    %edi,%eax
ret

LLVM IR (-O0):
define i32 @lower_bits(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* %4
%7 = sub nsw i32 %6, 1
%8 = shl i32 2, %7
%9 = sub nsw i32 %8, 1
store i32 %9, i32* %5
%10 = load i32, i32* %3
%11 = load i32, i32* %5
%12 = and i32 %10, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @lower_bits(i32 %0, i32 %1) {
%3 = add nsw i32 %1, -1
%4 = shl i32 2, %3
%5 = add nsw i32 %4, -1
%6 = and i32 %5, %0
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ sleep(unsigned int);
int /*<<< orphan*/ usleep(unsigned int);
double waitTime(double time) {
  if (time < 0)
    time = -time;
  unsigned int secs = (int)time;
  unsigned int usecs = (int)((time - secs) * 1e6);
  sleep(secs);
  usleep(usecs);
  return time;
}


x86 assembly (clang, -O0):
<waitTime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    115c <waitTime+0x3c>
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
cvttsd2si -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0xc(%rbp),%eax
cvtsi2sd %rax,%xmm1
subsd  %xmm1,%xmm0
movsd  0xe83(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <sleep@plt>
mov    -0x10(%rbp),%edi
call   1040 <usleep@plt>
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<waitTime>:
push   %rbx
sub    $0x10,%rsp
movapd 0xed3(%rip),%xmm1
xorpd  %xmm0,%xmm1
xorpd  %xmm2,%xmm2
movapd %xmm0,%xmm3
cmpltsd %xmm2,%xmm3
andpd  %xmm3,%xmm1
andnpd %xmm0,%xmm3
orpd   %xmm1,%xmm3
movapd %xmm3,(%rsp)
cvttsd2si %xmm3,%edi
xorps  %xmm0,%xmm0
cvtsi2sd %rdi,%xmm0
movapd %xmm3,%xmm1
subsd  %xmm0,%xmm1
mulsd  0xea5(%rip),%xmm1
cvttsd2si %xmm1,%ebx
call   1030 <sleep@plt>
mov    %ebx,%edi
call   1040 <usleep@plt>
movaps (%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @waitTime(double %0) {
%2 = alloca double
%3 = alloca i32
%4 = alloca i32
store double %0, double* %2
%5 = load double, double* %2
%6 = fcmp olt double %5, 0.000000e+00
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load double, double* %2
%9 = fneg double %8
store double %9, double* %2
br label %10
10: ; preds = %7, %1
%11 = load double, double* %2
%12 = fptosi double %11 to i32
store i32 %12, i32* %3
%13 = load double, double* %2
%14 = load i32, i32* %3
%15 = uitofp i32 %14 to double
%16 = fsub double %13, %15
%17 = fmul double %16, 1.000000e+06
%18 = fptosi double %17 to i32
store i32 %18, i32* %4
%19 = load i32, i32* %3
%20 = call i32 @sleep(i32 %19)
%21 = load i32, i32* %4
%22 = call i32 @usleep(i32 %21)
%23 = load double, double* %2
ret double %23
}

LLVM IR (-O2):
define double @waitTime(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = fneg double %0
%4 = select i1 %2, double %3, double %0
%5 = fptosi double %4 to i32
%6 = uitofp i32 %5 to double
%7 = fsub double %4, %6
%8 = fmul double %7, 1.000000e+06
%9 = fptosi double %8 to i32
%10 = tail call i32 @sleep(i32 %5)
%11 = tail call i32 @usleep(i32 %9)
ret double %4
}