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


x86 assembly (clang, -O0):
<createtab3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x300,%rsp
lea    0xebe(%rip),%rdi
mov    $0xff,%esi
call   1030 <printf@plt>
lea    -0x200(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1040 <scanf@plt>
lea    0xed0(%rip),%rdi
mov    $0xff,%esi
call   1030 <printf@plt>
lea    -0x300(%rbp),%rsi
lea    0xeb5(%rip),%rdi
call   1040 <scanf@plt>
lea    -0x200(%rbp),%rdi
lea    -0x300(%rbp),%rsi
call   1050 <createFreqTab3@plt>
add    $0x300,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<createtab3>:
push   %r15
push   %r14
push   %rbx
sub    $0x200,%rsp
lea    0xebd(%rip),%rdi
mov    $0xff,%esi
call   1030 <printf@plt>
lea    0xedf(%rip),%r15
lea    0x100(%rsp),%r14
mov    %r15,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
lea    0xec8(%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 <createFreqTab3@plt>
add    $0x200,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [51 x i8] c"\0A choose GenePop sample file (max %d character): \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [66 x i8] c"\0A insert name for table file (no extension) (max %d character): \00"
define i32 @createtab3() {
%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 ([51 x i8], [51 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 ([66 x i8], [66 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 @createFreqTab3(i8* %3, i8* %4)
ret i32 %9
}