40f6b6:	8b 4b 3c             	mov    0x3c(%ebx),%ecx
40f6b9:	0f b7 3c 51          	movzwl (%ecx,%edx,2),%edi
40f6bd:	8b 53 2c             	mov    0x2c(%ebx),%edx
40f6c0:	23 d0                	and    %eax,%edx
40f6c2:	8b 4b 38             	mov    0x38(%ebx),%ecx
40f6c5:	66 89 3c 51          	mov    %di,(%ecx,%edx,2)
40f6c9:	8b 53 3c             	mov    0x3c(%ebx),%edx
40f6cc:	8b 4b 40             	mov    0x40(%ebx),%ecx
40f6cf:	66 89 04 4a          	mov    %ax,(%edx,%ecx,2)
40f6d3:	40                   	inc    %eax
40f6d4:	8b d6                	mov    %esi,%edx
40f6d6:	83 ea 03             	sub    $0x3,%edx
40f6d9:	3b c2                	cmp    %edx,%eax
40f6db:	76 c1                	jbe    0x40f69e
40f6dd:	85 ff                	test   %edi,%edi
40f6df:	33 c0                	xor    %eax,%eax
40f6e1:	59                   	pop    %ecx
40f6e2:	5a                   	pop    %edx
40f6e3:	5d                   	pop    %ebp
40f6e4:	5f                   	pop    %edi
40f6e5:	5e                   	pop    %esi
40f6e6:	5b                   	pop    %ebx
40f6e7:	c3                   	ret
40f6e8:	53                   	push   %ebx
40f6e9:	85 c0                	test   %eax,%eax
40f6eb:	74 12                	je     0x40f6ff
40f6ed:	83 78 1c 00          	cmpl   $0x0,0x1c(%eax)
40f6f1:	74 0c                	je     0x40f6ff
40f6f3:	83 78 20 00          	cmpl   $0x0,0x20(%eax)
40f6f7:	74 06                	je     0x40f6ff
40f6f9:	83 78 24 00          	cmpl   $0x0,0x24(%eax)
40f6fd:	75 07                	jne    0x40f706
40f6ff:	b8 fe ff ff ff       	mov    $0xfffffffe,%eax
40f704:	5b                   	pop    %ebx
40f705:	c3                   	ret
40f706:	33 d2                	xor    %edx,%edx
40f708:	33 c9                	xor    %ecx,%ecx
40f70a:	89 50 14             	mov    %edx,0x14(%eax)
40f70d:	89 50 08             	mov    %edx,0x8(%eax)
40f710:	89 48 18             	mov    %ecx,0x18(%eax)
40f713:	33 d2                	xor    %edx,%edx
40f715:	c7 40 2c 02 00 00 00 	movl   $0x2,0x2c(%eax)
40f71c:	8b 58 1c             	mov    0x1c(%eax),%ebx
40f71f:	89 53 14             	mov    %edx,0x14(%ebx)
40f722:	8b 4b 08             	mov    0x8(%ebx),%ecx
40f725:	89 4b 10             	mov    %ecx,0x10(%ebx)
40f728:	83 7b 18 00          	cmpl   $0x0,0x18(%ebx)
40f72c:	7d 05                	jge    0x40f733
40f72e:	33 d2                	xor    %edx,%edx
40f730:	89 53 18             	mov    %edx,0x18(%ebx)
40f733:	83 7b 18 00          	cmpl   $0x0,0x18(%ebx)
40f737:	74 07                	je     0x40f740
40f739:	b9 71 00 00 00       	mov    $0x71,%ecx
40f73e:	eb 05                	jmp    0x40f745
40f740:	b9 2a 00 00 00       	mov    $0x2a,%ecx
40f745:	89 4b 04             	mov    %ecx,0x4(%ebx)
40f748:	c7 40 30 01 00 00 00 	movl   $0x1,0x30(%eax)
40f74f:	33 c0                	xor    %eax,%eax
40f751:	89 43 20             	mov    %eax,0x20(%ebx)
40f754:	8b c3                	mov    %ebx,%eax
40f756:	e8 6d 11 00 00       	call   0x4108c8
40f75b:	8b c3                	mov    %ebx,%eax
40f75d:	e8 4a 06 00 00       	call   0x40fdac
40f762:	33 c0                	xor    %eax,%eax
40f764:	5b                   	pop    %ebx
40f765:	c3                   	ret
40f766:	90                   	nop
40f767:	90                   	nop
40f768:	53                   	push   %ebx
40f769:	56                   	push   %esi
40f76a:	57                   	push   %edi
40f76b:	55                   	push   %ebp
40f76c:	51                   	push   %ecx
40f76d:	8b f9                	mov    %ecx,%edi
40f76f:	8b da                	mov    %edx,%ebx
40f771:	33 d2                	xor    %edx,%edx
40f773:	85 c0                	test   %eax,%eax
40f775:	74 06                	je     0x40f77d
40f777:	83 78 1c 00          	cmpl   $0x0,0x1c(%eax)
40f77b:	75 0a                	jne    0x40f787
40f77d:	b8 fe ff ff ff       	mov    $0xfffffffe,%eax
40f782:	e9 99 00 00 00       	jmp    0x40f820
40f787:	8b 70 1c             	mov    0x1c(%eax),%esi
40f78a:	83 fb ff             	cmp    $0xffffffff,%ebx
40f78d:	75 05                	jne    0x40f794
40f78f:	bb 06 00 00 00       	mov    $0x6,%ebx
40f794:	85 db                	test   %ebx,%ebx
40f796:	7c 0e                	jl     0x40f7a6
40f798:	83 fb 09             	cmp    $0x9,%ebx
40f79b:	7f 09                	jg     0x40f7a6
40f79d:	85 ff                	test   %edi,%edi
40f79f:	7c 05                	jl     0x40f7a6
40f7a1:	83 ff 02             	cmp    $0x2,%edi
40f7a4:	7e 07                	jle    0x40f7ad
40f7a6:	b8 fe ff ff ff       	mov    $0xfffffffe,%eax
40f7ab:	eb 73                	jmp    0x40f820
40f7ad:	8b 4e 7c             	mov    0x7c(%esi),%ecx
40f7b0:	8d 2c 5b             	lea    (%ebx,%ebx,2),%ebp
40f7b3:	8d 0c 49             	lea    (%ecx,%ecx,2),%ecx
40f7b6:	8b 0c 8d f8 64 42 00 	mov    0x4264f8(,%ecx,4),%ecx
40f7bd:	89 0c 24             	mov    %ecx,(%esp)
40f7c0:	8b 0c ad f8 64 42 00 	mov    0x4264f8(,%ebp,4),%ecx
40f7c7:	3b 0c 24             	cmp    (%esp),%ecx
40f7ca:	74 12                	je     0x40f7de
40f7cc:	83 78 08 00          	cmpl   $0x0,0x8(%eax)
40f7d0:	74 0c                	je     0x40f7de
40f7d2:	ba 01 00 00 00       	mov    $0x1,%edx
40f7d7:	e8 c8 00 00 00       	call   0x40f8a4
40f7dc:	8b d0                	mov    %eax,%edx
40f7de:	3b 5e 7c             	cmp    0x7c(%esi),%ebx
40f7e1:	74 35                	je     0x40f818
40f7e3:	89 5e 7c             	mov    %ebx,0x7c(%esi)
40f7e6:	0f b7 04 ad f2 64 42 	movzwl 0x4264f2(,%ebp,4),%eax
40f7ed:	00
40f7ee:	89 46 78             	mov    %eax,0x78(%esi)
40f7f1:	0f b7 0c ad f0 64 42 	movzwl 0x4264f0(,%ebp,4),%ecx
40f7f8:	00
40f7f9:	89 8e 84 00 00 00    	mov    %ecx,0x84(%esi)
40f7ff:	0f b7 04 ad f4 64 42 	movzwl 0x4264f4(,%ebp,4),%eax
40f806:	00
40f807:	89 86 88 00 00 00    	mov    %eax,0x88(%esi)
40f80d:	0f b7 0c ad f6 64 42 	movzwl 0x4264f6(,%ebp,4),%ecx
40f814:	00
40f815:	89 4e 74             	mov    %ecx,0x74(%esi)
40f818:	89 be 80 00 00 00    	mov    %edi,0x80(%esi)
40f81e:	8b c2                	mov    %edx,%eax
40f820:	5a                   	pop    %edx
40f821:	5d                   	pop    %ebp
40f822:	5f                   	pop    %edi
40f823:	5e                   	pop    %esi
40f824:	5b                   	pop    %ebx
40f825:	c3                   	ret
40f826:	90                   	nop
40f827:	90                   	nop
40f828:	53                   	push   %ebx
40f829:	8b 48 14             	mov    0x14(%eax),%ecx
40f82c:	ff 40 14             	incl   0x14(%eax)
40f82f:	8b 58 08             	mov    0x8(%eax),%ebx
40f832:	8d 0c 0b             	lea    (%ebx,%ecx,1),%ecx
40f835:	51                   	push   %ecx
40f836:	8b ca                	mov    %edx,%ecx
40f838:	c1 e9 08             	shr    $0x8,%ecx
40f83b:	5b                   	pop    %ebx
40f83c:	88 0b                	mov    %cl,(%ebx)
40f83e:	8b 48 14             	mov    0x14(%eax),%ecx
40f841:	ff 40 14             	incl   0x14(%eax)
40f844:	8b 40 08             	mov    0x8(%eax),%eax
40f847:	80 e2 ff             	and    $0xff,%dl
40f84a:	88 14 08             	mov    %dl,(%eax,%ecx,1)
40f84d:	5b                   	pop    %ebx
40f84e:	c3                   	ret
40f84f:	90                   	nop
40f850:	53                   	push   %ebx
40f851:	8b d8                	mov    %eax,%ebx
40f853:	56                   	push   %esi
40f854:	8b 43 1c             	mov    0x1c(%ebx),%eax
40f857:	8b 53 10             	mov    0x10(%ebx),%edx
40f85a:	8b 70 14             	mov    0x14(%eax),%esi
40f85d:	3b f2                	cmp    %edx,%esi
40f85f:	76 02                	jbe    0x40f863
40f861:	8b f2                	mov    %edx,%esi
40f863:	85 f6                	test   %esi,%esi
40f865:	74 37                	je     0x40f89e
40f867:	56                   	push   %esi
40f868:	8b 40 10             	mov    0x10(%eax),%eax
40f86b:	50                   	push   %eax
40f86c:	8b 53 0c             	mov    0xc(%ebx),%edx
40f86f:	52                   	push   %edx
40f870:	e8 2f fb ff ff       	call   0x40f3a4
40f875:	83 c4 0c             	add    $0xc,%esp
40f878:	8b c6                	mov    %esi,%eax
40f87a:	01 43 0c             	add    %eax,0xc(%ebx)
40f87d:	8b 53 1c             	mov    0x1c(%ebx),%edx
40f880:	01 42 10             	add    %eax,0x10(%edx)
40f883:	01 73 14             	add    %esi,0x14(%ebx)
40f886:	29 73 10             	sub    %esi,0x10(%ebx)
40f889:	8b 43 1c             	mov    0x1c(%ebx),%eax
40f88c:	8b 50 14             	mov    0x14(%eax),%edx
40f88f:	2b d6                	sub    %esi,%edx
40f891:	89 50 14             	mov    %edx,0x14(%eax)
40f894:	85 d2                	test   %edx,%edx
40f896:	75 06                	jne    0x40f89e
40f898:	8b 48 08             	mov    0x8(%eax),%ecx
40f89b:	89 48 10             	mov    %ecx,0x10(%eax)
40f89e:	5e                   	pop    %esi
40f89f:	5b                   	pop    %ebx
40f8a0:	c3                   	ret
40f8a1:	90                   	nop
40f8a2:	90                   	nop
40f8a3:	90                   	nop
40f8a4:	53                   	push   %ebx
40f8a5:	56                   	push   %esi
40f8a6:	57                   	push   %edi
40f8a7:	55                   	push   %ebp
40f8a8:	51                   	push   %ecx
40f8a9:	8b fa                	mov    %edx,%edi
40f8ab:	8b f0                	mov    %eax,%esi
40f8ad:	85 f6                	test   %esi,%esi
40f8af:	74 0f                	je     0x40f8c0
40f8b1:	83 7e 1c 00          	cmpl   $0x0,0x1c(%esi)
40f8b5:	74 09                	je     0x40f8c0
40f8b7:	83 ff 04             	cmp    $0x4,%edi
40f8ba:	7f 04                	jg     0x40f8c0
40f8bc:	85 ff                	test   %edi,%edi
40f8be:	7d 0a                	jge    0x40f8ca
40f8c0:	b8 fe ff ff ff       	mov    $0xfffffffe,%eax
40f8c5:	e9 57 02 00 00       	jmp    0x40fb21
40f8ca:	83 7e 0c 00          	cmpl   $0x0,0xc(%esi)
40f8ce:	8b 5e 1c             	mov    0x1c(%esi),%ebx
40f8d1:	74 19                	je     0x40f8ec
40f8d3:	83 3e 00             	cmpl   $0x0,(%esi)
40f8d6:	75 06                	jne    0x40f8de
40f8d8:	83 7e 04 00          	cmpl   $0x0,0x4(%esi)
40f8dc:	75 0e                	jne    0x40f8ec
40f8de:	81 7b 04 9a 02 00 00 	cmpl   $0x29a,0x4(%ebx)
40f8e5:	75 17                	jne    0x40f8fe
40f8e7:	83 ff 04             	cmp    $0x4,%edi
40f8ea:	74 12                	je     0x40f8fe
40f8ec:	a1 a0 64 42 00       	mov    0x4264a0,%eax
40f8f1:	89 46 18             	mov    %eax,0x18(%esi)
40f8f4:	b8 fe ff ff ff       	mov    $0xfffffffe,%eax
40f8f9:	e9 23 02 00 00       	jmp    0x40fb21
40f8fe:	83 7e 10 00          	cmpl   $0x0,0x10(%esi)
40f902:	75 13                	jne    0x40f917
40f904:	8b 15 ac 64 42 00    	mov    0x4264ac,%edx
40f90a:	b8 fb ff ff ff       	mov    $0xfffffffb,%eax
40f90f:	89 56 18             	mov    %edx,0x18(%esi)
40f912:	e9 0a 02 00 00       	jmp    0x40fb21
40f917:	89 33                	mov    %esi,(%ebx)
40f919:	8b 6b 20             	mov    0x20(%ebx),%ebp
40f91c:	89 7b 20             	mov    %edi,0x20(%ebx)
40f91f:	83 7b 04 2a          	cmpl   $0x2a,0x4(%ebx)
40f923:	75 7d                	jne    0x40f9a2
40f925:	8b 4b 28             	mov    0x28(%ebx),%ecx
40f928:	8b 43 7c             	mov    0x7c(%ebx),%eax
40f92b:	83 e9 08             	sub    $0x8,%ecx
40f92e:	48                   	dec    %eax
40f92f:	c1 e1 04             	shl    $0x4,%ecx
40f932:	83 c1 08             	add    $0x8,%ecx
40f935:	c1 e1 08             	shl    $0x8,%ecx
40f938:	d1 f8                	sar    $1,%eax
40f93a:	83 f8 03             	cmp    $0x3,%eax
40f93d:	76 05                	jbe    0x40f944
40f93f:	b8 03 00 00 00       	mov    $0x3,%eax
40f944:	c1 e0 06             	shl    $0x6,%eax
40f947:	0b c8                	or     %eax,%ecx
40f949:	83 7b 64 00          	cmpl   $0x0,0x64(%ebx)
40f94d:	74 03                	je     0x40f952
40f94f:	83 c9 20             	or     $0x20,%ecx
40f952:	8b c1                	mov    %ecx,%eax
40f954:	51                   	push   %ecx
40f955:	33 d2                	xor    %edx,%edx
40f957:	b9 1f 00 00 00       	mov    $0x1f,%ecx
40f95c:	f7 f1                	div    %ecx
40f95e:	b8 1f 00 00 00       	mov    $0x1f,%eax
40f963:	59                   	pop    %ecx
40f964:	2b c2                	sub    %edx,%eax
40f966:	03 c8                	add    %eax,%ecx
40f968:	8b c3                	mov    %ebx,%eax
40f96a:	c7 43 04 71 00 00 00 	movl   $0x71,0x4(%ebx)
40f971:	8b d1                	mov    %ecx,%edx
40f973:	e8 b0 fe ff ff       	call   0x40f828
40f978:	83 7b 64 00          	cmpl   $0x0,0x64(%ebx)
40f97c:	74 1d                	je     0x40f99b
40f97e:	8b 56 30             	mov    0x30(%esi),%edx
40f981:	8b c3                	mov    %ebx,%eax
40f983:	c1 ea 10             	shr    $0x10,%edx
40f986:	e8 9d fe ff ff       	call   0x40f828
40f98b:	8b 56 30             	mov    0x30(%esi),%edx
40f98e:	8b c3                	mov    %ebx,%eax
40f990:	81 e2 ff ff 00 00    	and    $0xffff,%edx
40f996:	e8 8d fe ff ff       	call   0x40f828
40f99b:	c7 46 30 01 00 00 00 	movl   $0x1,0x30(%esi)
40f9a2:	83 7b 14 00          	cmpl   $0x0,0x14(%ebx)
40f9a6:	74 1b                	je     0x40f9c3
40f9a8:	8b c6                	mov    %esi,%eax
40f9aa:	e8 a1 fe ff ff       	call   0x40f850
40f9af:	83 7e 10 00          	cmpl   $0x0,0x10(%esi)
40f9b3:	75 30                	jne    0x40f9e5
40f9b5:	c7 43 20 ff ff ff ff 	movl   $0xffffffff,0x20(%ebx)
40f9bc:	33 c0                	xor    %eax,%eax
40f9be:	e9 5e 01 00 00       	jmp    0x40fb21
40f9c3:	83 7e 04 00          	cmpl   $0x0,0x4(%esi)
40f9c7:	75 1c                	jne    0x40f9e5
40f9c9:	3b ef                	cmp    %edi,%ebp
40f9cb:	7c 18                	jl     0x40f9e5
40f9cd:	83 ff 04             	cmp    $0x4,%edi
40f9d0:	74 13                	je     0x40f9e5
40f9d2:	8b 15 ac 64 42 00    	mov    0x4264ac,%edx
40f9d8:	b8 fb ff ff ff       	mov    $0xfffffffb,%eax
40f9dd:	89 56 18             	mov    %edx,0x18(%esi)
40f9e0:	e9 3c 01 00 00       	jmp    0x40fb21
40f9e5:	81 7b 04 9a 02 00 00 	cmpl   $0x29a,0x4(%ebx)
40f9ec:	75 19                	jne    0x40fa07
40f9ee:	83 7e 04 00          	cmpl   $0x0,0x4(%esi)
40f9f2:	74 13                	je     0x40fa07
40f9f4:	8b 15 ac 64 42 00    	mov    0x4264ac,%edx
40f9fa:	b8 fb ff ff ff       	mov    $0xfffffffb,%eax
40f9ff:	89 56 18             	mov    %edx,0x18(%esi)
40fa02:	e9 1a 01 00 00       	jmp    0x40fb21
40fa07:	83 7e 04 00          	cmpl   $0x0,0x4(%esi)
40fa0b:	75 1b                	jne    0x40fa28
40fa0d:	83 7b 6c 00          	cmpl   $0x0,0x6c(%ebx)
40fa11:	75 15                	jne    0x40fa28
40fa13:	85 ff                	test   %edi,%edi
40fa15:	0f 84 b6 00 00 00    	je     0x40fad1
40fa1b:	81 7b 04 9a 02 00 00 	cmpl   $0x29a,0x4(%ebx)
40fa22:	0f 84 a9 00 00 00    	je     0x40fad1
40fa28:	8b 53 7c             	mov    0x7c(%ebx),%edx
40fa2b:	8b c3                	mov    %ebx,%eax
40fa2d:	8d 14 52             	lea    (%edx,%edx,2),%edx
40fa30:	8b 2c 95 f8 64 42 00 	mov    0x4264f8(,%edx,4),%ebp
40fa37:	8b d7                	mov    %edi,%edx
40fa39:	ff d5                	call   *%ebp
40fa3b:	89 04 24             	mov    %eax,(%esp)
40fa3e:	83 3c 24 02          	cmpl   $0x2,(%esp)
40fa42:	74 06                	je     0x40fa4a
40fa44:	83 3c 24 03          	cmpl   $0x3,(%esp)
40fa48:	75 07                	jne    0x40fa51
40fa4a:	c7 43 04 9a 02 00 00 	movl   $0x29a,0x4(%ebx)
40fa51:	83 3c 24 00          	cmpl   $0x0,(%esp)
40fa55:	74 06                	je     0x40fa5d
40fa57:	83 3c 24 02          	cmpl   $0x2,(%esp)
40fa5b:	75 14                	jne    0x40fa71
40fa5d:	83 7e 10 00          	cmpl   $0x0,0x10(%esi)
40fa61:	75 07                	jne    0x40fa6a
40fa63:	c7 43 20 ff ff ff ff 	movl   $0xffffffff,0x20(%ebx)
40fa6a:	33 c0                	xor    %eax,%eax
40fa6c:	e9 b0 00 00 00       	jmp    0x40fb21
40fa71:	83 3c 24 01          	cmpl   $0x1,(%esp)
40fa75:	75 5a                	jne    0x40fad1
40fa77:	83 ff 01             	cmp    $0x1,%edi
40fa7a:	75 09                	jne    0x40fa85
40fa7c:	8b c3                	mov    %ebx,%eax
40fa7e:	e8 39 20 00 00       	call   0x411abc
40fa83:	eb 34                	jmp    0x40fab9
40fa85:	6a 00                	push   $0x0
40fa87:	33 c9                	xor    %ecx,%ecx
40fa89:	33 d2                	xor    %edx,%edx
40fa8b:	8b c3                	mov    %ebx,%eax
40fa8d:	e8 6e 1f 00 00       	call   0x411a00
40fa92:	83 ff 03             	cmp    $0x3,%edi
40fa95:	75 22                	jne    0x40fab9
40fa97:	8b 53 3c             	mov    0x3c(%ebx),%edx
40fa9a:	8b 4b 44             	mov    0x44(%ebx),%ecx
40fa9d:	66 c7 44 4a fe 00 00 	movw   $0x0,-0x2(%edx,%ecx,2)
40faa4:	8b 43 44             	mov    0x44(%ebx),%eax
40faa7:	48                   	dec    %eax
40faa8:	03 c0                	add    %eax,%eax
40faaa:	50                   	push   %eax