#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*/ free(char *);
scalar_t__ malloc(int);
int /*<<< orphan*/ memcpy(char *, char *, int);
int /*<<< orphan*/ run_guided_hmc(int, double *, double, int, double *, char *,
                                  int, int, int,
                                  void (*)(int *, double *, double *, double *),
                                  void (*)(int *, double *, double *, double *),
                                  int, int);
char *strchr(char *, char);
void run_guided_hmc_(int *num_dim, double *start_point, double *dim_scale_fact,
                     int *max_steps, double *step_sizes, char *file_prefix_f,
                     int *seed, int *resume, int *feedback_int,
                     void (*neg_logpost)(int *, double *, double *, double *),
                     void (*write_extract)(int *, double *, double *, double *),
                     int *nburn, int *nsamp) {
  char *file_prefix_c;
  char *pch;
  int length;
  pch = strchr(file_prefix_f, ' ');
  length = (int)(pch - file_prefix_f);
  file_prefix_c = (char *)malloc((length + 32) * sizeof(char));
  memcpy(file_prefix_c, file_prefix_f, length * sizeof(char));
  run_guided_hmc(*num_dim, start_point, *dim_scale_fact, *max_steps, step_sizes,
                 file_prefix_c, *seed, *resume, *feedback_int, neg_logpost,
                 write_extract, *nburn, *nsamp);
  free(file_prefix_c);
}


x86 assembly (clang, -O0):
<run_guided_hmc_>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %rbx
sub    $0x78,%rsp
mov    0x40(%rbp),%rax
mov    0x38(%rbp),%rax
mov    0x30(%rbp),%rax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x28(%rbp)
mov    %rdx,-0x30(%rbp)
mov    %rcx,-0x38(%rbp)
mov    %r8,-0x40(%rbp)
mov    %r9,-0x48(%rbp)
mov    -0x48(%rbp),%rdi
mov    $0x20,%esi
call   1040 <strchr@plt>
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rax
mov    -0x48(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
add    $0x20,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rdi
mov    -0x48(%rbp),%rsi
movslq -0x5c(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edx
call   1050 <memcpy@plt>
mov    -0x20(%rbp),%rax
mov    (%rax),%edi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x38(%rbp),%rax
mov    (%rax),%edx
mov    -0x40(%rbp),%rcx
mov    -0x50(%rbp),%r8
mov    0x10(%rbp),%rax
mov    (%rax),%r9d
mov    0x18(%rbp),%rax
mov    (%rax),%r15d
mov    0x20(%rbp),%rax
mov    (%rax),%r14d
mov    0x28(%rbp),%rbx
mov    0x30(%rbp),%r11
mov    0x38(%rbp),%rax
mov    (%rax),%r10d
mov    0x40(%rbp),%rax
mov    (%rax),%eax
mov    %r15d,(%rsp)
mov    %r14d,0x8(%rsp)
mov    %rbx,0x10(%rsp)
mov    %r11,0x18(%rsp)
mov    %r10d,0x20(%rsp)
mov    %eax,0x28(%rsp)
call   1070 <run_guided_hmc@plt>
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
add    $0x78,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<run_guided_hmc_>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    %r9,%rbx
mov    %r8,0x68(%rsp)
mov    %rcx,0x58(%rsp)
mov    %rdx,0x48(%rsp)
mov    %rsi,0x60(%rsp)
mov    %rdi,%rbp
movups 0xd8(%rsp),%xmm0
movaps %xmm0,0x70(%rsp)
mov    0xf0(%rsp),%rax
mov    %rax,0x50(%rsp)
mov    0xe8(%rsp),%rax
mov    %rax,0x40(%rsp)
mov    0xd0(%rsp),%rax
mov    %rax,0x38(%rsp)
mov    0xc8(%rsp),%r13
mov    0xc0(%rsp),%r12
mov    %r9,%rdi
mov    $0x20,%esi
call   1040 <strchr@plt>
mov    %rax,%r15
sub    %ebx,%r15d
lea    0x20(%r15),%edi
call   1060 <malloc@plt>
mov    %rax,%r14
mov    %rax,%rdi
mov    %rbx,%rsi
mov    %r15d,%edx
call   1050 <memcpy@plt>
mov    0x0(%rbp),%edi
mov    0x48(%rsp),%rax
movsd  (%rax),%xmm0
mov    0x58(%rsp),%rax
mov    (%rax),%edx
mov    (%r12),%r9d
mov    0x0(%r13),%eax
mov    0x38(%rsp),%rcx
mov    (%rcx),%ecx
mov    0x40(%rsp),%rsi
mov    (%rsi),%esi
mov    0x50(%rsp),%rbp
mov    0x0(%rbp),%ebp
mov    %ebp,0x28(%rsp)
mov    %esi,0x20(%rsp)
movaps 0x70(%rsp),%xmm1
movups %xmm1,0x10(%rsp)
mov    %ecx,0x8(%rsp)
mov    %eax,(%rsp)
mov    0x60(%rsp),%rsi
mov    0x68(%rsp),%rcx
mov    %r14,%r8
call   1070 <run_guided_hmc@plt>
mov    %r14,%rdi
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @run_guided_hmc_(i32* %0, double* %1, double* %2, i32* %3, double* %4, i8* %5, i32* %6, i32* %7, i32* %8, void (i32*, double*, double*, double*)* %9, void (i32*, double*, double*, double*)* %10, i32* %11, i32* %12) {
%14 = alloca i32*
%15 = alloca double*
%16 = alloca double*
%17 = alloca i32*
%18 = alloca double*
%19 = alloca i8*
%20 = alloca i32*
%21 = alloca i32*
%22 = alloca i32*
%23 = alloca void (i32*, double*, double*, double*)*
%24 = alloca void (i32*, double*, double*, double*)*
%25 = alloca i32*
%26 = alloca i32*
%27 = alloca i8*
%28 = alloca i8*
%29 = alloca i32
store i32* %0, i32** %14
store double* %1, double** %15
store double* %2, double** %16
store i32* %3, i32** %17
store double* %4, double** %18
store i8* %5, i8** %19
store i32* %6, i32** %20
store i32* %7, i32** %21
store i32* %8, i32** %22
store void (i32*, double*, double*, double*)* %9, void (i32*, double*, double*, double*)** %23
store void (i32*, double*, double*, double*)* %10, void (i32*, double*, double*, double*)** %24
store i32* %11, i32** %25
store i32* %12, i32** %26
%30 = load i8*, i8** %19
%31 = call i8* @strchr(i8* %30, i8 signext 32)
store i8* %31, i8** %28
%32 = load i8*, i8** %28
%33 = load i8*, i8** %19
%34 = ptrtoint i8* %32 to i64
%35 = ptrtoint i8* %33 to i64
%36 = sub i64 %34, %35
%37 = trunc i64 %36 to i32
store i32 %37, i32* %29
%38 = load i32, i32* %29
%39 = add nsw i32 %38, 32
%40 = sext i32 %39 to i64
%41 = mul i64 %40, 1
%42 = trunc i64 %41 to i32
%43 = call i64 @malloc(i32 %42)
%44 = inttoptr i64 %43 to i8*
store i8* %44, i8** %27
%45 = load i8*, i8** %27
%46 = load i8*, i8** %19
%47 = load i32, i32* %29
%48 = sext i32 %47 to i64
%49 = mul i64 %48, 1
%50 = trunc i64 %49 to i32
%51 = call i32 @memcpy(i8* %45, i8* %46, i32 %50)
%52 = load i32*, i32** %14
%53 = load i32, i32* %52
%54 = load double*, double** %15
%55 = load double*, double** %16
%56 = load double, double* %55
%57 = load i32*, i32** %17
%58 = load i32, i32* %57
%59 = load double*, double** %18
%60 = load i8*, i8** %27
%61 = load i32*, i32** %20
%62 = load i32, i32* %61
%63 = load i32*, i32** %21
%64 = load i32, i32* %63
%65 = load i32*, i32** %22
%66 = load i32, i32* %65
%67 = load void (i32*, double*, double*, double*)*, void (i32*, double*, double*, double*)** %23
%68 = load void (i32*, double*, double*, double*)*, void (i32*, double*, double*, double*)** %24
%69 = load i32*, i32** %25
%70 = load i32, i32* %69
%71 = load i32*, i32** %26
%72 = load i32, i32* %71
%73 = call i32 @run_guided_hmc(i32 %53, double* %54, double %56, i32 %58, double* %59, i8* %60, i32 %62, i32 %64, i32 %66, void (i32*, double*, double*, double*)* %67, void (i32*, double*, double*, double*)* %68, i32 %70, i32 %72)
%74 = load i8*, i8** %27
%75 = call i32 @free(i8* %74)
ret void
}

LLVM IR (-O2):
define void @run_guided_hmc_(i32* nocapture %0, double* %1, double* nocapture %2, i32* nocapture %3, double* %4, i8* %5, i32* nocapture %6, i32* nocapture %7, i32* nocapture %8, void (i32*, double*, double*, double*)* %9, void (i32*, double*, double*, double*)* %10, i32* nocapture %11, i32* nocapture %12) {
%14 = tail call i8* @strchr(i8* dereferenceable(1) %5, i8 signext 32)
%15 = ptrtoint i8* %14 to i64
%16 = ptrtoint i8* %5 to i64
%17 = sub i64 %15, %16
%18 = trunc i64 %17 to i32
%19 = add nsw i32 %18, 32
%20 = tail call i64 @malloc(i32 %19)
%21 = inttoptr i64 %20 to i8*
%22 = tail call i32 @memcpy(i8* %21, i8* %5, i32 %18)
%23 = load i32, i32* %0
%24 = load double, double* %2
%25 = load i32, i32* %3
%26 = load i32, i32* %6
%27 = load i32, i32* %7
%28 = load i32, i32* %8
%29 = load i32, i32* %11
%30 = load i32, i32* %12
%31 = tail call i32 @run_guided_hmc(i32 %23, double* %1, double %24, i32 %25, double* %4, i8* %21, i32 %26, i32 %27, i32 %28, void (i32*, double*, double*, double*)* %9, void (i32*, double*, double*, double*)* %10, i32 %29, i32 %30)
%32 = tail call i32 @free(i8* %21)
ret void
}