#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 i = 4;
  double d = 4.0;
  char *s = "HackerRank ";
  int j;
  double e;
  char t[256];
  scanf("%d", &j);
  scanf("%lf", &e);
  scanf("\n%[^\n]", t);
  printf("%d\n", i + j);
  printf("%0.1lf\n", d + e);
  printf("%s%s\n", s, t);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x130,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x4,-0x8(%rbp)
movsd  0xebf(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
lea    0xebb(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xebc(%rip),%rdi
lea    -0x1c(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xead(%rip),%rdi
lea    -0x28(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    -0x130(%rbp),%rsi
lea    0xe98(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x8(%rbp),%esi
add    -0x1c(%rbp),%esi
lea    0xe8b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsd  -0x10(%rbp),%xmm0
addsd  -0x28(%rbp),%xmm0
lea    0xe77(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rsi
lea    -0x130(%rbp),%rdx
lea    0xe66(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x130,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x110,%rsp
lea    0xee5(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xed5(%rip),%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xec6(%rip),%rdi
lea    0x10(%rsp),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
add    $0x4,%esi
lea    0xeb0(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
movsd  0x8(%rsp),%xmm0
addsd  0xe79(%rip),%xmm0
lea    0xe98(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe92(%rip),%rdi
lea    0xe65(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x110,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"HackerRank \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [4 x i8] c"%lf\00"
@.str.3 = [7 x i8] c"\0A%[^\0A]\00"
@.str.4 = [4 x i8] c"%d\0A\00"
@.str.5 = [8 x i8] c"%0.1lf\0A\00"
@.str.6 = [6 x i8] c"%s%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca double
%4 = alloca i8*
%5 = alloca i32
%6 = alloca double
%7 = alloca [256 x i8]
store i32 0, i32* %1
store i32 4, i32* %2
store double 4.000000e+00, double* %3
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %4
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %5)
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %6)
%10 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* %10)
%12 = load i32, i32* %2
%13 = load i32, i32* %5
%14 = add nsw i32 %12, %13
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 %14)
%16 = load double, double* %3
%17 = load double, double* %6
%18 = fadd double %16, %17
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), double %18)
%20 = load i8*, i8** %4
%21 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8* %20, i8* %21)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"HackerRank \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [4 x i8] c"%lf\00"
@.str.3 = [7 x i8] c"\0A%[^\0A]\00"
@.str.4 = [4 x i8] c"%d\0A\00"
@.str.5 = [8 x i8] c"%0.1lf\0A\00"
@.str.6 = [6 x i8] c"%s%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca [256 x i8]
%4 = bitcast i32* %1 to i8*
%5 = bitcast double* %2 to i8*
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double* %2)
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* %6)
%10 = load i32, i32* %1
%11 = add nsw i32 %10, 4
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 %11)
%13 = load double, double* %2
%14 = fadd double %13, 4.000000e+00
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), double %14)
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %6)
ret i32 0
}