#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 */
float cos(int);
float pow(int, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
main() {
  int x;
  float f;
  printf(" Введите значение x ");
  scanf("%d\n", &x);
  if (x >= 0)
    f == pow(1 + 1 / 5, 5) * pow(x, -1);
  printf("f=%f\n", f);
  if (x < 0)
    f == cos(x);
  printf("f=%f\n", f);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec0(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,-0x8(%rbp)
jl     1193 <main+0x53>
mov    $0x1,%edi
mov    $0x5,%esi
call   1060 <pow@plt>
mov    -0x8(%rbp),%edi
mov    $0xffffffff,%esi
call   1060 <pow@plt>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe85(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x8(%rbp)
jge    11bc <main+0x7c>
mov    -0x8(%rbp),%edi
call   1050 <cos@plt>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe5c(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xece(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,0x4(%rsp)
js     1184 <main+0x44>
mov    $0x1,%edi
mov    $0x5,%esi
call   1060 <pow@plt>
mov    0x4(%rsp),%edi
mov    $0xffffffff,%esi
call   1060 <pow@plt>
lea    0xe9d(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    0x4(%rsp),%edi
test   %edi,%edi
jns    119f <main+0x5f>
call   1050 <cos@plt>
lea    0xe82(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [36 x i8] c" \D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 \D0\B7\D0\BD\D0\B0\D1\87\D0\B5\D0\BD\D0\B8\D0\B5 x \00"
@.str.1 = [4 x i8] c"%d\0A\00"
@.str.2 = [6 x i8] c"f=%f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = icmp sge i32 %6, 0
br i1 %7, label %8, label %16
8: ; preds = %0
%9 = load float, float* %3
%10 = call float @pow(i32 1, i32 5)
%11 = load i32, i32* %2
%12 = call float @pow(i32 %11, i32 -1)
%13 = fmul float %10, %12
%14 = fcmp oeq float %9, %13
%15 = zext i1 %14 to i32
br label %16
16: ; preds = %8, %0
%17 = load float, float* %3
%18 = fpext float %17 to double
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), double %18)
%20 = load i32, i32* %2
%21 = icmp slt i32 %20, 0
br i1 %21, label %22, label %28
22: ; preds = %16
%23 = load float, float* %3
%24 = load i32, i32* %2
%25 = call float @cos(i32 %24)
%26 = fcmp oeq float %23, %25
%27 = zext i1 %26 to i32
br label %28
28: ; preds = %22, %16
%29 = load float, float* %3
%30 = fpext float %29 to double
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), double %30)
ret i32 0
}

LLVM IR (-O2):
@.str = [36 x i8] c" \D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 \D0\B7\D0\BD\D0\B0\D1\87\D0\B5\D0\BD\D0\B8\D0\B5 x \00"
@.str.1 = [4 x i8] c"%d\0A\00"
@.str.2 = [6 x i8] c"f=%f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = icmp sgt i32 %5, -1
br i1 %6, label %7, label %11
7: ; preds = %0
%8 = call float @pow(i32 1, i32 5)
%9 = load i32, i32* %1
%10 = call float @pow(i32 %9, i32 -1)
br label %11
11: ; preds = %7, %0
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), double undef)
%13 = load i32, i32* %1
%14 = icmp slt i32 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %11
%16 = call float @cos(i32 %13)
br label %17
17: ; preds = %15, %11
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), double undef)
ret i32 0
}