#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 INT_MAX;
int LLONG_MAX;
int LONG_MAX;
int SHRT_MAX;
int /*<<< orphan*/ printf(char *, long double, ...);
int main() {
  short wynik;
  int wynik2;
  wynik = SHRT_MAX + 1;
  printf("SHORT  %i + 1 = %i\n", SHRT_MAX, wynik);
  wynik2 = INT_MAX + 1;
  printf("INT %i + 10 = %i\n", INT_MAX, wynik2);
  long wynik3;
  wynik3 = LONG_MAX + 100;
  printf("LONG %li + 100 = %li\n", LONG_MAX, wynik3);
  long long wynik4;
  wynik4 = LLONG_MAX + 100;
  printf("lONG LONG %lli + 100 = %lli\n", LLONG_MAX, wynik4);
  float wynik5;
  wynik5 = 0.000001 / 2.0;
  printf("FLOAT 0.000001/2.0 = %f\n", wynik5);
  double wynik6;
  wynik6 = 0.000003 / 4.0;
  printf("DOUBLE 0.000007/4.0 = %lf\n", wynik6);
  long double wynik7;
  wynik7 = 0.00000000000000001 / 2.0;
  printf("LONG DOUBLE 0.00000000000000001/2.0 = %Lf\n", wynik7);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    0x2ea9(%rip),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %cx,-0x2(%rbp)
mov    (%rax),%eax
mov    %eax,-0x50(%rbp)
fildl  -0x50(%rbp)
movswl -0x2(%rbp),%esi
mov    %rsp,%rax
fstpt  (%rax)
lea    0xec8(%rip),%rdi
xor    %eax,%eax
mov    %al,-0x51(%rbp)
call   1030 <printf@plt>
mov    -0x51(%rbp),%al
mov    0x2e94(%rip),%rcx
mov    (%rcx),%edx
add    $0x1,%edx
mov    %edx,-0x8(%rbp)
mov    (%rcx),%ecx
mov    %ecx,-0x4c(%rbp)
fildl  -0x4c(%rbp)
mov    -0x8(%rbp),%esi
mov    %rsp,%rcx
fstpt  (%rcx)
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x51(%rbp),%al
mov    0x2e4e(%rip),%rcx
mov    (%rcx),%edx
add    $0x64,%edx
movslq %edx,%rdx
mov    %rdx,-0x10(%rbp)
mov    (%rcx),%ecx
mov    %ecx,-0x48(%rbp)
fildl  -0x48(%rbp)
mov    -0x10(%rbp),%rsi
mov    %rsp,%rcx
fstpt  (%rcx)
lea    0xe88(%rip),%rdi
call   1030 <printf@plt>
mov    -0x51(%rbp),%al
mov    0x2e2b(%rip),%rcx
mov    (%rcx),%edx
add    $0x64,%edx
movslq %edx,%rdx
mov    %rdx,-0x18(%rbp)
mov    (%rcx),%ecx
mov    %ecx,-0x44(%rbp)
fildl  -0x44(%rbp)
mov    -0x18(%rbp),%rsi
mov    %rsp,%rcx
fstpt  (%rcx)
lea    0xe6b(%rip),%rdi
call   1030 <printf@plt>
mov    -0x51(%rbp),%al
movl   $0x350637bd,-0x1c(%rbp)
flds   -0x1c(%rbp)
mov    %rsp,%rcx
fstpt  (%rcx)
lea    0xe6a(%rip),%rdi
call   1030 <printf@plt>
mov    -0x51(%rbp),%al
movabs $0x3ea92a737110e454,%rcx
2a a9 3e
mov    %rcx,-0x28(%rbp)
fldl   -0x28(%rbp)
mov    %rsp,%rcx
fstpt  (%rcx)
lea    0xe5e(%rip),%rdi
call   1030 <printf@plt>
fldl   0xdd9(%rip)
fstpt  -0x40(%rbp)
fldt   -0x40(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
lea    0xe5c(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
mov    0x2ead(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x18(%rsp)
fildl  0x18(%rsp)
add    $0x1,%eax
movswl %ax,%esi
fstpt  (%rsp)
lea    0xee3(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x2ea5(%rip),%rax
mov    (%rax),%esi
mov    %esi,0x1c(%rsp)
add    $0x1,%esi
fildl  0x1c(%rsp)
fstpt  (%rsp)
lea    0xed2(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x2e68(%rip),%rax
movslq (%rax),%rsi
mov    %esi,0x20(%rsp)
add    $0x64,%rsi
fildl  0x20(%rsp)
fstpt  (%rsp)
lea    0xebd(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x2e51(%rip),%rax
movslq (%rax),%rsi
mov    %esi,0x24(%rsp)
add    $0x64,%rsi
fildl  0x24(%rsp)
fstpt  (%rsp)
lea    0xeac(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
flds   0xe4b(%rip)
fstpt  (%rsp)
lea    0xeb2(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
fldl   0xe3c(%rip)
fstpt  (%rsp)
lea    0xeb4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
fldl   0xe2d(%rip)
fstpt  (%rsp)
lea    0xeb8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@SHRT_MAX = global i32 0
@.str = [20 x i8] c"SHORT %i + 1 = %i\0A\00"
@INT_MAX = global i32 0
@.str.1 = [18 x i8] c"INT %i + 10 = %i\0A\00"
@LONG_MAX = global i32 0
@.str.2 = [22 x i8] c"LONG %li + 100 = %li\0A\00"
@LLONG_MAX = global i32 0
@.str.3 = [29 x i8] c"lONG LONG %lli + 100 = %lli\0A\00"
@.str.4 = [25 x i8] c"FLOAT 0.000001/2.0 = %f\0A\00"
@.str.5 = [27 x i8] c"DOUBLE 0.000007/4.0 = %lf\0A\00"
@.str.6 = [43 x i8] c"LONG DOUBLE 0.00000000000000001/2.0 = %Lf\0A\00"
define i32 @main() {
%1 = alloca i16
%2 = alloca i32
%3 = alloca i64
%4 = alloca i64
%5 = alloca float
%6 = alloca double
%7 = alloca x86_fp80
%8 = load i32, i32* @SHRT_MAX
%9 = add nsw i32 %8, 1
%10 = trunc i32 %9 to i16
store i16 %10, i16* %1
%11 = load i32, i32* @SHRT_MAX
%12 = sitofp i32 %11 to x86_fp80
%13 = load i16, i16* %1
%14 = sext i16 %13 to i32
%15 = call i32 (i8*, x86_fp80, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), x86_fp80 %12, i32 %14)
%16 = load i32, i32* @INT_MAX
%17 = add nsw i32 %16, 1
store i32 %17, i32* %2
%18 = load i32, i32* @INT_MAX
%19 = sitofp i32 %18 to x86_fp80
%20 = load i32, i32* %2
%21 = call i32 (i8*, x86_fp80, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), x86_fp80 %19, i32 %20)
%22 = load i32, i32* @LONG_MAX
%23 = add nsw i32 %22, 100
%24 = sext i32 %23 to i64
store i64 %24, i64* %3
%25 = load i32, i32* @LONG_MAX
%26 = sitofp i32 %25 to x86_fp80
%27 = load i64, i64* %3
%28 = call i32 (i8*, x86_fp80, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), x86_fp80 %26, i64 %27)
%29 = load i32, i32* @LLONG_MAX
%30 = add nsw i32 %29, 100
%31 = sext i32 %30 to i64
store i64 %31, i64* %4
%32 = load i32, i32* @LLONG_MAX
%33 = sitofp i32 %32 to x86_fp80
%34 = load i64, i64* %4
%35 = call i32 (i8*, x86_fp80, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0), x86_fp80 %33, i64 %34)
store float 0x3EA0C6F7A0000000, float* %5
%36 = load float, float* %5
%37 = fpext float %36 to x86_fp80
%38 = call i32 (i8*, x86_fp80, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), x86_fp80 %37)
store double 7.500000e-07, double* %6
%39 = load double, double* %6
%40 = fpext double %39 to x86_fp80
%41 = call i32 (i8*, x86_fp80, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0), x86_fp80 %40)
store x86_fp80 0xK3FC5B877AA3236A4B800, x86_fp80* %7
%42 = load x86_fp80, x86_fp80* %7
%43 = call i32 (i8*, x86_fp80, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.6, i64 0, i64 0), x86_fp80 %42)
ret i32 0
}

LLVM IR (-O2):
@SHRT_MAX = global i32 0
@.str = [20 x i8] c"SHORT %i + 1 = %i\0A\00"
@INT_MAX = global i32 0
@.str.1 = [18 x i8] c"INT %i + 10 = %i\0A\00"
@LONG_MAX = global i32 0
@.str.2 = [22 x i8] c"LONG %li + 100 = %li\0A\00"
@LLONG_MAX = global i32 0
@.str.3 = [29 x i8] c"lONG LONG %lli + 100 = %lli\0A\00"
@.str.4 = [25 x i8] c"FLOAT 0.000001/2.0 = %f\0A\00"
@.str.5 = [27 x i8] c"DOUBLE 0.000007/4.0 = %lf\0A\00"
@.str.6 = [43 x i8] c"LONG DOUBLE 0.00000000000000001/2.0 = %Lf\0A\00"
define i32 @main() {
%1 = load i32, i32* @SHRT_MAX
%2 = sitofp i32 %1 to x86_fp80
%3 = shl i32 %1, 16
%4 = add i32 %3, 65536
%5 = ashr exact i32 %4, 16
%6 = tail call i32 (i8*, x86_fp80, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), x86_fp80 %2, i32 %5)
%7 = load i32, i32* @INT_MAX
%8 = add nsw i32 %7, 1
%9 = sitofp i32 %7 to x86_fp80
%10 = tail call i32 (i8*, x86_fp80, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), x86_fp80 %9, i32 %8)
%11 = load i32, i32* @LONG_MAX
%12 = add nsw i32 %11, 100
%13 = sext i32 %12 to i64
%14 = sitofp i32 %11 to x86_fp80
%15 = tail call i32 (i8*, x86_fp80, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), x86_fp80 %14, i64 %13)
%16 = load i32, i32* @LLONG_MAX
%17 = add nsw i32 %16, 100
%18 = sext i32 %17 to i64
%19 = sitofp i32 %16 to x86_fp80
%20 = tail call i32 (i8*, x86_fp80, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0), x86_fp80 %19, i64 %18)
%21 = tail call i32 (i8*, x86_fp80, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), x86_fp80 0xK3FEA8637BD0000000000)
%22 = tail call i32 (i8*, x86_fp80, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0), x86_fp80 0xK3FEAC9539B888722A000)
%23 = tail call i32 (i8*, x86_fp80, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.6, i64 0, i64 0), x86_fp80 0xK3FC5B877AA3236A4B800)
ret i32 0
}