40de5f:	0f 85 ac 00 00 00    	jne    0x40df11
40de65:	8b 4d fc             	mov    -0x4(%ebp),%ecx
40de68:	89 0e                	mov    %ecx,(%esi)
40de6a:	8b 4d 08             	mov    0x8(%ebp),%ecx
40de6d:	89 01                	mov    %eax,(%ecx)
40de6f:	33 f6                	xor    %esi,%esi
40de71:	39 75 0c             	cmp    %esi,0xc(%ebp)
40de74:	74 77                	je     0x40deed
40de76:	6a 02                	push   $0x2
40de78:	5b                   	pop    %ebx
40de79:	53                   	push   %ebx
40de7a:	ff 75 fc             	push   -0x4(%ebp)
40de7d:	e8 94 b7 ff ff       	call   0x409616
40de82:	59                   	pop    %ecx
40de83:	03 c3                	add    %ebx,%eax
40de85:	50                   	push   %eax
40de86:	e8 79 8a ff ff       	call   0x406904
40de8b:	8b f8                	mov    %eax,%edi
40de8d:	59                   	pop    %ecx
40de8e:	59                   	pop    %ecx
40de8f:	3b fe                	cmp    %esi,%edi
40de91:	74 5a                	je     0x40deed
40de93:	ff 75 fc             	push   -0x4(%ebp)
40de96:	ff 75 fc             	push   -0x4(%ebp)
40de99:	e8 78 b7 ff ff       	call   0x409616
40de9e:	59                   	pop    %ecx
40de9f:	03 c3                	add    %ebx,%eax
40dea1:	50                   	push   %eax
40dea2:	57                   	push   %edi
40dea3:	e8 13 59 ff ff       	call   0x4037bb
40dea8:	83 c4 0c             	add    $0xc,%esp
40deab:	85 c0                	test   %eax,%eax
40dead:	0f 85 e5 00 00 00    	jne    0x40df98
40deb3:	8b 45 f0             	mov    -0x10(%ebp),%eax
40deb6:	33 c9                	xor    %ecx,%ecx
40deb8:	8d 04 47             	lea    (%edi,%eax,2),%eax
40debb:	66 89 08             	mov    %cx,(%eax)
40debe:	8b 4d f8             	mov    -0x8(%ebp),%ecx
40dec1:	03 c3                	add    %ebx,%eax
40dec3:	f7 d9                	neg    %ecx
40dec5:	1b c9                	sbb    %ecx,%ecx
40dec7:	f7 d1                	not    %ecx
40dec9:	23 c8                	and    %eax,%ecx
40decb:	51                   	push   %ecx
40decc:	57                   	push   %edi
40decd:	ff 15 68 f0 40 00    	call   *0x40f068
40ded3:	85 c0                	test   %eax,%eax
40ded5:	75 0f                	jne    0x40dee6
40ded7:	83 4d f4 ff          	orl    $0xffffffff,-0xc(%ebp)
40dedb:	e8 47 62 ff ff       	call   0x404127
40dee0:	c7 00 2a 00 00 00    	movl   $0x2a,(%eax)
40dee6:	57                   	push   %edi
40dee7:	e8 7f 40 ff ff       	call   0x401f6b
40deec:	59                   	pop    %ecx
40deed:	39 75 f8             	cmp    %esi,-0x8(%ebp)
40def0:	74 0e                	je     0x40df00
40def2:	ff 75 fc             	push   -0x4(%ebp)
40def5:	e8 71 40 ff ff       	call   0x401f6b
40defa:	8b 45 08             	mov    0x8(%ebp),%eax
40defd:	59                   	pop    %ecx
40defe:	89 30                	mov    %esi,(%eax)
40df00:	8b 45 f4             	mov    -0xc(%ebp),%eax
40df03:	e9 da fe ff ff       	jmp    0x40dde2
40df08:	8b 4e 04             	mov    0x4(%esi),%ecx
40df0b:	47                   	inc    %edi
40df0c:	89 0e                	mov    %ecx,(%esi)
40df0e:	8d 34 bb             	lea    (%ebx,%edi,4),%esi
40df11:	39 06                	cmp    %eax,(%esi)
40df13:	75 f3                	jne    0x40df08
40df15:	81 ff ff ff ff 3f    	cmp    $0x3fffffff,%edi
40df1b:	0f 83 4e ff ff ff    	jae    0x40de6f
40df21:	6a 04                	push   $0x4
40df23:	57                   	push   %edi
40df24:	ff 35 70 32 41 00    	push   0x413270
40df2a:	e8 6f 8a ff ff       	call   0x40699e
40df2f:	83 c4 0c             	add    $0xc,%esp
40df32:	85 c0                	test   %eax,%eax
40df34:	0f 84 35 ff ff ff    	je     0x40de6f
40df3a:	a3 70 32 41 00       	mov    %eax,0x413270
40df3f:	e9 2b ff ff ff       	jmp    0x40de6f
40df44:	39 75 f8             	cmp    %esi,-0x8(%ebp)
40df47:	75 59                	jne    0x40dfa2
40df49:	3b fe                	cmp    %esi,%edi
40df4b:	7d 02                	jge    0x40df4f
40df4d:	f7 df                	neg    %edi
40df4f:	8d 47 02             	lea    0x2(%edi),%eax
40df52:	3b c7                	cmp    %edi,%eax
40df54:	0f 8c 85 fe ff ff    	jl     0x40dddf
40df5a:	3d ff ff ff 3f       	cmp    $0x3fffffff,%eax
40df5f:	0f 83 7a fe ff ff    	jae    0x40dddf
40df65:	50                   	push   %eax
40df66:	6a 04                	push   $0x4
40df68:	ff 35 70 32 41 00    	push   0x413270
40df6e:	e8 2b 8a ff ff       	call   0x40699e
40df73:	83 c4 0c             	add    $0xc,%esp
40df76:	3b c6                	cmp    %esi,%eax
40df78:	0f 84 61 fe ff ff    	je     0x40dddf
40df7e:	8b 55 fc             	mov    -0x4(%ebp),%edx
40df81:	8d 0c b8             	lea    (%eax,%edi,4),%ecx
40df84:	89 11                	mov    %edx,(%ecx)
40df86:	89 71 04             	mov    %esi,0x4(%ecx)
40df89:	8b 4d 08             	mov    0x8(%ebp),%ecx
40df8c:	89 31                	mov    %esi,(%ecx)
40df8e:	a3 70 32 41 00       	mov    %eax,0x413270
40df93:	e9 d9 fe ff ff       	jmp    0x40de71
40df98:	56                   	push   %esi
40df99:	56                   	push   %esi
40df9a:	56                   	push   %esi
40df9b:	56                   	push   %esi
40df9c:	56                   	push   %esi
40df9d:	e8 93 4c ff ff       	call   0x402c35
40dfa2:	ff 75 fc             	push   -0x4(%ebp)
40dfa5:	e8 c1 3f ff ff       	call   0x401f6b
40dfaa:	8b 45 08             	mov    0x8(%ebp),%eax
40dfad:	59                   	pop    %ecx
40dfae:	89 30                	mov    %esi,(%eax)
40dfb0:	33 c0                	xor    %eax,%eax
40dfb2:	e9 2b fe ff ff       	jmp    0x40dde2
40dfb7:	8b ff                	mov    %edi,%edi
40dfb9:	55                   	push   %ebp
40dfba:	8b ec                	mov    %esp,%ebp
40dfbc:	83 ec 10             	sub    $0x10,%esp
40dfbf:	ff 75 08             	push   0x8(%ebp)
40dfc2:	8d 4d f0             	lea    -0x10(%ebp),%ecx
40dfc5:	e8 1b 40 ff ff       	call   0x401fe5
40dfca:	0f b6 45 0c          	movzbl 0xc(%ebp),%eax
40dfce:	8b 4d f4             	mov    -0xc(%ebp),%ecx
40dfd1:	8a 55 14             	mov    0x14(%ebp),%dl
40dfd4:	84 54 01 1d          	test   %dl,0x1d(%ecx,%eax,1)
40dfd8:	75 1e                	jne    0x40dff8
40dfda:	83 7d 10 00          	cmpl   $0x0,0x10(%ebp)
40dfde:	74 12                	je     0x40dff2
40dfe0:	8b 4d f0             	mov    -0x10(%ebp),%ecx
40dfe3:	8b 89 c8 00 00 00    	mov    0xc8(%ecx),%ecx
40dfe9:	0f b7 04 41          	movzwl (%ecx,%eax,2),%eax
40dfed:	23 45 10             	and    0x10(%ebp),%eax
40dff0:	eb 02                	jmp    0x40dff4
40dff2:	33 c0                	xor    %eax,%eax
40dff4:	85 c0                	test   %eax,%eax
40dff6:	74 03                	je     0x40dffb
40dff8:	33 c0                	xor    %eax,%eax
40dffa:	40                   	inc    %eax
40dffb:	80 7d fc 00          	cmpb   $0x0,-0x4(%ebp)
40dfff:	74 07                	je     0x40e008
40e001:	8b 4d f8             	mov    -0x8(%ebp),%ecx
40e004:	83 61 70 fd          	andl   $0xfffffffd,0x70(%ecx)
40e008:	c9                   	leave
40e009:	c3                   	ret
40e00a:	8b ff                	mov    %edi,%edi
40e00c:	55                   	push   %ebp
40e00d:	8b ec                	mov    %esp,%ebp
40e00f:	6a 04                	push   $0x4
40e011:	6a 00                	push   $0x0
40e013:	ff 75 08             	push   0x8(%ebp)
40e016:	6a 00                	push   $0x0
40e018:	e8 9a ff ff ff       	call   0x40dfb7
40e01d:	83 c4 10             	add    $0x10,%esp
40e020:	5d                   	pop    %ebp
40e021:	c3                   	ret
40e022:	8b ff                	mov    %edi,%edi
40e024:	55                   	push   %ebp
40e025:	8b ec                	mov    %esp,%ebp
40e027:	83 ec 18             	sub    $0x18,%esp
40e02a:	53                   	push   %ebx
40e02b:	56                   	push   %esi
40e02c:	57                   	push   %edi
40e02d:	33 db                	xor    %ebx,%ebx
40e02f:	6a 01                	push   $0x1
40e031:	53                   	push   %ebx
40e032:	53                   	push   %ebx
40e033:	ff 75 08             	push   0x8(%ebp)
40e036:	89 5d f0             	mov    %ebx,-0x10(%ebp)
40e039:	89 5d f4             	mov    %ebx,-0xc(%ebp)
40e03c:	e8 ea f7 ff ff       	call   0x40d82b
40e041:	89 45 e8             	mov    %eax,-0x18(%ebp)
40e044:	23 c2                	and    %edx,%eax
40e046:	83 c4 10             	add    $0x10,%esp
40e049:	89 55 ec             	mov    %edx,-0x14(%ebp)
40e04c:	83 f8 ff             	cmp    $0xffffffff,%eax
40e04f:	74 59                	je     0x40e0aa
40e051:	6a 02                	push   $0x2
40e053:	53                   	push   %ebx
40e054:	53                   	push   %ebx
40e055:	ff 75 08             	push   0x8(%ebp)
40e058:	e8 ce f7 ff ff       	call   0x40d82b
40e05d:	8b c8                	mov    %eax,%ecx
40e05f:	23 ca                	and    %edx,%ecx
40e061:	83 c4 10             	add    $0x10,%esp
40e064:	83 f9 ff             	cmp    $0xffffffff,%ecx
40e067:	74 41                	je     0x40e0aa
40e069:	8b 75 0c             	mov    0xc(%ebp),%esi
40e06c:	8b 7d 10             	mov    0x10(%ebp),%edi
40e06f:	2b f0                	sub    %eax,%esi
40e071:	1b fa                	sbb    %edx,%edi
40e073:	0f 88 c6 00 00 00    	js     0x40e13f
40e079:	7f 08                	jg     0x40e083
40e07b:	3b f3                	cmp    %ebx,%esi
40e07d:	0f 86 bc 00 00 00    	jbe    0x40e13f
40e083:	bb 00 10 00 00       	mov    $0x1000,%ebx
40e088:	53                   	push   %ebx
40e089:	6a 08                	push   $0x8
40e08b:	ff 15 60 f0 40 00    	call   *0x40f060
40e091:	50                   	push   %eax
40e092:	ff 15 70 f0 40 00    	call   *0x40f070
40e098:	89 45 fc             	mov    %eax,-0x4(%ebp)
40e09b:	85 c0                	test   %eax,%eax
40e09d:	75 17                	jne    0x40e0b6
40e09f:	e8 83 60 ff ff       	call   0x404127
40e0a4:	c7 00 0c 00 00 00    	movl   $0xc,(%eax)
40e0aa:	e8 78 60 ff ff       	call   0x404127
40e0af:	8b 00                	mov    (%eax),%eax
40e0b1:	5f                   	pop    %edi
40e0b2:	5e                   	pop    %esi
40e0b3:	5b                   	pop    %ebx
40e0b4:	c9                   	leave
40e0b5:	c3                   	ret
40e0b6:	68 00 80 00 00       	push   $0x8000
40e0bb:	ff 75 08             	push   0x8(%ebp)
40e0be:	e8 15 01 00 00       	call   0x40e1d8
40e0c3:	59                   	pop    %ecx
40e0c4:	59                   	pop    %ecx
40e0c5:	89 45 f8             	mov    %eax,-0x8(%ebp)
40e0c8:	85 ff                	test   %edi,%edi
40e0ca:	7c 0a                	jl     0x40e0d6
40e0cc:	7f 04                	jg     0x40e0d2
40e0ce:	3b f3                	cmp    %ebx,%esi
40e0d0:	72 04                	jb     0x40e0d6
40e0d2:	8b c3                	mov    %ebx,%eax
40e0d4:	eb 02                	jmp    0x40e0d8
40e0d6:	8b c6                	mov    %esi,%eax
40e0d8:	50                   	push   %eax
40e0d9:	ff 75 fc             	push   -0x4(%ebp)
40e0dc:	ff 75 08             	push   0x8(%ebp)
40e0df:	e8 fd e1 ff ff       	call   0x40c2e1
40e0e4:	83 c4 0c             	add    $0xc,%esp
40e0e7:	83 f8 ff             	cmp    $0xffffffff,%eax
40e0ea:	74 36                	je     0x40e122
40e0ec:	99                   	cltd
40e0ed:	2b f0                	sub    %eax,%esi
40e0ef:	1b fa                	sbb    %edx,%edi
40e0f1:	78 06                	js     0x40e0f9
40e0f3:	7f d3                	jg     0x40e0c8
40e0f5:	85 f6                	test   %esi,%esi
40e0f7:	75 cf                	jne    0x40e0c8
40e0f9:	8b 75 f0             	mov    -0x10(%ebp),%esi
40e0fc:	ff 75 f8             	push   -0x8(%ebp)
40e0ff:	ff 75 08             	push   0x8(%ebp)
40e102:	e8 d1 00 00 00       	call   0x40e1d8
40e107:	59                   	pop    %ecx
40e108:	59                   	pop    %ecx
40e109:	ff 75 fc             	push   -0x4(%ebp)
40e10c:	6a 00                	push   $0x0
40e10e:	ff 15 60 f0 40 00    	call   *0x40f060
40e114:	50                   	push   %eax
40e115:	ff 15 6c f0 40 00    	call   *0x40f06c
40e11b:	33 db                	xor    %ebx,%ebx
40e11d:	e9 86 00 00 00       	jmp    0x40e1a8
40e122:	e8 13 60 ff ff       	call   0x40413a
40e127:	83 38 05             	cmpl   $0x5,(%eax)
40e12a:	75 0b                	jne    0x40e137
40e12c:	e8 f6 5f ff ff       	call   0x404127
40e131:	c7 00 0d 00 00 00    	movl   $0xd,(%eax)
40e137:	83 ce ff             	or     $0xffffffff,%esi
40e13a:	89 75 f4             	mov    %esi,-0xc(%ebp)
40e13d:	eb bd                	jmp    0x40e0fc
40e13f:	3b fb                	cmp    %ebx,%edi
40e141:	7f 71                	jg     0x40e1b4
40e143:	7c 04                	jl     0x40e149
40e145:	3b f3                	cmp    %ebx,%esi
40e147:	73 6b                	jae    0x40e1b4
40e149:	53                   	push   %ebx
40e14a:	ff 75 10             	push   0x10(%ebp)
40e14d:	ff 75 0c             	push   0xc(%ebp)
40e150:	ff 75 08             	push   0x8(%ebp)
40e153:	e8 d3 f6 ff ff       	call   0x40d82b
40e158:	23 c2                	and    %edx,%eax
40e15a:	83 c4 10             	add    $0x10,%esp
40e15d:	83 f8 ff             	cmp    $0xffffffff,%eax
40e160:	0f 84 44 ff ff ff    	je     0x40e0aa
40e166:	ff 75 08             	push   0x8(%ebp)
40e169:	e8 07 4f ff ff       	call   0x403075
40e16e:	59                   	pop    %ecx
40e16f:	50                   	push   %eax
40e170:	ff 15 64 f0 40 00    	call   *0x40f064
40e176:	f7 d8                	neg    %eax
40e178:	1b c0                	sbb    %eax,%eax
40e17a:	f7 d8                	neg    %eax
40e17c:	48                   	dec    %eax
40e17d:	99                   	cltd
40e17e:	89 45 f0             	mov    %eax,-0x10(%ebp)
40e181:	23 c2                	and    %edx,%eax
40e183:	89 55 f4             	mov    %edx,-0xc(%ebp)
40e186:	83 f8 ff             	cmp    $0xffffffff,%eax
40e189:	75 29                	jne    0x40e1b4
40e18b:	e8 97 5f ff ff       	call   0x404127
40e190:	c7 00 0d 00 00 00    	movl   $0xd,(%eax)
40e196:	e8 9f 5f ff ff       	call   0x40413a
40e19b:	8b f0                	mov    %eax,%esi
40e19d:	ff 15 44 f0 40 00    	call   *0x40f044
40e1a3:	89 06                	mov    %eax,(%esi)
40e1a5:	8b 75 f0             	mov    -0x10(%ebp),%esi
40e1a8:	23 75 f4             	and    -0xc(%ebp),%esi
40e1ab:	83 fe ff             	cmp    $0xffffffff,%esi
40e1ae:	0f 84 f6 fe ff ff    	je     0x40e0aa
40e1b4:	53                   	push   %ebx
40e1b5:	ff 75 ec             	push   -0x14(%ebp)
40e1b8:	ff 75 e8             	push   -0x18(%ebp)
40e1bb:	ff 75 08             	push   0x8(%ebp)
40e1be:	e8 68 f6 ff ff       	call   0x40d82b
40e1c3:	23 c2                	and    %edx,%eax
40e1c5:	83 c4 10             	add    $0x10,%esp
40e1c8:	83 f8 ff             	cmp    $0xffffffff,%eax
40e1cb:	0f 84 d9 fe ff ff    	je     0x40e0aa
40e1d1:	33 c0                	xor    %eax,%eax
40e1d3:	e9 d9 fe ff ff       	jmp    0x40e0b1
40e1d8:	8b ff                	mov    %edi,%edi
40e1da:	55                   	push   %ebp
40e1db:	8b ec                	mov    %esp,%ebp
40e1dd:	53                   	push   %ebx
40e1de:	8b 5d 0c             	mov    0xc(%ebp),%ebx
40e1e1:	56                   	push   %esi
40e1e2:	8b 75 08             	mov    0x8(%ebp),%esi
40e1e5:	8b c6                	mov    %esi,%eax
40e1e7:	c1 f8 05             	sar    $0x5,%eax
40e1ea:	8d 14 85 20 46 41 00 	lea    0x414620(,%eax,4),%edx
40e1f1:	8b 0a                	mov    (%edx),%ecx
40e1f3:	83 e6 1f             	and    $0x1f,%esi
40e1f6:	c1 e6 06             	shl    $0x6,%esi
40e1f9:	03 ce                	add    %esi,%ecx
40e1fb:	8a 41 24             	mov    0x24(%ecx),%al
40e1fe:	02 c0                	add    %al,%al
40e200:	57                   	push   %edi
40e201:	0f b6 79 04          	movzbl 0x4(%ecx),%edi
40e205:	0f be c0             	movsbl %al,%eax
40e208:	81 e7 80 00 00 00    	and    $0x80,%edi
40e20e:	d1 f8                	sar    $1,%eax
40e210:	81 fb 00 40 00 00    	cmp    $0x4000,%ebx
40e216:	74 50                	je     0x40e268
40e218:	81 fb 00 80 00 00    	cmp    $0x8000,%ebx
40e21e:	74 42                	je     0x40e262
40e220:	81 fb 00 00 01 00    	cmp    $0x10000,%ebx
40e226:	74 26                	je     0x40e24e
40e228:	81 fb 00 00 02 00    	cmp    $0x20000,%ebx
40e22e:	74 1e                	je     0x40e24e
40e230:	81 fb 00 00 04 00    	cmp    $0x40000,%ebx
40e236:	75 3d                	jne    0x40e275
40e238:	80 49 04 80          	orb    $0x80,0x4(%ecx)
40e23c:	8b 0a                	mov    (%edx),%ecx
40e23e:	8d 4c 31 24          	lea    0x24(%ecx,%esi,1),%ecx
40e242:	8a 11                	mov    (%ecx),%dl