// File: /workspace/github_c_makefile_star2_O0/mishun[P]plantri/fullgen.c
// Function: spiralstatistic
void spiralstatistic(PLANMAP map)

/* berechnet die Statistik, wieviele Spiralen es gibt */

{ int zaehler=0, i,j, mark, sixgons;
  FLAECHENTYP code[12];


/*schreibemap(map);*/

sixgons= (map[0][0].name - 20)/2;

for (i=1; i<=map[0][0].name; i++)
  for (j=0; j<3; j++) { map[i][j].dummy=map[i][j].mininame=0; }
for (i=0; i<12; i++) code[i]=FL_MAX;

mark=1;

for (i=1; (i<=map[0][0].name); i++) 
  for (j=0; j<3; j++)
      { code[0]=FL_MAX; 
	if (get_spiralcode ( map[i]+j, mark, code, sixgons)) zaehler++; 
	/*else fprintf(stderr,"no %d %d \n",i,map[i][j].name);*/
	mark++;
	code[0]=FL_MAX;
	if (get_spiralcode_inv ( map[i]+j, mark, code, sixgons)) zaehler++; 
	/*else fprintf(stderr,"no inv %d %d \n",i,map[i][j].name); */
        mark++;}

spiralnumbers[zaehler]++;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
movzwl 0x2(%rax), %eax
subl $0x14, %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, -0x1c(%rbp)
movl $0x1, -0x10(%rbp)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rcx
movzwl 0x2(%rcx), %ecx
cmpl %ecx, %eax
jg 0x2e0c
movl $0x0, -0x14(%rbp)
cmpl $0x3, -0x14(%rbp)
jge 0x2dff
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
movslq -0x14(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movw $0x0, 0x14(%rax)
movq -0x8(%rbp), %rax
movslq -0x10(%rbp), %rcx
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
movslq -0x14(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x8(%rax)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x2da6
jmp 0x2e01
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x2d90
movl $0x0, -0x10(%rbp)
cmpl $0xc, -0x10(%rbp)
jge 0x2e2d
movslq -0x10(%rbp), %rax
movb $-0x1, -0x28(%rbp,%rax)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x2e13
movl $0x1, -0x18(%rbp)
movl $0x1, -0x10(%rbp)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rcx
movzwl 0x2(%rcx), %ecx
cmpl %ecx, %eax
jg 0x2f09
movl $0x0, -0x14(%rbp)
cmpl $0x3, -0x14(%rbp)
jge 0x2ef9
movb $-0x1, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movslq -0x10(%rbp), %rax
imulq $0x90, %rax, %rax
addq %rax, %rdi
movslq -0x14(%rbp), %rax
imulq $0x30, %rax, %rax
addq %rax, %rdi
movl -0x18(%rbp), %esi
leaq -0x28(%rbp), %rdx
movl -0x1c(%rbp), %ecx
callq 0x14e0
cmpb $0x0, %al
je 0x2e9c
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movb $-0x1, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movslq -0x10(%rbp), %rax
imulq $0x90, %rax, %rax
addq %rax, %rdi
movslq -0x14(%rbp), %rax
imulq $0x30, %rax, %rax
addq %rax, %rdi
movl -0x18(%rbp), %esi
leaq -0x28(%rbp), %rdx
movl -0x1c(%rbp), %ecx
callq 0x16e0
cmpb $0x0, %al
je 0x2ee2
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x2e55
jmp 0x2efb
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x2e3b
movslq -0xc(%rbp), %rcx
leaq 0x196bc(%rip), %rax     # 0x1c5d0
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
leaq 0x196af(%rip), %rax     # 0x1c5d0
movl %edx, (%rax,%rcx,4)
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)