// File: /workspace/github_c_makefile_star2_O3/mishun[P]plantri/fullgen.c
// Function: baue_patches
void baue_patches(int sechsecke)
{
PLANMAP map;
SEQUENZ sq;
KANTE *marke;
int i;


for (i=0; i<=N; i++) bblmark[i]=brillenglasmark[i]=zwei_3_4_mark[i]=0;


/* Patches, die nur aus einer Flaeche bestehen, brauchen nicht betrachtet zu
   werden */

if (sechsecke >=2)
/* zuerst Start mit 2 Sechsecken */
{
baue_polygon(6,map,&marke);
add_polygon(6,map,marke,&marke);
belege_sequenz(marke, &sq);
schreibe_auf(map,sq,sechsecke-2);
baue_auf( map, sq, sechsecke-2);
}

if (sechsecke >=1)
/* dann ein 5- und ein 6-Eck */
{
baue_polygon(5,map,&marke);
add_polygon(6,map,marke,&marke);
belege_sequenz( marke, &sq);
schreibe_auf(map,sq,sechsecke-1);
baue_auf( map, sq, sechsecke-1);
}

/* dann zwei 5-Ecke */
if (!IPR)
{
baue_polygon(5,map,&marke);
add_polygon(5,map,marke,&marke);
belege_sequenz( marke, &sq);
schreibe_auf(map,sq,sechsecke);
baue_auf( map, sq, sechsecke);
}


for (minbbl=1; bblmark[minbbl]==0; minbbl++);
for (maxbbl=N; bblmark[maxbbl]==0; maxbbl--);

for (minbrillenglas=1; brillenglasmark[minbrillenglas]==0; minbrillenglas++);
for (maxbrillenglas=N; brillenglasmark[maxbrillenglas]==0; maxbrillenglas--);

for (min_2_3_4=1; zwei_3_4_mark[min_2_3_4]==0; min_2_3_4++);


}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x147a8, %rsp          # imm = 0x147A8
movl %edi, %r12d
leaq 0x19c53(%rip), %rbx     # 0x20690
movl $0x245, %edx            # imm = 0x245
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1080
leaq 0x199ed(%rip), %r14     # 0x20440
movl $0x245, %edx            # imm = 0x245
movq %r14, %rdi
xorl %esi, %esi
callq 0x1080
leaq 0x19e77(%rip), %r15     # 0x208e0
movl $0x245, %edx            # imm = 0x245
movq %r15, %rdi
xorl %esi, %esi
callq 0x1080
cmpl $0x2, %r12d
jl 0x6b07
leaq 0xd0(%rsp), %r13
leaq 0x68(%rsp), %rbp
movl $0x6, %edi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x4559
movq (%rbp), %rdx
movl $0x6, %edi
movq %r13, %rsi
movq %rbp, %rcx
callq 0x467b
movq (%rbp), %rdi
leaq 0x70(%rsp), %rbp
movq %rbp, %rsi
callq 0x4e7d
leal -0x2(%r12), %r13d
movl $0xc, %ecx
movq %rsp, %rdi
movq %rbp, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0xd0(%rsp), %rdi
movl %r13d, %esi
callq 0x57b6
movl $0xc, %ecx
movq %rsp, %rdi
movq %rbp, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0xd0(%rsp), %rdi
movl %r13d, %esi
callq 0x5a39
jmp 0x6b11
cmpl $0x1, %r12d
jne 0x6b98
leaq 0xd0(%rsp), %r13
leaq 0x68(%rsp), %rbp
movl $0x5, %edi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x4559
movq (%rbp), %rdx
movl $0x6, %edi
movq %r13, %rsi
movq %rbp, %rcx
callq 0x467b
movq (%rbp), %rdi
leaq 0x70(%rsp), %rbp
movq %rbp, %rsi
callq 0x4e7d
movq %r12, %r13
decl %r12d
movl $0xc, %ecx
movq %rsp, %rdi
movq %rbp, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0xd0(%rsp), %rdi
movl %r12d, %esi
callq 0x57b6
movl $0xc, %ecx
movq %rsp, %rdi
movq %rbp, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0xd0(%rsp), %rdi
movl %r12d, %esi
movq %r13, %r12
callq 0x5a39
cmpb $0x0, 0xe5f2(%rip)      # 0x15191
jne 0x6c16
leaq 0xd0(%rsp), %r13
movq %r12, %rbp
leaq 0x68(%rsp), %r12
movl $0x5, %edi
movq %r13, %rsi
movq %r12, %rdx
callq 0x4559
movq (%r12), %rdx
movl $0x5, %edi
movq %r13, %rsi
movq %r12, %rcx
callq 0x467b
movq (%r12), %rdi
leaq 0x70(%rsp), %r12
movq %r12, %rsi
callq 0x4e7d
movl $0xc, %ecx
movq %rsp, %rdi
movq %r12, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %r13, %rdi
movl %ebp, %esi
callq 0x57b6
movl $0xc, %ecx
movq %rsp, %rdi
movq %r12, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %r13, %rdi
movl %ebp, %esi
callq 0x5a39
xorl %eax, %eax
cmpb $0x0, 0x1(%rax,%r15)
leaq 0x1(%rax), %rax
je 0x6c18
movl %eax, 0xe52a(%rip)      # 0x15154
movl $0x244, %eax            # imm = 0x244
cmpb $0x0, (%rax,%r15)
leaq -0x1(%rax), %rax
je 0x6c2f
incl %eax
movl %eax, 0xe53e(%rip)      # 0x15180
xorl %eax, %eax
cmpb $0x0, 0x1(%rax,%r14)
leaq 0x1(%rax), %rax
je 0x6c44
movl %eax, 0xe502(%rip)      # 0x15158
movl $0x244, %eax            # imm = 0x244
cmpb $0x0, (%rax,%r14)
leaq -0x1(%rax), %rax
je 0x6c5b
incl %eax
movl %eax, 0xe516(%rip)      # 0x15184
xorl %eax, %eax
cmpb $0x0, 0x1(%rax,%rbx)
leaq 0x1(%rax), %rax
je 0x6c70
movl %eax, 0xe4db(%rip)      # 0x1515c
addq $0x147a8, %rsp          # imm = 0x147A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq