#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ crypt(char *, char *, char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char filein[256], fileout[256];
  char pwd[128];
  printf("Input file: ");
  scanf("%s", &filein[0]);
  printf("Output file: ");
  scanf("%s", &fileout[0]);
  printf("Password: ");
  scanf("%s", &pwd[0]);
  crypt(filein, fileout, pwd);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x280,%rsp
lea    0xebe(%rip),%rdi
call   1040 <printf@plt>
lea    -0x100(%rbp),%rsi
lea    0xeb8(%rip),%rdi
call   1050 <scanf@plt>
lea    0xeaf(%rip),%rdi
call   1040 <printf@plt>
lea    -0x200(%rbp),%rsi
lea    0xe99(%rip),%rdi
call   1050 <scanf@plt>
lea    0xe9e(%rip),%rdi
call   1040 <printf@plt>
lea    -0x280(%rbp),%rsi
lea    0xe7a(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x100(%rbp),%rdi
lea    -0x200(%rbp),%rsi
lea    -0x280(%rbp),%rdx
call   1030 <crypt@plt>
xor    %eax,%eax
add    $0x280,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x288,%rsp
lea    0xebb(%rip),%rdi
call   1040 <printf@plt>
lea    0xebc(%rip),%r12
lea    0x180(%rsp),%r14
mov    %r12,%rdi
mov    %r14,%rsi
call   1050 <scanf@plt>
lea    0xea5(%rip),%rdi
call   1040 <printf@plt>
lea    0x80(%rsp),%r15
mov    %r12,%rdi
mov    %r15,%rsi
call   1050 <scanf@plt>
lea    0xe94(%rip),%rdi
call   1040 <printf@plt>
mov    %rsp,%rbx
mov    %r12,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
call   1030 <crypt@plt>
xor    %eax,%eax
add    $0x288,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Input file: \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [14 x i8] c"Output file: \00"
@.str.3 = [11 x i8] c"Password: \00"
define i32 @main() {
%1 = alloca [256 x i8]
%2 = alloca [256 x i8]
%3 = alloca [128 x i8]
%4 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%7 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%8 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
%11 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %11)
%13 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%14 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%15 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%16 = call i32 @crypt(i8* %13, i8* %14, i8* %15)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"Input file: \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [14 x i8] c"Output file: \00"
@.str.3 = [11 x i8] c"Password: \00"
define i32 @main() {
%1 = alloca [256 x i8]
%2 = alloca [256 x i8]
%3 = alloca [128 x i8]
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%7 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%9 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%11 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%13 = call i32 @crypt(i8* %4, i8* %5, i8* %6)
ret i32 0
}