#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*/ make_point(double, double);
int /*<<< orphan*/ print_point(int /*<<< orphan*/);
scalar_t__ within(double, double, double, double, double, double);
int rxy(double x1, double y1, double x2, double y2, double x, double y,
        bool segment) {
  if (!segment || within(x1, y1, x2, y2, x, y)) {
    print_point(make_point(x, y));
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<rxy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
movsd  %xmm4,-0x30(%rbp)
movsd  %xmm5,-0x38(%rbp)
mov    %edi,-0x3c(%rbp)
cmpl   $0x0,-0x3c(%rbp)
je     1190 <rxy+0x60>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm3
movsd  -0x30(%rbp),%xmm4
movsd  -0x38(%rbp),%xmm5
call   1040 <within@plt>
cmp    $0x0,%rax
je     11b2 <rxy+0x82>
movsd  -0x30(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
call   1050 <make_point@plt>
mov    %eax,%edi
call   1030 <print_point@plt>
movl   $0x1,-0x4(%rbp)
jmp    11b9 <rxy+0x89>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rxy>:
sub    $0x18,%rsp
test   %edi,%edi
je     1166 <rxy+0x36>
movsd  %xmm4,0x8(%rsp)
movsd  0x8(%rsp),%xmm4
movsd  %xmm5,0x10(%rsp)
movsd  0x10(%rsp),%xmm5
call   1040 <within@plt>
movsd  0x8(%rsp),%xmm4
movsd  0x10(%rsp),%xmm5
test   %rax,%rax
je     1182 <rxy+0x52>
movaps %xmm4,%xmm0
movaps %xmm5,%xmm1
call   1050 <make_point@plt>
mov    %eax,%edi
call   1030 <print_point@plt>
mov    $0x1,%eax
add    $0x18,%rsp
ret
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @rxy(double %0, double %1, double %2, double %3, double %4, double %5, i32 %6) {
%8 = alloca i32
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca i32
store double %0, double* %9
store double %1, double* %10
store double %2, double* %11
store double %3, double* %12
store double %4, double* %13
store double %5, double* %14
store i32 %6, i32* %15
%16 = load i32, i32* %15
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %27
18: ; preds = %7
%19 = load double, double* %9
%20 = load double, double* %10
%21 = load double, double* %11
%22 = load double, double* %12
%23 = load double, double* %13
%24 = load double, double* %14
%25 = call i64 @within(double %19, double %20, double %21, double %22, double %23, double %24)
%26 = icmp ne i64 %25, 0
br i1 %26, label %27, label %32
27: ; preds = %18, %7
%28 = load double, double* %13
%29 = load double, double* %14
%30 = call i32 @make_point(double %28, double %29)
%31 = call i32 @print_point(i32 %30)
store i32 1, i32* %8
br label %33
32: ; preds = %18
store i32 0, i32* %8
br label %33
33: ; preds = %32, %27
%34 = load i32, i32* %8
ret i32 %34
}

LLVM IR (-O2):
define i32 @rxy(double %0, double %1, double %2, double %3, double %4, double %5, i32 %6) {
%8 = icmp eq i32 %6, 0
br i1 %8, label %12, label %9
9: ; preds = %7
%10 = tail call i64 @within(double %0, double %1, double %2, double %3, double %4, double %5)
%11 = icmp eq i64 %10, 0
br i1 %11, label %15, label %12
12: ; preds = %9, %7
%13 = tail call i32 @make_point(double %4, double %5)
%14 = tail call i32 @print_point(i32 %13)
br label %15
15: ; preds = %9, %12
%16 = phi i32 [ 1, %12 ], [ 0, %9 ]
ret i32 %16
}