#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 */
int /*<<< orphan*/ add_source(int, float *, float *, float);
int /*<<< orphan*/ advect(int, int, float *, float *, float *, float *, float *,
                          float);
int /*<<< orphan*/ diffuse(int, int, float *, float *, float, float);
int /*<<< orphan*/ project(int, float *, float *, float *, float *, float *);
void get_velocity(int N, float *velocity_u, float *velocity_v,
                  float *velocity_w, float *velocity_u_prev,
                  float *velocity_v_prev, float *velocity_w_prev, float visc,
                  float dt) {
  add_source(N, velocity_u, velocity_u_prev, dt);
  add_source(N, velocity_v, velocity_v_prev, dt);
  add_source(N, velocity_w, velocity_w_prev, dt);
  {
    float *tmp = velocity_u_prev;
    velocity_u_prev = velocity_u;
    velocity_u = tmp;
  };
  {
    float *tmp = velocity_v_prev;
    velocity_v_prev = velocity_v;
    velocity_v = tmp;
  };
  {
    float *tmp = velocity_w_prev;
    velocity_w_prev = velocity_w;
    velocity_w = tmp;
  };
  diffuse(N, 1, velocity_u, velocity_u_prev, visc, dt);
  diffuse(N, 2, velocity_v, velocity_v_prev, visc, dt);
  diffuse(N, 3, velocity_w, velocity_w_prev, visc, dt);
  project(N, velocity_u, velocity_v, velocity_w, velocity_u_prev,
          velocity_v_prev);
  {
    float *tmp = velocity_u_prev;
    velocity_u_prev = velocity_u;
    velocity_u = tmp;
  };
  {
    float *tmp = velocity_v_prev;
    velocity_v_prev = velocity_v;
    velocity_v = tmp;
  };
  {
    float *tmp = velocity_w_prev;
    velocity_w_prev = velocity_w;
    velocity_w = tmp;
  };
  advect(N, 1, velocity_u, velocity_u_prev, velocity_u_prev, velocity_v_prev,
         velocity_w_prev, dt);
  advect(N, 2, velocity_v, velocity_v_prev, velocity_u_prev, velocity_v_prev,
         velocity_w_prev, dt);
  advect(N, 3, velocity_w, velocity_w_prev, velocity_u_prev, velocity_v_prev,
         velocity_w_prev, dt);
  project(N, velocity_u, velocity_v, velocity_w, velocity_u_prev,
          velocity_v_prev);
}


x86 assembly (clang, -O0):
<get_velocity>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movss  %xmm0,-0x34(%rbp)
movss  %xmm1,-0x38(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x28(%rbp),%rdx
movss  -0x38(%rbp),%xmm0
call   1030 <add_source@plt>
mov    -0x4(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    -0x30(%rbp),%rdx
movss  -0x38(%rbp),%xmm0
call   1030 <add_source@plt>
mov    -0x4(%rbp),%edi
mov    -0x20(%rbp),%rsi
mov    0x10(%rbp),%rdx
movss  -0x38(%rbp),%xmm0
call   1030 <add_source@plt>
mov    -0x28(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x48(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    0x10(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,0x10(%rbp)
mov    -0x50(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    -0x28(%rbp),%rcx
movss  -0x34(%rbp),%xmm0
movss  -0x38(%rbp),%xmm1
mov    $0x1,%esi
call   1060 <diffuse@plt>
mov    -0x4(%rbp),%edi
mov    -0x18(%rbp),%rdx
mov    -0x30(%rbp),%rcx
movss  -0x34(%rbp),%xmm0
movss  -0x38(%rbp),%xmm1
mov    $0x2,%esi
call   1060 <diffuse@plt>
mov    -0x4(%rbp),%edi
mov    -0x20(%rbp),%rdx
mov    0x10(%rbp),%rcx
movss  -0x34(%rbp),%xmm0
movss  -0x38(%rbp),%xmm1
mov    $0x3,%esi
call   1060 <diffuse@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
call   1050 <project@plt>
mov    -0x28(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x58(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x60(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    0x10(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,0x10(%rbp)
mov    -0x68(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
mov    0x10(%rbp),%rax
movss  -0x38(%rbp),%xmm0
mov    $0x1,%esi
mov    %rax,(%rsp)
call   1040 <advect@plt>
mov    -0x4(%rbp),%edi
mov    -0x18(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
mov    0x10(%rbp),%rax
movss  -0x38(%rbp),%xmm0
mov    $0x2,%esi
mov    %rax,(%rsp)
call   1040 <advect@plt>
mov    -0x4(%rbp),%edi
mov    -0x20(%rbp),%rdx
mov    0x10(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
mov    0x10(%rbp),%rax
movss  -0x38(%rbp),%xmm0
mov    $0x3,%esi
mov    %rax,(%rsp)
call   1040 <advect@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
call   1050 <project@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_velocity>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
movss  %xmm1,0x10(%rsp)
movss  %xmm0,0x14(%rsp)
mov    %r9,%r14
mov    %r8,%r13
mov    %rcx,%rbx
mov    %rcx,0x20(%rsp)
mov    %rdx,%r12
mov    %rsi,0x18(%rsp)
mov    %edi,%ebp
mov    0x60(%rsp),%r15
mov    %r8,%rdx
movaps %xmm1,%xmm0
call   1030 <add_source@plt>
mov    %ebp,%edi
mov    %r12,%rsi
mov    %r14,%rdx
movss  0x10(%rsp),%xmm0
call   1030 <add_source@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r15,%rdx
movss  0x10(%rsp),%xmm0
call   1030 <add_source@plt>
mov    %ebp,%edi
mov    $0x1,%esi
mov    %r13,%rdx
mov    0x18(%rsp),%rbx
mov    %rbx,%rcx
movss  0x14(%rsp),%xmm0
movss  0x10(%rsp),%xmm1
call   1060 <diffuse@plt>
mov    %ebp,%edi
mov    $0x2,%esi
mov    %r14,%rdx
mov    %r12,%rcx
movss  0x14(%rsp),%xmm0
movss  0x10(%rsp),%xmm1
call   1060 <diffuse@plt>
mov    %ebp,%edi
mov    $0x3,%esi
mov    %r15,%rdx
mov    0x20(%rsp),%rcx
movss  0x14(%rsp),%xmm0
movss  0x10(%rsp),%xmm1
call   1060 <diffuse@plt>
mov    %ebp,%edi
mov    %r13,%rsi
mov    %r14,%rdx
mov    %r15,%rcx
mov    %rbx,%r8
mov    %r12,%r9
call   1050 <project@plt>
mov    %r15,(%rsp)
mov    %ebp,%edi
mov    $0x1,%esi
mov    %rbx,%rdx
mov    %r13,%rcx
mov    %r13,%r8
mov    %r14,%r9
movss  0x10(%rsp),%xmm0
call   1040 <advect@plt>
mov    %r15,(%rsp)
mov    %ebp,%edi
mov    $0x2,%esi
mov    %r12,%rdx
mov    %r14,%rcx
mov    %r13,%r8
mov    %r14,%r9
movss  0x10(%rsp),%xmm0
call   1040 <advect@plt>
mov    %r15,(%rsp)
mov    %ebp,%edi
mov    $0x3,%esi
mov    0x20(%rsp),%rbx
mov    %rbx,%rdx
mov    %r15,%rcx
mov    %r13,%r8
mov    %r14,%r9
movss  0x10(%rsp),%xmm0
call   1040 <advect@plt>
mov    %ebp,%edi
mov    0x18(%rsp),%rsi
mov    %r12,%rdx
mov    %rbx,%rcx
mov    %r13,%r8
mov    %r14,%r9
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <project@plt>

LLVM IR (-O0):
define void @get_velocity(i32 %0, float* %1, float* %2, float* %3, float* %4, float* %5, float* %6, float %7, float %8) {
%10 = alloca i32
%11 = alloca float*
%12 = alloca float*
%13 = alloca float*
%14 = alloca float*
%15 = alloca float*
%16 = alloca float*
%17 = alloca float
%18 = alloca float
%19 = alloca float*
%20 = alloca float*
%21 = alloca float*
%22 = alloca float*
%23 = alloca float*
%24 = alloca float*
store i32 %0, i32* %10
store float* %1, float** %11
store float* %2, float** %12
store float* %3, float** %13
store float* %4, float** %14
store float* %5, float** %15
store float* %6, float** %16
store float %7, float* %17
store float %8, float* %18
%25 = load i32, i32* %10
%26 = load float*, float** %11
%27 = load float*, float** %14
%28 = load float, float* %18
%29 = call i32 @add_source(i32 %25, float* %26, float* %27, float %28)
%30 = load i32, i32* %10
%31 = load float*, float** %12
%32 = load float*, float** %15
%33 = load float, float* %18
%34 = call i32 @add_source(i32 %30, float* %31, float* %32, float %33)
%35 = load i32, i32* %10
%36 = load float*, float** %13
%37 = load float*, float** %16
%38 = load float, float* %18
%39 = call i32 @add_source(i32 %35, float* %36, float* %37, float %38)
%40 = load float*, float** %14
store float* %40, float** %19
%41 = load float*, float** %11
store float* %41, float** %14
%42 = load float*, float** %19
store float* %42, float** %11
%43 = load float*, float** %15
store float* %43, float** %20
%44 = load float*, float** %12
store float* %44, float** %15
%45 = load float*, float** %20
store float* %45, float** %12
%46 = load float*, float** %16
store float* %46, float** %21
%47 = load float*, float** %13
store float* %47, float** %16
%48 = load float*, float** %21
store float* %48, float** %13
%49 = load i32, i32* %10
%50 = load float*, float** %11
%51 = load float*, float** %14
%52 = load float, float* %17
%53 = load float, float* %18
%54 = call i32 @diffuse(i32 %49, i32 1, float* %50, float* %51, float %52, float %53)
%55 = load i32, i32* %10
%56 = load float*, float** %12
%57 = load float*, float** %15
%58 = load float, float* %17
%59 = load float, float* %18
%60 = call i32 @diffuse(i32 %55, i32 2, float* %56, float* %57, float %58, float %59)
%61 = load i32, i32* %10
%62 = load float*, float** %13
%63 = load float*, float** %16
%64 = load float, float* %17
%65 = load float, float* %18
%66 = call i32 @diffuse(i32 %61, i32 3, float* %62, float* %63, float %64, float %65)
%67 = load i32, i32* %10
%68 = load float*, float** %11
%69 = load float*, float** %12
%70 = load float*, float** %13
%71 = load float*, float** %14
%72 = load float*, float** %15
%73 = call i32 @project(i32 %67, float* %68, float* %69, float* %70, float* %71, float* %72)
%74 = load float*, float** %14
store float* %74, float** %22
%75 = load float*, float** %11
store float* %75, float** %14
%76 = load float*, float** %22
store float* %76, float** %11
%77 = load float*, float** %15
store float* %77, float** %23
%78 = load float*, float** %12
store float* %78, float** %15
%79 = load float*, float** %23
store float* %79, float** %12
%80 = load float*, float** %16
store float* %80, float** %24
%81 = load float*, float** %13
store float* %81, float** %16
%82 = load float*, float** %24
store float* %82, float** %13
%83 = load i32, i32* %10
%84 = load float*, float** %11
%85 = load float*, float** %14
%86 = load float*, float** %14
%87 = load float*, float** %15
%88 = load float*, float** %16
%89 = load float, float* %18
%90 = call i32 @advect(i32 %83, i32 1, float* %84, float* %85, float* %86, float* %87, float* %88, float %89)
%91 = load i32, i32* %10
%92 = load float*, float** %12
%93 = load float*, float** %15
%94 = load float*, float** %14
%95 = load float*, float** %15
%96 = load float*, float** %16
%97 = load float, float* %18
%98 = call i32 @advect(i32 %91, i32 2, float* %92, float* %93, float* %94, float* %95, float* %96, float %97)
%99 = load i32, i32* %10
%100 = load float*, float** %13
%101 = load float*, float** %16
%102 = load float*, float** %14
%103 = load float*, float** %15
%104 = load float*, float** %16
%105 = load float, float* %18
%106 = call i32 @advect(i32 %99, i32 3, float* %100, float* %101, float* %102, float* %103, float* %104, float %105)
%107 = load i32, i32* %10
%108 = load float*, float** %11
%109 = load float*, float** %12
%110 = load float*, float** %13
%111 = load float*, float** %14
%112 = load float*, float** %15
%113 = call i32 @project(i32 %107, float* %108, float* %109, float* %110, float* %111, float* %112)
ret void
}

LLVM IR (-O2):
define void @get_velocity(i32 %0, float* %1, float* %2, float* %3, float* %4, float* %5, float* %6, float %7, float %8) {
%10 = tail call i32 @add_source(i32 %0, float* %1, float* %4, float %8)
%11 = tail call i32 @add_source(i32 %0, float* %2, float* %5, float %8)
%12 = tail call i32 @add_source(i32 %0, float* %3, float* %6, float %8)
%13 = tail call i32 @diffuse(i32 %0, i32 1, float* %4, float* %1, float %7, float %8)
%14 = tail call i32 @diffuse(i32 %0, i32 2, float* %5, float* %2, float %7, float %8)
%15 = tail call i32 @diffuse(i32 %0, i32 3, float* %6, float* %3, float %7, float %8)
%16 = tail call i32 @project(i32 %0, float* %4, float* %5, float* %6, float* %1, float* %2)
%17 = tail call i32 @advect(i32 %0, i32 1, float* %1, float* %4, float* %4, float* %5, float* %6, float %8)
%18 = tail call i32 @advect(i32 %0, i32 2, float* %2, float* %5, float* %4, float* %5, float* %6, float %8)
%19 = tail call i32 @advect(i32 %0, i32 3, float* %3, float* %6, float* %4, float* %5, float* %6, float %8)
%20 = tail call i32 @project(i32 %0, float* %1, float* %2, float* %3, float* %4, float* %5)
ret void
}