40c85a:	85 d2                	test   %edx,%edx
40c85c:	74 0e                	je     0x40c86c
40c85e:	68 fe ff ff 7f       	push   $0x7ffffffe
40c863:	ff 75 08             	push   0x8(%ebp)
40c866:	51                   	push   %ecx
40c867:	e8 81 00 00 00       	call   0x40c8ed
40c86c:	5d                   	pop    %ebp
40c86d:	c2 04 00             	ret    $0x4
40c870:	8b ff                	mov    %edi,%edi
40c872:	55                   	push   %ebp
40c873:	8b ec                	mov    %esp,%ebp
40c875:	33 c0                	xor    %eax,%eax
40c877:	85 d2                	test   %edx,%edx
40c879:	74 08                	je     0x40c883
40c87b:	81 fa ff ff ff 7f    	cmp    $0x7fffffff,%edx
40c881:	76 05                	jbe    0x40c888
40c883:	b8 57 00 07 80       	mov    $0x80070057,%eax
40c888:	85 c0                	test   %eax,%eax
40c88a:	78 10                	js     0x40c89c
40c88c:	68 fe ff ff 7f       	push   $0x7ffffffe
40c891:	ff 75 08             	push   0x8(%ebp)
40c894:	51                   	push   %ecx
40c895:	e8 53 00 00 00       	call   0x40c8ed
40c89a:	eb 09                	jmp    0x40c8a5
40c89c:	85 d2                	test   %edx,%edx
40c89e:	74 05                	je     0x40c8a5
40c8a0:	33 d2                	xor    %edx,%edx
40c8a2:	66 89 11             	mov    %dx,(%ecx)
40c8a5:	5d                   	pop    %ebp
40c8a6:	c2 04 00             	ret    $0x4
40c8a9:	8b ff                	mov    %edi,%edi
40c8ab:	55                   	push   %ebp
40c8ac:	8b ec                	mov    %esp,%ebp
40c8ae:	8b 45 0c             	mov    0xc(%ebp),%eax
40c8b1:	33 c9                	xor    %ecx,%ecx
40c8b3:	85 c0                	test   %eax,%eax
40c8b5:	74 07                	je     0x40c8be
40c8b7:	3d ff ff ff 7f       	cmp    $0x7fffffff,%eax
40c8bc:	76 05                	jbe    0x40c8c3
40c8be:	b9 57 00 07 80       	mov    $0x80070057,%ecx
40c8c3:	85 c9                	test   %ecx,%ecx
40c8c5:	78 16                	js     0x40c8dd
40c8c7:	8d 4d 14             	lea    0x14(%ebp),%ecx
40c8ca:	8b d0                	mov    %eax,%edx
40c8cc:	51                   	push   %ecx
40c8cd:	ff 75 10             	push   0x10(%ebp)
40c8d0:	51                   	push   %ecx
40c8d1:	8b 4d 08             	mov    0x8(%ebp),%ecx
40c8d4:	e8 62 00 00 00       	call   0x40c93b
40c8d9:	8b c8                	mov    %eax,%ecx
40c8db:	eb 0c                	jmp    0x40c8e9
40c8dd:	85 c0                	test   %eax,%eax
40c8df:	74 08                	je     0x40c8e9
40c8e1:	8b 45 08             	mov    0x8(%ebp),%eax
40c8e4:	33 d2                	xor    %edx,%edx
40c8e6:	66 89 10             	mov    %dx,(%eax)
40c8e9:	8b c1                	mov    %ecx,%eax
40c8eb:	5d                   	pop    %ebp
40c8ec:	c3                   	ret
40c8ed:	8b ff                	mov    %edi,%edi
40c8ef:	55                   	push   %ebp
40c8f0:	8b ec                	mov    %esp,%ebp
40c8f2:	85 d2                	test   %edx,%edx
40c8f4:	74 29                	je     0x40c91f
40c8f6:	8b 45 0c             	mov    0xc(%ebp),%eax
40c8f9:	56                   	push   %esi
40c8fa:	8b 75 10             	mov    0x10(%ebp),%esi
40c8fd:	2b c1                	sub    %ecx,%eax
40c8ff:	57                   	push   %edi
40c900:	85 f6                	test   %esi,%esi
40c902:	74 15                	je     0x40c919
40c904:	0f b7 3c 08          	movzwl (%eax,%ecx,1),%edi
40c908:	66 85 ff             	test   %di,%di
40c90b:	74 0c                	je     0x40c919
40c90d:	66 89 39             	mov    %di,(%ecx)
40c910:	83 c1 02             	add    $0x2,%ecx
40c913:	4e                   	dec    %esi
40c914:	83 ea 01             	sub    $0x1,%edx
40c917:	75 e7                	jne    0x40c900
40c919:	5f                   	pop    %edi
40c91a:	5e                   	pop    %esi
40c91b:	85 d2                	test   %edx,%edx
40c91d:	75 03                	jne    0x40c922
40c91f:	83 e9 02             	sub    $0x2,%ecx
40c922:	f7 da                	neg    %edx
40c924:	1b d2                	sbb    %edx,%edx
40c926:	81 e2 86 ff f8 7f    	and    $0x7ff8ff86,%edx
40c92c:	33 c0                	xor    %eax,%eax
40c92e:	66 89 01             	mov    %ax,(%ecx)
40c931:	8d 82 7a 00 07 80    	lea    -0x7ff8ff86(%edx),%eax
40c937:	5d                   	pop    %ebp
40c938:	c2 0c 00             	ret    $0xc
40c93b:	8b ff                	mov    %edi,%edi
40c93d:	55                   	push   %ebp
40c93e:	8b ec                	mov    %esp,%ebp
40c940:	53                   	push   %ebx
40c941:	56                   	push   %esi
40c942:	57                   	push   %edi
40c943:	ff 75 10             	push   0x10(%ebp)
40c946:	8d 72 ff             	lea    -0x1(%edx),%esi
40c949:	8b f9                	mov    %ecx,%edi
40c94b:	ff 75 0c             	push   0xc(%ebp)
40c94e:	33 db                	xor    %ebx,%ebx
40c950:	56                   	push   %esi
40c951:	57                   	push   %edi
40c952:	ff 15 f4 f0 40 00    	call   *0x40f0f4
40c958:	83 c4 10             	add    $0x10,%esp
40c95b:	85 c0                	test   %eax,%eax
40c95d:	78 08                	js     0x40c967
40c95f:	3b c6                	cmp    %esi,%eax
40c961:	77 04                	ja     0x40c967
40c963:	75 0d                	jne    0x40c972
40c965:	eb 05                	jmp    0x40c96c
40c967:	bb 7a 00 07 80       	mov    $0x8007007a,%ebx
40c96c:	33 c0                	xor    %eax,%eax
40c96e:	66 89 04 77          	mov    %ax,(%edi,%esi,2)
40c972:	5f                   	pop    %edi
40c973:	5e                   	pop    %esi
40c974:	8b c3                	mov    %ebx,%eax
40c976:	5b                   	pop    %ebx
40c977:	5d                   	pop    %ebp
40c978:	c2 0c 00             	ret    $0xc
40c97b:	8b ff                	mov    %edi,%edi
40c97d:	55                   	push   %ebp
40c97e:	8b ec                	mov    %esp,%ebp
40c980:	8d 04 11             	lea    (%ecx,%edx,1),%eax
40c983:	3b c1                	cmp    %ecx,%eax
40c985:	72 04                	jb     0x40c98b
40c987:	8b d0                	mov    %eax,%edx
40c989:	eb 03                	jmp    0x40c98e
40c98b:	83 ca ff             	or     $0xffffffff,%edx
40c98e:	3b c1                	cmp    %ecx,%eax
40c990:	8b 4d 08             	mov    0x8(%ebp),%ecx
40c993:	1b c0                	sbb    %eax,%eax
40c995:	25 16 02 07 80       	and    $0x80070216,%eax
40c99a:	89 11                	mov    %edx,(%ecx)
40c99c:	5d                   	pop    %ebp
40c99d:	c2 04 00             	ret    $0x4
40c9a0:	8b ff                	mov    %edi,%edi
40c9a2:	55                   	push   %ebp
40c9a3:	8b ec                	mov    %esp,%ebp
40c9a5:	51                   	push   %ecx
40c9a6:	80 3d c4 eb 40 00 00 	cmpb   $0x0,0x40ebc4
40c9ad:	c7 45 fc 8c 4e 40 00 	movl   $0x404e8c,-0x4(%ebp)
40c9b4:	75 09                	jne    0x40c9bf
40c9b6:	c6 05 c4 eb 40 00 01 	movb   $0x1,0x40ebc4
40c9bd:	eb 22                	jmp    0x40c9e1
40c9bf:	33 c9                	xor    %ecx,%ecx
40c9c1:	33 d2                	xor    %edx,%edx
40c9c3:	41                   	inc    %ecx
40c9c4:	e8 e6 db ff ff       	call   0x40a5af
40c9c9:	6a 02                	push   $0x2
40c9cb:	8d 55 fc             	lea    -0x4(%ebp),%edx
40c9ce:	59                   	pop    %ecx
40c9cf:	e8 db db ff ff       	call   0x40a5af
40c9d4:	33 d2                	xor    %edx,%edx
40c9d6:	b9 98 4e 40 00       	mov    $0x404e98,%ecx
40c9db:	42                   	inc    %edx
40c9dc:	e8 76 f0 ff ff       	call   0x40ba57
40c9e1:	b8 67 06 00 00       	mov    $0x667,%eax
40c9e6:	c9                   	leave
40c9e7:	c3                   	ret
40c9e8:	6a 40                	push   $0x40
40c9ea:	68 78 ce 40 00       	push   $0x40ce78
40c9ef:	e8 b8 9d ff ff       	call   0x4067ac
40c9f4:	8b 75 0c             	mov    0xc(%ebp),%esi
40c9f7:	8b 5d 14             	mov    0x14(%ebp),%ebx
40c9fa:	8b 45 18             	mov    0x18(%ebp),%eax
40c9fd:	89 45 b4             	mov    %eax,-0x4c(%ebp)
40ca00:	8b 45 1c             	mov    0x1c(%ebp),%eax
40ca03:	89 45 bc             	mov    %eax,-0x44(%ebp)
40ca06:	8b 7d 20             	mov    0x20(%ebp),%edi
40ca09:	8b 45 10             	mov    0x10(%ebp),%eax
40ca0c:	85 f6                	test   %esi,%esi
40ca0e:	74 0a                	je     0x40ca1a
40ca10:	83 f8 24             	cmp    $0x24,%eax
40ca13:	72 05                	jb     0x40ca1a
40ca15:	89 75 b8             	mov    %esi,-0x48(%ebp)
40ca18:	eb 09                	jmp    0x40ca23
40ca1a:	8d 45 c0             	lea    -0x40(%ebp),%eax
40ca1d:	89 45 b8             	mov    %eax,-0x48(%ebp)
40ca20:	6a 24                	push   $0x24
40ca22:	58                   	pop    %eax
40ca23:	83 65 fc 00          	andl   $0x0,-0x4(%ebp)
40ca27:	85 ff                	test   %edi,%edi
40ca29:	75 25                	jne    0x40ca50
40ca2b:	ff 75 bc             	push   -0x44(%ebp)
40ca2e:	ff 75 b4             	push   -0x4c(%ebp)
40ca31:	53                   	push   %ebx
40ca32:	50                   	push   %eax
40ca33:	ff 75 b8             	push   -0x48(%ebp)
40ca36:	ff 75 08             	push   0x8(%ebp)
40ca39:	52                   	push   %edx
40ca3a:	51                   	push   %ecx
40ca3b:	68 74 1a 40 00       	push   $0x401a74
40ca40:	68 08 10 40 00       	push   $0x401008
40ca45:	ff 15 14 f0 40 00    	call   *0x40f014
40ca4b:	83 c4 28             	add    $0x28,%esp
40ca4e:	eb 46                	jmp    0x40ca96
40ca50:	57                   	push   %edi
40ca51:	ff 75 bc             	push   -0x44(%ebp)
40ca54:	ff 75 b4             	push   -0x4c(%ebp)
40ca57:	53                   	push   %ebx
40ca58:	50                   	push   %eax
40ca59:	ff 75 b8             	push   -0x48(%ebp)
40ca5c:	ff 75 08             	push   0x8(%ebp)
40ca5f:	52                   	push   %edx
40ca60:	51                   	push   %ecx
40ca61:	68 0e 20 40 00       	push   $0x40200e
40ca66:	68 08 10 40 00       	push   $0x401008
40ca6b:	ff 15 14 f0 40 00    	call   *0x40f014
40ca71:	83 c4 2c             	add    $0x2c,%esp
40ca74:	eb 20                	jmp    0x40ca96
40ca76:	8b 45 ec             	mov    -0x14(%ebp),%eax
40ca79:	8b 00                	mov    (%eax),%eax
40ca7b:	8b 00                	mov    (%eax),%eax
40ca7d:	89 45 b0             	mov    %eax,-0x50(%ebp)
40ca80:	50                   	push   %eax
40ca81:	ff 15 18 f0 40 00    	call   *0x40f018
40ca87:	c3                   	ret
40ca88:	8b 65 e8             	mov    -0x18(%ebp),%esp
40ca8b:	6a 06                	push   $0x6
40ca8d:	5a                   	pop    %edx
40ca8e:	8b 4d b0             	mov    -0x50(%ebp),%ecx
40ca91:	e8 2a 03 00 00       	call   0x40cdc0
40ca96:	8b c8                	mov    %eax,%ecx
40ca98:	89 4d bc             	mov    %ecx,-0x44(%ebp)
40ca9b:	c7 45 fc fe ff ff ff 	movl   $0xfffffffe,-0x4(%ebp)
40caa2:	85 c9                	test   %ecx,%ecx
40caa4:	74 08                	je     0x40caae
40caa6:	81 f9 ea 00 00 00    	cmp    $0xea,%ecx
40caac:	75 1b                	jne    0x40cac9
40caae:	8b 45 b4             	mov    -0x4c(%ebp),%eax
40cab1:	8b 10                	mov    (%eax),%edx
40cab3:	85 d2                	test   %edx,%edx
40cab5:	74 12                	je     0x40cac9
40cab7:	8d 45 bc             	lea    -0x44(%ebp),%eax
40caba:	50                   	push   %eax
40cabb:	ff 75 10             	push   0x10(%ebp)
40cabe:	8b 4d b8             	mov    -0x48(%ebp),%ecx
40cac1:	e8 90 02 00 00       	call   0x40cd56
40cac6:	8b 4d bc             	mov    -0x44(%ebp),%ecx
40cac9:	85 c9                	test   %ecx,%ecx
40cacb:	74 0b                	je     0x40cad8
40cacd:	51                   	push   %ecx
40cace:	ff 15 3c f0 40 00    	call   *0x40f03c
40cad4:	33 c0                	xor    %eax,%eax
40cad6:	eb 03                	jmp    0x40cadb
40cad8:	33 c0                	xor    %eax,%eax
40cada:	40                   	inc    %eax
40cadb:	8b 4d f0             	mov    -0x10(%ebp),%ecx
40cade:	64 89 0d 00 00 00 00 	mov    %ecx,%fs:0x0
40cae5:	59                   	pop    %ecx
40cae6:	5f                   	pop    %edi
40cae7:	5e                   	pop    %esi
40cae8:	5b                   	pop    %ebx
40cae9:	c9                   	leave
40caea:	c2 1c 00             	ret    $0x1c
40caed:	6a 14                	push   $0x14
40caef:	68 b8 ce 40 00       	push   $0x40ceb8
40caf4:	e8 5f 9a ff ff       	call   0x406558
40caf9:	83 65 e4 00          	andl   $0x0,-0x1c(%ebp)
40cafd:	83 65 fc 00          	andl   $0x0,-0x4(%ebp)
40cb01:	8d 45 e4             	lea    -0x1c(%ebp),%eax
40cb04:	50                   	push   %eax
40cb05:	51                   	push   %ecx
40cb06:	68 8c 17 40 00       	push   $0x40178c
40cb0b:	68 08 10 40 00       	push   $0x401008
40cb10:	ff 15 14 f0 40 00    	call   *0x40f014
40cb16:	83 c4 10             	add    $0x10,%esp
40cb19:	eb 20                	jmp    0x40cb3b
40cb1b:	8b 45 ec             	mov    -0x14(%ebp),%eax
40cb1e:	8b 00                	mov    (%eax),%eax
40cb20:	8b 00                	mov    (%eax),%eax
40cb22:	89 45 e0             	mov    %eax,-0x20(%ebp)
40cb25:	50                   	push   %eax
40cb26:	ff 15 18 f0 40 00    	call   *0x40f018
40cb2c:	c3                   	ret
40cb2d:	8b 65 e8             	mov    -0x18(%ebp),%esp
40cb30:	6a 06                	push   $0x6
40cb32:	5a                   	pop    %edx
40cb33:	8b 4d e0             	mov    -0x20(%ebp),%ecx
40cb36:	e8 85 02 00 00       	call   0x40cdc0
40cb3b:	89 45 dc             	mov    %eax,-0x24(%ebp)
40cb3e:	c7 45 fc fe ff ff ff 	movl   $0xfffffffe,-0x4(%ebp)
40cb45:	85 c0                	test   %eax,%eax
40cb47:	74 0b                	je     0x40cb54
40cb49:	50                   	push   %eax
40cb4a:	ff 15 3c f0 40 00    	call   *0x40f03c
40cb50:	33 c0                	xor    %eax,%eax
40cb52:	eb 03                	jmp    0x40cb57
40cb54:	8b 45 e4             	mov    -0x1c(%ebp),%eax
40cb57:	8b 4d f0             	mov    -0x10(%ebp),%ecx
40cb5a:	64 89 0d 00 00 00 00 	mov    %ecx,%fs:0x0
40cb61:	59                   	pop    %ecx
40cb62:	5f                   	pop    %edi
40cb63:	5e                   	pop    %esi
40cb64:	5b                   	pop    %ebx
40cb65:	c9                   	leave
40cb66:	c3                   	ret
40cb67:	6a 10                	push   $0x10
40cb69:	68 98 ce 40 00       	push   $0x40ce98
40cb6e:	e8 e5 99 ff ff       	call   0x406558
40cb73:	83 65 fc 00          	andl   $0x0,-0x4(%ebp)
40cb77:	51                   	push   %ecx
40cb78:	6a 00                	push   $0x0
40cb7a:	68 c4 18 40 00       	push   $0x4018c4
40cb7f:	68 08 10 40 00       	push   $0x401008
40cb84:	ff 15 14 f0 40 00    	call   *0x40f014
40cb8a:	83 c4 10             	add    $0x10,%esp
40cb8d:	eb 20                	jmp    0x40cbaf
40cb8f:	8b 45 ec             	mov    -0x14(%ebp),%eax
40cb92:	8b 00                	mov    (%eax),%eax
40cb94:	8b 00                	mov    (%eax),%eax
40cb96:	89 45 e4             	mov    %eax,-0x1c(%ebp)
40cb99:	50                   	push   %eax
40cb9a:	ff 15 18 f0 40 00    	call   *0x40f018
40cba0:	c3                   	ret
40cba1:	8b 65 e8             	mov    -0x18(%ebp),%esp
40cba4:	6a 06                	push   $0x6
40cba6:	5a                   	pop    %edx
40cba7:	8b 4d e4             	mov    -0x1c(%ebp),%ecx
40cbaa:	e8 11 02 00 00       	call   0x40cdc0
40cbaf:	89 45 e0             	mov    %eax,-0x20(%ebp)
40cbb2:	c7 45 fc fe ff ff ff 	movl   $0xfffffffe,-0x4(%ebp)
40cbb9:	85 c0                	test   %eax,%eax
40cbbb:	74 0b                	je     0x40cbc8
40cbbd:	50                   	push   %eax
40cbbe:	ff 15 3c f0 40 00    	call   *0x40f03c
40cbc4:	33 c0                	xor    %eax,%eax
40cbc6:	eb 03                	jmp    0x40cbcb
40cbc8:	33 c0                	xor    %eax,%eax
40cbca:	40                   	inc    %eax
40cbcb:	8b 4d f0             	mov    -0x10(%ebp),%ecx
40cbce:	64 89 0d 00 00 00 00 	mov    %ecx,%fs:0x0
40cbd5:	59                   	pop    %ecx
40cbd6:	5f                   	pop    %edi
40cbd7:	5e                   	pop    %esi
40cbd8:	5b                   	pop    %ebx
40cbd9:	c9                   	leave
40cbda:	c3                   	ret
40cbdb:	6a 1c                	push   $0x1c
40cbdd:	68 f8 ce 40 00       	push   $0x40cef8
40cbe2:	e8 71 99 ff ff       	call   0x406558
40cbe7:	8b 45 08             	mov    0x8(%ebp),%eax
40cbea:	85 d2                	test   %edx,%edx
40cbec:	74 05                	je     0x40cbf3
40cbee:	83 f8 0c             	cmp    $0xc,%eax
40cbf1:	73 06                	jae    0x40cbf9
40cbf3:	8d 55 d4             	lea    -0x2c(%ebp),%edx