40f271:	c0 e1 05             	shl    $0x5,%cl
40f274:	80 c1 07             	add    $0x7,%cl
40f277:	02 cb                	add    %bl,%cl
40f279:	66 0f be c1          	movsbw %cl,%ax
40f27d:	0f b7 d8             	movzwl %ax,%ebx
40f280:	8b 4d f8             	mov    -0x8(%ebp),%ecx
40f283:	66 0f be c3          	movsbw %bl,%ax
40f287:	8b 5d fc             	mov    -0x4(%ebp),%ebx
40f28a:	66 89 01             	mov    %ax,(%ecx)
40f28d:	83 46 30 fe          	addl   $0xfffffffe,0x30(%esi)
40f291:	8b 4e 30             	mov    0x30(%esi),%ecx
40f294:	89 4d f8             	mov    %ecx,-0x8(%ebp)
40f297:	eb 95                	jmp    0x40f22e
40f299:	8b 7d f4             	mov    -0xc(%ebp),%edi
40f29c:	8d 41 02             	lea    0x2(%ecx),%eax
40f29f:	2b f9                	sub    %ecx,%edi
40f2a1:	d1 ff                	sar    $1,%edi
40f2a3:	89 7e 34             	mov    %edi,0x34(%esi)
40f2a6:	5f                   	pop    %edi
40f2a7:	89 46 30             	mov    %eax,0x30(%esi)
40f2aa:	5e                   	pop    %esi
40f2ab:	5b                   	pop    %ebx
40f2ac:	c9                   	leave
40f2ad:	c2 0c 00             	ret    $0xc
40f2b0:	8b ff                	mov    %edi,%edi
40f2b2:	55                   	push   %ebp
40f2b3:	8b ec                	mov    %esp,%ebp
40f2b5:	51                   	push   %ecx
40f2b6:	51                   	push   %ecx
40f2b7:	53                   	push   %ebx
40f2b8:	56                   	push   %esi
40f2b9:	8b f1                	mov    %ecx,%esi
40f2bb:	57                   	push   %edi
40f2bc:	8d 4e 3c             	lea    0x3c(%esi),%ecx
40f2bf:	8b b9 04 04 00 00    	mov    0x404(%ecx),%edi
40f2c5:	85 ff                	test   %edi,%edi
40f2c7:	75 02                	jne    0x40f2cb
40f2c9:	8b f9                	mov    %ecx,%edi
40f2cb:	e8 1e e7 ff ff       	call   0x40d9ee
40f2d0:	8b 5d 08             	mov    0x8(%ebp),%ebx
40f2d3:	8d 48 ff             	lea    -0x1(%eax),%ecx
40f2d6:	03 cf                	add    %edi,%ecx
40f2d8:	8b 7d 0c             	mov    0xc(%ebp),%edi
40f2db:	89 4d f8             	mov    %ecx,-0x8(%ebp)
40f2de:	8b d1                	mov    %ecx,%edx
40f2e0:	89 4e 30             	mov    %ecx,0x30(%esi)
40f2e3:	89 4d fc             	mov    %ecx,-0x4(%ebp)
40f2e6:	8b 46 24             	mov    0x24(%esi),%eax
40f2e9:	85 c0                	test   %eax,%eax
40f2eb:	7f 09                	jg     0x40f2f6
40f2ed:	8b c3                	mov    %ebx,%eax
40f2ef:	0b c7                	or     %edi,%eax
40f2f1:	74 32                	je     0x40f325
40f2f3:	8b 46 24             	mov    0x24(%esi),%eax
40f2f6:	48                   	dec    %eax
40f2f7:	89 46 24             	mov    %eax,0x24(%esi)
40f2fa:	8a c3                	mov    %bl,%al
40f2fc:	24 0f                	and    $0xf,%al
40f2fe:	0f ac fb 04          	shrd   $0x4,%edi,%ebx
40f302:	04 30                	add    $0x30,%al
40f304:	c1 ef 04             	shr    $0x4,%edi
40f307:	8a d0                	mov    %al,%dl
40f309:	3c 39                	cmp    $0x39,%al
40f30b:	76 0c                	jbe    0x40f319
40f30d:	8a 45 10             	mov    0x10(%ebp),%al
40f310:	34 01                	xor    $0x1,%al
40f312:	c0 e0 05             	shl    $0x5,%al
40f315:	04 07                	add    $0x7,%al
40f317:	02 c2                	add    %dl,%al
40f319:	88 01                	mov    %al,(%ecx)
40f31b:	ff 4e 30             	decl   0x30(%esi)
40f31e:	8b 56 30             	mov    0x30(%esi),%edx
40f321:	8b ca                	mov    %edx,%ecx
40f323:	eb c1                	jmp    0x40f2e6
40f325:	8b 4d f8             	mov    -0x8(%ebp),%ecx
40f328:	8d 42 01             	lea    0x1(%edx),%eax
40f32b:	2b ca                	sub    %edx,%ecx
40f32d:	89 4e 34             	mov    %ecx,0x34(%esi)
40f330:	5f                   	pop    %edi
40f331:	89 46 30             	mov    %eax,0x30(%esi)
40f334:	5e                   	pop    %esi
40f335:	5b                   	pop    %ebx
40f336:	c9                   	leave
40f337:	c2 0c 00             	ret    $0xc
40f33a:	8b ff                	mov    %edi,%edi
40f33c:	55                   	push   %ebp
40f33d:	8b ec                	mov    %esp,%ebp
40f33f:	51                   	push   %ecx
40f340:	51                   	push   %ecx
40f341:	53                   	push   %ebx
40f342:	56                   	push   %esi
40f343:	8b f1                	mov    %ecx,%esi
40f345:	57                   	push   %edi
40f346:	8d 4e 3c             	lea    0x3c(%esi),%ecx
40f349:	8b b9 04 04 00 00    	mov    0x404(%ecx),%edi
40f34f:	85 ff                	test   %edi,%edi
40f351:	75 02                	jne    0x40f355
40f353:	8b f9                	mov    %ecx,%edi
40f355:	e8 ac e6 ff ff       	call   0x40da06
40f35a:	8b 5d 08             	mov    0x8(%ebp),%ebx
40f35d:	8d 48 ff             	lea    -0x1(%eax),%ecx
40f360:	8d 0c 4f             	lea    (%edi,%ecx,2),%ecx
40f363:	8b 7d 0c             	mov    0xc(%ebp),%edi
40f366:	89 4d f8             	mov    %ecx,-0x8(%ebp)
40f369:	8b d1                	mov    %ecx,%edx
40f36b:	89 4e 30             	mov    %ecx,0x30(%esi)
40f36e:	89 4d fc             	mov    %ecx,-0x4(%ebp)
40f371:	8b 46 24             	mov    0x24(%esi),%eax
40f374:	85 c0                	test   %eax,%eax
40f376:	7f 09                	jg     0x40f381
40f378:	8b c3                	mov    %ebx,%eax
40f37a:	0b c7                	or     %edi,%eax
40f37c:	74 3b                	je     0x40f3b9
40f37e:	8b 46 24             	mov    0x24(%esi),%eax
40f381:	48                   	dec    %eax
40f382:	89 46 24             	mov    %eax,0x24(%esi)
40f385:	8b c3                	mov    %ebx,%eax
40f387:	83 e0 0f             	and    $0xf,%eax
40f38a:	83 c0 30             	add    $0x30,%eax
40f38d:	0f ac fb 04          	shrd   $0x4,%edi,%ebx
40f391:	0f b7 d0             	movzwl %ax,%edx
40f394:	c1 ef 04             	shr    $0x4,%edi
40f397:	83 fa 39             	cmp    $0x39,%edx
40f39a:	76 0f                	jbe    0x40f3ab
40f39c:	8a 45 10             	mov    0x10(%ebp),%al
40f39f:	34 01                	xor    $0x1,%al
40f3a1:	c0 e0 05             	shl    $0x5,%al
40f3a4:	04 07                	add    $0x7,%al
40f3a6:	02 c2                	add    %dl,%al
40f3a8:	0f b6 d0             	movzbl %al,%edx
40f3ab:	66 89 11             	mov    %dx,(%ecx)
40f3ae:	83 46 30 fe          	addl   $0xfffffffe,0x30(%esi)
40f3b2:	8b 56 30             	mov    0x30(%esi),%edx
40f3b5:	8b ca                	mov    %edx,%ecx
40f3b7:	eb b8                	jmp    0x40f371
40f3b9:	8b 4d f8             	mov    -0x8(%ebp),%ecx
40f3bc:	8d 42 02             	lea    0x2(%edx),%eax
40f3bf:	2b ca                	sub    %edx,%ecx
40f3c1:	d1 f9                	sar    $1,%ecx
40f3c3:	89 4e 34             	mov    %ecx,0x34(%esi)
40f3c6:	5f                   	pop    %edi
40f3c7:	89 46 30             	mov    %eax,0x30(%esi)
40f3ca:	5e                   	pop    %esi
40f3cb:	5b                   	pop    %ebx
40f3cc:	c9                   	leave
40f3cd:	c2 0c 00             	ret    $0xc
40f3d0:	8b ff                	mov    %edi,%edi
40f3d2:	55                   	push   %ebp
40f3d3:	8b ec                	mov    %esp,%ebp
40f3d5:	8b 45 18             	mov    0x18(%ebp),%eax
40f3d8:	8b d1                	mov    %ecx,%edx
40f3da:	33 c9                	xor    %ecx,%ecx
40f3dc:	89 42 08             	mov    %eax,0x8(%edx)
40f3df:	8b 45 08             	mov    0x8(%ebp),%eax
40f3e2:	89 0a                	mov    %ecx,(%edx)
40f3e4:	89 4a 04             	mov    %ecx,0x4(%edx)
40f3e7:	89 4a 0c             	mov    %ecx,0xc(%edx)
40f3ea:	89 4a 10             	mov    %ecx,0x10(%edx)
40f3ed:	89 8a 3c 04 00 00    	mov    %ecx,0x43c(%edx)
40f3f3:	89 8a 40 04 00 00    	mov    %ecx,0x440(%edx)
40f3f9:	89 4a 14             	mov    %ecx,0x14(%edx)
40f3fc:	88 4a 18             	mov    %cl,0x18(%edx)
40f3ff:	89 4a 1c             	mov    %ecx,0x1c(%edx)
40f402:	89 4a 20             	mov    %ecx,0x20(%edx)
40f405:	89 4a 24             	mov    %ecx,0x24(%edx)
40f408:	66 89 4a 2c          	mov    %cx,0x2c(%edx)
40f40c:	89 4a 34             	mov    %ecx,0x34(%edx)
40f40f:	88 4a 38             	mov    %cl,0x38(%edx)
40f412:	8b 00                	mov    (%eax),%eax
40f414:	8b 4d 10             	mov    0x10(%ebp),%ecx
40f417:	89 82 48 04 00 00    	mov    %eax,0x448(%edx)
40f41d:	8b 45 0c             	mov    0xc(%ebp),%eax
40f420:	89 02                	mov    %eax,(%edx)
40f422:	8b 45 14             	mov    0x14(%ebp),%eax
40f425:	89 42 0c             	mov    %eax,0xc(%edx)
40f428:	8b 45 1c             	mov    0x1c(%ebp),%eax
40f42b:	89 42 10             	mov    %eax,0x10(%edx)
40f42e:	8b c2                	mov    %edx,%eax
40f430:	89 4a 04             	mov    %ecx,0x4(%edx)
40f433:	5d                   	pop    %ebp
40f434:	c2 18 00             	ret    $0x18
40f437:	8b ff                	mov    %edi,%edi
40f439:	55                   	push   %ebp
40f43a:	8b ec                	mov    %esp,%ebp
40f43c:	8b 45 18             	mov    0x18(%ebp),%eax
40f43f:	8b d1                	mov    %ecx,%edx
40f441:	33 c9                	xor    %ecx,%ecx
40f443:	89 42 08             	mov    %eax,0x8(%edx)
40f446:	33 c0                	xor    %eax,%eax
40f448:	66 89 42 2e          	mov    %ax,0x2e(%edx)
40f44c:	8b 45 08             	mov    0x8(%ebp),%eax
40f44f:	89 0a                	mov    %ecx,(%edx)
40f451:	89 4a 04             	mov    %ecx,0x4(%edx)
40f454:	89 4a 0c             	mov    %ecx,0xc(%edx)
40f457:	89 4a 10             	mov    %ecx,0x10(%edx)
40f45a:	89 8a 3c 04 00 00    	mov    %ecx,0x43c(%edx)
40f460:	89 8a 40 04 00 00    	mov    %ecx,0x440(%edx)
40f466:	89 4a 14             	mov    %ecx,0x14(%edx)
40f469:	88 4a 18             	mov    %cl,0x18(%edx)
40f46c:	89 4a 1c             	mov    %ecx,0x1c(%edx)
40f46f:	89 4a 20             	mov    %ecx,0x20(%edx)
40f472:	89 4a 24             	mov    %ecx,0x24(%edx)
40f475:	88 4a 2c             	mov    %cl,0x2c(%edx)
40f478:	89 4a 34             	mov    %ecx,0x34(%edx)
40f47b:	88 4a 38             	mov    %cl,0x38(%edx)
40f47e:	8b 00                	mov    (%eax),%eax
40f480:	8b 4d 10             	mov    0x10(%ebp),%ecx
40f483:	89 82 48 04 00 00    	mov    %eax,0x448(%edx)
40f489:	8b 45 0c             	mov    0xc(%ebp),%eax
40f48c:	89 02                	mov    %eax,(%edx)
40f48e:	8b 45 14             	mov    0x14(%ebp),%eax
40f491:	89 42 0c             	mov    %eax,0xc(%edx)
40f494:	8b 45 1c             	mov    0x1c(%ebp),%eax
40f497:	89 42 10             	mov    %eax,0x10(%edx)
40f49a:	8b c2                	mov    %edx,%eax
40f49c:	89 4a 04             	mov    %ecx,0x4(%edx)
40f49f:	5d                   	pop    %ebp
40f4a0:	c2 18 00             	ret    $0x18
40f4a3:	8b ff                	mov    %edi,%edi
40f4a5:	56                   	push   %esi
40f4a6:	8b f1                	mov    %ecx,%esi
40f4a8:	ff b6 04 04 00 00    	push   0x404(%esi)
40f4ae:	e8 5d 77 ff ff       	call   0x406c10
40f4b3:	83 a6 04 04 00 00 00 	andl   $0x0,0x404(%esi)
40f4ba:	59                   	pop    %ecx
40f4bb:	5e                   	pop    %esi
40f4bc:	c3                   	ret
40f4bd:	8b ff                	mov    %edi,%edi
40f4bf:	55                   	push   %ebp
40f4c0:	8b ec                	mov    %esp,%ebp
40f4c2:	56                   	push   %esi
40f4c3:	8b f1                	mov    %ecx,%esi
40f4c5:	ff 36                	push   (%esi)
40f4c7:	e8 44 77 ff ff       	call   0x406c10
40f4cc:	8b 55 08             	mov    0x8(%ebp),%edx
40f4cf:	83 26 00             	andl   $0x0,(%esi)
40f4d2:	59                   	pop    %ecx
40f4d3:	8b 02                	mov    (%edx),%eax
40f4d5:	89 06                	mov    %eax,(%esi)
40f4d7:	8b c6                	mov    %esi,%eax
40f4d9:	83 22 00             	andl   $0x0,(%edx)
40f4dc:	5e                   	pop    %esi
40f4dd:	5d                   	pop    %ebp
40f4de:	c2 04 00             	ret    $0x4
40f4e1:	8b ff                	mov    %edi,%edi
40f4e3:	55                   	push   %ebp
40f4e4:	8b ec                	mov    %esp,%ebp
40f4e6:	81 ec 64 04 00 00    	sub    $0x464,%esp
40f4ec:	a1 c0 d0 43 00       	mov    0x43d0c0,%eax
40f4f1:	33 c5                	xor    %ebp,%eax
40f4f3:	89 45 fc             	mov    %eax,-0x4(%ebp)
40f4f6:	53                   	push   %ebx
40f4f7:	56                   	push   %esi
40f4f8:	8b f1                	mov    %ecx,%esi
40f4fa:	57                   	push   %edi
40f4fb:	8b 06                	mov    (%esi),%eax
40f4fd:	8b 7e 04             	mov    0x4(%esi),%edi
40f500:	8b 18                	mov    (%eax),%ebx
40f502:	53                   	push   %ebx
40f503:	e8 d9 e6 00 00       	call   0x41dbe1
40f508:	88 85 9c fb ff ff    	mov    %al,-0x464(%ebp)
40f50e:	8b 06                	mov    (%esi),%eax
40f510:	59                   	pop    %ecx
40f511:	8d 8d a4 fb ff ff    	lea    -0x45c(%ebp),%ecx
40f517:	8b 00                	mov    (%eax),%eax
40f519:	89 85 a0 fb ff ff    	mov    %eax,-0x460(%ebp)
40f51f:	8b 46 10             	mov    0x10(%esi),%eax
40f522:	ff 30                	push   (%eax)
40f524:	8b 46 0c             	mov    0xc(%esi),%eax
40f527:	ff 76 04             	push   0x4(%esi)
40f52a:	ff 30                	push   (%eax)
40f52c:	8b 46 08             	mov    0x8(%esi),%eax
40f52f:	ff 70 04             	push   0x4(%eax)
40f532:	ff 30                	push   (%eax)
40f534:	8d 85 a0 fb ff ff    	lea    -0x460(%ebp),%eax
40f53a:	50                   	push   %eax
40f53b:	e8 90 fe ff ff       	call   0x40f3d0
40f540:	83 65 f4 00          	andl   $0x0,-0xc(%ebp)
40f544:	8d 8d a4 fb ff ff    	lea    -0x45c(%ebp),%ecx
40f54a:	e8 8d 02 00 00       	call   0x40f7dc
40f54f:	8d 8d e0 fb ff ff    	lea    -0x420(%ebp),%ecx
40f555:	8b f0                	mov    %eax,%esi
40f557:	e8 47 ff ff ff       	call   0x40f4a3
40f55c:	57                   	push   %edi
40f55d:	53                   	push   %ebx
40f55e:	ff b5 9c fb ff ff    	push   -0x464(%ebp)
40f564:	e8 23 e7 00 00       	call   0x41dc8c
40f569:	8b 4d fc             	mov    -0x4(%ebp),%ecx
40f56c:	83 c4 0c             	add    $0xc,%esp
40f56f:	8b c6                	mov    %esi,%eax
40f571:	33 cd                	xor    %ebp,%ecx
40f573:	5f                   	pop    %edi
40f574:	5e                   	pop    %esi
40f575:	5b                   	pop    %ebx
40f576:	e8 2c a7 ff ff       	call   0x409ca7
40f57b:	c9                   	leave
40f57c:	c3                   	ret
40f57d:	8b ff                	mov    %edi,%edi
40f57f:	55                   	push   %ebp
40f580:	8b ec                	mov    %esp,%ebp
40f582:	8b 45 0c             	mov    0xc(%ebp),%eax
40f585:	8b 4d 08             	mov    0x8(%ebp),%ecx
40f588:	53                   	push   %ebx
40f589:	8b 00                	mov    (%eax),%eax
40f58b:	8b 80 88 00 00 00    	mov    0x88(%eax),%eax
40f591:	8b 00                	mov    (%eax),%eax
40f593:	8a 18                	mov    (%eax),%bl
40f595:	8a 01                	mov    (%ecx),%al
40f597:	84 c0                	test   %al,%al
40f599:	74 11                	je     0x40f5ac
40f59b:	8a d0                	mov    %al,%dl
40f59d:	8a c2                	mov    %dl,%al
40f59f:	3a d3                	cmp    %bl,%dl
40f5a1:	74 09                	je     0x40f5ac
40f5a3:	41                   	inc    %ecx
40f5a4:	8a 01                	mov    (%ecx),%al
40f5a6:	8a d0                	mov    %al,%dl
40f5a8:	84 c0                	test   %al,%al
40f5aa:	75 f1                	jne    0x40f59d
40f5ac:	41                   	inc    %ecx
40f5ad:	84 c0                	test   %al,%al
40f5af:	74 29                	je     0x40f5da
40f5b1:	eb 09                	jmp    0x40f5bc
40f5b3:	3c 65                	cmp    $0x65,%al
40f5b5:	74 0b                	je     0x40f5c2
40f5b7:	3c 45                	cmp    $0x45,%al
40f5b9:	74 07                	je     0x40f5c2
40f5bb:	41                   	inc    %ecx
40f5bc:	8a 01                	mov    (%ecx),%al
40f5be:	84 c0                	test   %al,%al
40f5c0:	75 f1                	jne    0x40f5b3
40f5c2:	8b d1                	mov    %ecx,%edx
40f5c4:	49                   	dec    %ecx
40f5c5:	8a 01                	mov    (%ecx),%al
40f5c7:	3c 30                	cmp    $0x30,%al
40f5c9:	74 f9                	je     0x40f5c4
40f5cb:	3a c3                	cmp    %bl,%al
40f5cd:	75 01                	jne    0x40f5d0
40f5cf:	49                   	dec    %ecx
40f5d0:	8a 02                	mov    (%edx),%al
40f5d2:	42                   	inc    %edx
40f5d3:	41                   	inc    %ecx
40f5d4:	88 01                	mov    %al,(%ecx)
40f5d6:	84 c0                	test   %al,%al
40f5d8:	75 f6                	jne    0x40f5d0
40f5da:	5b                   	pop    %ebx
40f5db:	5d                   	pop    %ebp
40f5dc:	c3                   	ret
40f5dd:	8b ff                	mov    %edi,%edi
40f5df:	55                   	push   %ebp