40c752:	85 c0                	test   %eax,%eax
40c754:	74 1a                	je     0x40c770
40c756:	8d 45 fc             	lea    -0x4(%ebp),%eax
40c759:	50                   	push   %eax
40c75a:	8d 8f 04 04 00 00    	lea    0x404(%edi),%ecx
40c760:	e8 92 03 00 00       	call   0x40caf7
40c765:	8b 45 fc             	mov    -0x4(%ebp),%eax
40c768:	b3 01                	mov    $0x1,%bl
40c76a:	89 b7 00 04 00 00    	mov    %esi,0x400(%edi)
40c770:	50                   	push   %eax
40c771:	e8 cd 25 00 00       	call   0x40ed43
40c776:	59                   	pop    %ecx
40c777:	8a c3                	mov    %bl,%al
40c779:	5b                   	pop    %ebx
40c77a:	5f                   	pop    %edi
40c77b:	5e                   	pop    %esi
40c77c:	c9                   	leave
40c77d:	c2 04 00             	ret    $0x4
40c780:	8b ff                	mov    %edi,%edi
40c782:	55                   	push   %ebp
40c783:	8b ec                	mov    %esp,%ebp
40c785:	51                   	push   %ecx
40c786:	56                   	push   %esi
40c787:	8b 75 08             	mov    0x8(%ebp),%esi
40c78a:	57                   	push   %edi
40c78b:	8b f9                	mov    %ecx,%edi
40c78d:	81 fe ff ff ff 3f    	cmp    $0x3fffffff,%esi
40c793:	76 0f                	jbe    0x40c7a4
40c795:	e8 39 25 00 00       	call   0x40ecd3
40c79a:	c7 00 0c 00 00 00    	movl   $0xc,(%eax)
40c7a0:	32 c0                	xor    %al,%al
40c7a2:	eb 54                	jmp    0x40c7f8
40c7a4:	53                   	push   %ebx
40c7a5:	33 db                	xor    %ebx,%ebx
40c7a7:	c1 e6 02             	shl    $0x2,%esi
40c7aa:	39 9f 04 04 00 00    	cmp    %ebx,0x404(%edi)
40c7b0:	75 08                	jne    0x40c7ba
40c7b2:	81 fe 00 04 00 00    	cmp    $0x400,%esi
40c7b8:	76 08                	jbe    0x40c7c2
40c7ba:	3b b7 00 04 00 00    	cmp    0x400(%edi),%esi
40c7c0:	77 04                	ja     0x40c7c6
40c7c2:	b0 01                	mov    $0x1,%al
40c7c4:	eb 31                	jmp    0x40c7f7
40c7c6:	56                   	push   %esi
40c7c7:	e8 17 42 00 00       	call   0x4109e3
40c7cc:	89 45 fc             	mov    %eax,-0x4(%ebp)
40c7cf:	59                   	pop    %ecx
40c7d0:	85 c0                	test   %eax,%eax
40c7d2:	74 1a                	je     0x40c7ee
40c7d4:	8d 45 fc             	lea    -0x4(%ebp),%eax
40c7d7:	50                   	push   %eax
40c7d8:	8d 8f 04 04 00 00    	lea    0x404(%edi),%ecx
40c7de:	e8 14 03 00 00       	call   0x40caf7
40c7e3:	8b 45 fc             	mov    -0x4(%ebp),%eax
40c7e6:	b3 01                	mov    $0x1,%bl
40c7e8:	89 b7 00 04 00 00    	mov    %esi,0x400(%edi)
40c7ee:	50                   	push   %eax
40c7ef:	e8 4f 25 00 00       	call   0x40ed43
40c7f4:	59                   	pop    %ecx
40c7f5:	8a c3                	mov    %bl,%al
40c7f7:	5b                   	pop    %ebx
40c7f8:	5f                   	pop    %edi
40c7f9:	5e                   	pop    %esi
40c7fa:	c9                   	leave
40c7fb:	c2 04 00             	ret    $0x4
40c7fe:	8b ff                	mov    %edi,%edi
40c800:	55                   	push   %ebp
40c801:	8b ec                	mov    %esp,%ebp
40c803:	8b 45 14             	mov    0x14(%ebp),%eax
40c806:	48                   	dec    %eax
40c807:	83 e8 01             	sub    $0x1,%eax
40c80a:	74 3c                	je     0x40c848
40c80c:	83 e8 01             	sub    $0x1,%eax
40c80f:	74 33                	je     0x40c844
40c811:	83 e8 09             	sub    $0x9,%eax
40c814:	74 2e                	je     0x40c844
40c816:	83 7d 14 0d          	cmpl   $0xd,0x14(%ebp)
40c81a:	74 28                	je     0x40c844
40c81c:	8b 45 08             	mov    0x8(%ebp),%eax
40c81f:	83 e0 04             	and    $0x4,%eax
40c822:	83 c8 00             	or     $0x0,%eax
40c825:	6a 01                	push   $0x1
40c827:	58                   	pop    %eax
40c828:	74 04                	je     0x40c82e
40c82a:	8a c8                	mov    %al,%cl
40c82c:	eb 02                	jmp    0x40c830
40c82e:	32 c9                	xor    %cl,%cl
40c830:	66 83 7d 10 63       	cmpw   $0x63,0x10(%ebp)
40c835:	74 07                	je     0x40c83e
40c837:	66 83 7d 10 73       	cmpw   $0x73,0x10(%ebp)
40c83c:	75 02                	jne    0x40c840
40c83e:	32 c0                	xor    %al,%al
40c840:	32 c1                	xor    %cl,%al
40c842:	5d                   	pop    %ebp
40c843:	c3                   	ret
40c844:	b0 01                	mov    $0x1,%al
40c846:	5d                   	pop    %ebp
40c847:	c3                   	ret
40c848:	32 c0                	xor    %al,%al
40c84a:	5d                   	pop    %ebp
40c84b:	c3                   	ret
40c84c:	8b ff                	mov    %edi,%edi
40c84e:	56                   	push   %esi
40c84f:	8b f1                	mov    %ecx,%esi
40c851:	57                   	push   %edi
40c852:	8b be 04 04 00 00    	mov    0x404(%esi),%edi
40c858:	e8 75 fe ff ff       	call   0x40c6d2
40c85d:	85 ff                	test   %edi,%edi
40c85f:	75 04                	jne    0x40c865
40c861:	03 c6                	add    %esi,%eax
40c863:	eb 02                	jmp    0x40c867
40c865:	03 c7                	add    %edi,%eax
40c867:	5f                   	pop    %edi
40c868:	5e                   	pop    %esi
40c869:	c3                   	ret
40c86a:	8b ff                	mov    %edi,%edi
40c86c:	55                   	push   %ebp
40c86d:	8b ec                	mov    %esp,%ebp
40c86f:	53                   	push   %ebx
40c870:	56                   	push   %esi
40c871:	8b f1                	mov    %ecx,%esi
40c873:	57                   	push   %edi
40c874:	8d 4e 40             	lea    0x40(%esi),%ecx
40c877:	8b b9 04 04 00 00    	mov    0x404(%ecx),%edi
40c87d:	85 ff                	test   %edi,%edi
40c87f:	75 02                	jne    0x40c883
40c881:	8b f9                	mov    %ecx,%edi
40c883:	e8 62 fe ff ff       	call   0x40c6ea
40c888:	8b 5d 08             	mov    0x8(%ebp),%ebx
40c88b:	8d 3c 47             	lea    (%edi,%eax,2),%edi
40c88e:	83 c7 fe             	add    $0xfffffffe,%edi
40c891:	89 7e 34             	mov    %edi,0x34(%esi)
40c894:	8b cf                	mov    %edi,%ecx
40c896:	8b 56 28             	mov    0x28(%esi),%edx
40c899:	85 d2                	test   %edx,%edx
40c89b:	7f 04                	jg     0x40c8a1
40c89d:	85 db                	test   %ebx,%ebx
40c89f:	74 3e                	je     0x40c8df
40c8a1:	8d 4a ff             	lea    -0x1(%edx),%ecx
40c8a4:	8b c3                	mov    %ebx,%eax
40c8a6:	33 d2                	xor    %edx,%edx
40c8a8:	89 4e 28             	mov    %ecx,0x28(%esi)
40c8ab:	f7 75 0c             	divl   0xc(%ebp)
40c8ae:	8b d8                	mov    %eax,%ebx
40c8b0:	8d 42 30             	lea    0x30(%edx),%eax
40c8b3:	0f b7 c8             	movzwl %ax,%ecx
40c8b6:	83 f9 39             	cmp    $0x39,%ecx
40c8b9:	76 11                	jbe    0x40c8cc
40c8bb:	8a 45 10             	mov    0x10(%ebp),%al
40c8be:	34 01                	xor    $0x1,%al
40c8c0:	c0 e0 05             	shl    $0x5,%al
40c8c3:	04 07                	add    $0x7,%al
40c8c5:	02 c1                	add    %cl,%al
40c8c7:	66 98                	cbtw
40c8c9:	0f b7 c8             	movzwl %ax,%ecx
40c8cc:	8b 46 34             	mov    0x34(%esi),%eax
40c8cf:	66 0f be c9          	movsbw %cl,%cx
40c8d3:	66 89 08             	mov    %cx,(%eax)
40c8d6:	83 46 34 fe          	addl   $0xfffffffe,0x34(%esi)
40c8da:	8b 4e 34             	mov    0x34(%esi),%ecx
40c8dd:	eb b7                	jmp    0x40c896
40c8df:	2b f9                	sub    %ecx,%edi
40c8e1:	d1 ff                	sar    $1,%edi
40c8e3:	89 7e 38             	mov    %edi,0x38(%esi)
40c8e6:	83 46 34 02          	addl   $0x2,0x34(%esi)
40c8ea:	5f                   	pop    %edi
40c8eb:	5e                   	pop    %esi
40c8ec:	5b                   	pop    %ebx
40c8ed:	5d                   	pop    %ebp
40c8ee:	c2 0c 00             	ret    $0xc
40c8f1:	8b ff                	mov    %edi,%edi
40c8f3:	55                   	push   %ebp
40c8f4:	8b ec                	mov    %esp,%ebp
40c8f6:	83 ec 0c             	sub    $0xc,%esp
40c8f9:	53                   	push   %ebx
40c8fa:	56                   	push   %esi
40c8fb:	8b f1                	mov    %ecx,%esi
40c8fd:	57                   	push   %edi
40c8fe:	8d 4e 40             	lea    0x40(%esi),%ecx
40c901:	8b b9 04 04 00 00    	mov    0x404(%ecx),%edi
40c907:	85 ff                	test   %edi,%edi
40c909:	75 02                	jne    0x40c90d
40c90b:	8b f9                	mov    %ecx,%edi
40c90d:	e8 d8 fd ff ff       	call   0x40c6ea
40c912:	8b 5d 0c             	mov    0xc(%ebp),%ebx
40c915:	8d 3c 47             	lea    (%edi,%eax,2),%edi
40c918:	83 c7 fe             	add    $0xfffffffe,%edi
40c91b:	89 7d fc             	mov    %edi,-0x4(%ebp)
40c91e:	8b cf                	mov    %edi,%ecx
40c920:	89 7e 34             	mov    %edi,0x34(%esi)
40c923:	8b 7d 08             	mov    0x8(%ebp),%edi
40c926:	8b 56 28             	mov    0x28(%esi),%edx
40c929:	85 d2                	test   %edx,%edx
40c92b:	7f 06                	jg     0x40c933
40c92d:	8b c7                	mov    %edi,%eax
40c92f:	0b c3                	or     %ebx,%eax
40c931:	74 4b                	je     0x40c97e
40c933:	53                   	push   %ebx
40c934:	6a 00                	push   $0x0
40c936:	ff 75 10             	push   0x10(%ebp)
40c939:	8d 42 ff             	lea    -0x1(%edx),%eax
40c93c:	53                   	push   %ebx
40c93d:	57                   	push   %edi
40c93e:	89 46 28             	mov    %eax,0x28(%esi)
40c941:	e8 ba c8 00 00       	call   0x419200
40c946:	89 5d f8             	mov    %ebx,-0x8(%ebp)
40c949:	5b                   	pop    %ebx
40c94a:	90                   	nop
40c94b:	83 c1 30             	add    $0x30,%ecx
40c94e:	8b f8                	mov    %eax,%edi
40c950:	0f b7 c9             	movzwl %cx,%ecx
40c953:	8b da                	mov    %edx,%ebx
40c955:	83 f9 39             	cmp    $0x39,%ecx
40c958:	76 11                	jbe    0x40c96b
40c95a:	8a 45 14             	mov    0x14(%ebp),%al
40c95d:	34 01                	xor    $0x1,%al
40c95f:	c0 e0 05             	shl    $0x5,%al
40c962:	04 07                	add    $0x7,%al
40c964:	02 c1                	add    %cl,%al
40c966:	66 98                	cbtw
40c968:	0f b7 c8             	movzwl %ax,%ecx
40c96b:	8b 46 34             	mov    0x34(%esi),%eax
40c96e:	66 0f be c9          	movsbw %cl,%cx
40c972:	66 89 08             	mov    %cx,(%eax)
40c975:	83 46 34 fe          	addl   $0xfffffffe,0x34(%esi)
40c979:	8b 4e 34             	mov    0x34(%esi),%ecx
40c97c:	eb a8                	jmp    0x40c926
40c97e:	8b 7d fc             	mov    -0x4(%ebp),%edi
40c981:	2b f9                	sub    %ecx,%edi
40c983:	d1 ff                	sar    $1,%edi
40c985:	89 7e 38             	mov    %edi,0x38(%esi)
40c988:	83 46 34 02          	addl   $0x2,0x34(%esi)
40c98c:	5f                   	pop    %edi
40c98d:	5e                   	pop    %esi
40c98e:	5b                   	pop    %ebx
40c98f:	c9                   	leave
40c990:	c2 10 00             	ret    $0x10
40c993:	8b ff                	mov    %edi,%edi
40c995:	55                   	push   %ebp
40c996:	8b ec                	mov    %esp,%ebp
40c998:	56                   	push   %esi
40c999:	33 f6                	xor    %esi,%esi
40c99b:	39 75 10             	cmp    %esi,0x10(%ebp)
40c99e:	7e 21                	jle    0x40c9c1
40c9a0:	53                   	push   %ebx
40c9a1:	66 0f be 5d 0c       	movsbw 0xc(%ebp),%bx
40c9a6:	57                   	push   %edi
40c9a7:	8b 7d 14             	mov    0x14(%ebp),%edi
40c9aa:	8b 4d 08             	mov    0x8(%ebp),%ecx
40c9ad:	57                   	push   %edi
40c9ae:	53                   	push   %ebx
40c9af:	e8 c6 0f 00 00       	call   0x40d97a
40c9b4:	83 3f ff             	cmpl   $0xffffffff,(%edi)
40c9b7:	74 06                	je     0x40c9bf
40c9b9:	46                   	inc    %esi
40c9ba:	3b 75 10             	cmp    0x10(%ebp),%esi
40c9bd:	7c eb                	jl     0x40c9aa
40c9bf:	5f                   	pop    %edi
40c9c0:	5b                   	pop    %ebx
40c9c1:	5e                   	pop    %esi
40c9c2:	5d                   	pop    %ebp
40c9c3:	c3                   	ret
40c9c4:	8b ff                	mov    %edi,%edi
40c9c6:	55                   	push   %ebp
40c9c7:	8b ec                	mov    %esp,%ebp
40c9c9:	51                   	push   %ecx
40c9ca:	33 d2                	xor    %edx,%edx
40c9cc:	89 4d fc             	mov    %ecx,-0x4(%ebp)
40c9cf:	89 11                	mov    %edx,(%ecx)
40c9d1:	33 c0                	xor    %eax,%eax
40c9d3:	89 51 04             	mov    %edx,0x4(%ecx)
40c9d6:	89 51 08             	mov    %edx,0x8(%ecx)
40c9d9:	89 51 0c             	mov    %edx,0xc(%ecx)
40c9dc:	66 89 41 32          	mov    %ax,0x32(%ecx)
40c9e0:	8b c1                	mov    %ecx,%eax
40c9e2:	89 51 10             	mov    %edx,0x10(%ecx)
40c9e5:	89 51 14             	mov    %edx,0x14(%ecx)
40c9e8:	89 51 18             	mov    %edx,0x18(%ecx)
40c9eb:	89 51 1c             	mov    %edx,0x1c(%ecx)
40c9ee:	89 51 20             	mov    %edx,0x20(%ecx)
40c9f1:	89 51 24             	mov    %edx,0x24(%ecx)
40c9f4:	89 51 28             	mov    %edx,0x28(%ecx)
40c9f7:	88 51 30             	mov    %dl,0x30(%ecx)
40c9fa:	89 51 38             	mov    %edx,0x38(%ecx)
40c9fd:	88 51 3c             	mov    %dl,0x3c(%ecx)
40ca00:	89 91 40 04 00 00    	mov    %edx,0x440(%ecx)
40ca06:	89 91 44 04 00 00    	mov    %edx,0x444(%ecx)
40ca0c:	c9                   	leave
40ca0d:	c3                   	ret
40ca0e:	8b ff                	mov    %edi,%edi
40ca10:	55                   	push   %ebp
40ca11:	8b ec                	mov    %esp,%ebp
40ca13:	56                   	push   %esi
40ca14:	8b f1                	mov    %ecx,%esi
40ca16:	e8 a9 ff ff ff       	call   0x40c9c4
40ca1b:	8b 45 08             	mov    0x8(%ebp),%eax
40ca1e:	8b 00                	mov    (%eax),%eax
40ca20:	89 86 48 04 00 00    	mov    %eax,0x448(%esi)
40ca26:	8b 45 0c             	mov    0xc(%ebp),%eax
40ca29:	89 06                	mov    %eax,(%esi)
40ca2b:	8b 45 10             	mov    0x10(%ebp),%eax
40ca2e:	89 46 04             	mov    %eax,0x4(%esi)
40ca31:	8b 45 18             	mov    0x18(%ebp),%eax
40ca34:	89 46 08             	mov    %eax,0x8(%esi)
40ca37:	8b 45 14             	mov    0x14(%ebp),%eax
40ca3a:	89 46 10             	mov    %eax,0x10(%esi)
40ca3d:	8b 45 1c             	mov    0x1c(%ebp),%eax
40ca40:	89 46 14             	mov    %eax,0x14(%esi)
40ca43:	8b c6                	mov    %esi,%eax
40ca45:	5e                   	pop    %esi
40ca46:	5d                   	pop    %ebp
40ca47:	c2 18 00             	ret    $0x18
40ca4a:	8b ff                	mov    %edi,%edi
40ca4c:	55                   	push   %ebp
40ca4d:	8b ec                	mov    %esp,%ebp
40ca4f:	53                   	push   %ebx
40ca50:	57                   	push   %edi
40ca51:	8b f9                	mov    %ecx,%edi
40ca53:	8b 4d 08             	mov    0x8(%ebp),%ecx
40ca56:	c6 47 0c 00          	movb   $0x0,0xc(%edi)
40ca5a:	8d 5f 04             	lea    0x4(%edi),%ebx
40ca5d:	85 c9                	test   %ecx,%ecx
40ca5f:	74 09                	je     0x40ca6a
40ca61:	8b 01                	mov    (%ecx),%eax
40ca63:	89 03                	mov    %eax,(%ebx)
40ca65:	8b 41 04             	mov    0x4(%ecx),%eax
40ca68:	eb 15                	jmp    0x40ca7f
40ca6a:	83 3d 68 6e 42 00 00 	cmpl   $0x0,0x426e68
40ca71:	75 11                	jne    0x40ca84
40ca73:	a1 38 66 42 00       	mov    0x426638,%eax
40ca78:	89 03                	mov    %eax,(%ebx)
40ca7a:	a1 3c 66 42 00       	mov    0x42663c,%eax
40ca7f:	89 43 04             	mov    %eax,0x4(%ebx)
40ca82:	eb 41                	jmp    0x40cac5
40ca84:	56                   	push   %esi
40ca85:	e8 7f 1d 00 00       	call   0x40e809
40ca8a:	89 07                	mov    %eax,(%edi)
40ca8c:	8d 77 08             	lea    0x8(%edi),%esi
40ca8f:	53                   	push   %ebx
40ca90:	50                   	push   %eax
40ca91:	8b 48 4c             	mov    0x4c(%eax),%ecx
40ca94:	89 0b                	mov    %ecx,(%ebx)
40ca96:	8b 48 48             	mov    0x48(%eax),%ecx
40ca99:	89 0e                	mov    %ecx,(%esi)
40ca9b:	e8 13 5b 00 00       	call   0x4125b3
40caa0:	56                   	push   %esi
40caa1:	ff 37                	push   (%edi)
40caa3:	e8 38 5b 00 00       	call   0x4125e0
40caa8:	8b 0f                	mov    (%edi),%ecx
40caaa:	83 c4 10             	add    $0x10,%esp