#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 R(int, int);
int /*<<< orphan*/ putchar(int);
main() {
  for (int i = 0; i < 2201; i++) {
    putchar(R(i % 55, i / 55 - 5) > .5 ? 58 : 32);
    if (!(i % 55))
      putchar(10);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x899,-0x8(%rbp)
jge    11b4 <main+0x94>
mov    -0x8(%rbp),%eax
mov    $0x37,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
mov    -0x8(%rbp),%eax
mov    $0x37,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
sub    $0x5,%esi
call   1040 <R@plt>
movsd  0xe93(%rip),%xmm1
mov    $0x20,%edi
mov    $0x3a,%eax
ucomisd %xmm1,%xmm0
cmova  %eax,%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%eax
mov    $0x37,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11a1 <main+0x81>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    11a6 <main+0x86>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %ebx,%ebx
jmp    1145 <main+0x25>
nopw   0x0(%rax,%rax,1)
call   1030 <putchar@plt>
add    %bx,%bp
je     11a0 <main+0x80>
add    $0x1,%ebx
cmp    $0x899,%ebx
je     11ac <main+0x8c>
movzwl %bx,%eax
imul   $0x29e5,%eax,%eax
shr    $0x10,%eax
mov    %ebx,%ecx
sub    %eax,%ecx
movzwl %cx,%esi
shr    %esi
add    %eax,%esi
shr    $0x5,%esi
imul   $0xffffffc9,%esi,%ebp
mov    %ebx,%eax
imul   $0x29e4129f,%rax,%rax
shr    $0x20,%rax
mov    %ebx,%ecx
sub    %eax,%ecx
shr    %ecx
add    %eax,%ecx
shr    $0x5,%ecx
imul   $0xffffffc9,%ecx,%edi
add    %ebx,%edi
add    $0xfffffffb,%esi
call   1040 <R@plt>
ucomisd 0xe71(%rip),%xmm0
mov    $0x3a,%edi
ja     1130 <main+0x10>
mov    $0x20,%edi
jmp    1130 <main+0x10>
nopl   (%rax)
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    113a <main+0x1a>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %23, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 2201
br i1 %5, label %6, label %26
6: ; preds = %3
%7 = load i32, i32* %2
%8 = srem i32 %7, 55
%9 = load i32, i32* %2
%10 = sdiv i32 %9, 55
%11 = sub nsw i32 %10, 5
%12 = call double @R(i32 %8, i32 %11)
%13 = fcmp ogt double %12, 5.000000e-01
%14 = zext i1 %13 to i64
%15 = select i1 %13, i32 58, i32 32
%16 = call i32 @putchar(i32 %15)
%17 = load i32, i32* %2
%18 = srem i32 %17, 55
%19 = icmp ne i32 %18, 0
br i1 %19, label %22, label %20
20: ; preds = %6
%21 = call i32 @putchar(i32 10)
br label %22
22: ; preds = %20, %6
br label %23
23: ; preds = %22
%24 = load i32, i32* %2
%25 = add nsw i32 %24, 1
store i32 %25, i32* %2
br label %3
26: ; preds = %3
%27 = load i32, i32* %1
ret i32 %27
}

LLVM IR (-O2):
define i32 @main() {
br label %2
1: ; preds = %17
ret i32 0
2: ; preds = %0, %17
%3 = phi i32 [ 0, %0 ], [ %18, %17 ]
%4 = trunc i32 %3 to i16
%5 = urem i16 %4, 55
%6 = zext i16 %5 to i32
%7 = udiv i16 %4, 55
%8 = zext i16 %7 to i32
%9 = add nsw i32 %8, -5
%10 = tail call double @R(i32 %6, i32 %9)
%11 = fcmp ogt double %10, 5.000000e-01
%12 = select i1 %11, i32 58, i32 32
%13 = tail call i32 @putchar(i32 %12)
%14 = icmp eq i16 %5, 0
br i1 %14, label %15, label %17
15: ; preds = %2
%16 = tail call i32 @putchar(i32 10)
br label %17
17: ; preds = %2, %15
%18 = add nuw nsw i32 %3, 1
%19 = icmp eq i32 %18, 2201
br i1 %19, label %1, label %2
}