#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*/ swapf(float *, float *);
int segintf(float x1, float x2, float y1, float y2) {
  if (x1 > x2)
    swapf(&x1, &x2);
  if (y1 > y2)
    swapf(&y1, &y2);
  return x2 >= y1 && y2 >= x1;
}


x86 assembly (clang, -O0):
<segintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    1148 <segintf+0x38>
lea    -0x4(%rbp),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <swapf@plt>
movss  -0xc(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
jbe    1164 <segintf+0x54>
lea    -0xc(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <swapf@plt>
movss  -0x8(%rbp),%xmm0
xor    %eax,%eax
ucomiss -0xc(%rbp),%xmm0
mov    %al,-0x11(%rbp)
jb     1187 <segintf+0x77>
movss  -0x10(%rbp),%xmm0
ucomiss -0x4(%rbp),%xmm0
setae  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<segintf>:
sub    $0x18,%rsp
movss  %xmm0,0xc(%rsp)
movss  %xmm1,0x8(%rsp)
movss  %xmm2,0x4(%rsp)
movss  %xmm3,(%rsp)
ucomiss %xmm1,%xmm0
jbe    1157 <segintf+0x47>
lea    0xc(%rsp),%rdi
lea    0x8(%rsp),%rsi
movss  %xmm3,0x14(%rsp)
movss  %xmm2,0x10(%rsp)
call   1030 <swapf@plt>
movss  0x10(%rsp),%xmm2
movss  0x14(%rsp),%xmm3
ucomiss %xmm3,%xmm2
jbe    1174 <segintf+0x64>
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <swapf@plt>
movss  0x4(%rsp),%xmm2
movss  (%rsp),%xmm3
movss  0x8(%rsp),%xmm0
ucomiss %xmm2,%xmm0
setae  %al
ucomiss 0xc(%rsp),%xmm3
setae  %cl
and    %al,%cl
movzbl %cl,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @segintf(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %5
%10 = load float, float* %6
%11 = fcmp ogt float %9, %10
br i1 %11, label %12, label %14
12: ; preds = %4
%13 = call i32 @swapf(float* %5, float* %6)
br label %14
14: ; preds = %12, %4
%15 = load float, float* %7
%16 = load float, float* %8
%17 = fcmp ogt float %15, %16
br i1 %17, label %18, label %20
18: ; preds = %14
%19 = call i32 @swapf(float* %7, float* %8)
br label %20
20: ; preds = %18, %14
%21 = load float, float* %6
%22 = load float, float* %7
%23 = fcmp oge float %21, %22
br i1 %23, label %24, label %28
24: ; preds = %20
%25 = load float, float* %8
%26 = load float, float* %5
%27 = fcmp oge float %25, %26
br label %28
28: ; preds = %24, %20
%29 = phi i1 [ false, %20 ], [ %27, %24 ]
%30 = zext i1 %29 to i32
ret i32 %30
}

LLVM IR (-O2):
define i32 @segintf(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = fcmp ogt float %0, %1
br i1 %9, label %10, label %12
10: ; preds = %4
%11 = call i32 @swapf(float* %5, float* %6)
br label %12
12: ; preds = %10, %4
%13 = fcmp ogt float %2, %3
br i1 %13, label %14, label %18
14: ; preds = %12
%15 = call i32 @swapf(float* %7, float* %8)
%16 = load float, float* %7
%17 = load float, float* %8
br label %18
18: ; preds = %14, %12
%19 = phi float [ %17, %14 ], [ %3, %12 ]
%20 = phi float [ %16, %14 ], [ %2, %12 ]
%21 = load float, float* %6
%22 = fcmp oge float %21, %20
%23 = load float, float* %5
%24 = fcmp oge float %19, %23
%25 = select i1 %22, i1 %24, i1 false
%26 = zext i1 %25 to i32
ret i32 %26
}