408270:	83 c4 14             	add    $0x14,%esp
408273:	83 4d e4 ff          	orl    $0xffffffff,-0x1c(%ebp)
408277:	39 5d e4             	cmp    %ebx,-0x1c(%ebp)
40827a:	75 19                	jne    0x408295
40827c:	ff 4e 04             	decl   0x4(%esi)
40827f:	78 0a                	js     0x40828b
408281:	8b 0e                	mov    (%esi),%ecx
408283:	0f b6 01             	movzbl (%ecx),%eax
408286:	41                   	inc    %ecx
408287:	89 0e                	mov    %ecx,(%esi)
408289:	eb 07                	jmp    0x408292
40828b:	56                   	push   %esi
40828c:	e8 95 66 00 00       	call   0x40e926
408291:	59                   	pop    %ecx
408292:	89 45 e4             	mov    %eax,-0x1c(%ebp)
408295:	c7 45 fc fe ff ff ff 	movl   $0xfffffffe,-0x4(%ebp)
40829c:	e8 0c 00 00 00       	call   0x4082ad
4082a1:	8b 45 e4             	mov    -0x1c(%ebp),%eax
4082a4:	e8 e4 53 00 00       	call   0x40d68d
4082a9:	c3                   	ret
4082aa:	8b 75 08             	mov    0x8(%ebp),%esi
4082ad:	56                   	push   %esi
4082ae:	e8 a4 06 00 00       	call   0x408957
4082b3:	59                   	pop    %ecx
4082b4:	c3                   	ret
4082b5:	55                   	push   %ebp
4082b6:	8b ec                	mov    %esp,%ebp
4082b8:	51                   	push   %ecx
4082b9:	51                   	push   %ecx
4082ba:	8b 45 08             	mov    0x8(%ebp),%eax
4082bd:	89 45 08             	mov    %eax,0x8(%ebp)
4082c0:	8b 45 0c             	mov    0xc(%ebp),%eax
4082c3:	0f af 45 10          	imul   0x10(%ebp),%eax
4082c7:	85 c0                	test   %eax,%eax
4082c9:	53                   	push   %ebx
4082ca:	89 45 f8             	mov    %eax,-0x8(%ebp)
4082cd:	8b d8                	mov    %eax,%ebx
4082cf:	0f 84 f1 00 00 00    	je     0x4083c6
4082d5:	56                   	push   %esi
4082d6:	8b 75 14             	mov    0x14(%ebp),%esi
4082d9:	66 f7 46 0c 0c 01    	testw  $0x10c,0xc(%esi)
4082df:	74 08                	je     0x4082e9
4082e1:	8b 4e 18             	mov    0x18(%esi),%ecx
4082e4:	89 4d fc             	mov    %ecx,-0x4(%ebp)
4082e7:	eb 07                	jmp    0x4082f0
4082e9:	c7 45 fc 00 10 00 00 	movl   $0x1000,-0x4(%ebp)
4082f0:	57                   	push   %edi
4082f1:	eb 03                	jmp    0x4082f6
4082f3:	8b 45 f8             	mov    -0x8(%ebp),%eax
4082f6:	8b 4e 0c             	mov    0xc(%esi),%ecx
4082f9:	81 e1 08 01 00 00    	and    $0x108,%ecx
4082ff:	74 30                	je     0x408331
408301:	8b 7e 04             	mov    0x4(%esi),%edi
408304:	85 ff                	test   %edi,%edi
408306:	74 29                	je     0x408331
408308:	0f 8c bb 00 00 00    	jl     0x4083c9
40830e:	3b df                	cmp    %edi,%ebx
408310:	73 02                	jae    0x408314
408312:	8b fb                	mov    %ebx,%edi
408314:	57                   	push   %edi
408315:	ff 75 08             	push   0x8(%ebp)
408318:	ff 36                	push   (%esi)
40831a:	e8 b1 d8 ff ff       	call   0x405bd0
40831f:	29 7e 04             	sub    %edi,0x4(%esi)
408322:	01 3e                	add    %edi,(%esi)
408324:	83 c4 0c             	add    $0xc,%esp
408327:	2b df                	sub    %edi,%ebx
408329:	01 7d 08             	add    %edi,0x8(%ebp)
40832c:	e9 88 00 00 00       	jmp    0x4083b9
408331:	3b 5d fc             	cmp    -0x4(%ebp),%ebx
408334:	72 5a                	jb     0x408390
408336:	85 c9                	test   %ecx,%ecx
408338:	74 0b                	je     0x408345
40833a:	56                   	push   %esi
40833b:	e8 d6 f9 ff ff       	call   0x407d16
408340:	85 c0                	test   %eax,%eax
408342:	59                   	pop    %ecx
408343:	75 3f                	jne    0x408384
408345:	83 7d fc 00          	cmpl   $0x0,-0x4(%ebp)
408349:	8b fb                	mov    %ebx,%edi
40834b:	74 09                	je     0x408356
40834d:	33 d2                	xor    %edx,%edx
40834f:	8b c3                	mov    %ebx,%eax
408351:	f7 75 fc             	divl   -0x4(%ebp)
408354:	2b fa                	sub    %edx,%edi
408356:	57                   	push   %edi
408357:	ff 75 08             	push   0x8(%ebp)
40835a:	56                   	push   %esi
40835b:	e8 e6 66 00 00       	call   0x40ea46
408360:	59                   	pop    %ecx
408361:	50                   	push   %eax
408362:	e8 00 70 00 00       	call   0x40f367
408367:	83 c4 0c             	add    $0xc,%esp
40836a:	83 f8 ff             	cmp    $0xffffffff,%eax
40836d:	74 11                	je     0x408380
40836f:	3b c7                	cmp    %edi,%eax
408371:	8b cf                	mov    %edi,%ecx
408373:	77 02                	ja     0x408377
408375:	8b c8                	mov    %eax,%ecx
408377:	01 4d 08             	add    %ecx,0x8(%ebp)
40837a:	2b d9                	sub    %ecx,%ebx
40837c:	3b c7                	cmp    %edi,%eax
40837e:	73 39                	jae    0x4083b9
408380:	83 4e 0c 20          	orl    $0x20,0xc(%esi)
408384:	8b 45 f8             	mov    -0x8(%ebp),%eax
408387:	2b c3                	sub    %ebx,%eax
408389:	33 d2                	xor    %edx,%edx
40838b:	f7 75 0c             	divl   0xc(%ebp)
40838e:	eb 34                	jmp    0x4083c4
408390:	8b 45 08             	mov    0x8(%ebp),%eax
408393:	0f be 00             	movsbl (%eax),%eax
408396:	56                   	push   %esi
408397:	50                   	push   %eax
408398:	e8 c3 32 00 00       	call   0x40b660
40839d:	83 f8 ff             	cmp    $0xffffffff,%eax
4083a0:	59                   	pop    %ecx
4083a1:	59                   	pop    %ecx
4083a2:	74 e0                	je     0x408384
4083a4:	ff 45 08             	incl   0x8(%ebp)
4083a7:	8b 46 18             	mov    0x18(%esi),%eax
4083aa:	4b                   	dec    %ebx
4083ab:	85 c0                	test   %eax,%eax
4083ad:	89 45 fc             	mov    %eax,-0x4(%ebp)
4083b0:	7f 07                	jg     0x4083b9
4083b2:	c7 45 fc 01 00 00 00 	movl   $0x1,-0x4(%ebp)
4083b9:	85 db                	test   %ebx,%ebx
4083bb:	0f 85 32 ff ff ff    	jne    0x4082f3
4083c1:	8b 45 10             	mov    0x10(%ebp),%eax
4083c4:	5f                   	pop    %edi
4083c5:	5e                   	pop    %esi
4083c6:	5b                   	pop    %ebx
4083c7:	c9                   	leave
4083c8:	c3                   	ret
4083c9:	83 4e 0c 20          	orl    $0x20,0xc(%esi)
4083cd:	eb b8                	jmp    0x408387
4083cf:	6a 0c                	push   $0xc
4083d1:	68 d8 aa 41 00       	push   $0x41aad8
4083d6:	e8 6d 52 00 00       	call   0x40d648
4083db:	8b 45 0c             	mov    0xc(%ebp),%eax
4083de:	0f af 45 10          	imul   0x10(%ebp),%eax
4083e2:	85 c0                	test   %eax,%eax
4083e4:	75 04                	jne    0x4083ea
4083e6:	33 c0                	xor    %eax,%eax
4083e8:	eb 62                	jmp    0x40844c
4083ea:	33 c0                	xor    %eax,%eax
4083ec:	33 f6                	xor    %esi,%esi
4083ee:	39 75 14             	cmp    %esi,0x14(%ebp)
4083f1:	0f 95 c0             	setne  %al
4083f4:	3b c6                	cmp    %esi,%eax
4083f6:	75 16                	jne    0x40840e
4083f8:	e8 fd 0f 00 00       	call   0x4093fa
4083fd:	89 30                	mov    %esi,(%eax)
4083ff:	56                   	push   %esi
408400:	56                   	push   %esi
408401:	56                   	push   %esi
408402:	56                   	push   %esi
408403:	56                   	push   %esi
408404:	e8 47 f2 ff ff       	call   0x407650
408409:	83 c4 14             	add    $0x14,%esp
40840c:	eb d8                	jmp    0x4083e6
40840e:	33 c0                	xor    %eax,%eax
408410:	39 75 08             	cmp    %esi,0x8(%ebp)
408413:	0f 95 c0             	setne  %al
408416:	3b c6                	cmp    %esi,%eax
408418:	74 de                	je     0x4083f8
40841a:	ff 75 14             	push   0x14(%ebp)
40841d:	e8 e3 04 00 00       	call   0x408905
408422:	59                   	pop    %ecx
408423:	89 75 fc             	mov    %esi,-0x4(%ebp)
408426:	ff 75 14             	push   0x14(%ebp)
408429:	ff 75 10             	push   0x10(%ebp)
40842c:	ff 75 0c             	push   0xc(%ebp)
40842f:	ff 75 08             	push   0x8(%ebp)
408432:	e8 7e fe ff ff       	call   0x4082b5
408437:	83 c4 10             	add    $0x10,%esp
40843a:	89 45 e4             	mov    %eax,-0x1c(%ebp)
40843d:	c7 45 fc fe ff ff ff 	movl   $0xfffffffe,-0x4(%ebp)
408444:	e8 09 00 00 00       	call   0x408452
408449:	8b 45 e4             	mov    -0x1c(%ebp),%eax
40844c:	e8 3c 52 00 00       	call   0x40d68d
408451:	c3                   	ret
408452:	ff 75 14             	push   0x14(%ebp)
408455:	e8 fd 04 00 00       	call   0x408957
40845a:	59                   	pop    %ecx
40845b:	c3                   	ret
40845c:	57                   	push   %edi
40845d:	33 ff                	xor    %edi,%edi
40845f:	39 7c 24 08          	cmp    %edi,0x8(%esp)
408463:	75 1d                	jne    0x408482
408465:	e8 90 0f 00 00       	call   0x4093fa
40846a:	57                   	push   %edi
40846b:	57                   	push   %edi
40846c:	57                   	push   %edi
40846d:	57                   	push   %edi
40846e:	57                   	push   %edi
40846f:	c7 00 16 00 00 00    	movl   $0x16,(%eax)
408475:	e8 d6 f1 ff ff       	call   0x407650
40847a:	83 c4 14             	add    $0x14,%esp
40847d:	83 c8 ff             	or     $0xffffffff,%eax
408480:	5f                   	pop    %edi
408481:	c3                   	ret
408482:	56                   	push   %esi
408483:	8b 74 24 10          	mov    0x10(%esp),%esi
408487:	3b f7                	cmp    %edi,%esi
408489:	75 1d                	jne    0x4084a8
40848b:	e8 6a 0f 00 00       	call   0x4093fa
408490:	57                   	push   %edi
408491:	57                   	push   %edi
408492:	57                   	push   %edi
408493:	57                   	push   %edi
408494:	57                   	push   %edi
408495:	c7 00 16 00 00 00    	movl   $0x16,(%eax)
40849b:	e8 b0 f1 ff ff       	call   0x407650
4084a0:	83 c4 14             	add    $0x14,%esp
4084a3:	83 c8 ff             	or     $0xffffffff,%eax
4084a6:	eb 1c                	jmp    0x4084c4
4084a8:	ff 74 24 0c          	push   0xc(%esp)
4084ac:	e8 53 72 00 00       	call   0x40f704
4084b1:	59                   	pop    %ecx
4084b2:	8b c8                	mov    %eax,%ecx
4084b4:	89 06                	mov    %eax,(%esi)
4084b6:	23 ca                	and    %edx,%ecx
4084b8:	83 c8 ff             	or     $0xffffffff,%eax
4084bb:	3b c8                	cmp    %eax,%ecx
4084bd:	89 56 04             	mov    %edx,0x4(%esi)
4084c0:	74 02                	je     0x4084c4
4084c2:	33 c0                	xor    %eax,%eax
4084c4:	5e                   	pop    %esi
4084c5:	5f                   	pop    %edi
4084c6:	c3                   	ret
4084c7:	55                   	push   %ebp
4084c8:	8b ec                	mov    %esp,%ebp
4084ca:	56                   	push   %esi
4084cb:	8b 75 08             	mov    0x8(%ebp),%esi
4084ce:	8b 46 0c             	mov    0xc(%esi),%eax
4084d1:	a8 83                	test   $0x83,%al
4084d3:	75 10                	jne    0x4084e5
4084d5:	e8 20 0f 00 00       	call   0x4093fa
4084da:	c7 00 16 00 00 00    	movl   $0x16,(%eax)
4084e0:	83 c8 ff             	or     $0xffffffff,%eax
4084e3:	eb 66                	jmp    0x40854b
4084e5:	83 e0 ef             	and    $0xffffffef,%eax
4084e8:	83 7d 10 01          	cmpl   $0x1,0x10(%ebp)
4084ec:	89 46 0c             	mov    %eax,0xc(%esi)
4084ef:	75 0e                	jne    0x4084ff
4084f1:	56                   	push   %esi
4084f2:	e8 a5 73 00 00       	call   0x40f89c
4084f7:	01 45 0c             	add    %eax,0xc(%ebp)
4084fa:	83 65 10 00          	andl   $0x0,0x10(%ebp)
4084fe:	59                   	pop    %ecx
4084ff:	56                   	push   %esi
408500:	e8 11 f8 ff ff       	call   0x407d16
408505:	8b 46 0c             	mov    0xc(%esi),%eax
408508:	84 c0                	test   %al,%al
40850a:	59                   	pop    %ecx
40850b:	79 08                	jns    0x408515
40850d:	83 e0 fc             	and    $0xfffffffc,%eax
408510:	89 46 0c             	mov    %eax,0xc(%esi)
408513:	eb 15                	jmp    0x40852a
408515:	a8 01                	test   $0x1,%al
408517:	74 11                	je     0x40852a
408519:	a8 08                	test   $0x8,%al
40851b:	74 0d                	je     0x40852a
40851d:	66 a9 00 04          	test   $0x400,%ax
408521:	75 07                	jne    0x40852a
408523:	c7 46 18 00 02 00 00 	movl   $0x200,0x18(%esi)
40852a:	ff 75 10             	push   0x10(%ebp)
40852d:	ff 75 0c             	push   0xc(%ebp)
408530:	56                   	push   %esi
408531:	e8 10 65 00 00       	call   0x40ea46
408536:	59                   	pop    %ecx
408537:	50                   	push   %eax
408538:	e8 83 72 00 00       	call   0x40f7c0
40853d:	33 c9                	xor    %ecx,%ecx
40853f:	83 c4 0c             	add    $0xc,%esp
408542:	83 f8 ff             	cmp    $0xffffffff,%eax
408545:	0f 95 c1             	setne  %cl
408548:	49                   	dec    %ecx
408549:	8b c1                	mov    %ecx,%eax
40854b:	5e                   	pop    %esi
40854c:	5d                   	pop    %ebp
40854d:	c3                   	ret
40854e:	6a 0c                	push   $0xc
408550:	68 f8 aa 41 00       	push   $0x41aaf8
408555:	e8 ee 50 00 00       	call   0x40d648
40855a:	33 c0                	xor    %eax,%eax
40855c:	33 f6                	xor    %esi,%esi
40855e:	39 75 08             	cmp    %esi,0x8(%ebp)
408561:	0f 95 c0             	setne  %al
408564:	3b c6                	cmp    %esi,%eax
408566:	75 1d                	jne    0x408585
408568:	e8 8d 0e 00 00       	call   0x4093fa
40856d:	c7 00 16 00 00 00    	movl   $0x16,(%eax)
408573:	56                   	push   %esi
408574:	56                   	push   %esi
408575:	56                   	push   %esi
408576:	56                   	push   %esi
408577:	56                   	push   %esi
408578:	e8 d3 f0 ff ff       	call   0x407650
40857d:	83 c4 14             	add    $0x14,%esp
408580:	83 c8 ff             	or     $0xffffffff,%eax
408583:	eb 3e                	jmp    0x4085c3
408585:	8b 7d 10             	mov    0x10(%ebp),%edi
408588:	3b fe                	cmp    %esi,%edi
40858a:	74 0a                	je     0x408596
40858c:	83 ff 01             	cmp    $0x1,%edi
40858f:	74 05                	je     0x408596
408591:	83 ff 02             	cmp    $0x2,%edi
408594:	75 d2                	jne    0x408568
408596:	ff 75 08             	push   0x8(%ebp)
408599:	e8 67 03 00 00       	call   0x408905
40859e:	59                   	pop    %ecx
40859f:	89 75 fc             	mov    %esi,-0x4(%ebp)
4085a2:	57                   	push   %edi
4085a3:	ff 75 0c             	push   0xc(%ebp)
4085a6:	ff 75 08             	push   0x8(%ebp)
4085a9:	e8 19 ff ff ff       	call   0x4084c7
4085ae:	83 c4 0c             	add    $0xc,%esp
4085b1:	89 45 e4             	mov    %eax,-0x1c(%ebp)
4085b4:	c7 45 fc fe ff ff ff 	movl   $0xfffffffe,-0x4(%ebp)
4085bb:	e8 09 00 00 00       	call   0x4085c9
4085c0:	8b 45 e4             	mov    -0x1c(%ebp),%eax
4085c3:	e8 c5 50 00 00       	call   0x40d68d
4085c8:	c3                   	ret
4085c9:	ff 75 08             	push   0x8(%ebp)
4085cc:	e8 86 03 00 00       	call   0x408957
4085d1:	59                   	pop    %ecx
4085d2:	c3                   	ret
4085d3:	56                   	push   %esi
4085d4:	33 f6                	xor    %esi,%esi
4085d6:	39 74 24 08          	cmp    %esi,0x8(%esp)
4085da:	75 1d                	jne    0x4085f9
4085dc:	e8 19 0e 00 00       	call   0x4093fa
4085e1:	56                   	push   %esi
4085e2:	56                   	push   %esi
4085e3:	56                   	push   %esi
4085e4:	56                   	push   %esi
4085e5:	56                   	push   %esi
4085e6:	c7 00 16 00 00 00    	movl   $0x16,(%eax)
4085ec:	e8 5f f0 ff ff       	call   0x407650
4085f1:	83 c4 14             	add    $0x14,%esp
4085f4:	83 c8 ff             	or     $0xffffffff,%eax
4085f7:	5e                   	pop    %esi
4085f8:	c3                   	ret
4085f9:	8b 44 24 0c          	mov    0xc(%esp),%eax
4085fd:	3b c6                	cmp    %esi,%eax
4085ff:	74 db                	je     0x4085dc
408601:	56                   	push   %esi
408602:	ff 70 04             	push   0x4(%eax)
408605:	ff 30                	push   (%eax)