40e920:	8b c1                	mov    %ecx,%eax
40e922:	2b c2                	sub    %edx,%eax
40e924:	3b 45 10             	cmp    0x10(%ebp),%eax
40e927:	0f 82 20 ff ff ff    	jb     0x40e84d
40e92d:	e9 8c 01 00 00       	jmp    0x40eabe
40e932:	8b 5d 10             	mov    0x10(%ebp),%ebx
40e935:	89 8d 30 e5 ff ff    	mov    %ecx,-0x1ad0(%ebp)
40e93b:	85 db                	test   %ebx,%ebx
40e93d:	0f 84 a7 01 00 00    	je     0x40eaea
40e943:	c7 85 14 e5 ff ff 0a 	movl   $0xa,-0x1aec(%ebp)
40e94a:	00 00 00
40e94d:	83 a5 18 e5 ff ff 00 	andl   $0x0,-0x1ae8(%ebp)
40e954:	8b b5 30 e5 ff ff    	mov    -0x1ad0(%ebp),%esi
40e95a:	2b ca                	sub    %edx,%ecx
40e95c:	8b 95 18 e5 ff ff    	mov    -0x1ae8(%ebp),%edx
40e962:	8d 85 48 f9 ff ff    	lea    -0x6b8(%ebp),%eax
40e968:	3b cb                	cmp    %ebx,%ecx
40e96a:	73 3b                	jae    0x40e9a7
40e96c:	0f b7 3e             	movzwl (%esi),%edi
40e96f:	83 c6 02             	add    $0x2,%esi
40e972:	83 c1 02             	add    $0x2,%ecx
40e975:	89 b5 30 e5 ff ff    	mov    %esi,-0x1ad0(%ebp)
40e97b:	66 3b bd 14 e5 ff ff 	cmp    -0x1aec(%ebp),%di
40e982:	75 12                	jne    0x40e996
40e984:	6a 0d                	push   $0xd
40e986:	5e                   	pop    %esi
40e987:	66 89 30             	mov    %si,(%eax)
40e98a:	8b b5 30 e5 ff ff    	mov    -0x1ad0(%ebp),%esi
40e990:	83 c0 02             	add    $0x2,%eax
40e993:	83 c2 02             	add    $0x2,%edx
40e996:	66 89 38             	mov    %di,(%eax)
40e999:	83 c2 02             	add    $0x2,%edx
40e99c:	83 c0 02             	add    $0x2,%eax
40e99f:	81 fa a8 06 00 00    	cmp    $0x6a8,%edx
40e9a5:	72 c1                	jb     0x40e968
40e9a7:	33 f6                	xor    %esi,%esi
40e9a9:	56                   	push   %esi
40e9aa:	56                   	push   %esi
40e9ab:	68 55 0d 00 00       	push   $0xd55
40e9b0:	8d 8d f0 eb ff ff    	lea    -0x1410(%ebp),%ecx
40e9b6:	51                   	push   %ecx
40e9b7:	8d 8d 48 f9 ff ff    	lea    -0x6b8(%ebp),%ecx
40e9bd:	2b c1                	sub    %ecx,%eax
40e9bf:	99                   	cltd
40e9c0:	2b c2                	sub    %edx,%eax
40e9c2:	d1 f8                	sar    $1,%eax
40e9c4:	50                   	push   %eax
40e9c5:	8b c1                	mov    %ecx,%eax
40e9c7:	50                   	push   %eax
40e9c8:	56                   	push   %esi
40e9c9:	68 e9 fd 00 00       	push   $0xfde9
40e9ce:	ff 15 4c 90 41 00    	call   *0x41904c
40e9d4:	8b b5 3c e5 ff ff    	mov    -0x1ac4(%ebp),%esi
40e9da:	8b bd 34 e5 ff ff    	mov    -0x1acc(%ebp),%edi
40e9e0:	89 85 38 e5 ff ff    	mov    %eax,-0x1ac8(%ebp)
40e9e6:	85 c0                	test   %eax,%eax
40e9e8:	0f 84 c2 00 00 00    	je     0x40eab0
40e9ee:	33 c9                	xor    %ecx,%ecx
40e9f0:	89 8d 40 e5 ff ff    	mov    %ecx,-0x1ac0(%ebp)
40e9f6:	6a 00                	push   $0x0
40e9f8:	2b c1                	sub    %ecx,%eax
40e9fa:	8d 95 24 e5 ff ff    	lea    -0x1adc(%ebp),%edx
40ea00:	52                   	push   %edx
40ea01:	50                   	push   %eax
40ea02:	8d 85 f0 eb ff ff    	lea    -0x1410(%ebp),%eax
40ea08:	03 c1                	add    %ecx,%eax
40ea0a:	8b 8d 1c e5 ff ff    	mov    -0x1ae4(%ebp),%ecx
40ea10:	50                   	push   %eax
40ea11:	8b 85 2c e5 ff ff    	mov    -0x1ad4(%ebp),%eax
40ea17:	8b 04 85 20 2a 42 00 	mov    0x422a20(,%eax,4),%eax
40ea1e:	ff 34 01             	push   (%ecx,%eax,1)
40ea21:	ff 15 b0 90 41 00    	call   *0x4190b0
40ea27:	85 c0                	test   %eax,%eax
40ea29:	74 1e                	je     0x40ea49
40ea2b:	8b 8d 40 e5 ff ff    	mov    -0x1ac0(%ebp),%ecx
40ea31:	03 8d 24 e5 ff ff    	add    -0x1adc(%ebp),%ecx
40ea37:	8b 85 38 e5 ff ff    	mov    -0x1ac8(%ebp),%eax
40ea3d:	89 8d 40 e5 ff ff    	mov    %ecx,-0x1ac0(%ebp)
40ea43:	3b c1                	cmp    %ecx,%eax
40ea45:	7f af                	jg     0x40e9f6
40ea47:	eb 1a                	jmp    0x40ea63
40ea49:	ff 15 18 90 41 00    	call   *0x419018
40ea4f:	8b 8d 40 e5 ff ff    	mov    -0x1ac0(%ebp),%ecx
40ea55:	8b f0                	mov    %eax,%esi
40ea57:	8b 85 38 e5 ff ff    	mov    -0x1ac8(%ebp),%eax
40ea5d:	89 b5 3c e5 ff ff    	mov    %esi,-0x1ac4(%ebp)
40ea63:	3b c1                	cmp    %ecx,%eax
40ea65:	7f 51                	jg     0x40eab8
40ea67:	8b 8d 30 e5 ff ff    	mov    -0x1ad0(%ebp),%ecx
40ea6d:	8b 95 44 e5 ff ff    	mov    -0x1abc(%ebp),%edx
40ea73:	8b f9                	mov    %ecx,%edi
40ea75:	2b fa                	sub    %edx,%edi
40ea77:	89 bd 34 e5 ff ff    	mov    %edi,-0x1acc(%ebp)
40ea7d:	3b fb                	cmp    %ebx,%edi
40ea7f:	0f 82 c8 fe ff ff    	jb     0x40e94d
40ea85:	eb 37                	jmp    0x40eabe
40ea87:	6a 00                	push   $0x0
40ea89:	8d 8d 24 e5 ff ff    	lea    -0x1adc(%ebp),%ecx
40ea8f:	51                   	push   %ecx
40ea90:	ff 75 10             	push   0x10(%ebp)
40ea93:	ff b5 44 e5 ff ff    	push   -0x1abc(%ebp)
40ea99:	ff 34 06             	push   (%esi,%eax,1)
40ea9c:	ff 15 b0 90 41 00    	call   *0x4190b0
40eaa2:	85 c0                	test   %eax,%eax
40eaa4:	74 0a                	je     0x40eab0
40eaa6:	8b bd 24 e5 ff ff    	mov    -0x1adc(%ebp),%edi
40eaac:	33 f6                	xor    %esi,%esi
40eaae:	eb 08                	jmp    0x40eab8
40eab0:	ff 15 18 90 41 00    	call   *0x419018
40eab6:	8b f0                	mov    %eax,%esi
40eab8:	8b 95 44 e5 ff ff    	mov    -0x1abc(%ebp),%edx
40eabe:	85 ff                	test   %edi,%edi
40eac0:	75 63                	jne    0x40eb25
40eac2:	85 f6                	test   %esi,%esi
40eac4:	74 24                	je     0x40eaea
40eac6:	6a 05                	push   $0x5
40eac8:	5b                   	pop    %ebx
40eac9:	3b f3                	cmp    %ebx,%esi
40eacb:	75 14                	jne    0x40eae1
40eacd:	e8 ab 96 ff ff       	call   0x40817d
40ead2:	c7 00 09 00 00 00    	movl   $0x9,(%eax)
40ead8:	e8 6c 96 ff ff       	call   0x408149
40eadd:	89 18                	mov    %ebx,(%eax)
40eadf:	eb 3f                	jmp    0x40eb20
40eae1:	56                   	push   %esi
40eae2:	e8 75 96 ff ff       	call   0x40815c
40eae7:	59                   	pop    %ecx
40eae8:	eb 36                	jmp    0x40eb20
40eaea:	8b 85 2c e5 ff ff    	mov    -0x1ad4(%ebp),%eax
40eaf0:	8b 8d 1c e5 ff ff    	mov    -0x1ae4(%ebp),%ecx
40eaf6:	8b 04 85 20 2a 42 00 	mov    0x422a20(,%eax,4),%eax
40eafd:	f6 44 01 04 40       	testb  $0x40,0x4(%ecx,%eax,1)
40eb02:	74 09                	je     0x40eb0d
40eb04:	80 3a 1a             	cmpb   $0x1a,(%edx)
40eb07:	75 04                	jne    0x40eb0d
40eb09:	33 c0                	xor    %eax,%eax
40eb0b:	eb 20                	jmp    0x40eb2d
40eb0d:	e8 6b 96 ff ff       	call   0x40817d
40eb12:	c7 00 1c 00 00 00    	movl   $0x1c,(%eax)
40eb18:	e8 2c 96 ff ff       	call   0x408149
40eb1d:	83 20 00             	andl   $0x0,(%eax)
40eb20:	83 c8 ff             	or     $0xffffffff,%eax
40eb23:	eb 08                	jmp    0x40eb2d
40eb25:	2b bd 28 e5 ff ff    	sub    -0x1ad8(%ebp),%edi
40eb2b:	8b c7                	mov    %edi,%eax
40eb2d:	5b                   	pop    %ebx
40eb2e:	8b 4d fc             	mov    -0x4(%ebp),%ecx
40eb31:	5f                   	pop    %edi
40eb32:	33 cd                	xor    %ebp,%ecx
40eb34:	5e                   	pop    %esi
40eb35:	e8 ff 5b ff ff       	call   0x404739
40eb3a:	c9                   	leave
40eb3b:	c3                   	ret
40eb3c:	55                   	push   %ebp
40eb3d:	8b ec                	mov    %esp,%ebp
40eb3f:	57                   	push   %edi
40eb40:	8b 7d 08             	mov    0x8(%ebp),%edi
40eb43:	85 ff                	test   %edi,%edi
40eb45:	75 15                	jne    0x40eb5c
40eb47:	e8 31 96 ff ff       	call   0x40817d
40eb4c:	c7 00 16 00 00 00    	movl   $0x16,(%eax)
40eb52:	e8 9e ca ff ff       	call   0x40b5f5
40eb57:	e9 08 01 00 00       	jmp    0x40ec64
40eb5c:	e8 91 ea ff ff       	call   0x40d5f2
40eb61:	85 c0                	test   %eax,%eax
40eb63:	0f 88 fb 00 00 00    	js     0x40ec64
40eb69:	8b 47 0c             	mov    0xc(%edi),%eax
40eb6c:	a8 83                	test   $0x83,%al
40eb6e:	0f 84 f0 00 00 00    	je     0x40ec64
40eb74:	a8 40                	test   $0x40,%al
40eb76:	0f 85 e8 00 00 00    	jne    0x40ec64
40eb7c:	a8 02                	test   $0x2,%al
40eb7e:	74 0b                	je     0x40eb8b
40eb80:	83 c8 20             	or     $0x20,%eax
40eb83:	89 47 0c             	mov    %eax,0xc(%edi)
40eb86:	e9 d9 00 00 00       	jmp    0x40ec64
40eb8b:	83 c8 01             	or     $0x1,%eax
40eb8e:	89 47 0c             	mov    %eax,0xc(%edi)
40eb91:	a9 0c 01 00 00       	test   $0x10c,%eax
40eb96:	75 09                	jne    0x40eba1
40eb98:	57                   	push   %edi
40eb99:	e8 6e 06 00 00       	call   0x40f20c
40eb9e:	59                   	pop    %ecx
40eb9f:	eb 05                	jmp    0x40eba6
40eba1:	8b 47 08             	mov    0x8(%edi),%eax
40eba4:	89 07                	mov    %eax,(%edi)
40eba6:	ff 77 18             	push   0x18(%edi)
40eba9:	ff 77 08             	push   0x8(%edi)
40ebac:	57                   	push   %edi
40ebad:	e8 87 f3 ff ff       	call   0x40df39
40ebb2:	59                   	pop    %ecx
40ebb3:	50                   	push   %eax
40ebb4:	e8 02 53 00 00       	call   0x413ebb
40ebb9:	83 c4 0c             	add    $0xc,%esp
40ebbc:	89 47 04             	mov    %eax,0x4(%edi)
40ebbf:	85 c0                	test   %eax,%eax
40ebc1:	0f 84 8c 00 00 00    	je     0x40ec53
40ebc7:	83 f8 ff             	cmp    $0xffffffff,%eax
40ebca:	0f 84 83 00 00 00    	je     0x40ec53
40ebd0:	f6 47 0c 82          	testb  $0x82,0xc(%edi)
40ebd4:	75 51                	jne    0x40ec27
40ebd6:	57                   	push   %edi
40ebd7:	e8 5d f3 ff ff       	call   0x40df39
40ebdc:	59                   	pop    %ecx
40ebdd:	83 f8 ff             	cmp    $0xffffffff,%eax
40ebe0:	74 30                	je     0x40ec12
40ebe2:	57                   	push   %edi
40ebe3:	e8 51 f3 ff ff       	call   0x40df39
40ebe8:	59                   	pop    %ecx
40ebe9:	83 f8 fe             	cmp    $0xfffffffe,%eax
40ebec:	74 24                	je     0x40ec12
40ebee:	56                   	push   %esi
40ebef:	57                   	push   %edi
40ebf0:	e8 44 f3 ff ff       	call   0x40df39
40ebf5:	8b f0                	mov    %eax,%esi
40ebf7:	57                   	push   %edi
40ebf8:	c1 fe 05             	sar    $0x5,%esi
40ebfb:	e8 39 f3 ff ff       	call   0x40df39
40ec00:	83 e0 1f             	and    $0x1f,%eax
40ec03:	59                   	pop    %ecx
40ec04:	c1 e0 06             	shl    $0x6,%eax
40ec07:	03 04 b5 20 2a 42 00 	add    0x422a20(,%esi,4),%eax
40ec0e:	59                   	pop    %ecx
40ec0f:	5e                   	pop    %esi
40ec10:	eb 05                	jmp    0x40ec17
40ec12:	b8 18 10 42 00       	mov    $0x421018,%eax
40ec17:	8a 40 04             	mov    0x4(%eax),%al
40ec1a:	24 82                	and    $0x82,%al
40ec1c:	3c 82                	cmp    $0x82,%al
40ec1e:	75 07                	jne    0x40ec27
40ec20:	81 4f 0c 00 20 00 00 	orl    $0x2000,0xc(%edi)
40ec27:	81 7f 18 00 02 00 00 	cmpl   $0x200,0x18(%edi)
40ec2e:	75 16                	jne    0x40ec46
40ec30:	f6 47 0c 08          	testb  $0x8,0xc(%edi)
40ec34:	74 10                	je     0x40ec46
40ec36:	f7 47 0c 00 04 00 00 	testl  $0x400,0xc(%edi)
40ec3d:	75 07                	jne    0x40ec46
40ec3f:	c7 47 18 00 10 00 00 	movl   $0x1000,0x18(%edi)
40ec46:	8b 0f                	mov    (%edi),%ecx
40ec48:	ff 4f 04             	decl   0x4(%edi)
40ec4b:	0f b6 01             	movzbl (%ecx),%eax
40ec4e:	41                   	inc    %ecx
40ec4f:	89 0f                	mov    %ecx,(%edi)
40ec51:	eb 14                	jmp    0x40ec67
40ec53:	f7 d8                	neg    %eax
40ec55:	1b c0                	sbb    %eax,%eax
40ec57:	83 e0 10             	and    $0x10,%eax
40ec5a:	83 c0 10             	add    $0x10,%eax
40ec5d:	09 47 0c             	or     %eax,0xc(%edi)
40ec60:	83 67 04 00          	andl   $0x0,0x4(%edi)
40ec64:	83 c8 ff             	or     $0xffffffff,%eax
40ec67:	5f                   	pop    %edi
40ec68:	5d                   	pop    %ebp
40ec69:	c3                   	ret
40ec6a:	6a 10                	push   $0x10
40ec6c:	68 d8 e6 41 00       	push   $0x41e6d8
40ec71:	e8 3a c1 ff ff       	call   0x40adb0
40ec76:	33 c0                	xor    %eax,%eax
40ec78:	8b 75 08             	mov    0x8(%ebp),%esi
40ec7b:	85 f6                	test   %esi,%esi
40ec7d:	0f 95 c0             	setne  %al
40ec80:	85 c0                	test   %eax,%eax
40ec82:	75 17                	jne    0x40ec9b
40ec84:	e8 f4 94 ff ff       	call   0x40817d
40ec89:	c7 00 16 00 00 00    	movl   $0x16,(%eax)
40ec8f:	e8 61 c9 ff ff       	call   0x40b5f5
40ec94:	83 c8 ff             	or     $0xffffffff,%eax
40ec97:	0b d0                	or     %eax,%edx
40ec99:	eb 35                	jmp    0x40ecd0
40ec9b:	e8 52 e9 ff ff       	call   0x40d5f2
40eca0:	85 c0                	test   %eax,%eax
40eca2:	78 f0                	js     0x40ec94
40eca4:	56                   	push   %esi
40eca5:	e8 71 76 ff ff       	call   0x40631b
40ecaa:	59                   	pop    %ecx
40ecab:	83 65 fc 00          	andl   $0x0,-0x4(%ebp)
40ecaf:	56                   	push   %esi
40ecb0:	e8 32 00 00 00       	call   0x40ece7
40ecb5:	59                   	pop    %ecx
40ecb6:	8b f8                	mov    %eax,%edi
40ecb8:	89 7d e0             	mov    %edi,-0x20(%ebp)
40ecbb:	8b da                	mov    %edx,%ebx
40ecbd:	89 5d e4             	mov    %ebx,-0x1c(%ebp)
40ecc0:	c7 45 fc fe ff ff ff 	movl   $0xfffffffe,-0x4(%ebp)
40ecc7:	e8 13 00 00 00       	call   0x40ecdf
40eccc:	8b c7                	mov    %edi,%eax
40ecce:	8b d3                	mov    %ebx,%edx
40ecd0:	e8 20 c1 ff ff       	call   0x40adf5
40ecd5:	c3                   	ret
40ecd6:	8b 75 08             	mov    0x8(%ebp),%esi
40ecd9:	8b 5d e4             	mov    -0x1c(%ebp),%ebx
40ecdc:	8b 7d e0             	mov    -0x20(%ebp),%edi
40ecdf:	56                   	push   %esi
40ece0:	e8 a5 76 ff ff       	call   0x40638a
40ece5:	59                   	pop    %ecx
40ece6:	c3                   	ret
40ece7:	55                   	push   %ebp
40ece8:	8b ec                	mov    %esp,%ebp
40ecea:	b8 24 10 00 00       	mov    $0x1024,%eax
40ecef:	e8 9c 51 00 00       	call   0x413e90
40ecf4:	a1 90 08 42 00       	mov    0x420890,%eax
40ecf9:	33 c5                	xor    %ebp,%eax
40ecfb:	89 45 fc             	mov    %eax,-0x4(%ebp)
40ecfe:	53                   	push   %ebx
40ecff:	8b 5d 08             	mov    0x8(%ebp),%ebx
40ed02:	56                   	push   %esi
40ed03:	57                   	push   %edi
40ed04:	53                   	push   %ebx
40ed05:	e8 2f f2 ff ff       	call   0x40df39
40ed0a:	33 ff                	xor    %edi,%edi
40ed0c:	8b f0                	mov    %eax,%esi
40ed0e:	59                   	pop    %ecx
40ed0f:	89 b5 e8 ef ff ff    	mov    %esi,-0x1018(%ebp)
40ed15:	39 7b 04             	cmp    %edi,0x4(%ebx)
40ed18:	7d 03                	jge    0x40ed1d
40ed1a:	89 7b 04             	mov    %edi,0x4(%ebx)
40ed1d:	6a 01                	push   $0x1
40ed1f:	57                   	push   %edi
40ed20:	57                   	push   %edi
40ed21:	56                   	push   %esi
40ed22:	e8 6b 03 00 00       	call   0x40f092
40ed27:	83 c4 10             	add    $0x10,%esp
40ed2a:	89 85 f0 ef ff ff    	mov    %eax,-0x1010(%ebp)
40ed30:	89 95 f4 ef ff ff    	mov    %edx,-0x100c(%ebp)
40ed36:	3b d7                	cmp    %edi,%edx
40ed38:	7f 10                	jg     0x40ed4a
40ed3a:	7c 04                	jl     0x40ed40
40ed3c:	3b c7                	cmp    %edi,%eax
40ed3e:	73 0a                	jae    0x40ed4a
40ed40:	83 c8 ff             	or     $0xffffffff,%eax
40ed43:	0b d0                	or     %eax,%edx
40ed45:	e9 39 03 00 00       	jmp    0x40f083
40ed4a:	8b c6                	mov    %esi,%eax
40ed4c:	c1 f8 05             	sar    $0x5,%eax
40ed4f:	8b ce                	mov    %esi,%ecx
40ed51:	8b 34 85 20 2a 42 00 	mov    0x422a20(,%eax,4),%esi
40ed58:	83 e1 1f             	and    $0x1f,%ecx
40ed5b:	c1 e1 06             	shl    $0x6,%ecx
40ed5e:	89 85 ec ef ff ff    	mov    %eax,-0x1014(%ebp)
40ed64:	8a 44 0e 24          	mov    0x24(%esi,%ecx,1),%al
40ed68:	02 c0                	add    %al,%al
40ed6a:	d0 f8                	sar    $1,%al
40ed6c:	f7 43 0c 08 01 00 00 	testl  $0x108,0xc(%ebx)
40ed73:	88 85 fb ef ff ff    	mov    %al,-0x1005(%ebp)
40ed79:	8b 85 f0 ef ff ff    	mov    -0x1010(%ebp),%eax
40ed7f:	89 8d e0 ef ff ff    	mov    %ecx,-0x1020(%ebp)
40ed85:	75 1d                	jne    0x40eda4
40ed87:	8b 43 04             	mov    0x4(%ebx),%eax
40ed8a:	8b 8d f0 ef ff ff    	mov    -0x1010(%ebp),%ecx
40ed90:	8b bd f4 ef ff ff    	mov    -0x100c(%ebp),%edi