xunge/DecIR huggingface dataset:
void ff_hevc_put_hevc_bi_w_qpel_hv12_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_w_qpel_hv12_8_sse4() {
ret void
}
/* Type definitions */
struct token_list {
  int dummy;
};

/* Variables and functions */
bool empty_list(const struct token_list *ll) { return ((ll) ? false : true); }


x86 assembly (clang, -O0):
<empty_list>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<empty_list>:
xor    %eax,%eax
test   %rdi,%rdi
sete   %al
ret

LLVM IR (-O0):
%struct.token_list = type { i32 }
define i32 @empty_list(%struct.token_list* %0) {
%2 = alloca %struct.token_list*
store %struct.token_list* %0, %struct.token_list** %2
%3 = load %struct.token_list*, %struct.token_list** %2
%4 = icmp ne %struct.token_list* %3, null
%5 = zext i1 %4 to i64
%6 = select i1 %4, i32 0, i32 1
ret i32 %6
}

LLVM IR (-O2):
%struct.token_list = type { i32 }
define i32 @empty_list(%struct.token_list* readnone %0) {
%2 = icmp eq %struct.token_list* %0, null
%3 = zext i1 %2 to i32
ret i32 %3
}
void free_zmat(int **zmat, int acol) {
  int j;
  for (j = 0; j < acol; j++)
    free(zmat[j]);
  free(zmat);
}


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

x86 assembly (clang, -O2):
<free_zmat>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
jle    1142 <free_zmat+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_zmat+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @free_zmat(i32** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32*, i32** %0, i64 %7
%9 = bitcast i32** %8 to i8**
%10 = load i8*, i8** %9
tail call void @free(i8* %10)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = bitcast i32** %0 to i8*
tail call void @free(i8* %14)
ret void
}
void RTLinuxFindDevicePathV(void) {}


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

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

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

LLVM IR (-O2):
define void @RTLinuxFindDevicePathV() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printUsage(char **argv) {
  printf("An exercise of implementing quicksort.");
  printf("Usage:\n%s n\n    where n is the size of the test array.\n", argv[0]);
}


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

x86 assembly (clang, -O2):
<printUsage>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    (%rbx),%rsi
lea    0xefb(%rip),%rdi
xor    %eax,%eax
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [39 x i8] c"An exercise of implementing quicksort.\00"
@.str.1 = [56 x i8] c"Usage:\0A%s n\0A where n is the size of the test array.\0A\00"
define void @printUsage(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%4 = load i8**, i8*** %2
%5 = getelementptr inbounds i8*, i8** %4, i64 0
%6 = load i8*, i8** %5
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.1, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c"An exercise of implementing quicksort.\00"
@.str.1 = [56 x i8] c"Usage:\0A%s n\0A where n is the size of the test array.\0A\00"
define void @printUsage(i8** nocapture %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%3 = load i8*, i8** %0
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @.str.1, i64 0, i64 0), i8* %3)
ret void
}
/* Type definitions */
struct utsname {
  int /*<<< orphan*/ sysname;
};

/* Variables and functions */
int /*<<< orphan*/ _UTSNAME_LENGTH;
int /*<<< orphan*/ memset(struct utsname *, int /*<<< orphan*/, int);
int /*<<< orphan*/ snprintf(int /*<<< orphan*/, int /*<<< orphan*/, char *);
int uname(struct utsname *buf) {
  memset(buf, 0, sizeof(struct utsname));
  snprintf(buf->sysname, _UTSNAME_LENGTH, "NaCl");
  return 0;
}


x86 assembly (clang, -O0):
<uname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1040 <memset@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    0x2e9f(%rip),%rax
mov    (%rax),%esi
lea    0xeae(%rip),%rdx
call   1030 <snprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uname>:
push   %rbx
mov    %rdi,%rbx
xor    %esi,%esi
mov    $0x4,%edx
call   1040 <memset@plt>
mov    (%rbx),%edi
mov    0x2eaf(%rip),%rax
mov    (%rax),%esi
lea    0xebe(%rip),%rdx
call   1030 <snprintf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.utsname = type { i32 }
@_UTSNAME_LENGTH = global i32 0
@.str = [5 x i8] c"NaCl\00"
define i32 @uname(%struct.utsname* %0) {
%2 = alloca %struct.utsname*
store %struct.utsname* %0, %struct.utsname** %2
%3 = load %struct.utsname*, %struct.utsname** %2
%4 = call i32 @memset(%struct.utsname* %3, i32 0, i32 4)
%5 = load %struct.utsname*, %struct.utsname** %2
%6 = getelementptr inbounds %struct.utsname, %struct.utsname* %5, i32 0, i32 0
%7 = load i32, i32* %6
%8 = load i32, i32* @_UTSNAME_LENGTH
%9 = call i32 @snprintf(i32 %7, i32 %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
%struct.utsname = type { i32 }
@_UTSNAME_LENGTH = global i32 0
@.str = [5 x i8] c"NaCl\00"
define i32 @uname(%struct.utsname* %0) {
%2 = tail call i32 @memset(%struct.utsname* %0, i32 0, i32 4)
%3 = getelementptr inbounds %struct.utsname, %struct.utsname* %0, i64 0, i32 0
%4 = load i32, i32* %3
%5 = load i32, i32* @_UTSNAME_LENGTH
%6 = tail call i32 @snprintf(i32 %4, i32 %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int x;
  scanf("%d", &x);
  printf("O valor fornecido foi: %d", x);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [26 x i8] c"O valor fornecido foi: %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [26 x i8] c"O valor fornecido foi: %d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Variables and functions */
char *strchr(char *, char);
char *find_transport_header(char *inp) {
  inp = strchr(inp, ';');
  if (inp != NULL)
    inp++;
  return inp;
}


x86 assembly (clang, -O0):
<find_transport_header>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x3b,%esi
call   1030 <strchr@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1145 <find_transport_header+0x35>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_transport_header>:
push   %rax
mov    $0x3b,%esi
call   1030 <strchr@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
cmovne %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @find_transport_header(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @strchr(i8* %3, i8 signext 59)
store i8* %4, i8** %2
%5 = load i8*, i8** %2
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i32 1
store i8* %9, i8** %2
br label %10
10: ; preds = %7, %1
%11 = load i8*, i8** %2
ret i8* %11
}

LLVM IR (-O2):
define i8* @find_transport_header(i8* %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 59)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* null, i8* %4
ret i8* %5
}
float float_min2(float a, float b) { return ((a) <= (b) ? (a) : (b)); }


x86 assembly (clang, -O0):
<float_min2>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     1130 <float_min2+0x30>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    113a <float_min2+0x3a>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<float_min2>:
movaps %xmm0,%xmm2
cmpless %xmm1,%xmm2
andps  %xmm2,%xmm0
andnps %xmm1,%xmm2
orps   %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @float_min2(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 = fcmp ole float %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load float, float* %3
br label %12
10: ; preds = %2
%11 = load float, float* %4
br label %12
12: ; preds = %10, %8
%13 = phi float [ %9, %8 ], [ %11, %10 ]
ret float %13
}

LLVM IR (-O2):
define float @float_min2(float %0, float %1) {
%3 = fcmp ole float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
void av_samples_alloc_array_and_samples() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @dummy_dyn() {
ret void
}
int upb_div_round_up(int numerator, int denominator) {
  return numerator > 0 ? (numerator - 1) / denominator + 1 : 0;
}


x86 assembly (clang, -O0):
<upb_div_round_up>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1129 <upb_div_round_up+0x29>
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
cltd
idivl  -0x8(%rbp)
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <upb_div_round_up+0x33>
xor    %eax,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <upb_div_round_up+0x33>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<upb_div_round_up>:
test   %edi,%edi
jle    1110 <upb_div_round_up+0x10>
add    $0xffffffff,%edi
mov    %edi,%eax
cltd
idiv   %esi
add    $0x1,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @upb_div_round_up(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 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %2
%8 = load i32, i32* %3
%9 = sub nsw i32 %8, 1
%10 = load i32, i32* %4
%11 = sdiv i32 %9, %10
%12 = add nsw i32 %11, 1
br label %14
13: ; preds = %2
br label %14
14: ; preds = %13, %7
%15 = phi i32 [ %12, %7 ], [ 0, %13 ]
ret i32 %15
}

LLVM IR (-O2):
define i32 @upb_div_round_up(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = add nsw i32 %0, -1
%6 = sdiv i32 %5, %1
%7 = add nsw i32 %6, 1
br label %8
8: ; preds = %2, %4
%9 = phi i32 [ %7, %4 ], [ 0, %2 ]
ret i32 %9
}
void gtk_window_set_title() {}


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

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

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

LLVM IR (-O2):
define void @gtk_window_set_title() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char m, l, g;
  scanf("%c", &m);
  g = m - 'a';
  l = 'z' - g;
  printf("%c \n", l);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1040 <scanf@plt>
movsbl -0x5(%rbp),%eax
sub    $0x61,%eax
mov    %al,-0x7(%rbp)
movsbl -0x7(%rbp),%ecx
mov    $0x7a,%eax
sub    %ecx,%eax
mov    %al,-0x6(%rbp)
lea    0xea5(%rip),%rdi
movsbl -0x6(%rbp),%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1040 <scanf@plt>
mov    $0xdb,%al
sub    0x7(%rsp),%al
movsbl %al,%esi
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
@.str.1 = [5 x i8] c"%c \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
%4 = alloca i8
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%6 = load i8, i8* %2
%7 = sext i8 %6 to i32
%8 = sub nsw i32 %7, 97
%9 = trunc i32 %8 to i8
store i8 %9, i8* %4
%10 = load i8, i8* %4
%11 = sext i8 %10 to i32
%12 = sub nsw i32 122, %11
%13 = trunc i32 %12 to i8
store i8 %13, i8* %3
%14 = load i8, i8* %3
%15 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8 signext %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
@.str.1 = [5 x i8] c"%c \0A\00"
define i32 @main() {
%1 = alloca i8
%2 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = load i8, i8* %1
%4 = sub i8 -37, %3
%5 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8 signext %4)
ret i32 0
}
__float128 from_uns_char_load(unsigned char *a) { return (__float128)*a; }


x86 assembly (clang, -O0):
<from_uns_char_load>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edi
call   1120 <__floatsitf>
add    $0x10,%rsp
pop    %rbp
ret
xchg   %ax,%ax

x86 assembly (clang, -O2):
<from_uns_char_load>:
push   %rax
movzbl (%rdi),%edi
call   1110 <__floatsitf>
pop    %rax
ret
nopl   0x0(%rax,%rax,1)

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

LLVM IR (-O2):
define fp128 @from_uns_char_load(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = uitofp i8 %2 to fp128
ret fp128 %3
}
/* Variables and functions */
int EXIT_FAILURE;
int EXIT_SUCCESS;
char *basename(char *);
scalar_t__ fnmatch(char *, char *, int);
int do_name(char *path, char *pattern) {
  char *filename = basename(path);
  int flags = 0;
  if (fnmatch(pattern, filename, flags) == 0) {
    return EXIT_SUCCESS;
  }
  return EXIT_FAILURE;
}


x86 assembly (clang, -O0):
<do_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <basename@plt>
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x24(%rbp),%edx
call   1030 <fnmatch@plt>
cmp    $0x0,%rax
jne    116f <do_name+0x4f>
mov    0x2e73(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    117b <do_name+0x5b>
mov    0x2e6a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_name>:
push   %rbx
mov    %rsi,%rbx
call   1040 <basename@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
xor    %edx,%edx
call   1030 <fnmatch@plt>
test   %rax,%rax
jne    1144 <do_name+0x24>
mov    0x2e96(%rip),%rax
jmp    114b <do_name+0x2b>
mov    0x2e95(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
@EXIT_FAILURE = global i32 0
define i32 @do_name(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = call i8* @basename(i8* %8)
store i8* %9, i8** %6
store i32 0, i32* %7
%10 = load i8*, i8** %5
%11 = load i8*, i8** %6
%12 = load i32, i32* %7
%13 = call i64 @fnmatch(i8* %10, i8* %11, i32 %12)
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %2
%16 = load i32, i32* @EXIT_SUCCESS
store i32 %16, i32* %3
br label %19
17: ; preds = %2
%18 = load i32, i32* @EXIT_FAILURE
store i32 %18, i32* %3
br label %19
19: ; preds = %17, %15
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@EXIT_FAILURE = global i32 0
define i32 @do_name(i8* %0, i8* %1) {
%3 = tail call i8* @basename(i8* %0)
%4 = tail call i64 @fnmatch(i8* %1, i8* %3, i32 0)
%5 = icmp eq i64 %4, 0
%6 = load i32, i32* @EXIT_SUCCESS
%7 = load i32, i32* @EXIT_FAILURE
%8 = select i1 %5, i32 %6, i32 %7
ret i32 %8
}
/* Type definitions */
struct cli_def {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void pc(struct cli_def *cli __attribute__((unused)), char *string) {
  printf("%s\n", string);
}


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

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

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

LLVM IR (-O2):
%struct.cli_def = type { i32 }
@.str = [4 x i8] c"%s\0A\00"
define void @pc(%struct.cli_def* nocapture readnone %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int reccursive_sum_till_0(int num, int sum) {
  if (num >= 0) {
    sum += num;
    reccursive_sum_till_0(num - 1, sum);
  } else
    printf("Sum: %d", sum);
}


x86 assembly (clang, -O0):
<reccursive_sum_till_0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1154 <reccursive_sum_till_0+0x34>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0xc(%rbp),%esi
call   1040 <reccursive_sum_till_0@plt>
jmp    1163 <reccursive_sum_till_0+0x43>
mov    -0xc(%rbp),%esi
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reccursive_sum_till_0>:
test   %edi,%edi
js     112b <reccursive_sum_till_0+0x1b>
mov    %edi,%eax
imul   %edi,%eax
mov    %edi,%ecx
add    $0xffffffff,%edi
imul   %rcx,%rdi
shr    %rdi
add    %esi,%eax
sub    %edi,%eax
mov    %eax,%esi
lea    0xece(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"Sum: %d\00"
define i32 @reccursive_sum_till_0(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* %4
%7 = icmp sge i32 %6, 0
br i1 %7, label %8, label %16
8: ; preds = %2
%9 = load i32, i32* %4
%10 = load i32, i32* %5
%11 = add nsw i32 %10, %9
store i32 %11, i32* %5
%12 = load i32, i32* %4
%13 = sub nsw i32 %12, 1
%14 = load i32, i32* %5
%15 = call i32 @reccursive_sum_till_0(i32 %13, i32 %14)
br label %19
16: ; preds = %2
%17 = load i32, i32* %5
%18 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %17)
br label %19
19: ; preds = %16, %8
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
@.str = [8 x i8] c"Sum: %d\00"
define i32 @reccursive_sum_till_0(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, -1
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = mul i32 %0, %0
%6 = zext i32 %0 to i33
%7 = add nsw i32 %0, -1
%8 = zext i32 %7 to i33
%9 = mul i33 %6, %8
%10 = lshr i33 %9, 1
%11 = trunc i33 %10 to i32
%12 = add i32 %5, %1
%13 = sub i32 %12, %11
br label %14
14: ; preds = %4, %2
%15 = phi i32 [ %1, %2 ], [ %13, %4 ]
%16 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %15)
ret i32 undef
}
/* Variables and functions */
scalar_t__ isspace(char);
char *CmdParse_SkipSpace(char *ptr) {
  while (isspace(*ptr))
    ++ptr;
  return ptr;
}


x86 assembly (clang, -O0):
<CmdParse_SkipSpace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     1143 <CmdParse_SkipSpace+0x33>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <CmdParse_SkipSpace+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CmdParse_SkipSpace>:
push   %rbx
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
nopl   0x0(%rax,%rax,1)
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <isspace@plt>
test   %rax,%rax
jne    1120 <CmdParse_SkipSpace+0x10>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @CmdParse_SkipSpace(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %8, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = call i64 @isspace(i8 signext %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %2
br label %3
11: ; preds = %3
%12 = load i8*, i8** %2
ret i8* %12
}

LLVM IR (-O2):
define i8* @CmdParse_SkipSpace(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = tail call i64 @isspace(i8 signext %4)
%6 = icmp eq i64 %5, 0
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i8* %3
}
/* Type definitions */
typedef scalar_t__ ssize_t;

/* Variables and functions */
ssize_t sign(ssize_t v) {
  if (v > 0)
    return 1;
  if (v < 0)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<sign>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jle    1120 <sign+0x20>
movq   $0x1,-0x8(%rbp)
jmp    1140 <sign+0x40>
cmpq   $0x0,-0x10(%rbp)
jge    1138 <sign+0x38>
movq   $0xffffffffffffffff,-0x8(%rbp)
ff
jmp    1140 <sign+0x40>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sign>:
mov    %rdi,%rcx
sar    $0x3f,%rcx
test   %rdi,%rdi
mov    $0x1,%eax
cmovle %rcx,%rax
ret

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

LLVM IR (-O2):
define i64 @sign(i64 %0) {
%2 = ashr i64 %0, 63
%3 = icmp slt i64 %0, 1
%4 = select i1 %3, i64 %2, i64 1
ret i64 %4
}
/* Variables and functions */
int wl12xx_init();
int init_module(void) {
  int __attribute__((__cold__)) tmp;
  {
    { tmp = wl12xx_init(); }
    return ((int)tmp);
  }
}


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

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

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

LLVM IR (-O2):
define i32 @init_module() {
%1 = tail call i32 (...) @wl12xx_init()
ret i32 %1
}
void replicationSendNewlineToMaster(void) {
  _serverPanic("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/"
               "heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c",
               109, "Function '%s' is disabled.", __func__);
}


x86 assembly (clang, -O0):
<replicationSendNewlineToMaster>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x6d,%esi
lea    0xf79(%rip),%rdx
lea    0xf8d(%rip),%rcx
mov    $0x0,%al
call   1030 <_serverPanic@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<replicationSendNewlineToMaster>:
lea    0xee9(%rip),%rdi
lea    0xf82(%rip),%rdx
lea    0xf96(%rip),%rcx
mov    $0x6d,%esi
xor    %eax,%eax
jmp    1030 <_serverPanic@plt>

LLVM IR (-O0):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.replicationSendNewlineToMaster = [31 x i8] c"replicationSendNewlineToMaster\00"
define void @replicationSendNewlineToMaster() {
%1 = call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 109, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @__func__.replicationSendNewlineToMaster, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.replicationSendNewlineToMaster = [31 x i8] c"replicationSendNewlineToMaster\00"
define void @replicationSendNewlineToMaster() {
%1 = tail call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 109, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @__func__.replicationSendNewlineToMaster, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ __bsd_getpgrp(int /*<<< orphan*/);
pid_t __getpgid(pid_t pid) { return __bsd_getpgrp(pid); }


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

x86 assembly (clang, -O2):
<__getpgid>:
jmp    1030 <__bsd_getpgrp@plt>

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

LLVM IR (-O2):
define i32 @__getpgid(i32 %0) {
%2 = tail call i32 @__bsd_getpgrp(i32 %0)
ret i32 %2
}
int driveBL(int forwardPower, int turnPower) { return 0; }


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

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

LLVM IR (-O0):
define i32 @driveBL(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
ret i32 0
}

LLVM IR (-O2):
define i32 @driveBL(i32 %0, i32 %1) {
ret i32 0
}
int next_color(int color) { return (color == 0) ? 1 : 0; }


x86 assembly (clang, -O0):
<next_color>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_color>:
xor    %eax,%eax
test   %edi,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @next_color(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int msx_read(char *);
int /*<<< orphan*/ sprintf(char *, char *, int, char *);
int msx_readproc(int pid, char *item) {
  char fn[30];
  sprintf(fn, "/proc/%d/%s", pid, item);
  return (msx_read(fn));
}


x86 assembly (clang, -O0):
<msx_readproc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x4(%rbp),%edx
mov    -0x10(%rbp),%rcx
lea    0xebf(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x30(%rbp),%rdi
call   1030 <msx_read@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msx_readproc>:
push   %rbx
sub    $0x20,%rsp
mov    %rsi,%rcx
mov    %edi,%edx
lea    0xecf(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <msx_read@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"/proc/%d/%s\00"
define i32 @msx_readproc(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca [30 x i8]
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = getelementptr inbounds [30 x i8], [30 x i8]* %5, i64 0, i64 0
%7 = load i32, i32* %3
%8 = load i8*, i8** %4
%9 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %7, i8* %8)
%10 = getelementptr inbounds [30 x i8], [30 x i8]* %5, i64 0, i64 0
%11 = call i32 @msx_read(i8* %10)
ret i32 %11
}

LLVM IR (-O2):
@.str = [12 x i8] c"/proc/%d/%s\00"
define i32 @msx_readproc(i32 %0, i8* %1) {
%3 = alloca [30 x i8]
%4 = getelementptr inbounds [30 x i8], [30 x i8]* %3, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %0, i8* %1)
%6 = call i32 @msx_read(i8* %4)
ret i32 %6
}
int rmd160_test(void) { return 2; }


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

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

LLVM IR (-O0):
define i32 @rmd160_test() {
ret i32 2
}

LLVM IR (-O2):
define i32 @rmd160_test() {
ret i32 2
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char const *);
scalar_t__ strncmp(char const *, char const *, int /*<<< orphan*/);
int check_prefix(const char *prefix, const char *str) {
  return strncmp(prefix, str, strlen(prefix)) == 0;
}


x86 assembly (clang, -O0):
<check_prefix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_prefix>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @check_prefix(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %3
%8 = call i32 @strlen(i8* %7)
%9 = call i64 @strncmp(i8* %5, i8* %6, i32 %8)
%10 = icmp eq i64 %9, 0
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @check_prefix(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i64 @strncmp(i8* %0, i8* %1, i32 %3)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ my_free1(int *);
scalar_t__ my_malloc2(int, int);
void test6() {
  int *data = (int *)my_malloc2(1, 4);
  my_free1((int *)data);
  my_free1((int *)data);
}


x86 assembly (clang, -O0):
<test6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
mov    $0x4,%esi
call   1040 <my_malloc2@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <my_free1@plt>
mov    -0x8(%rbp),%rdi
call   1030 <my_free1@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test6>:
push   %rbx
mov    $0x1,%edi
mov    $0x4,%esi
call   1040 <my_malloc2@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <my_free1@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <my_free1@plt>

LLVM IR (-O0):
define void @test6() {
%1 = alloca i32*
%2 = call i64 @my_malloc2(i32 1, i32 4)
%3 = inttoptr i64 %2 to i32*
store i32* %3, i32** %1
%4 = load i32*, i32** %1
%5 = call i32 @my_free1(i32* %4)
%6 = load i32*, i32** %1
%7 = call i32 @my_free1(i32* %6)
ret void
}

LLVM IR (-O2):
define void @test6() {
%1 = tail call i64 @my_malloc2(i32 1, i32 4)
%2 = inttoptr i64 %1 to i32*
%3 = tail call i32 @my_free1(i32* %2)
%4 = tail call i32 @my_free1(i32* %2)
ret void
}
unsigned short f2(unsigned short a) {
  return (a & 0xff00) >> 8 | (a & 0x00ff) << 8;
}


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
and    $0xff00,%eax
sar    $0x8,%eax
movzwl -0x2(%rbp),%ecx
and    $0xff,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
mov    %edi,%eax
rol    $0x8,%ax
ret

LLVM IR (-O0):
define zeroext i16 @f2(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, 65280
%6 = ashr i32 %5, 8
%7 = load i16, i16* %2
%8 = zext i16 %7 to i32
%9 = and i32 %8, 255
%10 = shl i32 %9, 8
%11 = or i32 %6, %10
%12 = trunc i32 %11 to i16
ret i16 %12
}

LLVM IR (-O2):
define zeroext i16 @f2(i16 zeroext %0) {
%2 = tail call i16 @llvm.bswap.i16(i16 %0)
ret i16 %2
}
void be_uint24_write(void *ptr, unsigned v) {
  unsigned char *ptr8 = (unsigned char *)ptr;
  ptr8[2] = v & 0xFF;
  ptr8[1] = (v >> 8) & 0xFF;
  ptr8[0] = (v >> 16) & 0xFF;
}


x86 assembly (clang, -O0):
<be_uint24_write>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0xc(%rbp),%eax
shr    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0xc(%rbp),%eax
shr    $0x10,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<be_uint24_write>:
mov    %esi,%eax
rol    $0x8,%ax
mov    %ax,0x1(%rdi)
shr    $0x10,%esi
mov    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @be_uint24_write(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
store i8* %6, i8** %5
%7 = load i32, i32* %4
%8 = and i32 %7, 255
%9 = trunc i32 %8 to i8
%10 = load i8*, i8** %5
%11 = getelementptr inbounds i8, i8* %10, i64 2
store i8 %9, i8* %11
%12 = load i32, i32* %4
%13 = lshr i32 %12, 8
%14 = and i32 %13, 255
%15 = trunc i32 %14 to i8
%16 = load i8*, i8** %5
%17 = getelementptr inbounds i8, i8* %16, i64 1
store i8 %15, i8* %17
%18 = load i32, i32* %4
%19 = lshr i32 %18, 16
%20 = and i32 %19, 255
%21 = trunc i32 %20 to i8
%22 = load i8*, i8** %5
%23 = getelementptr inbounds i8, i8* %22, i64 0
store i8 %21, i8* %23
ret void
}

LLVM IR (-O2):
define void @be_uint24_write(i8* nocapture writeonly %0, i32 %1) {
%3 = trunc i32 %1 to i8
%4 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %3, i8* %4
%5 = lshr i32 %1, 8
%6 = trunc i32 %5 to i8
%7 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %6, i8* %7
%8 = lshr i32 %1, 16
%9 = trunc i32 %8 to i8
store i8 %9, i8* %0
ret void
}
/* Variables and functions */
int func2();
int __attribute__((visibility("default"))) func(void) { return func2(); }


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

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

LLVM IR (-O0):
define i32 @func() {
%1 = call i32 (...) @func2()
ret i32 %1
}

LLVM IR (-O2):
define i32 @func() {
%1 = tail call i32 (...) @func2()
ret i32 %1
}
/* Type definitions */
struct proxy_client {
  int dummy;
};

/* Variables and functions */
int proxy_client_recv(struct proxy_client *);
int proxy_client_recv_cb(void *client, void *data) {
  return proxy_client_recv((struct proxy_client *)client);
}


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

x86 assembly (clang, -O2):
<proxy_client_recv_cb>:
jmp    1030 <proxy_client_recv@plt>

LLVM IR (-O0):
%struct.proxy_client = type { i32 }
define i32 @proxy_client_recv_cb(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to %struct.proxy_client*
%7 = call i32 @proxy_client_recv(%struct.proxy_client* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.proxy_client = type { i32 }
define i32 @proxy_client_recv_cb(i8* %0, i8* nocapture readnone %1) {
%3 = bitcast i8* %0 to %struct.proxy_client*
%4 = tail call i32 @proxy_client_recv(%struct.proxy_client* %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ my_task(double *, double *);
void registered_via_two_paths(int x) {
  double p[12], q[34];
  if (x > 42) {
#pragma starpu register p
  } else {
#pragma starpu register p
  }
#pragma starpu register q
  my_task(p, q);
}


x86 assembly (clang, -O0):
<registered_via_two_paths>:
push   %rbp
mov    %rsp,%rbp
sub    $0x180,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x2a,-0x4(%rbp)
jle    112d <registered_via_two_paths+0x1d>
jmp    1132 <registered_via_two_paths+0x22>
jmp    1132 <registered_via_two_paths+0x22>
lea    -0x70(%rbp),%rdi
lea    -0x180(%rbp),%rsi
call   1030 <my_task@plt>
add    $0x180,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<registered_via_two_paths>:
sub    $0x178,%rsp
mov    %rsp,%rdi
lea    0x60(%rsp),%rsi
call   1030 <my_task@plt>
add    $0x178,%rsp
ret

LLVM IR (-O0):
define void @registered_via_two_paths(i32 %0) {
%2 = alloca i32
%3 = alloca [12 x double]
%4 = alloca [34 x double]
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = icmp sgt i32 %5, 42
br i1 %6, label %7, label %8
7: ; preds = %1
br label %9
8: ; preds = %1
br label %9
9: ; preds = %8, %7
%10 = getelementptr inbounds [12 x double], [12 x double]* %3, i64 0, i64 0
%11 = getelementptr inbounds [34 x double], [34 x double]* %4, i64 0, i64 0
%12 = call i32 @my_task(double* %10, double* %11)
ret void
}

LLVM IR (-O2):
define void @registered_via_two_paths(i32 %0) {
%2 = alloca [12 x double]
%3 = alloca [34 x double]
%4 = bitcast [12 x double]* %2 to i8*
%5 = bitcast [34 x double]* %3 to i8*
%6 = getelementptr inbounds [12 x double], [12 x double]* %2, i64 0, i64 0
%7 = getelementptr inbounds [34 x double], [34 x double]* %3, i64 0, i64 0
%8 = call i32 @my_task(double* %6, double* %7)
ret void
}
/* Variables and functions */
int extractfile(char *);
int prepare_zip() { return extractfile("/dev/input"); }


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"/dev/input\00"
define i32 @prepare_zip() {
%1 = call i32 @extractfile(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [11 x i8] c"/dev/input\00"
define i32 @prepare_zip() {
%1 = tail call i32 @extractfile(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
int mus_wav_fadeout_start(int ch, int time, int volume, int stop) {
  if (volume == 0 && stop)
    return muspcm_fadeout(ch + 1, time);
  printf("%s not implemented\n", __func__);
  return (-1);
}


x86 assembly (clang, -O0):
<mus_wav_fadeout_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
cmpl   $0x0,-0x10(%rbp)
jne    1160 <mus_wav_fadeout_start+0x40>
cmpl   $0x0,-0x14(%rbp)
je     1160 <mus_wav_fadeout_start+0x40>
mov    -0x8(%rbp),%edi
add    $0x1,%edi
mov    -0xc(%rbp),%esi
mov    $0x0,%al
call   1040 <muspcm_fadeout@plt>
mov    %eax,-0x4(%rbp)
jmp    117c <mus_wav_fadeout_start+0x5c>
lea    0xe99(%rip),%rdi
lea    0xea6(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mus_wav_fadeout_start>:
test   %edx,%edx
jne    1132 <mus_wav_fadeout_start+0x12>
test   %ecx,%ecx
je     1132 <mus_wav_fadeout_start+0x12>
add    $0x1,%edi
xor    %eax,%eax
jmp    1040 <muspcm_fadeout@plt>
push   %rax
lea    0xec6(%rip),%rdi
lea    0xed3(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"%s not implemented\0A\00"
@__func__.mus_wav_fadeout_start = [22 x i8] c"mus_wav_fadeout_start\00"
define i32 @mus_wav_fadeout_start(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
%10 = load i32, i32* %8
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %20
12: ; preds = %4
%13 = load i32, i32* %9
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %20
15: ; preds = %12
%16 = load i32, i32* %6
%17 = add nsw i32 %16, 1
%18 = load i32, i32* %7
%19 = call i32 (i32, i32, ...) bitcast (i32 (...)* @muspcm_fadeout to i32 (i32, i32, ...)*)(i32 %17, i32 %18)
store i32 %19, i32* %5
br label %22
20: ; preds = %12, %4
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @__func__.mus_wav_fadeout_start, i64 0, i64 0))
store i32 -1, i32* %5
br label %22
22: ; preds = %20, %15
%23 = load i32, i32* %5
ret i32 %23
}

LLVM IR (-O2):
@.str = [20 x i8] c"%s not implemented\0A\00"
@__func__.mus_wav_fadeout_start = [22 x i8] c"mus_wav_fadeout_start\00"
define i32 @mus_wav_fadeout_start(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp eq i32 %2, 0
%6 = icmp ne i32 %3, 0
%7 = and i1 %5, %6
br i1 %7, label %8, label %11
8: ; preds = %4
%9 = add nsw i32 %0, 1
%10 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @muspcm_fadeout to i32 (i32, i32, ...)*)(i32 %9, i32 %1)
br label %13
11: ; preds = %4
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @__func__.mus_wav_fadeout_start, i64 0, i64 0))
br label %13
13: ; preds = %11, %8
%14 = phi i32 [ %10, %8 ], [ -1, %11 ]
ret i32 %14
}
int is_r32(int id) {
  switch (id) {
  case 154:
  case 156:
  case 157:
  case 159:
  case 160:
  case 158:
  case 155:
  case 162:
    return (1);
  default:
    return (0);
  }
}


x86 assembly (clang, -O0):
<is_r32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
add    $0xffffff66,%eax
sub    $0x7,%eax
jb     1133 <is_r32+0x33>
jmp    1120 <is_r32+0x20>
mov    -0xc(%rbp),%eax
sub    $0xa2,%eax
jne    113f <is_r32+0x3f>
jmp    1133 <is_r32+0x33>
movl   $0x1,-0x4(%rbp)
jmp    1146 <is_r32+0x46>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_r32>:
add    $0xffffff66,%edi
xor    %eax,%eax
cmp    $0x8,%edi
ja     111a <is_r32+0x1a>
movslq %edi,%rax
lea    0xee9(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @is_r32(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %6 [
i32 154, label %5
i32 156, label %5
i32 157, label %5
i32 159, label %5
i32 160, label %5
i32 158, label %5
i32 155, label %5
i32 162, label %5
]
5: ; preds = %1, %1, %1, %1, %1, %1, %1, %1
store i32 1, i32* %2
br label %7
6: ; preds = %1
store i32 0, i32* %2
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
@switch.table.is_r32 = [9 x i32] [i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 0, i32 1]
define i32 @is_r32(i32 %0) {
%2 = add i32 %0, -154
%3 = icmp ult i32 %2, 9
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds [9 x i32], [9 x i32]* @switch.table.is_r32, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ 0, %1 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("Hello Squirrel");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [15 x i8] c"Hello Squirrel\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}