xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint32_t;
struct riku_devfs_node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ x86vga_putch(struct riku_devfs_node *, char const);
int x86vga_puts(struct riku_devfs_node *self, const char *c, uint32_t count) {
  int i = 0;
  while (i < count) {
    x86vga_putch(self, c[i]);
    i++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<x86vga_puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1159 <x86vga_puts+0x49>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
call   1030 <x86vga_putch@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    112a <x86vga_puts+0x1a>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x86vga_puts>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edx,%edx
jle    1146 <x86vga_puts+0x36>
mov    %rsi,%r14
mov    %rdi,%r15
mov    %edx,%r12d
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
movsbl (%r14,%rbx,1),%esi
mov    %r15,%rdi
call   1030 <x86vga_putch@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <x86vga_puts+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

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


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_w_qpel_h32_10_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  printf("Content-type: text/plain\n");
  printf("\n");
  printf("argc = %d\n", argc);
  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
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %edi,%ebx
lea    0xed1(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xeb0(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Content-type: text/plain\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [11 x i8] c"argc = %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%8 = load i32, i32* %4
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str.2 = [11 x i8] c"argc = %d\0A\00"
@str = [25 x i8] c"Content-type: text/plain\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @putchar(i32 10)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ error_reason(char *, unsigned long long);
char *strdup(char const *);
scalar_t__ strlen(char const *);
char *misc_strdup(const char *s) {
  char *result;
  result = strdup(s);
  if (result == NULL) {
    error_reason("Could not allocate %lld bytes of memory",
                 (unsigned long long)strlen(s) + 1);
  }
  return result;
}


x86 assembly (clang, -O0):
<misc_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strdup@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1170 <misc_strdup+0x40>
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rsi
add    $0x1,%rsi
lea    0xe95(%rip),%rdi
call   1030 <error_reason@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<misc_strdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1050 <strdup@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    115c <misc_strdup+0x2c>
mov    %r14,%rdi
call   1040 <strlen@plt>
lea    0x1(%rax),%rsi
lea    0xea9(%rip),%rdi
call   1030 <error_reason@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [40 x i8] c"Could not allocate %lld bytes of memory\00"
define i8* @misc_strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strdup(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %13
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = call i64 @strlen(i8* %9)
%11 = add i64 %10, 1
%12 = call i32 @error_reason(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i64 %11)
br label %13
13: ; preds = %8, %1
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
@.str = [40 x i8] c"Could not allocate %lld bytes of memory\00"
define noalias i8* @misc_strdup(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%6 = add i64 %5, 1
%7 = tail call i32 @error_reason(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i64 %6)
br label %8
8: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
scalar_t__ is_dir(char const *);
int /*<<< orphan*/ process_directory(char const *);
int /*<<< orphan*/ process_file(char const *);
void process_path(const char *path) {
  if (is_dir(path)) {
    process_directory(path);
  } else {
    process_file(path);
  }
}


x86 assembly (clang, -O0):
<process_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <is_dir@plt>
cmp    $0x0,%rax
je     115d <process_path+0x2d>
mov    -0x8(%rbp),%rdi
call   1050 <process_directory@plt>
jmp    1166 <process_path+0x36>
mov    -0x8(%rbp),%rdi
call   1030 <process_file@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process_path>:
push   %rbx
mov    %rdi,%rbx
call   1040 <is_dir@plt>
mov    %rbx,%rdi
test   %rax,%rax
je     1147 <process_path+0x17>
pop    %rbx
jmp    1050 <process_directory@plt>
pop    %rbx
jmp    1030 <process_file@plt>

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

LLVM IR (-O2):
define void @process_path(i8* %0) {
%2 = tail call i64 @is_dir(i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @process_directory(i8* %0)
br label %8
6: ; preds = %1
%7 = tail call i32 @process_file(i8* %0)
br label %8
8: ; preds = %6, %4
ret void
}
int GetReservedAES128Cipher(void *cipher) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @GetReservedAES128Cipher(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
char read_char(int);
char read_char_c(int sock) { return (read_char(sock)); }


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

x86 assembly (clang, -O2):
<read_char_c>:
jmp    1030 <read_char@plt>

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

LLVM IR (-O2):
define signext i8 @read_char_c(i32 %0) {
%2 = tail call signext i8 @read_char(i32 %0)
ret i8 %2
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void wait(int count) {
  while (count-- > 0)
    putchar('\0');
}


x86 assembly (clang, -O0):
<wait>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
jle    113b <wait+0x2b>
xor    %edi,%edi
call   1030 <putchar@plt>
jmp    111b <wait+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wait>:
push   %rbx
test   %edi,%edi
jle    112f <wait+0x1f>
mov    %edi,%ebx
add    $0x1,%ebx
nopw   0x0(%rax,%rax,1)
xor    %edi,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
cmp    $0x1,%ebx
ja     1120 <wait+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @wait(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %7, %1
%4 = load i32, i32* %2
%5 = add nsw i32 %4, -1
store i32 %5, i32* %2
%6 = icmp sgt i32 %4, 0
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = call i32 @putchar(i8 signext 0)
br label %3
9: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @wait(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %5, %3 ], [ %0, %1 ]
%5 = add nsw i32 %4, -1
%6 = tail call i32 @putchar(i8 signext 0)
%7 = icmp ugt i32 %4, 1
br i1 %7, label %3, label %8
8: ; preds = %3, %1
ret void
}
void foo(int *buf, int len) {
  while (len-- > 0) {
    *buf++ = 0;
  }
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
jle    1139 <foo+0x39>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x8(%rbp)
movl   $0x0,(%rax)
jmp    110b <foo+0xb>
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
test   %esi,%esi
jle    1126 <foo+0x16>
push   %rax
mov    %esi,%edx
shl    $0x2,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @foo(i32* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = bitcast i32* %0 to i8*
%6 = zext i32 %1 to i64
%7 = shl nuw nsw i64 %6, 2
br label %8
8: ; preds = %4, %2
ret void
}
float fast_atan(float value) {
  float square = value * value;
  float result = 0.0208351f;
  result *= square;
  result -= 0.085133f;
  result *= square;
  result += 0.180141f;
  result *= square;
  result -= 0.3302995f;
  result *= square;
  result += 0.999866f;
  result *= value;
  return result;
}


x86 assembly (clang, -O0):
<fast_atan>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xef0(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  0xecb(%rip),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xea7(%rip),%xmm0
addss  -0xc(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  0xe7d(%rip),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xe59(%rip),%xmm0
addss  -0xc(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fast_atan>:
movaps %xmm0,%xmm1
mulss  %xmm0,%xmm1
movss  0xef1(%rip),%xmm2
mulss  %xmm1,%xmm2
addss  0xee9(%rip),%xmm2
mulss  %xmm1,%xmm2
addss  0xee1(%rip),%xmm2
mulss  %xmm1,%xmm2
addss  0xed9(%rip),%xmm2
mulss  %xmm1,%xmm2
addss  0xed1(%rip),%xmm2
mulss  %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @fast_atan(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca float
store float %0, float* %2
%5 = load float, float* %2
%6 = load float, float* %2
%7 = fmul float %5, %6
store float %7, float* %3
store float 0x3F9555CBE0000000, float* %4
%8 = load float, float* %3
%9 = load float, float* %4
%10 = fmul float %9, %8
store float %10, float* %4
%11 = load float, float* %4
%12 = fsub float %11, 0x3FB5CB46C0000000
store float %12, float* %4
%13 = load float, float* %3
%14 = load float, float* %4
%15 = fmul float %14, %13
store float %15, float* %4
%16 = load float, float* %4
%17 = fadd float %16, 0x3FC70EDC40000000
store float %17, float* %4
%18 = load float, float* %3
%19 = load float, float* %4
%20 = fmul float %19, %18
store float %20, float* %4
%21 = load float, float* %4
%22 = fsub float %21, 0x3FD523A080000000
store float %22, float* %4
%23 = load float, float* %3
%24 = load float, float* %4
%25 = fmul float %24, %23
store float %25, float* %4
%26 = load float, float* %4
%27 = fadd float %26, 0x3FEFFEE700000000
store float %27, float* %4
%28 = load float, float* %2
%29 = load float, float* %4
%30 = fmul float %29, %28
store float %30, float* %4
%31 = load float, float* %4
ret float %31
}

LLVM IR (-O2):
define float @fast_atan(float %0) {
%2 = fmul float %0, %0
%3 = fmul float %2, 0x3F9555CBE0000000
%4 = fadd float %3, 0xBFB5CB46C0000000
%5 = fmul float %2, %4
%6 = fadd float %5, 0x3FC70EDC40000000
%7 = fmul float %2, %6
%8 = fadd float %7, 0xBFD523A080000000
%9 = fmul float %2, %8
%10 = fadd float %9, 0x3FEFFEE700000000
%11 = fmul float %10, %0
ret float %11
}
void f1() { static int l0 __attribute__((used)) = 5225; }


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

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

LLVM IR (-O0):
@f1.l0 = internal global i32 5225
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (i32* @f1.l0 to i8*)], section "llvm.metadata"
define void @f1() {
ret void
}

LLVM IR (-O2):
@f1.l0 = internal global i32 5225
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (i32* @f1.l0 to i8*)], section "llvm.metadata"
define void @f1() {
ret void
}
void av_get_media_type_string() {}


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

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

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

LLVM IR (-O2):
define void @av_get_media_type_string() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ des_block;
typedef int /*<<< orphan*/ bool_t;
typedef int /*<<< orphan*/ XDR;

/* Variables and functions */
int /*<<< orphan*/ xdr_opaque(int /*<<< orphan*/ *, char *, int);
bool_t xdr_des_block(XDR *xdrs, des_block *blkp) {
  return (xdr_opaque(xdrs, (char *)blkp, sizeof(des_block)));
}


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

x86 assembly (clang, -O2):
<xdr_des_block>:
mov    $0x4,%edx
jmp    1030 <xdr_opaque@plt>

LLVM IR (-O0):
define i32 @xdr_des_block(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %3
%6 = load i32*, i32** %4
%7 = bitcast i32* %6 to i8*
%8 = call i32 @xdr_opaque(i32* %5, i8* %7, i32 4)
ret i32 %8
}

LLVM IR (-O2):
define i32 @xdr_des_block(i32* %0, i32* %1) {
%3 = bitcast i32* %1 to i8*
%4 = tail call i32 @xdr_opaque(i32* %0, i8* %3, i32 4)
ret i32 %4
}
unsigned int csum_partial(const unsigned char *buff, int len,
                          unsigned int sum) {
  int a = 0;
}


x86 assembly (clang, -O0):
<csum_partial>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @csum_partial(i8* nocapture readnone %0, i32 %1, i32 %2) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ mark_cur(char);
void mark_edit(void) { mark_cur('.'); }


x86 assembly (clang, -O0):
<mark_edit>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2e,%edi
call   1030 <mark_cur@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<mark_edit>:
mov    $0x2e,%edi
jmp    1030 <mark_cur@plt>

LLVM IR (-O0):
define void @mark_edit() {
%1 = call i32 @mark_cur(i8 signext 46)
ret void
}

LLVM IR (-O2):
define void @mark_edit() {
%1 = tail call i32 @mark_cur(i8 signext 46)
ret void
}
int toNativeFD(int x) { return x - 6; }


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

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

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

LLVM IR (-O2):
define i32 @toNativeFD(i32 %0) {
%2 = add nsw i32 %0, -6
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct chirp_client {
  int dummy;
};
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ simple_command(struct chirp_client *, int /*<<< orphan*/,
                                  char *, int /*<<< orphan*/);
int64_t chirp_client_close(struct chirp_client *c, int64_t fd,
                           time_t stoptime) {
  return simple_command(c, stoptime, "close %lld\n", fd);
}


x86 assembly (clang, -O0):
<chirp_client_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%ecx
lea    0xecd(%rip),%rdx
call   1030 <simple_command@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chirp_client_close>:
mov    %esi,%ecx
lea    0xee7(%rip),%rax
mov    %edx,%esi
mov    %rax,%rdx
jmp    1030 <simple_command@plt>

LLVM IR (-O0):
%struct.chirp_client = type { i32 }
@.str = [12 x i8] c"close %lld\0A\00"
define i32 @chirp_client_close(%struct.chirp_client* %0, i32 %1, i32 %2) {
%4 = alloca %struct.chirp_client*
%5 = alloca i32
%6 = alloca i32
store %struct.chirp_client* %0, %struct.chirp_client** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load %struct.chirp_client*, %struct.chirp_client** %4
%8 = load i32, i32* %6
%9 = load i32, i32* %5
%10 = call i32 @simple_command(%struct.chirp_client* %7, i32 %8, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.chirp_client = type { i32 }
@.str = [12 x i8] c"close %lld\0A\00"
define i32 @chirp_client_close(%struct.chirp_client* %0, i32 %1, i32 %2) {
%4 = tail call i32 @simple_command(%struct.chirp_client* %0, i32 %2, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 %4
}
/* Type definitions */
struct applinfo {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct applinfo *);
void free_buffers(struct applinfo *ap) { free(ap); }


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

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

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

LLVM IR (-O2):
%struct.applinfo = type { i32 }
define void @free_buffers(%struct.applinfo* nocapture %0) {
%2 = tail call i32 @free(%struct.applinfo* %0)
ret void
}
int nanosleep(const struct timespec *req, struct timespec *rem) {
  ;
  return -1;
}


x86 assembly (clang, -O0):
<nanosleep>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.timespec = type opaque
define i32 @nanosleep(%struct.timespec* %0, %struct.timespec* %1) {
%3 = alloca %struct.timespec*
%4 = alloca %struct.timespec*
store %struct.timespec* %0, %struct.timespec** %3
store %struct.timespec* %1, %struct.timespec** %4
ret i32 -1
}

LLVM IR (-O2):
%struct.timespec = type opaque
define i32 @nanosleep(%struct.timespec* nocapture readnone %0, %struct.timespec* nocapture readnone %1) {
ret i32 -1
}
int func3(void) { return (1); }


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

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

LLVM IR (-O0):
define i32 @func3() {
ret i32 1
}

LLVM IR (-O2):
define i32 @func3() {
ret i32 1
}
void f(int i) {
  int j;
  if (i && 10 / i > 2)
    j = i + 1;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     112c <f+0x2c>
mov    $0xa,%eax
cltd
idivl  -0x4(%rbp)
cmp    $0x2,%eax
jle    112c <f+0x2c>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @f(i32 %0) {
ret void
}
void test120_Mod_foo__I() {}


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

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

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

LLVM IR (-O2):
define void @test120_Mod_foo__I() {
ret void
}
double jac_chain_nm9_sign(double x) { return x < 0 ? -1 : x > 0 ? 1 : x; }


x86 assembly (clang, -O0):
<jac_chain_nm9_sign>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1129 <jac_chain_nm9_sign+0x29>
movsd  0xee9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1161 <jac_chain_nm9_sign+0x61>
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    114d <jac_chain_nm9_sign+0x4d>
movsd  0xebd(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1157 <jac_chain_nm9_sign+0x57>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<jac_chain_nm9_sign>:
xorpd  %xmm1,%xmm1
xorpd  %xmm2,%xmm2
cmpltsd %xmm0,%xmm2
movsd  0xeeb(%rip),%xmm3
andpd  %xmm2,%xmm3
andnpd %xmm0,%xmm2
orpd   %xmm3,%xmm2
cmpltsd %xmm1,%xmm0
movapd %xmm0,%xmm1
andnpd %xmm2,%xmm1
movsd  0xed2(%rip),%xmm2
andpd  %xmm2,%xmm0
orpd   %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @jac_chain_nm9_sign(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp olt double %3, 0.000000e+00
br i1 %4, label %5, label %6
5: ; preds = %1
br label %14
6: ; preds = %1
%7 = load double, double* %2
%8 = fcmp ogt double %7, 0.000000e+00
br i1 %8, label %9, label %10
9: ; preds = %6
br label %12
10: ; preds = %6
%11 = load double, double* %2
br label %12
12: ; preds = %10, %9
%13 = phi double [ 1.000000e+00, %9 ], [ %11, %10 ]
br label %14
14: ; preds = %12, %5
%15 = phi double [ -1.000000e+00, %5 ], [ %13, %12 ]
ret double %15
}

LLVM IR (-O2):
define double @jac_chain_nm9_sign(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = fcmp ogt double %0, 0.000000e+00
%4 = select i1 %3, double 1.000000e+00, double %0
%5 = select i1 %2, double -1.000000e+00, double %4
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ FALSE;
int /*<<< orphan*/ TRUE;
int /*<<< orphan*/ cbreak();
int /*<<< orphan*/ initscr();
int /*<<< orphan*/ intrflush(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ keypad(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ noecho();
int /*<<< orphan*/ nonl();
int /*<<< orphan*/ stdscr;
int curs_initscr() {
  initscr();
  cbreak();
  noecho();
  nonl();
  intrflush(stdscr, FALSE);
  keypad(stdscr, TRUE);
}


x86 assembly (clang, -O0):
<curs_initscr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <initscr@plt>
mov    $0x0,%al
call   1030 <cbreak@plt>
mov    $0x0,%al
call   1080 <noecho@plt>
mov    $0x0,%al
call   1070 <nonl@plt>
mov    0x2e5d(%rip),%rax
mov    (%rax),%edi
mov    0x2e3c(%rip),%rax
mov    (%rax),%esi
call   1060 <intrflush@plt>
mov    0x2e46(%rip),%rax
mov    (%rax),%edi
mov    0x2e35(%rip),%rax
mov    (%rax),%esi
call   1040 <keypad@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<curs_initscr>:
push   %rbx
xor    %eax,%eax
call   1050 <initscr@plt>
xor    %eax,%eax
call   1030 <cbreak@plt>
xor    %eax,%eax
call   1080 <noecho@plt>
xor    %eax,%eax
call   1070 <nonl@plt>
mov    0x2e64(%rip),%rbx
mov    (%rbx),%edi
mov    0x2e43(%rip),%rax
mov    (%rax),%esi
call   1060 <intrflush@plt>
mov    (%rbx),%edi
mov    0x2e43(%rip),%rax
mov    (%rax),%esi
pop    %rbx
jmp    1040 <keypad@plt>

LLVM IR (-O0):
@stdscr = global i32 0
@FALSE = global i32 0
@TRUE = global i32 0
define i32 @curs_initscr() {
%1 = alloca i32
%2 = call i32 (...) @initscr()
%3 = call i32 (...) @cbreak()
%4 = call i32 (...) @noecho()
%5 = call i32 (...) @nonl()
%6 = load i32, i32* @stdscr
%7 = load i32, i32* @FALSE
%8 = call i32 @intrflush(i32 %6, i32 %7)
%9 = load i32, i32* @stdscr
%10 = load i32, i32* @TRUE
%11 = call i32 @keypad(i32 %9, i32 %10)
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
@stdscr = global i32 0
@FALSE = global i32 0
@TRUE = global i32 0
define i32 @curs_initscr() {
%1 = tail call i32 (...) @initscr()
%2 = tail call i32 (...) @cbreak()
%3 = tail call i32 (...) @noecho()
%4 = tail call i32 (...) @nonl()
%5 = load i32, i32* @stdscr
%6 = load i32, i32* @FALSE
%7 = tail call i32 @intrflush(i32 %5, i32 %6)
%8 = load i32, i32* @stdscr
%9 = load i32, i32* @TRUE
%10 = tail call i32 @keypad(i32 %8, i32 %9)
ret i32 undef
}
/* Type definitions */
typedef int uint8_t;
typedef int int32_t;

/* Variables and functions */
void int32ToBuf(int32_t val, uint8_t *buf) {
  buf[0] = (val >> 24) & 0xff;
  buf[1] = (val >> 16) & 0xff;
  buf[2] = (val >> 8) & 0xff;
  buf[3] = (val >> 0) & 0xff;
}


x86 assembly (clang, -O0):
<int32ToBuf>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
sar    $0x18,%ecx
and    $0xff,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%ecx
sar    $0x10,%ecx
and    $0xff,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x4(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0x4(%rbp),%ecx
sar    $0x0,%ecx
and    $0xff,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<int32ToBuf>:
mov    %edi,%eax
mov    %edi,%ecx
movzbl %ah,%edx
movzbl %al,%edi
shr    $0x18,%eax
mov    %eax,(%rsi)
shr    $0x10,%ecx
movzbl %cl,%eax
mov    %eax,0x4(%rsi)
mov    %edx,0x8(%rsi)
mov    %edi,0xc(%rsi)
ret

LLVM IR (-O0):
define void @int32ToBuf(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 = ashr i32 %5, 24
%7 = and i32 %6, 255
%8 = load i32*, i32** %4
%9 = getelementptr inbounds i32, i32* %8, i64 0
store i32 %7, i32* %9
%10 = load i32, i32* %3
%11 = ashr i32 %10, 16
%12 = and i32 %11, 255
%13 = load i32*, i32** %4
%14 = getelementptr inbounds i32, i32* %13, i64 1
store i32 %12, i32* %14
%15 = load i32, i32* %3
%16 = ashr i32 %15, 8
%17 = and i32 %16, 255
%18 = load i32*, i32** %4
%19 = getelementptr inbounds i32, i32* %18, i64 2
store i32 %17, i32* %19
%20 = load i32, i32* %3
%21 = ashr i32 %20, 0
%22 = and i32 %21, 255
%23 = load i32*, i32** %4
%24 = getelementptr inbounds i32, i32* %23, i64 3
store i32 %22, i32* %24
ret void
}

LLVM IR (-O2):
define void @int32ToBuf(i32 %0, i32* nocapture writeonly %1) {
%3 = lshr i32 %0, 24
store i32 %3, i32* %1
%4 = lshr i32 %0, 16
%5 = and i32 %4, 255
%6 = getelementptr inbounds i32, i32* %1, i64 1
store i32 %5, i32* %6
%7 = lshr i32 %0, 8
%8 = and i32 %7, 255
%9 = getelementptr inbounds i32, i32* %1, i64 2
store i32 %8, i32* %9
%10 = and i32 %0, 255
%11 = getelementptr inbounds i32, i32* %1, i64 3
store i32 %10, i32* %11
ret void
}
int opa_isdigit(char b) { return b >= '0' && b <= '9'; }


x86 assembly (clang, -O0):
<opa_isdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0x2(%rbp)
jl     1129 <opa_isdigit+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<opa_isdigit>:
add    $0xd0,%dil
xor    %eax,%eax
cmp    $0xa,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @opa_isdigit(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 48
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 57
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @opa_isdigit(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void bar(void) { abort(); }


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

x86 assembly (clang, -O2):
<bar>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @bar() {
%1 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define void @bar() {
%1 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isprint(int);
void t_isprint_0x75() {
  Assert_real((isprint(117)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isprint.c",
              590, ("isprint should be 1 for u"));
}


x86 assembly (clang, -O0):
<t_isprint_0x75>:
push   %rbp
mov    %rsp,%rbp
mov    $0x75,%edi
call   1030 <isprint@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x24e,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isprint_0x75>:
push   %rax
mov    $0x75,%edi
call   1030 <isprint@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x24e,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isprint.c\00"
@.str.1 = [26 x i8] c"isprint should be 1 for u\00"
define void @t_isprint_0x75() {
%1 = call i32 @isprint(i32 117)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 590, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isprint.c\00"
@.str.1 = [26 x i8] c"isprint should be 1 for u\00"
define void @t_isprint_0x75() {
%1 = tail call i32 @isprint(i32 117)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 590, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *replace(char *, char const *, char const *);
char *replace_destruct(char *str, const char *oldstr, const char *newstr) {
  char *newstring = replace(str, oldstr, newstr);
  free(str);
  return newstring;
}


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

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

LLVM IR (-O0):
define i8* @replace_destruct(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = load i8*, i8** %4
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = call i8* @replace(i8* %8, i8* %9, i8* %10)
store i8* %11, i8** %7
%12 = load i8*, i8** %4
%13 = call i32 @free(i8* %12)
%14 = load i8*, i8** %7
ret i8* %14
}

LLVM IR (-O2):
define i8* @replace_destruct(i8* %0, i8* %1, i8* %2) {
%4 = tail call i8* @replace(i8* %0, i8* %1, i8* %2)
%5 = tail call i32 @free(i8* %0)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  printf("The median is %d\n",
         ((3) < (10) && (3) < (9)
              ? ((10) < (9) ? (10) : (9))
              : ((3) < (10) ? (10) : ((3) < (9) ? (3) : (9)))));
  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
mov    $0x9,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [18 x i8] c"The median is %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ my_free(int /*<<< orphan*/ *);
int main(int argc, char *argv[]) {
  my_free(NULL);
  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)
xor    %eax,%eax
mov    %eax,%edi
call   1030 <my_free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
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 @my_free(i32* null)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @my_free(i32* null)
ret i32 0
}
void destroy_work_on_stack(struct work_struct *work) {}


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

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

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

LLVM IR (-O2):
%struct.work_struct = type opaque
define void @destroy_work_on_stack(%struct.work_struct* nocapture %0) {
ret void
}
int intable(const int *table, const int tlen, const int value) {
  int i;
  for (i = 0; i < tlen; ++i)
    if (table[i] == value)
      return 1;
  return 0;
}


x86 assembly (clang, -O0):
<intable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1154 <intable+0x54>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x18(%rbp),%eax
jne    1141 <intable+0x41>
movl   $0x1,-0x4(%rbp)
jmp    115b <intable+0x5b>
jmp    1146 <intable+0x46>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1115 <intable+0x15>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<intable>:
test   %esi,%esi
jle    111e <intable+0x1e>
mov    %esi,%eax
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
cmp    %edx,(%rdi,%rcx,4)
je     1121 <intable+0x21>
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1110 <intable+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @intable(i32* nocapture %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %15
5: ; preds = %3
%6 = zext i32 %1 to i64
br label %9
7: ; preds = %9
%8 = icmp eq i64 %14, %6
br i1 %8, label %15, label %9
9: ; preds = %5, %7
%10 = phi i64 [ 0, %5 ], [ %14, %7 ]
%11 = getelementptr inbounds i32, i32* %0, i64 %10
%12 = load i32, i32* %11
%13 = icmp eq i32 %12, %2
%14 = add nuw nsw i64 %10, 1
br i1 %13, label %15, label %7
15: ; preds = %9, %7, %3
%16 = phi i32 [ 0, %3 ], [ 0, %7 ], [ 1, %9 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("\n			usage:\n			\tboarddata "
         "set mac [MAC Address] \n			\tboarddata get mac "
         "\n			\tboarddata set sn [Serial Number] \n	"
         "		\tboarddata get sn \n			\tboarddata "
         "set boot_abort [enable/disable] \n			\tboarddata "
         "get boot_abort \n			\tboarddata set mfg_state "
         "[Decimal Number] \n			\tboarddata get mfg_state "
         "\n			\tboarddata show \n			"
         "\tboarddata init \n			\n");
  exit(0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [328 x i8] c"\0A\09\09\09usage:\0A\09\09\09\09boarddata set mac [MAC Address] \0A\09\09\09\09boarddata get mac \0A\09\09\09\09boarddata set sn [Serial Number] \0A\09\09\09\09boarddata get sn \0A\09\09\09\09boarddata set boot_abort [enable/disable] \0A\09\09\09\09boarddata get boot_abort \0A\09\09\09\09boarddata set mfg_state [Decimal Number] \0A\09\09\09\09boarddata get mfg_state \0A\09\09\09\09boarddata show \0A\09\09\09\09boarddata init \0A\09\09\09\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([328 x i8], [328 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [327 x i8] c"\0A\09\09\09usage:\0A\09\09\09\09boarddata set mac [MAC Address] \0A\09\09\09\09boarddata get mac \0A\09\09\09\09boarddata set sn [Serial Number] \0A\09\09\09\09boarddata get sn \0A\09\09\09\09boarddata set boot_abort [enable/disable] \0A\09\09\09\09boarddata get boot_abort \0A\09\09\09\09boarddata set mfg_state [Decimal Number] \0A\09\09\09\09boarddata get mfg_state \0A\09\09\09\09boarddata show \0A\09\09\09\09boarddata init \0A\09\09\09\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([327 x i8], [327 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
struct dirent {
  int dummy;
};
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
int /*<<< orphan*/ closedir(int /*<<< orphan*/ *);
int /*<<< orphan*/ *opendir(char *);
struct dirent *readdir(int /*<<< orphan*/ *);
int get_num_descr() {
  DIR *dir = opendir("/proc/self/fd");
  struct dirent *entry;
  int num = 0;
  while ((entry = readdir(dir)) != 0) {
    num++;
  }
  closedir(dir);
  return num;
}


x86 assembly (clang, -O0):
<get_num_descr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xec1(%rip),%rdi
call   1030 <opendir@plt>
mov    %rax,-0x8(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <readdir@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     1174 <get_num_descr+0x44>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    114f <get_num_descr+0x1f>
mov    -0x8(%rbp),%rdi
call   1040 <closedir@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_num_descr>:
push   %r14
push   %rbx
push   %rax
lea    0xec5(%rip),%rdi
call   1030 <opendir@plt>
mov    %rax,%r14
mov    $0xffffffff,%ebx
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1050 <readdir@plt>
add    $0x1,%ebx
test   %rax,%rax
jne    1150 <get_num_descr+0x20>
mov    %r14,%rdi
call   1040 <closedir@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.dirent = type { i32 }
@.str = [14 x i8] c"/proc/self/fd\00"
define i32 @get_num_descr() {
%1 = alloca i32*
%2 = alloca %struct.dirent*
%3 = alloca i32
%4 = call i32* @opendir(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
store i32* %4, i32** %1
store i32 0, i32* %3
br label %5
5: ; preds = %9, %0
%6 = load i32*, i32** %1
%7 = call %struct.dirent* @readdir(i32* %6)
store %struct.dirent* %7, %struct.dirent** %2
%8 = icmp ne %struct.dirent* %7, null
br i1 %8, label %9, label %12
9: ; preds = %5
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 1
store i32 %11, i32* %3
br label %5
12: ; preds = %5
%13 = load i32*, i32** %1
%14 = call i32 @closedir(i32* %13)
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
%struct.dirent = type { i32 }
@.str = [14 x i8] c"/proc/self/fd\00"
define i32 @get_num_descr() {
%1 = tail call i32* @opendir(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %2, %0
%3 = phi i32 [ 0, %0 ], [ %6, %2 ]
%4 = tail call %struct.dirent* @readdir(i32* %1)
%5 = icmp eq %struct.dirent* %4, null
%6 = add nuw nsw i32 %3, 1
br i1 %5, label %7, label %2
7: ; preds = %2
%8 = tail call i32 @closedir(i32* %1)
ret i32 %3
}