#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 pow(int, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int a, b, c;
  int a_sq, b_sq, c_sq;
  scanf("%d", &a);
  scanf("%d", &b);
  scanf("%d", &c);
  a_sq = pow(a, 2);
  b_sq = pow(b, 2);
  c_sq = pow(c, 2);
  if (a_sq + b_sq == c_sq || b_sq + c_sq == a_sq || a_sq + c_sq == b_sq) {
    printf("Da si stworzy trojkat\n");
  } else {
    printf("Nie da sie stworzyc trojkata\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeaa(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xe9a(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%edi
mov    $0x2,%esi
call   1050 <pow@plt>
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%edi
mov    $0x2,%esi
call   1050 <pow@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%edi
mov    $0x2,%esi
call   1050 <pow@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
cmp    -0x1c(%rbp),%eax
je     11cc <main+0x9c>
mov    -0x18(%rbp),%eax
add    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
je     11cc <main+0x9c>
mov    -0x14(%rbp),%eax
add    -0x1c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jne    11dd <main+0xad>
lea    0xe30(%rip),%rdi
call   1030 <printf@plt>
jmp    11e9 <main+0xb9>
lea    0xe36(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
lea    0xec2(%rip),%rbx
lea    0x14(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0x14(%rsp),%edi
mov    $0x2,%esi
call   1050 <pow@plt>
mov    %eax,%r14d
mov    0x10(%rsp),%edi
mov    $0x2,%esi
call   1050 <pow@plt>
mov    %eax,%ebx
mov    0xc(%rsp),%edi
mov    $0x2,%esi
call   1050 <pow@plt>
lea    (%rax,%r14,1),%ecx
cmp    %ebx,%ecx
lea    0xe7f(%rip),%rcx
lea    0xe5b(%rip),%rdi
cmove  %rcx,%rdi
lea    (%rax,%rbx,1),%edx
cmp    %r14d,%edx
cmove  %rcx,%rdi
lea    (%rbx,%r14,1),%edx
cmp    %eax,%edx
cmove  %rcx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [23 x i8] c"Da si stworzy trojkat\0A\00"
@.str.2 = [30 x i8] c"Nie da sie stworzyc trojkata\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %4)
%11 = load i32, i32* %2
%12 = call i32 @pow(i32 %11, i32 2)
store i32 %12, i32* %5
%13 = load i32, i32* %3
%14 = call i32 @pow(i32 %13, i32 2)
store i32 %14, i32* %6
%15 = load i32, i32* %4
%16 = call i32 @pow(i32 %15, i32 2)
store i32 %16, i32* %7
%17 = load i32, i32* %5
%18 = load i32, i32* %6
%19 = add nsw i32 %17, %18
%20 = load i32, i32* %7
%21 = icmp eq i32 %19, %20
br i1 %21, label %34, label %22
22: ; preds = %0
%23 = load i32, i32* %6
%24 = load i32, i32* %7
%25 = add nsw i32 %23, %24
%26 = load i32, i32* %5
%27 = icmp eq i32 %25, %26
br i1 %27, label %34, label %28
28: ; preds = %22
%29 = load i32, i32* %5
%30 = load i32, i32* %7
%31 = add nsw i32 %29, %30
%32 = load i32, i32* %6
%33 = icmp eq i32 %31, %32
br i1 %33, label %34, label %36
34: ; preds = %28, %22, %0
%35 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
br label %38
36: ; preds = %28
%37 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
br label %38
38: ; preds = %36, %34
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@str = [29 x i8] c"Nie da sie stworzyc trojkata\00"
@str.3 = [22 x i8] c"Da si stworzy trojkat\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* %1)
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%10 = load i32, i32* %1
%11 = call i32 @pow(i32 %10, i32 2)
%12 = load i32, i32* %2
%13 = call i32 @pow(i32 %12, i32 2)
%14 = load i32, i32* %3
%15 = call i32 @pow(i32 %14, i32 2)
%16 = add nsw i32 %13, %11
%17 = icmp eq i32 %16, %15
%18 = add nsw i32 %15, %13
%19 = icmp eq i32 %18, %11
%20 = select i1 %17, i1 true, i1 %19
%21 = add nsw i32 %15, %11
%22 = icmp eq i32 %21, %13
%23 = select i1 %20, i1 true, i1 %22
%24 = select i1 %23, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @str.3, i64 0, i64 0), i8* getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0)
%25 = call i32 @puts(i8* dereferenceable(1) %24)
ret i32 0
}