#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 exp(int);
void __build_gaussian_coefs(float radius, float *coefs) {
  double a = 1.6939718862199047 / radius;
  double g1 = exp(-a);
  double g2 = exp(-2 * a);
  double k = (1 - g1) * (1 - g1) / (1 + 2 * a * g1 - g2);
  double a0 = k;
  double a1 = k * (a - 1) * g1;
  double a2 = k * (a + 1) * g1;
  double a3 = -k * g2;
  double b1 = 2 * g1;
  double b2 = -g2;
  double left_corner = (a0 + a1) / (1 - b1 - b2);
  double right_corner = (a2 + a3) / (1 - b1 - b2);
  (*(coefs + 0)) = a0;
  (*(coefs + 1)) = a1;
  (*(coefs + 2)) = a2;
  (*(coefs + 3)) = a3;
  (*(coefs + 4)) = b1;
  (*(coefs + 5)) = b2;
  (*(coefs + 6)) = left_corner;
  (*(coefs + 7)) = right_corner;
}


x86 assembly (clang, -O0):
<__build_gaussian_coefs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movss  %xmm0,-0x4(%rbp)
mov    %rdi,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xee6(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <exp@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  0xea3(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <exp@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  0xe78(%rip),%xmm0
subsd  -0x20(%rbp),%xmm0
movsd  0xe6b(%rip),%xmm1
subsd  -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe62(%rip),%xmm1
mulsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xe44(%rip),%xmm2
addsd  %xmm2,%xmm1
subsd  -0x28(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  0xe16(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  0xdf7(%rip),%xmm1
addsd  -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x30(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xdbe(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x28(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x38(%rbp),%xmm0
addsd  -0x40(%rbp),%xmm0
movsd  0xd79(%rip),%xmm1
subsd  -0x58(%rbp),%xmm1
subsd  -0x60(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x48(%rbp),%xmm0
addsd  -0x50(%rbp),%xmm0
movsd  0xd54(%rip),%xmm1
subsd  -0x58(%rbp),%xmm1
subsd  -0x60(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x38(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
movsd  -0x40(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,0x4(%rax)
movsd  -0x48(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,0x8(%rax)
movsd  -0x50(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,0xc(%rax)
movsd  -0x58(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,0x10(%rax)
movsd  -0x60(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,0x14(%rax)
movsd  -0x68(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,0x18(%rax)
movsd  -0x70(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,0x1c(%rax)
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__build_gaussian_coefs>:
push   %rbx
sub    $0x20,%rsp
mov    %rdi,%rbx
cvtss2sd %xmm0,%xmm0
movsd  0xedc(%rip),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,(%rsp)
movapd %xmm1,%xmm0
xorpd  0xee7(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <exp@plt>
movapd %xmm0,0x10(%rsp)
movsd  0xeb8(%rip),%xmm0
mulsd  (%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <exp@plt>
movsd  0xeaa(%rip),%xmm2
movapd %xmm2,%xmm1
movapd 0x10(%rsp),%xmm7
subsd  %xmm7,%xmm1
mulsd  %xmm1,%xmm1
movapd (%rsp),%xmm4
movapd %xmm4,%xmm3
addsd  %xmm4,%xmm3
mulsd  %xmm7,%xmm3
addsd  %xmm2,%xmm3
subsd  %xmm0,%xmm3
divsd  %xmm3,%xmm1
movapd %xmm4,%xmm3
unpcklpd %xmm4,%xmm3
addpd  0xe8b(%rip),%xmm3
movapd %xmm3,%xmm4
movapd %xmm1,%xmm3
unpcklpd %xmm1,%xmm3
mulpd  %xmm4,%xmm3
movapd %xmm7,%xmm4
unpcklpd %xmm7,%xmm4
mulpd  %xmm3,%xmm4
movapd 0xe57(%rip),%xmm3
xorpd  %xmm1,%xmm3
mulsd  %xmm0,%xmm3
movapd %xmm3,%xmm6
addsd  %xmm7,%xmm7
movapd %xmm1,%xmm3
addsd  %xmm4,%xmm3
subsd  %xmm7,%xmm2
addsd  %xmm0,%xmm2
divsd  %xmm2,%xmm3
movapd %xmm4,%xmm5
unpckhpd %xmm4,%xmm5
addsd  %xmm6,%xmm5
divsd  %xmm2,%xmm5
unpcklpd %xmm4,%xmm1
shufpd $0x1,%xmm6,%xmm4
cvtpd2ps %xmm1,%xmm1
cvtpd2ps %xmm4,%xmm2
unpcklpd %xmm2,%xmm1
movupd %xmm1,(%rbx)
xorps  %xmm1,%xmm1
cvtsd2ss %xmm7,%xmm1
cvtsd2ss %xmm0,%xmm0
xorps  0xe18(%rip),%xmm0
movss  %xmm1,0x10(%rbx)
movss  %xmm0,0x14(%rbx)
xorps  %xmm0,%xmm0
cvtsd2ss %xmm3,%xmm0
movss  %xmm0,0x18(%rbx)
xorps  %xmm0,%xmm0
cvtsd2ss %xmm5,%xmm0
movss  %xmm0,0x1c(%rbx)
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @__build_gaussian_coefs(float %0, float* %1) {
%3 = alloca float
%4 = alloca float*
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
store float %0, float* %3
store float* %1, float** %4
%17 = load float, float* %3
%18 = fpext float %17 to double
%19 = fdiv double 0x3FFB1A8243BA86DB, %18
store double %19, double* %5
%20 = load double, double* %5
%21 = fneg double %20
%22 = fptosi double %21 to i32
%23 = call double @exp(i32 %22)
store double %23, double* %6
%24 = load double, double* %5
%25 = fmul double -2.000000e+00, %24
%26 = fptosi double %25 to i32
%27 = call double @exp(i32 %26)
store double %27, double* %7
%28 = load double, double* %6
%29 = fsub double 1.000000e+00, %28
%30 = load double, double* %6
%31 = fsub double 1.000000e+00, %30
%32 = fmul double %29, %31
%33 = load double, double* %5
%34 = fmul double 2.000000e+00, %33
%35 = load double, double* %6
%36 = call double @llvm.fmuladd.f64(double %34, double %35, double 1.000000e+00)
%37 = load double, double* %7
%38 = fsub double %36, %37
%39 = fdiv double %32, %38
store double %39, double* %8
%40 = load double, double* %8
store double %40, double* %9
%41 = load double, double* %8
%42 = load double, double* %5
%43 = fsub double %42, 1.000000e+00
%44 = fmul double %41, %43
%45 = load double, double* %6
%46 = fmul double %44, %45
store double %46, double* %10
%47 = load double, double* %8
%48 = load double, double* %5
%49 = fadd double %48, 1.000000e+00
%50 = fmul double %47, %49
%51 = load double, double* %6
%52 = fmul double %50, %51
store double %52, double* %11
%53 = load double, double* %8
%54 = fneg double %53
%55 = load double, double* %7
%56 = fmul double %54, %55
store double %56, double* %12
%57 = load double, double* %6
%58 = fmul double 2.000000e+00, %57
store double %58, double* %13
%59 = load double, double* %7
%60 = fneg double %59
store double %60, double* %14
%61 = load double, double* %9
%62 = load double, double* %10
%63 = fadd double %61, %62
%64 = load double, double* %13
%65 = fsub double 1.000000e+00, %64
%66 = load double, double* %14
%67 = fsub double %65, %66
%68 = fdiv double %63, %67
store double %68, double* %15
%69 = load double, double* %11
%70 = load double, double* %12
%71 = fadd double %69, %70
%72 = load double, double* %13
%73 = fsub double 1.000000e+00, %72
%74 = load double, double* %14
%75 = fsub double %73, %74
%76 = fdiv double %71, %75
store double %76, double* %16
%77 = load double, double* %9
%78 = fptrunc double %77 to float
%79 = load float*, float** %4
%80 = getelementptr inbounds float, float* %79, i64 0
store float %78, float* %80
%81 = load double, double* %10
%82 = fptrunc double %81 to float
%83 = load float*, float** %4
%84 = getelementptr inbounds float, float* %83, i64 1
store float %82, float* %84
%85 = load double, double* %11
%86 = fptrunc double %85 to float
%87 = load float*, float** %4
%88 = getelementptr inbounds float, float* %87, i64 2
store float %86, float* %88
%89 = load double, double* %12
%90 = fptrunc double %89 to float
%91 = load float*, float** %4
%92 = getelementptr inbounds float, float* %91, i64 3
store float %90, float* %92
%93 = load double, double* %13
%94 = fptrunc double %93 to float
%95 = load float*, float** %4
%96 = getelementptr inbounds float, float* %95, i64 4
store float %94, float* %96
%97 = load double, double* %14
%98 = fptrunc double %97 to float
%99 = load float*, float** %4
%100 = getelementptr inbounds float, float* %99, i64 5
store float %98, float* %100
%101 = load double, double* %15
%102 = fptrunc double %101 to float
%103 = load float*, float** %4
%104 = getelementptr inbounds float, float* %103, i64 6
store float %102, float* %104
%105 = load double, double* %16
%106 = fptrunc double %105 to float
%107 = load float*, float** %4
%108 = getelementptr inbounds float, float* %107, i64 7
store float %106, float* %108
ret void
}

LLVM IR (-O2):
define void @__build_gaussian_coefs(float %0, float* nocapture writeonly %1) {
%3 = fpext float %0 to double
%4 = fdiv double 0x3FFB1A8243BA86DB, %3
%5 = fneg double %4
%6 = fptosi double %5 to i32
%7 = tail call double @exp(i32 %6)
%8 = fmul double %4, -2.000000e+00
%9 = fptosi double %8 to i32
%10 = tail call double @exp(i32 %9)
%11 = fsub double 1.000000e+00, %7
%12 = fmul double %11, %11
%13 = fmul double %4, 2.000000e+00
%14 = tail call double @llvm.fmuladd.f64(double %13, double %7, double 1.000000e+00)
%15 = fsub double %14, %10
%16 = fdiv double %12, %15
%17 = insertelement <2 x double> poison, double %4, i64 0
%18 = shufflevector <2 x double> %17, <2 x double> poison, <2 x i32> zeroinitializer
%19 = fadd <2 x double> %18, <double -1.000000e+00, double 1.000000e+00>
%20 = insertelement <2 x double> poison, double %16, i64 0
%21 = shufflevector <2 x double> %20, <2 x double> poison, <2 x i32> zeroinitializer
%22 = fmul <2 x double> %19, %21
%23 = insertelement <2 x double> poison, double %7, i64 0
%24 = shufflevector <2 x double> %23, <2 x double> poison, <2 x i32> zeroinitializer
%25 = fmul <2 x double> %24, %22
%26 = fneg double %16
%27 = fmul double %10, %26
%28 = fmul double %7, 2.000000e+00
%29 = extractelement <2 x double> %25, i64 0
%30 = fadd double %16, %29
%31 = fsub double 1.000000e+00, %28
%32 = fadd double %10, %31
%33 = fdiv double %30, %32
%34 = extractelement <2 x double> %25, i64 1
%35 = fadd double %27, %34
%36 = fdiv double %35, %32
%37 = insertelement <4 x double> poison, double %16, i64 0
%38 = shufflevector <2 x double> %25, <2 x double> poison, <4 x i32> <i32 0, i32 1, i32 undef, i32 undef>
%39 = shufflevector <4 x double> %37, <4 x double> %38, <4 x i32> <i32 0, i32 4, i32 5, i32 undef>
%40 = insertelement <4 x double> %39, double %27, i64 3
%41 = fptrunc <4 x double> %40 to <4 x float>
%42 = bitcast float* %1 to <4 x float>*
store <4 x float> %41, <4 x float>* %42
%43 = fptrunc double %28 to float
%44 = getelementptr inbounds float, float* %1, i64 4
store float %43, float* %44
%45 = fptrunc double %10 to float
%46 = fneg float %45
%47 = getelementptr inbounds float, float* %1, i64 5
store float %46, float* %47
%48 = fptrunc double %33 to float
%49 = getelementptr inbounds float, float* %1, i64 6
store float %48, float* %49
%50 = fptrunc double %36 to float
%51 = getelementptr inbounds float, float* %1, i64 7
store float %50, float* %51
ret void
}