#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 */
short INT_MAX;
short SHRT_MAX;
int /*<<< orphan*/ printf(char *, short);
int main(int argc, const char *argv[]) {
  short shortValue = SHRT_MAX;
  int intValue = 10;
  double doubleValue = 10.1;
  printf("якщо ціле ділять на дробне = дробне : %f\n", intValue / doubleValue);
  printf("якщо дробне помножують на ціле = дробне : %f\n",
         doubleValue * intValue);
  printf("якщо ціле ділять на ціле = ціле : %i\n", intValue / intValue);
  printf("якщо ціле ділять на ціле = ціле : %d\n", intValue / 3);
  printf("якщо у цілого беруть залишок від цілого = ціле : %d\n",
         intValue % intValue);
  printf("якщо до short додають int = ціле : %i\n", shortValue + intValue);
  printf("якщо записати у менший тип більший тип з великим значенням = Warning "
         ": %i\n",
         shortValue = INT_MAX);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eab(%rip),%rax
mov    (%rax),%ax
mov    %ax,-0x12(%rbp)
movl   $0xa,-0x18(%rbp)
movabs $0x4024333333333333,%rax
33 24 40
mov    %rax,-0x20(%rbp)
cvtsi2sdl -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
movswl %ax,%esi
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
movsd  -0x20(%rbp),%xmm0
cvtsi2sdl -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
lea    0xec3(%rip),%rdi
movswl %ax,%esi
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
cltd
idivl  -0x18(%rbp)
lea    0xefb(%rip),%rdi
movswl %ax,%esi
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
lea    0xf1f(%rip),%rdi
movswl %ax,%esi
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
cltd
idivl  -0x18(%rbp)
mov    %dx,%ax
lea    0xf44(%rip),%rdi
movswl %ax,%esi
call   1030 <printf@plt>
movswl -0x12(%rbp),%eax
add    -0x18(%rbp),%eax
lea    0xf88(%rip),%rdi
movswl %ax,%esi
call   1030 <printf@plt>
mov    0x2df7(%rip),%rax
mov    (%rax),%ax
mov    %ax,-0x12(%rbp)
lea    0xfa3(%rip),%rdi
movswl %ax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x2ec0(%rip),%rax
movzwl (%rax),%ebx
lea    0xede(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
lea    0xf16(%rip),%rdi
mov    $0x65,%esi
call   1030 <printf@plt>
lea    0xf53(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xf80(%rip),%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
lea    0xfad(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
add    $0xa,%ebx
movswl %bx,%esi
lea    0xff3(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e65(%rip),%rax
movswl (%rax),%esi
lea    0x1015(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@SHRT_MAX = global i16 0
@.str = [70 x i8] c"\D1\8F\D0\BA\D1\89\D0\BE \D1\86\D1\96\D0\BB\D0\B5 \D0\B4\D1\96\D0\BB\D1\8F\D1\82\D1\8C \D0\BD\D0\B0 \D0\B4\D1\80\D0\BE\D0\B1\D0\BD\D0\B5 = \D0\B4\D1\80\D0\BE\D0\B1\D0\BD\D0\B5 : %f\0A\00"
@.str.1 = [78 x i8] c"\D1\8F\D0\BA\D1\89\D0\BE \D0\B4\D1\80\D0\BE\D0\B1\D0\BD\D0\B5 \D0\BF\D0\BE\D0\BC\D0\BD\D0\BE\D0\B6\D1\83\D1\8E\D1\82\D1\8C \D0\BD\D0\B0 \D1\86\D1\96\D0\BB\D0\B5 = \D0\B4\D1\80\D0\BE\D0\B1\D0\BD\D0\B5 : %f\0A\00"
@.str.2 = [62 x i8] c"\D1\8F\D0\BA\D1\89\D0\BE \D1\86\D1\96\D0\BB\D0\B5 \D0\B4\D1\96\D0\BB\D1\8F\D1\82\D1\8C \D0\BD\D0\B0 \D1\86\D1\96\D0\BB\D0\B5 = \D1\86\D1\96\D0\BB\D0\B5 : %i\0A\00"
@.str.3 = [62 x i8] c"\D1\8F\D0\BA\D1\89\D0\BE \D1\86\D1\96\D0\BB\D0\B5 \D0\B4\D1\96\D0\BB\D1\8F\D1\82\D1\8C \D0\BD\D0\B0 \D1\86\D1\96\D0\BB\D0\B5 = \D1\86\D1\96\D0\BB\D0\B5 : %d\0A\00"
@.str.4 = [90 x i8] c"\D1\8F\D0\BA\D1\89\D0\BE \D1\83 \D1\86\D1\96\D0\BB\D0\BE\D0\B3\D0\BE \D0\B1\D0\B5\D1\80\D1\83\D1\82\D1\8C \D0\B7\D0\B0\D0\BB\D0\B8\D1\88\D0\BE\D0\BA \D0\B2\D1\96\D0\B4 \D1\86\D1\96\D0\BB\D0\BE\D0\B3\D0\BE = \D1\86\D1\96\D0\BB\D0\B5 : %d\0A\00"
@.str.5 = [56 x i8] c"\D1\8F\D0\BA\D1\89\D0\BE \D0\B4\D0\BE short \D0\B4\D0\BE\D0\B4\D0\B0\D1\8E\D1\82\D1\8C int = \D1\86\D1\96\D0\BB\D0\B5 : %i\0A\00"
@.str.6 = [124 x i8] c"\D1\8F\D0\BA\D1\89\D0\BE \D0\B7\D0\B0\D0\BF\D0\B8\D1\81\D0\B0\D1\82\D0\B8 \D1\83 \D0\BC\D0\B5\D0\BD\D1\88\D0\B8\D0\B9 \D1\82\D0\B8\D0\BF \D0\B1\D1\96\D0\BB\D1\8C\D1\88\D0\B8\D0\B9 \D1\82\D0\B8\D0\BF \D0\B7 \D0\B2\D0\B5\D0\BB\D0\B8\D0\BA\D0\B8\D0\BC \D0\B7\D0\BD\D0\B0\D1\87\D0\B5\D0\BD\D0\BD\D1\8F\D0\BC = Warning : %i\0A\00"
@INT_MAX = global i16 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i16
%7 = alloca i32
%8 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = load i16, i16* @SHRT_MAX
store i16 %9, i16* %6
store i32 10, i32* %7
store double 1.010000e+01, double* %8
%10 = load i32, i32* %7
%11 = sitofp i32 %10 to double
%12 = load double, double* %8
%13 = fdiv double %11, %12
%14 = fptosi double %13 to i16
%15 = call i32 @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0), i16 signext %14)
%16 = load double, double* %8
%17 = load i32, i32* %7
%18 = sitofp i32 %17 to double
%19 = fmul double %16, %18
%20 = fptosi double %19 to i16
%21 = call i32 @printf(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.1, i64 0, i64 0), i16 signext %20)
%22 = load i32, i32* %7
%23 = load i32, i32* %7
%24 = sdiv i32 %22, %23
%25 = trunc i32 %24 to i16
%26 = call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.2, i64 0, i64 0), i16 signext %25)
%27 = load i32, i32* %7
%28 = sdiv i32 %27, 3
%29 = trunc i32 %28 to i16
%30 = call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.3, i64 0, i64 0), i16 signext %29)
%31 = load i32, i32* %7
%32 = load i32, i32* %7
%33 = srem i32 %31, %32
%34 = trunc i32 %33 to i16
%35 = call i32 @printf(i8* getelementptr inbounds ([90 x i8], [90 x i8]* @.str.4, i64 0, i64 0), i16 signext %34)
%36 = load i16, i16* %6
%37 = sext i16 %36 to i32
%38 = load i32, i32* %7
%39 = add nsw i32 %37, %38
%40 = trunc i32 %39 to i16
%41 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.5, i64 0, i64 0), i16 signext %40)
%42 = load i16, i16* @INT_MAX
store i16 %42, i16* %6
%43 = call i32 @printf(i8* getelementptr inbounds ([124 x i8], [124 x i8]* @.str.6, i64 0, i64 0), i16 signext %42)
ret i32 0
}

LLVM IR (-O2):
@SHRT_MAX = global i16 0
@.str = [70 x i8] c"\D1\8F\D0\BA\D1\89\D0\BE \D1\86\D1\96\D0\BB\D0\B5 \D0\B4\D1\96\D0\BB\D1\8F\D1\82\D1\8C \D0\BD\D0\B0 \D0\B4\D1\80\D0\BE\D0\B1\D0\BD\D0\B5 = \D0\B4\D1\80\D0\BE\D0\B1\D0\BD\D0\B5 : %f\0A\00"
@.str.1 = [78 x i8] c"\D1\8F\D0\BA\D1\89\D0\BE \D0\B4\D1\80\D0\BE\D0\B1\D0\BD\D0\B5 \D0\BF\D0\BE\D0\BC\D0\BD\D0\BE\D0\B6\D1\83\D1\8E\D1\82\D1\8C \D0\BD\D0\B0 \D1\86\D1\96\D0\BB\D0\B5 = \D0\B4\D1\80\D0\BE\D0\B1\D0\BD\D0\B5 : %f\0A\00"
@.str.2 = [62 x i8] c"\D1\8F\D0\BA\D1\89\D0\BE \D1\86\D1\96\D0\BB\D0\B5 \D0\B4\D1\96\D0\BB\D1\8F\D1\82\D1\8C \D0\BD\D0\B0 \D1\86\D1\96\D0\BB\D0\B5 = \D1\86\D1\96\D0\BB\D0\B5 : %i\0A\00"
@.str.3 = [62 x i8] c"\D1\8F\D0\BA\D1\89\D0\BE \D1\86\D1\96\D0\BB\D0\B5 \D0\B4\D1\96\D0\BB\D1\8F\D1\82\D1\8C \D0\BD\D0\B0 \D1\86\D1\96\D0\BB\D0\B5 = \D1\86\D1\96\D0\BB\D0\B5 : %d\0A\00"
@.str.4 = [90 x i8] c"\D1\8F\D0\BA\D1\89\D0\BE \D1\83 \D1\86\D1\96\D0\BB\D0\BE\D0\B3\D0\BE \D0\B1\D0\B5\D1\80\D1\83\D1\82\D1\8C \D0\B7\D0\B0\D0\BB\D0\B8\D1\88\D0\BE\D0\BA \D0\B2\D1\96\D0\B4 \D1\86\D1\96\D0\BB\D0\BE\D0\B3\D0\BE = \D1\86\D1\96\D0\BB\D0\B5 : %d\0A\00"
@.str.5 = [56 x i8] c"\D1\8F\D0\BA\D1\89\D0\BE \D0\B4\D0\BE short \D0\B4\D0\BE\D0\B4\D0\B0\D1\8E\D1\82\D1\8C int = \D1\86\D1\96\D0\BB\D0\B5 : %i\0A\00"
@.str.6 = [124 x i8] c"\D1\8F\D0\BA\D1\89\D0\BE \D0\B7\D0\B0\D0\BF\D0\B8\D1\81\D0\B0\D1\82\D0\B8 \D1\83 \D0\BC\D0\B5\D0\BD\D1\88\D0\B8\D0\B9 \D1\82\D0\B8\D0\BF \D0\B1\D1\96\D0\BB\D1\8C\D1\88\D0\B8\D0\B9 \D1\82\D0\B8\D0\BF \D0\B7 \D0\B2\D0\B5\D0\BB\D0\B8\D0\BA\D0\B8\D0\BC \D0\B7\D0\BD\D0\B0\D1\87\D0\B5\D0\BD\D0\BD\D1\8F\D0\BC = Warning : %i\0A\00"
@INT_MAX = global i16 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i16, i16* @SHRT_MAX
%4 = tail call i32 @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0), i16 signext 0)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str.1, i64 0, i64 0), i16 signext 101)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.2, i64 0, i64 0), i16 signext 1)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.3, i64 0, i64 0), i16 signext 3)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([90 x i8], [90 x i8]* @.str.4, i64 0, i64 0), i16 signext 0)
%9 = add i16 %3, 10
%10 = tail call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.5, i64 0, i64 0), i16 signext %9)
%11 = load i16, i16* @INT_MAX
%12 = tail call i32 @printf(i8* getelementptr inbounds ([124 x i8], [124 x i8]* @.str.6, i64 0, i64 0), i16 signext %11)
ret i32 0
}