#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
double measure_plaquette_sf_weights_boundary_0();
double measure_plaquette_sf_weights_boundary_t(int);
double measure_plaquette_sf_weights_bulk(int);
double measure_wilson_action_sf_separate_boundary(int t, double beta) {
  double plaquette;
  double wilson;
  plaquette = measure_plaquette_sf_weights_bulk(t) +
              measure_plaquette_sf_weights_boundary_0() +
              measure_plaquette_sf_weights_boundary_t(t);
  wilson = -(beta / (2. * 3.)) * plaquette;
  return wilson;
}


x86 assembly (clang, -O0):
<measure_wilson_action_sf_separate_boundary>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <measure_plaquette_sf_weights_bulk@plt>
movsd  %xmm0,-0x30(%rbp)
mov    $0x0,%al
call   1050 <measure_plaquette_sf_weights_boundary_0@plt>
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <measure_plaquette_sf_weights_boundary_t@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xe75(%rip),%xmm1
divsd  %xmm1,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<measure_wilson_action_sf_separate_boundary>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,0x8(%rsp)
mov    %edi,%ebx
call   1040 <measure_plaquette_sf_weights_bulk@plt>
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1050 <measure_plaquette_sf_weights_boundary_0@plt>
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
mov    %ebx,%edi
call   1030 <measure_plaquette_sf_weights_boundary_t@plt>
addsd  (%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
divsd  0xe8e(%rip),%xmm1
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @measure_wilson_action_sf_separate_boundary(i32 %0, double %1) {
%3 = alloca i32
%4 = alloca double
%5 = alloca double
%6 = alloca double
store i32 %0, i32* %3
store double %1, double* %4
%7 = load i32, i32* %3
%8 = call double @measure_plaquette_sf_weights_bulk(i32 %7)
%9 = call double (...) @measure_plaquette_sf_weights_boundary_0()
%10 = fadd double %8, %9
%11 = load i32, i32* %3
%12 = call double @measure_plaquette_sf_weights_boundary_t(i32 %11)
%13 = fadd double %10, %12
store double %13, double* %5
%14 = load double, double* %4
%15 = fdiv double %14, 6.000000e+00
%16 = fneg double %15
%17 = load double, double* %5
%18 = fmul double %16, %17
store double %18, double* %6
%19 = load double, double* %6
ret double %19
}

LLVM IR (-O2):
define double @measure_wilson_action_sf_separate_boundary(i32 %0, double %1) {
%3 = tail call double @measure_plaquette_sf_weights_bulk(i32 %0)
%4 = tail call double (...) @measure_plaquette_sf_weights_boundary_0()
%5 = fadd double %3, %4
%6 = tail call double @measure_plaquette_sf_weights_boundary_t(i32 %0)
%7 = fadd double %5, %6
%8 = fdiv double %1, -6.000000e+00
%9 = fmul double %8, %7
ret double %9
}