#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 _cordx(double);
int _cordy(double);
int _plnorm(double);
int /*<<< orphan*/ printf(char *, int, int, int, int, int, int,
                          int /*<<< orphan*/);
int circle(double x, double y, double rs, double re, double ths, double the) {
  int r1, r2;
  r1 = _plnorm(rs);
  r2 = _plnorm(re);
  if (r1 == 0 && r2 == 0)
    return (1);
  printf("W%d %d %d %d %d %d%c", _cordx(x), _cordy(y), r1, r2, _plnorm(ths),
         _plnorm(the), 0);
  return (0);
}


x86 assembly (clang, -O0):
<circle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%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)
movsd  -0x20(%rbp),%xmm0
call   1030 <_plnorm@plt>
mov    %eax,-0x3c(%rbp)
movsd  -0x28(%rbp),%xmm0
call   1030 <_plnorm@plt>
mov    %eax,-0x40(%rbp)
cmpl   $0x0,-0x3c(%rbp)
jne    11a0 <circle+0x60>
cmpl   $0x0,-0x40(%rbp)
jne    11a0 <circle+0x60>
movl   $0x1,-0x4(%rbp)
jmp    120f <circle+0xcf>
movsd  -0x10(%rbp),%xmm0
call   1050 <_cordx@plt>
mov    %eax,-0x54(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1060 <_cordy@plt>
mov    %eax,-0x50(%rbp)
mov    -0x3c(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x40(%rbp),%eax
mov    %eax,-0x48(%rbp)
movsd  -0x30(%rbp),%xmm0
call   1030 <_plnorm@plt>
mov    %eax,-0x44(%rbp)
movsd  -0x38(%rbp),%xmm0
call   1030 <_plnorm@plt>
mov    -0x54(%rbp),%esi
mov    -0x50(%rbp),%edx
mov    -0x4c(%rbp),%ecx
mov    -0x48(%rbp),%r8d
mov    -0x44(%rbp),%r9d
lea    0xe0b(%rip),%rdi
xor    %r10d,%r10d
mov    %eax,(%rsp)
movl   $0x0,0x8(%rsp)
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<circle>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x30,%rsp
movsd  %xmm5,0x20(%rsp)
movsd  %xmm4,0x18(%rsp)
movsd  %xmm3,0x28(%rsp)
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
movaps %xmm2,%xmm0
call   1030 <_plnorm@plt>
mov    %eax,%ebx
movsd  0x28(%rsp),%xmm0
call   1030 <_plnorm@plt>
mov    %eax,%ebp
mov    $0x1,%eax
mov    %ebx,%ecx
or     %ebp,%ecx
je     11e4 <circle+0xa4>
movsd  0x8(%rsp),%xmm0
call   1050 <_cordx@plt>
mov    %eax,%r14d
movsd  0x10(%rsp),%xmm0
call   1060 <_cordy@plt>
mov    %eax,%r15d
movsd  0x18(%rsp),%xmm0
call   1030 <_plnorm@plt>
mov    %eax,%r12d
movsd  0x20(%rsp),%xmm0
call   1030 <_plnorm@plt>
lea    0xe38(%rip),%rdi
mov    %r14d,%esi
mov    %r15d,%edx
mov    %ebx,%ecx
mov    %ebp,%r8d
mov    %r12d,%r9d
push   $0x0
push   %rax
call   1040 <printf@plt>
add    $0x10,%rsp
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [21 x i8] c"W%d %d %d %d %d %d%c\00"
define i32 @circle(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = alloca i32
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca i32
%15 = alloca i32
store double %0, double* %8
store double %1, double* %9
store double %2, double* %10
store double %3, double* %11
store double %4, double* %12
store double %5, double* %13
%16 = load double, double* %10
%17 = call i32 @_plnorm(double %16)
store i32 %17, i32* %14
%18 = load double, double* %11
%19 = call i32 @_plnorm(double %18)
store i32 %19, i32* %15
%20 = load i32, i32* %14
%21 = icmp eq i32 %20, 0
br i1 %21, label %22, label %26
22: ; preds = %6
%23 = load i32, i32* %15
%24 = icmp eq i32 %23, 0
br i1 %24, label %25, label %26
25: ; preds = %22
store i32 1, i32* %7
br label %38
26: ; preds = %22, %6
%27 = load double, double* %8
%28 = call i32 @_cordx(double %27)
%29 = load double, double* %9
%30 = call i32 @_cordy(double %29)
%31 = load i32, i32* %14
%32 = load i32, i32* %15
%33 = load double, double* %12
%34 = call i32 @_plnorm(double %33)
%35 = load double, double* %13
%36 = call i32 @_plnorm(double %35)
%37 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %28, i32 %30, i32 %31, i32 %32, i32 %34, i32 %36, i32 0)
store i32 0, i32* %7
br label %38
38: ; preds = %26, %25
%39 = load i32, i32* %7
ret i32 %39
}

LLVM IR (-O2):
@.str = [21 x i8] c"W%d %d %d %d %d %d%c\00"
define i32 @circle(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = tail call i32 @_plnorm(double %2)
%8 = tail call i32 @_plnorm(double %3)
%9 = icmp eq i32 %7, 0
%10 = icmp eq i32 %8, 0
%11 = select i1 %9, i1 %10, i1 false
br i1 %11, label %18, label %12
12: ; preds = %6
%13 = tail call i32 @_cordx(double %0)
%14 = tail call i32 @_cordy(double %1)
%15 = tail call i32 @_plnorm(double %4)
%16 = tail call i32 @_plnorm(double %5)
%17 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %13, i32 %14, i32 %7, i32 %8, i32 %15, i32 %16, i32 0)
br label %18
18: ; preds = %6, %12
%19 = phi i32 [ 0, %12 ], [ 1, %6 ]
ret i32 %19
}