40e3e4:	33 c0                	xor    %eax,%eax
40e3e6:	5f                   	pop    %edi
40e3e7:	5e                   	pop    %esi
40e3e8:	5b                   	pop    %ebx
40e3e9:	5d                   	pop    %ebp
40e3ea:	c2 04 00             	ret    $0x4
40e3ed:	53                   	push   %ebx
40e3ee:	56                   	push   %esi
40e3ef:	57                   	push   %edi
40e3f0:	8b f1                	mov    %ecx,%esi
40e3f2:	e8 75 fa ff ff       	call   0x40de6c
40e3f7:	33 db                	xor    %ebx,%ebx
40e3f9:	b9 f4 00 00 00       	mov    $0xf4,%ecx
40e3fe:	89 5e 18             	mov    %ebx,0x18(%esi)
40e401:	89 5e 1c             	mov    %ebx,0x1c(%esi)
40e404:	6a 05                	push   $0x5
40e406:	5f                   	pop    %edi
40e407:	89 7e 38             	mov    %edi,0x38(%esi)
40e40a:	89 7e 30             	mov    %edi,0x30(%esi)
40e40d:	89 5e 34             	mov    %ebx,0x34(%esi)
40e410:	e8 c6 76 ff ff       	call   0x405adb
40e415:	85 c0                	test   %eax,%eax
40e417:	74 17                	je     0x40e430
40e419:	8d 48 04             	lea    0x4(%eax),%ecx
40e41c:	89 38                	mov    %edi,(%eax)
40e41e:	8d 41 28             	lea    0x28(%ecx),%eax
40e421:	89 18                	mov    %ebx,(%eax)
40e423:	8d 40 30             	lea    0x30(%eax),%eax
40e426:	89 58 d4             	mov    %ebx,-0x2c(%eax)
40e429:	83 ef 01             	sub    $0x1,%edi
40e42c:	75 f3                	jne    0x40e421
40e42e:	eb 02                	jmp    0x40e432
40e430:	8b cb                	mov    %ebx,%ecx
40e432:	89 4e 2c             	mov    %ecx,0x2c(%esi)
40e435:	8b c6                	mov    %esi,%eax
40e437:	5f                   	pop    %edi
40e438:	89 5e 3c             	mov    %ebx,0x3c(%esi)
40e43b:	5e                   	pop    %esi
40e43c:	5b                   	pop    %ebx
40e43d:	c3                   	ret
40e43e:	55                   	push   %ebp
40e43f:	8b ec                	mov    %esp,%ebp
40e441:	83 ec 18             	sub    $0x18,%esp
40e444:	53                   	push   %ebx
40e445:	56                   	push   %esi
40e446:	8b f1                	mov    %ecx,%esi
40e448:	8b 4d 08             	mov    0x8(%ebp),%ecx
40e44b:	89 75 f4             	mov    %esi,-0xc(%ebp)
40e44e:	57                   	push   %edi
40e44f:	85 d2                	test   %edx,%edx
40e451:	0f 84 55 01 00 00    	je     0x40e5ac
40e457:	8b 7d 0c             	mov    0xc(%ebp),%edi
40e45a:	c7 45 f0 01 00 00 00 	movl   $0x1,-0x10(%ebp)
40e461:	c7 45 e8 02 00 00 00 	movl   $0x2,-0x18(%ebp)
40e468:	0f b7 01             	movzwl (%ecx),%eax
40e46b:	4a                   	dec    %edx
40e46c:	8b d8                	mov    %eax,%ebx
40e46e:	89 55 f8             	mov    %edx,-0x8(%ebp)
40e471:	81 e3 ff 0f 00 00    	and    $0xfff,%ebx
40e477:	66 c1 e8 0c          	shr    $0xc,%ax
40e47b:	89 5d ec             	mov    %ebx,-0x14(%ebp)
40e47e:	0f b7 db             	movzwl %bx,%ebx
40e481:	03 de                	add    %esi,%ebx
40e483:	66 83 f8 03          	cmp    $0x3,%ax
40e487:	75 0a                	jne    0x40e493
40e489:	8b 45 0c             	mov    0xc(%ebp),%eax
40e48c:	01 03                	add    %eax,(%ebx)
40e48e:	e9 09 01 00 00       	jmp    0x40e59c
40e493:	66 3b 45 f0          	cmp    -0x10(%ebp),%ax
40e497:	75 13                	jne    0x40e4ac
40e499:	0f b7 03             	movzwl (%ebx),%eax
40e49c:	c1 e0 10             	shl    $0x10,%eax
40e49f:	03 c7                	add    %edi,%eax
40e4a1:	c1 f8 10             	sar    $0x10,%eax
40e4a4:	66 89 03             	mov    %ax,(%ebx)
40e4a7:	e9 f3 00 00 00       	jmp    0x40e59f
40e4ac:	66 83 f8 04          	cmp    $0x4,%ax
40e4b0:	75 5f                	jne    0x40e511
40e4b2:	8d 71 02             	lea    0x2(%ecx),%esi
40e4b5:	4a                   	dec    %edx
40e4b6:	f6 45 ec 02          	testb  $0x2,-0x14(%ebp)
40e4ba:	8b ce                	mov    %esi,%ecx
40e4bc:	89 4d fc             	mov    %ecx,-0x4(%ebp)
40e4bf:	89 55 f8             	mov    %edx,-0x8(%ebp)
40e4c2:	75 45                	jne    0x40e509
40e4c4:	8b 7d 0c             	mov    0xc(%ebp),%edi
40e4c7:	0f b7 0b             	movzwl (%ebx),%ecx
40e4ca:	0f bf 06             	movswl (%esi),%eax
40e4cd:	c1 e1 10             	shl    $0x10,%ecx
40e4d0:	03 c1                	add    %ecx,%eax
40e4d2:	8d 97 00 80 00 00    	lea    0x8000(%edi),%edx
40e4d8:	03 d0                	add    %eax,%edx
40e4da:	8b c2                	mov    %edx,%eax
40e4dc:	2b d1                	sub    %ecx,%edx
40e4de:	c1 f8 10             	sar    $0x10,%eax
40e4e1:	66 89 03             	mov    %ax,(%ebx)
40e4e4:	8b c7                	mov    %edi,%eax
40e4e6:	c1 e8 10             	shr    $0x10,%eax
40e4e9:	c1 ea 10             	shr    $0x10,%edx
40e4ec:	2b d0                	sub    %eax,%edx
40e4ee:	33 c0                	xor    %eax,%eax
40e4f0:	40                   	inc    %eax
40e4f1:	3b d0                	cmp    %eax,%edx
40e4f3:	74 07                	je     0x40e4fc
40e4f5:	85 d2                	test   %edx,%edx
40e4f7:	74 07                	je     0x40e500
40e4f9:	6a 02                	push   $0x2
40e4fb:	58                   	pop    %eax
40e4fc:	66 09 46 fe          	or     %ax,-0x2(%esi)
40e500:	8b 4d fc             	mov    -0x4(%ebp),%ecx
40e503:	8b 55 f8             	mov    -0x8(%ebp),%edx
40e506:	8b 7d 0c             	mov    0xc(%ebp),%edi
40e509:	8b 75 f4             	mov    -0xc(%ebp),%esi
40e50c:	e9 8e 00 00 00       	jmp    0x40e59f
40e511:	66 3b 45 e8          	cmp    -0x18(%ebp),%ax
40e515:	75 08                	jne    0x40e51f
40e517:	8b 45 0c             	mov    0xc(%ebp),%eax
40e51a:	66 01 03             	add    %ax,(%ebx)
40e51d:	eb 7d                	jmp    0x40e59c
40e51f:	66 85 c0             	test   %ax,%ax
40e522:	74 7b                	je     0x40e59f
40e524:	66 83 f8 06          	cmp    $0x6,%ax
40e528:	74 75                	je     0x40e59f
40e52a:	66 83 f8 07          	cmp    $0x7,%ax
40e52e:	74 6f                	je     0x40e59f
40e530:	66 83 f8 0b          	cmp    $0xb,%ax
40e534:	75 7d                	jne    0x40e5b3
40e536:	6a 02                	push   $0x2
40e538:	58                   	pop    %eax
40e539:	03 c8                	add    %eax,%ecx
40e53b:	0f b7 03             	movzwl (%ebx),%eax
40e53e:	c1 e0 10             	shl    $0x10,%eax
40e541:	89 4d fc             	mov    %ecx,-0x4(%ebp)
40e544:	6a 02                	push   $0x2
40e546:	8d 79 02             	lea    0x2(%ecx),%edi
40e549:	b9 00 00 01 00       	mov    $0x10000,%ecx
40e54e:	f7 e9                	imul   %ecx
40e550:	8b f0                	mov    %eax,%esi
40e552:	8b ca                	mov    %edx,%ecx
40e554:	0f bf 07             	movswl (%edi),%eax
40e557:	99                   	cltd
40e558:	0f a4 c2 10          	shld   $0x10,%eax,%edx
40e55c:	c1 e0 10             	shl    $0x10,%eax
40e55f:	03 f0                	add    %eax,%esi
40e561:	8b 45 fc             	mov    -0x4(%ebp),%eax
40e564:	13 ca                	adc    %edx,%ecx
40e566:	0f b7 00             	movzwl (%eax),%eax
40e569:	99                   	cltd
40e56a:	03 f0                	add    %eax,%esi
40e56c:	b8 00 80 00 00       	mov    $0x8000,%eax
40e571:	13 ca                	adc    %edx,%ecx
40e573:	03 75 0c             	add    0xc(%ebp),%esi
40e576:	8b 55 f8             	mov    -0x8(%ebp),%edx
40e579:	13 4d 10             	adc    0x10(%ebp),%ecx
40e57c:	03 f0                	add    %eax,%esi
40e57e:	83 d1 00             	adc    $0x0,%ecx
40e581:	0f ac ce 10          	shrd   $0x10,%ecx,%esi
40e585:	c1 f9 10             	sar    $0x10,%ecx
40e588:	03 f0                	add    %eax,%esi
40e58a:	83 d1 00             	adc    $0x0,%ecx
40e58d:	0f ac ce 10          	shrd   $0x10,%ecx,%esi
40e591:	8b cf                	mov    %edi,%ecx
40e593:	66 89 33             	mov    %si,(%ebx)
40e596:	5e                   	pop    %esi
40e597:	2b d6                	sub    %esi,%edx
40e599:	8b 75 f4             	mov    -0xc(%ebp),%esi
40e59c:	8b 7d 0c             	mov    0xc(%ebp),%edi
40e59f:	6a 02                	push   $0x2
40e5a1:	58                   	pop    %eax
40e5a2:	03 c8                	add    %eax,%ecx
40e5a4:	85 d2                	test   %edx,%edx
40e5a6:	0f 85 bc fe ff ff    	jne    0x40e468
40e5ac:	8b c1                	mov    %ecx,%eax
40e5ae:	5f                   	pop    %edi
40e5af:	5e                   	pop    %esi
40e5b0:	5b                   	pop    %ebx
40e5b1:	c9                   	leave
40e5b2:	c3                   	ret
40e5b3:	33 c0                	xor    %eax,%eax
40e5b5:	eb f7                	jmp    0x40e5ae
40e5b7:	64 a1 30 00 00 00    	mov    %fs:0x30,%eax
40e5bd:	c3                   	ret
40e5be:	64 a1 30 00 00 00    	mov    %fs:0x30,%eax
40e5c4:	56                   	push   %esi
40e5c5:	57                   	push   %edi
40e5c6:	8b 78 0c             	mov    0xc(%eax),%edi
40e5c9:	83 c7 14             	add    $0x14,%edi
40e5cc:	8b 37                	mov    (%edi),%esi
40e5ce:	eb 0e                	jmp    0x40e5de
40e5d0:	8b 4e 28             	mov    0x28(%esi),%ecx
40e5d3:	e8 a4 00 00 00       	call   0x40e67c
40e5d8:	85 c0                	test   %eax,%eax
40e5da:	74 0b                	je     0x40e5e7
40e5dc:	8b 36                	mov    (%esi),%esi
40e5de:	3b f7                	cmp    %edi,%esi
40e5e0:	75 ee                	jne    0x40e5d0
40e5e2:	33 c0                	xor    %eax,%eax
40e5e4:	5f                   	pop    %edi
40e5e5:	5e                   	pop    %esi
40e5e6:	c3                   	ret
40e5e7:	8b 46 10             	mov    0x10(%esi),%eax
40e5ea:	eb f8                	jmp    0x40e5e4
40e5ec:	55                   	push   %ebp
40e5ed:	8b ec                	mov    %esp,%ebp
40e5ef:	56                   	push   %esi
40e5f0:	57                   	push   %edi
40e5f1:	8b f1                	mov    %ecx,%esi
40e5f3:	e8 6a 00 00 00       	call   0x40e662
40e5f8:	85 c0                	test   %eax,%eax
40e5fa:	74 60                	je     0x40e65c
40e5fc:	0f b7 50 04          	movzwl 0x4(%eax),%edx
40e600:	b9 4c 01 00 00       	mov    $0x14c,%ecx
40e605:	66 3b d1             	cmp    %cx,%dx
40e608:	75 22                	jne    0x40e62c
40e60a:	8b 4d 08             	mov    0x8(%ebp),%ecx
40e60d:	8b 54 c8 78          	mov    0x78(%eax,%ecx,8),%edx
40e611:	85 d2                	test   %edx,%edx
40e613:	74 47                	je     0x40e65c
40e615:	3b 48 74             	cmp    0x74(%eax),%ecx
40e618:	73 42                	jae    0x40e65c
40e61a:	8b 7d 0c             	mov    0xc(%ebp),%edi
40e61d:	85 ff                	test   %edi,%edi
40e61f:	74 06                	je     0x40e627
40e621:	8b 44 c8 7c          	mov    0x7c(%eax,%ecx,8),%eax
40e625:	89 07                	mov    %eax,(%edi)
40e627:	8d 04 32             	lea    (%edx,%esi,1),%eax
40e62a:	eb 32                	jmp    0x40e65e
40e62c:	b9 64 86 00 00       	mov    $0x8664,%ecx
40e631:	66 3b d1             	cmp    %cx,%dx
40e634:	75 26                	jne    0x40e65c
40e636:	8b 4d 08             	mov    0x8(%ebp),%ecx
40e639:	8b 94 c8 88 00 00 00 	mov    0x88(%eax,%ecx,8),%edx
40e640:	85 d2                	test   %edx,%edx
40e642:	74 18                	je     0x40e65c
40e644:	3b 88 84 00 00 00    	cmp    0x84(%eax),%ecx
40e64a:	73 10                	jae    0x40e65c
40e64c:	8b 7d 0c             	mov    0xc(%ebp),%edi
40e64f:	85 ff                	test   %edi,%edi
40e651:	74 d4                	je     0x40e627
40e653:	8b 84 c8 8c 00 00 00 	mov    0x8c(%eax,%ecx,8),%eax
40e65a:	eb c9                	jmp    0x40e625
40e65c:	33 c0                	xor    %eax,%eax
40e65e:	5f                   	pop    %edi
40e65f:	5e                   	pop    %esi
40e660:	5d                   	pop    %ebp
40e661:	c3                   	ret
40e662:	b8 4d 5a 00 00       	mov    $0x5a4d,%eax
40e667:	66 39 01             	cmp    %ax,(%ecx)
40e66a:	75 0d                	jne    0x40e679
40e66c:	8b 41 3c             	mov    0x3c(%ecx),%eax
40e66f:	03 c1                	add    %ecx,%eax
40e671:	81 38 50 45 00 00    	cmpl   $0x4550,(%eax)
40e677:	74 02                	je     0x40e67b
40e679:	33 c0                	xor    %eax,%eax
40e67b:	c3                   	ret
40e67c:	56                   	push   %esi
40e67d:	57                   	push   %edi
40e67e:	33 ff                	xor    %edi,%edi
40e680:	b8 40 43 41 00       	mov    $0x414340,%eax
40e685:	66 39 39             	cmp    %di,(%ecx)
40e688:	74 2c                	je     0x40e6b6
40e68a:	2b c8                	sub    %eax,%ecx
40e68c:	0f b7 10             	movzwl (%eax),%edx
40e68f:	66 85 d2             	test   %dx,%dx
40e692:	74 1d                	je     0x40e6b1
40e694:	0f b7 34 01          	movzwl (%ecx,%eax,1),%esi
40e698:	66 3b d6             	cmp    %si,%dx
40e69b:	77 19                	ja     0x40e6b6
40e69d:	72 12                	jb     0x40e6b1
40e69f:	83 c0 02             	add    $0x2,%eax
40e6a2:	66 39 3c 01          	cmp    %di,(%ecx,%eax,1)
40e6a6:	75 e4                	jne    0x40e68c
40e6a8:	66 39 38             	cmp    %di,(%eax)
40e6ab:	75 09                	jne    0x40e6b6
40e6ad:	33 c0                	xor    %eax,%eax
40e6af:	eb 08                	jmp    0x40e6b9
40e6b1:	33 c0                	xor    %eax,%eax
40e6b3:	40                   	inc    %eax
40e6b4:	eb 03                	jmp    0x40e6b9
40e6b6:	83 c8 ff             	or     $0xffffffff,%eax
40e6b9:	5f                   	pop    %edi
40e6ba:	5e                   	pop    %esi
40e6bb:	c3                   	ret
40e6bc:	80 39 00             	cmpb   $0x0,(%ecx)
40e6bf:	b8 a0 42 41 00       	mov    $0x4142a0,%eax
40e6c4:	53                   	push   %ebx
40e6c5:	74 28                	je     0x40e6ef
40e6c7:	2b c8                	sub    %eax,%ecx
40e6c9:	8a 10                	mov    (%eax),%dl
40e6cb:	84 d2                	test   %dl,%dl
40e6cd:	74 1b                	je     0x40e6ea
40e6cf:	8a 1c 01             	mov    (%ecx,%eax,1),%bl
40e6d2:	3a d3                	cmp    %bl,%dl
40e6d4:	77 19                	ja     0x40e6ef
40e6d6:	3a da                	cmp    %dl,%bl
40e6d8:	77 10                	ja     0x40e6ea
40e6da:	40                   	inc    %eax
40e6db:	80 3c 01 00          	cmpb   $0x0,(%ecx,%eax,1)
40e6df:	75 e8                	jne    0x40e6c9
40e6e1:	80 38 00             	cmpb   $0x0,(%eax)
40e6e4:	75 09                	jne    0x40e6ef
40e6e6:	33 c0                	xor    %eax,%eax
40e6e8:	5b                   	pop    %ebx
40e6e9:	c3                   	ret
40e6ea:	33 c0                	xor    %eax,%eax
40e6ec:	40                   	inc    %eax
40e6ed:	5b                   	pop    %ebx
40e6ee:	c3                   	ret
40e6ef:	83 c8 ff             	or     $0xffffffff,%eax
40e6f2:	5b                   	pop    %ebx
40e6f3:	c3                   	ret
40e6f4:	55                   	push   %ebp
40e6f5:	8b ec                	mov    %esp,%ebp
40e6f7:	51                   	push   %ecx
40e6f8:	53                   	push   %ebx
40e6f9:	56                   	push   %esi
40e6fa:	33 d2                	xor    %edx,%edx
40e6fc:	8b d9                	mov    %ecx,%ebx
40e6fe:	57                   	push   %edi
40e6ff:	89 55 fc             	mov    %edx,-0x4(%ebp)
40e702:	e8 5b ff ff ff       	call   0x40e662
40e707:	8b f8                	mov    %eax,%edi
40e709:	85 ff                	test   %edi,%edi
40e70b:	74 4e                	je     0x40e75b
40e70d:	51                   	push   %ecx
40e70e:	8d 45 fc             	lea    -0x4(%ebp),%eax
40e711:	50                   	push   %eax
40e712:	6a 05                	push   $0x5
40e714:	e8 d3 fe ff ff       	call   0x40e5ec
40e719:	83 c4 0c             	add    $0xc,%esp
40e71c:	85 c0                	test   %eax,%eax
40e71e:	74 33                	je     0x40e753
40e720:	8b 75 fc             	mov    -0x4(%ebp),%esi
40e723:	85 f6                	test   %esi,%esi
40e725:	74 2c                	je     0x40e753
40e727:	8b 50 04             	mov    0x4(%eax),%edx
40e72a:	2b f2                	sub    %edx,%esi
40e72c:	ff 75 0c             	push   0xc(%ebp)
40e72f:	8b 08                	mov    (%eax),%ecx
40e731:	83 c2 f8             	add    $0xfffffff8,%edx
40e734:	ff 75 08             	push   0x8(%ebp)
40e737:	83 c0 08             	add    $0x8,%eax
40e73a:	d1 ea                	shr    $1,%edx
40e73c:	03 cb                	add    %ebx,%ecx
40e73e:	50                   	push   %eax
40e73f:	e8 fa fc ff ff       	call   0x40e43e
40e744:	83 c4 0c             	add    $0xc,%esp
40e747:	85 c0                	test   %eax,%eax
40e749:	74 04                	je     0x40e74f
40e74b:	85 f6                	test   %esi,%esi