// File: /workspace/github_c_makefile_star2_O3/ugobas[P]tnm/read.c
// Function: Next_residue
int Next_residue(int *N_res, int *start, struct residue *seq,
		 atom *first_atom, short *i_atom,
		 char *res_type_old, int *res_num_old, char *icode_old,
		 char *chain_old, int *hetatm_old, int n_exo,
		 char *res_type, int res_num, char icode, char chain,
		 int hetatm)
{
  if((*start)==0){*start=1;}
  else if(*i_atom)
  	{Write_residue(res_type_old, first_atom, *i_atom, seq+*N_res,
		  n_exo, *res_num_old, *icode_old, *chain_old, *hetatm_old);
     //if(type==1){(*N_res)++;}else{n_atom-=(*i_atom);}
     (*N_res)++;
     (*i_atom)=0;
  	}
  	
  strcpy(res_type_old,res_type);
  *icode_old=icode;
  *res_num_old=res_num;
  *chain_old=chain;
  *hetatm_old=hetatm;

  return(0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r9, %rbx
movl 0xd8(%rsp), %ebp
movb 0xd0(%rsp), %r14b
movq 0xb8(%rsp), %rax
movq 0xa8(%rsp), %r12
cmpl $0x0, (%rsi)
je 0xe3cb
movswl (%r8), %r15d
testl %r15d, %r15d
je 0xe4e0
movq %rdx, %r13
movq %rcx, 0x18(%rsp)
movq %r8, 0x28(%rsp)
movl 0xb0(%rsp), %r8d
movq %rdi, 0x20(%rsp)
movslq (%rdi), %rax
shlq $0x5, %rax
addq %rax, %r13
movq 0x90(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x8(%rsp)
movq 0x98(%rsp), %rax
movb (%rax), %r14b
movq %r12, %rax
movq 0xa0(%rsp), %rcx
movb (%rcx), %r12b
movl (%rax), %ecx
leaq 0xc(%rsp), %rsi
movl $0x0, (%rsi)
leaq 0x13(%rsp), %rdi
movq %rbx, %rdx
callq 0xef00
movl %eax, %ebp
testl %eax, %eax
setne %al
cmpw $0x3, %r15w
setl %cl
orb %al, %cl
jne 0xe3e3
movq 0x18(%rsp), %rax
addq $0x19, %rax
xorl %ecx, %ecx
movl $0x1, %edx
movl %r15d, %esi
xorl %r8d, %r8d
xorl %edi, %edi
movzbl -0x1(%rax), %r9d
cmpl $0x43, %r9d
je 0xe39a
cmpl $0x4e, %r9d
jne 0xe3b2
cmpb $0x20, (%rax)
cmovel %edx, %edi
jmp 0xe3b2
movb (%rax), %r9b
cmpb $0x41, %r9b
jne 0xe3ab
movl $0x1, %r8d
jmp 0xe3b2
cmpb $0x20, %r9b
cmovel %edx, %ecx
testl %edi, %edi
je 0xe3bf
testl %r8d, %r8d
je 0xe3bf
testl %ecx, %ecx
jne 0xe3d6
addq $0x70, %rax
decl %esi
jne 0xe381
xorl %ebp, %ebp
jmp 0xe3e3
movl $0x1, (%rsi)
jmp 0xe4e0
movl $0x1, 0xc(%rsp)
movl $0x1, %ebp
movw %bp, 0x18(%r13)
movb %r12b, 0xc(%r13)
leaq 0xd(%r13), %r12
movl $0x20202020, 0xd(%r13)  # imm = 0x20202020
movw $0x20, 0x11(%r13)
leaq 0x4eeb5(%rip), %rsi     # 0x5d2bb
movq %r12, %rdi
movl 0x8(%rsp), %edx
xorl %eax, %eax
callq 0x2270
cmpb $0x20, %r14b
je 0xe42e
leaq 0x30(%rsp), %rsi
movb %r14b, (%rsi)
movb $0x0, 0x1(%rsi)
movq %r12, %rdi
callq 0x2250
movsbl %r14b, %r12d
movb 0x14(%rsp), %al
movb %al, 0x13(%r13)
movzwl 0xc(%rsp), %ecx
movw %cx, 0x16(%r13)
cmpl $0x1, %ebp
je 0xe44e
cmpl $-0x1, %ebp
jne 0xe47f
movsbl %al, %edi
callq 0x1f488
movw %ax, 0x14(%r13)
testw %ax, %ax
jns 0xe47f
leaq 0x47adb(%rip), %rdi     # 0x55f42
movq %rbx, %rsi
movl 0x8(%rsp), %edx
movl %r12d, %ecx
xorl %eax, %eax
callq 0x20f0
movw $0x0, 0x14(%r13)
movq 0x18(%rsp), %rax
movq %rax, (%r13)
movl %r15d, 0x8(%r13)
testl %ebp, %ebp
movb 0xd0(%rsp), %r14b
jne 0xe4b8
leaq 0x47abc(%rip), %rdi     # 0x55f5b
leaq 0x13(%rsp), %r8
movq %rbx, %rsi
movl 0x8(%rsp), %edx
movl %r12d, %ecx
movl %r15d, %r9d
xorl %eax, %eax
callq 0x20f0
movq 0x20(%rsp), %rax
incl (%rax)
movq 0x28(%rsp), %rax
movw $0x0, (%rax)
movl 0xd8(%rsp), %ebp
movq 0xa8(%rsp), %r12
movq 0xb8(%rsp), %rax
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2080
movb 0xc8(%rsp), %al
movq 0x98(%rsp), %rcx
movb %al, (%rcx)
movl 0xc0(%rsp), %eax
movq 0x90(%rsp), %rcx
movl %eax, (%rcx)
movq 0xa0(%rsp), %rax
movb %r14b, (%rax)
movl %ebp, (%r12)
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq