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

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
double exp(double);
double sqrt(double);
double g0(double a, double *p) {
  return (a - 4.0 +
          (p[25] - 1.0) * (a - 4.0 +
                           (exp(-sqrt(p[24] * p[24]) * (a - 4.0)) - 1.0) /
                               sqrt(p[24] * p[24])));
}


x86 assembly (clang, -O0):
<g0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeca(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movsd  0xc8(%rax),%xmm0
movsd  0xea5(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xe97(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x10(%rbp),%rax
movsd  0xc0(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0xc0(%rax),%xmm0
call   1040 <sqrt@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0xe4d(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
movsd  0xe30(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x10(%rbp),%rax
movsd  0xc0(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0xc0(%rax),%xmm0
call   1040 <sqrt@plt>
movsd  -0x30(%rbp),%xmm3
movsd  -0x28(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm1
movaps %xmm0,%xmm4
movsd  -0x18(%rbp),%xmm0
divsd  %xmm4,%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g0>:
push   %rbx
sub    $0x20,%rsp
mov    %rdi,%rbx
addsd  0xed0(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0xc0(%rdi),%xmm0
movsd  0xc8(%rdi),%xmm1
mulsd  %xmm0,%xmm0
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm0
jb     115a <g0+0x3a>
sqrtsd %xmm0,%xmm0
jmp    116b <g0+0x4b>
movsd  %xmm1,0x8(%rsp)
call   1040 <sqrt@plt>
movsd  0x8(%rsp),%xmm1
addsd  0xe95(%rip),%xmm1
movsd  %xmm1,0x8(%rsp)
xorpd  0xe9f(%rip),%xmm0
mulsd  0x10(%rsp),%xmm0
call   1030 <exp@plt>
movapd %xmm0,%xmm2
addsd  0xe70(%rip),%xmm2
movsd  0xc0(%rbx),%xmm0
mulsd  %xmm0,%xmm0
ucomisd 0xe64(%rip),%xmm0
jb     11b4 <g0+0x94>
sqrtsd %xmm0,%xmm0
jmp    11c5 <g0+0xa5>
movsd  %xmm2,0x18(%rsp)
call   1040 <sqrt@plt>
movsd  0x18(%rsp),%xmm2
divsd  %xmm0,%xmm2
movsd  0x10(%rsp),%xmm1
addsd  %xmm1,%xmm2
movsd  0x8(%rsp),%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @g0(double %0, double* %1) {
%3 = alloca double
%4 = alloca double*
store double %0, double* %3
store double* %1, double** %4
%5 = load double, double* %3
%6 = fsub double %5, 4.000000e+00
%7 = load double*, double** %4
%8 = getelementptr inbounds double, double* %7, i64 25
%9 = load double, double* %8
%10 = fsub double %9, 1.000000e+00
%11 = load double, double* %3
%12 = fsub double %11, 4.000000e+00
%13 = load double*, double** %4
%14 = getelementptr inbounds double, double* %13, i64 24
%15 = load double, double* %14
%16 = load double*, double** %4
%17 = getelementptr inbounds double, double* %16, i64 24
%18 = load double, double* %17
%19 = fmul double %15, %18
%20 = call double @sqrt(double %19)
%21 = fneg double %20
%22 = load double, double* %3
%23 = fsub double %22, 4.000000e+00
%24 = fmul double %21, %23
%25 = call double @exp(double %24)
%26 = fsub double %25, 1.000000e+00
%27 = load double*, double** %4
%28 = getelementptr inbounds double, double* %27, i64 24
%29 = load double, double* %28
%30 = load double*, double** %4
%31 = getelementptr inbounds double, double* %30, i64 24
%32 = load double, double* %31
%33 = fmul double %29, %32
%34 = call double @sqrt(double %33)
%35 = fdiv double %26, %34
%36 = fadd double %12, %35
%37 = call double @llvm.fmuladd.f64(double %10, double %36, double %6)
ret double %37
}

LLVM IR (-O2):
define double @g0(double %0, double* nocapture %1) {
%3 = fadd double %0, -4.000000e+00
%4 = getelementptr inbounds double, double* %1, i64 25
%5 = load double, double* %4
%6 = fadd double %5, -1.000000e+00
%7 = getelementptr inbounds double, double* %1, i64 24
%8 = load double, double* %7
%9 = fmul double %8, %8
%10 = tail call double @sqrt(double %9)
%11 = fneg double %10
%12 = fmul double %3, %11
%13 = tail call double @exp(double %12)
%14 = fadd double %13, -1.000000e+00
%15 = load double, double* %7
%16 = fmul double %15, %15
%17 = tail call double @sqrt(double %16)
%18 = fdiv double %14, %17
%19 = fadd double %3, %18
%20 = tail call double @llvm.fmuladd.f64(double %6, double %19, double %3)
ret double %20
}