#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*/ bzero(float *, int);
scalar_t__ malloc(int);
int strlen(char *);
int /*<<< orphan*/ strncpy(char *, char *, int);
int /*<<< orphan*/ ttimes_(float *, float *, char *, int *, float *, float *,
                           float *, float *, char *, int, int);
void GetTrvlTimes(float zs, float delta, char *phlist, int *n, float **p_tt,
                  char **p_phcd) {
  float dtdd[200], dtdh[200], dddp[200];
  char *phcd, plist[8], *t;
  float *tt, ddelta, zzs;
  int n_plist = 8;
  int n_phcd = 8;
  strncpy(plist, phlist, 8);
  if (plist[7] == '\0') {
    t = plist + strlen(plist);
    while (t < (plist + 8))
      *t++ = ' ';
  }
  *p_tt = tt = (float *)malloc(sizeof(float) * 200);
  *p_phcd = phcd = (char *)malloc(8 * 200);
  bzero(tt, sizeof(float) * 200);
  zzs = zs;
  ddelta = delta;
  ttimes_(&zzs, &ddelta, plist, n, tt, dtdd, dtdh, dddp, phcd, n_plist, n_phcd);
}


x86 assembly (clang, -O0):
<GetTrvlTimes>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
sub    $0x9f0,%rsp
movss  %xmm0,-0x14(%rbp)
movss  %xmm1,-0x18(%rbp)
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x28(%rbp)
mov    %rdx,-0x30(%rbp)
mov    %rcx,-0x38(%rbp)
movl   $0x8,-0x9cc(%rbp)
movl   $0x8,-0x9d0(%rbp)
lea    -0x9b0(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    $0x8,%edx
call   1030 <strncpy@plt>
movsbl -0x9a9(%rbp),%eax
cmp    $0x0,%eax
jne    121e <GetTrvlTimes+0xce>
lea    -0x9b0(%rbp),%rax
mov    %rax,-0x9d8(%rbp)
lea    -0x9b0(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x9d8(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x9b8(%rbp)
mov    -0x9b8(%rbp),%rax
lea    -0x9b0(%rbp),%rcx
add    $0x8,%rcx
cmp    %rcx,%rax
jae    1219 <GetTrvlTimes+0xc9>
mov    -0x9b8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x9b8(%rbp)
movb   $0x20,(%rax)
jmp    11e1 <GetTrvlTimes+0x91>
jmp    121e <GetTrvlTimes+0xce>
mov    $0x320,%edi
call   1050 <malloc@plt>
mov    %rax,%rcx
mov    %rcx,-0x9c0(%rbp)
mov    -0x30(%rbp),%rax
mov    %rcx,(%rax)
mov    $0x640,%edi
call   1050 <malloc@plt>
mov    %rax,%rcx
mov    %rcx,-0x9a8(%rbp)
mov    -0x38(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x9c0(%rbp),%rdi
mov    $0x320,%esi
call   1070 <bzero@plt>
movss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x9c8(%rbp)
ff
movss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x9c4(%rbp)
ff
lea    -0x9b0(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x9c0(%rbp),%r8
lea    -0x360(%rbp),%r9
lea    -0x680(%rbp),%r14
lea    -0x9a0(%rbp),%rbx
mov    -0x9a8(%rbp),%r11
mov    -0x9cc(%rbp),%r10d
mov    -0x9d0(%rbp),%eax
lea    -0x9c8(%rbp),%rdi
lea    -0x9c4(%rbp),%rsi
mov    %r14,(%rsp)
mov    %rbx,0x8(%rsp)
mov    %r11,0x10(%rsp)
mov    %r10d,0x18(%rsp)
mov    %eax,0x20(%rsp)
call   1060 <ttimes_@plt>
add    $0x9f0,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetTrvlTimes>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x988,%rsp
mov    %rcx,%r15
mov    %rdx,%r12
mov    %rsi,%r14
mov    %rdi,%rsi
movss  %xmm1,0x14(%rsp)
movss  %xmm0,0x10(%rsp)
lea    0x8(%rsp),%rdi
mov    $0x8,%edx
call   1030 <strncpy@plt>
cmpb   $0x0,0xf(%rsp)
jne    11d5 <GetTrvlTimes+0x75>
lea    0x8(%rsp),%rdi
call   1040 <strlen@plt>
cmp    $0x7,%eax
jg     11d5 <GetTrvlTimes+0x75>
cltq
lea    (%rsp,%rax,1),%rdi
add    $0x8,%rdi
add    %rsp,%rax
add    $0x9,%rax
lea    0x10(%rsp),%rdx
cmp    %rdx,%rax
cmova  %rax,%rdx
sub    %rdi,%rdx
mov    $0x20,%esi
call   1050 <memset@plt>
mov    $0x320,%edi
call   1060 <malloc@plt>
mov    %rax,%rbx
mov    %rax,(%r12)
mov    $0x640,%edi
call   1060 <malloc@plt>
mov    %rax,%r12
mov    %rax,(%r15)
mov    %rbx,%rdi
mov    $0x320,%esi
call   1080 <bzero@plt>
movss  0x10(%rsp),%xmm0
movss  %xmm0,0x18(%rsp)
movss  0x14(%rsp),%xmm0
movss  %xmm0,0x1c(%rsp)
sub    $0x8,%rsp
lea    0x28(%rsp),%rax
lea    0x348(%rsp),%r10
lea    0x20(%rsp),%rdi
lea    0x24(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0x668(%rsp),%r9
mov    %r14,%rcx
mov    %rbx,%r8
push   $0x8
push   $0x8
push   %r12
push   %rax
push   %r10
call   1070 <ttimes_@plt>
add    $0x9b8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @GetTrvlTimes(float %0, float %1, i8* %2, i32* %3, float** %4, i8** %5) {
%7 = alloca float
%8 = alloca float
%9 = alloca i8*
%10 = alloca i32*
%11 = alloca float**
%12 = alloca i8**
%13 = alloca [200 x float]
%14 = alloca [200 x float]
%15 = alloca [200 x float]
%16 = alloca i8*
%17 = alloca [8 x i8]
%18 = alloca i8*
%19 = alloca float*
%20 = alloca float
%21 = alloca float
%22 = alloca i32
%23 = alloca i32
store float %0, float* %7
store float %1, float* %8
store i8* %2, i8** %9
store i32* %3, i32** %10
store float** %4, float*** %11
store i8** %5, i8*** %12
store i32 8, i32* %22
store i32 8, i32* %23
%24 = getelementptr inbounds [8 x i8], [8 x i8]* %17, i64 0, i64 0
%25 = load i8*, i8** %9
%26 = call i32 @strncpy(i8* %24, i8* %25, i32 8)
%27 = getelementptr inbounds [8 x i8], [8 x i8]* %17, i64 0, i64 7
%28 = load i8, i8* %27
%29 = sext i8 %28 to i32
%30 = icmp eq i32 %29, 0
br i1 %30, label %31, label %46
31: ; preds = %6
%32 = getelementptr inbounds [8 x i8], [8 x i8]* %17, i64 0, i64 0
%33 = getelementptr inbounds [8 x i8], [8 x i8]* %17, i64 0, i64 0
%34 = call i32 @strlen(i8* %33)
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds i8, i8* %32, i64 %35
store i8* %36, i8** %18
br label %37
37: ; preds = %42, %31
%38 = load i8*, i8** %18
%39 = getelementptr inbounds [8 x i8], [8 x i8]* %17, i64 0, i64 0
%40 = getelementptr inbounds i8, i8* %39, i64 8
%41 = icmp ult i8* %38, %40
br i1 %41, label %42, label %45
42: ; preds = %37
%43 = load i8*, i8** %18
%44 = getelementptr inbounds i8, i8* %43, i32 1
store i8* %44, i8** %18
store i8 32, i8* %43
br label %37
45: ; preds = %37
br label %46
46: ; preds = %45, %6
%47 = call i64 @malloc(i32 800)
%48 = inttoptr i64 %47 to float*
store float* %48, float** %19
%49 = load float**, float*** %11
store float* %48, float** %49
%50 = call i64 @malloc(i32 1600)
%51 = inttoptr i64 %50 to i8*
store i8* %51, i8** %16
%52 = load i8**, i8*** %12
store i8* %51, i8** %52
%53 = load float*, float** %19
%54 = call i32 @bzero(float* %53, i32 800)
%55 = load float, float* %7
store float %55, float* %21
%56 = load float, float* %8
store float %56, float* %20
%57 = getelementptr inbounds [8 x i8], [8 x i8]* %17, i64 0, i64 0
%58 = load i32*, i32** %10
%59 = load float*, float** %19
%60 = getelementptr inbounds [200 x float], [200 x float]* %13, i64 0, i64 0
%61 = getelementptr inbounds [200 x float], [200 x float]* %14, i64 0, i64 0
%62 = getelementptr inbounds [200 x float], [200 x float]* %15, i64 0, i64 0
%63 = load i8*, i8** %16
%64 = load i32, i32* %22
%65 = load i32, i32* %23
%66 = call i32 @ttimes_(float* %21, float* %20, i8* %57, i32* %58, float* %59, float* %60, float* %61, float* %62, i8* %63, i32 %64, i32 %65)
ret void
}

LLVM IR (-O2):
define void @GetTrvlTimes(float %0, float %1, i8* %2, i32* %3, float** nocapture writeonly %4, i8** nocapture writeonly %5) {
%7 = alloca [200 x float]
%8 = alloca [200 x float]
%9 = alloca [200 x float]
%10 = alloca [8 x i8]
%11 = ptrtoint [8 x i8]* %10 to i64
%12 = alloca float
%13 = alloca float
%14 = bitcast [200 x float]* %7 to i8*
%15 = bitcast [200 x float]* %8 to i8*
%16 = bitcast [200 x float]* %9 to i8*
%17 = getelementptr inbounds [8 x i8], [8 x i8]* %10, i64 0, i64 0
%18 = bitcast float* %12 to i8*
%19 = bitcast float* %13 to i8*
%20 = call i32 @strncpy(i8* %17, i8* %2, i32 8)
%21 = getelementptr inbounds [8 x i8], [8 x i8]* %10, i64 0, i64 7
%22 = load i8, i8* %21
%23 = icmp eq i8 %22, 0
br i1 %23, label %24, label %36
24: ; preds = %6
%25 = call i32 @strlen(i8* %17)
%26 = sext i32 %25 to i64
%27 = icmp slt i32 %25, 8
br i1 %27, label %28, label %36
28: ; preds = %24
%29 = getelementptr [8 x i8], [8 x i8]* %10, i64 0, i64 %26
%30 = add i64 %11, %26
%31 = add i64 %30, 1
%32 = add i64 %11, 8
%33 = call i64 @llvm.umax.i64(i64 %31, i64 %32)
%34 = add i64 %11, %26
%35 = sub i64 %33, %34
br label %36
36: ; preds = %28, %24, %6
%37 = call i64 @malloc(i32 800)
%38 = inttoptr i64 %37 to float*
store float* %38, float** %4
%39 = call i64 @malloc(i32 1600)
%40 = inttoptr i64 %39 to i8*
store i8* %40, i8** %5
%41 = call i32 @bzero(float* %38, i32 800)
store float %0, float* %13
store float %1, float* %12
%42 = getelementptr inbounds [200 x float], [200 x float]* %7, i64 0, i64 0
%43 = getelementptr inbounds [200 x float], [200 x float]* %8, i64 0, i64 0
%44 = getelementptr inbounds [200 x float], [200 x float]* %9, i64 0, i64 0
%45 = call i32 @ttimes_(float* %13, float* %12, i8* %17, i32* %3, float* %38, float* %42, float* %43, float* %44, i8* %40, i32 8, i32 8)
ret void
}