40e8ad:	ff 75 08             	push   0x8(%ebp)
40e8b0:	8b 45 f0             	mov    -0x10(%ebp),%eax
40e8b3:	6a 01                	push   $0x1
40e8b5:	56                   	push   %esi
40e8b6:	6a 09                	push   $0x9
40e8b8:	ff 70 04             	push   0x4(%eax)
40e8bb:	ff 15 a0 70 41 00    	call   *0x4170a0
40e8c1:	85 c0                	test   %eax,%eax
40e8c3:	0f 85 3a ff ff ff    	jne    0x40e803
40e8c9:	eb ba                	jmp    0x40e885
40e8cb:	6a 00                	push   $0x0
40e8cd:	ff 74 24 10          	push   0x10(%esp)
40e8d1:	ff 74 24 10          	push   0x10(%esp)
40e8d5:	ff 74 24 10          	push   0x10(%esp)
40e8d9:	e8 da fe ff ff       	call   0x40e7b8
40e8de:	83 c4 10             	add    $0x10,%esp
40e8e1:	c3                   	ret
40e8e2:	55                   	push   %ebp
40e8e3:	8b ec                	mov    %esp,%ebp
40e8e5:	83 ec 10             	sub    $0x10,%esp
40e8e8:	ff 75 0c             	push   0xc(%ebp)
40e8eb:	8d 4d f0             	lea    -0x10(%ebp),%ecx
40e8ee:	e8 d1 a0 ff ff       	call   0x4089c4
40e8f3:	0f b6 45 08          	movzbl 0x8(%ebp),%eax
40e8f7:	8b 4d f0             	mov    -0x10(%ebp),%ecx
40e8fa:	8b 89 c8 00 00 00    	mov    0xc8(%ecx),%ecx
40e900:	0f b7 04 41          	movzwl (%ecx,%eax,2),%eax
40e904:	25 00 80 00 00       	and    $0x8000,%eax
40e909:	80 7d fc 00          	cmpb   $0x0,-0x4(%ebp)
40e90d:	74 07                	je     0x40e916
40e90f:	8b 4d f8             	mov    -0x8(%ebp),%ecx
40e912:	83 61 70 fd          	andl   $0xfffffffd,0x70(%ecx)
40e916:	c9                   	leave
40e917:	c3                   	ret
40e918:	6a 00                	push   $0x0
40e91a:	ff 74 24 08          	push   0x8(%esp)
40e91e:	e8 bf ff ff ff       	call   0x40e8e2
40e923:	59                   	pop    %ecx
40e924:	59                   	pop    %ecx
40e925:	c3                   	ret
40e926:	56                   	push   %esi
40e927:	8b 74 24 08          	mov    0x8(%esp),%esi
40e92b:	57                   	push   %edi
40e92c:	33 ff                	xor    %edi,%edi
40e92e:	3b f7                	cmp    %edi,%esi
40e930:	75 1d                	jne    0x40e94f
40e932:	e8 c3 aa ff ff       	call   0x4093fa
40e937:	57                   	push   %edi
40e938:	57                   	push   %edi
40e939:	57                   	push   %edi
40e93a:	57                   	push   %edi
40e93b:	57                   	push   %edi
40e93c:	c7 00 16 00 00 00    	movl   $0x16,(%eax)
40e942:	e8 09 8d ff ff       	call   0x407650
40e947:	83 c4 14             	add    $0x14,%esp
40e94a:	e9 f1 00 00 00       	jmp    0x40ea40
40e94f:	8b 46 0c             	mov    0xc(%esi),%eax
40e952:	a8 83                	test   $0x83,%al
40e954:	0f 84 e6 00 00 00    	je     0x40ea40
40e95a:	a8 40                	test   $0x40,%al
40e95c:	0f 85 de 00 00 00    	jne    0x40ea40
40e962:	a8 02                	test   $0x2,%al
40e964:	74 0b                	je     0x40e971
40e966:	83 c8 20             	or     $0x20,%eax
40e969:	89 46 0c             	mov    %eax,0xc(%esi)
40e96c:	e9 cf 00 00 00       	jmp    0x40ea40
40e971:	83 c8 01             	or     $0x1,%eax
40e974:	66 a9 0c 01          	test   $0x10c,%ax
40e978:	89 46 0c             	mov    %eax,0xc(%esi)
40e97b:	75 09                	jne    0x40e986
40e97d:	56                   	push   %esi
40e97e:	e8 da 03 00 00       	call   0x40ed5d
40e983:	59                   	pop    %ecx
40e984:	eb 05                	jmp    0x40e98b
40e986:	8b 46 08             	mov    0x8(%esi),%eax
40e989:	89 06                	mov    %eax,(%esi)
40e98b:	ff 76 18             	push   0x18(%esi)
40e98e:	ff 76 08             	push   0x8(%esi)
40e991:	56                   	push   %esi
40e992:	e8 af 00 00 00       	call   0x40ea46
40e997:	59                   	pop    %ecx
40e998:	50                   	push   %eax
40e999:	e8 c4 61 00 00       	call   0x414b62
40e99e:	83 c4 0c             	add    $0xc,%esp
40e9a1:	3b c7                	cmp    %edi,%eax
40e9a3:	89 46 04             	mov    %eax,0x4(%esi)
40e9a6:	0f 84 84 00 00 00    	je     0x40ea30
40e9ac:	83 f8 ff             	cmp    $0xffffffff,%eax
40e9af:	74 7f                	je     0x40ea30
40e9b1:	f6 46 0c 82          	testb  $0x82,0xc(%esi)
40e9b5:	75 4f                	jne    0x40ea06
40e9b7:	56                   	push   %esi
40e9b8:	e8 89 00 00 00       	call   0x40ea46
40e9bd:	83 f8 ff             	cmp    $0xffffffff,%eax
40e9c0:	59                   	pop    %ecx
40e9c1:	74 2e                	je     0x40e9f1
40e9c3:	56                   	push   %esi
40e9c4:	e8 7d 00 00 00       	call   0x40ea46
40e9c9:	83 f8 fe             	cmp    $0xfffffffe,%eax
40e9cc:	59                   	pop    %ecx
40e9cd:	74 22                	je     0x40e9f1
40e9cf:	56                   	push   %esi
40e9d0:	e8 71 00 00 00       	call   0x40ea46
40e9d5:	c1 f8 05             	sar    $0x5,%eax
40e9d8:	56                   	push   %esi
40e9d9:	8d 3c 85 c0 e4 41 00 	lea    0x41e4c0(,%eax,4),%edi
40e9e0:	e8 61 00 00 00       	call   0x40ea46
40e9e5:	83 e0 1f             	and    $0x1f,%eax
40e9e8:	6b c0 28             	imul   $0x28,%eax,%eax
40e9eb:	03 07                	add    (%edi),%eax
40e9ed:	59                   	pop    %ecx
40e9ee:	59                   	pop    %ecx
40e9ef:	eb 05                	jmp    0x40e9f6
40e9f1:	b8 f0 cb 41 00       	mov    $0x41cbf0,%eax
40e9f6:	8a 40 04             	mov    0x4(%eax),%al
40e9f9:	24 82                	and    $0x82,%al
40e9fb:	3c 82                	cmp    $0x82,%al
40e9fd:	75 07                	jne    0x40ea06
40e9ff:	81 4e 0c 00 20 00 00 	orl    $0x2000,0xc(%esi)
40ea06:	81 7e 18 00 02 00 00 	cmpl   $0x200,0x18(%esi)
40ea0d:	75 14                	jne    0x40ea23
40ea0f:	8b 46 0c             	mov    0xc(%esi),%eax
40ea12:	a8 08                	test   $0x8,%al
40ea14:	74 0d                	je     0x40ea23
40ea16:	66 a9 00 04          	test   $0x400,%ax
40ea1a:	75 07                	jne    0x40ea23
40ea1c:	c7 46 18 00 10 00 00 	movl   $0x1000,0x18(%esi)
40ea23:	8b 0e                	mov    (%esi),%ecx
40ea25:	ff 4e 04             	decl   0x4(%esi)
40ea28:	0f b6 01             	movzbl (%ecx),%eax
40ea2b:	41                   	inc    %ecx
40ea2c:	89 0e                	mov    %ecx,(%esi)
40ea2e:	eb 13                	jmp    0x40ea43
40ea30:	f7 d8                	neg    %eax
40ea32:	1b c0                	sbb    %eax,%eax
40ea34:	83 e0 10             	and    $0x10,%eax
40ea37:	83 c0 10             	add    $0x10,%eax
40ea3a:	09 46 0c             	or     %eax,0xc(%esi)
40ea3d:	89 7e 04             	mov    %edi,0x4(%esi)
40ea40:	83 c8 ff             	or     $0xffffffff,%eax
40ea43:	5f                   	pop    %edi
40ea44:	5e                   	pop    %esi
40ea45:	c3                   	ret
40ea46:	8b 44 24 04          	mov    0x4(%esp),%eax
40ea4a:	56                   	push   %esi
40ea4b:	33 f6                	xor    %esi,%esi
40ea4d:	3b c6                	cmp    %esi,%eax
40ea4f:	75 1d                	jne    0x40ea6e
40ea51:	e8 a4 a9 ff ff       	call   0x4093fa
40ea56:	56                   	push   %esi
40ea57:	56                   	push   %esi
40ea58:	56                   	push   %esi
40ea59:	56                   	push   %esi
40ea5a:	56                   	push   %esi
40ea5b:	c7 00 16 00 00 00    	movl   $0x16,(%eax)
40ea61:	e8 ea 8b ff ff       	call   0x407650
40ea66:	83 c4 14             	add    $0x14,%esp
40ea69:	83 c8 ff             	or     $0xffffffff,%eax
40ea6c:	5e                   	pop    %esi
40ea6d:	c3                   	ret
40ea6e:	8b 40 10             	mov    0x10(%eax),%eax
40ea71:	5e                   	pop    %esi
40ea72:	c3                   	ret
40ea73:	55                   	push   %ebp
40ea74:	8b ec                	mov    %esp,%ebp
40ea76:	51                   	push   %ecx
40ea77:	56                   	push   %esi
40ea78:	8b 75 0c             	mov    0xc(%ebp),%esi
40ea7b:	56                   	push   %esi
40ea7c:	e8 c5 ff ff ff       	call   0x40ea46
40ea81:	89 45 0c             	mov    %eax,0xc(%ebp)
40ea84:	8b 46 0c             	mov    0xc(%esi),%eax
40ea87:	a8 82                	test   $0x82,%al
40ea89:	59                   	pop    %ecx
40ea8a:	75 19                	jne    0x40eaa5
40ea8c:	e8 69 a9 ff ff       	call   0x4093fa
40ea91:	c7 00 09 00 00 00    	movl   $0x9,(%eax)
40ea97:	83 4e 0c 20          	orl    $0x20,0xc(%esi)
40ea9b:	b8 ff ff 00 00       	mov    $0xffff,%eax
40eaa0:	e9 3b 01 00 00       	jmp    0x40ebe0
40eaa5:	a8 40                	test   $0x40,%al
40eaa7:	74 0d                	je     0x40eab6
40eaa9:	e8 4c a9 ff ff       	call   0x4093fa
40eaae:	c7 00 22 00 00 00    	movl   $0x22,(%eax)
40eab4:	eb e1                	jmp    0x40ea97
40eab6:	a8 01                	test   $0x1,%al
40eab8:	74 17                	je     0x40ead1
40eaba:	83 66 04 00          	andl   $0x0,0x4(%esi)
40eabe:	a8 10                	test   $0x10,%al
40eac0:	0f 84 8b 00 00 00    	je     0x40eb51
40eac6:	8b 4e 08             	mov    0x8(%esi),%ecx
40eac9:	83 e0 fe             	and    $0xfffffffe,%eax
40eacc:	89 0e                	mov    %ecx,(%esi)
40eace:	89 46 0c             	mov    %eax,0xc(%esi)
40ead1:	8b 46 0c             	mov    0xc(%esi),%eax
40ead4:	83 66 04 00          	andl   $0x0,0x4(%esi)
40ead8:	83 65 fc 00          	andl   $0x0,-0x4(%ebp)
40eadc:	53                   	push   %ebx
40eadd:	6a 02                	push   $0x2
40eadf:	83 e0 ef             	and    $0xffffffef,%eax
40eae2:	5b                   	pop    %ebx
40eae3:	0b c3                	or     %ebx,%eax
40eae5:	66 a9 0c 01          	test   $0x10c,%ax
40eae9:	89 46 0c             	mov    %eax,0xc(%esi)
40eaec:	75 2c                	jne    0x40eb1a
40eaee:	e8 3b 9d ff ff       	call   0x40882e
40eaf3:	83 c0 20             	add    $0x20,%eax
40eaf6:	3b f0                	cmp    %eax,%esi
40eaf8:	74 0c                	je     0x40eb06
40eafa:	e8 2f 9d ff ff       	call   0x40882e
40eaff:	83 c0 40             	add    $0x40,%eax
40eb02:	3b f0                	cmp    %eax,%esi
40eb04:	75 0d                	jne    0x40eb13
40eb06:	ff 75 0c             	push   0xc(%ebp)
40eb09:	e8 80 53 00 00       	call   0x413e8e
40eb0e:	85 c0                	test   %eax,%eax
40eb10:	59                   	pop    %ecx
40eb11:	75 07                	jne    0x40eb1a
40eb13:	56                   	push   %esi
40eb14:	e8 44 02 00 00       	call   0x40ed5d
40eb19:	59                   	pop    %ecx
40eb1a:	66 f7 46 0c 08 01    	testw  $0x108,0xc(%esi)
40eb20:	57                   	push   %edi
40eb21:	0f 84 83 00 00 00    	je     0x40ebaa
40eb27:	8b 46 08             	mov    0x8(%esi),%eax
40eb2a:	8b 3e                	mov    (%esi),%edi
40eb2c:	8d 48 02             	lea    0x2(%eax),%ecx
40eb2f:	89 0e                	mov    %ecx,(%esi)
40eb31:	8b 4e 18             	mov    0x18(%esi),%ecx
40eb34:	2b f8                	sub    %eax,%edi
40eb36:	2b cb                	sub    %ebx,%ecx
40eb38:	85 ff                	test   %edi,%edi
40eb3a:	89 4e 04             	mov    %ecx,0x4(%esi)
40eb3d:	7e 1d                	jle    0x40eb5c
40eb3f:	57                   	push   %edi
40eb40:	50                   	push   %eax
40eb41:	ff 75 0c             	push   0xc(%ebp)
40eb44:	e8 1e 08 00 00       	call   0x40f367
40eb49:	83 c4 0c             	add    $0xc,%esp
40eb4c:	89 45 fc             	mov    %eax,-0x4(%ebp)
40eb4f:	eb 4e                	jmp    0x40eb9f
40eb51:	83 c8 20             	or     $0x20,%eax
40eb54:	89 46 0c             	mov    %eax,0xc(%esi)
40eb57:	e9 3f ff ff ff       	jmp    0x40ea9b
40eb5c:	8b 4d 0c             	mov    0xc(%ebp),%ecx
40eb5f:	83 f9 ff             	cmp    $0xffffffff,%ecx
40eb62:	74 1b                	je     0x40eb7f
40eb64:	83 f9 fe             	cmp    $0xfffffffe,%ecx
40eb67:	74 16                	je     0x40eb7f
40eb69:	8b c1                	mov    %ecx,%eax
40eb6b:	83 e0 1f             	and    $0x1f,%eax
40eb6e:	6b c0 28             	imul   $0x28,%eax,%eax
40eb71:	8b d1                	mov    %ecx,%edx
40eb73:	c1 fa 05             	sar    $0x5,%edx
40eb76:	03 04 95 c0 e4 41 00 	add    0x41e4c0(,%edx,4),%eax
40eb7d:	eb 05                	jmp    0x40eb84
40eb7f:	b8 f0 cb 41 00       	mov    $0x41cbf0,%eax
40eb84:	f6 40 04 20          	testb  $0x20,0x4(%eax)
40eb88:	74 15                	je     0x40eb9f
40eb8a:	53                   	push   %ebx
40eb8b:	6a 00                	push   $0x0
40eb8d:	6a 00                	push   $0x0
40eb8f:	51                   	push   %ecx
40eb90:	e8 e0 51 00 00       	call   0x413d75
40eb95:	23 c2                	and    %edx,%eax
40eb97:	83 c4 10             	add    $0x10,%esp
40eb9a:	83 f8 ff             	cmp    $0xffffffff,%eax
40eb9d:	74 2d                	je     0x40ebcc
40eb9f:	8b 46 08             	mov    0x8(%esi),%eax
40eba2:	8b 5d 08             	mov    0x8(%ebp),%ebx
40eba5:	66 89 18             	mov    %bx,(%eax)
40eba8:	eb 1d                	jmp    0x40ebc7
40ebaa:	6a 02                	push   $0x2
40ebac:	8d 45 fc             	lea    -0x4(%ebp),%eax
40ebaf:	50                   	push   %eax
40ebb0:	ff 75 0c             	push   0xc(%ebp)
40ebb3:	8b fb                	mov    %ebx,%edi
40ebb5:	8b 5d 08             	mov    0x8(%ebp),%ebx
40ebb8:	66 89 5d fc          	mov    %bx,-0x4(%ebp)
40ebbc:	e8 a6 07 00 00       	call   0x40f367
40ebc1:	83 c4 0c             	add    $0xc,%esp
40ebc4:	89 45 fc             	mov    %eax,-0x4(%ebp)
40ebc7:	39 7d fc             	cmp    %edi,-0x4(%ebp)
40ebca:	74 0b                	je     0x40ebd7
40ebcc:	83 4e 0c 20          	orl    $0x20,0xc(%esi)
40ebd0:	b8 ff ff 00 00       	mov    $0xffff,%eax
40ebd5:	eb 07                	jmp    0x40ebde
40ebd7:	8b c3                	mov    %ebx,%eax
40ebd9:	25 ff ff 00 00       	and    $0xffff,%eax
40ebde:	5f                   	pop    %edi
40ebdf:	5b                   	pop    %ebx
40ebe0:	5e                   	pop    %esi
40ebe1:	c9                   	leave
40ebe2:	c3                   	ret
40ebe3:	55                   	push   %ebp
40ebe4:	8b ec                	mov    %esp,%ebp
40ebe6:	83 ec 10             	sub    $0x10,%esp
40ebe9:	53                   	push   %ebx
40ebea:	56                   	push   %esi
40ebeb:	8b 75 0c             	mov    0xc(%ebp),%esi
40ebee:	33 db                	xor    %ebx,%ebx
40ebf0:	3b f3                	cmp    %ebx,%esi
40ebf2:	57                   	push   %edi
40ebf3:	8b 7d 10             	mov    0x10(%ebp),%edi
40ebf6:	75 11                	jne    0x40ec09
40ebf8:	3b fb                	cmp    %ebx,%edi
40ebfa:	76 0d                	jbe    0x40ec09
40ebfc:	8b 45 08             	mov    0x8(%ebp),%eax
40ebff:	3b c3                	cmp    %ebx,%eax
40ec01:	74 02                	je     0x40ec05
40ec03:	89 18                	mov    %ebx,(%eax)
40ec05:	33 c0                	xor    %eax,%eax
40ec07:	eb 7f                	jmp    0x40ec88
40ec09:	8b 45 08             	mov    0x8(%ebp),%eax
40ec0c:	3b c3                	cmp    %ebx,%eax
40ec0e:	74 03                	je     0x40ec13
40ec10:	83 08 ff             	orl    $0xffffffff,(%eax)
40ec13:	81 ff ff ff ff 7f    	cmp    $0x7fffffff,%edi
40ec19:	76 1b                	jbe    0x40ec36
40ec1b:	e8 da a7 ff ff       	call   0x4093fa
40ec20:	6a 16                	push   $0x16
40ec22:	5e                   	pop    %esi
40ec23:	53                   	push   %ebx
40ec24:	53                   	push   %ebx
40ec25:	53                   	push   %ebx
40ec26:	53                   	push   %ebx
40ec27:	53                   	push   %ebx
40ec28:	89 30                	mov    %esi,(%eax)
40ec2a:	e8 21 8a ff ff       	call   0x407650
40ec2f:	83 c4 14             	add    $0x14,%esp
40ec32:	8b c6                	mov    %esi,%eax
40ec34:	eb 52                	jmp    0x40ec88
40ec36:	ff 75 18             	push   0x18(%ebp)
40ec39:	8d 4d f0             	lea    -0x10(%ebp),%ecx
40ec3c:	e8 83 9d ff ff       	call   0x4089c4
40ec41:	8b 45 f0             	mov    -0x10(%ebp),%eax
40ec44:	39 58 14             	cmp    %ebx,0x14(%eax)
40ec47:	0f 85 94 00 00 00    	jne    0x40ece1
40ec4d:	66 8b 45 14          	mov    0x14(%ebp),%ax
40ec51:	66 3d ff 00          	cmp    $0xff,%ax
40ec55:	76 36                	jbe    0x40ec8d
40ec57:	3b f3                	cmp    %ebx,%esi
40ec59:	74 0f                	je     0x40ec6a
40ec5b:	3b fb                	cmp    %ebx,%edi
40ec5d:	76 0b                	jbe    0x40ec6a
40ec5f:	57                   	push   %edi
40ec60:	53                   	push   %ebx
40ec61:	56                   	push   %esi
40ec62:	e8 e9 6e ff ff       	call   0x405b50
40ec67:	83 c4 0c             	add    $0xc,%esp