xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ __NR_keyctl;
long syscall(int /*<<< orphan*/, int, unsigned long, unsigned long,
             unsigned long, unsigned long);
long __keyctl(int cmd, unsigned long arg2, unsigned long arg3,
              unsigned long arg4, unsigned long arg5) {
  return syscall(__NR_keyctl, cmd, arg2, arg3, arg4, arg5);
}


x86 assembly (clang, -O0):
<__keyctl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%r9
call   1030 <syscall@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__keyctl>:
mov    %r8,%r9
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %edi,%esi
mov    0x2ec3(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
@__NR_keyctl = global i32 0
define i64 @__keyctl(i32 %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = alloca i32
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
store i32 %0, i32* %6
store i64 %1, i64* %7
store i64 %2, i64* %8
store i64 %3, i64* %9
store i64 %4, i64* %10
%11 = load i32, i32* @__NR_keyctl
%12 = load i32, i32* %6
%13 = load i64, i64* %7
%14 = load i64, i64* %8
%15 = load i64, i64* %9
%16 = load i64, i64* %10
%17 = call i64 @syscall(i32 %11, i32 %12, i64 %13, i64 %14, i64 %15, i64 %16)
ret i64 %17
}

LLVM IR (-O2):
@__NR_keyctl = global i32 0
define i64 @__keyctl(i32 %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = load i32, i32* @__NR_keyctl
%7 = tail call i64 @syscall(i32 %6, i32 %0, i64 %1, i64 %2, i64 %3, i64 %4)
ret i64 %7
}
void local_pixel_to_rgb(unsigned int pixel, unsigned int *r, unsigned int *g,
                        unsigned int *b) {
  *b = pixel & 0xff;
  pixel >>= 8;
  *g = pixel & 0xff;
  pixel >>= 8;
  *r = pixel & 0xff;
}


x86 assembly (clang, -O0):
<local_pixel_to_rgb>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%ecx
and    $0xff,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
shr    $0x8,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
and    $0xff,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
shr    $0x8,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
and    $0xff,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<local_pixel_to_rgb>:
mov    %edi,%eax
movzbl %al,%edi
mov    %edi,(%rcx)
movzbl %ah,%ecx
mov    %ecx,(%rdx)
shr    $0x10,%eax
movzbl %al,%eax
mov    %eax,(%rsi)
ret

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

LLVM IR (-O2):
define void @local_pixel_to_rgb(i32 %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2, i32* nocapture writeonly %3) {
%5 = and i32 %0, 255
store i32 %5, i32* %3
%6 = lshr i32 %0, 8
%7 = and i32 %6, 255
store i32 %7, i32* %2
%8 = lshr i32 %0, 16
%9 = and i32 %8, 255
store i32 %9, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ a2b(char *, float);
void putf(float v) { a2b("%.1f ", v); }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"%.1f \00"
define void @putf(float %0) {
%2 = tail call i32 @a2b(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float %0)
ret void
}
/* Variables and functions */
int abs(int);
int /*<<< orphan*/ turtle_add_action(char *);
int /*<<< orphan*/ turtle_pivot_ahead();
void turtle_move_forward_times(int times) {
  int n;
  times = abs(times);
  turtle_pivot_ahead();
  for (n = 0; n < times; n++)
    turtle_add_action("f()\n");
}


x86 assembly (clang, -O0):
<turtle_move_forward_times>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <turtle_pivot_ahead@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    117a <turtle_move_forward_times+0x4a>
lea    0xe99(%rip),%rdi
call   1050 <turtle_add_action@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1154 <turtle_move_forward_times+0x24>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<turtle_move_forward_times>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <turtle_pivot_ahead@plt>
test   %ebx,%ebx
je     114d <turtle_move_forward_times+0x2d>
mov    %ebx,%ebp
neg    %ebp
cmovs  %ebx,%ebp
lea    0xec2(%rip),%rbx
xchg   %ax,%ax
mov    %rbx,%rdi
call   1040 <turtle_add_action@plt>
add    $0xffffffff,%ebp
jne    1140 <turtle_move_forward_times+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"f()\0A\00"
define void @turtle_move_forward_times(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @abs(i32 %4)
store i32 %5, i32* %2
%6 = call i32 (...) @turtle_pivot_ahead()
store i32 0, i32* %3
br label %7
7: ; preds = %13, %1
%8 = load i32, i32* %3
%9 = load i32, i32* %2
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %16
11: ; preds = %7
%12 = call i32 @turtle_add_action(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
br label %7
16: ; preds = %7
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"f()\0A\00"
define void @turtle_move_forward_times(i32 %0) {
%2 = tail call i32 (...) @turtle_pivot_ahead()
%3 = icmp eq i32 %0, 0
br i1 %3, label %11, label %4
4: ; preds = %1
%5 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
br label %6
6: ; preds = %4, %6
%7 = phi i32 [ %9, %6 ], [ 0, %4 ]
%8 = tail call i32 @turtle_add_action(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%9 = add nuw i32 %7, 1
%10 = icmp eq i32 %9, %5
br i1 %10, label %11, label %6
11: ; preds = %6, %1
ret void
}
/* Type definitions */
struct sockaddr {
  int dummy;
};
typedef struct sockaddr socklen_t;

/* Variables and functions */
int /*<<< orphan*/ mcfi_sandbox_mask(struct sockaddr *);
int socketcall(int (*)(int, struct sockaddr *, struct sockaddr *), int,
               int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/,
               int /*<<< orphan*/, int /*<<< orphan*/);
int getpeername(int fd, struct sockaddr *restrict addr,
                socklen_t *restrict len) {
  return socketcall(getpeername, fd, mcfi_sandbox_mask(addr),
                    mcfi_sandbox_mask(len), 0, 0, 0);
}


x86 assembly (clang, -O0):
<getpeername>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <mcfi_sandbox_mask@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <mcfi_sandbox_mask@plt>
mov    -0x20(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    %eax,%ecx
mov    0x2e9b(%rip),%rdi
xor    %r9d,%r9d
mov    %r9d,%r8d
movl   $0x0,(%rsp)
call   1030 <socketcall@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getpeername>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%rbx
mov    %edi,%r14d
mov    %rsi,%rdi
call   1040 <mcfi_sandbox_mask@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <mcfi_sandbox_mask@plt>
movl   $0x0,(%rsp)
mov    0x2eaa(%rip),%rdi
mov    %r14d,%esi
mov    %ebp,%edx
mov    %eax,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <socketcall@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
define i32 @getpeername(i32 %0, %struct.sockaddr* noalias %1, %struct.sockaddr* noalias %2) {
%4 = alloca i32
%5 = alloca %struct.sockaddr*
%6 = alloca %struct.sockaddr*
store i32 %0, i32* %4
store %struct.sockaddr* %1, %struct.sockaddr** %5
store %struct.sockaddr* %2, %struct.sockaddr** %6
%7 = load i32, i32* %4
%8 = load %struct.sockaddr*, %struct.sockaddr** %5
%9 = call i32 @mcfi_sandbox_mask(%struct.sockaddr* %8)
%10 = load %struct.sockaddr*, %struct.sockaddr** %6
%11 = call i32 @mcfi_sandbox_mask(%struct.sockaddr* %10)
%12 = call i32 @socketcall(i32 (i32, %struct.sockaddr*, %struct.sockaddr*)* @getpeername, i32 %7, i32 %9, i32 %11, i32 0, i32 0, i32 0)
ret i32 %12
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
define i32 @getpeername(i32 %0, %struct.sockaddr* noalias %1, %struct.sockaddr* noalias %2) {
%4 = tail call i32 @mcfi_sandbox_mask(%struct.sockaddr* %1)
%5 = tail call i32 @mcfi_sandbox_mask(%struct.sockaddr* %2)
%6 = tail call i32 @socketcall(i32 (i32, %struct.sockaddr*, %struct.sockaddr*)* @getpeername, i32 %0, i32 %4, i32 %5, i32 0, i32 0, i32 0)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printMenu() {
  printf("1: Bit pruefen\n");
  printf("2: Bit setzen\n");
  printf("3: Bit zurecksetzen/loeschen\n");
  printf("4: Bit negieren\n");
  printf("5: Ende\n");
}


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

x86 assembly (clang, -O2):
<printMenu>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xeeb(%rip),%rdi
call   1030 <puts@plt>
lea    0xeed(%rip),%rdi
call   1030 <puts@plt>
lea    0xefe(%rip),%rdi
call   1030 <puts@plt>
lea    0xf02(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"1: Bit pruefen\0A\00"
@.str.1 = [15 x i8] c"2: Bit setzen\0A\00"
@.str.2 = [30 x i8] c"3: Bit zurecksetzen/loeschen\0A\00"
@.str.3 = [17 x i8] c"4: Bit negieren\0A\00"
@.str.4 = [9 x i8] c"5: Ende\0A\00"
define void @printMenu() {
%1 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [15 x i8] c"1: Bit pruefen\00"
@str.5 = [14 x i8] c"2: Bit setzen\00"
@str.6 = [29 x i8] c"3: Bit zurecksetzen/loeschen\00"
@str.7 = [16 x i8] c"4: Bit negieren\00"
@str.8 = [8 x i8] c"5: Ende\00"
define void @printMenu() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.5, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.6, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.7, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.8, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, char const *, int);
int /*<<< orphan*/ ntohl(int /*<<< orphan*/);
uint32_t buf_get_uint32(const char *buf) {
  uint32_t ret;
  memcpy(&ret, buf, 4);
  ret = ntohl(ret);
  return ret;
}


x86 assembly (clang, -O0):
<buf_get_uint32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    -0xc(%rbp),%edi
call   1040 <ntohl@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<buf_get_uint32>:
push   %rax
mov    %rdi,%rsi
lea    0x4(%rsp),%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    0x4(%rsp),%edi
call   1040 <ntohl@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @buf_get_uint32(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @memcpy(i32* %3, i8* %4, i32 4)
%6 = load i32, i32* %3
%7 = call i32 @ntohl(i32 %6)
store i32 %7, i32* %3
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @buf_get_uint32(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @memcpy(i32* %2, i8* %0, i32 4)
%5 = load i32, i32* %2
%6 = call i32 @ntohl(i32 %5)
ret i32 %6
}
int cp_hash_compare_long(void *i, void *j) {
  long diff = *((long *)i) - *((long *)j);
  return diff > 0 ? 1 : diff < 0 ? -1 : 0;
}


x86 assembly (clang, -O0):
<cp_hash_compare_long>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    -0x10(%rbp),%rcx
sub    (%rcx),%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jle    1136 <cp_hash_compare_long+0x36>
mov    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    114b <cp_hash_compare_long+0x4b>
mov    -0x18(%rbp),%rdx
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    $0x0,%rdx
cmovl  %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cp_hash_compare_long>:
mov    (%rdi),%rax
mov    (%rsi),%rcx
xor    %edx,%edx
cmp    %rcx,%rax
setne  %dl
neg    %edx
cmp    %rcx,%rax
mov    $0x1,%eax
cmovle %edx,%eax
ret

LLVM IR (-O0):
define i32 @cp_hash_compare_long(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to i64*
%8 = load i64, i64* %7
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i64*
%11 = load i64, i64* %10
%12 = sub nsw i64 %8, %11
store i64 %12, i64* %5
%13 = load i64, i64* %5
%14 = icmp sgt i64 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %2
br label %21
16: ; preds = %2
%17 = load i64, i64* %5
%18 = icmp slt i64 %17, 0
%19 = zext i1 %18 to i64
%20 = select i1 %18, i32 -1, i32 0
br label %21
21: ; preds = %16, %15
%22 = phi i32 [ 1, %15 ], [ %20, %16 ]
ret i32 %22
}

LLVM IR (-O2):
define i32 @cp_hash_compare_long(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = sub nsw i64 %4, %6
%8 = icmp sgt i64 %7, 0
%9 = icmp ne i64 %7, 0
%10 = sext i1 %9 to i32
%11 = select i1 %8, i32 1, i32 %10
ret i32 %11
}
char *hash_plugin_detailed(void) {
  return ("pixmd5 - Cisco PIX password hashes plugin\n"
          "------------------------\n"
          "Use this module to crack Cisco PIX passwords\n"
          "Input should be in form: \'hash\'\n"
          "Known software that uses this password hashing method:\n"
          "Cisco PIX\n"
          "\nAuthor: Milen Rangelov <gat3way@gat3way.eu>\n");
}


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

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

LLVM IR (-O0):
@.str = [255 x i8] c"pixmd5 - Cisco PIX password hashes plugin\0A------------------------\0AUse this module to crack Cisco PIX passwords\0AInput should be in form: 'hash'\0AKnown software that uses this password hashing method:\0ACisco PIX\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([255 x i8], [255 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [255 x i8] c"pixmd5 - Cisco PIX password hashes plugin\0A------------------------\0AUse this module to crack Cisco PIX passwords\0AInput should be in form: 'hash'\0AKnown software that uses this password hashing method:\0ACisco PIX\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([255 x i8], [255 x i8]* @.str, i64 0, i64 0)
}
void check_read_buffer(struct nandsim_private *ns, int line) {
  (void)ns;
  (void)line;
}


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

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

LLVM IR (-O0):
%struct.nandsim_private = type opaque
define void @check_read_buffer(%struct.nandsim_private* %0, i32 %1) {
%3 = alloca %struct.nandsim_private*
%4 = alloca i32
store %struct.nandsim_private* %0, %struct.nandsim_private** %3
store i32 %1, i32* %4
%5 = load %struct.nandsim_private*, %struct.nandsim_private** %3
%6 = load i32, i32* %4
ret void
}

LLVM IR (-O2):
%struct.nandsim_private = type opaque
define void @check_read_buffer(%struct.nandsim_private* nocapture %0, i32 %1) {
ret void
}
unsigned long fsig_log2(unsigned long word) {
  __asm__("bsfq"
          " %1,%0"
          : "=r"(word)
          : "r"(word));
  return word;
}


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

x86 assembly (clang, -O2):
<fsig_log2>:
bsf    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @fsig_log2(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 asm "bsfq $1,$0", "=r,r,~{dirflag},~{fpsr},~{flags}"(i64 %3)
store i64 %4, i64* %2
%5 = load i64, i64* %2
ret i64 %5
}

LLVM IR (-O2):
define i64 @fsig_log2(i64 %0) {
%2 = tail call i64 asm "bsfq $1,$0", "=r,r,~{dirflag},~{fpsr},~{flags}"(i64 %0)
ret i64 %2
}
/* Variables and functions */
int getchar();
int count_num_spaces(int *current_char) {
  int num_spaces = 1;
  while ((*current_char = getchar()) == ' ') {
    ++num_spaces;
  }
  return num_spaces;
}


x86 assembly (clang, -O0):
<count_num_spaces>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    $0x0,%al
call   1030 <getchar@plt>
mov    -0x8(%rbp),%rcx
mov    %eax,(%rcx)
cmp    $0x20,%eax
jne    1147 <count_num_spaces+0x37>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <count_num_spaces+0x13>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_num_spaces>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getchar@plt>
mov    %eax,(%rbx)
add    $0x1,%ebp
cmp    $0x20,%eax
je     1120 <count_num_spaces+0x10>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @count_num_spaces(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
store i32 1, i32* %3
br label %4
4: ; preds = %8, %1
%5 = call i32 (...) @getchar()
%6 = load i32*, i32** %2
store i32 %5, i32* %6
%7 = icmp eq i32 %5, 32
br i1 %7, label %8, label %11
8: ; preds = %4
%9 = load i32, i32* %3
%10 = add nsw i32 %9, 1
store i32 %10, i32* %3
br label %4
11: ; preds = %4
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
define i32 @count_num_spaces(i32* nocapture writeonly %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 1, %1 ], [ %6, %2 ]
%4 = tail call i32 (...) @getchar()
store i32 %4, i32* %0
%5 = icmp eq i32 %4, 32
%6 = add nuw nsw i32 %3, 1
br i1 %5, label %2, label %7
7: ; preds = %2
ret i32 %3
}
int f4(int x, int y) {
  if (y < -1)
    __builtin_unreachable();
  return x % -y;
}


x86 assembly (clang, -O0):
<f4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jge    1114 <f4+0x14>
mov    -0x4(%rbp),%eax
xor    %ecx,%ecx
sub    -0x8(%rbp),%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4>:
mov    %edi,%eax
neg    %esi
cltd
idiv   %esi
mov    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @f4(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, -2
tail call void @llvm.assume(i1 %3)
%4 = sub nsw i32 0, %1
%5 = srem i32 %0, %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void writeSubdividedPlanarCodeShort() {
  fprintf(stderr, "Graphs of this size are not yet supported\n");
  exit(-1);
}


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

x86 assembly (clang, -O2):
<writeSubdividedPlanarCodeShort>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [43 x i8] c"Graphs of this size are not yet supported\0A\00"
define void @writeSubdividedPlanarCodeShort() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [43 x i8] c"Graphs of this size are not yet supported\0A\00"
define void @writeSubdividedPlanarCodeShort() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
scalar_t__ inRange(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int age;
  scanf("%d", &age);
  if (inRange(age)) {
    printf("Qualified\n");
  } else {
    printf("Unqualified\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1040 <inRange@plt>
cmp    $0x0,%rax
je     1172 <main+0x42>
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
jmp    117e <main+0x4e>
lea    0xe95(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1040 <inRange@plt>
test   %rax,%rax
lea    0xeae(%rip),%rax
lea    0xeb3(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [11 x i8] c"Qualified\0A\00"
@.str.2 = [13 x i8] c"Unqualified\0A\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 i64 @inRange(i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
br label %11
9: ; preds = %0
%10 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
br label %11
11: ; preds = %9, %7
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@str = [12 x i8] c"Unqualified\00"
@str.3 = [10 x i8] c"Qualified\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 i64 @inRange(i32 %4)
%6 = icmp eq i64 %5, 0
%7 = select i1 %6, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @str.3, i64 0, i64 0)
%8 = call i32 @puts(i8* dereferenceable(1) %7)
ret i32 0
}
/* Variables and functions */
long long fb_FileLenEx(char const *);
long long fb_FileLen(const char *filename) { return fb_FileLenEx(filename); }


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

x86 assembly (clang, -O2):
<fb_FileLen>:
jmp    1030 <fb_FileLenEx@plt>

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

LLVM IR (-O2):
define i64 @fb_FileLen(i8* %0) {
%2 = tail call i64 @fb_FileLenEx(i8* %0)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ bar(double);
void foo(double *p, double a, int n) {
  do
    bar(*p++ + a);
  while (n--);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x8(%rbp)
movsd  (%rax),%xmm0
addsd  -0x10(%rbp),%xmm0
call   1030 <bar@plt>
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x14(%rbp)
cmp    $0x0,%eax
jne    1124 <foo+0x14>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %esi,%r15d
movsd  %xmm0,0x8(%rsp)
mov    %rdi,%r14
add    $0x1,%r15d
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
movsd  (%r14,%rbx,8),%xmm0
addsd  0x8(%rsp),%xmm0
call   1030 <bar@plt>
add    $0x1,%rbx
cmp    %ebx,%r15d
jne    1130 <foo+0x20>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @foo(double* nocapture %0, double %1, i32 %2) {
br label %4
4: ; preds = %4, %3
%5 = phi double* [ %0, %3 ], [ %7, %4 ]
%6 = phi i32 [ %2, %3 ], [ %11, %4 ]
%7 = getelementptr inbounds double, double* %5, i64 1
%8 = load double, double* %5
%9 = fadd double %8, %1
%10 = tail call i32 @bar(double %9)
%11 = add nsw i32 %6, -1
%12 = icmp eq i32 %6, 0
br i1 %12, label %13, label %4
13: ; preds = %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, int *);
void read_array(size_t n, int arr[n]) {
  size_t i;
  for (i = 0; i < n; i++) {
    scanf("%d", &arr[i]);
  }
}


x86 assembly (clang, -O0):
<read_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x8(%rbp),%rax
jae    1162 <read_array+0x52>
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xeb4(%rip),%rdi
call   1030 <scanf@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <read_array+0x18>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_array>:
push   %r15
push   %r14
push   %rbx
test   %rdi,%rdi
je     1145 <read_array+0x35>
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0xed9(%rip),%r15
nopw   0x0(%rax,%rax,1)
mov    %r15,%rdi
mov    %rbx,%rsi
call   1030 <scanf@plt>
add    $0x4,%rbx
add    $0xffffffffffffffff,%r14
jne    1130 <read_array+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define void @read_array(i64 %0, i32* %1) {
%3 = alloca i64
%4 = alloca i32*
%5 = alloca i64
store i64 %0, i64* %3
store i32* %1, i32** %4
%6 = load i64, i64* %3
store i64 0, i64* %5
br label %7
7: ; preds = %16, %2
%8 = load i64, i64* %5
%9 = load i64, i64* %3
%10 = icmp ult i64 %8, %9
br i1 %10, label %11, label %19
11: ; preds = %7
%12 = load i32*, i32** %4
%13 = load i64, i64* %5
%14 = getelementptr inbounds i32, i32* %12, i64 %13
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %14)
br label %16
16: ; preds = %11
%17 = load i64, i64* %5
%18 = add i64 %17, 1
store i64 %18, i64* %5
br label %7
19: ; preds = %7
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @read_array(i64 %0, i32* %1) {
%3 = icmp eq i64 %0, 0
br i1 %3, label %10, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %8, %4 ], [ 0, %2 ]
%6 = getelementptr inbounds i32, i32* %1, i64 %5
%7 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %6)
%8 = add nuw i64 %5, 1
%9 = icmp eq i64 %8, %0
br i1 %9, label %10, label %4
10: ; preds = %4, %2
ret void
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMR91_get(void) { return U_WMRCORENONE_get("U_WMR91"); }


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMR91\00"
define i32 @U_WMR91_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
int lettura_matrice(int **matrice, int riga, int colonna) {
  return (matrice[riga][colonna]);
}


x86 assembly (clang, -O0):
<lettura_matrice>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lettura_matrice>:
movslq %esi,%rax
mov    (%rdi,%rax,8),%rax
movslq %edx,%rcx
mov    (%rax,%rcx,4),%eax
ret

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

LLVM IR (-O2):
define i32 @lettura_matrice(i32** nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32*, i32** %0, i64 %4
%6 = load i32*, i32** %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i32, i32* %6, i64 %7
%9 = load i32, i32* %8
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  typedef struct node {
    char c;
    int i;
    long l;
    char c2;
  } Node;
  Node na;
  printf("sizeof(char)=%lu\n", sizeof(char));
  printf("sizeof(int)=%lu\n", sizeof(int));
  printf("sizeof(long)=%lu\n", sizeof(long));
  printf("sizeof(Node)=%lu\n", sizeof(Node));
  return 0;
}


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

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

LLVM IR (-O0):
%struct.node = type { i8, i32, i64, i8 }
@.str = [18 x i8] c"sizeof(char)=%lu\0A\00"
@.str.1 = [17 x i8] c"sizeof(int)=%lu\0A\00"
@.str.2 = [18 x i8] c"sizeof(long)=%lu\0A\00"
@.str.3 = [18 x i8] c"sizeof(Node)=%lu\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.node
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 1)
%8 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 4)
%9 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 8)
%10 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 24)
ret i32 0
}

LLVM IR (-O2):
%struct.node = type { i8, i32, i64, i8 }
@.str = [18 x i8] c"sizeof(char)=%lu\0A\00"
@.str.1 = [17 x i8] c"sizeof(int)=%lu\0A\00"
@.str.2 = [18 x i8] c"sizeof(long)=%lu\0A\00"
@.str.3 = [18 x i8] c"sizeof(Node)=%lu\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 1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 4)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 8)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 24)
ret i32 0
}
/* Variables and functions */
double sla_gmst(double *);
double csla_gmst(double ut1) { return sla_gmst(&ut1); }


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

x86 assembly (clang, -O2):
<csla_gmst>:
push   %rax
movsd  %xmm0,(%rsp)
mov    %rsp,%rdi
call   1030 <sla_gmst@plt>
pop    %rax
ret

LLVM IR (-O0):
define double @csla_gmst(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call double @sla_gmst(double* %2)
ret double %3
}

LLVM IR (-O2):
define double @csla_gmst(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call double @sla_gmst(double* %2)
ret double %3
}
/* Type definitions */
typedef scalar_t__ uint16_t;

/* Variables and functions */
scalar_t__ eeprom_read_word(scalar_t__ *);
bool eeconfig_is_enabled(void) {
  return (eeprom_read_word((uint16_t *)0) == (uint16_t)0xFEEC);
}


x86 assembly (clang, -O0):
<eeconfig_is_enabled>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1030 <eeprom_read_word@plt>
cmp    $0xfeec,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<eeconfig_is_enabled>:
push   %rax
xor    %edi,%edi
call   1030 <eeprom_read_word@plt>
xor    %ecx,%ecx
cmp    $0xfeec,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @eeconfig_is_enabled() {
%1 = call i64 @eeprom_read_word(i64* null)
%2 = icmp eq i64 %1, 65260
%3 = zext i1 %2 to i32
ret i32 %3
}

LLVM IR (-O2):
define i32 @eeconfig_is_enabled() {
%1 = tail call i64 @eeprom_read_word(i64* null)
%2 = icmp eq i64 %1, 65260
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ xisalnum(int);
scalar_t__ xisgraph(int);
int xispunct(int c) { return (xisgraph(c) && !xisalnum(c)); }


x86 assembly (clang, -O0):
<xispunct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <xisgraph@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
je     1158 <xispunct+0x38>
mov    -0x4(%rbp),%edi
call   1040 <xisalnum@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xispunct>:
push   %rbx
mov    %edi,%ebx
call   1030 <xisgraph@plt>
test   %rax,%rax
je     113f <xispunct+0x1f>
mov    %ebx,%edi
call   1040 <xisalnum@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @xispunct(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @xisgraph(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i32 @xisalnum(i32 %7)
%9 = icmp ne i32 %8, 0
%10 = xor i1 %9, true
br label %11
11: ; preds = %6, %1
%12 = phi i1 [ false, %1 ], [ %10, %6 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @xispunct(i32 %0) {
%2 = tail call i64 @xisgraph(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @xisalnum(i32 %0)
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}
int Arith_min(int x, int y) { return x < y ? x : y; }


x86 assembly (clang, -O0):
<Arith_min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1121 <Arith_min+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <Arith_min+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Arith_min>:
mov    %esi,%eax
cmp    %esi,%edi
cmovl  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @Arith_min(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
long long ld_to_ll(long double n) { return n; }


x86 assembly (clang, -O0):
<ld_to_ll>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fnstcw -0x1a(%rbp)
movzwl -0x1a(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0x1c(%rbp)
fldcw  -0x1c(%rbp)
fistpll -0x18(%rbp)
fldcw  -0x1a(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ld_to_ll>:
fldt   0x8(%rsp)
fnstcw -0xc(%rsp)
movzwl -0xc(%rsp),%eax
or     $0xc00,%eax
mov    %ax,-0xa(%rsp)
fldcw  -0xa(%rsp)
fistpll -0x8(%rsp)
fldcw  -0xc(%rsp)
mov    -0x8(%rsp),%rax
ret

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

LLVM IR (-O2):
define i64 @ld_to_ll(x86_fp80 %0) {
%2 = fptosi x86_fp80 %0 to i64
ret i64 %2
}
void set_TIC(long TIC_in __attribute__((unused))) {}


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

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

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

LLVM IR (-O2):
define void @set_TIC(i64 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ nhr_free(char *);
void nhr_string_delete(char *str) { nhr_free(str); }


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

x86 assembly (clang, -O2):
<nhr_string_delete>:
jmp    1030 <nhr_free@plt>

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

LLVM IR (-O2):
define void @nhr_string_delete(i8* %0) {
%2 = tail call i32 @nhr_free(i8* %0)
ret void
}
void ft_striteri(char *s, void (*f)(unsigned int, char *)) {
  int i;
  i = 0;
  while (s[i]) {
    (*f)(i, &(s[i]));
    i++;
  }
}


x86 assembly (clang, -O0):
<ft_striteri>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     114b <ft_striteri+0x4b>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%edi
mov    -0x8(%rbp),%rsi
movslq -0x14(%rbp),%rcx
add    %rcx,%rsi
call   *%rax
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1117 <ft_striteri+0x17>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_striteri>:
push   %r15
push   %r14
push   %rbx
cmpb   $0x0,(%rdi)
je     1135 <ft_striteri+0x35>
mov    %rsi,%r14
mov    %rdi,%r15
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    (%r15,%rbx,1),%rsi
mov    %ebx,%edi
call   *%r14
cmpb   $0x0,0x1(%r15,%rbx,1)
lea    0x1(%rbx),%rbx
jne    1120 <ft_striteri+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @ft_striteri(i8* %0, void (i32, i8*)* nocapture %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i64 [ %9, %5 ], [ 0, %2 ]
%7 = phi i8* [ %10, %5 ], [ %0, %2 ]
%8 = trunc i64 %6 to i32
tail call void %1(i32 %8, i8* %7)
%9 = add nuw i64 %6, 1
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
char *strfry(char *);
int main() {
  char s[] = "asdf";
  printf("%s\n", strfry(s));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
movb   $0x0,0x4(%rsp)
movl   $0x66647361,(%rsp)
mov    %rsp,%rdi
call   1040 <strfry@plt>
lea    0xec9(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@__const.main.s = [5 x i8] c"asdf\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [5 x i8]
%2 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%3 = call i8* @strfry(i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}
/* Variables and functions */
unsigned char *die_spaces_die(unsigned char *);
int /*<<< orphan*/ free(unsigned char *);
unsigned char *remove_comment(unsigned char *);
unsigned char *format_string(unsigned char *in_str) {
  unsigned char *tmp_str, *ret_str;
  tmp_str = remove_comment(in_str);
  if (!tmp_str)
    return NULL;
  ret_str = die_spaces_die(tmp_str);
  if (!ret_str)
    return NULL;
  free(tmp_str);
  return ret_str;
}


x86 assembly (clang, -O0):
<format_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <remove_comment@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1161 <format_string+0x31>
movq   $0x0,-0x8(%rbp)
jmp    1197 <format_string+0x67>
mov    -0x18(%rbp),%rdi
call   1050 <die_spaces_die@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1186 <format_string+0x56>
movq   $0x0,-0x8(%rbp)
jmp    1197 <format_string+0x67>
mov    -0x18(%rbp),%rdi
call   1040 <free@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<format_string>:
push   %r14
push   %rbx
push   %rax
call   1030 <remove_comment@plt>
test   %rax,%rax
je     115b <format_string+0x2b>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <die_spaces_die@plt>
test   %rax,%rax
je     115b <format_string+0x2b>
mov    %rax,%r14
mov    %rbx,%rdi
call   1040 <free@plt>
jmp    115e <format_string+0x2e>
xor    %r14d,%r14d
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @format_string(i8* %0) {
%2 = tail call i8* @remove_comment(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %9, label %4
4: ; preds = %1
%5 = tail call i8* @die_spaces_die(i8* %2)
%6 = icmp eq i8* %5, null
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = tail call i32 @free(i8* %2)
br label %9
9: ; preds = %4, %1, %7
%10 = phi i8* [ %5, %7 ], [ null, %1 ], [ null, %4 ]
ret i8* %10
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int pthread_mutex_unlock(int /*<<< orphan*/ *);
int ST_unlock(pthread_mutex_t *l) { return pthread_mutex_unlock(l); }


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

x86 assembly (clang, -O2):
<ST_unlock>:
jmp    1030 <pthread_mutex_unlock@plt>

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

LLVM IR (-O2):
define i32 @ST_unlock(i32* %0) {
%2 = tail call i32 @pthread_mutex_unlock(i32* %0)
ret i32 %2
}