#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_s(char *, ...);
int /*<<< orphan*/ system(char *);
main() {
  char c1, c2;
  int x, y;
  float f;
  double d;
  printf("Enter integer number x: ");
  scanf_s("%d", &x);
  printf("Enter integer number y: ");
  scanf_s("%d", &y);
  printf("Enter float number f: ");
  scanf_s("%f", &f);
  printf("Enter double number d: ");
  scanf_s("%lf", &d);
  printf("Enter char c1 and c2: ");
  scanf_s(" %c%c", &c1, &c2);
  system("pause");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xec1(%rip),%rdi
call   1040 <printf@plt>
lea    0xece(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf_s@plt>
lea    0xebf(%rip),%rdi
call   1040 <printf@plt>
lea    0xeb0(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf_s@plt>
lea    0xeba(%rip),%rdi
call   1040 <printf@plt>
lea    0xec5(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf_s@plt>
lea    0xeb6(%rip),%rdi
call   1040 <printf@plt>
lea    0xec2(%rip),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf_s@plt>
lea    0xeb4(%rip),%rdi
call   1040 <printf@plt>
lea    0xebf(%rip),%rdi
lea    -0x1(%rbp),%rsi
lea    -0x2(%rbp),%rdx
mov    $0x0,%al
call   1050 <scanf_s@plt>
lea    0xeaf(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xec4(%rip),%rdi
call   1040 <printf@plt>
lea    0xed1(%rip),%rbx
lea    0x14(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <scanf_s@plt>
lea    0xebe(%rip),%rdi
call   1040 <printf@plt>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <scanf_s@plt>
lea    0xebc(%rip),%rdi
call   1040 <printf@plt>
lea    0xec7(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf_s@plt>
lea    0xeb7(%rip),%rdi
call   1040 <printf@plt>
lea    0xec3(%rip),%rdi
lea    0x18(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf_s@plt>
lea    0xeb4(%rip),%rdi
call   1040 <printf@plt>
lea    0xebf(%rip),%rdi
lea    0xb(%rsp),%rsi
lea    0xa(%rsp),%rdx
xor    %eax,%eax
call   1050 <scanf_s@plt>
lea    0xead(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"Enter integer number x: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [25 x i8] c"Enter integer number y: \00"
@.str.3 = [23 x i8] c"Enter float number f: \00"
@.str.4 = [3 x i8] c"%f\00"
@.str.5 = [24 x i8] c"Enter double number d: \00"
@.str.6 = [4 x i8] c"%lf\00"
@.str.7 = [23 x i8] c"Enter char c1 and c2: \00"
@.str.8 = [6 x i8] c" %c%c\00"
@.str.9 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca i8
%3 = alloca i32
%4 = alloca i32
%5 = alloca float
%6 = alloca double
%7 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%8 = call i32 (i8*, ...) @scanf_s(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%9 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 (i8*, ...) @scanf_s(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%11 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
%12 = call i32 (i8*, ...) @scanf_s(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), float* %5)
%13 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0))
%14 = call i32 (i8*, ...) @scanf_s(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), double* %6)
%15 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0))
%16 = call i32 (i8*, ...) @scanf_s(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i8* %1, i8* %2)
%17 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [25 x i8] c"Enter integer number x: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [25 x i8] c"Enter integer number y: \00"
@.str.3 = [23 x i8] c"Enter float number f: \00"
@.str.4 = [3 x i8] c"%f\00"
@.str.5 = [24 x i8] c"Enter double number d: \00"
@.str.6 = [4 x i8] c"%lf\00"
@.str.7 = [23 x i8] c"Enter char c1 and c2: \00"
@.str.8 = [6 x i8] c" %c%c\00"
@.str.9 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca i8
%3 = alloca i32
%4 = alloca i32
%5 = alloca float
%6 = alloca double
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = bitcast float* %5 to i8*
%10 = bitcast double* %6 to i8*
%11 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%12 = call i32 (i8*, ...) @scanf_s(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%13 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
%14 = call i32 (i8*, ...) @scanf_s(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%15 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
%16 = call i32 (i8*, ...) @scanf_s(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), float* %5)
%17 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0))
%18 = call i32 (i8*, ...) @scanf_s(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), double* %6)
%19 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0))
%20 = call i32 (i8*, ...) @scanf_s(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i8* %1, i8* %2)
%21 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0))
ret i32 0
}