#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 */
long create(long, char *, long, double);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, ...);
void createMenu() {
  printf("\t enter Id>");
  long Id = 0;
  scanf("%ld", &Id);
  printf("\t enter name>");
  char name[20];
  scanf("%s", name);
  printf("\t enter passworld>");
  long pass = 0;
  scanf("%ld", &pass);
  printf("\tenter balance>");
  double balance = 0;
  scanf("%lf", &balance);
  long id = create(Id, name, pass, balance);
  printf("===========================\n");
  printf("create account %ld successful!\n", id);
  printf("===========================\n");
}


x86 assembly (clang, -O0):
<createMenu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movq   $0x0,-0x8(%rbp)
lea    0xeb7(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
lea    0xea9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x20(%rbp),%rsi
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1050 <scanf@plt>
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movq   $0x0,-0x28(%rbp)
lea    0xe6f(%rip),%rdi
lea    -0x28(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
lea    0xe85(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
lea    0xe7f(%rip),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
mov    -0x8(%rbp),%rdi
lea    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
movsd  -0x30(%rbp),%xmm0
call   1040 <create@plt>
mov    %rax,-0x38(%rbp)
lea    0xe57(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x38(%rbp),%rsi
lea    0xe62(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe37(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<createMenu>:
push   %r14
push   %rbx
sub    $0x38,%rsp
lea    0xeb2(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movq   $0x0,0x18(%rsp)
lea    0xea7(%rip),%rbx
lea    0x18(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <scanf@plt>
lea    0xe95(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe95(%rip),%rdi
lea    0x20(%rsp),%r14
mov    %r14,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
lea    0xe82(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movq   $0x0,0x10(%rsp)
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <scanf@plt>
lea    0xe6f(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movq   $0x0,0x8(%rsp)
lea    0xe68(%rip),%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    0x18(%rsp),%rdi
mov    0x10(%rsp),%rdx
movsd  0x8(%rsp),%xmm0
mov    %r14,%rsi
call   1050 <create@plt>
mov    %rax,%rbx
lea    0xe5e(%rip),%r14
mov    %r14,%rdi
call   1030 <puts@plt>
lea    0xe2f(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
call   1030 <puts@plt>
add    $0x38,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [12 x i8] c"\09 enter Id>\00"
@.str.1 = [4 x i8] c"%ld\00"
@.str.2 = [14 x i8] c"\09 enter name>\00"
@.str.3 = [3 x i8] c"%s\00"
@.str.4 = [19 x i8] c"\09 enter passworld>\00"
@.str.5 = [16 x i8] c"\09enter balance>\00"
@.str.6 = [4 x i8] c"%lf\00"
@.str.7 = [29 x i8] c"===========================\0A\00"
@.str.8 = [32 x i8] c"create account %ld successful!\0A\00"
define void @createMenu() {
%1 = alloca i64
%2 = alloca [20 x i8]
%3 = alloca i64
%4 = alloca double
%5 = alloca i64
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
store i64 0, i64* %1
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64* %1)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%9 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %9)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0))
store i64 0, i64* %3
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64* %3)
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0))
store double 0.000000e+00, double* %4
%14 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), double* %4)
%15 = load i64, i64* %1
%16 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%17 = load i64, i64* %3
%18 = load double, double* %4
%19 = call i64 @create(i64 %15, i8* %16, i64 %17, double %18)
store i64 %19, i64* %5
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.7, i64 0, i64 0))
%21 = load i64, i64* %5
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.8, i64 0, i64 0), i64 %21)
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.7, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"\09 enter Id>\00"
@.str.1 = [4 x i8] c"%ld\00"
@.str.2 = [14 x i8] c"\09 enter name>\00"
@.str.3 = [3 x i8] c"%s\00"
@.str.4 = [19 x i8] c"\09 enter passworld>\00"
@.str.5 = [16 x i8] c"\09enter balance>\00"
@.str.6 = [4 x i8] c"%lf\00"
@.str.8 = [32 x i8] c"create account %ld successful!\0A\00"
@str.9 = [28 x i8] c"===========================\00"
define void @createMenu() {
%1 = alloca i64
%2 = alloca [20 x i8]
%3 = alloca i64
%4 = alloca double
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%6 = bitcast i64* %1 to i8*
store i64 0, i64* %1
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64* %1)
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%9 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %9)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.4, i64 0, i64 0))
%12 = bitcast i64* %3 to i8*
store i64 0, i64* %3
%13 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64* %3)
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0))
%15 = bitcast double* %4 to i8*
store double 0.000000e+00, double* %4
%16 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), double* %4)
%17 = load i64, i64* %1
%18 = load i64, i64* %3
%19 = load double, double* %4
%20 = call i64 @create(i64 %17, i8* %9, i64 %18, double %19)
%21 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.9, i64 0, i64 0))
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.8, i64 0, i64 0), i64 %20)
%23 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.9, i64 0, i64 0))
ret void
}