#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 */
typedef int /*<<< orphan*/ numstr;

/* Variables and functions */
scalar_t__ atof(char *);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ strncpy(char *, char const *, int);
void get_pdb_coordinates(const char *record, float *x, float *y, float *z,
                         float *occup, float *beta) {
  char numstr[50];
  memset(numstr, 0, sizeof(numstr));
  if (x != NULL) {
    strncpy(numstr, record + 30, 8);
    *x = (float)atof(numstr);
  }
  if (y != NULL) {
    strncpy(numstr + 10, record + 38, 8);
    *y = (float)atof(numstr + 10);
  }
  if (z != NULL) {
    strncpy(numstr + 20, record + 46, 8);
    *z = (float)atof(numstr + 20);
  }
  if (occup != NULL) {
    strncpy(numstr + 30, record + 54, 6);
    *occup = (float)atof(numstr + 30);
  }
  if (beta != NULL) {
    strncpy(numstr + 40, record + 60, 6);
    *beta = (float)atof(numstr + 40);
  }
}


x86 assembly (clang, -O0):
<get_pdb_coordinates>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x32,%edx
call   1050 <memset@plt>
cmpq   $0x0,-0x10(%rbp)
je     1197 <get_pdb_coordinates+0x67>
lea    -0x70(%rbp),%rdi
mov    -0x8(%rbp),%rsi
add    $0x1e,%rsi
mov    $0x8,%edx
call   1030 <strncpy@plt>
lea    -0x70(%rbp),%rdi
call   1040 <atof@plt>
cvtsi2ss %rax,%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
cmpq   $0x0,-0x18(%rbp)
je     11d6 <get_pdb_coordinates+0xa6>
lea    -0x70(%rbp),%rdi
add    $0xa,%rdi
mov    -0x8(%rbp),%rsi
add    $0x26,%rsi
mov    $0x8,%edx
call   1030 <strncpy@plt>
lea    -0x70(%rbp),%rdi
add    $0xa,%rdi
call   1040 <atof@plt>
cvtsi2ss %rax,%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,(%rax)
cmpq   $0x0,-0x20(%rbp)
je     1215 <get_pdb_coordinates+0xe5>
lea    -0x70(%rbp),%rdi
add    $0x14,%rdi
mov    -0x8(%rbp),%rsi
add    $0x2e,%rsi
mov    $0x8,%edx
call   1030 <strncpy@plt>
lea    -0x70(%rbp),%rdi
add    $0x14,%rdi
call   1040 <atof@plt>
cvtsi2ss %rax,%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,(%rax)
cmpq   $0x0,-0x28(%rbp)
je     1254 <get_pdb_coordinates+0x124>
lea    -0x70(%rbp),%rdi
add    $0x1e,%rdi
mov    -0x8(%rbp),%rsi
add    $0x36,%rsi
mov    $0x6,%edx
call   1030 <strncpy@plt>
lea    -0x70(%rbp),%rdi
add    $0x1e,%rdi
call   1040 <atof@plt>
cvtsi2ss %rax,%xmm0
mov    -0x28(%rbp),%rax
movss  %xmm0,(%rax)
cmpq   $0x0,-0x30(%rbp)
je     1293 <get_pdb_coordinates+0x163>
lea    -0x70(%rbp),%rdi
add    $0x28,%rdi
mov    -0x8(%rbp),%rsi
add    $0x3c,%rsi
mov    $0x6,%edx
call   1030 <strncpy@plt>
lea    -0x70(%rbp),%rdi
add    $0x28,%rdi
call   1040 <atof@plt>
cvtsi2ss %rax,%xmm0
mov    -0x30(%rbp),%rax
movss  %xmm0,(%rax)
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_pdb_coordinates>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %r9,%r14
mov    %r8,%r15
mov    %rcx,%rbx
mov    %rdx,%r13
mov    %rsi,%rbp
mov    %rdi,%r12
mov    %rsp,%rdi
xor    %esi,%esi
mov    $0x32,%edx
call   1050 <memset@plt>
test   %rbp,%rbp
je     1188 <get_pdb_coordinates+0x58>
lea    0x1e(%r12),%rsi
mov    %rsp,%rdi
mov    $0x8,%edx
call   1030 <strncpy@plt>
mov    %rsp,%rdi
call   1040 <atof@plt>
cvtsi2ss %rax,%xmm0
movss  %xmm0,0x0(%rbp)
test   %r13,%r13
je     11ba <get_pdb_coordinates+0x8a>
lea    0xa(%rsp),%rbp
lea    0x26(%r12),%rsi
mov    %rbp,%rdi
mov    $0x8,%edx
call   1030 <strncpy@plt>
mov    %rbp,%rdi
call   1040 <atof@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
movss  %xmm0,0x0(%r13)
test   %rbx,%rbx
je     11ea <get_pdb_coordinates+0xba>
lea    0x14(%rsp),%rbp
lea    0x2e(%r12),%rsi
mov    %rbp,%rdi
mov    $0x8,%edx
call   1030 <strncpy@plt>
mov    %rbp,%rdi
call   1040 <atof@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
movss  %xmm0,(%rbx)
test   %r15,%r15
je     121b <get_pdb_coordinates+0xeb>
lea    0x1e(%rsp),%rbp
lea    0x36(%r12),%rsi
mov    %rbp,%rdi
mov    $0x6,%edx
call   1030 <strncpy@plt>
mov    %rbp,%rdi
call   1040 <atof@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
movss  %xmm0,(%r15)
test   %r14,%r14
je     124e <get_pdb_coordinates+0x11e>
lea    0x28(%rsp),%rbp
add    $0x3c,%r12
mov    %rbp,%rdi
mov    %r12,%rsi
mov    $0x6,%edx
call   1030 <strncpy@plt>
mov    %rbp,%rdi
call   1040 <atof@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
movss  %xmm0,(%r14)
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @get_pdb_coordinates(i8* %0, float* %1, float* %2, float* %3, float* %4, float* %5) {
%7 = alloca i8*
%8 = alloca float*
%9 = alloca float*
%10 = alloca float*
%11 = alloca float*
%12 = alloca float*
%13 = alloca [50 x i8]
store i8* %0, i8** %7
store float* %1, float** %8
store float* %2, float** %9
store float* %3, float** %10
store float* %4, float** %11
store float* %5, float** %12
%14 = getelementptr inbounds [50 x i8], [50 x i8]* %13, i64 0, i64 0
%15 = call i32 @memset(i8* %14, i32 0, i32 50)
%16 = load float*, float** %8
%17 = icmp ne float* %16, null
br i1 %17, label %18, label %27
18: ; preds = %6
%19 = getelementptr inbounds [50 x i8], [50 x i8]* %13, i64 0, i64 0
%20 = load i8*, i8** %7
%21 = getelementptr inbounds i8, i8* %20, i64 30
%22 = call i32 @strncpy(i8* %19, i8* %21, i32 8)
%23 = getelementptr inbounds [50 x i8], [50 x i8]* %13, i64 0, i64 0
%24 = call i64 @atof(i8* %23)
%25 = sitofp i64 %24 to float
%26 = load float*, float** %8
store float %25, float* %26
br label %27
27: ; preds = %18, %6
%28 = load float*, float** %9
%29 = icmp ne float* %28, null
br i1 %29, label %30, label %41
30: ; preds = %27
%31 = getelementptr inbounds [50 x i8], [50 x i8]* %13, i64 0, i64 0
%32 = getelementptr inbounds i8, i8* %31, i64 10
%33 = load i8*, i8** %7
%34 = getelementptr inbounds i8, i8* %33, i64 38
%35 = call i32 @strncpy(i8* %32, i8* %34, i32 8)
%36 = getelementptr inbounds [50 x i8], [50 x i8]* %13, i64 0, i64 0
%37 = getelementptr inbounds i8, i8* %36, i64 10
%38 = call i64 @atof(i8* %37)
%39 = sitofp i64 %38 to float
%40 = load float*, float** %9
store float %39, float* %40
br label %41
41: ; preds = %30, %27
%42 = load float*, float** %10
%43 = icmp ne float* %42, null
br i1 %43, label %44, label %55
44: ; preds = %41
%45 = getelementptr inbounds [50 x i8], [50 x i8]* %13, i64 0, i64 0
%46 = getelementptr inbounds i8, i8* %45, i64 20
%47 = load i8*, i8** %7
%48 = getelementptr inbounds i8, i8* %47, i64 46
%49 = call i32 @strncpy(i8* %46, i8* %48, i32 8)
%50 = getelementptr inbounds [50 x i8], [50 x i8]* %13, i64 0, i64 0
%51 = getelementptr inbounds i8, i8* %50, i64 20
%52 = call i64 @atof(i8* %51)
%53 = sitofp i64 %52 to float
%54 = load float*, float** %10
store float %53, float* %54
br label %55
55: ; preds = %44, %41
%56 = load float*, float** %11
%57 = icmp ne float* %56, null
br i1 %57, label %58, label %69
58: ; preds = %55
%59 = getelementptr inbounds [50 x i8], [50 x i8]* %13, i64 0, i64 0
%60 = getelementptr inbounds i8, i8* %59, i64 30
%61 = load i8*, i8** %7
%62 = getelementptr inbounds i8, i8* %61, i64 54
%63 = call i32 @strncpy(i8* %60, i8* %62, i32 6)
%64 = getelementptr inbounds [50 x i8], [50 x i8]* %13, i64 0, i64 0
%65 = getelementptr inbounds i8, i8* %64, i64 30
%66 = call i64 @atof(i8* %65)
%67 = sitofp i64 %66 to float
%68 = load float*, float** %11
store float %67, float* %68
br label %69
69: ; preds = %58, %55
%70 = load float*, float** %12
%71 = icmp ne float* %70, null
br i1 %71, label %72, label %83
72: ; preds = %69
%73 = getelementptr inbounds [50 x i8], [50 x i8]* %13, i64 0, i64 0
%74 = getelementptr inbounds i8, i8* %73, i64 40
%75 = load i8*, i8** %7
%76 = getelementptr inbounds i8, i8* %75, i64 60
%77 = call i32 @strncpy(i8* %74, i8* %76, i32 6)
%78 = getelementptr inbounds [50 x i8], [50 x i8]* %13, i64 0, i64 0
%79 = getelementptr inbounds i8, i8* %78, i64 40
%80 = call i64 @atof(i8* %79)
%81 = sitofp i64 %80 to float
%82 = load float*, float** %12
store float %81, float* %82
br label %83
83: ; preds = %72, %69
ret void
}

LLVM IR (-O2):
define void @get_pdb_coordinates(i8* %0, float* writeonly %1, float* writeonly %2, float* writeonly %3, float* writeonly %4, float* writeonly %5) {
%7 = alloca [50 x i8]
%8 = getelementptr inbounds [50 x i8], [50 x i8]* %7, i64 0, i64 0
%9 = call i32 @memset(i8* %8, i32 0, i32 50)
%10 = icmp eq float* %1, null
br i1 %10, label %16, label %11
11: ; preds = %6
%12 = getelementptr inbounds i8, i8* %0, i64 30
%13 = call i32 @strncpy(i8* %8, i8* %12, i32 8)
%14 = call i64 @atof(i8* %8)
%15 = sitofp i64 %14 to float
store float %15, float* %1
br label %16
16: ; preds = %11, %6
%17 = icmp eq float* %2, null
br i1 %17, label %24, label %18
18: ; preds = %16
%19 = getelementptr inbounds [50 x i8], [50 x i8]* %7, i64 0, i64 10
%20 = getelementptr inbounds i8, i8* %0, i64 38
%21 = call i32 @strncpy(i8* %19, i8* %20, i32 8)
%22 = call i64 @atof(i8* %19)
%23 = sitofp i64 %22 to float
store float %23, float* %2
br label %24
24: ; preds = %18, %16
%25 = icmp eq float* %3, null
br i1 %25, label %32, label %26
26: ; preds = %24
%27 = getelementptr inbounds [50 x i8], [50 x i8]* %7, i64 0, i64 20
%28 = getelementptr inbounds i8, i8* %0, i64 46
%29 = call i32 @strncpy(i8* %27, i8* %28, i32 8)
%30 = call i64 @atof(i8* %27)
%31 = sitofp i64 %30 to float
store float %31, float* %3
br label %32
32: ; preds = %26, %24
%33 = icmp eq float* %4, null
br i1 %33, label %40, label %34
34: ; preds = %32
%35 = getelementptr inbounds [50 x i8], [50 x i8]* %7, i64 0, i64 30
%36 = getelementptr inbounds i8, i8* %0, i64 54
%37 = call i32 @strncpy(i8* %35, i8* %36, i32 6)
%38 = call i64 @atof(i8* %35)
%39 = sitofp i64 %38 to float
store float %39, float* %4
br label %40
40: ; preds = %34, %32
%41 = icmp eq float* %5, null
br i1 %41, label %48, label %42
42: ; preds = %40
%43 = getelementptr inbounds [50 x i8], [50 x i8]* %7, i64 0, i64 40
%44 = getelementptr inbounds i8, i8* %0, i64 60
%45 = call i32 @strncpy(i8* %43, i8* %44, i32 6)
%46 = call i64 @atof(i8* %43)
%47 = sitofp i64 %46 to float
store float %47, float* %5
br label %48
48: ; preds = %42, %40
ret void
}