#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 *, double *);
double sinx(double, double);
main() {
  double x, e;
  printf("Введите x:");
  scanf("%lf", &x);
  printf("Введите 0<e<1:");
  scanf("%lf", &e);
  if (e < 0 || e > 1)
    printf("e должен быть больше 0, но меньше 1\n");
  else
    printf("sinx=%f\n", sinx(x, e));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xec6(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xea8(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1050 <scanf@plt>
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
ja     11a0 <main+0x70>
movsd  -0x18(%rbp),%xmm0
movsd  0xe6a(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    11b3 <main+0x83>
lea    0xe8d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    11d0 <main+0xa0>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
call   1030 <sinx@plt>
lea    0xea8(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xebc(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xec0(%rip),%rbx
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
lea    0xeb0(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
movsd  (%rsp),%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
ja     11b4 <main+0x74>
ucomisd 0xe69(%rip),%xmm1
ja     11b4 <main+0x74>
movsd  0x8(%rsp),%xmm0
call   1030 <sinx@plt>
lea    0xe89(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
jmp    11c0 <main+0x80>
lea    0xe82(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"\D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 x:\00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [22 x i8] c"\D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 0<e<1:\00"
@.str.3 = [61 x i8] c"e \D0\B4\D0\BE\D0\BB\D0\B6\D0\B5\D0\BD \D0\B1\D1\8B\D1\82\D1\8C \D0\B1\D0\BE\D0\BB\D1\8C\D1\88\D0\B5 0, \D0\BD\D0\BE \D0\BC\D0\B5\D0\BD\D1\8C\D1\88\D0\B5 1\0A\00"
@.str.4 = [9 x i8] c"sinx=%f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 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), double* %2)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %3)
%8 = load double, double* %3
%9 = fcmp olt double %8, 0.000000e+00
br i1 %9, label %13, label %10
10: ; preds = %0
%11 = load double, double* %3
%12 = fcmp ogt double %11, 1.000000e+00
br i1 %12, label %13, label %15
13: ; preds = %10, %0
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.3, i64 0, i64 0))
br label %20
15: ; preds = %10
%16 = load double, double* %2
%17 = load double, double* %3
%18 = call double @sinx(double %16, double %17)
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), double %18)
br label %20
20: ; preds = %15, %13
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"\D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 x:\00"
@.str.1 = [4 x i8] c"%lf\00"
@.str.2 = [22 x i8] c"\D0\92\D0\B2\D0\B5\D0\B4\D0\B8\D1\82\D0\B5 0<e<1:\00"
@.str.4 = [9 x i8] c"sinx=%f\0A\00"
@str = [60 x i8] c"e \D0\B4\D0\BE\D0\BB\D0\B6\D0\B5\D0\BD \D0\B1\D1\8B\D1\82\D1\8C \D0\B1\D0\BE\D0\BB\D1\8C\D1\88\D0\B5 0, \D0\BD\D0\BE \D0\BC\D0\B5\D0\BD\D1\8C\D1\88\D0\B5 1\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = bitcast double* %1 to i8*
%4 = bitcast double* %2 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %1)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double* %2)
%9 = load double, double* %2
%10 = fcmp olt double %9, 0.000000e+00
%11 = fcmp ogt double %9, 1.000000e+00
%12 = or i1 %10, %11
br i1 %12, label %13, label %15
13: ; preds = %0
%14 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str, i64 0, i64 0))
br label %19
15: ; preds = %0
%16 = load double, double* %1
%17 = call double @sinx(double %16, double %9)
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), double %17)
br label %19
19: ; preds = %15, %13
ret i32 0
}