#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*/ scanf(char *, char *, short *, int *, long *, long long *,
                         float *, double *);
int main() {
  char v1;
  short v2;
  int v3;
  long v4;
  long long v5;
  float v6;
  double v7;
  int i = 0;
  int size[] = {sizeof(char),      sizeof(short), sizeof(int),   sizeof(long),
                sizeof(long long), sizeof(float), sizeof(double)};
  char *type[] = {"char",      "short", "int",   "long",
                  "long long", "float", "double"};
  printf("Please input seven parts:\n");
  scanf("%c %hd %d %ld %lld %f %lf", &v1, &v2, &v3, &v4, &v5, &v6, &v7);
  printf("The result is:\n");
  printf("The \'%s\' variable is %c, it takes %d byte.\n", type[i], v1,
         size[i]);
  i++;
  printf("The \'%s\' variable is %hd, it takes %d bytes.\n", type[i], v2,
         size[i]);
  i++;
  printf("The \'%s\' variable is %d, it takes %d bytes.\n", type[i], v3,
         size[i]);
  i++;
  printf("The \'%s\' variable is %ld, it takes %d bytes.\n", type[i], v4,
         size[i]);
  i++;
  printf("The \'%s\' variable is %lld, it takes %d bytes.\n", type[i], v5,
         size[i]);
  i++;
  printf("The \'%s\' variable is %f, it takes %d bytes.\n", type[i], v6,
         size[i]);
  i++;
  printf("The \'%s\' variable is %lf, it takes %d bytes.\n", type[i], v7,
         size[i]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x34(%rbp)
mov    0xeb0(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xead(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0xeaa(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xea8(%rip),%eax
mov    %eax,-0x38(%rbp)
lea    -0x90(%rbp),%rdi
lea    0x2c5f(%rip),%rsi
mov    $0x38,%edx
call   1040 <memcpy@plt>
lea    0xeb0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebd(%rip),%rdi
lea    -0x5(%rbp),%rsi
lea    -0x8(%rbp),%rdx
lea    -0xc(%rbp),%rcx
lea    -0x18(%rbp),%r8
lea    -0x20(%rbp),%r9
lea    -0x24(%rbp),%r10
lea    -0x30(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1050 <scanf@plt>
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x34(%rbp),%rax
mov    -0x90(%rbp,%rax,8),%rsi
ff
movsbl -0x5(%rbp),%edx
movslq -0x34(%rbp),%rax
mov    -0x50(%rbp,%rax,4),%ecx
lea    0xe90(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
movslq -0x34(%rbp),%rax
mov    -0x90(%rbp,%rax,8),%rsi
ff
movswl -0x8(%rbp),%edx
movslq -0x34(%rbp),%rax
mov    -0x50(%rbp,%rax,4),%ecx
lea    0xe8d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
movslq -0x34(%rbp),%rax
mov    -0x90(%rbp,%rax,8),%rsi
ff
mov    -0xc(%rbp),%edx
movslq -0x34(%rbp),%rax
mov    -0x50(%rbp,%rax,4),%ecx
lea    0xe8d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
movslq -0x34(%rbp),%rax
mov    -0x90(%rbp,%rax,8),%rsi
ff
mov    -0x18(%rbp),%rdx
movslq -0x34(%rbp),%rax
mov    -0x50(%rbp,%rax,4),%ecx
lea    0xe8b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
movslq -0x34(%rbp),%rax
mov    -0x90(%rbp,%rax,8),%rsi
ff
mov    -0x20(%rbp),%rdx
movslq -0x34(%rbp),%rax
mov    -0x50(%rbp,%rax,4),%ecx
lea    0xe8a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
movslq -0x34(%rbp),%rax
mov    -0x90(%rbp,%rax,8),%rsi
ff
movss  -0x24(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movslq -0x34(%rbp),%rax
mov    -0x50(%rbp,%rax,4),%edx
lea    0xe85(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
movslq -0x34(%rbp),%rax
mov    -0x90(%rbp,%rax,8),%rsi
ff
movsd  -0x30(%rbp),%xmm0
movslq -0x34(%rbp),%rax
mov    -0x50(%rbp,%rax,4),%edx
lea    0xe82(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
lea    0x1044(%rip),%rdi
call   1030 <puts@plt>
lea    0x10(%rsp),%rax
lea    0x8(%rsp),%r10
lea    0xed5(%rip),%rdi
lea    0x5(%rsp),%rsi
lea    0x6(%rsp),%rdx
lea    0xc(%rsp),%rcx
lea    0x20(%rsp),%r8
lea    0x18(%rsp),%r9
push   %rax
push   %r10
call   1050 <scanf@plt>
add    $0x10,%rsp
lea    0x101c(%rip),%rdi
call   1030 <puts@plt>
movsbl 0x5(%rsp),%edx
lea    0xeb2(%rip),%rdi
lea    0xe6b(%rip),%rsi
mov    $0x1,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
movswl 0x6(%rsp),%edx
lea    0xebf(%rip),%rdi
lea    0xe51(%rip),%rsi
mov    $0x2,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xc(%rsp),%edx
lea    0xecf(%rip),%rdi
lea    0xe39(%rip),%rsi
mov    $0x4,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x20(%rsp),%rdx
lea    0xedd(%rip),%rdi
lea    0xe23(%rip),%rsi
mov    $0x8,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x18(%rsp),%rdx
lea    0xeec(%rip),%rdi
lea    0xdff(%rip),%rsi
mov    $0x8,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
movss  0x8(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xef7(%rip),%rdi
lea    0xde5(%rip),%rsi
mov    $0x4,%edx
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0x10(%rsp),%xmm0
lea    0xf04(%rip),%rdi
lea    0xdcb(%rip),%rsi
mov    $0x8,%edx
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.size = [7 x i32] [i32 1, i32 2, i32 4, i32 8, i32 8, i32 4, i32 8]
@.str = [5 x i8] c"char\00"
@.str.1 = [6 x i8] c"short\00"
@.str.2 = [4 x i8] c"int\00"
@.str.3 = [5 x i8] c"long\00"
@.str.4 = [10 x i8] c"long long\00"
@.str.5 = [6 x i8] c"float\00"
@.str.6 = [7 x i8] c"double\00"
@__const.main.type = [7 x i8*] [i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i32 0, i32 0)]
@.str.7 = [27 x i8] c"Please input seven parts:\0A\00"
@.str.8 = [26 x i8] c"%c %hd %d %ld %lld %f %lf\00"
@.str.9 = [16 x i8] c"The result is:\0A\00"
@.str.10 = [44 x i8] c"The '%s' variable is %c, it takes %d byte.\0A\00"
@.str.11 = [46 x i8] c"The '%s' variable is %hd, it takes %d bytes.\0A\00"
@.str.12 = [45 x i8] c"The '%s' variable is %d, it takes %d bytes.\0A\00"
@.str.13 = [46 x i8] c"The '%s' variable is %ld, it takes %d bytes.\0A\00"
@.str.14 = [47 x i8] c"The '%s' variable is %lld, it takes %d bytes.\0A\00"
@.str.15 = [45 x i8] c"The '%s' variable is %f, it takes %d bytes.\0A\00"
@.str.16 = [46 x i8] c"The '%s' variable is %lf, it takes %d bytes.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i16
%4 = alloca i32
%5 = alloca i64
%6 = alloca i64
%7 = alloca float
%8 = alloca double
%9 = alloca i32
%10 = alloca [7 x i32]
%11 = alloca [7 x i8*]
store i32 0, i32* %1
store i32 0, i32* %9
%12 = bitcast [7 x i32]* %10 to i8*
%13 = bitcast [7 x i8*]* %11 to i8*
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.7, i64 0, i64 0))
%15 = call i32 @scanf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.8, i64 0, i64 0), i8* %2, i16* %3, i32* %4, i64* %5, i64* %6, float* %7, double* %8)
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.9, i64 0, i64 0))
%17 = load i32, i32* %9
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [7 x i8*], [7 x i8*]* %11, i64 0, i64 %18
%20 = load i8*, i8** %19
%21 = load i8, i8* %2
%22 = sext i8 %21 to i32
%23 = load i32, i32* %9
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [7 x i32], [7 x i32]* %10, i64 0, i64 %24
%26 = load i32, i32* %25
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.10, i64 0, i64 0), i8* %20, i32 %22, i32 %26)
%28 = load i32, i32* %9
%29 = add nsw i32 %28, 1
store i32 %29, i32* %9
%30 = load i32, i32* %9
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [7 x i8*], [7 x i8*]* %11, i64 0, i64 %31
%33 = load i8*, i8** %32
%34 = load i16, i16* %3
%35 = sext i16 %34 to i32
%36 = load i32, i32* %9
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [7 x i32], [7 x i32]* %10, i64 0, i64 %37
%39 = load i32, i32* %38
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.11, i64 0, i64 0), i8* %33, i32 %35, i32 %39)
%41 = load i32, i32* %9
%42 = add nsw i32 %41, 1
store i32 %42, i32* %9
%43 = load i32, i32* %9
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [7 x i8*], [7 x i8*]* %11, i64 0, i64 %44
%46 = load i8*, i8** %45
%47 = load i32, i32* %4
%48 = load i32, i32* %9
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds [7 x i32], [7 x i32]* %10, i64 0, i64 %49
%51 = load i32, i32* %50
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.12, i64 0, i64 0), i8* %46, i32 %47, i32 %51)
%53 = load i32, i32* %9
%54 = add nsw i32 %53, 1
store i32 %54, i32* %9
%55 = load i32, i32* %9
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds [7 x i8*], [7 x i8*]* %11, i64 0, i64 %56
%58 = load i8*, i8** %57
%59 = load i64, i64* %5
%60 = load i32, i32* %9
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds [7 x i32], [7 x i32]* %10, i64 0, i64 %61
%63 = load i32, i32* %62
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.13, i64 0, i64 0), i8* %58, i64 %59, i32 %63)
%65 = load i32, i32* %9
%66 = add nsw i32 %65, 1
store i32 %66, i32* %9
%67 = load i32, i32* %9
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds [7 x i8*], [7 x i8*]* %11, i64 0, i64 %68
%70 = load i8*, i8** %69
%71 = load i64, i64* %6
%72 = load i32, i32* %9
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds [7 x i32], [7 x i32]* %10, i64 0, i64 %73
%75 = load i32, i32* %74
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.14, i64 0, i64 0), i8* %70, i64 %71, i32 %75)
%77 = load i32, i32* %9
%78 = add nsw i32 %77, 1
store i32 %78, i32* %9
%79 = load i32, i32* %9
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds [7 x i8*], [7 x i8*]* %11, i64 0, i64 %80
%82 = load i8*, i8** %81
%83 = load float, float* %7
%84 = fpext float %83 to double
%85 = load i32, i32* %9
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds [7 x i32], [7 x i32]* %10, i64 0, i64 %86
%88 = load i32, i32* %87
%89 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.15, i64 0, i64 0), i8* %82, double %84, i32 %88)
%90 = load i32, i32* %9
%91 = add nsw i32 %90, 1
store i32 %91, i32* %9
%92 = load i32, i32* %9
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds [7 x i8*], [7 x i8*]* %11, i64 0, i64 %93
%95 = load i8*, i8** %94
%96 = load double, double* %8
%97 = load i32, i32* %9
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds [7 x i32], [7 x i32]* %10, i64 0, i64 %98
%100 = load i32, i32* %99
%101 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.16, i64 0, i64 0), i8* %95, double %96, i32 %100)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"char\00"
@.str.1 = [6 x i8] c"short\00"
@.str.2 = [4 x i8] c"int\00"
@.str.3 = [5 x i8] c"long\00"
@.str.4 = [10 x i8] c"long long\00"
@.str.5 = [6 x i8] c"float\00"
@.str.6 = [7 x i8] c"double\00"
@.str.8 = [26 x i8] c"%c %hd %d %ld %lld %f %lf\00"
@.str.10 = [44 x i8] c"The '%s' variable is %c, it takes %d byte.\0A\00"
@.str.11 = [46 x i8] c"The '%s' variable is %hd, it takes %d bytes.\0A\00"
@.str.12 = [45 x i8] c"The '%s' variable is %d, it takes %d bytes.\0A\00"
@.str.13 = [46 x i8] c"The '%s' variable is %ld, it takes %d bytes.\0A\00"
@.str.14 = [47 x i8] c"The '%s' variable is %lld, it takes %d bytes.\0A\00"
@.str.15 = [45 x i8] c"The '%s' variable is %f, it takes %d bytes.\0A\00"
@.str.16 = [46 x i8] c"The '%s' variable is %lf, it takes %d bytes.\0A\00"
@str = [26 x i8] c"Please input seven parts:\00"
@str.17 = [15 x i8] c"The result is:\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca i16
%3 = alloca i32
%4 = alloca i64
%5 = alloca i64
%6 = alloca float
%7 = alloca double
%8 = bitcast i16* %2 to i8*
%9 = bitcast i32* %3 to i8*
%10 = bitcast i64* %4 to i8*
%11 = bitcast i64* %5 to i8*
%12 = bitcast float* %6 to i8*
%13 = bitcast double* %7 to i8*
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%15 = call i32 @scanf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.8, i64 0, i64 0), i8* %1, i16* %2, i32* %3, i64* %4, i64* %5, float* %6, double* %7)
%16 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.17, i64 0, i64 0))
%17 = load i8, i8* %1
%18 = sext i8 %17 to i32
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %18, i32 1)
%20 = load i16, i16* %2
%21 = sext i16 %20 to i32
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %21, i32 2)
%23 = load i32, i32* %3
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %23, i32 4)
%25 = load i64, i64* %4
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i64 %25, i32 8)
%27 = load i64, i64* %5
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i64 %27, i32 8)
%29 = load float, float* %6
%30 = fpext float %29 to double
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.15, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), double %30, i32 4)
%32 = load double, double* %7
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), double %32, i32 8)
ret i32 0
}