#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, c;
  printf("Катет a=");
  scanf("%d", &a);
  printf("Катет b=");
  scanf("%d", &b);
  printf("Гипотенуза c=");
  scanf("%d", &c);
  {
    if ((a * a) + (b * b) != (c * c))
      printf("Эти стороны не могут в прямоугольном треугольнике\n"
             "т.к. это не соответствует теореме Пифагора a^2+b^2=c^2\n");
    else
      printf("Они могут быть сторонами прямоугольного треуголника\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
lea    0xecc(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb0(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
lea    0xe94(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
imul   -0xc(%rbp),%ecx
add    %ecx,%eax
mov    -0x10(%rbp),%ecx
imul   -0x10(%rbp),%ecx
cmp    %ecx,%eax
je     11b3 <main+0x93>
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
jmp    11bf <main+0x9f>
lea    0xf35(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
call   1040 <printf@plt>
lea    0xec6(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xeb5(%rip),%rdi
call   1040 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0xeaa(%rip),%rdi
call   1040 <printf@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    0xc(%rsp),%eax
imul   %eax,%eax
mov    0x8(%rsp),%ecx
imul   %ecx,%ecx
add    %eax,%ecx
mov    0x4(%rsp),%eax
imul   %eax,%eax
cmp    %eax,%ecx
lea    0xe90(%rip),%rax
lea    0xeeb(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"\D0\9A\D0\B0\D1\82\D0\B5\D1\82 a=\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [14 x i8] c"\D0\9A\D0\B0\D1\82\D0\B5\D1\82 b=\00"
@.str.3 = [24 x i8] c"\D0\93\D0\B8\D0\BF\D0\BE\D1\82\D0\B5\D0\BD\D1\83\D0\B7\D0\B0 c=\00"
@.str.4 = [184 x i8] c"\D0\AD\D1\82\D0\B8 \D1\81\D1\82\D0\BE\D1\80\D0\BE\D0\BD\D1\8B \D0\BD\D0\B5 \D0\BC\D0\BE\D0\B3\D1\83\D1\82 \D0\B2 \D0\BF\D1\80\D1\8F\D0\BC\D0\BE\D1\83\D0\B3\D0\BE\D0\BB\D1\8C\D0\BD\D0\BE\D0\BC \D1\82\D1\80\D0\B5\D1\83\D0\B3\D0\BE\D0\BB\D1\8C\D0\BD\D0\B8\D0\BA\D0\B5\0A\D1\82.\D0\BA. \D1\8D\D1\82\D0\BE \D0\BD\D0\B5 \D1\81\D0\BE\D0\BE\D1\82\D0\B2\D0\B5\D1\82\D1\81\D1\82\D0\B2\D1\83\D0\B5\D1\82 \D1\82\D0\B5\D0\BE\D1\80\D0\B5\D0\BC\D0\B5 \D0\9F\D0\B8\D1\84\D0\B0\D0\B3\D0\BE\D1\80\D0\B0 a^2+b^2=c^2\0A\00"
@.str.5 = [99 x i8] c"\D0\9E\D0\BD\D0\B8 \D0\BC\D0\BE\D0\B3\D1\83\D1\82 \D0\B1\D1\8B\D1\82\D1\8C \D1\81\D1\82\D0\BE\D1\80\D0\BE\D0\BD\D0\B0\D0\BC\D0\B8 \D0\BF\D1\80\D1\8F\D0\BC\D0\BE\D1\83\D0\B3\D0\BE\D0\BB\D1\8C\D0\BD\D0\BE\D0\B3\D0\BE \D1\82\D1\80\D0\B5\D1\83\D0\B3\D0\BE\D0\BB\D0\BD\D0\B8\D0\BA\D0\B0\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%7 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%9 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%11 = load i32, i32* %2
%12 = load i32, i32* %2
%13 = mul nsw i32 %11, %12
%14 = load i32, i32* %3
%15 = load i32, i32* %3
%16 = mul nsw i32 %14, %15
%17 = add nsw i32 %13, %16
%18 = load i32, i32* %4
%19 = load i32, i32* %4
%20 = mul nsw i32 %18, %19
%21 = icmp ne i32 %17, %20
br i1 %21, label %22, label %24
22: ; preds = %0
%23 = call i32 @printf(i8* getelementptr inbounds ([184 x i8], [184 x i8]* @.str.4, i64 0, i64 0))
br label %26
24: ; preds = %0
%25 = call i32 @printf(i8* getelementptr inbounds ([99 x i8], [99 x i8]* @.str.5, i64 0, i64 0))
br label %26
26: ; preds = %24, %22
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"\D0\9A\D0\B0\D1\82\D0\B5\D1\82 a=\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [14 x i8] c"\D0\9A\D0\B0\D1\82\D0\B5\D1\82 b=\00"
@.str.3 = [24 x i8] c"\D0\93\D0\B8\D0\BF\D0\BE\D1\82\D0\B5\D0\BD\D1\83\D0\B7\D0\B0 c=\00"
@str = [98 x i8] c"\D0\9E\D0\BD\D0\B8 \D0\BC\D0\BE\D0\B3\D1\83\D1\82 \D0\B1\D1\8B\D1\82\D1\8C \D1\81\D1\82\D0\BE\D1\80\D0\BE\D0\BD\D0\B0\D0\BC\D0\B8 \D0\BF\D1\80\D1\8F\D0\BC\D0\BE\D1\83\D0\B3\D0\BE\D0\BB\D1\8C\D0\BD\D0\BE\D0\B3\D0\BE \D1\82\D1\80\D0\B5\D1\83\D0\B3\D0\BE\D0\BB\D0\BD\D0\B8\D0\BA\D0\B0\00"
@str.6 = [183 x i8] c"\D0\AD\D1\82\D0\B8 \D1\81\D1\82\D0\BE\D1\80\D0\BE\D0\BD\D1\8B \D0\BD\D0\B5 \D0\BC\D0\BE\D0\B3\D1\83\D1\82 \D0\B2 \D0\BF\D1\80\D1\8F\D0\BC\D0\BE\D1\83\D0\B3\D0\BE\D0\BB\D1\8C\D0\BD\D0\BE\D0\BC \D1\82\D1\80\D0\B5\D1\83\D0\B3\D0\BE\D0\BB\D1\8C\D0\BD\D0\B8\D0\BA\D0\B5\0A\D1\82.\D0\BA. \D1\8D\D1\82\D0\BE \D0\BD\D0\B5 \D1\81\D0\BE\D0\BE\D1\82\D0\B2\D0\B5\D1\82\D1\81\D1\82\D0\B2\D1\83\D0\B5\D1\82 \D1\82\D0\B5\D0\BE\D1\80\D0\B5\D0\BC\D0\B5 \D0\9F\D0\B8\D1\84\D0\B0\D0\B3\D0\BE\D1\80\D0\B0 a^2+b^2=c^2\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%9 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%11 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%13 = load i32, i32* %1
%14 = mul nsw i32 %13, %13
%15 = load i32, i32* %2
%16 = mul nsw i32 %15, %15
%17 = add nuw nsw i32 %16, %14
%18 = load i32, i32* %3
%19 = mul nsw i32 %18, %18
%20 = icmp eq i32 %17, %19
%21 = select i1 %20, i8* getelementptr inbounds ([98 x i8], [98 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([183 x i8], [183 x i8]* @str.6, i64 0, i64 0)
%22 = call i32 @puts(i8* dereferenceable(1) %21)
ret i32 0
}