// File: /workspace/github_c_makefile_star2_O0/ugobas[P]tnm/output_tnm.c
// Function: Print_tors_fluct
void Print_tors_fluct(struct axe *axe, int N_axes, float *fluct,
		      atom *atoms, struct residue *seq,
		      char *name, char *type)
{
  float MAX_B=100.0, f; int i, ia=0, n=1;
  FILE *file_out=fopen(name, "w");
  printf("Writing %s\n", name);
  fprintf(file_out, "MODEL %d  B_factor = %s\n", n, type);

  { // Normalize such that max_fluctuation = MAX_B
    float max_f=0, norm;
    for(i=0; i<N_axes; i++)if(fluct[i]>max_f)max_f=fluct[i];
    norm=MAX_B/max_f;
    for(i=0; i<N_axes; i++)fluct[i]*=norm;
  }

  for(i=0; i<N_axes; i++){
    if(axe[i].type=='f'){
      Print_atom(axe[i].bond->previous->atom, &ia, fluct[i], seq, file_out);
      f=fluct[i]; if(i+1<N_axes)f=0.5*(f+fluct[i+1]);
      Print_atom(axe[i].bond->atom, &ia, f, seq, file_out);
    }else if(axe[i].type=='p'){
      if(ia==0)
	Print_atom(axe[i].bond->previous->atom, &ia, fluct[i], seq, file_out);
      Print_atom(axe[i].bond->atom, &ia, fluct[i], seq, file_out);
    }
  }
  fprintf(file_out, "ENDMDL\n");
  fclose(file_out);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movss 0x17c45(%rip), %xmm0    # 0x760b0
movss %xmm0, -0x34(%rbp)
movl $0x0, -0x40(%rbp)
movl $0x1, -0x44(%rbp)
movq -0x30(%rbp), %rdi
leaq 0x1dee9(%rip), %rsi     # 0x7c372
callq 0x11b0
movq %rax, -0x50(%rbp)
movq -0x30(%rbp), %rsi
leaq 0x19051(%rip), %rdi     # 0x774ee
movb $0x0, %al
callq 0x10d0
movq -0x50(%rbp), %rdi
movl -0x44(%rbp), %edx
movq 0x10(%rbp), %rcx
leaq 0x23dd9(%rip), %rsi     # 0x8228f
movb $0x0, %al
callq 0x1150
xorps %xmm0, %xmm0
movss %xmm0, -0x54(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x5e506
movq -0x18(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
ucomiss -0x54(%rbp), %xmm0
jbe 0x5e4f9
movq -0x18(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
movss %xmm0, -0x54(%rbp)
jmp 0x5e4fb
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x5e4cc
movss -0x34(%rbp), %xmm0
divss -0x54(%rbp), %xmm0
movss %xmm0, -0x58(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x5e546
movss -0x58(%rbp), %xmm0
movq -0x18(%rbp), %rax
movslq -0x3c(%rbp), %rcx
mulss (%rax,%rcx,4), %xmm0
movss %xmm0, (%rax,%rcx,4)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x5e51c
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x5e6d7
movq -0x8(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0x158, %rcx, %rcx      # imm = 0x158
addq %rcx, %rax
movsbl (%rax), %eax
cmpl $0x66, %eax
jne 0x5e633
movq -0x8(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0x158, %rcx, %rcx      # imm = 0x158
addq %rcx, %rax
movq 0x8(%rax), %rax
movq 0x28(%rax), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
movq -0x28(%rbp), %rdx
movq -0x50(%rbp), %rcx
leaq -0x40(%rbp), %rsi
callq 0x5e370
movq -0x18(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
movss %xmm0, -0x38(%rbp)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
cmpl -0xc(%rbp), %eax
jge 0x5e5ff
movss -0x38(%rbp), %xmm0
movq -0x18(%rbp), %rax
movl -0x3c(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
addss (%rax,%rcx,4), %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0x17a16(%rip), %xmm0    # 0x76008
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x38(%rbp)
movq -0x8(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0x158, %rcx, %rcx      # imm = 0x158
addq %rcx, %rax
movq 0x8(%rax), %rax
movq (%rax), %rdi
movss -0x38(%rbp), %xmm0
movq -0x28(%rbp), %rdx
movq -0x50(%rbp), %rcx
leaq -0x40(%rbp), %rsi
callq 0x5e370
jmp 0x5e6c7
movq -0x8(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0x158, %rcx, %rcx      # imm = 0x158
addq %rcx, %rax
movsbl (%rax), %eax
cmpl $0x70, %eax
jne 0x5e6c5
cmpl $0x0, -0x40(%rbp)
jne 0x5e68e
movq -0x8(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0x158, %rcx, %rcx      # imm = 0x158
addq %rcx, %rax
movq 0x8(%rax), %rax
movq 0x28(%rax), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
movq -0x28(%rbp), %rdx
movq -0x50(%rbp), %rcx
leaq -0x40(%rbp), %rsi
callq 0x5e370
movq -0x8(%rbp), %rax
movslq -0x3c(%rbp), %rcx
imulq $0x158, %rcx, %rcx      # imm = 0x158
addq %rcx, %rax
movq 0x8(%rax), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movss (%rax,%rcx,4), %xmm0
movq -0x28(%rbp), %rdx
movq -0x50(%rbp), %rcx
leaq -0x40(%rbp), %rsi
callq 0x5e370
jmp 0x5e6c7
jmp 0x5e6c9
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x5e54d
movq -0x50(%rbp), %rdi
leaq 0x1fd82(%rip), %rsi     # 0x7e464
movb $0x0, %al
callq 0x1150
movq -0x50(%rbp), %rdi
callq 0x10a0
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)