int main(viod) {
  double i = 1, j = 1;
  while (i <= 100) {
    while (j <= 100) {
      if (fabs(i - sin(j)) < (1e-1)) {
        printf("*");
      } else {
        printf(" ");
      }
      j++;
    }
    i++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
movsd  0xec6(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xeb9(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xeb4(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     1200 <main+0xe0>
jmp    1164 <main+0x44>
movsd  0xe9c(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
jb     11e9 <main+0xc9>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1040 <sin@plt>
movsd  -0x20(%rbp),%xmm1
subsd  %xmm0,%xmm1
movaps 0xe85(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xe69(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    11c4 <main+0xa4>
lea    0xe78(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11d2 <main+0xb2>
lea    0xe67(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movsd  0xe26(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1164 <main+0x44>
movsd  0xe0f(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    114c <main+0x2c>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
mov    $0x1,%ebx
movsd  0xece(%rip),%xmm0
movapd %xmm0,%xmm1
movsd  %xmm0,(%rsp)
jmp    1153 <main+0x33>
nopl   (%rax)
call   1030 <putchar@plt>
movsd  0x8(%rsp),%xmm1
addsd  0xead(%rip),%xmm1
movsd  0xead(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     119b <main+0x7b>
movsd  %xmm1,0x8(%rsp)
movapd %xmm1,%xmm0
call   1040 <sin@plt>
movsd  (%rsp),%xmm1
subsd  %xmm0,%xmm1
andpd  0xe9f(%rip),%xmm1
movsd  0xe87(%rip),%xmm0
ucomisd %xmm1,%xmm0
mov    $0x2a,%edi
ja     1140 <main+0x20>
mov    $0x20,%edi
jmp    1140 <main+0x20>
movsd  (%rsp),%xmm0
addsd  0xe58(%rip),%xmm0
movsd  %xmm0,(%rsp)
add    $0x1,%ebx
cmp    $0x65,%ebx
jne    1153 <main+0x33>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"*\00"
@.str.1 = [2 x i8] c" \00"
define i32 @main(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
%5 = alloca double
store i32 0, i32* %2
store i32 %0, i32* %3
store double 1.000000e+00, double* %4
store double 1.000000e+00, double* %5
br label %6
6: ; preds = %27, %1
%7 = load double, double* %4
%8 = fcmp ole double %7, 1.000000e+02
br i1 %8, label %9, label %30
9: ; preds = %6
br label %10
10: ; preds = %24, %9
%11 = load double, double* %5
%12 = fcmp ole double %11, 1.000000e+02
br i1 %12, label %13, label %27
13: ; preds = %10
%14 = load double, double* %4
%15 = load double, double* %5
%16 = call double @sin(double %15)
%17 = fsub double %14, %16
%18 = call double @llvm.fabs.f64(double %17)
%19 = fcmp olt double %18, 1.000000e-01
br i1 %19, label %20, label %22
20: ; preds = %13
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %24
22: ; preds = %13
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %24
24: ; preds = %22, %20
%25 = load double, double* %5
%26 = fadd double %25, 1.000000e+00
store double %26, double* %5
br label %10
27: ; preds = %10
%28 = load double, double* %4
%29 = fadd double %28, 1.000000e+00
store double %29, double* %4
br label %6
30: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0) {
br label %2
2: ; preds = %1, %17
%3 = phi double [ 1.000000e+00, %1 ], [ %18, %17 ]
%4 = phi i32 [ 1, %1 ], [ %19, %17 ]
%5 = sitofp i32 %4 to double
%6 = fcmp ugt double %3, 1.000000e+02
br i1 %6, label %17, label %7
7: ; preds = %2, %7
%8 = phi double [ %15, %7 ], [ %3, %2 ]
%9 = tail call double @sin(double %8)
%10 = fsub double %5, %9
%11 = tail call double @llvm.fabs.f64(double %10)
%12 = fcmp olt double %11, 1.000000e-01
%13 = select i1 %12, i32 42, i32 32
%14 = tail call i32 @putchar(i32 %13)
%15 = fadd double %8, 1.000000e+00
%16 = fcmp ugt double %15, 1.000000e+02
br i1 %16, label %17, label %7
17: ; preds = %7, %2
%18 = phi double [ %3, %2 ], [ %15, %7 ]
%19 = add nuw nsw i32 %4, 1
%20 = icmp eq i32 %19, 101
br i1 %20, label %21, label %2
21: ; preds = %17
ret i32 0
}