#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 pow(double, int);
double laplacian_u(double (*u)(double x, double y), double h, double x,
                   double y) {
  return (
      (4 * u(x, y) - (u(x + h, y) + u(x - h, y) + u(x, y + h) + u(x, y - h))) *
      pow(h, -2));
}


x86 assembly (clang, -O0):
<laplacian_u>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
call   *%rax
movsd  %xmm0,-0x30(%rbp)
mov    -0x8(%rbp),%rax
movsd  -0x18(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
call   *%rax
movsd  %xmm0,-0x48(%rbp)
mov    -0x8(%rbp),%rax
movsd  -0x18(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
call   *%rax
movaps %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x8(%rbp),%rax
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
addsd  -0x10(%rbp),%xmm1
call   *%rax
movaps %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x8(%rbp),%rax
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
call   *%rax
movsd  -0x38(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x30(%rbp),%xmm0
addsd  %xmm2,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xe15(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    $0xfffffffe,%edi
call   1030 <pow@plt>
movsd  -0x28(%rbp),%xmm0
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<laplacian_u>:
push   %rbx
sub    $0x30,%rsp
movsd  %xmm2,0x18(%rsp)
movsd  %xmm1,0x20(%rsp)
movsd  %xmm0,0x10(%rsp)
mov    %rdi,%rbx
movaps %xmm1,%xmm0
movaps %xmm2,%xmm1
call   *%rdi
movsd  %xmm0,0x28(%rsp)
movsd  0x10(%rsp),%xmm0
addsd  0x20(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
call   *%rbx
movsd  %xmm0,0x8(%rsp)
movsd  0x20(%rsp),%xmm0
subsd  0x10(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
call   *%rbx
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm1
addsd  0x18(%rsp),%xmm1
movsd  0x20(%rsp),%xmm0
call   *%rbx
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x18(%rsp),%xmm1
subsd  0x10(%rsp),%xmm1
movsd  0x20(%rsp),%xmm0
call   *%rbx
addsd  0x8(%rsp),%xmm0
movsd  0x28(%rsp),%xmm1
mulsd  0xe46(%rip),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x28(%rsp)
movsd  0x10(%rsp),%xmm0
mov    $0xfffffffe,%edi
call   1030 <pow@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x28(%rsp),%xmm0
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @laplacian_u(double (double, double)* %0, double %1, double %2, double %3) {
%5 = alloca double (double, double)*
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double (double, double)* %0, double (double, double)** %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double (double, double)*, double (double, double)** %5
%10 = load double, double* %7
%11 = load double, double* %8
%12 = call double %9(double %10, double %11)
%13 = load double (double, double)*, double (double, double)** %5
%14 = load double, double* %7
%15 = load double, double* %6
%16 = fadd double %14, %15
%17 = load double, double* %8
%18 = call double %13(double %16, double %17)
%19 = load double (double, double)*, double (double, double)** %5
%20 = load double, double* %7
%21 = load double, double* %6
%22 = fsub double %20, %21
%23 = load double, double* %8
%24 = call double %19(double %22, double %23)
%25 = fadd double %18, %24
%26 = load double (double, double)*, double (double, double)** %5
%27 = load double, double* %7
%28 = load double, double* %8
%29 = load double, double* %6
%30 = fadd double %28, %29
%31 = call double %26(double %27, double %30)
%32 = fadd double %25, %31
%33 = load double (double, double)*, double (double, double)** %5
%34 = load double, double* %7
%35 = load double, double* %8
%36 = load double, double* %6
%37 = fsub double %35, %36
%38 = call double %33(double %34, double %37)
%39 = fadd double %32, %38
%40 = fneg double %39
%41 = call double @llvm.fmuladd.f64(double 4.000000e+00, double %12, double %40)
%42 = load double, double* %6
%43 = call i32 @pow(double %42, i32 -2)
%44 = sitofp i32 %43 to double
%45 = fmul double %41, %44
ret double %45
}

LLVM IR (-O2):
define double @laplacian_u(double (double, double)* nocapture %0, double %1, double %2, double %3) {
%5 = tail call double %0(double %2, double %3)
%6 = fadd double %1, %2
%7 = tail call double %0(double %6, double %3)
%8 = fsub double %2, %1
%9 = tail call double %0(double %8, double %3)
%10 = fadd double %7, %9
%11 = fadd double %1, %3
%12 = tail call double %0(double %2, double %11)
%13 = fadd double %10, %12
%14 = fsub double %3, %1
%15 = tail call double %0(double %2, double %14)
%16 = fadd double %13, %15
%17 = fneg double %16
%18 = tail call double @llvm.fmuladd.f64(double %5, double 4.000000e+00, double %17)
%19 = tail call i32 @pow(double %1, i32 -2)
%20 = sitofp i32 %19 to double
%21 = fmul double %18, %20
ret double %21
}