void create_kernel(double x, double y) {
  double value[3][3];
  double dist_x;
  double dist_y;
  double sum;
  double w;
  int i, j;
  memset(value, 0, 3 * 3 * sizeof(double));
  sum = 0.0;
  x += 1.0;
  y += 1.0;
  for (j = 0; j < 64 * 3; j++) {
    dist_y = y - (((double)j + 0.5) / (double)64);
    for (i = 0; i < 64 * 3; i++) {
      dist_x = x - (((double)i + 0.5) / (double)64);
      w = (((dist_x) * (dist_x)) + ((dist_y) * (dist_y))) < 0.25 ? 1.0 : 0.0;
      value[i / 64][j / 64] += w;
      sum += w;
    }
  }
  for (j = 0; j < 3; j++) {
    for (i = 0; i < 3; i++) {
      w = (double)256 * value[i][j] / sum;
      printf(" %3d,", (int)(w + 0.5));
    }
  }
}


x86 assembly (clang, -O0):
<create_kernel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x48,%edx
call   1040 <memset@plt>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  0xeab(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xe99(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movl   $0x0,-0x88(%rbp)
cmpl   $0xc0,-0x88(%rbp)
jge    12d1 <create_kernel+0x1b1>
movsd  -0x10(%rbp),%xmm0
cvtsi2sdl -0x88(%rbp),%xmm1
ff
movsd  0xe68(%rip),%xmm2
addsd  %xmm2,%xmm1
movsd  0xe6c(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movl   $0x0,-0x84(%rbp)
cmpl   $0xc0,-0x84(%rbp)
jge    12b8 <create_kernel+0x198>
movsd  -0x8(%rbp),%xmm0
cvtsi2sdl -0x84(%rbp),%xmm1
ff
movsd  0xe20(%rip),%xmm2
addsd  %xmm2,%xmm1
movsd  0xe24(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xddb(%rip),%xmm3
xorps  %xmm2,%xmm2
movsd  0xdf0(%rip),%xmm1
cmpltsd %xmm1,%xmm0
movaps %xmm0,%xmm1
andpd  %xmm3,%xmm1
andnpd %xmm2,%xmm0
orpd   %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x80(%rbp),%xmm0
mov    -0x84(%rbp),%eax
mov    $0x40,%ecx
cltd
idiv   %ecx
movslq %eax,%rcx
lea    -0x60(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
mov    %rax,-0x90(%rbp)
mov    -0x88(%rbp),%eax
mov    $0x40,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x90(%rbp),%rax
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x80(%rbp),%xmm0
addsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    11c3 <create_kernel+0xa3>
jmp    12bd <create_kernel+0x19d>
mov    -0x88(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x88(%rbp)
jmp    117b <create_kernel+0x5b>
movl   $0x0,-0x88(%rbp)
cmpl   $0x3,-0x88(%rbp)
jge    137b <create_kernel+0x25b>
movl   $0x0,-0x84(%rbp)
cmpl   $0x3,-0x84(%rbp)
jge    1362 <create_kernel+0x242>
movslq -0x84(%rbp),%rcx
lea    -0x60(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
movslq -0x88(%rbp),%rcx
movsd  0xcf0(%rip),%xmm0
mulsd  (%rax,%rcx,8),%xmm0
divsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  0xcd1(%rip),%xmm0
addsd  -0x80(%rbp),%xmm0
cvttsd2si %xmm0,%esi
lea    0xce1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    12f2 <create_kernel+0x1d2>
jmp    1367 <create_kernel+0x247>
mov    -0x88(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x88(%rbp)
jmp    12db <create_kernel+0x1bb>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_kernel>:
push   %rbx
sub    $0x60,%rsp
xorps  %xmm2,%xmm2
movaps %xmm2,0x40(%rsp)
movaps %xmm2,0x30(%rsp)
movaps %xmm2,0x20(%rsp)
movaps %xmm2,0x10(%rsp)
movq   $0x0,0x50(%rsp)
movsd  0xec3(%rip),%xmm2
addsd  %xmm2,%xmm0
addsd  %xmm2,%xmm1
xor    %eax,%eax
xorpd  %xmm8,%xmm8
movsd  0xeb3(%rip),%xmm10
movsd  0xeb2(%rip),%xmm11
movsd  0xeb1(%rip),%xmm9
xorpd  %xmm4,%xmm4
nopl   0x0(%rax,%rax,1)
movapd %xmm8,%xmm6
addsd  %xmm10,%xmm6
mulsd  %xmm11,%xmm6
addsd  %xmm1,%xmm6
mulsd  %xmm6,%xmm6
mov    %eax,%ecx
shr    $0x6,%ecx
xorpd  %xmm3,%xmm3
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movapd %xmm3,%xmm7
addsd  %xmm10,%xmm7
mulsd  %xmm11,%xmm7
addsd  %xmm0,%xmm7
mulsd  %xmm7,%xmm7
addsd  %xmm6,%xmm7
cmpltsd %xmm9,%xmm7
andpd  %xmm2,%xmm7
mov    %edx,%esi
shr    $0x6,%esi
lea    (%rsi,%rsi,2),%rsi
lea    (%rsp,%rsi,8),%rsi
add    $0x10,%rsi
movsd  (%rsi,%rcx,8),%xmm5
addsd  %xmm7,%xmm5
movsd  %xmm5,(%rsi,%rcx,8)
addsd  %xmm7,%xmm4
addsd  %xmm2,%xmm3
add    $0x1,%edx
cmp    $0xc0,%edx
jne    11a0 <create_kernel+0x90>
addsd  %xmm2,%xmm8
add    $0x1,%eax
cmp    $0xc0,%eax
jne    1170 <create_kernel+0x60>
movsd  0x10(%rsp),%xmm0
mulsd  0xe09(%rip),%xmm0
divsd  %xmm4,%xmm0
addsd  %xmm10,%xmm0
cvttsd2si %xmm0,%esi
lea    0xdfd(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
movsd  %xmm4,0x8(%rsp)
call   1030 <printf@plt>
movsd  0x28(%rsp),%xmm0
mulsd  0xdd7(%rip),%xmm0
divsd  0x8(%rsp),%xmm0
addsd  0xdb1(%rip),%xmm0
cvttsd2si %xmm0,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
movsd  0x40(%rsp),%xmm0
mulsd  0xdad(%rip),%xmm0
divsd  0x8(%rsp),%xmm0
addsd  0xd87(%rip),%xmm0
cvttsd2si %xmm0,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
movsd  0x18(%rsp),%xmm0
mulsd  0xd83(%rip),%xmm0
divsd  0x8(%rsp),%xmm0
addsd  0xd5d(%rip),%xmm0
cvttsd2si %xmm0,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
movsd  0x30(%rsp),%xmm0
mulsd  0xd59(%rip),%xmm0
divsd  0x8(%rsp),%xmm0
addsd  0xd33(%rip),%xmm0
cvttsd2si %xmm0,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
movsd  0x48(%rsp),%xmm0
mulsd  0xd2f(%rip),%xmm0
divsd  0x8(%rsp),%xmm0
addsd  0xd09(%rip),%xmm0
cvttsd2si %xmm0,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
movsd  0x20(%rsp),%xmm0
mulsd  0xd05(%rip),%xmm0
divsd  0x8(%rsp),%xmm0
addsd  0xcdf(%rip),%xmm0
cvttsd2si %xmm0,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
movsd  0x38(%rsp),%xmm0
mulsd  0xcdb(%rip),%xmm0
divsd  0x8(%rsp),%xmm0
addsd  0xcb5(%rip),%xmm0
cvttsd2si %xmm0,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
movsd  0xcb7(%rip),%xmm0
mulsd  0x50(%rsp),%xmm0
divsd  0x8(%rsp),%xmm0
addsd  0xc8b(%rip),%xmm0
cvttsd2si %xmm0,%esi
mov    %rbx,%rdi
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [6 x i8] c" %3d,\00"
define void @create_kernel(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca [3 x [3 x double]]
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca i32
%11 = alloca i32
store double %0, double* %3
store double %1, double* %4
%12 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %5, i64 0, i64 0
%13 = bitcast [3 x double]* %12 to i8*
store double 0.000000e+00, double* %8
%14 = load double, double* %3
%15 = fadd double %14, 1.000000e+00
store double %15, double* %3
%16 = load double, double* %4
%17 = fadd double %16, 1.000000e+00
store double %17, double* %4
store i32 0, i32* %11
br label %18
18: ; preds = %65, %2
%19 = load i32, i32* %11
%20 = icmp slt i32 %19, 192
br i1 %20, label %21, label %68
21: ; preds = %18
%22 = load double, double* %4
%23 = load i32, i32* %11
%24 = sitofp i32 %23 to double
%25 = fadd double %24, 5.000000e-01
%26 = fdiv double %25, 6.400000e+01
%27 = fsub double %22, %26
store double %27, double* %7
store i32 0, i32* %10
br label %28
28: ; preds = %61, %21
%29 = load i32, i32* %10
%30 = icmp slt i32 %29, 192
br i1 %30, label %31, label %64
31: ; preds = %28
%32 = load double, double* %3
%33 = load i32, i32* %10
%34 = sitofp i32 %33 to double
%35 = fadd double %34, 5.000000e-01
%36 = fdiv double %35, 6.400000e+01
%37 = fsub double %32, %36
store double %37, double* %6
%38 = load double, double* %6
%39 = load double, double* %6
%40 = load double, double* %7
%41 = load double, double* %7
%42 = fmul double %40, %41
%43 = call double @llvm.fmuladd.f64(double %38, double %39, double %42)
%44 = fcmp olt double %43, 2.500000e-01
%45 = zext i1 %44 to i64
%46 = select i1 %44, double 1.000000e+00, double 0.000000e+00
store double %46, double* %9
%47 = load double, double* %9
%48 = load i32, i32* %10
%49 = sdiv i32 %48, 64
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %5, i64 0, i64 %50
%52 = load i32, i32* %11
%53 = sdiv i32 %52, 64
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds [3 x double], [3 x double]* %51, i64 0, i64 %54
%56 = load double, double* %55
%57 = fadd double %56, %47
store double %57, double* %55
%58 = load double, double* %9
%59 = load double, double* %8
%60 = fadd double %59, %58
store double %60, double* %8
br label %61
61: ; preds = %31
%62 = load i32, i32* %10
%63 = add nsw i32 %62, 1
store i32 %63, i32* %10
br label %28
64: ; preds = %28
br label %65
65: ; preds = %64
%66 = load i32, i32* %11
%67 = add nsw i32 %66, 1
store i32 %67, i32* %11
br label %18
68: ; preds = %18
store i32 0, i32* %11
br label %69
69: ; preds = %95, %68
%70 = load i32, i32* %11
%71 = icmp slt i32 %70, 3
br i1 %71, label %72, label %98
72: ; preds = %69
store i32 0, i32* %10
br label %73
73: ; preds = %91, %72
%74 = load i32, i32* %10
%75 = icmp slt i32 %74, 3
br i1 %75, label %76, label %94
76: ; preds = %73
%77 = load i32, i32* %10
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %5, i64 0, i64 %78
%80 = load i32, i32* %11
%81 = sext i32 %80 to i64
%82 = getelementptr inbounds [3 x double], [3 x double]* %79, i64 0, i64 %81
%83 = load double, double* %82
%84 = fmul double 2.560000e+02, %83
%85 = load double, double* %8
%86 = fdiv double %84, %85
store double %86, double* %9
%87 = load double, double* %9
%88 = fadd double %87, 5.000000e-01
%89 = fptosi double %88 to i32
%90 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %89)
br label %91
91: ; preds = %76
%92 = load i32, i32* %10
%93 = add nsw i32 %92, 1
store i32 %93, i32* %10
br label %73
94: ; preds = %73
br label %95
95: ; preds = %94
%96 = load i32, i32* %11
%97 = add nsw i32 %96, 1
store i32 %97, i32* %11
br label %69
98: ; preds = %69
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c" %3d,\00"
define void @create_kernel(double %0, double %1) {
%3 = alloca [3 x [3 x double]]
%4 = bitcast [3 x [3 x double]]* %3 to i8*
%5 = fadd double %0, 1.000000e+00
%6 = fadd double %1, 1.000000e+00
br label %71
7: ; preds = %99
%8 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %3, i64 0, i64 0, i64 0
%9 = load double, double* %8
%10 = fmul double %9, 2.560000e+02
%11 = fdiv double %10, %96
%12 = fadd double %11, 5.000000e-01
%13 = fptosi double %12 to i32
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %13)
%15 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %3, i64 0, i64 1, i64 0
%16 = load double, double* %15
%17 = fmul double %16, 2.560000e+02
%18 = fdiv double %17, %96
%19 = fadd double %18, 5.000000e-01
%20 = fptosi double %19 to i32
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %20)
%22 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %3, i64 0, i64 2, i64 0
%23 = load double, double* %22
%24 = fmul double %23, 2.560000e+02
%25 = fdiv double %24, %96
%26 = fadd double %25, 5.000000e-01
%27 = fptosi double %26 to i32
%28 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %27)
%29 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %3, i64 0, i64 0, i64 1
%30 = load double, double* %29
%31 = fmul double %30, 2.560000e+02
%32 = fdiv double %31, %96
%33 = fadd double %32, 5.000000e-01
%34 = fptosi double %33 to i32
%35 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %34)
%36 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %3, i64 0, i64 1, i64 1
%37 = load double, double* %36
%38 = fmul double %37, 2.560000e+02
%39 = fdiv double %38, %96
%40 = fadd double %39, 5.000000e-01
%41 = fptosi double %40 to i32
%42 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %41)
%43 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %3, i64 0, i64 2, i64 1
%44 = load double, double* %43
%45 = fmul double %44, 2.560000e+02
%46 = fdiv double %45, %96
%47 = fadd double %46, 5.000000e-01
%48 = fptosi double %47 to i32
%49 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %48)
%50 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %3, i64 0, i64 0, i64 2
%51 = load double, double* %50
%52 = fmul double %51, 2.560000e+02
%53 = fdiv double %52, %96
%54 = fadd double %53, 5.000000e-01
%55 = fptosi double %54 to i32
%56 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %55)
%57 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %3, i64 0, i64 1, i64 2
%58 = load double, double* %57
%59 = fmul double %58, 2.560000e+02
%60 = fdiv double %59, %96
%61 = fadd double %60, 5.000000e-01
%62 = fptosi double %61 to i32
%63 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %62)
%64 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %3, i64 0, i64 2, i64 2
%65 = load double, double* %64
%66 = fmul double %65, 2.560000e+02
%67 = fdiv double %66, %96
%68 = fadd double %67, 5.000000e-01
%69 = fptosi double %68 to i32
%70 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %69)
ret void
71: ; preds = %2, %99
%72 = phi i32 [ 0, %2 ], [ %100, %99 ]
%73 = phi double [ 0.000000e+00, %2 ], [ %96, %99 ]
%74 = sitofp i32 %72 to double
%75 = fadd double %74, 5.000000e-01
%76 = fmul double %75, 1.562500e-02
%77 = fsub double %6, %76
%78 = fmul double %77, %77
%79 = lshr i32 %72, 6
%80 = zext i32 %79 to i64
br label %81
81: ; preds = %71, %81
%82 = phi i32 [ 0, %71 ], [ %97, %81 ]
%83 = phi double [ %73, %71 ], [ %96, %81 ]
%84 = sitofp i32 %82 to double
%85 = fadd double %84, 5.000000e-01
%86 = fmul double %85, 1.562500e-02
%87 = fsub double %5, %86
%88 = tail call double @llvm.fmuladd.f64(double %87, double %87, double %78)
%89 = fcmp olt double %88, 2.500000e-01
%90 = select i1 %89, double 1.000000e+00, double 0.000000e+00
%91 = lshr i32 %82, 6
%92 = zext i32 %91 to i64
%93 = getelementptr inbounds [3 x [3 x double]], [3 x [3 x double]]* %3, i64 0, i64 %92, i64 %80
%94 = load double, double* %93
%95 = fadd double %90, %94
store double %95, double* %93
%96 = fadd double %83, %90
%97 = add nuw nsw i32 %82, 1
%98 = icmp eq i32 %97, 192
br i1 %98, label %99, label %81
99: ; preds = %81
%100 = add nuw nsw i32 %72, 1
%101 = icmp eq i32 %100, 192
br i1 %101, label %7, label %71
}