// File: /workspace/github_c_makefile_star2_O2/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 0xd9c3
movswl (%r8), %r15d
testl %r15d, %r15d
je 0xdad4
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
andl $0x0, (%rsi)
leaq 0x13(%rsp), %rdi
movq %rbx, %rdx
callq 0xe553
movl %eax, %ebp
testl %eax, %eax
setne %al
cmpw $0x3, %r15w
setl %cl
orb %al, %cl
jne 0xd9d9
movq 0x18(%rsp), %rax
addq $0x19, %rax
xorl %ebp, %ebp
pushq $0x1
popq %rcx
movl %r15d, %edx
xorl %esi, %esi
xorl %r8d, %r8d
xorl %edi, %edi
subl $0x1, %edx
jb 0xd9d9
movzbl -0x1(%rax), %r9d
cmpl $0x43, %r9d
je 0xd99b
cmpl $0x4e, %r9d
jne 0xd9b0
cmpb $0x20, (%rax)
cmovel %ecx, %esi
jmp 0xd9b0
movb (%rax), %r9b
cmpb $0x41, %r9b
jne 0xd9a9
movl %ecx, %r8d
jmp 0xd9b0
cmpb $0x20, %r9b
cmovel %ecx, %edi
testl %esi, %esi
je 0xd9bd
testl %r8d, %r8d
je 0xd9bd
testl %edi, %edi
jne 0xd9ce
addq $0x70, %rax
jmp 0xd97d
movl $0x1, (%rsi)
jmp 0xdad4
movl $0x1, 0xc(%rsp)
pushq $0x1
popq %rbp
movw %bp, 0x18(%r13)
movb %r12b, 0xc(%r13)
leaq 0xd(%r13), %r12
movl $0x20202020, 0xd(%r13)  # imm = 0x20202020
movw $0x20, 0x11(%r13)
leaq 0x4982f(%rip), %rsi     # 0x5722b
movq %r12, %rdi
movl 0x8(%rsp), %edx
xorl %eax, %eax
callq 0x2260
cmpb $0x20, %r14b
je 0xda24
leaq 0x30(%rsp), %rsi
movb %r14b, (%rsi)
movb $0x0, 0x1(%rsi)
movq %r12, %rdi
callq 0x2240
movsbl %r14b, %r12d
movb 0x14(%rsp), %al
movb %al, 0x13(%r13)
movzwl 0xc(%rsp), %ecx
movw %cx, 0x16(%r13)
cmpl $0x1, %ebp
je 0xda44
cmpl $-0x1, %ebp
jne 0xda74
movsbl %al, %edi
callq 0x1d91c
movw %ax, 0x14(%r13)
testw %ax, %ax
jns 0xda74
leaq 0x42435(%rip), %rdi     # 0x4fe92
movq %rbx, %rsi
movl 0x8(%rsp), %edx
movl %r12d, %ecx
xorl %eax, %eax
callq 0x20f0
andw $0x0, 0x14(%r13)
movq 0x18(%rsp), %rax
movq %rax, (%r13)
movl %r15d, 0x8(%r13)
testl %ebp, %ebp
movb 0xd0(%rsp), %r14b
jne 0xdaad
leaq 0x42417(%rip), %rdi     # 0x4feab
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
andw $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