#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 *, float *, float *);
int main() {
  int h = 10;
  float x1 = 2, y1 = 2, x2 = -2, y2 = 2, x3 = -2, y3 = -2, x4 = 2, y4 = -2, x,
        y, d1, d2, d3, d4;
  printf("请输入x,y：");
  scanf("%f,%f", &x, &y);
  d1 = (x - x1) * (x - x1) + (y - y1) * (y - y1);
  d2 = (x - x2) * (x - x2) + (y - y2) * (y - y2);
  d3 = (x - x3) * (x - x3) + (y - y3) * (y - y3);
  d4 = (x - x4) * (x - x4) + (y - y4) * (y - y4);
  if (d1 > 1 && d2 > 1 && d3 > 1 && d4 > 1)
    h = 0;
  printf("该点高度为%d", h);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
movss  0xeca(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  0xebd(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xeac(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xea3(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  0xe92(%rip),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  0xe85(%rip),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  0xe7c(%rip),%xmm0
movss  %xmm0,-0x24(%rbp)
movss  0xe6b(%rip),%xmm0
movss  %xmm0,-0x28(%rbp)
lea    0xe67(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe69(%rip),%rdi
lea    -0x2c(%rbp),%rsi
lea    -0x30(%rbp),%rdx
call   1040 <scanf@plt>
movss  -0x2c(%rbp),%xmm0
subss  -0xc(%rbp),%xmm0
movss  -0x2c(%rbp),%xmm2
subss  -0xc(%rbp),%xmm2
movss  -0x30(%rbp),%xmm1
subss  -0x10(%rbp),%xmm1
movss  -0x30(%rbp),%xmm3
subss  -0x10(%rbp),%xmm3
mulss  %xmm3,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x34(%rbp)
movss  -0x2c(%rbp),%xmm0
subss  -0x14(%rbp),%xmm0
movss  -0x2c(%rbp),%xmm2
subss  -0x14(%rbp),%xmm2
movss  -0x30(%rbp),%xmm1
subss  -0x18(%rbp),%xmm1
movss  -0x30(%rbp),%xmm3
subss  -0x18(%rbp),%xmm3
mulss  %xmm3,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x38(%rbp)
movss  -0x2c(%rbp),%xmm0
subss  -0x1c(%rbp),%xmm0
movss  -0x2c(%rbp),%xmm2
subss  -0x1c(%rbp),%xmm2
movss  -0x30(%rbp),%xmm1
subss  -0x20(%rbp),%xmm1
movss  -0x30(%rbp),%xmm3
subss  -0x20(%rbp),%xmm3
mulss  %xmm3,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x3c(%rbp)
movss  -0x2c(%rbp),%xmm0
subss  -0x24(%rbp),%xmm0
movss  -0x2c(%rbp),%xmm2
subss  -0x24(%rbp),%xmm2
movss  -0x30(%rbp),%xmm1
subss  -0x28(%rbp),%xmm1
movss  -0x30(%rbp),%xmm3
subss  -0x28(%rbp),%xmm3
mulss  %xmm3,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x40(%rbp)
movss  -0x34(%rbp),%xmm0
movss  0xd4f(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    1303 <main+0x1e3>
movss  -0x38(%rbp),%xmm0
movss  0xd39(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    1303 <main+0x1e3>
movss  -0x3c(%rbp),%xmm0
movss  0xd23(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    1303 <main+0x1e3>
movss  -0x40(%rbp),%xmm0
movss  0xd0d(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    1303 <main+0x1e3>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xd15(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xefa(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
shufps $0x0,%xmm0,%xmm0
movaps 0xeac(%rip),%xmm1
addps  %xmm1,%xmm0
movss  (%rsp),%xmm2
shufps $0x0,%xmm2,%xmm2
addps  %xmm1,%xmm2
mulps  %xmm2,%xmm2
unpcklps %xmm2,%xmm2
mulps  %xmm0,%xmm0
shufps $0x14,%xmm0,%xmm0
addps  %xmm2,%xmm0
movaps 0xe96(%rip),%xmm1
cmpnltps %xmm0,%xmm1
movmskps %xmm1,%eax
test   %eax,%eax
mov    $0xa,%esi
cmove  %eax,%esi
lea    0xea4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"\E8\AF\B7\E8\BE\93\E5\85\A5x,y\EF\BC\9A\00"
@.str.1 = [6 x i8] c"%f,%f\00"
@.str.2 = [18 x i8] c"\E8\AF\A5\E7\82\B9\E9\AB\98\E5\BA\A6\E4\B8\BA%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
%13 = alloca float
%14 = alloca float
%15 = alloca float
%16 = alloca float
store i32 0, i32* %1
store i32 10, i32* %2
store float 2.000000e+00, float* %3
store float 2.000000e+00, float* %4
store float -2.000000e+00, float* %5
store float 2.000000e+00, float* %6
store float -2.000000e+00, float* %7
store float -2.000000e+00, float* %8
store float 2.000000e+00, float* %9
store float -2.000000e+00, float* %10
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%18 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float* %11, float* %12)
%19 = load float, float* %11
%20 = load float, float* %3
%21 = fsub float %19, %20
%22 = load float, float* %11
%23 = load float, float* %3
%24 = fsub float %22, %23
%25 = load float, float* %12
%26 = load float, float* %4
%27 = fsub float %25, %26
%28 = load float, float* %12
%29 = load float, float* %4
%30 = fsub float %28, %29
%31 = fmul float %27, %30
%32 = call float @llvm.fmuladd.f32(float %21, float %24, float %31)
store float %32, float* %13
%33 = load float, float* %11
%34 = load float, float* %5
%35 = fsub float %33, %34
%36 = load float, float* %11
%37 = load float, float* %5
%38 = fsub float %36, %37
%39 = load float, float* %12
%40 = load float, float* %6
%41 = fsub float %39, %40
%42 = load float, float* %12
%43 = load float, float* %6
%44 = fsub float %42, %43
%45 = fmul float %41, %44
%46 = call float @llvm.fmuladd.f32(float %35, float %38, float %45)
store float %46, float* %14
%47 = load float, float* %11
%48 = load float, float* %7
%49 = fsub float %47, %48
%50 = load float, float* %11
%51 = load float, float* %7
%52 = fsub float %50, %51
%53 = load float, float* %12
%54 = load float, float* %8
%55 = fsub float %53, %54
%56 = load float, float* %12
%57 = load float, float* %8
%58 = fsub float %56, %57
%59 = fmul float %55, %58
%60 = call float @llvm.fmuladd.f32(float %49, float %52, float %59)
store float %60, float* %15
%61 = load float, float* %11
%62 = load float, float* %9
%63 = fsub float %61, %62
%64 = load float, float* %11
%65 = load float, float* %9
%66 = fsub float %64, %65
%67 = load float, float* %12
%68 = load float, float* %10
%69 = fsub float %67, %68
%70 = load float, float* %12
%71 = load float, float* %10
%72 = fsub float %70, %71
%73 = fmul float %69, %72
%74 = call float @llvm.fmuladd.f32(float %63, float %66, float %73)
store float %74, float* %16
%75 = load float, float* %13
%76 = fcmp ogt float %75, 1.000000e+00
br i1 %76, label %77, label %87
77: ; preds = %0
%78 = load float, float* %14
%79 = fcmp ogt float %78, 1.000000e+00
br i1 %79, label %80, label %87
80: ; preds = %77
%81 = load float, float* %15
%82 = fcmp ogt float %81, 1.000000e+00
br i1 %82, label %83, label %87
83: ; preds = %80
%84 = load float, float* %16
%85 = fcmp ogt float %84, 1.000000e+00
br i1 %85, label %86, label %87
86: ; preds = %83
store i32 0, i32* %2
br label %87
87: ; preds = %86, %83, %80, %77, %0
%88 = load i32, i32* %2
%89 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 %88)
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"\E8\AF\B7\E8\BE\93\E5\85\A5x,y\EF\BC\9A\00"
@.str.1 = [6 x i8] c"%f,%f\00"
@.str.2 = [18 x i8] c"\E8\AF\A5\E7\82\B9\E9\AB\98\E5\BA\A6\E4\B8\BA%d\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = bitcast float* %1 to i8*
%4 = bitcast float* %2 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), float* %1, float* %2)
%7 = load float, float* %1
%8 = load float, float* %2
%9 = insertelement <2 x float> poison, float %7, i64 0
%10 = shufflevector <2 x float> %9, <2 x float> poison, <2 x i32> zeroinitializer
%11 = fadd <2 x float> %10, <float -2.000000e+00, float 2.000000e+00>
%12 = shufflevector <2 x float> %11, <2 x float> poison, <4 x i32> <i32 0, i32 1, i32 1, i32 0>
%13 = insertelement <2 x float> poison, float %8, i64 0
%14 = shufflevector <2 x float> %13, <2 x float> poison, <2 x i32> zeroinitializer
%15 = fadd <2 x float> %14, <float -2.000000e+00, float 2.000000e+00>
%16 = fmul <2 x float> %15, %15
%17 = shufflevector <2 x float> %16, <2 x float> poison, <4 x i32> <i32 0, i32 0, i32 1, i32 1>
%18 = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %12, <4 x float> %12, <4 x float> %17)
%19 = freeze <4 x float> %18
%20 = fcmp ule <4 x float> %19, <float 1.000000e+00, float 1.000000e+00, float 1.000000e+00, float 1.000000e+00>
%21 = bitcast <4 x i1> %20 to i4
%22 = icmp eq i4 %21, 0
%23 = select i1 %22, i32 0, i32 10
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 %23)
ret i32 0
}