#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 *, ...);
int main() {
  int a, b;
  char ch;
  float f1, f2;
  printf("\nEnter Character:\n");
  scanf("%c", &ch);
  printf("\nEnter two number :\n");
  scanf("%d %d", &a, &b);
  printf("\nEnter two floating point number :\n");
  scanf("%f %f", &f1, &f2);
  printf("\nSum of %d and %d is %d\n", a, b, a + b);
  printf("\nASCII value of %c is %d\n", ch, ch);
  printf("\n%f * %f = %f\n", f1, f2, f1 * f2);
  printf("\n%0.2f * %0.3f = %0.4f\n", f1, f2, f1 * f2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecf(%rip),%rdi
lea    -0xd(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec7(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
lea    -0x14(%rbp),%rsi
lea    -0x18(%rbp),%rdx
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%ecx
add    -0xc(%rbp),%ecx
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsbl -0xd(%rbp),%esi
movsbl -0xd(%rbp),%edx
lea    0xeb4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x18(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x14(%rbp),%xmm2
mulss  -0x18(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
lea    0xea0(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x18(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x14(%rbp),%xmm2
mulss  -0x18(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
lea    0xe81(%rip),%rdi
mov    $0x3,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xf2e(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb9(%rip),%rdi
lea    0x7(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xf21(%rip),%rdi
call   1030 <puts@plt>
lea    0xe9d(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
xor    %eax,%eax
call   1050 <scanf@plt>
lea    0xf11(%rip),%rdi
call   1030 <puts@plt>
lea    0xe7f(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
xor    %eax,%eax
call   1050 <scanf@plt>
mov    0x14(%rsp),%esi
mov    0x10(%rsp),%edx
lea    (%rdx,%rsi,1),%ecx
lea    0xe62(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0x7(%rsp),%edx
lea    0xe68(%rip),%rdi
mov    %edx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
movss  0xc(%rsp),%xmm2
cvtss2sd %xmm2,%xmm0
movss  0x8(%rsp),%xmm3
cvtss2sd %xmm3,%xmm1
mulss  %xmm3,%xmm2
cvtss2sd %xmm2,%xmm2
lea    0xe56(%rip),%rdi
mov    $0x3,%al
call   1040 <printf@plt>
movss  0xc(%rsp),%xmm2
xorps  %xmm0,%xmm0
cvtss2sd %xmm2,%xmm0
movss  0x8(%rsp),%xmm3
xorps  %xmm1,%xmm1
cvtss2sd %xmm3,%xmm1
mulss  %xmm3,%xmm2
cvtss2sd %xmm2,%xmm2
lea    0xe35(%rip),%rdi
mov    $0x3,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [19 x i8] c"\0AEnter Character:\0A\00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [21 x i8] c"\0AEnter two number :\0A\00"
@.str.3 = [6 x i8] c"%d %d\00"
@.str.4 = [36 x i8] c"\0AEnter two floating point number :\0A\00"
@.str.5 = [6 x i8] c"%f %f\00"
@.str.6 = [25 x i8] c"\0ASum of %d and %d is %d\0A\00"
@.str.7 = [26 x i8] c"\0AASCII value of %c is %d\0A\00"
@.str.8 = [15 x i8] c"\0A%f * %f = %f\0A\00"
@.str.9 = [24 x i8] c"\0A%0.2f * %0.3f = %0.4f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8
%5 = alloca float
%6 = alloca float
store i32 0, i32* %1
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32* %2, i32* %3)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0))
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), float* %5, float* %6)
%13 = load i32, i32* %2
%14 = load i32, i32* %3
%15 = load i32, i32* %2
%16 = load i32, i32* %3
%17 = add nsw i32 %15, %16
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0), i32 %13, i32 %14, i32 %17)
%19 = load i8, i8* %4
%20 = sext i8 %19 to i32
%21 = load i8, i8* %4
%22 = sext i8 %21 to i32
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0), i32 %20, i32 %22)
%24 = load float, float* %5
%25 = fpext float %24 to double
%26 = load float, float* %6
%27 = fpext float %26 to double
%28 = load float, float* %5
%29 = load float, float* %6
%30 = fmul float %28, %29
%31 = fpext float %30 to double
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.8, i64 0, i64 0), double %25, double %27, double %31)
%33 = load float, float* %5
%34 = fpext float %33 to double
%35 = load float, float* %6
%36 = fpext float %35 to double
%37 = load float, float* %5
%38 = load float, float* %6
%39 = fmul float %37, %38
%40 = fpext float %39 to double
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0), double %34, double %36, double %40)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%c\00"
@.str.3 = [6 x i8] c"%d %d\00"
@.str.5 = [6 x i8] c"%f %f\00"
@.str.6 = [25 x i8] c"\0ASum of %d and %d is %d\0A\00"
@.str.7 = [26 x i8] c"\0AASCII value of %c is %d\0A\00"
@.str.8 = [15 x i8] c"\0A%f * %f = %f\0A\00"
@.str.9 = [24 x i8] c"\0A%0.2f * %0.3f = %0.4f\0A\00"
@str = [18 x i8] c"\0AEnter Character:\00"
@str.10 = [20 x i8] c"\0AEnter two number :\00"
@str.11 = [35 x i8] c"\0AEnter two floating point number :\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8
%4 = alloca float
%5 = alloca float
%6 = bitcast i32* %1 to i8*
%7 = bitcast i32* %2 to i8*
%8 = bitcast float* %4 to i8*
%9 = bitcast float* %5 to i8*
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%12 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.10, i64 0, i64 0))
%13 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32* %1, i32* %2)
%14 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.11, i64 0, i64 0))
%15 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), float* %4, float* %5)
%16 = load i32, i32* %1
%17 = load i32, i32* %2
%18 = add nsw i32 %17, %16
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0), i32 %16, i32 %17, i32 %18)
%20 = load i8, i8* %3
%21 = sext i8 %20 to i32
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0), i32 %21, i32 %21)
%23 = load float, float* %4
%24 = fpext float %23 to double
%25 = load float, float* %5
%26 = fpext float %25 to double
%27 = fmul float %23, %25
%28 = fpext float %27 to double
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.8, i64 0, i64 0), double %24, double %26, double %28)
%30 = load float, float* %4
%31 = fpext float %30 to double
%32 = load float, float* %5
%33 = fpext float %32 to double
%34 = fmul float %30, %32
%35 = fpext float %34 to double
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0), double %31, double %33, double %35)
ret i32 0
}