40f6cf:	66 f7 c1 00 04       	test   $0x400,%cx
40f6d4:	74 03                	je     0x40f6d9
40f6d6:	8b 47 18             	mov    0x18(%edi),%eax
40f6d9:	89 45 08             	mov    %eax,0x8(%ebp)
40f6dc:	8b 03                	mov    (%ebx),%eax
40f6de:	f6 44 30 04 04       	testb  $0x4,0x4(%eax,%esi,1)
40f6e3:	74 03                	je     0x40f6e8
40f6e5:	ff 45 08             	incl   0x8(%ebp)
40f6e8:	8b 45 08             	mov    0x8(%ebp),%eax
40f6eb:	29 45 f0             	sub    %eax,-0x10(%ebp)
40f6ee:	83 5d f4 00          	sbbl   $0x0,-0xc(%ebp)
40f6f2:	8b 75 f4             	mov    -0xc(%ebp),%esi
40f6f5:	8b 45 f8             	mov    -0x8(%ebp),%eax
40f6f8:	33 d2                	xor    %edx,%edx
40f6fa:	03 45 f0             	add    -0x10(%ebp),%eax
40f6fd:	13 d6                	adc    %esi,%edx
40f6ff:	5f                   	pop    %edi
40f700:	5e                   	pop    %esi
40f701:	5b                   	pop    %ebx
40f702:	c9                   	leave
40f703:	c3                   	ret
40f704:	6a 10                	push   $0x10
40f706:	68 38 ad 41 00       	push   $0x41ad38
40f70b:	e8 38 df ff ff       	call   0x40d648
40f710:	ff 75 08             	push   0x8(%ebp)
40f713:	e8 ed 91 ff ff       	call   0x408905
40f718:	59                   	pop    %ecx
40f719:	83 65 fc 00          	andl   $0x0,-0x4(%ebp)
40f71d:	ff 75 08             	push   0x8(%ebp)
40f720:	e8 2b fe ff ff       	call   0x40f550
40f725:	59                   	pop    %ecx
40f726:	89 45 e0             	mov    %eax,-0x20(%ebp)
40f729:	89 55 e4             	mov    %edx,-0x1c(%ebp)
40f72c:	c7 45 fc fe ff ff ff 	movl   $0xfffffffe,-0x4(%ebp)
40f733:	e8 0c 00 00 00       	call   0x40f744
40f738:	8b 45 e0             	mov    -0x20(%ebp),%eax
40f73b:	8b 55 e4             	mov    -0x1c(%ebp),%edx
40f73e:	e8 4a df ff ff       	call   0x40d68d
40f743:	c3                   	ret
40f744:	ff 75 08             	push   0x8(%ebp)
40f747:	e8 0b 92 ff ff       	call   0x408957
40f74c:	59                   	pop    %ecx
40f74d:	c3                   	ret
40f74e:	56                   	push   %esi
40f74f:	8b 74 24 08          	mov    0x8(%esp),%esi
40f753:	56                   	push   %esi
40f754:	e8 28 56 00 00       	call   0x414d81
40f759:	83 f8 ff             	cmp    $0xffffffff,%eax
40f75c:	59                   	pop    %ecx
40f75d:	75 10                	jne    0x40f76f
40f75f:	e8 96 9c ff ff       	call   0x4093fa
40f764:	c7 00 09 00 00 00    	movl   $0x9,(%eax)
40f76a:	83 c8 ff             	or     $0xffffffff,%eax
40f76d:	5e                   	pop    %esi
40f76e:	c3                   	ret
40f76f:	57                   	push   %edi
40f770:	ff 74 24 14          	push   0x14(%esp)
40f774:	6a 00                	push   $0x0
40f776:	ff 74 24 18          	push   0x18(%esp)
40f77a:	50                   	push   %eax
40f77b:	ff 15 58 71 41 00    	call   *0x417158
40f781:	8b f8                	mov    %eax,%edi
40f783:	83 ff ff             	cmp    $0xffffffff,%edi
40f786:	75 08                	jne    0x40f790
40f788:	ff 15 b0 70 41 00    	call   *0x4170b0
40f78e:	eb 02                	jmp    0x40f792
40f790:	33 c0                	xor    %eax,%eax
40f792:	85 c0                	test   %eax,%eax
40f794:	74 0c                	je     0x40f7a2
40f796:	50                   	push   %eax
40f797:	e8 84 9c ff ff       	call   0x409420
40f79c:	59                   	pop    %ecx
40f79d:	83 c8 ff             	or     $0xffffffff,%eax
40f7a0:	eb 1b                	jmp    0x40f7bd
40f7a2:	8b c6                	mov    %esi,%eax
40f7a4:	83 e6 1f             	and    $0x1f,%esi
40f7a7:	6b f6 28             	imul   $0x28,%esi,%esi
40f7aa:	c1 f8 05             	sar    $0x5,%eax
40f7ad:	8b 04 85 c0 e4 41 00 	mov    0x41e4c0(,%eax,4),%eax
40f7b4:	8d 44 30 04          	lea    0x4(%eax,%esi,1),%eax
40f7b8:	80 20 fd             	andb   $0xfd,(%eax)
40f7bb:	8b c7                	mov    %edi,%eax
40f7bd:	5f                   	pop    %edi
40f7be:	5e                   	pop    %esi
40f7bf:	c3                   	ret
40f7c0:	6a 10                	push   $0x10
40f7c2:	68 58 ad 41 00       	push   $0x41ad58
40f7c7:	e8 7c de ff ff       	call   0x40d648
40f7cc:	8b 45 08             	mov    0x8(%ebp),%eax
40f7cf:	83 f8 fe             	cmp    $0xfffffffe,%eax
40f7d2:	75 1b                	jne    0x40f7ef
40f7d4:	e8 34 9c ff ff       	call   0x40940d
40f7d9:	83 20 00             	andl   $0x0,(%eax)
40f7dc:	e8 19 9c ff ff       	call   0x4093fa
40f7e1:	c7 00 09 00 00 00    	movl   $0x9,(%eax)
40f7e7:	83 c8 ff             	or     $0xffffffff,%eax
40f7ea:	e9 9d 00 00 00       	jmp    0x40f88c
40f7ef:	33 ff                	xor    %edi,%edi
40f7f1:	3b c7                	cmp    %edi,%eax
40f7f3:	7c 08                	jl     0x40f7fd
40f7f5:	3b 05 b4 e4 41 00    	cmp    0x41e4b4,%eax
40f7fb:	72 21                	jb     0x40f81e
40f7fd:	e8 0b 9c ff ff       	call   0x40940d
40f802:	89 38                	mov    %edi,(%eax)
40f804:	e8 f1 9b ff ff       	call   0x4093fa
40f809:	c7 00 09 00 00 00    	movl   $0x9,(%eax)
40f80f:	57                   	push   %edi
40f810:	57                   	push   %edi
40f811:	57                   	push   %edi
40f812:	57                   	push   %edi
40f813:	57                   	push   %edi
40f814:	e8 37 7e ff ff       	call   0x407650
40f819:	83 c4 14             	add    $0x14,%esp
40f81c:	eb c9                	jmp    0x40f7e7
40f81e:	8b c8                	mov    %eax,%ecx
40f820:	c1 f9 05             	sar    $0x5,%ecx
40f823:	8d 1c 8d c0 e4 41 00 	lea    0x41e4c0(,%ecx,4),%ebx
40f82a:	8b f0                	mov    %eax,%esi
40f82c:	83 e6 1f             	and    $0x1f,%esi
40f82f:	6b f6 28             	imul   $0x28,%esi,%esi
40f832:	8b 0b                	mov    (%ebx),%ecx
40f834:	0f b6 4c 31 04       	movzbl 0x4(%ecx,%esi,1),%ecx
40f839:	83 e1 01             	and    $0x1,%ecx
40f83c:	74 bf                	je     0x40f7fd
40f83e:	50                   	push   %eax
40f83f:	e8 ae 55 00 00       	call   0x414df2
40f844:	59                   	pop    %ecx
40f845:	89 7d fc             	mov    %edi,-0x4(%ebp)
40f848:	8b 03                	mov    (%ebx),%eax
40f84a:	f6 44 30 04 01       	testb  $0x1,0x4(%eax,%esi,1)
40f84f:	74 16                	je     0x40f867
40f851:	ff 75 10             	push   0x10(%ebp)
40f854:	ff 75 0c             	push   0xc(%ebp)
40f857:	ff 75 08             	push   0x8(%ebp)
40f85a:	e8 ef fe ff ff       	call   0x40f74e
40f85f:	83 c4 0c             	add    $0xc,%esp
40f862:	89 45 e4             	mov    %eax,-0x1c(%ebp)
40f865:	eb 16                	jmp    0x40f87d
40f867:	e8 8e 9b ff ff       	call   0x4093fa
40f86c:	c7 00 09 00 00 00    	movl   $0x9,(%eax)
40f872:	e8 96 9b ff ff       	call   0x40940d
40f877:	89 38                	mov    %edi,(%eax)
40f879:	83 4d e4 ff          	orl    $0xffffffff,-0x1c(%ebp)
40f87d:	c7 45 fc fe ff ff ff 	movl   $0xfffffffe,-0x4(%ebp)
40f884:	e8 09 00 00 00       	call   0x40f892
40f889:	8b 45 e4             	mov    -0x1c(%ebp),%eax
40f88c:	e8 fc dd ff ff       	call   0x40d68d
40f891:	c3                   	ret
40f892:	ff 75 08             	push   0x8(%ebp)
40f895:	e8 f8 55 00 00       	call   0x414e92
40f89a:	59                   	pop    %ecx
40f89b:	c3                   	ret
40f89c:	55                   	push   %ebp
40f89d:	8b ec                	mov    %esp,%ebp
40f89f:	83 ec 0c             	sub    $0xc,%esp
40f8a2:	53                   	push   %ebx
40f8a3:	57                   	push   %edi
40f8a4:	8b 7d 08             	mov    0x8(%ebp),%edi
40f8a7:	33 db                	xor    %ebx,%ebx
40f8a9:	3b fb                	cmp    %ebx,%edi
40f8ab:	75 20                	jne    0x40f8cd
40f8ad:	e8 48 9b ff ff       	call   0x4093fa
40f8b2:	53                   	push   %ebx
40f8b3:	53                   	push   %ebx
40f8b4:	53                   	push   %ebx
40f8b5:	53                   	push   %ebx
40f8b6:	53                   	push   %ebx
40f8b7:	c7 00 16 00 00 00    	movl   $0x16,(%eax)
40f8bd:	e8 8e 7d ff ff       	call   0x407650
40f8c2:	83 c4 14             	add    $0x14,%esp
40f8c5:	83 c8 ff             	or     $0xffffffff,%eax
40f8c8:	e9 63 01 00 00       	jmp    0x40fa30
40f8cd:	57                   	push   %edi
40f8ce:	e8 73 f1 ff ff       	call   0x40ea46
40f8d3:	39 5f 04             	cmp    %ebx,0x4(%edi)
40f8d6:	59                   	pop    %ecx
40f8d7:	89 45 fc             	mov    %eax,-0x4(%ebp)
40f8da:	7d 03                	jge    0x40f8df
40f8dc:	89 5f 04             	mov    %ebx,0x4(%edi)
40f8df:	6a 01                	push   $0x1
40f8e1:	53                   	push   %ebx
40f8e2:	50                   	push   %eax
40f8e3:	e8 d8 fe ff ff       	call   0x40f7c0
40f8e8:	83 c4 0c             	add    $0xc,%esp
40f8eb:	3b c3                	cmp    %ebx,%eax
40f8ed:	89 45 f8             	mov    %eax,-0x8(%ebp)
40f8f0:	7c d3                	jl     0x40f8c5
40f8f2:	8b 57 0c             	mov    0xc(%edi),%edx
40f8f5:	66 f7 c2 08 01       	test   $0x108,%dx
40f8fa:	75 08                	jne    0x40f904
40f8fc:	2b 47 04             	sub    0x4(%edi),%eax
40f8ff:	e9 2c 01 00 00       	jmp    0x40fa30
40f904:	8b 07                	mov    (%edi),%eax
40f906:	8b 4f 08             	mov    0x8(%edi),%ecx
40f909:	56                   	push   %esi
40f90a:	8b f0                	mov    %eax,%esi
40f90c:	2b f1                	sub    %ecx,%esi
40f90e:	f6 c2 03             	test   $0x3,%dl
40f911:	89 75 f4             	mov    %esi,-0xc(%ebp)
40f914:	74 41                	je     0x40f957
40f916:	8b 75 fc             	mov    -0x4(%ebp),%esi
40f919:	8b 55 fc             	mov    -0x4(%ebp),%edx
40f91c:	83 e6 1f             	and    $0x1f,%esi
40f91f:	6b f6 28             	imul   $0x28,%esi,%esi
40f922:	c1 fa 05             	sar    $0x5,%edx
40f925:	8b 14 95 c0 e4 41 00 	mov    0x41e4c0(,%edx,4),%edx
40f92c:	f6 44 32 04 80       	testb  $0x80,0x4(%edx,%esi,1)
40f931:	74 17                	je     0x40f94a
40f933:	8b d1                	mov    %ecx,%edx
40f935:	3b d0                	cmp    %eax,%edx
40f937:	73 11                	jae    0x40f94a
40f939:	8b f0                	mov    %eax,%esi
40f93b:	80 3a 0a             	cmpb   $0xa,(%edx)
40f93e:	75 05                	jne    0x40f945
40f940:	ff 45 f4             	incl   -0xc(%ebp)
40f943:	33 db                	xor    %ebx,%ebx
40f945:	42                   	inc    %edx
40f946:	3b d6                	cmp    %esi,%edx
40f948:	72 f1                	jb     0x40f93b
40f94a:	39 5d f8             	cmp    %ebx,-0x8(%ebp)
40f94d:	75 1c                	jne    0x40f96b
40f94f:	8b 45 f4             	mov    -0xc(%ebp),%eax
40f952:	e9 d8 00 00 00       	jmp    0x40fa2f
40f957:	84 d2                	test   %dl,%dl
40f959:	78 ef                	js     0x40f94a
40f95b:	e8 9a 9a ff ff       	call   0x4093fa
40f960:	c7 00 16 00 00 00    	movl   $0x16,(%eax)
40f966:	e9 86 00 00 00       	jmp    0x40f9f1
40f96b:	f6 47 0c 01          	testb  $0x1,0xc(%edi)
40f96f:	0f 84 b2 00 00 00    	je     0x40fa27
40f975:	8b 57 04             	mov    0x4(%edi),%edx
40f978:	3b d3                	cmp    %ebx,%edx
40f97a:	75 08                	jne    0x40f984
40f97c:	89 5d f4             	mov    %ebx,-0xc(%ebp)
40f97f:	e9 a3 00 00 00       	jmp    0x40fa27
40f984:	8b 75 fc             	mov    -0x4(%ebp),%esi
40f987:	8b 5d fc             	mov    -0x4(%ebp),%ebx
40f98a:	83 e6 1f             	and    $0x1f,%esi
40f98d:	6b f6 28             	imul   $0x28,%esi,%esi
40f990:	2b c1                	sub    %ecx,%eax
40f992:	03 c2                	add    %edx,%eax
40f994:	c1 fb 05             	sar    $0x5,%ebx
40f997:	8d 1c 9d c0 e4 41 00 	lea    0x41e4c0(,%ebx,4),%ebx
40f99e:	89 45 08             	mov    %eax,0x8(%ebp)
40f9a1:	8b 03                	mov    (%ebx),%eax
40f9a3:	f6 44 30 04 80       	testb  $0x80,0x4(%eax,%esi,1)
40f9a8:	74 77                	je     0x40fa21
40f9aa:	6a 02                	push   $0x2
40f9ac:	6a 00                	push   $0x0
40f9ae:	ff 75 fc             	push   -0x4(%ebp)
40f9b1:	e8 0a fe ff ff       	call   0x40f7c0
40f9b6:	83 c4 0c             	add    $0xc,%esp
40f9b9:	3b 45 f8             	cmp    -0x8(%ebp),%eax
40f9bc:	75 1f                	jne    0x40f9dd
40f9be:	8b 47 08             	mov    0x8(%edi),%eax
40f9c1:	8b 4d 08             	mov    0x8(%ebp),%ecx
40f9c4:	03 c8                	add    %eax,%ecx
40f9c6:	eb 09                	jmp    0x40f9d1
40f9c8:	80 38 0a             	cmpb   $0xa,(%eax)
40f9cb:	75 03                	jne    0x40f9d0
40f9cd:	ff 45 08             	incl   0x8(%ebp)
40f9d0:	40                   	inc    %eax
40f9d1:	3b c1                	cmp    %ecx,%eax
40f9d3:	72 f3                	jb     0x40f9c8
40f9d5:	66 f7 47 0c 00 20    	testw  $0x2000,0xc(%edi)
40f9db:	eb 3f                	jmp    0x40fa1c
40f9dd:	6a 00                	push   $0x0
40f9df:	ff 75 f8             	push   -0x8(%ebp)
40f9e2:	ff 75 fc             	push   -0x4(%ebp)
40f9e5:	e8 d6 fd ff ff       	call   0x40f7c0
40f9ea:	83 c4 0c             	add    $0xc,%esp
40f9ed:	85 c0                	test   %eax,%eax
40f9ef:	7d 05                	jge    0x40f9f6
40f9f1:	83 c8 ff             	or     $0xffffffff,%eax
40f9f4:	eb 39                	jmp    0x40fa2f
40f9f6:	b8 00 02 00 00       	mov    $0x200,%eax
40f9fb:	39 45 08             	cmp    %eax,0x8(%ebp)
40f9fe:	77 0f                	ja     0x40fa0f
40fa00:	8b 4f 0c             	mov    0xc(%edi),%ecx
40fa03:	f6 c1 08             	test   $0x8,%cl
40fa06:	74 07                	je     0x40fa0f
40fa08:	66 f7 c1 00 04       	test   $0x400,%cx
40fa0d:	74 03                	je     0x40fa12
40fa0f:	8b 47 18             	mov    0x18(%edi),%eax
40fa12:	89 45 08             	mov    %eax,0x8(%ebp)
40fa15:	8b 03                	mov    (%ebx),%eax
40fa17:	f6 44 30 04 04       	testb  $0x4,0x4(%eax,%esi,1)
40fa1c:	74 03                	je     0x40fa21
40fa1e:	ff 45 08             	incl   0x8(%ebp)
40fa21:	8b 45 08             	mov    0x8(%ebp),%eax
40fa24:	29 45 f8             	sub    %eax,-0x8(%ebp)
40fa27:	8b 45 f4             	mov    -0xc(%ebp),%eax
40fa2a:	8b 4d f8             	mov    -0x8(%ebp),%ecx
40fa2d:	03 c1                	add    %ecx,%eax
40fa2f:	5e                   	pop    %esi
40fa30:	5f                   	pop    %edi
40fa31:	5b                   	pop    %ebx
40fa32:	c9                   	leave
40fa33:	c3                   	ret
40fa34:	55                   	push   %ebp
40fa35:	8b ec                	mov    %esp,%ebp
40fa37:	56                   	push   %esi
40fa38:	8b 75 08             	mov    0x8(%ebp),%esi
40fa3b:	8b 46 0c             	mov    0xc(%esi),%eax
40fa3e:	a8 83                	test   $0x83,%al
40fa40:	57                   	push   %edi
40fa41:	74 78                	je     0x40fabb
40fa43:	8b 7d 14             	mov    0x14(%ebp),%edi
40fa46:	85 ff                	test   %edi,%edi
40fa48:	74 0a                	je     0x40fa54
40fa4a:	83 ff 01             	cmp    $0x1,%edi
40fa4d:	74 05                	je     0x40fa54
40fa4f:	83 ff 02             	cmp    $0x2,%edi
40fa52:	75 67                	jne    0x40fabb
40fa54:	83 e0 ef             	and    $0xffffffef,%eax
40fa57:	83 ff 01             	cmp    $0x1,%edi
40fa5a:	89 46 0c             	mov    %eax,0xc(%esi)
40fa5d:	75 0f                	jne    0x40fa6e
40fa5f:	56                   	push   %esi
40fa60:	e8 eb fa ff ff       	call   0x40f550
40fa65:	01 45 0c             	add    %eax,0xc(%ebp)
40fa68:	59                   	pop    %ecx
40fa69:	11 55 10             	adc    %edx,0x10(%ebp)
40fa6c:	33 ff                	xor    %edi,%edi
40fa6e:	56                   	push   %esi
40fa6f:	e8 a2 82 ff ff       	call   0x407d16
40fa74:	8b 46 0c             	mov    0xc(%esi),%eax
40fa77:	84 c0                	test   %al,%al
40fa79:	59                   	pop    %ecx
40fa7a:	79 08                	jns    0x40fa84
40fa7c:	83 e0 fc             	and    $0xfffffffc,%eax
40fa7f:	89 46 0c             	mov    %eax,0xc(%esi)
40fa82:	eb 15                	jmp    0x40fa99
40fa84:	a8 01                	test   $0x1,%al
40fa86:	74 11                	je     0x40fa99
40fa88:	a8 08                	test   $0x8,%al
40fa8a:	74 0d                	je     0x40fa99
40fa8c:	66 a9 00 04          	test   $0x400,%ax
40fa90:	75 07                	jne    0x40fa99
40fa92:	c7 46 18 00 02 00 00 	movl   $0x200,0x18(%esi)
40fa99:	57                   	push   %edi
40fa9a:	ff 75 10             	push   0x10(%ebp)
40fa9d:	ff 75 0c             	push   0xc(%ebp)
40faa0:	56                   	push   %esi
40faa1:	e8 a0 ef ff ff       	call   0x40ea46
40faa6:	59                   	pop    %ecx
40faa7:	50                   	push   %eax
40faa8:	e8 c8 42 00 00       	call   0x413d75
40faad:	23 c2                	and    %edx,%eax
40faaf:	83 c4 10             	add    $0x10,%esp