40a466:	72 78                	jb     0x40a4e0
40a468:	66 83 ff 0c          	cmp    $0xc,%di
40a46c:	77 72                	ja     0x40a4e0
40a46e:	66 83 fb 01          	cmp    $0x1,%bx
40a472:	72 6c                	jb     0x40a4e0
40a474:	0f b7 c7             	movzwl %di,%eax
40a477:	66 3b 5c 46 fe       	cmp    -0x2(%esi,%eax,2),%bx
40a47c:	77 62                	ja     0x40a4e0
40a47e:	0f b7 c7             	movzwl %di,%eax
40a481:	48                   	dec    %eax
40a482:	85 c0                	test   %eax,%eax
40a484:	7e 0e                	jle    0x40a494
40a486:	b9 01 00 00 00       	mov    $0x1,%ecx
40a48b:	66 03 5c 4e fe       	add    -0x2(%esi,%ecx,2),%bx
40a490:	41                   	inc    %ecx
40a491:	48                   	dec    %eax
40a492:	75 f7                	jne    0x40a48b
40a494:	0f b7 4d fe          	movzwl -0x2(%ebp),%ecx
40a498:	49                   	dec    %ecx
40a499:	8b c1                	mov    %ecx,%eax
40a49b:	be 64 00 00 00       	mov    $0x64,%esi
40a4a0:	99                   	cltd
40a4a1:	f7 fe                	idiv   %esi
40a4a3:	69 f1 6d 01 00 00    	imul   $0x16d,%ecx,%esi
40a4a9:	8b d1                	mov    %ecx,%edx
40a4ab:	85 d2                	test   %edx,%edx
40a4ad:	79 03                	jns    0x40a4b2
40a4af:	83 c2 03             	add    $0x3,%edx
40a4b2:	c1 fa 02             	sar    $0x2,%edx
40a4b5:	03 f2                	add    %edx,%esi
40a4b7:	2b f0                	sub    %eax,%esi
40a4b9:	8b c1                	mov    %ecx,%eax
40a4bb:	b9 90 01 00 00       	mov    $0x190,%ecx
40a4c0:	99                   	cltd
40a4c1:	f7 f9                	idiv   %ecx
40a4c3:	03 f0                	add    %eax,%esi
40a4c5:	0f b7 c3             	movzwl %bx,%eax
40a4c8:	03 f0                	add    %eax,%esi
40a4ca:	81 ee 5a 95 0a 00    	sub    $0xa955a,%esi
40a4d0:	89 75 f8             	mov    %esi,-0x8(%ebp)
40a4d3:	db 45 f8             	fildl  -0x8(%ebp)
40a4d6:	8b 45 08             	mov    0x8(%ebp),%eax
40a4d9:	dd 18                	fstpl  (%eax)
40a4db:	9b                   	fwait
40a4dc:	c6 45 fd 01          	movb   $0x1,-0x3(%ebp)
40a4e0:	0f b6 45 fd          	movzbl -0x3(%ebp),%eax
40a4e4:	5f                   	pop    %edi
40a4e5:	5e                   	pop    %esi
40a4e6:	5b                   	pop    %ebx
40a4e7:	59                   	pop    %ecx
40a4e8:	59                   	pop    %ecx
40a4e9:	5d                   	pop    %ebp
40a4ea:	c2 04 00             	ret    $0x4
40a4ed:	8d 40 00             	lea    0x0(%eax),%eax
40a4f0:	55                   	push   %ebp
40a4f1:	8b ec                	mov    %esp,%ebp
40a4f3:	83 c4 e8             	add    $0xffffffe8,%esp
40a4f6:	53                   	push   %ebx
40a4f7:	56                   	push   %esi
40a4f8:	89 4d f4             	mov    %ecx,-0xc(%ebp)
40a4fb:	89 55 f8             	mov    %edx,-0x8(%ebp)
40a4fe:	89 45 fc             	mov    %eax,-0x4(%ebp)
40a501:	8b 5d 08             	mov    0x8(%ebp),%ebx
40a504:	ff 75 10             	push   0x10(%ebp)
40a507:	ff 75 0c             	push   0xc(%ebp)
40a50a:	8d 45 e8             	lea    -0x18(%ebp),%eax
40a50d:	e8 c6 fd ff ff       	call   0x40a2d8
40a512:	8b 4d ec             	mov    -0x14(%ebp),%ecx
40a515:	85 c9                	test   %ecx,%ecx
40a517:	7f 24                	jg     0x40a53d
40a519:	8b 45 fc             	mov    -0x4(%ebp),%eax
40a51c:	66 c7 00 00 00       	movw   $0x0,(%eax)
40a521:	8b 45 f8             	mov    -0x8(%ebp),%eax
40a524:	66 c7 00 00 00       	movw   $0x0,(%eax)
40a529:	8b 45 f4             	mov    -0xc(%ebp),%eax
40a52c:	66 c7 00 00 00       	movw   $0x0,(%eax)
40a531:	66 c7 03 00 00       	movw   $0x0,(%ebx)
40a536:	33 d2                	xor    %edx,%edx
40a538:	e9 f2 00 00 00       	jmp    0x40a62f
40a53d:	8b c1                	mov    %ecx,%eax
40a53f:	be 07 00 00 00       	mov    $0x7,%esi
40a544:	99                   	cltd
40a545:	f7 fe                	idiv   %esi
40a547:	42                   	inc    %edx
40a548:	66 89 13             	mov    %dx,(%ebx)
40a54b:	49                   	dec    %ecx
40a54c:	66 bb 01 00          	mov    $0x1,%bx
40a550:	81 f9 b1 3a 02 00    	cmp    $0x23ab1,%ecx
40a556:	7c 13                	jl     0x40a56b
40a558:	81 e9 b1 3a 02 00    	sub    $0x23ab1,%ecx
40a55e:	66 81 c3 90 01       	add    $0x190,%bx
40a563:	81 f9 b1 3a 02 00    	cmp    $0x23ab1,%ecx
40a569:	7d ed                	jge    0x40a558
40a56b:	8d 45 f2             	lea    -0xe(%ebp),%eax
40a56e:	50                   	push   %eax
40a56f:	8d 45 f0             	lea    -0x10(%ebp),%eax
40a572:	66 ba ac 8e          	mov    $0x8eac,%dx
40a576:	91                   	xchg   %eax,%ecx
40a577:	e8 ac e1 ff ff       	call   0x408728
40a57c:	66 83 7d f0 04       	cmpw   $0x4,-0x10(%ebp)
40a581:	75 0a                	jne    0x40a58d
40a583:	66 ff 4d f0          	decw   -0x10(%ebp)
40a587:	66 81 45 f2 ac 8e    	addw   $0x8eac,-0xe(%ebp)
40a58d:	66 6b 45 f0 64       	imul   $0x64,-0x10(%ebp),%ax
40a592:	66 03 d8             	add    %ax,%bx
40a595:	8d 45 f2             	lea    -0xe(%ebp),%eax
40a598:	50                   	push   %eax
40a599:	8d 4d f0             	lea    -0x10(%ebp),%ecx
40a59c:	0f b7 45 f2          	movzwl -0xe(%ebp),%eax
40a5a0:	66 ba b5 05          	mov    $0x5b5,%dx
40a5a4:	e8 7f e1 ff ff       	call   0x408728
40a5a9:	0f b7 45 f0          	movzwl -0x10(%ebp),%eax
40a5ad:	03 c0                	add    %eax,%eax
40a5af:	03 c0                	add    %eax,%eax
40a5b1:	66 03 d8             	add    %ax,%bx
40a5b4:	8d 45 f2             	lea    -0xe(%ebp),%eax
40a5b7:	50                   	push   %eax
40a5b8:	8d 4d f0             	lea    -0x10(%ebp),%ecx
40a5bb:	0f b7 45 f2          	movzwl -0xe(%ebp),%eax
40a5bf:	66 ba 6d 01          	mov    $0x16d,%dx
40a5c3:	e8 60 e1 ff ff       	call   0x408728
40a5c8:	66 83 7d f0 04       	cmpw   $0x4,-0x10(%ebp)
40a5cd:	75 0a                	jne    0x40a5d9
40a5cf:	66 ff 4d f0          	decw   -0x10(%ebp)
40a5d3:	66 81 45 f2 6d 01    	addw   $0x16d,-0xe(%ebp)
40a5d9:	66 03 5d f0          	add    -0x10(%ebp),%bx
40a5dd:	8b c3                	mov    %ebx,%eax
40a5df:	e8 04 fe ff ff       	call   0x40a3e8
40a5e4:	8b d0                	mov    %eax,%edx
40a5e6:	0f b6 c2             	movzbl %dl,%eax
40a5e9:	8d 04 40             	lea    (%eax,%eax,2),%eax
40a5ec:	8d 34 c5 d8 b7 49 00 	lea    0x49b7d8(,%eax,8),%esi
40a5f3:	66 b8 01 00          	mov    $0x1,%ax
40a5f7:	0f b7 c8             	movzwl %ax,%ecx
40a5fa:	0f b7 4c 4e fe       	movzwl -0x2(%esi,%ecx,2),%ecx
40a5ff:	66 89 4d f0          	mov    %cx,-0x10(%ebp)
40a603:	0f b7 4d f2          	movzwl -0xe(%ebp),%ecx
40a607:	66 3b 4d f0          	cmp    -0x10(%ebp),%cx
40a60b:	72 0b                	jb     0x40a618
40a60d:	0f b7 4d f0          	movzwl -0x10(%ebp),%ecx
40a611:	66 29 4d f2          	sub    %cx,-0xe(%ebp)
40a615:	40                   	inc    %eax
40a616:	eb df                	jmp    0x40a5f7
40a618:	8b 4d fc             	mov    -0x4(%ebp),%ecx
40a61b:	66 89 19             	mov    %bx,(%ecx)
40a61e:	8b 4d f8             	mov    -0x8(%ebp),%ecx
40a621:	66 89 01             	mov    %ax,(%ecx)
40a624:	0f b7 45 f2          	movzwl -0xe(%ebp),%eax
40a628:	40                   	inc    %eax
40a629:	8b 4d f4             	mov    -0xc(%ebp),%ecx
40a62c:	66 89 01             	mov    %ax,(%ecx)
40a62f:	8b c2                	mov    %edx,%eax
40a631:	5e                   	pop    %esi
40a632:	5b                   	pop    %ebx
40a633:	8b e5                	mov    %ebp,%esp
40a635:	5d                   	pop    %ebp
40a636:	c2 0c 00             	ret    $0xc
40a639:	8d 40 00             	lea    0x0(%eax),%eax
40a63c:	55                   	push   %ebp
40a63d:	8b ec                	mov    %esp,%ebp
40a63f:	51                   	push   %ecx
40a640:	56                   	push   %esi
40a641:	8b f0                	mov    %eax,%esi
40a643:	ff 75 0c             	push   0xc(%ebp)
40a646:	ff 75 08             	push   0x8(%ebp)
40a649:	8d 45 fe             	lea    -0x2(%ebp),%eax
40a64c:	50                   	push   %eax
40a64d:	8b c6                	mov    %esi,%eax
40a64f:	e8 9c fe ff ff       	call   0x40a4f0
40a654:	5e                   	pop    %esi
40a655:	59                   	pop    %ecx
40a656:	5d                   	pop    %ebp
40a657:	c2 08 00             	ret    $0x8
40a65a:	8b c0                	mov    %eax,%eax
40a65c:	55                   	push   %ebp
40a65d:	8b ec                	mov    %esp,%ebp
40a65f:	83 c4 f8             	add    $0xfffffff8,%esp
40a662:	ff 75 0c             	push   0xc(%ebp)
40a665:	ff 75 08             	push   0x8(%ebp)
40a668:	8d 45 f8             	lea    -0x8(%ebp),%eax
40a66b:	e8 68 fc ff ff       	call   0x40a2d8
40a670:	8b 45 fc             	mov    -0x4(%ebp),%eax
40a673:	b9 07 00 00 00       	mov    $0x7,%ecx
40a678:	99                   	cltd
40a679:	f7 f9                	idiv   %ecx
40a67b:	8b c2                	mov    %edx,%eax
40a67d:	40                   	inc    %eax
40a67e:	59                   	pop    %ecx
40a67f:	59                   	pop    %ecx
40a680:	5d                   	pop    %ebp
40a681:	c2 08 00             	ret    $0x8
40a684:	83 c4 f0             	add    $0xfffffff0,%esp
40a687:	54                   	push   %esp
40a688:	e8 9b c3 ff ff       	call   0x406a28
40a68d:	0f b7 04 24          	movzwl (%esp),%eax
40a691:	83 c4 10             	add    $0x10,%esp
40a694:	c3                   	ret
40a695:	8d 40 00             	lea    0x0(%eax),%eax
40a698:	55                   	push   %ebp
40a699:	8b ec                	mov    %esp,%ebp
40a69b:	53                   	push   %ebx
40a69c:	8b 4d 08             	mov    0x8(%ebp),%ecx
40a69f:	bb 00 01 00 00       	mov    $0x100,%ebx
40a6a4:	2b 99 fc fe ff ff    	sub    -0x104(%ecx),%ebx
40a6aa:	3b d3                	cmp    %ebx,%edx
40a6ac:	7d 02                	jge    0x40a6b0
40a6ae:	8b da                	mov    %edx,%ebx
40a6b0:	85 db                	test   %ebx,%ebx
40a6b2:	74 1a                	je     0x40a6ce
40a6b4:	8b 55 08             	mov    0x8(%ebp),%edx
40a6b7:	8b 92 fc fe ff ff    	mov    -0x104(%edx),%edx
40a6bd:	8b 4d 08             	mov    0x8(%ebp),%ecx
40a6c0:	8d 94 11 00 ff ff ff 	lea    -0x100(%ecx,%edx,1),%edx
40a6c7:	8b cb                	mov    %ebx,%ecx
40a6c9:	e8 1e 88 ff ff       	call   0x402eec
40a6ce:	8b 45 08             	mov    0x8(%ebp),%eax
40a6d1:	01 98 fc fe ff ff    	add    %ebx,-0x104(%eax)
40a6d7:	5b                   	pop    %ebx
40a6d8:	5d                   	pop    %ebp
40a6d9:	c3                   	ret
40a6da:	8b c0                	mov    %eax,%eax
40a6dc:	55                   	push   %ebp
40a6dd:	8b ec                	mov    %esp,%ebp
40a6df:	8b d0                	mov    %eax,%edx
40a6e1:	85 d2                	test   %edx,%edx
40a6e3:	74 05                	je     0x40a6ea
40a6e5:	83 ea 04             	sub    $0x4,%edx
40a6e8:	8b 12                	mov    (%edx),%edx
40a6ea:	8b 4d 08             	mov    0x8(%ebp),%ecx
40a6ed:	51                   	push   %ecx
40a6ee:	e8 a5 ff ff ff       	call   0x40a698
40a6f3:	59                   	pop    %ecx
40a6f4:	5d                   	pop    %ebp
40a6f5:	c3                   	ret
40a6f6:	8b c0                	mov    %eax,%eax
40a6f8:	55                   	push   %ebp
40a6f9:	8b ec                	mov    %esp,%ebp
40a6fb:	83 c4 e0             	add    $0xffffffe0,%esp
40a6fe:	53                   	push   %ebx
40a6ff:	56                   	push   %esi
40a700:	8b f2                	mov    %edx,%esi
40a702:	8b d8                	mov    %eax,%ebx
40a704:	8b 45 08             	mov    0x8(%ebp),%eax
40a707:	50                   	push   %eax
40a708:	6a 04                	push   $0x4
40a70a:	89 75 e0             	mov    %esi,-0x20(%ebp)
40a70d:	c6 45 e4 00          	movb   $0x0,-0x1c(%ebp)
40a711:	89 5d e8             	mov    %ebx,-0x18(%ebp)
40a714:	c6 45 ec 00          	movb   $0x0,-0x14(%ebp)
40a718:	8d 45 e0             	lea    -0x20(%ebp),%eax
40a71b:	50                   	push   %eax
40a71c:	6a 01                	push   $0x1
40a71e:	b9 80 b8 49 00       	mov    $0x49b880,%ecx
40a723:	8d 45 f0             	lea    -0x10(%ebp),%eax
40a726:	ba 10 00 00 00       	mov    $0x10,%edx
40a72b:	e8 3c ef ff ff       	call   0x40966c
40a730:	8b d0                	mov    %eax,%edx
40a732:	8d 45 f0             	lea    -0x10(%ebp),%eax
40a735:	e8 5e ff ff ff       	call   0x40a698
40a73a:	59                   	pop    %ecx
40a73b:	5e                   	pop    %esi
40a73c:	5b                   	pop    %ebx
40a73d:	8b e5                	mov    %ebp,%esp
40a73f:	5d                   	pop    %ebp
40a740:	c3                   	ret
40a741:	8d 40 00             	lea    0x0(%eax),%eax
40a744:	55                   	push   %ebp
40a745:	8b ec                	mov    %esp,%ebp
40a747:	53                   	push   %ebx
40a748:	8b 45 08             	mov    0x8(%ebp),%eax
40a74b:	83 c0 fc             	add    $0xfffffffc,%eax
40a74e:	8b 10                	mov    (%eax),%edx
40a750:	eb 02                	jmp    0x40a754
40a752:	ff 00                	incl   (%eax)
40a754:	8b 08                	mov    (%eax),%ecx
40a756:	0f b6 09             	movzbl (%ecx),%ecx
40a759:	8b 5d 08             	mov    0x8(%ebp),%ebx
40a75c:	3a 4b fb             	cmp    -0x5(%ebx),%cl
40a75f:	74 f1                	je     0x40a752
40a761:	8b 00                	mov    (%eax),%eax
40a763:	2b c2                	sub    %edx,%eax
40a765:	40                   	inc    %eax
40a766:	8b 55 08             	mov    0x8(%ebp),%edx
40a769:	89 42 f4             	mov    %eax,-0xc(%edx)
40a76c:	5b                   	pop    %ebx
40a76d:	5d                   	pop    %ebp
40a76e:	c3                   	ret
40a76f:	90                   	nop
40a770:	55                   	push   %ebp
40a771:	8b ec                	mov    %esp,%ebp
40a773:	8b 45 08             	mov    0x8(%ebp),%eax
40a776:	80 78 ed 00          	cmpb   $0x0,-0x13(%eax)
40a77a:	75 2a                	jne    0x40a7a6
40a77c:	8b 45 08             	mov    0x8(%ebp),%eax
40a77f:	8b 40 08             	mov    0x8(%eax),%eax
40a782:	ff 70 0c             	push   0xc(%eax)
40a785:	ff 70 08             	push   0x8(%eax)
40a788:	8b 45 08             	mov    0x8(%ebp),%eax
40a78b:	8d 48 ee             	lea    -0x12(%eax),%ecx
40a78e:	8b 45 08             	mov    0x8(%ebp),%eax
40a791:	8d 50 f0             	lea    -0x10(%eax),%edx
40a794:	8b 45 08             	mov    0x8(%ebp),%eax
40a797:	83 c0 f2             	add    $0xfffffff2,%eax
40a79a:	e8 9d fe ff ff       	call   0x40a63c
40a79f:	8b 45 08             	mov    0x8(%ebp),%eax
40a7a2:	c6 40 ed 01          	movb   $0x1,-0x13(%eax)
40a7a6:	5d                   	pop    %ebp
40a7a7:	c3                   	ret
40a7a8:	55                   	push   %ebp
40a7a9:	8b ec                	mov    %esp,%ebp
40a7ab:	8b 45 08             	mov    0x8(%ebp),%eax
40a7ae:	80 78 e3 00          	cmpb   $0x0,-0x1d(%eax)
40a7b2:	75 31                	jne    0x40a7e5
40a7b4:	8b 45 08             	mov    0x8(%ebp),%eax
40a7b7:	8b 40 08             	mov    0x8(%eax),%eax
40a7ba:	ff 70 0c             	push   0xc(%eax)
40a7bd:	ff 70 08             	push   0x8(%eax)
40a7c0:	8b 45 08             	mov    0x8(%ebp),%eax
40a7c3:	83 c0 e4             	add    $0xffffffe4,%eax
40a7c6:	50                   	push   %eax
40a7c7:	8b 45 08             	mov    0x8(%ebp),%eax
40a7ca:	8d 48 e6             	lea    -0x1a(%eax),%ecx
40a7cd:	8b 45 08             	mov    0x8(%ebp),%eax
40a7d0:	8d 50 e8             	lea    -0x18(%eax),%edx
40a7d3:	8b 45 08             	mov    0x8(%ebp),%eax
40a7d6:	83 c0 ea             	add    $0xffffffea,%eax
40a7d9:	e8 ae fb ff ff       	call   0x40a38c
40a7de:	8b 45 08             	mov    0x8(%ebp),%eax
40a7e1:	c6 40 e3 01          	movb   $0x1,-0x1d(%eax)
40a7e5:	5d                   	pop    %ebp
40a7e6:	c3                   	ret
40a7e7:	90                   	nop
40a7e8:	55                   	push   %ebp
40a7e9:	8b ec                	mov    %esp,%ebp
40a7eb:	81 c4 e4 fe ff ff    	add    $0xfffffee4,%esp
40a7f1:	53                   	push   %ebx
40a7f2:	56                   	push   %esi
40a7f3:	33 c9                	xor    %ecx,%ecx
40a7f5:	89 8d e4 fe ff ff    	mov    %ecx,-0x11c(%ebp)
40a7fb:	89 4d fc             	mov    %ecx,-0x4(%ebp)
40a7fe:	8b da                	mov    %edx,%ebx
40a800:	8b f0                	mov    %eax,%esi
40a802:	33 c0                	xor    %eax,%eax
40a804:	55                   	push   %ebp
40a805:	68 4a a9 40 00       	push   $0x40a94a
40a80a:	64 ff 30             	push   %fs:(%eax)
40a80d:	64 89 20             	mov    %esp,%fs:(%eax)
40a810:	8b c3                	mov    %ebx,%eax
40a812:	e8 31 9f ff ff       	call   0x404748
40a817:	8b 45 08             	mov    0x8(%ebp),%eax