#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 makepop(char *, char *);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, char *);
int createpop() {
  char str[256], input[256], output[256];
  printf("\n  choose table file (.len) (max %d character): ", 256 - 1);
  scanf("%s", input);
  printf("\n  insert name for sample file (no extension) (max %d character): ",
         256 - 1);
  scanf("%s", output);
  return makepop(input, output);
}


x86 assembly (clang, -O0):
<createpop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x300,%rsp
lea    0xebe(%rip),%rdi
mov    $0xff,%esi
call   1030 <printf@plt>
lea    -0x200(%rbp),%rsi
lea    0xed7(%rip),%rdi
call   1040 <scanf@plt>
lea    0xece(%rip),%rdi
mov    $0xff,%esi
call   1030 <printf@plt>
lea    -0x300(%rbp),%rsi
lea    0xeb3(%rip),%rdi
call   1040 <scanf@plt>
lea    -0x200(%rbp),%rdi
lea    -0x300(%rbp),%rsi
call   1050 <makepop@plt>
add    $0x300,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<createpop>:
push   %r15
push   %r14
push   %rbx
sub    $0x200,%rsp
lea    0xebd(%rip),%rdi
mov    $0xff,%esi
call   1030 <printf@plt>
lea    0xedd(%rip),%r15
lea    0x100(%rsp),%r14
mov    %r15,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
lea    0xec6(%rip),%rdi
mov    $0xff,%esi
call   1030 <printf@plt>
mov    %rsp,%rbx
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <makepop@plt>
add    $0x200,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [49 x i8] c"\0A choose table file (.len) (max %d character): \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [67 x i8] c"\0A insert name for sample file (no extension) (max %d character): \00"
define i32 @createpop() {
%1 = alloca [256 x i8]
%2 = alloca [256 x i8]
%3 = alloca [256 x i8]
%4 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i32 255)
%5 = getelementptr inbounds [256 x i8], [256 x i8]* %2, 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 ([67 x i8], [67 x i8]* @.str.2, i64 0, i64 0), i32 255)
%8 = getelementptr inbounds [256 x i8], [256 x i8]* %3, 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 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%11 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%12 = call i32 @makepop(i8* %10, i8* %11)
ret i32 %12
}

LLVM IR (-O2):
@.str = [49 x i8] c"\0A choose table file (.len) (max %d character): \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [67 x i8] c"\0A insert name for sample file (no extension) (max %d character): \00"
define i32 @createpop() {
%1 = alloca [256 x i8]
%2 = alloca [256 x i8]
%3 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%5 = tail call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i32 255)
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%7 = call i32 @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.2, i64 0, i64 0), i32 255)
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%9 = call i32 @makepop(i8* %3, i8* %4)
ret i32 %9
}