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
40e244:	80 e2 81             	and    $0x81,%dl
40e247:	80 ca 01             	or     $0x1,%dl
40e24a:	88 11                	mov    %dl,(%ecx)
40e24c:	eb 27                	jmp    0x40e275
40e24e:	80 49 04 80          	orb    $0x80,0x4(%ecx)
40e252:	8b 0a                	mov    (%edx),%ecx
40e254:	8d 4c 31 24          	lea    0x24(%ecx,%esi,1),%ecx
40e258:	8a 11                	mov    (%ecx),%dl
40e25a:	80 e2 82             	and    $0x82,%dl
40e25d:	80 ca 02             	or     $0x2,%dl
40e260:	eb e8                	jmp    0x40e24a
40e262:	80 61 04 7f          	andb   $0x7f,0x4(%ecx)
40e266:	eb 0d                	jmp    0x40e275
40e268:	80 49 04 80          	orb    $0x80,0x4(%ecx)
40e26c:	8b 0a                	mov    (%edx),%ecx
40e26e:	8d 4c 31 24          	lea    0x24(%ecx,%esi,1),%ecx
40e272:	80 21 80             	andb   $0x80,(%ecx)
40e275:	85 ff                	test   %edi,%edi
40e277:	5f                   	pop    %edi
40e278:	5e                   	pop    %esi
40e279:	5b                   	pop    %ebx
40e27a:	75 07                	jne    0x40e283
40e27c:	b8 00 80 00 00       	mov    $0x8000,%eax
40e281:	5d                   	pop    %ebp
40e282:	c3                   	ret
40e283:	f7 d8                	neg    %eax
40e285:	1b c0                	sbb    %eax,%eax
40e287:	25 00 c0 00 00       	and    $0xc000,%eax
40e28c:	05 00 40 00 00       	add    $0x4000,%eax
40e291:	5d                   	pop    %ebp
40e292:	c3                   	ret
40e293:	8b ff                	mov    %edi,%edi
40e295:	55                   	push   %ebp
40e296:	8b ec                	mov    %esp,%ebp
40e298:	8b 45 08             	mov    0x8(%ebp),%eax
40e29b:	85 c0                	test   %eax,%eax
40e29d:	75 15                	jne    0x40e2b4
40e29f:	e8 83 5e ff ff       	call   0x404127
40e2a4:	c7 00 16 00 00 00    	movl   $0x16,(%eax)
40e2aa:	e8 d8 49 ff ff       	call   0x402c87
40e2af:	6a 16                	push   $0x16
40e2b1:	58                   	pop    %eax
40e2b2:	5d                   	pop    %ebp
40e2b3:	c3                   	ret
40e2b4:	8b 0d 64 3b 41 00    	mov    0x413b64,%ecx
40e2ba:	89 08                	mov    %ecx,(%eax)
40e2bc:	33 c0                	xor    %eax,%eax
40e2be:	5d                   	pop    %ebp
40e2bf:	c3                   	ret
40e2c0:	8b ff                	mov    %edi,%edi
40e2c2:	55                   	push   %ebp
40e2c3:	8b ec                	mov    %esp,%ebp
40e2c5:	51                   	push   %ecx
40e2c6:	56                   	push   %esi
40e2c7:	8b 75 0c             	mov    0xc(%ebp),%esi
40e2ca:	56                   	push   %esi
40e2cb:	e8 e0 47 ff ff       	call   0x402ab0
40e2d0:	89 45 0c             	mov    %eax,0xc(%ebp)
40e2d3:	8b 46 0c             	mov    0xc(%esi),%eax
40e2d6:	59                   	pop    %ecx
40e2d7:	a8 82                	test   $0x82,%al
40e2d9:	75 19                	jne    0x40e2f4
40e2db:	e8 47 5e ff ff       	call   0x404127
40e2e0:	c7 00 09 00 00 00    	movl   $0x9,(%eax)
40e2e6:	83 4e 0c 20          	orl    $0x20,0xc(%esi)
40e2ea:	b8 ff ff 00 00       	mov    $0xffff,%eax
40e2ef:	e9 3d 01 00 00       	jmp    0x40e431
40e2f4:	a8 40                	test   $0x40,%al
40e2f6:	74 0d                	je     0x40e305
40e2f8:	e8 2a 5e ff ff       	call   0x404127
40e2fd:	c7 00 22 00 00 00    	movl   $0x22,(%eax)
40e303:	eb e1                	jmp    0x40e2e6
40e305:	a8 01                	test   $0x1,%al
40e307:	74 17                	je     0x40e320
40e309:	83 66 04 00          	andl   $0x0,0x4(%esi)
40e30d:	a8 10                	test   $0x10,%al
40e30f:	0f 84 8d 00 00 00    	je     0x40e3a2
40e315:	8b 4e 08             	mov    0x8(%esi),%ecx
40e318:	83 e0 fe             	and    $0xfffffffe,%eax
40e31b:	89 0e                	mov    %ecx,(%esi)
40e31d:	89 46 0c             	mov    %eax,0xc(%esi)
40e320:	8b 46 0c             	mov    0xc(%esi),%eax
40e323:	83 66 04 00          	andl   $0x0,0x4(%esi)
40e327:	83 65 fc 00          	andl   $0x0,-0x4(%ebp)
40e32b:	53                   	push   %ebx
40e32c:	6a 02                	push   $0x2
40e32e:	83 e0 ef             	and    $0xffffffef,%eax
40e331:	5b                   	pop    %ebx
40e332:	0b c3                	or     %ebx,%eax
40e334:	89 46 0c             	mov    %eax,0xc(%esi)
40e337:	a9 0c 01 00 00       	test   $0x10c,%eax
40e33c:	75 2c                	jne    0x40e36a
40e33e:	e8 40 3f ff ff       	call   0x402283
40e343:	83 c0 20             	add    $0x20,%eax
40e346:	3b f0                	cmp    %eax,%esi
40e348:	74 0c                	je     0x40e356
40e34a:	e8 34 3f ff ff       	call   0x402283
40e34f:	83 c0 40             	add    $0x40,%eax
40e352:	3b f0                	cmp    %eax,%esi
40e354:	75 0d                	jne    0x40e363
40e356:	ff 75 0c             	push   0xc(%ebp)
40e359:	e8 e9 c5 ff ff       	call   0x40a947
40e35e:	59                   	pop    %ecx
40e35f:	85 c0                	test   %eax,%eax
40e361:	75 07                	jne    0x40e36a
40e363:	56                   	push   %esi
40e364:	e8 31 f6 ff ff       	call   0x40d99a
40e369:	59                   	pop    %ecx
40e36a:	f7 46 0c 08 01 00 00 	testl  $0x108,0xc(%esi)
40e371:	57                   	push   %edi
40e372:	0f 84 83 00 00 00    	je     0x40e3fb
40e378:	8b 46 08             	mov    0x8(%esi),%eax
40e37b:	8b 3e                	mov    (%esi),%edi
40e37d:	8d 48 02             	lea    0x2(%eax),%ecx
40e380:	89 0e                	mov    %ecx,(%esi)
40e382:	8b 4e 18             	mov    0x18(%esi),%ecx
40e385:	2b f8                	sub    %eax,%edi
40e387:	2b cb                	sub    %ebx,%ecx
40e389:	89 4e 04             	mov    %ecx,0x4(%esi)
40e38c:	85 ff                	test   %edi,%edi
40e38e:	7e 1d                	jle    0x40e3ad
40e390:	57                   	push   %edi
40e391:	50                   	push   %eax
40e392:	ff 75 0c             	push   0xc(%ebp)
40e395:	e8 44 e6 ff ff       	call   0x40c9de
40e39a:	83 c4 0c             	add    $0xc,%esp
40e39d:	89 45 fc             	mov    %eax,-0x4(%ebp)
40e3a0:	eb 4e                	jmp    0x40e3f0
40e3a2:	83 c8 20             	or     $0x20,%eax
40e3a5:	89 46 0c             	mov    %eax,0xc(%esi)
40e3a8:	e9 3d ff ff ff       	jmp    0x40e2ea
40e3ad:	8b 4d 0c             	mov    0xc(%ebp),%ecx
40e3b0:	83 f9 ff             	cmp    $0xffffffff,%ecx
40e3b3:	74 1b                	je     0x40e3d0
40e3b5:	83 f9 fe             	cmp    $0xfffffffe,%ecx
40e3b8:	74 16                	je     0x40e3d0
40e3ba:	8b c1                	mov    %ecx,%eax
40e3bc:	83 e0 1f             	and    $0x1f,%eax
40e3bf:	8b d1                	mov    %ecx,%edx
40e3c1:	c1 fa 05             	sar    $0x5,%edx
40e3c4:	c1 e0 06             	shl    $0x6,%eax
40e3c7:	03 04 95 20 46 41 00 	add    0x414620(,%edx,4),%eax
40e3ce:	eb 05                	jmp    0x40e3d5
40e3d0:	b8 78 2b 41 00       	mov    $0x412b78,%eax
40e3d5:	f6 40 04 20          	testb  $0x20,0x4(%eax)
40e3d9:	74 15                	je     0x40e3f0
40e3db:	53                   	push   %ebx
40e3dc:	6a 00                	push   $0x0
40e3de:	6a 00                	push   $0x0
40e3e0:	51                   	push   %ecx
40e3e1:	e8 ca f4 ff ff       	call   0x40d8b0
40e3e6:	23 c2                	and    %edx,%eax
40e3e8:	83 c4 10             	add    $0x10,%esp
40e3eb:	83 f8 ff             	cmp    $0xffffffff,%eax
40e3ee:	74 2d                	je     0x40e41d
40e3f0:	8b 46 08             	mov    0x8(%esi),%eax
40e3f3:	8b 5d 08             	mov    0x8(%ebp),%ebx
40e3f6:	66 89 18             	mov    %bx,(%eax)
40e3f9:	eb 1d                	jmp    0x40e418
40e3fb:	6a 02                	push   $0x2
40e3fd:	8d 45 fc             	lea    -0x4(%ebp),%eax
40e400:	50                   	push   %eax
40e401:	ff 75 0c             	push   0xc(%ebp)
40e404:	8b fb                	mov    %ebx,%edi
40e406:	8b 5d 08             	mov    0x8(%ebp),%ebx
40e409:	66 89 5d fc          	mov    %bx,-0x4(%ebp)
40e40d:	e8 cc e5 ff ff       	call   0x40c9de
40e412:	83 c4 0c             	add    $0xc,%esp
40e415:	89 45 fc             	mov    %eax,-0x4(%ebp)
40e418:	39 7d fc             	cmp    %edi,-0x4(%ebp)
40e41b:	74 0b                	je     0x40e428
40e41d:	83 4e 0c 20          	orl    $0x20,0xc(%esi)
40e421:	b8 ff ff 00 00       	mov    $0xffff,%eax
40e426:	eb 07                	jmp    0x40e42f
40e428:	8b c3                	mov    %ebx,%eax