// File: /workspace/github_c_makefile_star2_O1/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 0x19db7(%rip), %rbx     # 0x20690
movl $0x245, %edx            # imm = 0x245
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1080
leaq 0x19b51(%rip), %r14     # 0x20440
movl $0x245, %edx            # imm = 0x245
movq %r14, %rdi
xorl %esi, %esi
callq 0x1080
leaq 0x19fdb(%rip), %r15     # 0x208e0
movl $0x245, %edx            # imm = 0x245
movq %r15, %rdi
xorl %esi, %esi
callq 0x1080
cmpl $0x2, %r12d
jl 0x69a1
leaq 0xd0(%rsp), %r13
leaq 0x68(%rsp), %rbp
movl $0x6, %edi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x451f
movq (%rbp), %rdx
movl $0x6, %edi
movq %r13, %rsi
movq %rbp, %rcx
callq 0x4641
movq (%rbp), %rdi
leaq 0x70(%rsp), %rbp
movq %rbp, %rsi
callq 0x4d97
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 0x56bb
movl $0xc, %ecx
movq %rsp, %rdi
movq %rbp, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0xd0(%rsp), %rdi
movl %r13d, %esi
callq 0x5917
testl %r12d, %r12d
jle 0x6a2d
leaq 0xd0(%rsp), %r13
leaq 0x68(%rsp), %rbp
movl $0x5, %edi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x451f
movq (%rbp), %rdx
movl $0x6, %edi
movq %r13, %rsi
movq %rbp, %rcx
callq 0x4641
movq (%rbp), %rdi
leaq 0x70(%rsp), %rbp
movq %rbp, %rsi
callq 0x4d97
leal -0x1(%r12), %r13d
movl $0xc, %ecx
movq %rsp, %rdi
movq %rbp, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0xd0(%rsp), %rdi
movl %r13d, %esi
callq 0x56bb
movl $0xc, %ecx
movq %rsp, %rdi
movq %rbp, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0xd0(%rsp), %rdi
movl %r13d, %esi
callq 0x5917
cmpb $0x0, 0xe75d(%rip)      # 0x15191
jne 0x6aaa
leaq 0xd0(%rsp), %r13
leaq 0x68(%rsp), %rbp
movl $0x5, %edi
movq %r13, %rsi
movq %rbp, %rdx
callq 0x451f
movq (%rbp), %rdx
movl $0x5, %edi
movq %r13, %rsi
movq %rbp, %rcx
callq 0x4641
movq (%rbp), %rdi
leaq 0x70(%rsp), %rbp
movq %rbp, %rsi
callq 0x4d97
movl $0xc, %ecx
movq %rsp, %rdi
movq %rbp, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %r13, %rdi
movl %r12d, %esi
callq 0x56bb
movl $0xc, %ecx
movq %rsp, %rdi
movq %rbp, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %r13, %rdi
movl %r12d, %esi
callq 0x5917
xorl %eax, %eax
cmpb $0x0, 0x1(%rax,%r15)
leaq 0x1(%rax), %rax
je 0x6aac
movl %eax, 0xe696(%rip)      # 0x15154
movl $0x244, %eax            # imm = 0x244
cmpb $0x0, (%rax,%r15)
leaq -0x1(%rax), %rax
je 0x6ac3
incl %eax
movl %eax, 0xe6aa(%rip)      # 0x15180
xorl %eax, %eax
cmpb $0x0, 0x1(%rax,%r14)
leaq 0x1(%rax), %rax
je 0x6ad8
movl %eax, 0xe66e(%rip)      # 0x15158
movl $0x244, %eax            # imm = 0x244
cmpb $0x0, (%rax,%r14)
leaq -0x1(%rax), %rax
je 0x6aef
incl %eax
movl %eax, 0xe682(%rip)      # 0x15184
xorl %eax, %eax
cmpb $0x0, 0x1(%rax,%rbx)
leaq 0x1(%rax), %rax
je 0x6b04
movl %eax, 0xe647(%rip)      # 0x1515c
addq $0x147a8, %rsp          # imm = 0x147A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq