40c560:	0f b7 0f             	movzwl (%edi),%ecx
40c563:	84 c0                	test   %al,%al
40c565:	74 12                	je     0x40c579
40c567:	c6 46 3c 01          	movb   $0x1,0x3c(%esi)
40c56b:	d1 e9                	shr    $1,%ecx
40c56d:	eb 0e                	jmp    0x40c57d
40c56f:	6a 06                	push   $0x6
40c571:	c7 46 34 c8 60 42 00 	movl   $0x4260c8,0x34(%esi)
40c578:	59                   	pop    %ecx
40c579:	c6 46 3c 00          	movb   $0x0,0x3c(%esi)
40c57d:	5f                   	pop    %edi
40c57e:	89 4e 38             	mov    %ecx,0x38(%esi)
40c581:	b0 01                	mov    $0x1,%al
40c583:	5e                   	pop    %esi
40c584:	5b                   	pop    %ebx
40c585:	c3                   	ret
40c586:	8b ff                	mov    %edi,%edi
40c588:	55                   	push   %ebp
40c589:	8b ec                	mov    %esp,%ebp
40c58b:	51                   	push   %ecx
40c58c:	51                   	push   %ecx
40c58d:	56                   	push   %esi
40c58e:	8b f1                	mov    %ecx,%esi
40c590:	33 d2                	xor    %edx,%edx
40c592:	42                   	inc    %edx
40c593:	57                   	push   %edi
40c594:	83 4e 20 10          	orl    $0x10,0x20(%esi)
40c598:	8b 46 28             	mov    0x28(%esi),%eax
40c59b:	85 c0                	test   %eax,%eax
40c59d:	79 17                	jns    0x40c5b6
40c59f:	8a 46 31             	mov    0x31(%esi),%al
40c5a2:	3c 61                	cmp    $0x61,%al
40c5a4:	74 08                	je     0x40c5ae
40c5a6:	3c 41                	cmp    $0x41,%al
40c5a8:	74 04                	je     0x40c5ae
40c5aa:	6a 06                	push   $0x6
40c5ac:	eb 02                	jmp    0x40c5b0
40c5ae:	6a 0d                	push   $0xd
40c5b0:	58                   	pop    %eax
40c5b1:	89 46 28             	mov    %eax,0x28(%esi)
40c5b4:	eb 16                	jmp    0x40c5cc
40c5b6:	75 14                	jne    0x40c5cc
40c5b8:	8a 4e 31             	mov    0x31(%esi),%cl
40c5bb:	80 f9 67             	cmp    $0x67,%cl
40c5be:	74 07                	je     0x40c5c7
40c5c0:	33 c0                	xor    %eax,%eax
40c5c2:	80 f9 47             	cmp    $0x47,%cl
40c5c5:	75 05                	jne    0x40c5cc
40c5c7:	89 56 28             	mov    %edx,0x28(%esi)
40c5ca:	8b c2                	mov    %edx,%eax
40c5cc:	05 5d 01 00 00       	add    $0x15d,%eax
40c5d1:	8d 7e 40             	lea    0x40(%esi),%edi
40c5d4:	50                   	push   %eax
40c5d5:	8b cf                	mov    %edi,%ecx
40c5d7:	e8 28 f4 ff ff       	call   0x40ba04
40c5dc:	84 c0                	test   %al,%al
40c5de:	75 0f                	jne    0x40c5ef
40c5e0:	8b cf                	mov    %edi,%ecx
40c5e2:	e8 05 f4 ff ff       	call   0x40b9ec
40c5e7:	2d 5d 01 00 00       	sub    $0x15d,%eax
40c5ec:	89 46 28             	mov    %eax,0x28(%esi)
40c5ef:	8b 87 04 04 00 00    	mov    0x404(%edi),%eax
40c5f5:	85 c0                	test   %eax,%eax
40c5f7:	75 02                	jne    0x40c5fb
40c5f9:	8b c7                	mov    %edi,%eax
40c5fb:	89 46 34             	mov    %eax,0x34(%esi)
40c5fe:	83 46 14 08          	addl   $0x8,0x14(%esi)
40c602:	8b 4e 14             	mov    0x14(%esi),%ecx
40c605:	53                   	push   %ebx
40c606:	8b 41 f8             	mov    -0x8(%ecx),%eax
40c609:	89 45 f8             	mov    %eax,-0x8(%ebp)
40c60c:	8b 41 fc             	mov    -0x4(%ecx),%eax
40c60f:	8b cf                	mov    %edi,%ecx
40c611:	89 45 fc             	mov    %eax,-0x4(%ebp)
40c614:	e8 d3 f3 ff ff       	call   0x40b9ec
40c619:	8b 9f 04 04 00 00    	mov    0x404(%edi),%ebx
40c61f:	8b c8                	mov    %eax,%ecx
40c621:	85 db                	test   %ebx,%ebx
40c623:	75 02                	jne    0x40c627
40c625:	8b df                	mov    %edi,%ebx
40c627:	0f be 46 31          	movsbl 0x31(%esi),%eax
40c62b:	6a 01                	push   $0x1
40c62d:	ff 76 08             	push   0x8(%esi)
40c630:	ff 76 04             	push   0x4(%esi)
40c633:	ff 36                	push   (%esi)
40c635:	ff 76 28             	push   0x28(%esi)
40c638:	50                   	push   %eax
40c639:	51                   	push   %ecx
40c63a:	8b cf                	mov    %edi,%ecx
40c63c:	e8 71 f4 ff ff       	call   0x40bab2
40c641:	50                   	push   %eax
40c642:	8b cf                	mov    %edi,%ecx
40c644:	e8 a3 f3 ff ff       	call   0x40b9ec
40c649:	50                   	push   %eax
40c64a:	8d 45 f8             	lea    -0x8(%ebp),%eax
40c64d:	53                   	push   %ebx
40c64e:	50                   	push   %eax
40c64f:	e8 de 87 00 00       	call   0x414e32
40c654:	8b 46 20             	mov    0x20(%esi),%eax
40c657:	83 c4 2c             	add    $0x2c,%esp
40c65a:	c1 e8 05             	shr    $0x5,%eax
40c65d:	5b                   	pop    %ebx
40c65e:	a8 01                	test   $0x1,%al
40c660:	74 13                	je     0x40c675
40c662:	83 7e 28 00          	cmpl   $0x0,0x28(%esi)
40c666:	75 0d                	jne    0x40c675
40c668:	ff 76 08             	push   0x8(%esi)
40c66b:	ff 76 34             	push   0x34(%esi)
40c66e:	e8 9d f7 ff ff       	call   0x40be10
40c673:	59                   	pop    %ecx
40c674:	59                   	pop    %ecx
40c675:	8a 46 31             	mov    0x31(%esi),%al
40c678:	3c 67                	cmp    $0x67,%al
40c67a:	74 04                	je     0x40c680
40c67c:	3c 47                	cmp    $0x47,%al
40c67e:	75 17                	jne    0x40c697
40c680:	8b 46 20             	mov    0x20(%esi),%eax
40c683:	c1 e8 05             	shr    $0x5,%eax
40c686:	a8 01                	test   $0x1,%al
40c688:	75 0d                	jne    0x40c697
40c68a:	ff 76 08             	push   0x8(%esi)
40c68d:	ff 76 34             	push   0x34(%esi)
40c690:	e8 bb f6 ff ff       	call   0x40bd50
40c695:	59                   	pop    %ecx
40c696:	59                   	pop    %ecx
40c697:	8b 56 34             	mov    0x34(%esi),%edx
40c69a:	8a 02                	mov    (%edx),%al
40c69c:	3c 2d                	cmp    $0x2d,%al
40c69e:	75 0a                	jne    0x40c6aa
40c6a0:	83 4e 20 40          	orl    $0x40,0x20(%esi)
40c6a4:	42                   	inc    %edx
40c6a5:	89 56 34             	mov    %edx,0x34(%esi)
40c6a8:	8a 02                	mov    (%edx),%al
40c6aa:	3c 69                	cmp    $0x69,%al
40c6ac:	74 0c                	je     0x40c6ba
40c6ae:	3c 49                	cmp    $0x49,%al
40c6b0:	74 08                	je     0x40c6ba
40c6b2:	3c 6e                	cmp    $0x6e,%al
40c6b4:	74 04                	je     0x40c6ba
40c6b6:	3c 4e                	cmp    $0x4e,%al
40c6b8:	75 08                	jne    0x40c6c2
40c6ba:	83 66 20 f7          	andl   $0xfffffff7,0x20(%esi)
40c6be:	c6 46 31 73          	movb   $0x73,0x31(%esi)
40c6c2:	8d 7a 01             	lea    0x1(%edx),%edi
40c6c5:	8a 0a                	mov    (%edx),%cl
40c6c7:	42                   	inc    %edx
40c6c8:	84 c9                	test   %cl,%cl
40c6ca:	75 f9                	jne    0x40c6c5
40c6cc:	2b d7                	sub    %edi,%edx
40c6ce:	b0 01                	mov    $0x1,%al
40c6d0:	5f                   	pop    %edi
40c6d1:	89 56 38             	mov    %edx,0x38(%esi)
40c6d4:	5e                   	pop    %esi
40c6d5:	c9                   	leave
40c6d6:	c3                   	ret
40c6d7:	8b ff                	mov    %edi,%edi
40c6d9:	56                   	push   %esi
40c6da:	8b f1                	mov    %ecx,%esi
40c6dc:	57                   	push   %edi
40c6dd:	ff 76 2c             	push   0x2c(%esi)
40c6e0:	0f b6 46 31          	movzbl 0x31(%esi),%eax
40c6e4:	8d 7e 40             	lea    0x40(%esi),%edi
40c6e7:	50                   	push   %eax
40c6e8:	ff 76 04             	push   0x4(%esi)
40c6eb:	ff 36                	push   (%esi)
40c6ed:	e8 8f f3 ff ff       	call   0x40ba81
40c6f2:	83 c4 10             	add    $0x10,%esp
40c6f5:	84 c0                	test   %al,%al
40c6f7:	74 3c                	je     0x40c735
40c6f9:	83 46 14 04          	addl   $0x4,0x14(%esi)
40c6fd:	8b 46 14             	mov    0x14(%esi),%eax
40c700:	53                   	push   %ebx
40c701:	8b 9f 04 04 00 00    	mov    0x404(%edi),%ebx
40c707:	0f b7 40 fc          	movzwl -0x4(%eax),%eax
40c70b:	85 db                	test   %ebx,%ebx
40c70d:	75 02                	jne    0x40c711
40c70f:	8b df                	mov    %edi,%ebx
40c711:	ff 76 08             	push   0x8(%esi)
40c714:	8b cf                	mov    %edi,%ecx
40c716:	50                   	push   %eax
40c717:	e8 d0 f2 ff ff       	call   0x40b9ec
40c71c:	50                   	push   %eax
40c71d:	8d 46 38             	lea    0x38(%esi),%eax
40c720:	53                   	push   %ebx
40c721:	50                   	push   %eax
40c722:	e8 13 76 00 00       	call   0x413d3a
40c727:	83 c4 14             	add    $0x14,%esp
40c72a:	5b                   	pop    %ebx
40c72b:	85 c0                	test   %eax,%eax
40c72d:	74 25                	je     0x40c754
40c72f:	c6 46 30 01          	movb   $0x1,0x30(%esi)
40c733:	eb 1f                	jmp    0x40c754
40c735:	8b 8f 04 04 00 00    	mov    0x404(%edi),%ecx
40c73b:	85 c9                	test   %ecx,%ecx
40c73d:	75 02                	jne    0x40c741
40c73f:	8b cf                	mov    %edi,%ecx
40c741:	83 46 14 04          	addl   $0x4,0x14(%esi)
40c745:	8b 46 14             	mov    0x14(%esi),%eax
40c748:	8a 40 fc             	mov    -0x4(%eax),%al
40c74b:	88 01                	mov    %al,(%ecx)
40c74d:	c7 46 38 01 00 00 00 	movl   $0x1,0x38(%esi)
40c754:	8b 87 04 04 00 00    	mov    0x404(%edi),%eax
40c75a:	85 c0                	test   %eax,%eax
40c75c:	74 02                	je     0x40c760
40c75e:	8b f8                	mov    %eax,%edi
40c760:	89 7e 34             	mov    %edi,0x34(%esi)
40c763:	b0 01                	mov    $0x1,%al
40c765:	5f                   	pop    %edi
40c766:	5e                   	pop    %esi
40c767:	c2 04 00             	ret    $0x4
40c76a:	8b ff                	mov    %edi,%edi
40c76c:	55                   	push   %ebp
40c76d:	8b ec                	mov    %esp,%ebp
40c76f:	51                   	push   %ecx
40c770:	53                   	push   %ebx
40c771:	56                   	push   %esi
40c772:	8b f1                	mov    %ecx,%esi
40c774:	57                   	push   %edi
40c775:	ff 76 2c             	push   0x2c(%esi)
40c778:	e8 53 fd ff ff       	call   0x40c4d0
40c77d:	59                   	pop    %ecx
40c77e:	8b c8                	mov    %eax,%ecx
40c780:	89 45 fc             	mov    %eax,-0x4(%ebp)
40c783:	83 e9 01             	sub    $0x1,%ecx
40c786:	74 78                	je     0x40c800
40c788:	83 e9 01             	sub    $0x1,%ecx
40c78b:	74 56                	je     0x40c7e3
40c78d:	49                   	dec    %ecx
40c78e:	83 e9 01             	sub    $0x1,%ecx
40c791:	74 33                	je     0x40c7c6
40c793:	83 e9 04             	sub    $0x4,%ecx
40c796:	74 17                	je     0x40c7af
40c798:	e8 5e 26 00 00       	call   0x40edfb
40c79d:	c7 00 16 00 00 00    	movl   $0x16,(%eax)
40c7a3:	e8 d9 08 00 00       	call   0x40d081
40c7a8:	32 c0                	xor    %al,%al
40c7aa:	e9 05 01 00 00       	jmp    0x40c8b4
40c7af:	8b 46 20             	mov    0x20(%esi),%eax
40c7b2:	83 46 14 08          	addl   $0x8,0x14(%esi)
40c7b6:	c1 e8 04             	shr    $0x4,%eax
40c7b9:	a8 01                	test   $0x1,%al
40c7bb:	8b 46 14             	mov    0x14(%esi),%eax
40c7be:	8b 78 f8             	mov    -0x8(%eax),%edi
40c7c1:	8b 58 fc             	mov    -0x4(%eax),%ebx
40c7c4:	eb 5a                	jmp    0x40c820
40c7c6:	8b 46 20             	mov    0x20(%esi),%eax
40c7c9:	83 46 14 04          	addl   $0x4,0x14(%esi)
40c7cd:	c1 e8 04             	shr    $0x4,%eax
40c7d0:	a8 01                	test   $0x1,%al
40c7d2:	8b 46 14             	mov    0x14(%esi),%eax
40c7d5:	74 05                	je     0x40c7dc
40c7d7:	8b 40 fc             	mov    -0x4(%eax),%eax
40c7da:	eb 3f                	jmp    0x40c81b
40c7dc:	8b 78 fc             	mov    -0x4(%eax),%edi
40c7df:	33 db                	xor    %ebx,%ebx
40c7e1:	eb 3d                	jmp    0x40c820
40c7e3:	8b 46 20             	mov    0x20(%esi),%eax
40c7e6:	83 46 14 04          	addl   $0x4,0x14(%esi)
40c7ea:	c1 e8 04             	shr    $0x4,%eax
40c7ed:	a8 01                	test   $0x1,%al
40c7ef:	8b 46 14             	mov    0x14(%esi),%eax
40c7f2:	74 06                	je     0x40c7fa
40c7f4:	0f bf 40 fc          	movswl -0x4(%eax),%eax
40c7f8:	eb 21                	jmp    0x40c81b
40c7fa:	0f b7 40 fc          	movzwl -0x4(%eax),%eax
40c7fe:	eb 1b                	jmp    0x40c81b
40c800:	8b 46 20             	mov    0x20(%esi),%eax
40c803:	83 46 14 04          	addl   $0x4,0x14(%esi)
40c807:	c1 e8 04             	shr    $0x4,%eax
40c80a:	a8 01                	test   $0x1,%al
40c80c:	8b 46 14             	mov    0x14(%esi),%eax
40c80f:	74 06                	je     0x40c817
40c811:	0f be 40 fc          	movsbl -0x4(%eax),%eax
40c815:	eb 04                	jmp    0x40c81b
40c817:	0f b6 40 fc          	movzbl -0x4(%eax),%eax
40c81b:	99                   	cltd
40c81c:	8b f8                	mov    %eax,%edi
40c81e:	8b da                	mov    %edx,%ebx
40c820:	8b 4e 20             	mov    0x20(%esi),%ecx
40c823:	8b c1                	mov    %ecx,%eax
40c825:	c1 e8 04             	shr    $0x4,%eax
40c828:	a8 01                	test   $0x1,%al
40c82a:	74 17                	je     0x40c843
40c82c:	85 db                	test   %ebx,%ebx
40c82e:	7f 13                	jg     0x40c843
40c830:	7c 04                	jl     0x40c836
40c832:	85 ff                	test   %edi,%edi
40c834:	73 0d                	jae    0x40c843
40c836:	f7 df                	neg    %edi
40c838:	83 d3 00             	adc    $0x0,%ebx
40c83b:	f7 db                	neg    %ebx
40c83d:	83 c9 40             	or     $0x40,%ecx
40c840:	89 4e 20             	mov    %ecx,0x20(%esi)
40c843:	83 7e 28 00          	cmpl   $0x0,0x28(%esi)
40c847:	7d 09                	jge    0x40c852
40c849:	c7 46 28 01 00 00 00 	movl   $0x1,0x28(%esi)
40c850:	eb 11                	jmp    0x40c863
40c852:	ff 76 28             	push   0x28(%esi)
40c855:	83 e1 f7             	and    $0xfffffff7,%ecx
40c858:	89 4e 20             	mov    %ecx,0x20(%esi)
40c85b:	8d 4e 40             	lea    0x40(%esi),%ecx
40c85e:	e8 a1 f1 ff ff       	call   0x40ba04
40c863:	8b c7                	mov    %edi,%eax
40c865:	0b c3                	or     %ebx,%eax
40c867:	75 04                	jne    0x40c86d
40c869:	83 66 20 df          	andl   $0xffffffdf,0x20(%esi)
40c86d:	83 7d fc 08          	cmpl   $0x8,-0x4(%ebp)
40c871:	8b ce                	mov    %esi,%ecx
40c873:	ff 75 0c             	push   0xc(%ebp)
40c876:	c6 46 3c 00          	movb   $0x0,0x3c(%esi)
40c87a:	ff 75 08             	push   0x8(%ebp)
40c87d:	75 09                	jne    0x40c888
40c87f:	53                   	push   %ebx
40c880:	57                   	push   %edi
40c881:	e8 bd f2 ff ff       	call   0x40bb43
40c886:	eb 06                	jmp    0x40c88e
40c888:	57                   	push   %edi
40c889:	e8 42 f2 ff ff       	call   0x40bad0
40c88e:	8b 46 20             	mov    0x20(%esi),%eax
40c891:	c1 e8 07             	shr    $0x7,%eax
40c894:	a8 01                	test   $0x1,%al
40c896:	74 1a                	je     0x40c8b2
40c898:	83 7e 38 00          	cmpl   $0x0,0x38(%esi)
40c89c:	74 08                	je     0x40c8a6
40c89e:	8b 46 34             	mov    0x34(%esi),%eax
40c8a1:	80 38 30             	cmpb   $0x30,(%eax)
40c8a4:	74 0c                	je     0x40c8b2
40c8a6:	ff 4e 34             	decl   0x34(%esi)
40c8a9:	8b 4e 34             	mov    0x34(%esi),%ecx
40c8ac:	c6 01 30             	movb   $0x30,(%ecx)
40c8af:	ff 46 38             	incl   0x38(%esi)
40c8b2:	b0 01                	mov    $0x1,%al
40c8b4:	5f                   	pop    %edi
40c8b5:	5e                   	pop    %esi
40c8b6:	5b                   	pop    %ebx
40c8b7:	c9                   	leave
40c8b8:	c2 08 00             	ret    $0x8
40c8bb:	8b ff                	mov    %edi,%edi
40c8bd:	56                   	push   %esi
40c8be:	8b f1                	mov    %ecx,%esi
40c8c0:	57                   	push   %edi
40c8c1:	83 46 14 04          	addl   $0x4,0x14(%esi)
40c8c5:	8b 46 14             	mov    0x14(%esi),%eax
40c8c8:	8b 78 fc             	mov    -0x4(%eax),%edi
40c8cb:	e8 e5 86 00 00       	call   0x414fb5
40c8d0:	85 c0                	test   %eax,%eax
40c8d2:	75 14                	jne    0x40c8e8
40c8d4:	e8 22 25 00 00       	call   0x40edfb
40c8d9:	c7 00 16 00 00 00    	movl   $0x16,(%eax)
40c8df:	e8 9d 07 00 00       	call   0x40d081