#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 fabs(float);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *);
int main(void) {
  printf("Введите E: ");
  float E;
  scanf("%f", &E);
  float lastc = 1, lastz = 1;
  float ch = 1;
  float zn = 1;
  float q = 1;
  float Sum = 1;
  while (1) {
    lastc += 2;
    lastz += 3;
    ch *= lastc;
    zn *= lastz;
    q = ch / zn;
    if (fabs(q) <= E)
      break;
    Sum += q;
  }
  printf("Sum = %f\n", Sum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecb(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
movss  0xe9b(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xe8e(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xe81(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xe74(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  0xe67(%rip),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  0xe5a(%rip),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  0xe55(%rip),%xmm0
addss  -0xc(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xe3f(%rip),%xmm0
addss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0xc(%rbp),%xmm0
mulss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x10(%rbp),%xmm0
mulss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x14(%rbp),%xmm0
divss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
call   1040 <fabs@plt>
movaps %xmm0,%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     121c <main+0xec>
jmp    1230 <main+0x100>
movss  -0x1c(%rbp),%xmm0
addss  -0x20(%rbp),%xmm0
movss  %xmm0,-0x20(%rbp)
jmp    11ab <main+0x7b>
movss  -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xde2(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf18(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf1d(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
ucomiss 0xebb(%rip),%xmm0
jae    11ac <main+0x8c>
movaps 0xeba(%rip),%xmm2
movss  0xeae(%rip),%xmm1
movss  0xea2(%rip),%xmm6
movaps 0xeb3(%rip),%xmm3
movaps 0xebc(%rip),%xmm4
movaps %xmm2,%xmm5
nopw   0x0(%rax,%rax,1)
addss  %xmm6,%xmm1
addps  %xmm3,%xmm2
mulps  %xmm2,%xmm5
movaps %xmm5,%xmm7
shufps $0x55,%xmm5,%xmm7
movaps %xmm5,%xmm6
divss  %xmm7,%xmm6
movaps %xmm6,%xmm7
andps  %xmm4,%xmm7
ucomiss %xmm7,%xmm0
jb     1180 <main+0x60>
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
jmp    11b4 <main+0x94>
movsd  0xe4c(%rip),%xmm0
lea    0xe9b(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"\D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 E: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [10 x i8] c"Sum = %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store i32 0, i32* %1
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
store float 1.000000e+00, float* %3
store float 1.000000e+00, float* %4
store float 1.000000e+00, float* %5
store float 1.000000e+00, float* %6
store float 1.000000e+00, float* %7
store float 1.000000e+00, float* %8
br label %11
11: ; preds = %0, %30
%12 = load float, float* %3
%13 = fadd float %12, 2.000000e+00
store float %13, float* %3
%14 = load float, float* %4
%15 = fadd float %14, 3.000000e+00
store float %15, float* %4
%16 = load float, float* %3
%17 = load float, float* %5
%18 = fmul float %17, %16
store float %18, float* %5
%19 = load float, float* %4
%20 = load float, float* %6
%21 = fmul float %20, %19
store float %21, float* %6
%22 = load float, float* %5
%23 = load float, float* %6
%24 = fdiv float %22, %23
store float %24, float* %7
%25 = load float, float* %7
%26 = call float @fabs(float %25)
%27 = load float, float* %2
%28 = fcmp ole float %26, %27
br i1 %28, label %29, label %30
29: ; preds = %11
br label %34
30: ; preds = %11
%31 = load float, float* %7
%32 = load float, float* %8
%33 = fadd float %32, %31
store float %33, float* %8
br label %11
34: ; preds = %29
%35 = load float, float* %8
%36 = fpext float %35 to double
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), double %36)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"\D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 E: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [10 x i8] c"Sum = %f\0A\00"
define i32 @main() {
%1 = alloca float
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%3 = bitcast float* %1 to i8*
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%5 = load float, float* %1
%6 = fcmp ult float %5, 7.500000e-01
br i1 %6, label %7, label %22
7: ; preds = %0, %7
%8 = phi float [ %17, %7 ], [ 7.500000e-01, %0 ]
%9 = phi float [ %12, %7 ], [ 1.000000e+00, %0 ]
%10 = phi <2 x float> [ %13, %7 ], [ <float 3.000000e+00, float 4.000000e+00>, %0 ]
%11 = phi <2 x float> [ %14, %7 ], [ <float 3.000000e+00, float 4.000000e+00>, %0 ]
%12 = fadd float %9, %8
%13 = fadd <2 x float> %10, <float 2.000000e+00, float 3.000000e+00>
%14 = fmul <2 x float> %13, %11
%15 = extractelement <2 x float> %14, i64 0
%16 = extractelement <2 x float> %14, i64 1
%17 = fdiv float %15, %16
%18 = call float @llvm.fabs.f32(float %17)
%19 = fcmp ugt float %18, %5
br i1 %19, label %7, label %20
20: ; preds = %7
%21 = fpext float %12 to double
br label %22
22: ; preds = %20, %0
%23 = phi double [ 1.000000e+00, %0 ], [ %21, %20 ]
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), double %23)
ret i32 0
}