// File: /workspace/github_c_makefile_star2_O2/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
xorl %eax, %eax
leaq 0x19a1a(%rip), %r13     # 0x1e670
leaq 0x197c3(%rip), %rbx     # 0x1e420
leaq 0x19c5c(%rip), %r14     # 0x1e8c0
xorl %ecx, %ecx
cmpq $0x245, %rcx            # imm = 0x245
je 0x4c7f
movb %al, (%rcx,%r13)
movb %al, (%rcx,%rbx)
movb %al, (%rcx,%r14)
incq %rcx
jmp 0x4c66
cmpl $0x2, %r12d
jl 0x4d01
pushq $0x6
popq %rdi
leaq 0xd0(%rsp), %rbp
leaq 0x68(%rsp), %r15
movq %rbp, %rsi
movq %r15, %rdx
callq 0x2a10
movq (%r15), %rdx
pushq $0x6
popq %rdi
movq %rbp, %rsi
movq %r15, %rcx
callq 0x2b3c
movq (%r15), %rdi
leaq 0x70(%rsp), %r15
movq %r15, %rsi
callq 0x31b9
leal -0x2(%r12), %ebp
pushq $0xc
popq %rcx
movq %rsp, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0xd0(%rsp), %rdi
movl %ebp, %esi
callq 0x3ad7
pushq $0xc
popq %rcx
movq %rsp, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0xd0(%rsp), %rdi
movl %ebp, %esi
movq %r12, %rbp
callq 0x3d6b
jmp 0x4d0a
cmpl $0x1, %r12d
movq %r12, %rbp
jne 0x4d84
pushq $0x5
popq %rdi
leaq 0xd0(%rsp), %r12
leaq 0x68(%rsp), %r15
movq %r12, %rsi
movq %r15, %rdx
callq 0x2a10
movq (%r15), %rdx
pushq $0x6
popq %rdi
movq %r12, %rsi
movq %r15, %rcx
callq 0x2b3c
movq (%r15), %rdi
leaq 0x70(%rsp), %r15
movq %r15, %rsi
callq 0x31b9
movq %rbp, %r12
decl %ebp
pushq $0xc
popq %rcx
movq %rsp, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0xd0(%rsp), %rdi
movl %ebp, %esi
callq 0x3ad7
pushq $0xc
popq %rcx
movq %rsp, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0xd0(%rsp), %rdi
movl %ebp, %esi
movq %r12, %rbp
callq 0x3d6b
cmpb $0x0, 0xe3e6(%rip)      # 0x13171
jne 0x4e03
pushq $0x5
popq %rdi
leaq 0xd0(%rsp), %r12
leaq 0x68(%rsp), %r15
movq %r12, %rsi
movq %r15, %rdx
callq 0x2a10
movq (%r15), %rdx
pushq $0x5
popq %rdi
movq %r12, %rsi
movq %r15, %rcx
callq 0x2b3c
movq (%r15), %rdi
leaq 0x70(%rsp), %r15
movq %r15, %rsi
callq 0x31b9
pushq $0xc
popq %r12
movq %r12, %rcx
movq %rsp, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0xd0(%rsp), %rdi
movl %ebp, %esi
callq 0x3ad7
movq %r12, %rcx
movq %rsp, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
leaq 0xd0(%rsp), %rdi
movl %ebp, %esi
callq 0x3d6b
xorl %eax, %eax
cmpb $0x0, 0x1(%rax,%r14)
leaq 0x1(%rax), %rax
je 0x4e05
movl %eax, 0xe31d(%rip)      # 0x13134
movl $0x244, %eax            # imm = 0x244
cmpb $0x0, (%rax,%r14)
leaq -0x1(%rax), %rax
je 0x4e1c
incl %eax
movl %eax, 0xe331(%rip)      # 0x13160
xorl %eax, %eax
cmpb $0x0, 0x1(%rax,%rbx)
leaq 0x1(%rax), %rax
je 0x4e31
movl %eax, 0xe2f6(%rip)      # 0x13138
movl $0x244, %eax            # imm = 0x244
cmpb $0x0, (%rax,%rbx)
leaq -0x1(%rax), %rax
je 0x4e47
incl %eax
movl %eax, 0xe30b(%rip)      # 0x13164
xorl %eax, %eax
cmpb $0x0, 0x1(%rax,%r13)
leaq 0x1(%rax), %rax
je 0x4e5b
movl %eax, 0xe2cf(%rip)      # 0x1313c
addq $0x147a8, %rsp          # imm = 0x147A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq