mov eax,edi
pushad
xor ecx,ecx
lea edx,[ebp+ebp*02h]
lea edi,[ebx+ebp]
neg ebp
@mark0:
sub edx,04h
mov [ebx+edx],ecx
jg @mark0
mov byte ptr [edi+00h],01h
@@REDUCE_ROWS:
mov ebx,ebp
@rowmin:
mov esi,02000000h
mov ecx,ebp
xor edx,edx
@findrowmin:
cmp esi,[eax]
cmovz edx,ecx
cmova esi,[eax]
add eax,04h
add ecx,04h
jnz @findrowmin
sub ecx,ebp
cmp esi,02000000h
jz @specific
add eax,ebp
@subrow:
xor edx,edx
cmp byte ptr [eax+03h],00h
cmovz edx,esi
sub [eax],edx
add eax,04h
sub ecx,04h
jnz @subrow
add ebx,04h
jnz @rowmin
jmp @@RECUDE_COLUMNS
@specific:
cmp byte ptr [edi+edx],00h
mov byte ptr [edi+edx],01h
jnz @@ABNORMAL_EXIT
add ecx,ebx
sub dword ptr [esp+__SYS0],04h
mov byte ptr [edi+ebx+02h],01h
mov [edi+ecx*02h+__0STAR],edx
jz @count_result_STACK
add ebx,04h
jnz @rowmin
@@RECUDE_COLUMNS:
sub ebx,04h
sub eax,04h
cmp ebx,ebp
jl @@2ND_STEP
test byte ptr [edi+ebx],01h
jnz @@RECUDE_COLUMNS
mov esi,02000000h
mov ecx,ebp
@findcolmin:
cmp esi,[eax]
cmova esi,[eax]
add eax,ebp
add ecx,04h
jnz @findcolmin
cmp esi,02000000h
lea ecx,[ebp-04h]
jz @@ABNORMAL_EXIT
@subcol:
xor edx,edx
add ecx,04h
jz @@RECUDE_COLUMNS
sub eax,ebp
cmp [eax+03h],dl
cmovz edx,esi
sub [eax],edx
jnz @subcol
mov dl,[edi+ecx+02h]
or dl,[edi+ebx]
mov edx,ecx
jnz @subcol
mov byte ptr [edi+ebx],01h
sub edx,ebp
mov byte ptr [edi+ecx+02h],01h
sub dword ptr [esp+__SYS0],04h
mov [edi+edx*02h+__0STAR],ebx
jnz @subcol
jmp @count_result_STACK
@@ABNORMAL_EXIT:
add esp,20h
xor eax,eax
mov edx,7FFFFFFFh
stc
ret
@@3RD_STEP:
mov byte ptr [edi+ebx],0FFh
mov byte ptr [edi+edx],00h
mov [edi+eax*02h+__COLON],ecx
@@2ND_STEP:
lea ecx,[ebp-04h]
xor ebx,ebx
mov edx,00FFFFFFh
@chk2mtx:
mov esi,eax
sub eax,ebp
sub ebx,ebp
imul eax,ebx
add ebx,ecx
test esi,esi
lea eax,[eax+ebx]
cmovns eax,esi
mov esi,[esp+__MTX]
@check2col:
add ecx,04h
jz @@5TH_STEP
cmp byte ptr [edi+ecx],00h
jnz @check2col
add esi,ecx
sal ecx,08h
mov ebx,ebp
@zeroincol:
sub esi,ebp
mov cl,[edi+ebx+03h]
cmp edx,[esi]
sbb cl,00h
cmovz edx,[esi]
cmovz eax,ebx
add ebx,04h
jnz @zeroincol
sar ecx,08h
test edx,edx
jnz @chk2mtx
lea ebx,[eax+03h]
sub eax,ebp
add edx,[edi+eax*02h+__0STAR]
jnz @@3RD_STEP
sub edx,ebp
jmp @newstar
@@5TH_STEP:
lea ebx,[ebp+03h]
mov [esp+__FREE0],eax
@nx5row:
mov eax,edx
sub ecx,edx
xor eax,[edi+ebx-03h]
cmovs edx,ecx
mov ecx,ebp
@decrease_row_free:
bt dword ptr [edi+ecx],00h
mov al,[esi+03h]
adc al,[edi+ebx]
mov eax,00000000h
cmovz eax,edx
sub [esi],eax
add esi,04h
add ecx,04h
jnz @decrease_row_free
add ebx,04h
js @nx5row
mov eax,[esp+__FREE0]
xor edx,edx
sub ecx,ebp
div ecx
lea ecx,[edx+ebp]
xor edx,edx
lea ebx,[ebp+eax+03h]
add edx,[edi+eax*02h+__0STAR]
jnz @@3RD_STEP
@@4TH_STEP:
sub edx,ebp
jmp @newstar
@0_star:
mov [edi+ebx*02h+__0STAR],ecx
mov ecx,[edi+eax*02h+__COLON]
@newstar:
mov ebx,eax
lea eax,[edx-04h]
@starincol:
cmp [edi+eax*02h+__0STAR],ecx
jz @0_star
sub eax,04h
jns @starincol
mov [edi+ebx*02h+__0STAR],ecx
@@1ST_STEP:
sub dword ptr [esp+__SYS0],04h
mov ebx,edi
mov ecx,ebp
jz @count_result_STACK
@restructure:
mov esi,[ebx+__0STAR]
mov byte ptr [edi+ecx+03h],00h
add ebx,08h
mov byte ptr [edi+esi],01h
add ecx,04h
jnz @restructure
jmp @@2ND_STEP
@count_result_STACK:
xor ecx,ecx
neg ebp
xor eax,eax
mov esi,[esp+__SAVE]
mov ebx,[esp+__MARKS]
add esp,20h
@results:
mov edx,[edi+ecx*02h+__0STAR]
add ecx,04h
add edx,ebp
add eax,[esi+edx]
shr edx,02h
add esi,ebp
cmp ecx,ebp
mov [ebx],dl
lea ebx,[ebx+01h]
jnz @results
Arguing on the Internet is like running in the Special Olympics. Even if you win, you are still ... ˙˙˙ Real Eyes Realize Real Lies ˙˙˙