// File: /workspace/github_c_makefile_star2_O1/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 $0x68, %rsp
movq %r9, %r15
movb 0xe0(%rsp), %r12b
movl 0xd0(%rsp), %ebp
movq 0xc8(%rsp), %rax
movq 0xb8(%rsp), %r14
cmpl $0x0, (%rsi)
je 0xe410
movswl (%r8), %ebx
testl %ebx, %ebx
je 0xe533
movq %rdx, %r13
movq %rcx, 0x28(%rsp)
movq %r8, 0x38(%rsp)
movl 0xc0(%rsp), %r8d
movq %rdi, 0x30(%rsp)
movslq (%rdi), %rax
shlq $0x5, %rax
addq %rax, %r13
movq 0xa0(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x1c(%rsp)
movq 0xa8(%rsp), %rax
movb (%rax), %al
movb %al, 0xa(%rsp)
movq 0xb0(%rsp), %rax
movb (%rax), %al
movb %al, 0xb(%rsp)
movl (%r14), %ecx
leaq 0x10(%rsp), %rsi
movl $0x0, (%rsi)
leaq 0x17(%rsp), %rdi
movq %r15, %rdx
callq 0xef68
movl %eax, %ebp
testl %eax, %eax
setne %al
movl %ebx, 0xc(%rsp)
cmpw $0x3, %bx
setl %cl
orb %al, %cl
jne 0xe435
movq %r15, 0x20(%rsp)
movq 0x28(%rsp), %rax
leaq 0x18(%rax), %rbp
xorl %r15d, %r15d
movl 0xc(%rsp), %ebx
xorl %r14d, %r14d
xorl %r12d, %r12d
movl $0x2, %edx
movq %rbp, %rdi
leaq 0x47b7e(%rip), %rsi     # 0x55f23
callq 0x2070
testl %eax, %eax
je 0xe3e7
movl $0x2, %edx
movq %rbp, %rdi
leaq 0x46dad(%rip), %rsi     # 0x5516a
callq 0x2070
testl %eax, %eax
je 0xe3ef
movl $0x2, %edx
movq %rbp, %rdi
leaq 0x47b51(%rip), %rsi     # 0x55f26
callq 0x2070
testl %eax, %eax
movl $0x1, %eax
cmovel %eax, %r15d
jmp 0xe3f5
movl $0x1, %r12d
jmp 0xe3f5
movl $0x1, %r14d
testl %r12d, %r12d
je 0xe404
testl %r14d, %r14d
je 0xe404
testl %r15d, %r15d
jne 0xe41b
addq $0x70, %rbp
decl %ebx
jne 0xe396
xorl %ebp, %ebp
jmp 0xe428
movl $0x1, (%rsi)
jmp 0xe533
movl $0x1, 0x10(%rsp)
movl $0x1, %ebp
movq 0x20(%rsp), %r15
movb 0xe0(%rsp), %r12b
movw %bp, 0x18(%r13)
movb 0xb(%rsp), %al
movb %al, 0xc(%r13)
leaq 0xd(%r13), %r14
movl $0x20202020, 0xd(%r13)  # imm = 0x20202020
movw $0x20, 0x11(%r13)
leaq 0x4ee8f(%rip), %rsi     # 0x5d2eb
movq %r14, %rdi
movl 0x1c(%rsp), %ebx
movl %ebx, %edx
xorl %eax, %eax
callq 0x2260
movb 0xa(%rsp), %al
cmpb $0x20, %al
je 0xe48b
leaq 0x40(%rsp), %rsi
movb %al, (%rsi)
movb $0x0, 0x1(%rsi)
movq %r14, %rdi
callq 0x2240
movb 0xa(%rsp), %al
movsbl %al, %r14d
movb 0x18(%rsp), %al
movb %al, 0x13(%r13)
movzwl 0x10(%rsp), %ecx
movw %cx, 0x16(%r13)
cmpl $0x1, %ebp
je 0xe4ab
cmpl $-0x1, %ebp
jne 0xe4da
movsbl %al, %edi
callq 0x1fbd8
movw %ax, 0x14(%r13)
testw %ax, %ax
jns 0xe4da
leaq 0x47aa3(%rip), %rdi     # 0x55f67
movq %r15, %rsi
movl %ebx, %edx
movl %r14d, %ecx
xorl %eax, %eax
callq 0x20f0
movw $0x0, 0x14(%r13)
movq 0x28(%rsp), %rax
movq %rax, (%r13)
movl 0xc(%rsp), %r9d
movl %r9d, 0x8(%r13)
testl %ebp, %ebp
jne 0xe50b
leaq 0x47a89(%rip), %rdi     # 0x55f80
leaq 0x17(%rsp), %r8
movq %r15, %rsi
movl %ebx, %edx
movl %r14d, %ecx
xorl %eax, %eax
callq 0x20f0
movq 0x30(%rsp), %rax
incl (%rax)
movq 0x38(%rsp), %rax
movw $0x0, (%rax)
movq 0xb8(%rsp), %r14
movl 0xd0(%rsp), %ebp
movq 0xc8(%rsp), %rax
movq %r15, %rdi
movq %rax, %rsi
callq 0x2080
movb 0xd8(%rsp), %al
movq 0xa8(%rsp), %rcx
movb %al, (%rcx)
movq 0xa0(%rsp), %rax
movl %ebp, (%rax)
movq 0xb0(%rsp), %rax
movb %r12b, (%rax)
movl 0xe8(%rsp), %eax
movl %eax, (%r14)
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq