40e6c2:	a8 02                	test   $0x2,%al
40e6c4:	74 0b                	je     0x40e6d1
40e6c6:	83 c8 20             	or     $0x20,%eax
40e6c9:	89 46 0c             	mov    %eax,0xc(%esi)
40e6cc:	e9 df 00 00 00       	jmp    0x40e7b0
40e6d1:	83 c8 01             	or     $0x1,%eax
40e6d4:	66 a9 0c 01          	test   $0x10c,%ax
40e6d8:	89 46 0c             	mov    %eax,0xc(%esi)
40e6db:	75 09                	jne    0x40e6e6
40e6dd:	56                   	push   %esi
40e6de:	e8 7a 06 00 00       	call   0x40ed5d
40e6e3:	59                   	pop    %ecx
40e6e4:	eb 05                	jmp    0x40e6eb
40e6e6:	8b 46 08             	mov    0x8(%esi),%eax
40e6e9:	89 06                	mov    %eax,(%esi)
40e6eb:	ff 76 18             	push   0x18(%esi)
40e6ee:	ff 76 08             	push   0x8(%esi)
40e6f1:	56                   	push   %esi
40e6f2:	e8 4f 03 00 00       	call   0x40ea46
40e6f7:	59                   	pop    %ecx
40e6f8:	50                   	push   %eax
40e6f9:	e8 64 64 00 00       	call   0x414b62
40e6fe:	83 c4 0c             	add    $0xc,%esp
40e701:	3b c7                	cmp    %edi,%eax
40e703:	89 46 04             	mov    %eax,0x4(%esi)
40e706:	0f 84 94 00 00 00    	je     0x40e7a0
40e70c:	83 f8 01             	cmp    $0x1,%eax
40e70f:	0f 84 8b 00 00 00    	je     0x40e7a0
40e715:	83 f8 ff             	cmp    $0xffffffff,%eax
40e718:	0f 84 82 00 00 00    	je     0x40e7a0
40e71e:	f6 46 0c 82          	testb  $0x82,0xc(%esi)
40e722:	75 4f                	jne    0x40e773
40e724:	56                   	push   %esi
40e725:	e8 1c 03 00 00       	call   0x40ea46
40e72a:	83 f8 ff             	cmp    $0xffffffff,%eax
40e72d:	59                   	pop    %ecx
40e72e:	74 2e                	je     0x40e75e
40e730:	56                   	push   %esi
40e731:	e8 10 03 00 00       	call   0x40ea46
40e736:	83 f8 fe             	cmp    $0xfffffffe,%eax
40e739:	59                   	pop    %ecx
40e73a:	74 22                	je     0x40e75e
40e73c:	56                   	push   %esi
40e73d:	e8 04 03 00 00       	call   0x40ea46
40e742:	c1 f8 05             	sar    $0x5,%eax
40e745:	56                   	push   %esi
40e746:	8d 3c 85 c0 e4 41 00 	lea    0x41e4c0(,%eax,4),%edi
40e74d:	e8 f4 02 00 00       	call   0x40ea46
40e752:	83 e0 1f             	and    $0x1f,%eax
40e755:	6b c0 28             	imul   $0x28,%eax,%eax
40e758:	03 07                	add    (%edi),%eax
40e75a:	59                   	pop    %ecx
40e75b:	59                   	pop    %ecx
40e75c:	eb 05                	jmp    0x40e763
40e75e:	b8 f0 cb 41 00       	mov    $0x41cbf0,%eax
40e763:	8a 40 04             	mov    0x4(%eax),%al
40e766:	24 82                	and    $0x82,%al
40e768:	3c 82                	cmp    $0x82,%al
40e76a:	75 07                	jne    0x40e773
40e76c:	81 4e 0c 00 20 00 00 	orl    $0x2000,0xc(%esi)
40e773:	81 7e 18 00 02 00 00 	cmpl   $0x200,0x18(%esi)
40e77a:	75 14                	jne    0x40e790
40e77c:	8b 46 0c             	mov    0xc(%esi),%eax
40e77f:	a8 08                	test   $0x8,%al
40e781:	74 0d                	je     0x40e790
40e783:	66 a9 00 04          	test   $0x400,%ax
40e787:	75 07                	jne    0x40e790
40e789:	c7 46 18 00 10 00 00 	movl   $0x1000,0x18(%esi)
40e790:	8b 0e                	mov    (%esi),%ecx
40e792:	83 46 04 fe          	addl   $0xfffffffe,0x4(%esi)
40e796:	0f b7 01             	movzwl (%ecx),%eax
40e799:	83 c1 02             	add    $0x2,%ecx
40e79c:	89 0e                	mov    %ecx,(%esi)
40e79e:	eb 15                	jmp    0x40e7b5
40e7a0:	f7 d8                	neg    %eax
40e7a2:	1b c0                	sbb    %eax,%eax
40e7a4:	83 e0 10             	and    $0x10,%eax
40e7a7:	83 c0 10             	add    $0x10,%eax
40e7aa:	09 46 0c             	or     %eax,0xc(%esi)
40e7ad:	89 7e 04             	mov    %edi,0x4(%esi)
40e7b0:	b8 ff ff 00 00       	mov    $0xffff,%eax
40e7b5:	5f                   	pop    %edi
40e7b6:	5e                   	pop    %esi
40e7b7:	c3                   	ret
40e7b8:	55                   	push   %ebp
40e7b9:	8b ec                	mov    %esp,%ebp
40e7bb:	83 ec 10             	sub    $0x10,%esp
40e7be:	53                   	push   %ebx
40e7bf:	56                   	push   %esi
40e7c0:	8b 75 0c             	mov    0xc(%ebp),%esi
40e7c3:	33 db                	xor    %ebx,%ebx
40e7c5:	3b f3                	cmp    %ebx,%esi
40e7c7:	74 13                	je     0x40e7dc
40e7c9:	39 5d 10             	cmp    %ebx,0x10(%ebp)
40e7cc:	74 0e                	je     0x40e7dc
40e7ce:	38 1e                	cmp    %bl,(%esi)
40e7d0:	75 10                	jne    0x40e7e2
40e7d2:	8b 45 08             	mov    0x8(%ebp),%eax
40e7d5:	3b c3                	cmp    %ebx,%eax
40e7d7:	74 03                	je     0x40e7dc
40e7d9:	66 89 18             	mov    %bx,(%eax)
40e7dc:	33 c0                	xor    %eax,%eax
40e7de:	5e                   	pop    %esi
40e7df:	5b                   	pop    %ebx
40e7e0:	c9                   	leave
40e7e1:	c3                   	ret
40e7e2:	ff 75 14             	push   0x14(%ebp)
40e7e5:	8d 4d f0             	lea    -0x10(%ebp),%ecx
40e7e8:	e8 d7 a1 ff ff       	call   0x4089c4
40e7ed:	8b 45 f0             	mov    -0x10(%ebp),%eax
40e7f0:	39 58 14             	cmp    %ebx,0x14(%eax)
40e7f3:	75 1f                	jne    0x40e814
40e7f5:	8b 45 08             	mov    0x8(%ebp),%eax
40e7f8:	3b c3                	cmp    %ebx,%eax
40e7fa:	74 07                	je     0x40e803
40e7fc:	66 0f b6 0e          	movzbw (%esi),%cx
40e800:	66 89 08             	mov    %cx,(%eax)
40e803:	38 5d fc             	cmp    %bl,-0x4(%ebp)
40e806:	74 07                	je     0x40e80f
40e808:	8b 45 f8             	mov    -0x8(%ebp),%eax
40e80b:	83 60 70 fd          	andl   $0xfffffffd,0x70(%eax)
40e80f:	33 c0                	xor    %eax,%eax
40e811:	40                   	inc    %eax
40e812:	eb ca                	jmp    0x40e7de
40e814:	8d 45 f0             	lea    -0x10(%ebp),%eax
40e817:	50                   	push   %eax
40e818:	0f b6 06             	movzbl (%esi),%eax
40e81b:	50                   	push   %eax
40e81c:	e8 c1 00 00 00       	call   0x40e8e2
40e821:	85 c0                	test   %eax,%eax
40e823:	59                   	pop    %ecx
40e824:	59                   	pop    %ecx
40e825:	74 7d                	je     0x40e8a4
40e827:	8b 45 f0             	mov    -0x10(%ebp),%eax
40e82a:	8b 88 ac 00 00 00    	mov    0xac(%eax),%ecx
40e830:	83 f9 01             	cmp    $0x1,%ecx
40e833:	7e 25                	jle    0x40e85a
40e835:	39 4d 10             	cmp    %ecx,0x10(%ebp)
40e838:	7c 20                	jl     0x40e85a
40e83a:	33 d2                	xor    %edx,%edx
40e83c:	39 5d 08             	cmp    %ebx,0x8(%ebp)
40e83f:	0f 95 c2             	setne  %dl
40e842:	52                   	push   %edx
40e843:	ff 75 08             	push   0x8(%ebp)
40e846:	51                   	push   %ecx
40e847:	56                   	push   %esi
40e848:	6a 09                	push   $0x9
40e84a:	ff 70 04             	push   0x4(%eax)
40e84d:	ff 15 a0 70 41 00    	call   *0x4170a0
40e853:	85 c0                	test   %eax,%eax
40e855:	8b 45 f0             	mov    -0x10(%ebp),%eax
40e858:	75 10                	jne    0x40e86a
40e85a:	8b 4d 10             	mov    0x10(%ebp),%ecx
40e85d:	3b 88 ac 00 00 00    	cmp    0xac(%eax),%ecx
40e863:	72 20                	jb     0x40e885
40e865:	38 5e 01             	cmp    %bl,0x1(%esi)
40e868:	74 1b                	je     0x40e885
40e86a:	38 5d fc             	cmp    %bl,-0x4(%ebp)
40e86d:	8b 80 ac 00 00 00    	mov    0xac(%eax),%eax
40e873:	0f 84 65 ff ff ff    	je     0x40e7de
40e879:	8b 4d f8             	mov    -0x8(%ebp),%ecx
40e87c:	83 61 70 fd          	andl   $0xfffffffd,0x70(%ecx)
40e880:	e9 59 ff ff ff       	jmp    0x40e7de
40e885:	e8 70 ab ff ff       	call   0x4093fa
40e88a:	c7 00 2a 00 00 00    	movl   $0x2a,(%eax)
40e890:	38 5d fc             	cmp    %bl,-0x4(%ebp)
40e893:	74 07                	je     0x40e89c
40e895:	8b 45 f8             	mov    -0x8(%ebp),%eax
40e898:	83 60 70 fd          	andl   $0xfffffffd,0x70(%eax)
40e89c:	83 c8 ff             	or     $0xffffffff,%eax
40e89f:	e9 3a ff ff ff       	jmp    0x40e7de
40e8a4:	33 c0                	xor    %eax,%eax
40e8a6:	39 5d 08             	cmp    %ebx,0x8(%ebp)
40e8a9:	0f 95 c0             	setne  %al
40e8ac:	50                   	push   %eax
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