module name=sample_weighting_backward_cuda, target=x86-64-linux-avx-cuda-cuda_capability_50-f16c-profile-sse41 {
func sample_weighting_backward_cuda(samples, coordinates, projections, nsize, d_output, d_samples, d_projections)
{
register_destructor("halide_profiler_pipeline_end", halide_profiler_get_state())
allocate profiling_func_names[(void *) * 3]
profiling_func_names[0] = "overhead"
profiling_func_names[1] = "d_samples"
profiling_func_names[2] = "d_projections"

let profiler_token = halide_profiler_pipeline_start("sample_weighting_backward_cuda", 3, profiling_func_names)

assert((0 <= profiler_token), profiler_token)

let profiler_state = halide_profiler_get_state()

halide_profiler_incr_active_threads(profiler_state)
assert((reinterpret(samples.buffer) != (uint64)0), halide_error_buffer_argument_is_null("samples"))
assert((reinterpret(projections.buffer) != (uint64)0), halide_error_buffer_argument_is_null("projections"))
assert((reinterpret(d_samples.buffer) != (uint64)0), halide_error_buffer_argument_is_null("d_samples"))
assert((reinterpret(d_projections.buffer) != (uint64)0), halide_error_buffer_argument_is_null("d_projections"))
assert((reinterpret(d_output.buffer) != (uint64)0), halide_error_buffer_argument_is_null("d_output"))
assert((reinterpret(coordinates.buffer) != (uint64)0), halide_error_buffer_argument_is_null("coordinates"))

let coordinates = _halide_buffer_get_host(coordinates.buffer)

let coordinates.type.code = _halide_buffer_get_type_code(coordinates.buffer)

let coordinates.type.bits = _halide_buffer_get_type_bits(coordinates.buffer)

let coordinates.type.lanes = _halide_buffer_get_type_lanes(coordinates.buffer)

let coordinates.min.0 = _halide_buffer_get_min(coordinates.buffer, 0)

let coordinates.extent.0 = _halide_buffer_get_extent(coordinates.buffer, 0)

let coordinates.stride.0 = _halide_buffer_get_stride(coordinates.buffer, 0)

let coordinates.min.1 = _halide_buffer_get_min(coordinates.buffer, 1)

let coordinates.extent.1 = _halide_buffer_get_extent(coordinates.buffer, 1)

let coordinates.stride.1 = _halide_buffer_get_stride(coordinates.buffer, 1)

let coordinates.min.2 = _halide_buffer_get_min(coordinates.buffer, 2)

let coordinates.extent.2 = _halide_buffer_get_extent(coordinates.buffer, 2)

let coordinates.stride.2 = _halide_buffer_get_stride(coordinates.buffer, 2)

let coordinates.min.3 = _halide_buffer_get_min(coordinates.buffer, 3)

let coordinates.extent.3 = _halide_buffer_get_extent(coordinates.buffer, 3)

let coordinates.stride.3 = _halide_buffer_get_stride(coordinates.buffer, 3)

let coordinates.min.4 = _halide_buffer_get_min(coordinates.buffer, 4)

let coordinates.extent.4 = _halide_buffer_get_extent(coordinates.buffer, 4)

let coordinates.stride.4 = _halide_buffer_get_stride(coordinates.buffer, 4)

let d_output = _halide_buffer_get_host(d_output.buffer)

let d_output.type.code = _halide_buffer_get_type_code(d_output.buffer)

let d_output.type.bits = _halide_buffer_get_type_bits(d_output.buffer)

let d_output.type.lanes = _halide_buffer_get_type_lanes(d_output.buffer)

let d_output.min.0 = _halide_buffer_get_min(d_output.buffer, 0)

let d_output.extent.0 = _halide_buffer_get_extent(d_output.buffer, 0)

let d_output.stride.0 = _halide_buffer_get_stride(d_output.buffer, 0)

let d_output.min.1 = _halide_buffer_get_min(d_output.buffer, 1)

let d_output.extent.1 = _halide_buffer_get_extent(d_output.buffer, 1)

let d_output.stride.1 = _halide_buffer_get_stride(d_output.buffer, 1)

let d_output.min.2 = _halide_buffer_get_min(d_output.buffer, 2)

let d_output.extent.2 = _halide_buffer_get_extent(d_output.buffer, 2)

let d_output.stride.2 = _halide_buffer_get_stride(d_output.buffer, 2)

let d_output.min.3 = _halide_buffer_get_min(d_output.buffer, 3)

let d_output.extent.3 = _halide_buffer_get_extent(d_output.buffer, 3)

let d_output.stride.3 = _halide_buffer_get_stride(d_output.buffer, 3)

let d_projections = _halide_buffer_get_host(d_projections.buffer)

let d_projections.type.code = _halide_buffer_get_type_code(d_projections.buffer)

let d_projections.type.bits = _halide_buffer_get_type_bits(d_projections.buffer)

let d_projections.type.lanes = _halide_buffer_get_type_lanes(d_projections.buffer)

let d_projections.min.0 = _halide_buffer_get_min(d_projections.buffer, 0)

let d_projections.extent.0 = _halide_buffer_get_extent(d_projections.buffer, 0)

let d_projections.stride.0 = _halide_buffer_get_stride(d_projections.buffer, 0)

let d_projections.min.1 = _halide_buffer_get_min(d_projections.buffer, 1)

let d_projections.extent.1 = _halide_buffer_get_extent(d_projections.buffer, 1)

let d_projections.stride.1 = _halide_buffer_get_stride(d_projections.buffer, 1)

let d_projections.min.2 = _halide_buffer_get_min(d_projections.buffer, 2)

let d_projections.extent.2 = _halide_buffer_get_extent(d_projections.buffer, 2)

let d_projections.stride.2 = _halide_buffer_get_stride(d_projections.buffer, 2)

let d_projections.min.3 = _halide_buffer_get_min(d_projections.buffer, 3)

let d_projections.extent.3 = _halide_buffer_get_extent(d_projections.buffer, 3)

let d_projections.stride.3 = _halide_buffer_get_stride(d_projections.buffer, 3)

let d_projections.min.4 = _halide_buffer_get_min(d_projections.buffer, 4)

let d_projections.extent.4 = _halide_buffer_get_extent(d_projections.buffer, 4)

let d_projections.stride.4 = _halide_buffer_get_stride(d_projections.buffer, 4)

let d_samples = _halide_buffer_get_host(d_samples.buffer)

let d_samples.type.code = _halide_buffer_get_type_code(d_samples.buffer)

let d_samples.type.bits = _halide_buffer_get_type_bits(d_samples.buffer)

let d_samples.type.lanes = _halide_buffer_get_type_lanes(d_samples.buffer)

let d_samples.min.0 = _halide_buffer_get_min(d_samples.buffer, 0)

let d_samples.extent.0 = _halide_buffer_get_extent(d_samples.buffer, 0)

let d_samples.stride.0 = _halide_buffer_get_stride(d_samples.buffer, 0)

let d_samples.min.1 = _halide_buffer_get_min(d_samples.buffer, 1)

let d_samples.extent.1 = _halide_buffer_get_extent(d_samples.buffer, 1)

let d_samples.stride.1 = _halide_buffer_get_stride(d_samples.buffer, 1)

let d_samples.min.2 = _halide_buffer_get_min(d_samples.buffer, 2)

let d_samples.extent.2 = _halide_buffer_get_extent(d_samples.buffer, 2)

let d_samples.stride.2 = _halide_buffer_get_stride(d_samples.buffer, 2)

let d_samples.min.3 = _halide_buffer_get_min(d_samples.buffer, 3)

let d_samples.extent.3 = _halide_buffer_get_extent(d_samples.buffer, 3)

let d_samples.stride.3 = _halide_buffer_get_stride(d_samples.buffer, 3)

let d_samples.min.4 = _halide_buffer_get_min(d_samples.buffer, 4)

let d_samples.extent.4 = _halide_buffer_get_extent(d_samples.buffer, 4)

let d_samples.stride.4 = _halide_buffer_get_stride(d_samples.buffer, 4)

let projections = _halide_buffer_get_host(projections.buffer)

let projections.type.code = _halide_buffer_get_type_code(projections.buffer)

let projections.type.bits = _halide_buffer_get_type_bits(projections.buffer)

let projections.type.lanes = _halide_buffer_get_type_lanes(projections.buffer)

let projections.min.0 = _halide_buffer_get_min(projections.buffer, 0)

let projections.extent.0 = _halide_buffer_get_extent(projections.buffer, 0)

let projections.stride.0 = _halide_buffer_get_stride(projections.buffer, 0)

let projections.min.1 = _halide_buffer_get_min(projections.buffer, 1)

let projections.extent.1 = _halide_buffer_get_extent(projections.buffer, 1)

let projections.stride.1 = _halide_buffer_get_stride(projections.buffer, 1)

let projections.min.2 = _halide_buffer_get_min(projections.buffer, 2)

let projections.extent.2 = _halide_buffer_get_extent(projections.buffer, 2)

let projections.stride.2 = _halide_buffer_get_stride(projections.buffer, 2)

let projections.min.3 = _halide_buffer_get_min(projections.buffer, 3)

let projections.extent.3 = _halide_buffer_get_extent(projections.buffer, 3)

let projections.stride.3 = _halide_buffer_get_stride(projections.buffer, 3)

let projections.min.4 = _halide_buffer_get_min(projections.buffer, 4)

let projections.extent.4 = _halide_buffer_get_extent(projections.buffer, 4)

let projections.stride.4 = _halide_buffer_get_stride(projections.buffer, 4)

let samples = _halide_buffer_get_host(samples.buffer)

let samples.type.code = _halide_buffer_get_type_code(samples.buffer)

let samples.type.bits = _halide_buffer_get_type_bits(samples.buffer)

let samples.type.lanes = _halide_buffer_get_type_lanes(samples.buffer)

let samples.min.0 = _halide_buffer_get_min(samples.buffer, 0)

let samples.extent.0 = _halide_buffer_get_extent(samples.buffer, 0)

let samples.stride.0 = _halide_buffer_get_stride(samples.buffer, 0)

let samples.min.1 = _halide_buffer_get_min(samples.buffer, 1)

let samples.extent.1 = _halide_buffer_get_extent(samples.buffer, 1)

let samples.stride.1 = _halide_buffer_get_stride(samples.buffer, 1)

let samples.min.2 = _halide_buffer_get_min(samples.buffer, 2)

let samples.extent.2 = _halide_buffer_get_extent(samples.buffer, 2)

let samples.stride.2 = _halide_buffer_get_stride(samples.buffer, 2)

let samples.min.3 = _halide_buffer_get_min(samples.buffer, 3)

let samples.extent.3 = _halide_buffer_get_extent(samples.buffer, 3)

let samples.stride.3 = _halide_buffer_get_stride(samples.buffer, 3)

let samples.min.4 = _halide_buffer_get_min(samples.buffer, 4)

let samples.extent.4 = _halide_buffer_get_extent(samples.buffer, 4)

let samples.stride.4 = _halide_buffer_get_stride(samples.buffer, 4)

let projected_coord.s1.n.max.s = max((d_samples.min.4 + d_samples.extent.4), (d_projections.min.4 + d_projections.extent.4))

let projected_coord.s1.n.min = min(d_samples.min.4, d_projections.min.4)

let projected_coord.s1.k.max = max(((projections.extent.1 * 2) + -1), (d_projections.min.3 + d_projections.extent.3))

let projected_coord.s1.y.max = max((((d_samples.min.2 + d_samples.extent.2) - ((0 - nsize) / 2)) + -2), ((d_projections.min.1 + d_projections.extent.1) + -1))

let projected_coord.s1.y.min = min((d_samples.min.2 - (nsize / 2)), d_projections.min.1)

let projected_coord.s1.x.max = max((((d_samples.min.1 + d_samples.extent.1) - ((0 - nsize) / 2)) + -2), ((d_projections.min.0 + d_projections.extent.0) + -1))

let projected_coord.s1.x.min = min((d_samples.min.1 - (nsize / 2)), d_projections.min.0)

let projected_coord.s1.s.max.s = max((d_samples.min.0 + d_samples.extent.0), samples.extent.0)

let coordinates.extent.0.required.s = (max((min(max(projected_coord.s1.s.max.s, samples.extent.0), (coordinates.min.0 + coordinates.extent.0)) + -1), coordinates.min.0) - max(min(min(d_samples.min.0, ((coordinates.min.0 + coordinates.extent.0) + -1)), 0), coordinates.min.0))

let coordinates.min.0.required = max(min(min(d_samples.min.0, ((coordinates.min.0 + coordinates.extent.0) + -1)), 0), coordinates.min.0)

let coordinates.extent.1.required.s = (let t8481 = (d_projections.extent.4 * (d_projections.extent.3 + 2)) in (max(min(max(((((((d_projections.extent.0 + -1) / 4) * 4) + d_projections.min.0) + (nsize / 2)) + 3), (max(projected_coord.s1.x.max, (((int32(abs(max((t8481 * d_projections.extent.0), 1))) + -1) / max(t8481, 1)) + d_projections.min.0)) + (nsize / 2))), ((coordinates.min.1 + coordinates.extent.1) + -1)), coordinates.min.1) - max(min(((min(projected_coord.s1.x.min, d_projections.min.0) + ((0 - nsize) / 2)) + 1), ((coordinates.min.1 + coordinates.extent.1) + -1)), coordinates.min.1)))

let coordinates.min.1.required = max(min(((min(projected_coord.s1.x.min, d_projections.min.0) + ((0 - nsize) / 2)) + 1), ((coordinates.min.1 + coordinates.extent.1) + -1)), coordinates.min.1)

let coordinates.extent.2.required.s = (let t8483.s = (d_projections.extent.4 * (d_projections.extent.3 + 2)) in (max(min(max(((((((d_projections.extent.1 + -1) / 4) * 4) + d_projections.min.1) + (nsize / 2)) + 3), (max(projected_coord.s1.y.max, (((((t8483.s * d_projections.extent.0) * d_projections.extent.1) + -1) / max((t8483.s * d_projections.extent.0), 1)) + d_projections.min.1)) + (nsize / 2))), ((coordinates.min.2 + coordinates.extent.2) + -1)), coordinates.min.2) - max(min(((min(projected_coord.s1.y.min, d_projections.min.1) + ((0 - nsize) / 2)) + 1), ((coordinates.min.2 + coordinates.extent.2) + -1)), coordinates.min.2)))

let coordinates.min.2.required = max(min(((min(projected_coord.s1.y.min, d_projections.min.1) + ((0 - nsize) / 2)) + 1), ((coordinates.min.2 + coordinates.extent.2) + -1)), coordinates.min.2)

let coordinates.stride.2.required = ((coordinates.extent.0.required.s + 1) * (coordinates.extent.1.required.s + 1))

let coordinates.extent.3.required.s = (max((min(max(coordinates.extent.3, (d_projections.min.2 + d_projections.extent.2)), (coordinates.min.3 + coordinates.extent.3)) + -1), coordinates.min.3) - max(min(min(d_projections.min.2, ((coordinates.min.3 + coordinates.extent.3) + -1)), 0), coordinates.min.3))

let coordinates.min.3.required = max(min(min(d_projections.min.2, ((coordinates.min.3 + coordinates.extent.3) + -1)), 0), coordinates.min.3)

let coordinates.stride.3.required = (coordinates.stride.2.required * (coordinates.extent.2.required.s + 1))

let coordinates.extent.4.required.s = (max((min(max((d_projections.min.4 + d_projections.extent.4), max(projected_coord.s1.n.max.s, (int32(abs(max(d_projections.extent.4, 1))) + d_projections.min.4))), (coordinates.min.4 + coordinates.extent.4)) + -1), coordinates.min.4) - max(min(min(projected_coord.s1.n.min, d_projections.min.4), ((coordinates.min.4 + coordinates.extent.4) + -1)), coordinates.min.4))

let coordinates.min.4.required = max(min(min(projected_coord.s1.n.min, d_projections.min.4), ((coordinates.min.4 + coordinates.extent.4) + -1)), coordinates.min.4)

let coordinates.stride.4.required = (coordinates.stride.3.required * (coordinates.extent.3.required.s + 1))

let d_output.extent.0.required.s = (let t8487 = (d_projections.extent.4 * (((((d_projections.min.3 + d_projections.extent.3) + -1) / 2) - (d_projections.min.3 / 2)) + 1)) in (max(max(min((((int32(abs(max((t8487 * d_projections.extent.0), 1))) + -1) / max(t8487, 1)) + d_projections.min.0), ((d_output.min.0 + d_output.extent.0) + -1)), (min((((int32(abs(max(d_samples.extent.1, 1))) + d_samples.min.1) - ((0 - nsize) / 2)) + -1), (d_output.min.0 + d_output.extent.0)) + -1)), d_output.min.0) - max(min(projected_coord.s1.x.min, ((d_output.min.0 + d_output.extent.0) + -1)), d_output.min.0)))

let d_output.min.0.required = max(min(projected_coord.s1.x.min, ((d_output.min.0 + d_output.extent.0) + -1)), d_output.min.0)

let d_output.extent.1.required.s = (let t8489.s = (d_projections.extent.4 * (((((d_projections.min.3 + d_projections.extent.3) + -1) / 2) - (d_projections.min.3 / 2)) + 1)) in (max(min(max(((((((d_samples.extent.2 + -1) / 16) * 16) + d_samples.min.2) - ((0 - nsize) / 2)) + 14), (((((t8489.s * d_projections.extent.0) * d_projections.extent.1) + -1) / max((t8489.s * d_projections.extent.0), 1)) + d_projections.min.1)), ((d_output.min.1 + d_output.extent.1) + -1)), d_output.min.1) - max(min(projected_coord.s1.y.min, ((d_output.min.1 + d_output.extent.1) + -1)), d_output.min.1)))

let d_output.min.1.required = max(min(projected_coord.s1.y.min, ((d_output.min.1 + d_output.extent.1) + -1)), d_output.min.1)

let d_output.extent.2.required.s = (let t8491 = (samples.extent.3 < 0) in (let t8492 = (((int32(abs(max((d_projections.extent.4 * (((((d_projections.min.3 + d_projections.extent.3) + -1) / 2) - (d_projections.min.3 / 2)) + 1)), 1))) + -1) / max(d_projections.extent.4, 1)) + (d_projections.min.3 / 2)) in (max((min(max(((d_samples.min.3 + d_samples.extent.3) + (select(t8491, 0, (projections.extent.1 + -1)) * samples.extent.3)), ((select(t8491, (d_projections.min.3 / 2), t8492) + 1) * samples.extent.3)), (d_output.min.2 + d_output.extent.2)) + -1), d_output.min.2) - max(min(min((d_samples.min.3 + (select(t8491, (projections.extent.1 + -1), 0) * samples.extent.3)), (select(t8491, t8492, (d_projections.min.3 / 2)) * samples.extent.3)), ((d_output.min.2 + d_output.extent.2) + -1)), d_output.min.2))))

let d_output.min.2.required = (let t8494 = (samples.extent.3 < 0) in max(min(min((d_samples.min.3 + (select(t8494, (projections.extent.1 + -1), 0) * samples.extent.3)), (select(t8494, (((int32(abs(max((d_projections.extent.4 * (((((d_projections.min.3 + d_projections.extent.3) + -1) / 2) - (d_projections.min.3 / 2)) + 1)), 1))) + -1) / max(d_projections.extent.4, 1)) + (d_projections.min.3 / 2)), (d_projections.min.3 / 2)) * samples.extent.3)), ((d_output.min.2 + d_output.extent.2) + -1)), d_output.min.2))

let d_output.stride.2.required = ((d_output.extent.0.required.s + 1) * (d_output.extent.1.required.s + 1))

let d_output.extent.3.required.s = (max((min(max((d_samples.min.4 + d_samples.extent.4), (int32(abs(max(d_projections.extent.4, 1))) + d_projections.min.4)), (d_output.min.3 + d_output.extent.3)) + -1), d_output.min.3) - max(min(projected_coord.s1.n.min, ((d_output.min.3 + d_output.extent.3) + -1)), d_output.min.3))

let d_output.min.3.required = max(min(projected_coord.s1.n.min, ((d_output.min.3 + d_output.extent.3) + -1)), d_output.min.3)

let d_output.stride.3.required = (d_output.stride.2.required * (d_output.extent.2.required.s + 1))

let d_projections.extent.0.required.s = (((((d_projections.extent.0 + -1) / 4) * 4) + d_projections.min.0) - min(d_projections.min.0, ((d_projections.min.0 + d_projections.extent.0) + -4)))

let d_projections.min.0.required = min(d_projections.min.0, ((d_projections.min.0 + d_projections.extent.0) + -4))

let d_projections.extent.1.required.s = (((((d_projections.extent.1 + -1) / 4) * 4) + d_projections.min.1) - min(d_projections.min.1, ((d_projections.min.1 + d_projections.extent.1) + -4)))

let d_projections.min.1.required = min(d_projections.min.1, ((d_projections.min.1 + d_projections.extent.1) + -4))

let d_projections.stride.2.required = ((d_projections.extent.0.required.s + 4) * (d_projections.extent.1.required.s + 4))

let d_samples.extent.0.required.s = max(((d_samples.min.0 + d_samples.extent.0) + -1), (((((((d_samples.extent.1 * d_samples.extent.0) + -1) / 16) * 16) + 15) / max(d_samples.extent.1, 1)) + d_samples.min.0))

let d_samples.extent.1.required = ((max(min(((((d_samples.extent.1 + -1) / 4) * 4) + 4), d_samples.extent.1), int32(abs(max(d_samples.extent.1, 1)))) + d_samples.min.1) - min(d_samples.min.1, ((d_samples.min.1 + d_samples.extent.1) + -4)))

let d_samples.min.1.required = min(d_samples.min.1, ((d_samples.min.1 + d_samples.extent.1) + -4))

let d_samples.extent.2.required.s = (max(min((((((d_samples.extent.2 + -1) / 4) * 4) + d_samples.min.2) + 3), ((d_samples.min.2 + d_samples.extent.2) + -1)), (((((d_samples.extent.2 + -1) / 16) * 16) + d_samples.min.2) + 15)) - min(d_samples.min.2, ((d_samples.min.2 + d_samples.extent.2) + -4)))

let d_samples.min.2.required = min(d_samples.min.2, ((d_samples.min.2 + d_samples.extent.2) + -4))

let d_samples.stride.3.required = ((((d_samples.extent.0.required.s - d_samples.min.0) + 1) * d_samples.extent.1.required) * (d_samples.extent.2.required.s + 1))

let projections.extent.0.required.s = (let t8497 = (d_projections.extent.4 * (d_projections.extent.3 + 2)) in (max(min(max(projected_coord.s1.x.max, (((int32(abs(max((t8497 * d_projections.extent.0), 1))) + -1) / max(t8497, 1)) + d_projections.min.0)), ((projections.min.0 + projections.extent.0) + -1)), projections.min.0) - max(min(min(projected_coord.s1.x.min, d_projections.min.0), ((projections.min.0 + projections.extent.0) + -1)), projections.min.0)))

let projections.min.0.required = max(min(min(projected_coord.s1.x.min, d_projections.min.0), ((projections.min.0 + projections.extent.0) + -1)), projections.min.0)

let projections.extent.1.required.s = (let t8499.s = (d_projections.extent.4 * (d_projections.extent.3 + 2)) in (max(min(max(projected_coord.s1.y.max, (((((t8499.s * d_projections.extent.0) * d_projections.extent.1) + -1) / max((t8499.s * d_projections.extent.0), 1)) + d_projections.min.1)), ((projections.min.1 + projections.extent.1) + -1)), projections.min.1) - max(min(min(projected_coord.s1.y.min, d_projections.min.1), ((projections.min.1 + projections.extent.1) + -1)), projections.min.1)))

let projections.min.1.required = max(min(min(projected_coord.s1.y.min, d_projections.min.1), ((projections.min.1 + projections.extent.1) + -1)), projections.min.1)

let projections.extent.2.required.s = (max((min(coordinates.extent.3, (projections.min.2 + projections.extent.2)) + -1), projections.min.2) - max(min(((projections.min.2 + projections.extent.2) + -1), 0), projections.min.2))

let projections.min.2.required = max(min(((projections.min.2 + projections.extent.2) + -1), 0), projections.min.2)

let projections.stride.2.required = ((projections.extent.0.required.s + 1) * (projections.extent.1.required.s + 1))

let projections.extent.3.required.s = (max(min(max(projected_coord.s1.k.max, ((((int32(abs(max((d_projections.extent.4 * (d_projections.extent.3 + 2)), 1))) + -1) / max(d_projections.extent.4, 1)) + d_projections.min.3) + -1)), ((projections.min.3 + projections.extent.3) + -1)), projections.min.3) - max(min((min(d_projections.min.3, (projections.min.3 + projections.extent.3)) + -1), 0), projections.min.3))

let projections.min.3.required = max(min((min(d_projections.min.3, (projections.min.3 + projections.extent.3)) + -1), 0), projections.min.3)

let projections.stride.3.required = (projections.stride.2.required * (projections.extent.2.required.s + 1))

let projections.extent.4.required.s = (max((min(max(projected_coord.s1.n.max.s, (int32(abs(max(d_projections.extent.4, 1))) + d_projections.min.4)), (projections.min.4 + projections.extent.4)) + -1), projections.min.4) - max(min(min(projected_coord.s1.n.min, d_projections.min.4), ((projections.min.4 + projections.extent.4) + -1)), projections.min.4))

let projections.min.4.required = max(min(min(projected_coord.s1.n.min, d_projections.min.4), ((projections.min.4 + projections.extent.4) + -1)), projections.min.4)

let projections.stride.4.required = (projections.stride.3.required * (projections.extent.3.required.s + 1))

let samples.extent.0.required.s = (max((min(samples.extent.0, (samples.min.0 + samples.extent.0)) + -1), samples.min.0) - max(min(((samples.min.0 + samples.extent.0) + -1), 0), samples.min.0))

let samples.min.0.required = max(min(((samples.min.0 + samples.extent.0) + -1), 0), samples.min.0)

let samples.extent.1.required.s = (let t8505 = (d_projections.extent.4 * (((((d_projections.min.3 + d_projections.extent.3) + -1) / 2) - (d_projections.min.3 / 2)) + 1)) in (max(min(((((int32(abs(max((t8505 * d_projections.extent.0), 1))) + -1) / max(t8505, 1)) + d_projections.min.0) + (nsize / 2)), ((samples.min.1 + samples.extent.1) + -1)), samples.min.1) - max(min(((d_projections.min.0 + ((0 - nsize) / 2)) + 1), ((samples.min.1 + samples.extent.1) + -1)), samples.min.1)))

let samples.min.1.required = max(min(((d_projections.min.0 + ((0 - nsize) / 2)) + 1), ((samples.min.1 + samples.extent.1) + -1)), samples.min.1)

let samples.extent.2.required.s = (let t8507.s = (d_projections.extent.4 * (((((d_projections.min.3 + d_projections.extent.3) + -1) / 2) - (d_projections.min.3 / 2)) + 1)) in (max(min(((((((t8507.s * d_projections.extent.0) * d_projections.extent.1) + -1) / max((t8507.s * d_projections.extent.0), 1)) + d_projections.min.1) + (nsize / 2)), ((samples.min.2 + samples.extent.2) + -1)), samples.min.2) - max(min(((d_projections.min.1 + ((0 - nsize) / 2)) + 1), ((samples.min.2 + samples.extent.2) + -1)), samples.min.2)))

let samples.min.2.required = max(min(((d_projections.min.1 + ((0 - nsize) / 2)) + 1), ((samples.min.2 + samples.extent.2) + -1)), samples.min.2)

let samples.stride.2.required = ((samples.extent.0.required.s + 1) * (samples.extent.1.required.s + 1))

let samples.extent.3.required.s = (max((min(samples.extent.3, (samples.min.3 + samples.extent.3)) + -1), samples.min.3) - max(min(((samples.min.3 + samples.extent.3) + -1), 0), samples.min.3))

let samples.min.3.required = max(min(((samples.min.3 + samples.extent.3) + -1), 0), samples.min.3)

let samples.stride.3.required = (samples.stride.2.required * (samples.extent.2.required.s + 1))

let samples.extent.4.required = (max(min((int32(abs(max(d_projections.extent.4, 1))) + d_projections.min.4), (samples.min.4 + samples.extent.4)), (samples.min.4 + 1)) - max(min(d_projections.min.4, ((samples.min.4 + samples.extent.4) + -1)), samples.min.4))

let samples.min.4.required = max(min(d_projections.min.4, ((samples.min.4 + samples.extent.4) + -1)), samples.min.4)

let samples.stride.4.required = (samples.stride.3.required * (samples.extent.3.required.s + 1))

if (_halide_buffer_is_bounds_query(coordinates.buffer))
{
_halide_buffer_init(coordinates.buffer, _halide_buffer_get_shape(coordinates.buffer), reinterpret((uint64)0), (uint64)0, reinterpret((uint64)0), 2, 32, 5, make_struct(coordinates.min.0.required, (coordinates.extent.0.required.s + 1), 1, 0, coordinates.min.1.required, (coordinates.extent.1.required.s + 1), (coordinates.extent.0.required.s + 1), 0, coordinates.min.2.required, (coordinates.extent.2.required.s + 1), coordinates.stride.2.required, 0, coordinates.min.3.required, (coordinates.extent.3.required.s + 1), coordinates.stride.3.required, 0, coordinates.min.4.required, (coordinates.extent.4.required.s + 1), coordinates.stride.4.required, 0), (uint64)0)
}
if (_halide_buffer_is_bounds_query(d_output.buffer))
{
_halide_buffer_init(d_output.buffer, _halide_buffer_get_shape(d_output.buffer), reinterpret((uint64)0), (uint64)0, reinterpret((uint64)0), 2, 32, 4, make_struct(d_output.min.0.required, (d_output.extent.0.required.s + 1), 1, 0, d_output.min.1.required, (d_output.extent.1.required.s + 1), (d_output.extent.0.required.s + 1), 0, d_output.min.2.required, (d_output.extent.2.required.s + 1), d_output.stride.2.required, 0, d_output.min.3.required, (d_output.extent.3.required.s + 1), d_output.stride.3.required, 0), (uint64)0)
}
if (_halide_buffer_is_bounds_query(d_projections.buffer))
{
_halide_buffer_init(d_projections.buffer, _halide_buffer_get_shape(d_projections.buffer), reinterpret((uint64)0), (uint64)0, reinterpret((uint64)0), 2, 32, 5, make_struct(d_projections.min.0.required, (d_projections.extent.0.required.s + 4), 1, 0, d_projections.min.1.required, (d_projections.extent.1.required.s + 4), (d_projections.extent.0.required.s + 4), 0, d_projections.min.2, d_projections.extent.2, d_projections.stride.2.required, 0, d_projections.min.3, d_projections.extent.3, (d_projections.stride.2.required * d_projections.extent.2), 0, d_projections.min.4, d_projections.extent.4, ((d_projections.stride.2.required * d_projections.extent.2) * d_projections.extent.3), 0), (uint64)0)
}
if (_halide_buffer_is_bounds_query(d_samples.buffer))
{
_halide_buffer_init(d_samples.buffer, _halide_buffer_get_shape(d_samples.buffer), reinterpret((uint64)0), (uint64)0, reinterpret((uint64)0), 2, 32, 5, make_struct(d_samples.min.0, ((d_samples.extent.0.required.s - d_samples.min.0) + 1), 1, 0, d_samples.min.1.required, d_samples.extent.1.required, ((d_samples.extent.0.required.s - d_samples.min.0) + 1), 0, d_samples.min.2.required, (d_samples.extent.2.required.s + 1), (((d_samples.extent.0.required.s - d_samples.min.0) + 1) * d_samples.extent.1.required), 0, d_samples.min.3, d_samples.extent.3, d_samples.stride.3.required, 0, d_samples.min.4, d_samples.extent.4, (d_samples.stride.3.required * d_samples.extent.3), 0), (uint64)0)
}
if (_halide_buffer_is_bounds_query(projections.buffer))
{
_halide_buffer_init(projections.buffer, _halide_buffer_get_shape(projections.buffer), reinterpret((uint64)0), (uint64)0, reinterpret((uint64)0), 2, 32, 5, make_struct(projections.min.0.required, (projections.extent.0.required.s + 1), 1, 0, projections.min.1.required, (projections.extent.1.required.s + 1), (projections.extent.0.required.s + 1), 0, projections.min.2.required, (projections.extent.2.required.s + 1), projections.stride.2.required, 0, projections.min.3.required, (projections.extent.3.required.s + 1), projections.stride.3.required, 0, projections.min.4.required, (projections.extent.4.required.s + 1), projections.stride.4.required, 0), (uint64)0)
}
if (_halide_buffer_is_bounds_query(samples.buffer))
{
_halide_buffer_init(samples.buffer, _halide_buffer_get_shape(samples.buffer), reinterpret((uint64)0), (uint64)0, reinterpret((uint64)0), 2, 32, 5, make_struct(samples.min.0.required, (samples.extent.0.required.s + 1), 1, 0, samples.min.1.required, (samples.extent.1.required.s + 1), (samples.extent.0.required.s + 1), 0, samples.min.2.required, (samples.extent.2.required.s + 1), samples.stride.2.required, 0, samples.min.3.required, (samples.extent.3.required.s + 1), samples.stride.3.required, 0, samples.min.4.required, samples.extent.4.required, samples.stride.4.required, 0), (uint64)0)
}
if (!(((((_halide_buffer_is_bounds_query(coordinates.buffer) || _halide_buffer_is_bounds_query(d_output.buffer)) || _halide_buffer_is_bounds_query(d_projections.buffer)) || _halide_buffer_is_bounds_query(d_samples.buffer)) || _halide_buffer_is_bounds_query(projections.buffer)) || _halide_buffer_is_bounds_query(samples.buffer)))
{
assert((((coordinates.type.code == (uint8)2) && (coordinates.type.bits == (uint8)32)) && (coordinates.type.lanes == (uint16)1)), halide_error_bad_type("Input buffer coordinates", coordinates.type.code, (uint8)2, coordinates.type.bits, (uint8)32, coordinates.type.lanes, (uint16)1))
assert((((d_output.type.code == (uint8)2) && (d_output.type.bits == (uint8)32)) && (d_output.type.lanes == (uint16)1)), halide_error_bad_type("Input buffer d_output", d_output.type.code, (uint8)2, d_output.type.bits, (uint8)32, d_output.type.lanes, (uint16)1))
assert((((d_projections.type.code == (uint8)2) && (d_projections.type.bits == (uint8)32)) && (d_projections.type.lanes == (uint16)1)), halide_error_bad_type("Output buffer d_projections", d_projections.type.code, (uint8)2, d_projections.type.bits, (uint8)32, d_projections.type.lanes, (uint16)1))
assert((((d_samples.type.code == (uint8)2) && (d_samples.type.bits == (uint8)32)) && (d_samples.type.lanes == (uint16)1)), halide_error_bad_type("Output buffer d_samples", d_samples.type.code, (uint8)2, d_samples.type.bits, (uint8)32, d_samples.type.lanes, (uint16)1))
assert((((projections.type.code == (uint8)2) && (projections.type.bits == (uint8)32)) && (projections.type.lanes == (uint16)1)), halide_error_bad_type("Input buffer projections", projections.type.code, (uint8)2, projections.type.bits, (uint8)32, projections.type.lanes, (uint16)1))
assert((((samples.type.code == (uint8)2) && (samples.type.bits == (uint8)32)) && (samples.type.lanes == (uint16)1)), halide_error_bad_type("Input buffer samples", samples.type.code, (uint8)2, samples.type.bits, (uint8)32, samples.type.lanes, (uint16)1))
assert(((coordinates.min.0 <= coordinates.min.0.required) && ((((coordinates.min.0.required + coordinates.extent.0.required.s) - coordinates.extent.0) + 1) <= coordinates.min.0)), halide_error_access_out_of_bounds("Input buffer coordinates", 0, coordinates.min.0.required, (coordinates.min.0.required + coordinates.extent.0.required.s), coordinates.min.0, ((coordinates.min.0 + coordinates.extent.0) + -1)))
assert((0 <= coordinates.extent.0), halide_error_buffer_extents_negative("Input buffer coordinates", 0, coordinates.extent.0))
assert(((coordinates.min.1 <= coordinates.min.1.required) && ((((coordinates.min.1.required + coordinates.extent.1.required.s) - coordinates.extent.1) + 1) <= coordinates.min.1)), halide_error_access_out_of_bounds("Input buffer coordinates", 1, coordinates.min.1.required, (coordinates.min.1.required + coordinates.extent.1.required.s), coordinates.min.1, ((coordinates.min.1 + coordinates.extent.1) + -1)))
assert((0 <= coordinates.extent.1), halide_error_buffer_extents_negative("Input buffer coordinates", 1, coordinates.extent.1))
assert(((coordinates.min.2 <= coordinates.min.2.required) && ((((coordinates.min.2.required + coordinates.extent.2.required.s) - coordinates.extent.2) + 1) <= coordinates.min.2)), halide_error_access_out_of_bounds("Input buffer coordinates", 2, coordinates.min.2.required, (coordinates.min.2.required + coordinates.extent.2.required.s), coordinates.min.2, ((coordinates.min.2 + coordinates.extent.2) + -1)))
assert((0 <= coordinates.extent.2), halide_error_buffer_extents_negative("Input buffer coordinates", 2, coordinates.extent.2))
assert(((coordinates.min.3 <= coordinates.min.3.required) && ((((coordinates.min.3.required + coordinates.extent.3.required.s) - coordinates.extent.3) + 1) <= coordinates.min.3)), halide_error_access_out_of_bounds("Input buffer coordinates", 3, coordinates.min.3.required, (coordinates.min.3.required + coordinates.extent.3.required.s), coordinates.min.3, ((coordinates.min.3 + coordinates.extent.3) + -1)))
assert((0 <= coordinates.extent.3), halide_error_buffer_extents_negative("Input buffer coordinates", 3, coordinates.extent.3))
assert(((coordinates.min.4 <= coordinates.min.4.required) && ((((coordinates.min.4.required + coordinates.extent.4.required.s) - coordinates.extent.4) + 1) <= coordinates.min.4)), halide_error_access_out_of_bounds("Input buffer coordinates", 4, coordinates.min.4.required, (coordinates.min.4.required + coordinates.extent.4.required.s), coordinates.min.4, ((coordinates.min.4 + coordinates.extent.4) + -1)))
assert((0 <= coordinates.extent.4), halide_error_buffer_extents_negative("Input buffer coordinates", 4, coordinates.extent.4))
assert(((d_output.min.0 <= d_output.min.0.required) && ((((d_output.min.0.required + d_output.extent.0.required.s) - d_output.extent.0) + 1) <= d_output.min.0)), halide_error_access_out_of_bounds("Input buffer d_output", 0, d_output.min.0.required, (d_output.min.0.required + d_output.extent.0.required.s), d_output.min.0, ((d_output.min.0 + d_output.extent.0) + -1)))
assert((0 <= d_output.extent.0), halide_error_buffer_extents_negative("Input buffer d_output", 0, d_output.extent.0))
assert(((d_output.min.1 <= d_output.min.1.required) && ((((d_output.min.1.required + d_output.extent.1.required.s) - d_output.extent.1) + 1) <= d_output.min.1)), halide_error_access_out_of_bounds("Input buffer d_output", 1, d_output.min.1.required, (d_output.min.1.required + d_output.extent.1.required.s), d_output.min.1, ((d_output.min.1 + d_output.extent.1) + -1)))
assert((0 <= d_output.extent.1), halide_error_buffer_extents_negative("Input buffer d_output", 1, d_output.extent.1))
assert(((d_output.min.2 <= d_output.min.2.required) && ((((d_output.min.2.required + d_output.extent.2.required.s) - d_output.extent.2) + 1) <= d_output.min.2)), halide_error_access_out_of_bounds("Input buffer d_output", 2, d_output.min.2.required, (d_output.min.2.required + d_output.extent.2.required.s), d_output.min.2, ((d_output.min.2 + d_output.extent.2) + -1)))
assert((0 <= d_output.extent.2), halide_error_buffer_extents_negative("Input buffer d_output", 2, d_output.extent.2))
assert(((d_output.min.3 <= d_output.min.3.required) && ((((d_output.min.3.required + d_output.extent.3.required.s) - d_output.extent.3) + 1) <= d_output.min.3)), halide_error_access_out_of_bounds("Input buffer d_output", 3, d_output.min.3.required, (d_output.min.3.required + d_output.extent.3.required.s), d_output.min.3, ((d_output.min.3 + d_output.extent.3) + -1)))
assert((0 <= d_output.extent.3), halide_error_buffer_extents_negative("Input buffer d_output", 3, d_output.extent.3))
assert(((d_projections.min.0 <= d_projections.min.0.required) && ((((d_projections.min.0.required + d_projections.extent.0.required.s) - d_projections.extent.0) + 4) <= d_projections.min.0)), halide_error_access_out_of_bounds("Output buffer d_projections", 0, d_projections.min.0.required, ((d_projections.min.0.required + d_projections.extent.0.required.s) + 3), d_projections.min.0, ((d_projections.min.0 + d_projections.extent.0) + -1)))
assert((0 <= d_projections.extent.0), halide_error_buffer_extents_negative("Output buffer d_projections", 0, d_projections.extent.0))
assert(((d_projections.min.1 <= d_projections.min.1.required) && ((((d_projections.min.1.required + d_projections.extent.1.required.s) - d_projections.extent.1) + 4) <= d_projections.min.1)), halide_error_access_out_of_bounds("Output buffer d_projections", 1, d_projections.min.1.required, ((d_projections.min.1.required + d_projections.extent.1.required.s) + 3), d_projections.min.1, ((d_projections.min.1 + d_projections.extent.1) + -1)))
assert((0 <= d_projections.extent.1), halide_error_buffer_extents_negative("Output buffer d_projections", 1, d_projections.extent.1))
assert((0 <= d_projections.extent.2), halide_error_buffer_extents_negative("Output buffer d_projections", 2, d_projections.extent.2))
assert((0 <= d_projections.extent.3), halide_error_buffer_extents_negative("Output buffer d_projections", 3, d_projections.extent.3))
assert((0 <= d_projections.extent.4), halide_error_buffer_extents_negative("Output buffer d_projections", 4, d_projections.extent.4))
assert((((d_samples.extent.0.required.s - d_samples.extent.0) + 1) <= d_samples.min.0), halide_error_access_out_of_bounds("Output buffer d_samples", 0, d_samples.min.0, d_samples.extent.0.required.s, d_samples.min.0, ((d_samples.min.0 + d_samples.extent.0) + -1)))
assert((0 <= d_samples.extent.0), halide_error_buffer_extents_negative("Output buffer d_samples", 0, d_samples.extent.0))
assert(((d_samples.min.1 <= d_samples.min.1.required) && (((d_samples.min.1.required + d_samples.extent.1.required) - d_samples.extent.1) <= d_samples.min.1)), halide_error_access_out_of_bounds("Output buffer d_samples", 1, d_samples.min.1.required, ((d_samples.min.1.required + d_samples.extent.1.required) + -1), d_samples.min.1, ((d_samples.min.1 + d_samples.extent.1) + -1)))
assert((0 <= d_samples.extent.1), halide_error_buffer_extents_negative("Output buffer d_samples", 1, d_samples.extent.1))
assert(((d_samples.min.2 <= d_samples.min.2.required) && ((((d_samples.min.2.required + d_samples.extent.2.required.s) - d_samples.extent.2) + 1) <= d_samples.min.2)), halide_error_access_out_of_bounds("Output buffer d_samples", 2, d_samples.min.2.required, (d_samples.min.2.required + d_samples.extent.2.required.s), d_samples.min.2, ((d_samples.min.2 + d_samples.extent.2) + -1)))
assert((0 <= d_samples.extent.2), halide_error_buffer_extents_negative("Output buffer d_samples", 2, d_samples.extent.2))
assert((0 <= d_samples.extent.3), halide_error_buffer_extents_negative("Output buffer d_samples", 3, d_samples.extent.3))
assert((0 <= d_samples.extent.4), halide_error_buffer_extents_negative("Output buffer d_samples", 4, d_samples.extent.4))
assert(((projections.min.0 <= projections.min.0.required) && ((((projections.min.0.required + projections.extent.0.required.s) - projections.extent.0) + 1) <= projections.min.0)), halide_error_access_out_of_bounds("Input buffer projections", 0, projections.min.0.required, (projections.min.0.required + projections.extent.0.required.s), projections.min.0, ((projections.min.0 + projections.extent.0) + -1)))
assert((0 <= projections.extent.0), halide_error_buffer_extents_negative("Input buffer projections", 0, projections.extent.0))
assert(((projections.min.1 <= projections.min.1.required) && ((((projections.min.1.required + projections.extent.1.required.s) - projections.extent.1) + 1) <= projections.min.1)), halide_error_access_out_of_bounds("Input buffer projections", 1, projections.min.1.required, (projections.min.1.required + projections.extent.1.required.s), projections.min.1, ((projections.min.1 + projections.extent.1) + -1)))
assert((0 <= projections.extent.1), halide_error_buffer_extents_negative("Input buffer projections", 1, projections.extent.1))
assert(((projections.min.2 <= projections.min.2.required) && ((((projections.min.2.required + projections.extent.2.required.s) - projections.extent.2) + 1) <= projections.min.2)), halide_error_access_out_of_bounds("Input buffer projections", 2, projections.min.2.required, (projections.min.2.required + projections.extent.2.required.s), projections.min.2, ((projections.min.2 + projections.extent.2) + -1)))
assert((0 <= projections.extent.2), halide_error_buffer_extents_negative("Input buffer projections", 2, projections.extent.2))
assert(((projections.min.3 <= projections.min.3.required) && ((((projections.min.3.required + projections.extent.3.required.s) - projections.extent.3) + 1) <= projections.min.3)), halide_error_access_out_of_bounds("Input buffer projections", 3, projections.min.3.required, (projections.min.3.required + projections.extent.3.required.s), projections.min.3, ((projections.min.3 + projections.extent.3) + -1)))
assert((0 <= projections.extent.3), halide_error_buffer_extents_negative("Input buffer projections", 3, projections.extent.3))
assert(((projections.min.4 <= projections.min.4.required) && ((((projections.min.4.required + projections.extent.4.required.s) - projections.extent.4) + 1) <= projections.min.4)), halide_error_access_out_of_bounds("Input buffer projections", 4, projections.min.4.required, (projections.min.4.required + projections.extent.4.required.s), projections.min.4, ((projections.min.4 + projections.extent.4) + -1)))
assert((0 <= projections.extent.4), halide_error_buffer_extents_negative("Input buffer projections", 4, projections.extent.4))
assert(((samples.min.0 <= samples.min.0.required) && ((((samples.min.0.required + samples.extent.0.required.s) - samples.extent.0) + 1) <= samples.min.0)), halide_error_access_out_of_bounds("Input buffer samples", 0, samples.min.0.required, (samples.min.0.required + samples.extent.0.required.s), samples.min.0, ((samples.min.0 + samples.extent.0) + -1)))
assert((0 <= samples.extent.0), halide_error_buffer_extents_negative("Input buffer samples", 0, samples.extent.0))
assert(((samples.min.1 <= samples.min.1.required) && ((((samples.min.1.required + samples.extent.1.required.s) - samples.extent.1) + 1) <= samples.min.1)), halide_error_access_out_of_bounds("Input buffer samples", 1, samples.min.1.required, (samples.min.1.required + samples.extent.1.required.s), samples.min.1, ((samples.min.1 + samples.extent.1) + -1)))
assert((0 <= samples.extent.1), halide_error_buffer_extents_negative("Input buffer samples", 1, samples.extent.1))
assert(((samples.min.2 <= samples.min.2.required) && ((((samples.min.2.required + samples.extent.2.required.s) - samples.extent.2) + 1) <= samples.min.2)), halide_error_access_out_of_bounds("Input buffer samples", 2, samples.min.2.required, (samples.min.2.required + samples.extent.2.required.s), samples.min.2, ((samples.min.2 + samples.extent.2) + -1)))
assert((0 <= samples.extent.2), halide_error_buffer_extents_negative("Input buffer samples", 2, samples.extent.2))
assert(((samples.min.3 <= samples.min.3.required) && ((((samples.min.3.required + samples.extent.3.required.s) - samples.extent.3) + 1) <= samples.min.3)), halide_error_access_out_of_bounds("Input buffer samples", 3, samples.min.3.required, (samples.min.3.required + samples.extent.3.required.s), samples.min.3, ((samples.min.3 + samples.extent.3) + -1)))
assert((0 <= samples.extent.3), halide_error_buffer_extents_negative("Input buffer samples", 3, samples.extent.3))
assert(((samples.min.4 <= samples.min.4.required) && (((samples.min.4.required + samples.extent.4.required) - samples.extent.4) <= samples.min.4)), halide_error_access_out_of_bounds("Input buffer samples", 4, samples.min.4.required, ((samples.min.4.required + samples.extent.4.required) + -1), samples.min.4, ((samples.min.4 + samples.extent.4) + -1)))
assert((0 <= samples.extent.4), halide_error_buffer_extents_negative("Input buffer samples", 4, samples.extent.4))
assert((coordinates.stride.0 == 1), halide_error_constraint_violated("coordinates.stride.0", coordinates.stride.0, "1", 1))
assert((d_output.stride.0 == 1), halide_error_constraint_violated("d_output.stride.0", d_output.stride.0, "1", 1))
assert((d_projections.stride.0 == 1), halide_error_constraint_violated("d_projections.stride.0", d_projections.stride.0, "1", 1))
assert((d_samples.stride.0 == 1), halide_error_constraint_violated("d_samples.stride.0", d_samples.stride.0, "1", 1))
assert((projections.stride.0 == 1), halide_error_constraint_violated("projections.stride.0", projections.stride.0, "1", 1))
assert((samples.stride.0 == 1), halide_error_constraint_violated("samples.stride.0", samples.stride.0, "1", 1))

let coordinates.total_extent.1 = (int64(coordinates.extent.1) * int64(coordinates.extent.0))

let coordinates.total_extent.3 = (int64(coordinates.extent.3) * (int64(coordinates.extent.2) * coordinates.total_extent.1))

let d_output.total_extent.1 = (int64(d_output.extent.1) * int64(d_output.extent.0))

let d_output.total_extent.3 = (int64(d_output.extent.3) * (int64(d_output.extent.2) * d_output.total_extent.1))

let d_projections.total_extent.1 = (int64(d_projections.extent.1) * int64(d_projections.extent.0))

let d_projections.total_extent.3 = (int64(d_projections.extent.3) * (int64(d_projections.extent.2) * d_projections.total_extent.1))

let d_samples.total_extent.1 = (int64(d_samples.extent.1) * int64(d_samples.extent.0))

let d_samples.total_extent.3 = (int64(d_samples.extent.3) * (int64(d_samples.extent.2) * d_samples.total_extent.1))

let projections.total_extent.1 = (int64(projections.extent.1) * int64(projections.extent.0))

let projections.total_extent.3 = (int64(projections.extent.3) * (int64(projections.extent.2) * projections.total_extent.1))

let samples.total_extent.1 = (int64(samples.extent.1) * int64(samples.extent.0))

let samples.total_extent.3 = (int64(samples.extent.3) * (int64(samples.extent.2) * samples.total_extent.1))

assert((abs(int64(coordinates.extent.0)) <= (uint64)2147483647), halide_error_buffer_allocation_too_large("coordinates", abs(int64(coordinates.extent.0)), (uint64)2147483647))
assert((abs((int64(coordinates.extent.1) * int64(coordinates.stride.1))) <= (uint64)2147483647), halide_error_buffer_allocation_too_large("coordinates", abs((int64(coordinates.extent.1) * int64(coordinates.stride.1))), (uint64)2147483647))
assert((coordinates.total_extent.1 <= (int64)2147483647), halide_error_buffer_extents_too_large("coordinates", coordinates.total_extent.1, (int64)2147483647))
assert((abs((int64(coordinates.extent.2) * int64(coordinates.stride.2))) <= (uint64)2147483647), halide_error_buffer_allocation_too_large("coordinates", abs((int64(coordinates.extent.2) * int64(coordinates.stride.2))), (uint64)2147483647))
assert(((int64(coordinates.extent.2) * coordinates.total_extent.1) <= (int64)2147483647), halide_error_buffer_extents_too_large("coordinates", (int64(coordinates.extent.2) * coordinates.total_extent.1), (int64)2147483647))
assert((abs((int64(coordinates.extent.3) * int64(coordinates.stride.3))) <= (uint64)2147483647), halide_error_buffer_allocation_too_large("coordinates", abs((int64(coordinates.extent.3) * int64(coordinates.stride.3))), (uint64)2147483647))
assert((coordinates.total_extent.3 <= (int64)2147483647), halide_error_buffer_extents_too_large("coordinates", coordinates.total_extent.3, (int64)2147483647))
assert((abs((int64(coordinates.extent.4) * int64(coordinates.stride.4))) <= (uint64)2147483647), halide_error_buffer_allocation_too_large("coordinates", abs((int64(coordinates.extent.4) * int64(coordinates.stride.4))), (uint64)2147483647))
assert(((int64(coordinates.extent.4) * coordinates.total_extent.3) <= (int64)2147483647), halide_error_buffer_extents_too_large("coordinates", (int64(coordinates.extent.4) * coordinates.total_extent.3), (int64)2147483647))
assert((abs(int64(d_output.extent.0)) <= (uint64)2147483647), halide_error_buffer_allocation_too_large("d_output", abs(int64(d_output.extent.0)), (uint64)2147483647))
assert((abs((int64(d_output.extent.1) * int64(d_output.stride.1))) <= (uint64)2147483647), halide_error_buffer_allocation_too_large("d_output", abs((int64(d_output.extent.1) * int64(d_output.stride.1))), (uint64)2147483647))
assert((d_output.total_extent.1 <= (int64)2147483647), halide_error_buffer_extents_too_large("d_output", d_output.total_extent.1, (int64)2147483647))
assert((abs((int64(d_output.extent.2) * int64(d_output.stride.2))) <= (uint64)2147483647), halide_error_buffer_allocation_too_large("d_output", abs((int64(d_output.extent.2) * int64(d_output.stride.2))), (uint64)2147483647))
assert(((int64(d_output.extent.2) * d_output.total_extent.1) <= (int64)2147483647), halide_error_buffer_extents_too_large("d_output", (int64(d_output.extent.2) * d_output.total_extent.1), (int64)2147483647))
assert((abs((int64(d_output.extent.3) * int64(d_output.stride.3))) <= (uint64)2147483647), halide_error_buffer_allocation_too_large("d_output", abs((int64(d_output.extent.3) * int64(d_output.stride.3))), (uint64)2147483647))
assert((d_output.total_extent.3 <= (int64)2147483647), halide_error_buffer_extents_too_large("d_output", d_output.total_extent.3, (int64)2147483647))
assert((abs(int64(d_projections.extent.0)) <= (uint64)2147483647), halide_error_buffer_allocation_too_large("d_projections", abs(int64(d_projections.extent.0)), (uint64)2147483647))
assert((abs((int64(d_projections.extent.1) * int64(d_projections.stride.1))) <= (uint64)2147483647), halide_error_buffer_allocation_too_large("d_projections", abs((int64(d_projections.extent.1) * int64(d_projections.stride.1))), (uint64)2147483647))
assert((d_projections.total_extent.1 <= (int64)2147483647), halide_error_buffer_extents_too_large("d_projections", d_projections.total_extent.1, (int64)2147483647))
assert((abs((int64(d_projections.extent.2) * int64(d_projections.stride.2))) <= (uint64)2147483647), halide_error_buffer_allocation_too_large("d_projections", abs((int64(d_projections.extent.2) * int64(d_projections.stride.2))), (uint64)2147483647))
assert(((int64(d_projections.extent.2) * d_projections.total_extent.1) <= (int64)2147483647), halide_error_buffer_extents_too_large("d_projections", (int64(d_projections.extent.2) * d_projections.total_extent.1), (int64)2147483647))
assert((abs((int64(d_projections.extent.3) * int64(d_projections.stride.3))) <= (uint64)2147483647), halide_error_buffer_allocation_too_large("d_projections", abs((int64(d_projections.extent.3) * int64(d_projections.stride.3))), (uint64)2147483647))
assert((d_projections.total_extent.3 <= (int64)2147483647), halide_error_buffer_extents_too_large("d_projections", d_projections.total_extent.3, (int64)2147483647))
assert((abs((int64(d_projections.extent.4) * int64(d_projections.stride.4))) <= (uint64)2147483647), halide_error_buffer_allocation_too_large("d_projections", abs((int64(d_projections.extent.4) * int64(d_projections.stride.4))), (uint64)2147483647))
assert(((int64(d_projections.extent.4) * d_projections.total_extent.3) <= (int64)2147483647), halide_error_buffer_extents_too_large("d_projections", (int64(d_projections.extent.4) * d_projections.total_extent.3), (int64)2147483647))
assert((abs(int64(d_samples.extent.0)) <= (uint64)2147483647), halide_error_buffer_allocation_too_large("d_samples", abs(int64(d_samples.extent.0)), (uint64)2147483647))
assert((abs((int64(d_samples.extent.1) * int64(d_samples.stride.1))) <= (uint64)2147483647), halide_error_buffer_allocation_too_large("d_samples", abs((int64(d_samples.extent.1) * int64(d_samples.stride.1))), (uint64)2147483647))
assert((d_samples.total_extent.1 <= (int64)2147483647), halide_error_buffer_extents_too_large("d_samples", d_samples.total_extent.1, (int64)2147483647))
assert((abs((int64(d_samples.extent.2) * int64(d_samples.stride.2))) <= (uint64)2147483647), halide_error_buffer_allocation_too_large("d_samples", abs((int64(d_samples.extent.2) * int64(d_samples.stride.2))), (uint64)2147483647))
assert(((int64(d_samples.extent.2) * d_samples.total_extent.1) <= (int64)2147483647), halide_error_buffer_extents_too_large("d_samples", (int64(d_samples.extent.2) * d_samples.total_extent.1), (int64)2147483647))
assert((abs((int64(d_samples.extent.3) * int64(d_samples.stride.3))) <= (uint64)2147483647), halide_error_buffer_allocation_too_large("d_samples", abs((int64(d_samples.extent.3) * int64(d_samples.stride.3))), (uint64)2147483647))
assert((d_samples.total_extent.3 <= (int64)2147483647), halide_error_buffer_extents_too_large("d_samples", d_samples.total_extent.3, (int64)2147483647))
assert((abs((int64(d_samples.extent.4) * int64(d_samples.stride.4))) <= (uint64)2147483647), halide_error_buffer_allocation_too_large("d_samples", abs((int64(d_samples.extent.4) * int64(d_samples.stride.4))), (uint64)2147483647))
assert(((int64(d_samples.extent.4) * d_samples.total_extent.3) <= (int64)2147483647), halide_error_buffer_extents_too_large("d_samples", (int64(d_samples.extent.4) * d_samples.total_extent.3), (int64)2147483647))
assert((abs(int64(projections.extent.0)) <= (uint64)2147483647), halide_error_buffer_allocation_too_large("projections", abs(int64(projections.extent.0)), (uint64)2147483647))
assert((abs((int64(projections.extent.1) * int64(projections.stride.1))) <= (uint64)2147483647), halide_error_buffer_allocation_too_large("projections", abs((int64(projections.extent.1) * int64(projections.stride.1))), (uint64)2147483647))
assert((projections.total_extent.1 <= (int64)2147483647), halide_error_buffer_extents_too_large("projections", projections.total_extent.1, (int64)2147483647))
assert((abs((int64(projections.extent.2) * int64(projections.stride.2))) <= (uint64)2147483647), halide_error_buffer_allocation_too_large("projections", abs((int64(projections.extent.2) * int64(projections.stride.2))), (uint64)2147483647))
assert(((int64(projections.extent.2) * projections.total_extent.1) <= (int64)2147483647), halide_error_buffer_extents_too_large("projections", (int64(projections.extent.2) * projections.total_extent.1), (int64)2147483647))
assert((abs((int64(projections.extent.3) * int64(projections.stride.3))) <= (uint64)2147483647), halide_error_buffer_allocation_too_large("projections", abs((int64(projections.extent.3) * int64(projections.stride.3))), (uint64)2147483647))
assert((projections.total_extent.3 <= (int64)2147483647), halide_error_buffer_extents_too_large("projections", projections.total_extent.3, (int64)2147483647))
assert((abs((int64(projections.extent.4) * int64(projections.stride.4))) <= (uint64)2147483647), halide_error_buffer_allocation_too_large("projections", abs((int64(projections.extent.4) * int64(projections.stride.4))), (uint64)2147483647))
assert(((int64(projections.extent.4) * projections.total_extent.3) <= (int64)2147483647), halide_error_buffer_extents_too_large("projections", (int64(projections.extent.4) * projections.total_extent.3), (int64)2147483647))
assert((abs(int64(samples.extent.0)) <= (uint64)2147483647), halide_error_buffer_allocation_too_large("samples", abs(int64(samples.extent.0)), (uint64)2147483647))
assert((abs((int64(samples.extent.1) * int64(samples.stride.1))) <= (uint64)2147483647), halide_error_buffer_allocation_too_large("samples", abs((int64(samples.extent.1) * int64(samples.stride.1))), (uint64)2147483647))
assert((samples.total_extent.1 <= (int64)2147483647), halide_error_buffer_extents_too_large("samples", samples.total_extent.1, (int64)2147483647))
assert((abs((int64(samples.extent.2) * int64(samples.stride.2))) <= (uint64)2147483647), halide_error_buffer_allocation_too_large("samples", abs((int64(samples.extent.2) * int64(samples.stride.2))), (uint64)2147483647))
assert(((int64(samples.extent.2) * samples.total_extent.1) <= (int64)2147483647), halide_error_buffer_extents_too_large("samples", (int64(samples.extent.2) * samples.total_extent.1), (int64)2147483647))
assert((abs((int64(samples.extent.3) * int64(samples.stride.3))) <= (uint64)2147483647), halide_error_buffer_allocation_too_large("samples", abs((int64(samples.extent.3) * int64(samples.stride.3))), (uint64)2147483647))
assert((samples.total_extent.3 <= (int64)2147483647), halide_error_buffer_extents_too_large("samples", samples.total_extent.3, (int64)2147483647))
assert((abs((int64(samples.extent.4) * int64(samples.stride.4))) <= (uint64)2147483647), halide_error_buffer_allocation_too_large("samples", abs((int64(samples.extent.4) * int64(samples.stride.4))), (uint64)2147483647))
assert(((int64(samples.extent.4) * samples.total_extent.3) <= (int64)2147483647), halide_error_buffer_extents_too_large("samples", (int64(samples.extent.4) * samples.total_extent.3), (int64)2147483647))
produce d_samples
{
halide_profiler_set_current_func(profiler_state, profiler_token, 1)

let halide_copy_to_device_result$3 = halide_copy_to_device(d_samples.buffer, halide_cuda_device_interface())

assert((halide_copy_to_device_result$3 == 0), halide_copy_to_device_result$3)

let t9459 = ((d_samples.extent.2 + 3) / 4)

let t9460 = ((d_samples.extent.1 + 3) / 4)

let t9463 = ((((d_samples.min.0 + (d_samples.min.1 * d_samples.stride.1)) + (d_samples.min.2 * d_samples.stride.2)) + (d_samples.min.3 * d_samples.stride.3)) + (d_samples.min.4 * d_samples.stride.4))

let t9461 = ((d_samples.min.2 + d_samples.extent.2) + -4)

let t9462 = ((d_samples.min.1 + d_samples.extent.1) + -4)

for (d_samples.s0.n, d_samples.min.4, d_samples.extent.4)
{

let t9464 = ((d_samples.s0.n * d_samples.stride.4) - t9463)

for (d_samples.s0.ci, d_samples.min.3, d_samples.extent.3)
{
halide_profiler_decr_active_threads(profiler_state)

let t9465 = (t9464 + (d_samples.s0.ci * d_samples.stride.3))

gpu_block (d_samples.s0.y.gpu_tile_y.__block_id_y, 0, t9459)
{
gpu_block (d_samples.s0.x.gpu_tile_x.__block_id_x, 0, t9460)
{
gpu_thread (.__thread_id_y, 0, 4)
{
gpu_thread (.__thread_id_x, 0, 4)
{

let d_samples.s0.y.gpu_threads_y.base = min((d_samples.min.2 + (d_samples.s0.y.gpu_tile_y.__block_id_y * 4)), t9461)

let d_samples.s0.x.gpu_threads_x.base = min((d_samples.min.1 + (d_samples.s0.x.gpu_tile_x.__block_id_x * 4)), t9462)

let t9466 = ((t9465 + ((d_samples.s0.y.gpu_threads_y.base + .__thread_id_y) * d_samples.stride.2)) + ((d_samples.s0.x.gpu_threads_x.base + .__thread_id_x) * d_samples.stride.1))

for (d_samples.s0.s, d_samples.min.0, d_samples.extent.0)
{
d_samples[(t9466 + d_samples.s0.s)] = 0.000000f
}
}
}
}
}
halide_profiler_incr_active_threads(profiler_state)
}
}
_halide_buffer_set_device_dirty(d_samples.buffer, (uint1)1)

let d_samples.s1.r$y.loop_extent = ((nsize / 2) - ((0 - nsize) / 2))

let halide_copy_to_device_result = halide_copy_to_device(coordinates.buffer, halide_cuda_device_interface())

assert((halide_copy_to_device_result == 0), halide_copy_to_device_result)

let halide_copy_to_device_result$1 = halide_copy_to_device(d_output.buffer, halide_cuda_device_interface())

assert((halide_copy_to_device_result$1 == 0), halide_copy_to_device_result$1)

let halide_copy_to_device_result$4 = halide_copy_to_device(projections.buffer, halide_cuda_device_interface())

assert((halide_copy_to_device_result$4 == 0), halide_copy_to_device_result$4)

let d_samples.s1.n.prologue = min(max(max(max(coordinates.min.4, d_output.min.3), projections.min.4), d_samples.min.4), (d_samples.extent.4 + d_samples.min.4))

let d_samples.s1.n.epilogue = max(min(min(min((coordinates.min.4 + coordinates.extent.4), (d_output.min.3 + d_output.extent.3)), (projections.min.4 + projections.extent.4)), (d_samples.min.4 + d_samples.extent.4)), min(max(max(max(coordinates.min.4, d_output.min.3), projections.min.4), d_samples.min.4), (d_samples.extent.4 + d_samples.min.4)))

let t9499 = float32(nsize)

let t9471 = max(d_samples.extent.1, 1)

let t9495 = (1.000000f / ((t9499 * t9499) * float32(samples.extent.0)))

let t9469 = (((d_samples.extent.1 * d_samples.extent.0) + 15) / 16)

let t9468 = ((d_samples.extent.2 + 15) / 16)

let t9489 = (t9499 * 0.500000f)

let t9494 = ((((0 - (d_samples.min.1 * d_samples.stride.1)) - (d_samples.min.2 * d_samples.stride.2)) - (d_samples.min.3 * d_samples.stride.3)) - (d_samples.min.4 * d_samples.stride.4))

let t9467 = (d_samples.s1.n.prologue - d_samples.min.4)

let t9470 = (((0 - nsize) / 2) + 1)

let t9488 = ((((projections.min.0 + (projections.min.1 * projections.stride.1)) + (projections.min.2 * projections.stride.2)) + (projections.min.3 * projections.stride.3)) + (projections.min.4 * projections.stride.4))

let t9480 = ((((coordinates.min.0 + (coordinates.min.1 * coordinates.stride.1)) + (coordinates.min.2 * coordinates.stride.2)) + (coordinates.min.3 * coordinates.stride.3)) + (coordinates.min.4 * coordinates.stride.4))

let t9498 = (((d_output.min.0 + (d_output.min.1 * d_output.stride.1)) + (d_output.min.2 * d_output.stride.2)) + (d_output.min.3 * d_output.stride.3))

let t9485 = (projections.min.4 + projections.extent.4)

let t9484 = (projections.min.3 + projections.extent.3)

let t9483 = (projections.min.2 + projections.extent.2)

let t9481 = (projections.min.0 + projections.extent.0)

let t9493 = (d_output.min.3 + d_output.extent.3)

let t9492 = (d_output.min.2 + d_output.extent.2)

let t9491 = (d_output.min.1 + d_output.extent.1)

let t9490 = (d_output.min.0 + d_output.extent.0)

let t9476 = (coordinates.min.4 + coordinates.extent.4)

let t9474 = (coordinates.min.2 + coordinates.extent.2)

let t9473 = (coordinates.min.1 + coordinates.extent.1)

let t9472 = (coordinates.min.0 + coordinates.extent.0)

for (d_samples.s1.n, d_samples.min.4, t9467)
{

let t9508 = (d_samples.s1.n < projections.min.4)

let t9512 = (d_samples.s1.n < d_output.min.3)

let t9504 = (d_samples.s1.n < coordinates.min.4)

let t9509 = (t9494 + (d_samples.s1.n * d_samples.stride.4))

for (d_samples.s1.ci, d_samples.min.3, d_samples.extent.3)
{
halide_profiler_decr_active_threads(profiler_state)

let t9520 = (t9509 + (d_samples.s1.ci * d_samples.stride.3))

gpu_block (d_samples.s1.y.gpu_tile_y.__block_id_y, 0, t9468)
{
gpu_block (d_samples.s1.x.x.gpu_tile_x.__block_id_x, 0, t9469)
{
gpu_thread (.__thread_id_y, 0, 16)
{
gpu_thread (.__thread_id_x, 0, 16)
{

let t9537 = (d_samples.s1.y.gpu_tile_y.__block_id_y * 16)

let t9538 = ((d_samples.min.2 + t9537) + .__thread_id_y)

let t9539 = ((d_samples.s1.x.x.gpu_tile_x.__block_id_x * 16) + .__thread_id_x)

let t9529 = (t9537 < ((coordinates.min.2 - d_samples.min.2) - .__thread_id_y))

let t9523 = (t9539 % t9471)

let t9524 = (t9539 / t9471)

let t9533 = ((projections.min.1 - d_samples.min.2) - .__thread_id_y)

let t9535 = ((d_output.min.1 - d_samples.min.2) - .__thread_id_y)

let t9536 = (t9520 + (t9538 * d_samples.stride.2))

for (d_samples.s1.r$z, 0, projections.extent.1)
{

let t9540 = (d_samples.s1.r$z * 2)

let t9544 = (projections.min.1 + projections.extent.1)

let t9546 = (d_samples.s1.ci + (samples.extent.3 * d_samples.s1.r$z))

for (d_samples.s1.r$y, t9470, d_samples.s1.r$y.loop_extent)
{

let t9555 = (t9537 < (t9535 + d_samples.s1.r$y))

let t9552 = (t9537 < (t9533 + d_samples.s1.r$y))

let t9553 = float32(d_samples.s1.r$y)

for (d_samples.s1.r$x, t9470, d_samples.s1.r$y.loop_extent)
{

let d_samples.s1.x.min_1.s = t9523

let d_samples.s1.s.min_1.s = t9524

allocate projected_coord[float32 * 2]
produce projected_coord
{
for (projected_coord.s0.k, t9540, 2)
{
projected_coord[(projected_coord.s0.k - t9540)] = 0.000000f
}

let t9559 = (d_samples.s1.x.min_1.s < (coordinates.min.1 - d_samples.min.1))

let t9561 = (d_samples.s1.x.min_1.s < ((projections.min.0 - d_samples.min.1) + d_samples.s1.r$x))

let t9558 = (d_samples.s1.s.min_1.s < (coordinates.min.0 - d_samples.min.0))

let t9562 = float32(d_samples.s1.r$x)

for (projected_coord.s1.k, t9540, 2)
{

let t9567 = (projected_coord.s1.k < projections.min.3)

let t9566 = (projected_coord.s1.k - t9540)

for (projected_coord.s1.r4$x, 0, coordinates.extent.3)
{
projected_coord[t9566] = (let t8520 = select((((((((((t9558 || ((t9472 - d_samples.min.0) <= d_samples.s1.s.min_1.s)) || t9559) || ((t9473 - d_samples.min.1) <= d_samples.s1.x.min_1.s)) || t9529) || (((t9474 - d_samples.min.2) - .__thread_id_y) <= t9537)) || (projected_coord.s1.r4$x < coordinates.min.3)) || ((coordinates.min.3 + coordinates.extent.3) <= projected_coord.s1.r4$x)) || t9504) || (t9476 <= d_samples.s1.n)), 0.000000f, coordinates[(((max(min((d_samples.min.0 + d_samples.s1.s.min_1.s), (t9472 + -1)), coordinates.min.0) + (((max(min(d_samples.s1.n, (t9476 + -1)), coordinates.min.4) * coordinates.stride.4) - t9480) + (max(min(t9538, (t9474 + -1)), coordinates.min.2) * coordinates.stride.2))) + (max(min((d_samples.min.1 + d_samples.s1.x.min_1.s), (t9473 + -1)), coordinates.min.1) * coordinates.stride.1)) + (max(min(projected_coord.s1.r4$x, ((coordinates.min.3 + coordinates.extent.3) + -1)), coordinates.min.3) * coordinates.stride.3))]) in (projected_coord[t9566] + (select((((((((((t9561 || (((t9481 - d_samples.min.1) + d_samples.s1.r$x) <= d_samples.s1.x.min_1.s)) || t9552) || ((((t9544 - d_samples.min.2) - .__thread_id_y) + d_samples.s1.r$y) <= t9537)) || (projected_coord.s1.r4$x < projections.min.2)) || (t9483 <= projected_coord.s1.r4$x)) || t9567) || (t9484 <= projected_coord.s1.k)) || t9508) || (t9485 <= d_samples.s1.n)), 0.000000f, projections[(((max(min(((d_samples.min.1 + d_samples.s1.x.min_1.s) - d_samples.s1.r$x), (t9481 + -1)), projections.min.0) + (((max(min(d_samples.s1.n, (t9485 + -1)), projections.min.4) * projections.stride.4) - t9488) + (max(min((t9538 - d_samples.s1.r$y), (t9544 + -1)), projections.min.1) * projections.stride.1))) + (max(min(projected_coord.s1.k, (t9484 + -1)), projections.min.3) * projections.stride.3)) + (max(min(projected_coord.s1.r4$x, (t9483 + -1)), projections.min.2) * projections.stride.2))]) * select((projected_coord.s1.r4$x == 0), (((t8520 + t9562) + -0.500000f) / t9489), select((projected_coord.s1.r4$x == 1), (((t8520 + t9553) + -0.500000f) / t9489), t8520)))))
}
}
}
consume projected_coord
{
d_samples[((t9536 + d_samples.s1.s.min_1.s) + ((d_samples.min.1 + d_samples.s1.x.min_1.s) * d_samples.stride.1))] = (let t8526 = projected_coord[0] in (let t8527 = projected_coord[1] in (d_samples[(((t9520 + (t9538 * d_samples.stride.2)) + d_samples.s1.s.min_1.s) + ((d_samples.min.1 + d_samples.s1.x.min_1.s) * d_samples.stride.1))] + ((t9495 * exp_f32((((t8526 * t8526) + (t8527 * t8527)) * -0.500000f))) * select(((((((((d_samples.s1.x.min_1.s < ((d_output.min.0 - d_samples.min.1) + d_samples.s1.r$x)) || (((t9490 - d_samples.min.1) + d_samples.s1.r$x) <= d_samples.s1.x.min_1.s)) || t9555) || ((((t9491 - d_samples.min.2) - .__thread_id_y) + d_samples.s1.r$y) <= t9537)) || (t9546 < d_output.min.2)) || (t9492 <= t9546)) || t9512) || (t9493 <= d_samples.s1.n)), 0.000000f, d_output[(max(min(((d_samples.min.1 + d_samples.s1.x.min_1.s) - d_samples.s1.r$x), (t9490 + -1)), d_output.min.0) + ((((max(min(d_samples.s1.n, (t9493 + -1)), d_output.min.3) * d_output.stride.3) - t9498) + (max(min(t9546, (t9492 + -1)), d_output.min.2) * d_output.stride.2)) + (max(min((t9538 - d_samples.s1.r$y), (t9491 + -1)), d_output.min.1) * d_output.stride.1)))])))))
}
free projected_coord
}
}
}
}
}
}
}
halide_profiler_incr_active_threads(profiler_state)
}
}

let t9617 = (coordinates.min.2 + coordinates.extent.2)

let t9618 = (coordinates.min.3 + coordinates.extent.3)

let t9619 = (d_output.min.1 + d_output.extent.1)

let t9620 = (d_output.min.2 + d_output.extent.2)

let t9621 = (d_samples.min.3 + d_samples.extent.3)

let t9622 = ((0 - nsize) / 2)

let t9623 = (projections.min.1 + projections.extent.1)

let t9624 = (projections.min.2 + projections.extent.2)

let t9625 = (d_output.min.1 * d_output.stride.1)

let t9626 = (d_output.min.2 * d_output.stride.2)

let t9627 = (d_output.min.3 * d_output.stride.3)

let t9628 = (projections.min.1 * projections.stride.1)

let t9629 = (projections.min.2 * projections.stride.2)

let t9630 = (projections.min.3 * projections.stride.3)

let t9631 = (projections.min.4 * projections.stride.4)

let t9632 = (coordinates.min.2 - d_samples.min.2)

let t9633 = (d_samples.min.1 - d_output.min.0)

let t9634 = (d_samples.min.1 - projections.min.0)

let t9635 = float32(nsize)

let t9636 = ((d_samples.extent.2 + 15) / 16)

let t9637 = (samples.extent.3 < 0)

let t9638 = ((projections.extent.1 + -1) * samples.extent.3)

let t9639 = select(t9637, t9638, 0)

let t9640 = min(max((d_output.min.2 - t9639), d_samples.min.3), (d_samples.extent.3 + d_samples.min.3))

let t9641 = min(max(((max(max(max((((max(d_output.min.1, projections.min.1) + t9622) + d_samples.s1.r$y.loop_extent) - d_samples.min.2), t9632), (((d_output.min.1 + t9622) + d_samples.s1.r$y.loop_extent) - d_samples.min.2)), (((projections.min.1 + t9622) + d_samples.s1.r$y.loop_extent) - d_samples.min.2)) + 15) / 16), 0), t9636)

let t9642 = max(max(coordinates.min.3, projections.min.2), 0)

let t9643 = (t9619 + t9622)

let t9644 = (t9623 + t9622)

let t9645 = (t9617 - d_samples.min.2)

let t9646 = (((t9643 - d_samples.min.2) + -15) / 16)

let t9647 = (((t9644 - d_samples.min.2) + -15) / 16)

let t9602 = max(t9641, (min(min(min(min(min(min(min(min(((t9645 / 16) + -1), t9646), t9647), ((((t9643 + d_samples.s1.r$y.loop_extent) - d_samples.min.2) + -1) / 16)), ((((t9644 + d_samples.s1.r$y.loop_extent) - d_samples.min.2) + -1) / 16)), ((t9645 + -1) / 16)), t9646), t9647), ((d_samples.extent.2 + -1) / 16)) + 1))

let t9570 = max(min(min((t9620 - select(t9637, 0, t9638)), (t9620 - t9639)), t9621), t9640)

let t9574 = max(d_samples.extent.1, 1)

let t9603 = min(t9642, coordinates.extent.3)

let t9604 = min(max(min(t9618, t9624), t9642), coordinates.extent.3)

let t9597 = (1.000000f / ((t9635 * t9635) * float32(samples.extent.0)))

let t9572 = (((d_samples.extent.1 * d_samples.extent.0) + 15) / 16)

let t9592 = (t9635 * 0.500000f)

let t9612 = ((((t9634 - t9628) - t9629) - t9630) - t9631)

let t9615 = (((t9633 - t9625) - t9626) - t9627)

let t9596 = ((((0 - (d_samples.min.1 * d_samples.stride.1)) - (d_samples.min.2 * d_samples.stride.2)) - (d_samples.min.3 * d_samples.stride.3)) - (d_samples.min.4 * d_samples.stride.4))

let t9568 = (d_samples.s1.n.epilogue - d_samples.s1.n.prologue)

let t9591 = ((((projections.min.0 + t9628) + t9629) + t9630) + t9631)

let t9583 = ((((coordinates.min.0 + (coordinates.min.1 * coordinates.stride.1)) + (coordinates.min.2 * coordinates.stride.2)) + (coordinates.min.3 * coordinates.stride.3)) + (coordinates.min.4 * coordinates.stride.4))

let t9600 = (((d_output.min.0 + t9625) + t9626) + t9627)

let t9590 = ((projections.min.4 + projections.extent.4) + -1)

let t9582 = ((coordinates.min.4 + coordinates.extent.4) + -1)

let t9587 = (projections.min.3 + projections.extent.3)

let t9576 = (coordinates.min.1 + coordinates.extent.1)

let t9575 = (coordinates.min.0 + coordinates.extent.0)

for (d_samples.s1.n, d_samples.s1.n.prologue, t9568)
{

let d_samples.s1.ci.prologue = t9640

let d_samples.s1.ci.epilogue = t9570

let t9656 = ((max(min(d_samples.s1.n, t9590), projections.min.4) * projections.stride.4) - t9591)

let t9652 = ((max(min(d_samples.s1.n, t9582), coordinates.min.4) * coordinates.stride.4) - t9583)

let t9661 = ((d_samples.s1.n * d_output.stride.3) - t9600)

let t9648 = (d_samples.s1.ci.prologue - d_samples.min.3)

let t9649 = (t9622 + 1)

let t9658 = (t9596 + (d_samples.s1.n * d_samples.stride.4))

let t9653 = (projections.min.0 + projections.extent.0)

let t9657 = (d_output.min.0 + d_output.extent.0)

for (d_samples.s1.ci, d_samples.min.3, t9648)
{
halide_profiler_decr_active_threads(profiler_state)

let t9666 = (t9658 + (d_samples.s1.ci * d_samples.stride.3))

gpu_block (d_samples.s1.y.gpu_tile_y.__block_id_y, 0, t9636)
{
gpu_block (d_samples.s1.x.x.gpu_tile_x.__block_id_x, 0, t9572)
{
gpu_thread (.__thread_id_y, 0, 16)
{
gpu_thread (.__thread_id_x, 0, 16)
{

let t9681 = (d_samples.s1.y.gpu_tile_y.__block_id_y * 16)

let t9682 = ((d_samples.min.2 + t9681) + .__thread_id_y)

let t9683 = ((d_samples.s1.x.x.gpu_tile_x.__block_id_x * 16) + .__thread_id_x)

let t9674 = (t9681 < (t9632 - .__thread_id_y))

let t9669 = (t9683 % t9574)

let t9670 = (t9683 / t9574)

let t9677 = ((projections.min.1 - d_samples.min.2) - .__thread_id_y)

let t9679 = ((d_output.min.1 - d_samples.min.2) - .__thread_id_y)

let t9680 = (t9666 + (t9682 * d_samples.stride.2))

for (d_samples.s1.r$z, 0, projections.extent.1)
{

let t9684 = (d_samples.s1.r$z * 2)

let t9688 = (d_samples.s1.ci + (samples.extent.3 * d_samples.s1.r$z))

for (d_samples.s1.r$y, t9649, d_samples.s1.r$y.loop_extent)
{

let t9696 = (t9681 < (t9679 + d_samples.s1.r$y))

let t9693 = (t9681 < (t9677 + d_samples.s1.r$y))

let t9694 = float32(d_samples.s1.r$y)

for (d_samples.s1.r$x, t9649, d_samples.s1.r$y.loop_extent)
{

let d_samples.s1.x.min_1.s = t9669

let d_samples.s1.s.min_1.s = t9670

allocate projected_coord[float32 * 2]
produce projected_coord
{
for (projected_coord.s0.k, t9684, 2)
{
projected_coord[(projected_coord.s0.k - t9684)] = 0.000000f
}

let t9699 = (d_samples.s1.x.min_1.s < (coordinates.min.1 - d_samples.min.1))

let t9701 = (d_samples.s1.x.min_1.s < ((projections.min.0 - d_samples.min.1) + d_samples.s1.r$x))

let t9698 = (d_samples.s1.s.min_1.s < (coordinates.min.0 - d_samples.min.0))

let t9702 = float32(d_samples.s1.r$x)

for (projected_coord.s1.k, t9684, 2)
{

let t9706 = (projected_coord.s1.k < projections.min.3)

let t9705 = (projected_coord.s1.k - t9684)

for (projected_coord.s1.r4$x, 0, coordinates.extent.3)
{
projected_coord[t9705] = (let t8546 = select((((((((t9698 || ((t9575 - d_samples.min.0) <= d_samples.s1.s.min_1.s)) || t9699) || ((t9576 - d_samples.min.1) <= d_samples.s1.x.min_1.s)) || t9674) || (((t9617 - d_samples.min.2) - .__thread_id_y) <= t9681)) || (projected_coord.s1.r4$x < coordinates.min.3)) || (t9618 <= projected_coord.s1.r4$x)), 0.000000f, coordinates[(((max(min((d_samples.min.0 + d_samples.s1.s.min_1.s), (t9575 + -1)), coordinates.min.0) + (t9652 + (max(min(t9682, (t9617 + -1)), coordinates.min.2) * coordinates.stride.2))) + (max(min((d_samples.min.1 + d_samples.s1.x.min_1.s), (t9576 + -1)), coordinates.min.1) * coordinates.stride.1)) + (max(min(projected_coord.s1.r4$x, (t9618 + -1)), coordinates.min.3) * coordinates.stride.3))]) in (projected_coord[t9705] + (select((((((((t9701 || (((t9653 - d_samples.min.1) + d_samples.s1.r$x) <= d_samples.s1.x.min_1.s)) || t9693) || ((((t9623 - d_samples.min.2) - .__thread_id_y) + d_samples.s1.r$y) <= t9681)) || (projected_coord.s1.r4$x < projections.min.2)) || (t9624 <= projected_coord.s1.r4$x)) || t9706) || (t9587 <= projected_coord.s1.k)), 0.000000f, projections[(((max(min(((d_samples.min.1 + d_samples.s1.x.min_1.s) - d_samples.s1.r$x), (t9653 + -1)), projections.min.0) + (t9656 + (max(min((t9682 - d_samples.s1.r$y), (t9623 + -1)), projections.min.1) * projections.stride.1))) + (max(min(projected_coord.s1.k, (t9587 + -1)), projections.min.3) * projections.stride.3)) + (max(min(projected_coord.s1.r4$x, (t9624 + -1)), projections.min.2) * projections.stride.2))]) * select((projected_coord.s1.r4$x == 0), (((t8546 + t9702) + -0.500000f) / t9592), select((projected_coord.s1.r4$x == 1), (((t8546 + t9694) + -0.500000f) / t9592), t8546)))))
}
}
}
consume projected_coord
{
d_samples[((t9680 + d_samples.s1.s.min_1.s) + ((d_samples.min.1 + d_samples.s1.x.min_1.s) * d_samples.stride.1))] = (let t8551 = projected_coord[0] in (let t8552 = projected_coord[1] in (d_samples[(((t9666 + (t9682 * d_samples.stride.2)) + d_samples.s1.s.min_1.s) + ((d_samples.min.1 + d_samples.s1.x.min_1.s) * d_samples.stride.1))] + ((t9597 * exp_f32((((t8551 * t8551) + (t8552 * t8552)) * -0.500000f))) * select(((((((d_samples.s1.x.min_1.s < ((d_output.min.0 - d_samples.min.1) + d_samples.s1.r$x)) || (((t9657 - d_samples.min.1) + d_samples.s1.r$x) <= d_samples.s1.x.min_1.s)) || t9696) || ((((t9619 - d_samples.min.2) - .__thread_id_y) + d_samples.s1.r$y) <= t9681)) || (t9688 < d_output.min.2)) || (t9620 <= t9688)), 0.000000f, d_output[(max(min(((d_samples.min.1 + d_samples.s1.x.min_1.s) - d_samples.s1.r$x), (t9657 + -1)), d_output.min.0) + ((t9661 + (max(min(t9688, (t9620 + -1)), d_output.min.2) * d_output.stride.2)) + (max(min((t9682 - d_samples.s1.r$y), (t9619 + -1)), d_output.min.1) * d_output.stride.1)))])))))
}
free projected_coord
}
}
}
}
}
}
}
halide_profiler_incr_active_threads(profiler_state)
}

let t9729 = (max(min(d_samples.s1.n, t9590), projections.min.4) * projections.stride.4)

let t9730 = (d_samples.s1.n * d_output.stride.3)

let t9715 = (t9729 - t9591)

let t9711 = ((max(min(d_samples.s1.n, t9582), coordinates.min.4) * coordinates.stride.4) - t9583)

let t9720 = (t9730 - t9600)

let t9707 = (d_samples.s1.ci.epilogue - d_samples.s1.ci.prologue)

let t9728 = (t9615 + t9730)

let t9725 = (t9612 + t9729)

let t9717 = (t9596 + (d_samples.s1.n * d_samples.stride.4))

for (d_samples.s1.ci, d_samples.s1.ci.prologue, t9707)
{

let d_samples.s1.y.gpu_tile_y.__block_id_y.prologue = t9641

let d_samples.s1.y.gpu_tile_y.__block_id_y.epilogue = t9602

let t1361 = t9603

let t1362 = t9604

halide_profiler_decr_active_threads(profiler_state)

let t9738 = (t9717 + (d_samples.s1.ci * d_samples.stride.3))

gpu_block (d_samples.s1.y.gpu_tile_y.__block_id_y, 0, t9636)
{
gpu_block (d_samples.s1.x.x.gpu_tile_x.__block_id_x, 0, t9572)
{
gpu_thread (.__thread_id_y, 0, 16)
{
gpu_thread (.__thread_id_x, 0, 16)
{
if ((d_samples.s1.y.gpu_tile_y.__block_id_y < d_samples.s1.y.gpu_tile_y.__block_id_y.prologue))
{

let t9764 = (d_samples.s1.y.gpu_tile_y.__block_id_y * 16)

let t9765 = ((d_samples.min.2 + t9764) + .__thread_id_y)

let t9766 = ((d_samples.s1.x.x.gpu_tile_x.__block_id_x * 16) + .__thread_id_x)

let t9755 = (t9764 < (t9632 - .__thread_id_y))

let t9750 = (t9766 % t9574)

let t9751 = (t9766 / t9574)

let t9759 = ((projections.min.1 - d_samples.min.2) - .__thread_id_y)

let t9762 = ((d_output.min.1 - d_samples.min.2) - .__thread_id_y)

let t9763 = (t9738 + (t9765 * d_samples.stride.2))

let t9749 = (t9622 + 1)

let t9757 = (projections.min.0 + projections.extent.0)

let t9760 = (d_output.min.0 + d_output.extent.0)

for (d_samples.s1.r$z, 0, projections.extent.1)
{

let t9767 = (d_samples.s1.r$z * 2)

let t9772 = (t9720 + ((d_samples.s1.ci + (samples.extent.3 * d_samples.s1.r$z)) * d_output.stride.2))

for (d_samples.s1.r$y, t9749, d_samples.s1.r$y.loop_extent)
{

let t9779 = (t9764 < (t9762 + d_samples.s1.r$y))

let t9776 = (t9764 < (t9759 + d_samples.s1.r$y))

let t9777 = float32(d_samples.s1.r$y)

for (d_samples.s1.r$x, t9749, d_samples.s1.r$y.loop_extent)
{

let d_samples.s1.x.min_1.s = t9750

let d_samples.s1.s.min_1.s = t9751

allocate projected_coord[float32 * 2]
produce projected_coord
{
for (projected_coord.s0.k, t9767, 2)
{
projected_coord[(projected_coord.s0.k - t9767)] = 0.000000f
}

let t9782 = (d_samples.s1.x.min_1.s < (coordinates.min.1 - d_samples.min.1))

let t9784 = (d_samples.s1.x.min_1.s < ((projections.min.0 - d_samples.min.1) + d_samples.s1.r$x))

let t9781 = (d_samples.s1.s.min_1.s < (coordinates.min.0 - d_samples.min.0))

let t9785 = float32(d_samples.s1.r$x)

for (projected_coord.s1.k, t9767, 2)
{

let t9789 = (projected_coord.s1.k < projections.min.3)

let t9788 = (projected_coord.s1.k - t9767)

for (projected_coord.s1.r4$x, 0, coordinates.extent.3)
{
projected_coord[t9788] = (let t8570 = select((((((((t9781 || ((t9575 - d_samples.min.0) <= d_samples.s1.s.min_1.s)) || t9782) || ((t9576 - d_samples.min.1) <= d_samples.s1.x.min_1.s)) || t9755) || (((t9617 - d_samples.min.2) - .__thread_id_y) <= t9764)) || (projected_coord.s1.r4$x < coordinates.min.3)) || (t9618 <= projected_coord.s1.r4$x)), 0.000000f, coordinates[(((max(min((d_samples.min.0 + d_samples.s1.s.min_1.s), (t9575 + -1)), coordinates.min.0) + (t9711 + (max(min(t9765, (t9617 + -1)), coordinates.min.2) * coordinates.stride.2))) + (max(min((d_samples.min.1 + d_samples.s1.x.min_1.s), (t9576 + -1)), coordinates.min.1) * coordinates.stride.1)) + (max(min(projected_coord.s1.r4$x, (t9618 + -1)), coordinates.min.3) * coordinates.stride.3))]) in (projected_coord[t9788] + (select((((((((t9784 || (((t9757 - d_samples.min.1) + d_samples.s1.r$x) <= d_samples.s1.x.min_1.s)) || t9776) || ((((t9623 - d_samples.min.2) - .__thread_id_y) + d_samples.s1.r$y) <= t9764)) || (projected_coord.s1.r4$x < projections.min.2)) || (t9624 <= projected_coord.s1.r4$x)) || t9789) || (t9587 <= projected_coord.s1.k)), 0.000000f, projections[(((max(min(((d_samples.min.1 + d_samples.s1.x.min_1.s) - d_samples.s1.r$x), (t9757 + -1)), projections.min.0) + (t9715 + (max(min((t9765 - d_samples.s1.r$y), (t9623 + -1)), projections.min.1) * projections.stride.1))) + (max(min(projected_coord.s1.k, (t9587 + -1)), projections.min.3) * projections.stride.3)) + (max(min(projected_coord.s1.r4$x, (t9624 + -1)), projections.min.2) * projections.stride.2))]) * select((projected_coord.s1.r4$x == 0), (((t8570 + t9785) + -0.500000f) / t9592), select((projected_coord.s1.r4$x == 1), (((t8570 + t9777) + -0.500000f) / t9592), t8570)))))
}
}
}
consume projected_coord
{
d_samples[((t9763 + d_samples.s1.s.min_1.s) + ((d_samples.min.1 + d_samples.s1.x.min_1.s) * d_samples.stride.1))] = (let t8575 = projected_coord[0] in (let t8576 = projected_coord[1] in (d_samples[(((t9738 + (t9765 * d_samples.stride.2)) + d_samples.s1.s.min_1.s) + ((d_samples.min.1 + d_samples.s1.x.min_1.s) * d_samples.stride.1))] + ((t9597 * exp_f32((((t8575 * t8575) + (t8576 * t8576)) * -0.500000f))) * select(((((d_samples.s1.x.min_1.s < ((d_output.min.0 - d_samples.min.1) + d_samples.s1.r$x)) || (((t9760 - d_samples.min.1) + d_samples.s1.r$x) <= d_samples.s1.x.min_1.s)) || t9779) || ((((t9619 - d_samples.min.2) - .__thread_id_y) + d_samples.s1.r$y) <= t9764)), 0.000000f, d_output[(max(min(((d_samples.min.1 + d_samples.s1.x.min_1.s) - d_samples.s1.r$x), (t9760 + -1)), d_output.min.0) + (t9772 + (max(min((t9765 - d_samples.s1.r$y), (t9619 + -1)), d_output.min.1) * d_output.stride.1)))])))))
}
free projected_coord
}
}
}
}
else if ((d_samples.s1.y.gpu_tile_y.__block_id_y < d_samples.s1.y.gpu_tile_y.__block_id_y.epilogue))
{

let t9808 = (t9622 + d_samples.s1.r$y.loop_extent)

let t9809 = ((d_samples.min.2 + (d_samples.s1.y.gpu_tile_y.__block_id_y * 16)) + .__thread_id_y)

let t9810 = ((d_samples.s1.x.x.gpu_tile_x.__block_id_x * 16) + .__thread_id_x)

let t9811 = (t9810 % t9574)

let t9812 = min(max((max((t9633 - d_output.extent.0), (t9634 - projections.extent.0)) + t9811), t9622), (d_samples.s1.r$y.loop_extent + t9622))

let t9792 = max(min((min(t9633, t9634) + t9811), t9808), t9812)

let t9794 = (t9810 / t9574)

let t9802 = (t9738 + (t9809 * d_samples.stride.2))

let t9798 = (projections.min.0 + projections.extent.0)

let t9800 = (d_output.min.0 + d_output.extent.0)

for (d_samples.s1.r$z, 0, projections.extent.1)
{

let t9828 = ((d_samples.s1.ci + (samples.extent.3 * d_samples.s1.r$z)) * d_output.stride.2)

let t9829 = (d_samples.s1.r$z * 2)

let t9830 = (t9829 + 2)

let t9831 = max(projections.min.3, t9829)

let t9821 = min(max(t9587, t9831), t9830)

let t9820 = min(t9831, t9830)

let t9819 = (t9720 + t9828)

for (d_samples.s1.r$y, (t9622 + 1), d_samples.s1.r$y.loop_extent)
{

let d_samples.s1.r$x.prologue.s = t9812

let d_samples.s1.r$x.epilogue.s = t9792

let t9833 = (d_samples.s1.r$x.prologue.s - t9622)

let t9832 = (t9622 + 1)

let t9837 = float32(d_samples.s1.r$y)

for (d_samples.s1.r$x, t9832, t9833)
{

let d_samples.s1.x.min_1.s = t9811

let d_samples.s1.s.min_1.s = t9794

allocate projected_coord[float32 * 2]
produce projected_coord
{
for (projected_coord.s0.k, t9829, 2)
{
projected_coord[(projected_coord.s0.k - t9829)] = 0.000000f
}

let t9841 = (d_samples.s1.x.min_1.s < (coordinates.min.1 - d_samples.min.1))

let t9843 = (d_samples.s1.x.min_1.s < ((projections.min.0 - d_samples.min.1) + d_samples.s1.r$x))

let t9840 = (d_samples.s1.s.min_1.s < (coordinates.min.0 - d_samples.min.0))

let t9844 = float32(d_samples.s1.r$x)

for (projected_coord.s1.k, t9829, 2)
{

let t9848 = (projected_coord.s1.k < projections.min.3)

let t9847 = (projected_coord.s1.k - t9829)

for (projected_coord.s1.r4$x, 0, coordinates.extent.3)
{
projected_coord[t9847] = (let t8594 = select((((((t9840 || ((t9575 - d_samples.min.0) <= d_samples.s1.s.min_1.s)) || t9841) || ((t9576 - d_samples.min.1) <= d_samples.s1.x.min_1.s)) || (projected_coord.s1.r4$x < coordinates.min.3)) || (t9618 <= projected_coord.s1.r4$x)), 0.000000f, coordinates[(((max(min((d_samples.min.0 + d_samples.s1.s.min_1.s), (t9575 + -1)), coordinates.min.0) + (t9711 + (t9809 * coordinates.stride.2))) + (max(min((d_samples.min.1 + d_samples.s1.x.min_1.s), (t9576 + -1)), coordinates.min.1) * coordinates.stride.1)) + (max(min(projected_coord.s1.r4$x, (t9618 + -1)), coordinates.min.3) * coordinates.stride.3))]) in (projected_coord[t9847] + (select((((((t9843 || (((t9798 - d_samples.min.1) + d_samples.s1.r$x) <= d_samples.s1.x.min_1.s)) || (projected_coord.s1.r4$x < projections.min.2)) || (t9624 <= projected_coord.s1.r4$x)) || t9848) || (t9587 <= projected_coord.s1.k)), 0.000000f, projections[(((max(min(((d_samples.min.1 + d_samples.s1.x.min_1.s) - d_samples.s1.r$x), (t9798 + -1)), projections.min.0) + (t9715 + ((t9809 - d_samples.s1.r$y) * projections.stride.1))) + (max(min(projected_coord.s1.k, (t9587 + -1)), projections.min.3) * projections.stride.3)) + (max(min(projected_coord.s1.r4$x, (t9624 + -1)), projections.min.2) * projections.stride.2))]) * select((projected_coord.s1.r4$x == 0), (((t8594 + t9844) + -0.500000f) / t9592), select((projected_coord.s1.r4$x == 1), (((t8594 + t9837) + -0.500000f) / t9592), t8594)))))
}
}
}
consume projected_coord
{
d_samples[((t9802 + d_samples.s1.s.min_1.s) + ((d_samples.min.1 + d_samples.s1.x.min_1.s) * d_samples.stride.1))] = (let t8598 = projected_coord[0] in (let t8599 = projected_coord[1] in (d_samples[(((t9738 + (t9809 * d_samples.stride.2)) + d_samples.s1.s.min_1.s) + ((d_samples.min.1 + d_samples.s1.x.min_1.s) * d_samples.stride.1))] + ((t9597 * exp_f32((((t8598 * t8598) + (t8599 * t8599)) * -0.500000f))) * select(((d_samples.s1.x.min_1.s < ((d_output.min.0 - d_samples.min.1) + d_samples.s1.r$x)) || (((t9800 - d_samples.min.1) + d_samples.s1.r$x) <= d_samples.s1.x.min_1.s)), 0.000000f, d_output[(max(min(((d_samples.min.1 + d_samples.s1.x.min_1.s) - d_samples.s1.r$x), (t9800 + -1)), d_output.min.0) + (t9819 + ((t9809 - d_samples.s1.r$y) * d_output.stride.1)))])))))
}
free projected_coord
}

let t9850 = (d_samples.s1.r$x.epilogue.s - d_samples.s1.r$x.prologue.s)

let t9849 = (d_samples.s1.r$x.prologue.s + 1)

let t9853 = float32(d_samples.s1.r$y)

for (d_samples.s1.r$x, t9849, t9850)
{

let d_samples.s1.x.min_1.s = t9811

let d_samples.s1.s.min_1.s = t9794

allocate projected_coord[float32 * 2]
produce projected_coord
{
for (projected_coord.s0.k, t9829, 2)
{
projected_coord[(projected_coord.s0.k - t9829)] = 0.000000f
}

let projected_coord.s1.k.prologue = t9820

let projected_coord.s1.k.epilogue = t9821

let t9860 = (d_samples.s1.x.min_1.s < (coordinates.min.1 - d_samples.min.1))

let t9859 = (d_samples.s1.s.min_1.s < (coordinates.min.0 - d_samples.min.0))

let t9858 = (projected_coord.s1.k.prologue - t9829)

let t9863 = (t9725 + d_samples.s1.x.min_1.s)

let t9864 = float32(d_samples.s1.r$x)

for (projected_coord.s1.k, t9829, t9858)
{

let t9868 = (projected_coord.s1.k < projections.min.3)

let t9867 = (projected_coord.s1.k - t9829)

for (projected_coord.s1.r4$x, 0, coordinates.extent.3)
{
projected_coord[t9867] = (let t8607 = select((((((t9859 || ((t9575 - d_samples.min.0) <= d_samples.s1.s.min_1.s)) || t9860) || ((t9576 - d_samples.min.1) <= d_samples.s1.x.min_1.s)) || (projected_coord.s1.r4$x < coordinates.min.3)) || (t9618 <= projected_coord.s1.r4$x)), 0.000000f, coordinates[(((max(min((d_samples.min.0 + d_samples.s1.s.min_1.s), (t9575 + -1)), coordinates.min.0) + (t9711 + (t9809 * coordinates.stride.2))) + (max(min((d_samples.min.1 + d_samples.s1.x.min_1.s), (t9576 + -1)), coordinates.min.1) * coordinates.stride.1)) + (max(min(projected_coord.s1.r4$x, (t9618 + -1)), coordinates.min.3) * coordinates.stride.3))]) in (projected_coord[t9867] + (select(((((projected_coord.s1.r4$x < projections.min.2) || (t9624 <= projected_coord.s1.r4$x)) || t9868) || (t9587 <= projected_coord.s1.k)), 0.000000f, projections[((((t9863 + ((t9809 - d_samples.s1.r$y) * projections.stride.1)) - d_samples.s1.r$x) + (max(min(projected_coord.s1.k, (t9587 + -1)), projections.min.3) * projections.stride.3)) + (max(min(projected_coord.s1.r4$x, (t9624 + -1)), projections.min.2) * projections.stride.2))]) * select((projected_coord.s1.r4$x == 0), (((t8607 + t9864) + -0.500000f) / t9592), select((projected_coord.s1.r4$x == 1), (((t8607 + t9853) + -0.500000f) / t9592), t8607)))))
}
}

let t9871 = (d_samples.s1.x.min_1.s <