#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*/ printf(char *, ...);
int /*<<< orphan*/ save(long, double);
int /*<<< orphan*/ scanf(char *, ...);
void saveMenu() {
  printf("\tenter Id>");
  long Id = 0;
  scanf("%ld", &Id);
  printf("\tenter money>");
  double money = 0;
  scanf("%lf", &money);
  save(Id, money);
  printf("===========================\n");
  printf("save %lf successful!\n", money);
  printf("===========================\n");
}


x86 assembly (clang, -O0):
<saveMenu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movq   $0x0,-0x8(%rbp)
lea    0xeb6(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
lea    0xea8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    0xea0(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
mov    -0x8(%rbp),%rdi
movsd  -0x10(%rbp),%xmm0
call   1040 <save@plt>
lea    0xe84(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsd  -0x10(%rbp),%xmm0
lea    0xe8e(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe63(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<saveMenu>:
push   %rbx
sub    $0x10,%rsp
lea    0xeb4(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movq   $0x0,0x8(%rsp)
lea    0xea8(%rip),%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
lea    0xe99(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movq   $0x0,(%rsp)
lea    0xe91(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    0x8(%rsp),%rdi
movsd  (%rsp),%xmm0
call   1050 <save@plt>
lea    0xe8b(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
movsd  (%rsp),%xmm0
lea    0xe61(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"\09enter Id>\00"
@.str.1 = [4 x i8] c"%ld\00"
@.str.2 = [14 x i8] c"\09enter money>\00"
@.str.3 = [4 x i8] c"%lf\00"
@.str.4 = [29 x i8] c"===========================\0A\00"
@.str.5 = [22 x i8] c"save %lf successful!\0A\00"
define void @saveMenu() {
%1 = alloca i64
%2 = alloca double
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
store i64 0, i64* %1
%4 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64* %1)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
store double 0.000000e+00, double* %2
%6 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double* %2)
%7 = load i64, i64* %1
%8 = load double, double* %2
%9 = call i32 @save(i64 %7, double %8)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0))
%11 = load double, double* %2
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), double %11)
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0))
ret void
}

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