#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 */
scalar_t__ collision_line_segment_box(float, float, float, float, float, float,
                                      float, float);
scalar_t__ collision_radius_to_line_segment(float, float, float, float, float,
                                            float, float);
int collision_box_line_with_radius(float bx, float by, float width,
                                   float height, float x1, float y1, float x2,
                                   float y2, float radius) {
  return (collision_line_segment_box(x1, y1, x2, y2, bx - radius, by,
                                     width + radius * 2, height) ||
          collision_line_segment_box(x1, y1, x2, y2, bx, by - radius, width,
                                     height + radius * 2) ||
          collision_radius_to_line_segment(x1, y1, x2, y2, bx, by, radius) ||
          collision_radius_to_line_segment(x1, y1, x2, y2, bx + width, by,
                                           radius) ||
          collision_radius_to_line_segment(x1, y1, x2, y2, bx + width,
                                           by + height, radius) ||
          collision_radius_to_line_segment(x1, y1, x2, y2, bx, by + height,
                                           radius));
}


x86 assembly (clang, -O0):
<collision_box_line_with_radius>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movss  0x10(%rbp),%xmm8
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  %xmm4,-0x14(%rbp)
movss  %xmm5,-0x18(%rbp)
movss  %xmm6,-0x1c(%rbp)
movss  %xmm7,-0x20(%rbp)
movss  -0x14(%rbp),%xmm0
movss  -0x18(%rbp),%xmm1
movss  -0x1c(%rbp),%xmm2
movss  -0x20(%rbp),%xmm3
movss  -0x4(%rbp),%xmm4
subss  0x10(%rbp),%xmm4
movss  -0x8(%rbp),%xmm5
movss  -0xc(%rbp),%xmm7
movss  0x10(%rbp),%xmm6
addss  %xmm6,%xmm6
addss  %xmm7,%xmm6
movss  -0x10(%rbp),%xmm7
call   1030 <collision_line_segment_box@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x21(%rbp)
jne    12ee <collision_box_line_with_radius+0x1ce>
movss  -0x14(%rbp),%xmm0
movss  -0x18(%rbp),%xmm1
movss  -0x1c(%rbp),%xmm2
movss  -0x20(%rbp),%xmm3
movss  -0x4(%rbp),%xmm4
movss  -0x8(%rbp),%xmm5
subss  0x10(%rbp),%xmm5
movss  -0xc(%rbp),%xmm6
movss  -0x10(%rbp),%xmm8
movss  0x10(%rbp),%xmm7
addss  %xmm7,%xmm7
addss  %xmm8,%xmm7
call   1030 <collision_line_segment_box@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x21(%rbp)
jne    12ee <collision_box_line_with_radius+0x1ce>
movss  -0x14(%rbp),%xmm0
movss  -0x18(%rbp),%xmm1
movss  -0x1c(%rbp),%xmm2
movss  -0x20(%rbp),%xmm3
movss  -0x4(%rbp),%xmm4
movss  -0x8(%rbp),%xmm5
movss  0x10(%rbp),%xmm6
call   1040 <collision_radius_to_line_segment@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x21(%rbp)
jne    12ee <collision_box_line_with_radius+0x1ce>
movss  -0x14(%rbp),%xmm0
movss  -0x18(%rbp),%xmm1
movss  -0x1c(%rbp),%xmm2
movss  -0x20(%rbp),%xmm3
movss  -0x4(%rbp),%xmm4
addss  -0xc(%rbp),%xmm4
movss  -0x8(%rbp),%xmm5
movss  0x10(%rbp),%xmm6
call   1040 <collision_radius_to_line_segment@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x21(%rbp)
jne    12ee <collision_box_line_with_radius+0x1ce>
movss  -0x14(%rbp),%xmm0
movss  -0x18(%rbp),%xmm1
movss  -0x1c(%rbp),%xmm2
movss  -0x20(%rbp),%xmm3
movss  -0x4(%rbp),%xmm4
addss  -0xc(%rbp),%xmm4
movss  -0x8(%rbp),%xmm5
addss  -0x10(%rbp),%xmm5
movss  0x10(%rbp),%xmm6
call   1040 <collision_radius_to_line_segment@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x21(%rbp)
jne    12ee <collision_box_line_with_radius+0x1ce>
movss  -0x14(%rbp),%xmm0
movss  -0x18(%rbp),%xmm1
movss  -0x1c(%rbp),%xmm2
movss  -0x20(%rbp),%xmm3
movss  -0x4(%rbp),%xmm4
movss  -0x8(%rbp),%xmm5
addss  -0x10(%rbp),%xmm5
movss  0x10(%rbp),%xmm6
call   1040 <collision_radius_to_line_segment@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x21(%rbp)
mov    -0x21(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<collision_box_line_with_radius>:
push   %rbx
sub    $0x30,%rsp
movaps %xmm7,%xmm8
movaps %xmm6,%xmm9
movaps %xmm5,%xmm7
movaps %xmm4,%xmm5
movaps %xmm3,%xmm11
movaps %xmm1,%xmm10
movaps %xmm0,%xmm4
movss  0x40(%rsp),%xmm0
movss  %xmm4,0x24(%rsp)
subss  %xmm0,%xmm4
movaps %xmm0,%xmm6
addss  %xmm0,%xmm6
movss  %xmm6,0x2c(%rsp)
movss  %xmm2,0x20(%rsp)
addss  %xmm2,%xmm6
movss  %xmm5,0x10(%rsp)
movaps %xmm5,%xmm0
movss  %xmm7,0x14(%rsp)
movaps %xmm7,%xmm1
movss  %xmm9,0x18(%rsp)
movaps %xmm9,%xmm2
movss  %xmm8,0x1c(%rsp)
movaps %xmm8,%xmm3
movss  %xmm10,0xc(%rsp)
movaps %xmm10,%xmm5
movss  %xmm11,0x28(%rsp)
movaps %xmm11,%xmm7
call   1030 <collision_line_segment_box@plt>
mov    $0x1,%ebx
test   %rax,%rax
jne    12ef <collision_box_line_with_radius+0x1cf>
movss  0xc(%rsp),%xmm5
subss  0x40(%rsp),%xmm5
movss  0x2c(%rsp),%xmm7
addss  0x28(%rsp),%xmm7
movss  0x10(%rsp),%xmm0
movss  0x14(%rsp),%xmm1
movss  0x18(%rsp),%xmm2
movss  0x1c(%rsp),%xmm3
movss  0x24(%rsp),%xmm4
movss  0x20(%rsp),%xmm6
call   1030 <collision_line_segment_box@plt>
test   %rax,%rax
jne    12ef <collision_box_line_with_radius+0x1cf>
movss  0x10(%rsp),%xmm0
movss  0x14(%rsp),%xmm1
movss  0x18(%rsp),%xmm2
movss  0x1c(%rsp),%xmm3
movss  0x24(%rsp),%xmm4
movss  0xc(%rsp),%xmm5
movss  0x40(%rsp),%xmm6
call   1040 <collision_radius_to_line_segment@plt>
test   %rax,%rax
jne    12ef <collision_box_line_with_radius+0x1cf>
movss  0x20(%rsp),%xmm4
addss  0x24(%rsp),%xmm4
movss  0x10(%rsp),%xmm0
movss  0x14(%rsp),%xmm1
movss  0x18(%rsp),%xmm2
movss  0x1c(%rsp),%xmm3
movss  %xmm4,0x20(%rsp)
movss  0xc(%rsp),%xmm5
movss  0x40(%rsp),%xmm6
call   1040 <collision_radius_to_line_segment@plt>
test   %rax,%rax
jne    12ef <collision_box_line_with_radius+0x1cf>
movss  0xc(%rsp),%xmm5
addss  0x28(%rsp),%xmm5
movss  0x10(%rsp),%xmm0
movss  0x14(%rsp),%xmm1
movss  0x18(%rsp),%xmm2
movss  0x1c(%rsp),%xmm3
movss  0x20(%rsp),%xmm4
movss  %xmm5,0xc(%rsp)
movss  0x40(%rsp),%xmm6
call   1040 <collision_radius_to_line_segment@plt>
test   %rax,%rax
jne    12ef <collision_box_line_with_radius+0x1cf>
movss  0x10(%rsp),%xmm0
movss  0x14(%rsp),%xmm1
movss  0x18(%rsp),%xmm2
movss  0x1c(%rsp),%xmm3
movss  0x24(%rsp),%xmm4
movss  0xc(%rsp),%xmm5
movss  0x40(%rsp),%xmm6
call   1040 <collision_radius_to_line_segment@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
mov    %ebx,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @collision_box_line_with_radius(float %0, float %1, float %2, float %3, float %4, float %5, float %6, float %7, float %8) {
%10 = alloca float
%11 = alloca float
%12 = alloca float
%13 = alloca float
%14 = alloca float
%15 = alloca float
%16 = alloca float
%17 = alloca float
%18 = alloca float
store float %0, float* %10
store float %1, float* %11
store float %2, float* %12
store float %3, float* %13
store float %4, float* %14
store float %5, float* %15
store float %6, float* %16
store float %7, float* %17
store float %8, float* %18
%19 = load float, float* %14
%20 = load float, float* %15
%21 = load float, float* %16
%22 = load float, float* %17
%23 = load float, float* %10
%24 = load float, float* %18
%25 = fsub float %23, %24
%26 = load float, float* %11
%27 = load float, float* %12
%28 = load float, float* %18
%29 = call float @llvm.fmuladd.f32(float %28, float 2.000000e+00, float %27)
%30 = load float, float* %13
%31 = call i64 @collision_line_segment_box(float %19, float %20, float %21, float %22, float %25, float %26, float %29, float %30)
%32 = icmp ne i64 %31, 0
br i1 %32, label %96, label %33
33: ; preds = %9
%34 = load float, float* %14
%35 = load float, float* %15
%36 = load float, float* %16
%37 = load float, float* %17
%38 = load float, float* %10
%39 = load float, float* %11
%40 = load float, float* %18
%41 = fsub float %39, %40
%42 = load float, float* %12
%43 = load float, float* %13
%44 = load float, float* %18
%45 = call float @llvm.fmuladd.f32(float %44, float 2.000000e+00, float %43)
%46 = call i64 @collision_line_segment_box(float %34, float %35, float %36, float %37, float %38, float %41, float %42, float %45)
%47 = icmp ne i64 %46, 0
br i1 %47, label %96, label %48
48: ; preds = %33
%49 = load float, float* %14
%50 = load float, float* %15
%51 = load float, float* %16
%52 = load float, float* %17
%53 = load float, float* %10
%54 = load float, float* %11
%55 = load float, float* %18
%56 = call i64 @collision_radius_to_line_segment(float %49, float %50, float %51, float %52, float %53, float %54, float %55)
%57 = icmp ne i64 %56, 0
br i1 %57, label %96, label %58
58: ; preds = %48
%59 = load float, float* %14
%60 = load float, float* %15
%61 = load float, float* %16
%62 = load float, float* %17
%63 = load float, float* %10
%64 = load float, float* %12
%65 = fadd float %63, %64
%66 = load float, float* %11
%67 = load float, float* %18
%68 = call i64 @collision_radius_to_line_segment(float %59, float %60, float %61, float %62, float %65, float %66, float %67)
%69 = icmp ne i64 %68, 0
br i1 %69, label %96, label %70
70: ; preds = %58
%71 = load float, float* %14
%72 = load float, float* %15
%73 = load float, float* %16
%74 = load float, float* %17
%75 = load float, float* %10
%76 = load float, float* %12
%77 = fadd float %75, %76
%78 = load float, float* %11
%79 = load float, float* %13
%80 = fadd float %78, %79
%81 = load float, float* %18
%82 = call i64 @collision_radius_to_line_segment(float %71, float %72, float %73, float %74, float %77, float %80, float %81)
%83 = icmp ne i64 %82, 0
br i1 %83, label %96, label %84
84: ; preds = %70
%85 = load float, float* %14
%86 = load float, float* %15
%87 = load float, float* %16
%88 = load float, float* %17
%89 = load float, float* %10
%90 = load float, float* %11
%91 = load float, float* %13
%92 = fadd float %90, %91
%93 = load float, float* %18
%94 = call i64 @collision_radius_to_line_segment(float %85, float %86, float %87, float %88, float %89, float %92, float %93)
%95 = icmp ne i64 %94, 0
br label %96
96: ; preds = %84, %70, %58, %48, %33, %9
%97 = phi i1 [ true, %70 ], [ true, %58 ], [ true, %48 ], [ true, %33 ], [ true, %9 ], [ %95, %84 ]
%98 = zext i1 %97 to i32
ret i32 %98
}

LLVM IR (-O2):
define i32 @collision_box_line_with_radius(float %0, float %1, float %2, float %3, float %4, float %5, float %6, float %7, float %8) {
%10 = fsub float %0, %8
%11 = tail call float @llvm.fmuladd.f32(float %8, float 2.000000e+00, float %2)
%12 = tail call i64 @collision_line_segment_box(float %4, float %5, float %6, float %7, float %10, float %1, float %11, float %3)
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %34
14: ; preds = %9
%15 = fsub float %1, %8
%16 = tail call float @llvm.fmuladd.f32(float %8, float 2.000000e+00, float %3)
%17 = tail call i64 @collision_line_segment_box(float %4, float %5, float %6, float %7, float %0, float %15, float %2, float %16)
%18 = icmp eq i64 %17, 0
br i1 %18, label %19, label %34
19: ; preds = %14
%20 = tail call i64 @collision_radius_to_line_segment(float %4, float %5, float %6, float %7, float %0, float %1, float %8)
%21 = icmp eq i64 %20, 0
br i1 %21, label %22, label %34
22: ; preds = %19
%23 = fadd float %0, %2
%24 = tail call i64 @collision_radius_to_line_segment(float %4, float %5, float %6, float %7, float %23, float %1, float %8)
%25 = icmp eq i64 %24, 0
br i1 %25, label %26, label %34
26: ; preds = %22
%27 = fadd float %1, %3
%28 = tail call i64 @collision_radius_to_line_segment(float %4, float %5, float %6, float %7, float %23, float %27, float %8)
%29 = icmp eq i64 %28, 0
br i1 %29, label %30, label %34
30: ; preds = %26
%31 = tail call i64 @collision_radius_to_line_segment(float %4, float %5, float %6, float %7, float %0, float %27, float %8)
%32 = icmp ne i64 %31, 0
%33 = zext i1 %32 to i32
br label %34
34: ; preds = %30, %26, %22, %19, %14, %9
%35 = phi i32 [ 1, %26 ], [ 1, %22 ], [ 1, %19 ], [ 1, %14 ], [ 1, %9 ], [ %33, %30 ]
ret i32 %35
}