#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 */
double __imlib_point_delta_from_line(int, int, int, int, int, int);
unsigned char __imlib_segments_intersect(int r1_x, int r1_y, int r2_x, int r2_y,
                                         int s1_x, int s1_y, int s2_x,
                                         int s2_y) {
  double testS1R =
      __imlib_point_delta_from_line(s1_x, s1_y, r1_x, r1_y, r2_x, r2_y);
  double testS2R =
      __imlib_point_delta_from_line(s2_x, s2_y, r1_x, r1_y, r2_x, r2_y);
  double testR1S =
      __imlib_point_delta_from_line(r1_x, r1_y, s1_x, s1_y, s2_x, s2_y);
  double testR2S =
      __imlib_point_delta_from_line(r2_x, r2_y, s1_x, s1_y, s2_x, s2_y);
  if (testS1R == 0.0 && testS2R == 0.0) {
    if ((r1_y != r2_y) ? (s1_y <= (((r1_y) > (r2_y)) ? (r1_y) : (r2_y)) &&
                          s1_y >= (((r1_y) < (r2_y)) ? (r1_y) : (r2_y)))
        : (s1_x <= (((r1_x) > (r2_x)) ? (r1_x) : (r2_x)) &&
           s1_x >= (((r1_x) < (r2_x)) ? (r1_x) : (r2_x))) ||
                (r1_y != r2_y)
            ? (s2_y <= (((r1_y) > (r2_y)) ? (r1_y) : (r2_y)) &&
               s2_y >= (((r1_y) < (r2_y)) ? (r1_y) : (r2_y)))
        : (s2_x <= (((r1_x) > (r2_x)) ? (r1_x) : (r2_x)) &&
           s2_x >= (((r1_x) < (r2_x)) ? (r1_x) : (r2_x))) ||
                (s1_y != s2_y)
            ? (r1_y <= (((s1_y) > (s2_y)) ? (s1_y) : (s2_y)) &&
               r1_y >= (((s1_y) < (s2_y)) ? (s1_y) : (s2_y)))
        : (r1_x <= (((s1_x) > (s2_x)) ? (s1_x) : (s2_x)) &&
           r1_x >= (((s1_x) < (s2_x)) ? (s1_x) : (s2_x))) ||
                (s1_y != s2_y)
            ? (r2_y <= (((s1_y) > (s2_y)) ? (s1_y) : (s2_y)) &&
               r2_y >= (((s1_y) < (s2_y)) ? (s1_y) : (s2_y)))
            : (r2_x <= (((s1_x) > (s2_x)) ? (s1_x) : (s2_x)) &&
               r2_x >= (((s1_x) < (s2_x)) ? (s1_x) : (s2_x))))
      return 1;
    else
      return 0;
  }
  if (testS1R * testS2R <= 0.0 && testR1S * testR2S <= 0.0)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<__imlib_segments_intersect>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9d,-0x1c(%rbp)
mov    -0x18(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
mov    -0x14(%rbp),%r9d
call   1030 <__imlib_point_delta_from_line@plt>
movsd  %xmm0,-0x28(%rbp)
mov    0x10(%rbp),%edi
mov    0x18(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
mov    -0x14(%rbp),%r9d
call   1030 <__imlib_point_delta_from_line@plt>
movsd  %xmm0,-0x30(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    0x10(%rbp),%r8d
mov    0x18(%rbp),%r9d
call   1030 <__imlib_point_delta_from_line@plt>
movsd  %xmm0,-0x38(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    0x10(%rbp),%r8d
mov    0x18(%rbp),%r9d
call   1030 <__imlib_point_delta_from_line@plt>
movsd  %xmm0,-0x40(%rbp)
movsd  -0x28(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    15bb <__imlib_segments_intersect+0x4ab>
jp     15bb <__imlib_segments_intersect+0x4ab>
movsd  -0x30(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    15bb <__imlib_segments_intersect+0x4ab>
jp     15bb <__imlib_segments_intersect+0x4ab>
mov    -0xc(%rbp),%eax
cmp    -0x14(%rbp),%eax
je     1250 <__imlib_segments_intersect+0x140>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x44(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x14(%rbp),%eax
jle    1206 <__imlib_segments_intersect+0xf6>
mov    -0xc(%rbp),%eax
mov    %eax,-0x48(%rbp)
jmp    120c <__imlib_segments_intersect+0xfc>
mov    -0x14(%rbp),%eax
mov    %eax,-0x48(%rbp)
mov    -0x44(%rbp),%eax
mov    -0x48(%rbp),%ecx
cmp    %ecx,%eax
jg     15b2 <__imlib_segments_intersect+0x4a2>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1237 <__imlib_segments_intersect+0x127>
mov    -0xc(%rbp),%eax
mov    %eax,-0x50(%rbp)
jmp    123d <__imlib_segments_intersect+0x12d>
mov    -0x14(%rbp),%eax
mov    %eax,-0x50(%rbp)
mov    -0x4c(%rbp),%eax
mov    -0x50(%rbp),%ecx
cmp    %ecx,%eax
jge    15a9 <__imlib_segments_intersect+0x499>
jmp    15b2 <__imlib_segments_intersect+0x4a2>
mov    -0x18(%rbp),%eax
mov    %eax,-0x54(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    126d <__imlib_segments_intersect+0x15d>
mov    -0x8(%rbp),%eax
mov    %eax,-0x58(%rbp)
jmp    1273 <__imlib_segments_intersect+0x163>
mov    -0x10(%rbp),%eax
mov    %eax,-0x58(%rbp)
mov    -0x54(%rbp),%eax
mov    -0x58(%rbp),%ecx
cmp    %ecx,%eax
jg     12b2 <__imlib_segments_intersect+0x1a2>
mov    -0x18(%rbp),%eax
mov    %eax,-0x5c(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    129e <__imlib_segments_intersect+0x18e>
mov    -0x8(%rbp),%eax
mov    %eax,-0x60(%rbp)
jmp    12a4 <__imlib_segments_intersect+0x194>
mov    -0x10(%rbp),%eax
mov    %eax,-0x60(%rbp)
mov    -0x5c(%rbp),%eax
mov    -0x60(%rbp),%ecx
cmp    %ecx,%eax
jge    12be <__imlib_segments_intersect+0x1ae>
mov    -0xc(%rbp),%eax
cmp    -0x14(%rbp),%eax
je     1325 <__imlib_segments_intersect+0x215>
mov    0x18(%rbp),%eax
mov    %eax,-0x64(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x14(%rbp),%eax
jle    12db <__imlib_segments_intersect+0x1cb>
mov    -0xc(%rbp),%eax
mov    %eax,-0x68(%rbp)
jmp    12e1 <__imlib_segments_intersect+0x1d1>
mov    -0x14(%rbp),%eax
mov    %eax,-0x68(%rbp)
mov    -0x64(%rbp),%eax
mov    -0x68(%rbp),%ecx
cmp    %ecx,%eax
jg     15b2 <__imlib_segments_intersect+0x4a2>
mov    0x18(%rbp),%eax
mov    %eax,-0x6c(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    130c <__imlib_segments_intersect+0x1fc>
mov    -0xc(%rbp),%eax
mov    %eax,-0x70(%rbp)
jmp    1312 <__imlib_segments_intersect+0x202>
mov    -0x14(%rbp),%eax
mov    %eax,-0x70(%rbp)
mov    -0x6c(%rbp),%eax
mov    -0x70(%rbp),%ecx
cmp    %ecx,%eax
jge    15a9 <__imlib_segments_intersect+0x499>
jmp    15b2 <__imlib_segments_intersect+0x4a2>
mov    0x10(%rbp),%eax
mov    %eax,-0x74(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    1342 <__imlib_segments_intersect+0x232>
mov    -0x8(%rbp),%eax
mov    %eax,-0x78(%rbp)
jmp    1348 <__imlib_segments_intersect+0x238>
mov    -0x10(%rbp),%eax
mov    %eax,-0x78(%rbp)
mov    -0x74(%rbp),%eax
mov    -0x78(%rbp),%ecx
cmp    %ecx,%eax
jg     1387 <__imlib_segments_intersect+0x277>
mov    0x10(%rbp),%eax
mov    %eax,-0x7c(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1373 <__imlib_segments_intersect+0x263>
mov    -0x8(%rbp),%eax
mov    %eax,-0x80(%rbp)
jmp    1379 <__imlib_segments_intersect+0x269>
mov    -0x10(%rbp),%eax
mov    %eax,-0x80(%rbp)
mov    -0x7c(%rbp),%eax
mov    -0x80(%rbp),%ecx
cmp    %ecx,%eax
jge    1393 <__imlib_segments_intersect+0x283>
mov    -0x1c(%rbp),%eax
cmp    0x18(%rbp),%eax
je     1418 <__imlib_segments_intersect+0x308>
mov    -0xc(%rbp),%eax
mov    %eax,-0x84(%rbp)
mov    -0x1c(%rbp),%eax
cmp    0x18(%rbp),%eax
jle    13b6 <__imlib_segments_intersect+0x2a6>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x88(%rbp)
jmp    13bf <__imlib_segments_intersect+0x2af>
mov    0x18(%rbp),%eax
mov    %eax,-0x88(%rbp)
mov    -0x84(%rbp),%eax
mov    -0x88(%rbp),%ecx
cmp    %ecx,%eax
jg     15b2 <__imlib_segments_intersect+0x4a2>
mov    -0xc(%rbp),%eax
mov    %eax,-0x8c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    0x18(%rbp),%eax
jge    13f6 <__imlib_segments_intersect+0x2e6>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x90(%rbp)
jmp    13ff <__imlib_segments_intersect+0x2ef>
mov    0x18(%rbp),%eax
mov    %eax,-0x90(%rbp)
mov    -0x8c(%rbp),%eax
mov    -0x90(%rbp),%ecx
cmp    %ecx,%eax
jge    15a9 <__imlib_segments_intersect+0x499>
jmp    15b2 <__imlib_segments_intersect+0x4a2>
mov    -0x8(%rbp),%eax
mov    %eax,-0x94(%rbp)
mov    -0x18(%rbp),%eax
cmp    0x10(%rbp),%eax
jle    143b <__imlib_segments_intersect+0x32b>
mov    -0x18(%rbp),%eax
mov    %eax,-0x98(%rbp)
jmp    1444 <__imlib_segments_intersect+0x334>
mov    0x10(%rbp),%eax
mov    %eax,-0x98(%rbp)
mov    -0x94(%rbp),%eax
mov    -0x98(%rbp),%ecx
cmp    %ecx,%eax
jg     1498 <__imlib_segments_intersect+0x388>
mov    -0x8(%rbp),%eax
mov    %eax,-0x9c(%rbp)
mov    -0x18(%rbp),%eax
cmp    0x10(%rbp),%eax
jge    147b <__imlib_segments_intersect+0x36b>
mov    -0x18(%rbp),%eax
mov    %eax,-0xa0(%rbp)
jmp    1484 <__imlib_segments_intersect+0x374>
mov    0x10(%rbp),%eax
mov    %eax,-0xa0(%rbp)
mov    -0x9c(%rbp),%eax
mov    -0xa0(%rbp),%ecx
cmp    %ecx,%eax
jge    14a4 <__imlib_segments_intersect+0x394>
mov    -0x1c(%rbp),%eax
cmp    0x18(%rbp),%eax
je     1529 <__imlib_segments_intersect+0x419>
mov    -0x14(%rbp),%eax
mov    %eax,-0xa4(%rbp)
mov    -0x1c(%rbp),%eax
cmp    0x18(%rbp),%eax
jle    14c7 <__imlib_segments_intersect+0x3b7>
mov    -0x1c(%rbp),%eax
mov    %eax,-0xa8(%rbp)
jmp    14d0 <__imlib_segments_intersect+0x3c0>
mov    0x18(%rbp),%eax
mov    %eax,-0xa8(%rbp)
mov    -0xa4(%rbp),%eax
mov    -0xa8(%rbp),%ecx
cmp    %ecx,%eax
jg     15b2 <__imlib_segments_intersect+0x4a2>
mov    -0x14(%rbp),%eax
mov    %eax,-0xac(%rbp)
mov    -0x1c(%rbp),%eax
cmp    0x18(%rbp),%eax
jge    1507 <__imlib_segments_intersect+0x3f7>
mov    -0x1c(%rbp),%eax
mov    %eax,-0xb0(%rbp)
jmp    1510 <__imlib_segments_intersect+0x400>
mov    0x18(%rbp),%eax
mov    %eax,-0xb0(%rbp)
mov    -0xac(%rbp),%eax
mov    -0xb0(%rbp),%ecx
cmp    %ecx,%eax
jge    15a9 <__imlib_segments_intersect+0x499>
jmp    15b2 <__imlib_segments_intersect+0x4a2>
mov    -0x10(%rbp),%eax
mov    %eax,-0xb4(%rbp)
mov    -0x18(%rbp),%eax
cmp    0x10(%rbp),%eax
jle    154c <__imlib_segments_intersect+0x43c>
mov    -0x18(%rbp),%eax
mov    %eax,-0xb8(%rbp)
jmp    1555 <__imlib_segments_intersect+0x445>
mov    0x10(%rbp),%eax
mov    %eax,-0xb8(%rbp)
mov    -0xb4(%rbp),%eax
mov    -0xb8(%rbp),%ecx
cmp    %ecx,%eax
jg     15b2 <__imlib_segments_intersect+0x4a2>
mov    -0x10(%rbp),%eax
mov    %eax,-0xbc(%rbp)
mov    -0x18(%rbp),%eax
cmp    0x10(%rbp),%eax
jge    158c <__imlib_segments_intersect+0x47c>
mov    -0x18(%rbp),%eax
mov    %eax,-0xc0(%rbp)
jmp    1595 <__imlib_segments_intersect+0x485>
mov    0x10(%rbp),%eax
mov    %eax,-0xc0(%rbp)
mov    -0xbc(%rbp),%eax
mov    -0xc0(%rbp),%ecx
cmp    %ecx,%eax
jl     15b2 <__imlib_segments_intersect+0x4a2>
movb   $0x1,-0x1(%rbp)
jmp    15f6 <__imlib_segments_intersect+0x4e6>
movb   $0x0,-0x1(%rbp)
jmp    15f6 <__imlib_segments_intersect+0x4e6>
movsd  -0x28(%rbp),%xmm1
mulsd  -0x30(%rbp),%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jb     15f2 <__imlib_segments_intersect+0x4e2>
movsd  -0x38(%rbp),%xmm1
mulsd  -0x40(%rbp),%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jb     15f2 <__imlib_segments_intersect+0x4e2>
movb   $0x1,-0x1(%rbp)
jmp    15f6 <__imlib_segments_intersect+0x4e6>
movb   $0x0,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__imlib_segments_intersect>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %r9d,%r12d
mov    %r8d,%ebx
mov    %ecx,%r15d
mov    %edx,%r14d
mov    %esi,%r13d
mov    %edi,%ebp
mov    %r8d,%edi
mov    %r9d,%esi
mov    %ebp,%edx
mov    %r13d,%ecx
mov    %r14d,%r8d
mov    %r15d,%r9d
call   1030 <__imlib_point_delta_from_line@plt>
movsd  %xmm0,0x30(%rsp)
mov    0x70(%rsp),%edi
mov    0x78(%rsp),%esi
mov    %ebp,%edx
mov    %r13d,%ecx
mov    %r14d,%r8d
mov    %r15d,%r9d
call   1030 <__imlib_point_delta_from_line@plt>
movsd  %xmm0,0x28(%rsp)
mov    %ebp,0x14(%rsp)
mov    %ebp,%edi
mov    %r13d,0x1c(%rsp)
mov    %r13d,%esi
mov    0x70(%rsp),%r13d
mov    %ebx,%edx
mov    %r12d,%ecx
mov    %r13d,%r8d
mov    0x78(%rsp),%ebp
mov    %ebp,%r9d
call   1030 <__imlib_point_delta_from_line@plt>
movsd  %xmm0,0x20(%rsp)
mov    %r14d,0x18(%rsp)
mov    %r14d,%edi
mov    %r15d,%esi
mov    %ebx,0xc(%rsp)
mov    %ebx,%edx
mov    %r12d,0x10(%rsp)
mov    %r12d,%ecx
mov    %ebp,%r12d
mov    %r13d,%ebx
mov    %r13d,%r8d
mov    %ebp,%r9d
call   1030 <__imlib_point_delta_from_line@plt>
movsd  0x28(%rsp),%xmm3
movsd  0x30(%rsp),%xmm2
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm2
jne    1219 <__imlib_segments_intersect+0x109>
jp     1219 <__imlib_segments_intersect+0x109>
ucomisd %xmm1,%xmm3
jne    1219 <__imlib_segments_intersect+0x109>
jp     1219 <__imlib_segments_intersect+0x109>
mov    0x1c(%rsp),%esi
cmp    %r15d,%esi
jne    123c <__imlib_segments_intersect+0x12c>
mov    0x18(%rsp),%ebp
mov    0x14(%rsp),%edi
cmp    %ebp,%edi
mov    %ebp,%eax
cmovg  %edi,%eax
cmp    0xc(%rsp),%eax
jl     120f <__imlib_segments_intersect+0xff>
cmp    %ebp,%edi
mov    %ebp,%ecx
cmovl  %edi,%ecx
cmp    0xc(%rsp),%ecx
jle    12c1 <__imlib_segments_intersect+0x1b1>
cmp    %ebx,%eax
jge    125a <__imlib_segments_intersect+0x14a>
mov    0x10(%rsp),%edx
jmp    1269 <__imlib_segments_intersect+0x159>
mulsd  %xmm3,%xmm2
ucomisd %xmm2,%xmm1
setae  %cl
movsd  0x20(%rsp),%xmm2
mulsd  %xmm0,%xmm2
ucomisd %xmm2,%xmm1
setae  %al
and    %cl,%al
jmp    12ca <__imlib_segments_intersect+0x1ba>
mov    %r15d,%eax
cmovg  %esi,%eax
mov    0x10(%rsp),%ecx
cmp    %ecx,%eax
jl     12c8 <__imlib_segments_intersect+0x1b8>
cmp    %r15d,%esi
cmovl  %esi,%r15d
mov    $0x1,%al
cmp    %ecx,%r15d
jg     12c8 <__imlib_segments_intersect+0x1b8>
jmp    12ca <__imlib_segments_intersect+0x1ba>
cmp    %ebp,%edi
mov    %ebp,%eax
cmovl  %edi,%eax
cmp    %ebx,%eax
mov    0x10(%rsp),%edx
jle    12a4 <__imlib_segments_intersect+0x194>
cmp    %r12d,%edx
jne    12a4 <__imlib_segments_intersect+0x194>
mov    %ebx,%eax
mov    0xc(%rsp),%ecx
cmp    %ebx,%ecx
cmovg  %ecx,%eax
cmp    %edi,%eax
jl     128f <__imlib_segments_intersect+0x17f>
mov    %ebx,%ecx
mov    0xc(%rsp),%r8d
cmp    %ebx,%r8d
cmovl  %r8d,%ecx
cmp    %edi,%ecx
jle    12a4 <__imlib_segments_intersect+0x194>
cmp    %ebp,%eax
jl     12c8 <__imlib_segments_intersect+0x1b8>
mov    0xc(%rsp),%eax
cmp    %ebx,%eax
cmovl  %eax,%ebx
mov    $0x1,%al
cmp    %ebp,%ebx
jg     12c8 <__imlib_segments_intersect+0x1b8>
jmp    12ca <__imlib_segments_intersect+0x1ba>
cmp    %r12d,%edx
mov    %r12d,%eax
cmovg  %edx,%eax
cmp    %esi,%eax
jl     12c8 <__imlib_segments_intersect+0x1b8>
cmp    %r12d,%edx
cmovl  %edx,%r12d
mov    $0x1,%al
cmp    %esi,%r12d
jg     12c8 <__imlib_segments_intersect+0x1b8>
jmp    12ca <__imlib_segments_intersect+0x1ba>
mov    $0x1,%al
cmp    %r12d,%esi
je     12ca <__imlib_segments_intersect+0x1ba>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define zeroext i8 @__imlib_segments_intersect(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7) {
%9 = alloca i8
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
store i32 %0, i32* %10
store i32 %1, i32* %11
store i32 %2, i32* %12
store i32 %3, i32* %13
store i32 %4, i32* %14
store i32 %5, i32* %15
store i32 %6, i32* %16
store i32 %7, i32* %17
%22 = load i32, i32* %14
%23 = load i32, i32* %15
%24 = load i32, i32* %10
%25 = load i32, i32* %11
%26 = load i32, i32* %12
%27 = load i32, i32* %13
%28 = call double @__imlib_point_delta_from_line(i32 %22, i32 %23, i32 %24, i32 %25, i32 %26, i32 %27)
store double %28, double* %18
%29 = load i32, i32* %16
%30 = load i32, i32* %17
%31 = load i32, i32* %10
%32 = load i32, i32* %11
%33 = load i32, i32* %12
%34 = load i32, i32* %13
%35 = call double @__imlib_point_delta_from_line(i32 %29, i32 %30, i32 %31, i32 %32, i32 %33, i32 %34)
store double %35, double* %19
%36 = load i32, i32* %10
%37 = load i32, i32* %11
%38 = load i32, i32* %14
%39 = load i32, i32* %15
%40 = load i32, i32* %16
%41 = load i32, i32* %17
%42 = call double @__imlib_point_delta_from_line(i32 %36, i32 %37, i32 %38, i32 %39, i32 %40, i32 %41)
store double %42, double* %20
%43 = load i32, i32* %12
%44 = load i32, i32* %13
%45 = load i32, i32* %14
%46 = load i32, i32* %15
%47 = load i32, i32* %16
%48 = load i32, i32* %17
%49 = call double @__imlib_point_delta_from_line(i32 %43, i32 %44, i32 %45, i32 %46, i32 %47, i32 %48)
store double %49, double* %21
%50 = load double, double* %18
%51 = fcmp oeq double %50, 0.000000e+00
br i1 %51, label %52, label %265
52: ; preds = %8
%53 = load double, double* %19
%54 = fcmp oeq double %53, 0.000000e+00
br i1 %54, label %55, label %265
55: ; preds = %52
%56 = load i32, i32* %11
%57 = load i32, i32* %13
%58 = icmp ne i32 %56, %57
br i1 %58, label %59, label %83
59: ; preds = %55
%60 = load i32, i32* %15
%61 = load i32, i32* %11
%62 = load i32, i32* %13
%63 = icmp sgt i32 %61, %62
br i1 %63, label %64, label %66
64: ; preds = %59
%65 = load i32, i32* %11
br label %68
66: ; preds = %59
%67 = load i32, i32* %13
br label %68
68: ; preds = %66, %64
%69 = phi i32 [ %65, %64 ], [ %67, %66 ]
%70 = icmp sle i32 %60, %69
br i1 %70, label %71, label %264
71: ; preds = %68
%72 = load i32, i32* %15
%73 = load i32, i32* %11
%74 = load i32, i32* %13
%75 = icmp slt i32 %73, %74
br i1 %75, label %76, label %78
76: ; preds = %71
%77 = load i32, i32* %11
br label %80
78: ; preds = %71
%79 = load i32, i32* %13
br label %80
80: ; preds = %78, %76
%81 = phi i32 [ %77, %76 ], [ %79, %78 ]
%82 = icmp sge i32 %72, %81
br i1 %82, label %263, label %264
83: ; preds = %55
%84 = load i32, i32* %14
%85 = load i32, i32* %10
%86 = load i32, i32* %12
%87 = icmp sgt i32 %85, %86
br i1 %87, label %88, label %90
88: ; preds = %83
%89 = load i32, i32* %10
br label %92
90: ; preds = %83
%91 = load i32, i32* %12
br label %92
92: ; preds = %90, %88
%93 = phi i32 [ %89, %88 ], [ %91, %90 ]
%94 = icmp sle i32 %84, %93
br i1 %94, label %95, label %107
95: ; preds = %92
%96 = load i32, i32* %14
%97 = load i32, i32* %10
%98 = load i32, i32* %12
%99 = icmp slt i32 %97, %98
br i1 %99, label %100, label %102
100: ; preds = %95
%101 = load i32, i32* %10
br label %104
102: ; preds = %95
%103 = load i32, i32* %12
br label %104
104: ; preds = %102, %100
%105 = phi i32 [ %101, %100 ], [ %103, %102 ]
%106 = icmp sge i32 %96, %105
br i1 %106, label %111, label %107
107: ; preds = %104, %92
%108 = load i32, i32* %11
%109 = load i32, i32* %13
%110 = icmp ne i32 %108, %109
br i1 %110, label %111, label %135
111: ; preds = %107, %104
%112 = load i32, i32* %17
%113 = load i32, i32* %11
%114 = load i32, i32* %13
%115 = icmp sgt i32 %113, %114
br i1 %115, label %116, label %118
116: ; preds = %111
%117 = load i32, i32* %11
br label %120
118: ; preds = %111
%119 = load i32, i32* %13
br label %120
120: ; preds = %118, %116
%121 = phi i32 [ %117, %116 ], [ %119, %118 ]
%122 = icmp sle i32 %112, %121
br i1 %122, label %123, label %264
123: ; preds = %120
%124 = load i32, i32* %17
%125 = load i32, i32* %11
%126 = load i32, i32* %13
%127 = icmp slt i32 %125, %126
br i1 %127, label %128, label %130
128: ; preds = %123
%129 = load i32, i32* %11
br label %132
130: ; preds = %123
%131 = load i32, i32* %13
br label %132
132: ; preds = %130, %128
%133 = phi i32 [ %129, %128 ], [ %131, %130 ]
%134 = icmp sge i32 %124, %133
br i1 %134, label %263, label %264
135: ; preds = %107
%136 = load i32, i32* %16
%137 = load i32, i32* %10
%138 = load i32, i32* %12
%139 = icmp sgt i32 %137, %138
br i1 %139, label %140, label %142
140: ; preds = %135
%141 = load i32, i32* %10
br label %144
142: ; preds = %135
%143 = load i32, i32* %12
br label %144
144: ; preds = %142, %140
%145 = phi i32 [ %141, %140 ], [ %143, %142 ]
%146 = icmp sle i32 %136, %145
br i1 %146, label %147, label %159
147: ; preds = %144
%148 = load i32, i32* %16
%149 = load i32, i32* %10
%150 = load i32, i32* %12
%151 = icmp slt i32 %149, %150
br i1 %151, label %152, label %154
152: ; preds = %147
%153 = load i32, i32* %10
br label %156
154: ; preds = %147
%155 = load i32, i32* %12
br label %156
156: ; preds = %154, %152
%157 = phi i32 [ %153, %152 ], [ %155, %154 ]
%158 = icmp sge i32 %148, %157
br i1 %158, label %163, label %159
159: ; preds = %156, %144
%160 = load i32, i32* %15
%161 = load i32, i32* %17
%162 = icmp ne i32 %160, %161
br i1 %162, label %163, label %187
163: ; preds = %159, %156
%164 = load i32, i32* %11
%165 = load i32, i32* %15
%166 = load i32, i32* %17
%167 = icmp sgt i32 %165, %166
br i1 %167, label %168, label %170
168: ; preds = %163
%169 = load i32, i32* %15
br label %172
170: ; preds = %163
%171 = load i32, i32* %17
br label %172
172: ; preds = %170, %168
%173 = phi i32 [ %169, %168 ], [ %171, %170 ]
%174 = icmp sle i32 %164, %173
br i1 %174, label %175, label %264
175: ; preds = %172
%176 = load i32, i32* %11
%177 = load i32, i32* %15
%178 = load i32, i32* %17
%179 = icmp slt i32 %177, %178
br i1 %179, label %180, label %182
180: ; preds = %175
%181 = load i32, i32* %15
br label %184
182: ; preds = %175
%183 = load i32, i32* %17
br label %184
184: ; preds = %182, %180
%185 = phi i32 [ %181, %180 ], [ %183, %182 ]
%186 = icmp sge i32 %176, %185
br i1 %186, label %263, label %264
187: ; preds = %159
%188 = load i32, i32* %10
%189 = load i32, i32* %14
%190 = load i32, i32* %16
%191 = icmp sgt i32 %189, %190
br i1 %191, label %192, label %194
192: ; preds = %187
%193 = load i32, i32* %14
br label %196
194: ; preds = %187
%195 = load i32, i32* %16
br label %196
196: ; preds = %194, %192
%197 = phi i32 [ %193, %192 ], [ %195, %194 ]
%198 = icmp sle i32 %188, %197
br i1 %198, label %199, label %211
199: ; preds = %196
%200 = load i32, i32* %10
%201 = load i32, i32* %14
%202 = load i32, i32* %16
%203 = icmp slt i32 %201, %202
br i1 %203, label %204, label %206
204: ; preds = %199
%205 = load i32, i32* %14
br label %208
206: ; preds = %199
%207 = load i32, i32* %16
br label %208
208: ; preds = %206, %204
%209 = phi i32 [ %205, %204 ], [ %207, %206 ]
%210 = icmp sge i32 %200, %209
br i1 %210, label %215, label %211
211: ; preds = %208, %196
%212 = load i32, i32* %15
%213 = load i32, i32* %17
%214 = icmp ne i32 %212, %213
br i1 %214, label %215, label %239
215: ; preds = %211, %208
%216 = load i32, i32* %13
%217 = load i32, i32* %15
%218 = load i32, i32* %17
%219 = icmp sgt i32 %217, %218
br i1 %219, label %220, label %222
220: ; preds = %215
%221 = load i32, i32* %15
br label %224
222: ; preds = %215
%223 = load i32, i32* %17
br label %224
224: ; preds = %222, %220
%225 = phi i32 [ %221, %220 ], [ %223, %222 ]
%226 = icmp sle i32 %216, %225
br i1 %226, label %227, label %264
227: ; preds = %224
%228 = load i32, i32* %13
%229 = load i32, i32* %15
%230 = load i32, i32* %17
%231 = icmp slt i32 %229, %230
br i1 %231, label %232, label %234
232: ; preds = %227
%233 = load i32, i32* %15
br label %236
234: ; preds = %227
%235 = load i32, i32* %17
br label %236
236: ; preds = %234, %232
%237 = phi i32 [ %233, %232 ], [ %235, %234 ]
%238 = icmp sge i32 %228, %237
br i1 %238, label %263, label %264
239: ; preds = %211
%240 = load i32, i32* %12
%241 = load i32, i32* %14
%242 = load i32, i32* %16
%243 = icmp sgt i32 %241, %242
br i1 %243, label %244, label %246
244: ; preds = %239
%245 = load i32, i32* %14
br label %248
246: ; preds = %239
%247 = load i32, i32* %16
br label %248
248: ; preds = %246, %244
%249 = phi i32 [ %245, %244 ], [ %247, %246 ]
%250 = icmp sle i32 %240, %249
br i1 %250, label %251, label %264
251: ; preds = %248
%252 = load i32, i32* %12
%253 = load i32, i32* %14
%254 = load i32, i32* %16
%255 = icmp slt i32 %253, %254
br i1 %255, label %256, label %258
256: ; preds = %251
%257 = load i32, i32* %14
br label %260
258: ; preds = %251
%259 = load i32, i32* %16
br label %260
260: ; preds = %258, %256
%261 = phi i32 [ %257, %256 ], [ %259, %258 ]
%262 = icmp sge i32 %252, %261
br i1 %262, label %263, label %264
263: ; preds = %260, %236, %184, %132, %80
store i8 1, i8* %9
br label %277
264: ; preds = %260, %248, %236, %224, %184, %172, %132, %120, %80, %68
store i8 0, i8* %9
br label %277
265: ; preds = %52, %8
%266 = load double, double* %18
%267 = load double, double* %19
%268 = fmul double %266, %267
%269 = fcmp ole double %268, 0.000000e+00
br i1 %269, label %270, label %276
270: ; preds = %265
%271 = load double, double* %20
%272 = load double, double* %21
%273 = fmul double %271, %272
%274 = fcmp ole double %273, 0.000000e+00
br i1 %274, label %275, label %276
275: ; preds = %270
store i8 1, i8* %9
br label %277
276: ; preds = %270, %265
store i8 0, i8* %9
br label %277
277: ; preds = %276, %275, %264, %263
%278 = load i8, i8* %9
ret i8 %278
}

LLVM IR (-O2):
define zeroext i8 @__imlib_segments_intersect(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7) {
%9 = tail call double @__imlib_point_delta_from_line(i32 %4, i32 %5, i32 %0, i32 %1, i32 %2, i32 %3)
%10 = tail call double @__imlib_point_delta_from_line(i32 %6, i32 %7, i32 %0, i32 %1, i32 %2, i32 %3)
%11 = tail call double @__imlib_point_delta_from_line(i32 %0, i32 %1, i32 %4, i32 %5, i32 %6, i32 %7)
%12 = tail call double @__imlib_point_delta_from_line(i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7)
%13 = fcmp oeq double %9, 0.000000e+00
%14 = fcmp oeq double %10, 0.000000e+00
%15 = select i1 %13, i1 %14, i1 false
br i1 %15, label %16, label %77
16: ; preds = %8
%17 = icmp eq i32 %1, %3
br i1 %17, label %26, label %18
18: ; preds = %16
%19 = icmp sgt i32 %1, %3
%20 = select i1 %19, i32 %1, i32 %3
%21 = icmp slt i32 %20, %5
br i1 %21, label %76, label %22
22: ; preds = %18
%23 = icmp slt i32 %1, %3
%24 = select i1 %23, i32 %1, i32 %3
%25 = icmp sgt i32 %24, %5
br i1 %25, label %76, label %84
26: ; preds = %16
%27 = icmp sgt i32 %0, %2
%28 = select i1 %27, i32 %0, i32 %2
%29 = icmp slt i32 %28, %4
br i1 %29, label %36, label %30
30: ; preds = %26
%31 = icmp slt i32 %0, %2
%32 = select i1 %31, i32 %0, i32 %2
%33 = icmp sgt i32 %32, %4
br i1 %33, label %36, label %34
34: ; preds = %30
%35 = icmp eq i32 %1, %7
br i1 %35, label %84, label %76
36: ; preds = %26, %30
%37 = icmp slt i32 %28, %6
br i1 %37, label %44, label %38
38: ; preds = %36
%39 = icmp slt i32 %0, %2
%40 = select i1 %39, i32 %0, i32 %2
%41 = icmp sgt i32 %40, %6
%42 = icmp eq i32 %5, %7
%43 = and i1 %41, %42
br i1 %43, label %54, label %46
44: ; preds = %36
%45 = icmp eq i32 %5, %7
br i1 %45, label %54, label %46
46: ; preds = %44, %38
%47 = icmp sgt i32 %5, %7
%48 = select i1 %47, i32 %5, i32 %7
%49 = icmp slt i32 %48, %1
br i1 %49, label %76, label %50
50: ; preds = %46
%51 = icmp slt i32 %5, %7
%52 = select i1 %51, i32 %5, i32 %7
%53 = icmp sgt i32 %52, %1
br i1 %53, label %76, label %84
54: ; preds = %38, %44
%55 = icmp sgt i32 %4, %6
%56 = select i1 %55, i32 %4, i32 %6
%57 = icmp slt i32 %56, %0
br i1 %57, label %70, label %58
58: ; preds = %54
%59 = icmp slt i32 %4, %6
%60 = select i1 %59, i32 %4, i32 %6
%61 = icmp sgt i32 %60, %0
br i1 %61, label %70, label %62
62: ; preds = %58
%63 = icmp sgt i32 %5, %7
%64 = select i1 %63, i32 %5, i32 %7
%65 = icmp slt i32 %64, %1
br i1 %65, label %76, label %66
66: ; preds = %62
%67 = icmp slt i32 %5, %7
%68 = select i1 %67, i32 %5, i32 %7
%69 = icmp sgt i32 %68, %1
br i1 %69, label %76, label %84
70: ; preds = %54, %58
%71 = icmp slt i32 %56, %2
br i1 %71, label %76, label %72
72: ; preds = %70
%73 = icmp slt i32 %4, %6
%74 = select i1 %73, i32 %4, i32 %6
%75 = icmp sgt i32 %74, %2
br i1 %75, label %76, label %84
76: ; preds = %72, %70, %66, %62, %50, %46, %34, %22, %18
br label %84
77: ; preds = %8
%78 = fmul double %9, %10
%79 = fcmp ole double %78, 0.000000e+00
%80 = fmul double %11, %12
%81 = fcmp ole double %80, 0.000000e+00
%82 = select i1 %79, i1 %81, i1 false
%83 = zext i1 %82 to i8
br label %84
84: ; preds = %34, %77, %22, %50, %66, %72, %76
%85 = phi i8 [ 0, %76 ], [ 1, %72 ], [ 1, %66 ], [ 1, %50 ], [ 1, %22 ], [ %83, %77 ], [ 1, %34 ]
ret i8 %85
}