#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 */
scalar_t__ pow(int, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
scalar_t__ sqrt(scalar_t__);
int main(void) {
  int hip, cat1, cat2;
  scanf("%d", &cat1);
  scanf("%d", &cat2);
  scanf("%d", &hip);
  if (hip == (int)sqrt(pow(cat1, 2) + pow(cat2, 2)))
    printf("SIM");
  else
    printf("NAO");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xe9a(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xe8a(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%edi
mov    $0x2,%esi
call   1050 <pow@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%edi
mov    $0x2,%esi
call   1050 <pow@plt>
mov    -0x20(%rbp),%rdi
add    %rax,%rdi
call   1060 <sqrt@plt>
mov    %rax,%rcx
mov    -0x14(%rbp),%eax
cmp    %ecx,%eax
jne    11ce <main+0x8e>
lea    0xe3f(%rip),%rdi
call   1030 <printf@plt>
jmp    11da <main+0x9a>
lea    0xe32(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
lea    0xeb3(%rip),%rbx
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x14(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0x14(%rsp),%ebp
mov    0x10(%rsp),%edi
mov    $0x2,%esi
call   1050 <pow@plt>
mov    %rax,%rbx
mov    0xc(%rsp),%edi
mov    $0x2,%esi
call   1050 <pow@plt>
add    %rax,%rbx
mov    %rbx,%rdi
call   1060 <sqrt@plt>
cmp    %eax,%ebp
lea    0xe58(%rip),%rax
lea    0xe55(%rip),%rdi
cmove  %rax,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"SIM\00"
@.str.2 = [4 x i8] c"NAO\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %4)
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = call i64 @pow(i32 %9, i32 2)
%11 = load i32, i32* %4
%12 = call i64 @pow(i32 %11, i32 2)
%13 = add nsw i64 %10, %12
%14 = call i64 @sqrt(i64 %13)
%15 = trunc i64 %14 to i32
%16 = icmp eq i32 %8, %15
br i1 %16, label %17, label %19
17: ; preds = %0
%18 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %21
19: ; preds = %0
%20 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
br label %21
21: ; preds = %19, %17
%22 = load i32, i32* %1
ret i32 %22
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"SIM\00"
@.str.2 = [4 x i8] c"NAO\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 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%10 = load i32, i32* %1
%11 = load i32, i32* %2
%12 = call i64 @pow(i32 %11, i32 2)
%13 = load i32, i32* %3
%14 = call i64 @pow(i32 %13, i32 2)
%15 = add nsw i64 %14, %12
%16 = call i64 @sqrt(i64 %15)
%17 = trunc i64 %16 to i32
%18 = icmp eq i32 %10, %17
%19 = select i1 %18, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0)
%20 = call i32 @printf(i8* dereferenceable(1) %19)
ret i32 0
}