40a647:	ff 45 f6             	incl   -0xa(%ebp)
40a64a:	eb 03                	jmp    0x40a64f
40a64c:	ff 45 f2             	incl   -0xe(%ebp)
40a64f:	b8 ff 7f 00 00       	mov    $0x7fff,%eax
40a654:	66 3b f0             	cmp    %ax,%si
40a657:	72 23                	jb     0x40a67c
40a659:	33 c0                	xor    %eax,%eax
40a65b:	33 c9                	xor    %ecx,%ecx
40a65d:	66 39 45 a4          	cmp    %ax,-0x5c(%ebp)
40a661:	89 45 e4             	mov    %eax,-0x1c(%ebp)
40a664:	0f 94 c1             	sete   %cl
40a667:	89 45 e0             	mov    %eax,-0x20(%ebp)
40a66a:	49                   	dec    %ecx
40a66b:	81 e1 00 00 00 80    	and    $0x80000000,%ecx
40a671:	81 c1 00 80 ff 7f    	add    $0x7fff8000,%ecx
40a677:	89 4d e8             	mov    %ecx,-0x18(%ebp)
40a67a:	eb 3b                	jmp    0x40a6b7
40a67c:	66 8b 45 f2          	mov    -0xe(%ebp),%ax
40a680:	0b 75 a4             	or     -0x5c(%ebp),%esi
40a683:	66 89 45 e0          	mov    %ax,-0x20(%ebp)
40a687:	8b 45 f4             	mov    -0xc(%ebp),%eax
40a68a:	89 45 e2             	mov    %eax,-0x1e(%ebp)
40a68d:	8b 45 f8             	mov    -0x8(%ebp),%eax
40a690:	89 45 e6             	mov    %eax,-0x1a(%ebp)
40a693:	66 89 75 ea          	mov    %si,-0x16(%ebp)
40a697:	eb 1e                	jmp    0x40a6b7
40a699:	33 c0                	xor    %eax,%eax
40a69b:	66 85 db             	test   %bx,%bx
40a69e:	0f 94 c0             	sete   %al
40a6a1:	83 65 e4 00          	andl   $0x0,-0x1c(%ebp)
40a6a5:	48                   	dec    %eax
40a6a6:	25 00 00 00 80       	and    $0x80000000,%eax
40a6ab:	05 00 80 ff 7f       	add    $0x7fff8000,%eax
40a6b0:	83 65 e0 00          	andl   $0x0,-0x20(%ebp)
40a6b4:	89 45 e8             	mov    %eax,-0x18(%ebp)
40a6b7:	f6 45 18 01          	testb  $0x1,0x18(%ebp)
40a6bb:	8b 55 a0             	mov    -0x60(%ebp),%edx
40a6be:	8b 45 b4             	mov    -0x4c(%ebp),%eax
40a6c1:	8b 7d 14             	mov    0x14(%ebp),%edi
40a6c4:	66 89 02             	mov    %ax,(%edx)
40a6c7:	74 32                	je     0x40a6fb
40a6c9:	98                   	cwtl
40a6ca:	03 f8                	add    %eax,%edi
40a6cc:	85 ff                	test   %edi,%edi
40a6ce:	7f 2b                	jg     0x40a6fb
40a6d0:	33 c0                	xor    %eax,%eax
40a6d2:	66 89 02             	mov    %ax,(%edx)
40a6d5:	b8 00 80 00 00       	mov    $0x8000,%eax
40a6da:	66 39 45 90          	cmp    %ax,-0x70(%ebp)
40a6de:	c6 42 03 01          	movb   $0x1,0x3(%edx)
40a6e2:	0f 95 c0             	setne  %al
40a6e5:	fe c8                	dec    %al
40a6e7:	24 0d                	and    $0xd,%al
40a6e9:	04 20                	add    $0x20,%al
40a6eb:	88 42 02             	mov    %al,0x2(%edx)
40a6ee:	c6 42 04 30          	movb   $0x30,0x4(%edx)
40a6f2:	c6 42 05 00          	movb   $0x0,0x5(%edx)
40a6f6:	e9 5e f9 ff ff       	jmp    0x40a059
40a6fb:	83 ff 15             	cmp    $0x15,%edi
40a6fe:	7e 03                	jle    0x40a703
40a700:	6a 15                	push   $0x15
40a702:	5f                   	pop    %edi
40a703:	8b 75 e8             	mov    -0x18(%ebp),%esi
40a706:	c1 ee 10             	shr    $0x10,%esi
40a709:	81 ee fe 3f 00 00    	sub    $0x3ffe,%esi
40a70f:	33 c0                	xor    %eax,%eax
40a711:	66 89 45 ea          	mov    %ax,-0x16(%ebp)
40a715:	c7 45 bc 08 00 00 00 	movl   $0x8,-0x44(%ebp)
40a71c:	8b 45 e0             	mov    -0x20(%ebp),%eax
40a71f:	8b 5d e4             	mov    -0x1c(%ebp),%ebx
40a722:	8b 4d e4             	mov    -0x1c(%ebp),%ecx
40a725:	d1 65 e0             	shll   $1,-0x20(%ebp)
40a728:	c1 e8 1f             	shr    $0x1f,%eax
40a72b:	03 db                	add    %ebx,%ebx
40a72d:	0b d8                	or     %eax,%ebx
40a72f:	8b 45 e8             	mov    -0x18(%ebp),%eax
40a732:	c1 e9 1f             	shr    $0x1f,%ecx
40a735:	03 c0                	add    %eax,%eax
40a737:	0b c1                	or     %ecx,%eax
40a739:	ff 4d bc             	decl   -0x44(%ebp)
40a73c:	89 5d e4             	mov    %ebx,-0x1c(%ebp)
40a73f:	89 45 e8             	mov    %eax,-0x18(%ebp)
40a742:	75 d8                	jne    0x40a71c
40a744:	85 f6                	test   %esi,%esi
40a746:	7d 32                	jge    0x40a77a
40a748:	f7 de                	neg    %esi
40a74a:	81 e6 ff 00 00 00    	and    $0xff,%esi
40a750:	7e 28                	jle    0x40a77a
40a752:	8b 45 e8             	mov    -0x18(%ebp),%eax
40a755:	8b 5d e4             	mov    -0x1c(%ebp),%ebx
40a758:	8b 4d e4             	mov    -0x1c(%ebp),%ecx
40a75b:	d1 6d e8             	shrl   $1,-0x18(%ebp)
40a75e:	c1 e0 1f             	shl    $0x1f,%eax
40a761:	d1 eb                	shr    $1,%ebx
40a763:	0b d8                	or     %eax,%ebx
40a765:	8b 45 e0             	mov    -0x20(%ebp),%eax
40a768:	c1 e1 1f             	shl    $0x1f,%ecx
40a76b:	d1 e8                	shr    $1,%eax
40a76d:	0b c1                	or     %ecx,%eax
40a76f:	4e                   	dec    %esi
40a770:	89 5d e4             	mov    %ebx,-0x1c(%ebp)
40a773:	89 45 e0             	mov    %eax,-0x20(%ebp)
40a776:	85 f6                	test   %esi,%esi
40a778:	7f d8                	jg     0x40a752
40a77a:	8d 47 01             	lea    0x1(%edi),%eax
40a77d:	8d 5a 04             	lea    0x4(%edx),%ebx
40a780:	89 5d c0             	mov    %ebx,-0x40(%ebp)
40a783:	89 45 b4             	mov    %eax,-0x4c(%ebp)
40a786:	85 c0                	test   %eax,%eax
40a788:	0f 8e b5 00 00 00    	jle    0x40a843
40a78e:	8b 55 e0             	mov    -0x20(%ebp),%edx
40a791:	8b 45 e4             	mov    -0x1c(%ebp),%eax
40a794:	8d 75 e0             	lea    -0x20(%ebp),%esi
40a797:	8d 7d c4             	lea    -0x3c(%ebp),%edi
40a79a:	a5                   	movsl  %ds:(%esi),%es:(%edi)
40a79b:	a5                   	movsl  %ds:(%esi),%es:(%edi)
40a79c:	a5                   	movsl  %ds:(%esi),%es:(%edi)
40a79d:	d1 65 e0             	shll   $1,-0x20(%ebp)
40a7a0:	8b 7d e0             	mov    -0x20(%ebp),%edi
40a7a3:	d1 65 e0             	shll   $1,-0x20(%ebp)
40a7a6:	c1 ea 1f             	shr    $0x1f,%edx
40a7a9:	8d 0c 00             	lea    (%eax,%eax,1),%ecx
40a7ac:	0b ca                	or     %edx,%ecx
40a7ae:	8b 55 e8             	mov    -0x18(%ebp),%edx
40a7b1:	8b f0                	mov    %eax,%esi
40a7b3:	c1 ee 1f             	shr    $0x1f,%esi
40a7b6:	03 d2                	add    %edx,%edx
40a7b8:	0b d6                	or     %esi,%edx
40a7ba:	8b c1                	mov    %ecx,%eax
40a7bc:	8d 34 09             	lea    (%ecx,%ecx,1),%esi
40a7bf:	c1 e8 1f             	shr    $0x1f,%eax
40a7c2:	8d 0c 12             	lea    (%edx,%edx,1),%ecx
40a7c5:	8b 55 c4             	mov    -0x3c(%ebp),%edx
40a7c8:	c1 ef 1f             	shr    $0x1f,%edi
40a7cb:	0b c8                	or     %eax,%ecx
40a7cd:	8b 45 e0             	mov    -0x20(%ebp),%eax
40a7d0:	0b f7                	or     %edi,%esi
40a7d2:	8d 3c 02             	lea    (%edx,%eax,1),%edi
40a7d5:	3b f8                	cmp    %eax,%edi
40a7d7:	72 04                	jb     0x40a7dd
40a7d9:	3b fa                	cmp    %edx,%edi
40a7db:	73 18                	jae    0x40a7f5
40a7dd:	8d 46 01             	lea    0x1(%esi),%eax
40a7e0:	33 d2                	xor    %edx,%edx
40a7e2:	3b c6                	cmp    %esi,%eax
40a7e4:	72 05                	jb     0x40a7eb
40a7e6:	83 f8 01             	cmp    $0x1,%eax
40a7e9:	73 03                	jae    0x40a7ee
40a7eb:	33 d2                	xor    %edx,%edx
40a7ed:	42                   	inc    %edx
40a7ee:	8b f0                	mov    %eax,%esi
40a7f0:	85 d2                	test   %edx,%edx
40a7f2:	74 01                	je     0x40a7f5
40a7f4:	41                   	inc    %ecx
40a7f5:	8b 45 c8             	mov    -0x38(%ebp),%eax
40a7f8:	8d 14 30             	lea    (%eax,%esi,1),%edx
40a7fb:	89 55 bc             	mov    %edx,-0x44(%ebp)
40a7fe:	3b d6                	cmp    %esi,%edx
40a800:	72 04                	jb     0x40a806
40a802:	3b d0                	cmp    %eax,%edx
40a804:	73 01                	jae    0x40a807
40a806:	41                   	inc    %ecx
40a807:	03 4d cc             	add    -0x34(%ebp),%ecx
40a80a:	c1 ea 1f             	shr    $0x1f,%edx
40a80d:	03 c9                	add    %ecx,%ecx
40a80f:	0b ca                	or     %edx,%ecx
40a811:	8d 34 3f             	lea    (%edi,%edi,1),%esi
40a814:	89 75 e0             	mov    %esi,-0x20(%ebp)
40a817:	8b 75 bc             	mov    -0x44(%ebp),%esi
40a81a:	89 4d e8             	mov    %ecx,-0x18(%ebp)
40a81d:	c1 e9 18             	shr    $0x18,%ecx
40a820:	03 f6                	add    %esi,%esi
40a822:	80 c1 30             	add    $0x30,%cl
40a825:	8b c7                	mov    %edi,%eax
40a827:	c1 e8 1f             	shr    $0x1f,%eax
40a82a:	0b f0                	or     %eax,%esi
40a82c:	88 0b                	mov    %cl,(%ebx)
40a82e:	43                   	inc    %ebx
40a82f:	ff 4d b4             	decl   -0x4c(%ebp)
40a832:	83 7d b4 00          	cmpl   $0x0,-0x4c(%ebp)
40a836:	89 75 e4             	mov    %esi,-0x1c(%ebp)
40a839:	c6 45 eb 00          	movb   $0x0,-0x15(%ebp)
40a83d:	0f 8f 4b ff ff ff    	jg     0x40a78e
40a843:	4b                   	dec    %ebx
40a844:	8a 03                	mov    (%ebx),%al
40a846:	4b                   	dec    %ebx
40a847:	3c 35                	cmp    $0x35,%al
40a849:	7d 0e                	jge    0x40a859
40a84b:	8b 4d c0             	mov    -0x40(%ebp),%ecx
40a84e:	eb 44                	jmp    0x40a894
40a850:	80 3b 39             	cmpb   $0x39,(%ebx)
40a853:	75 09                	jne    0x40a85e
40a855:	c6 03 30             	movb   $0x30,(%ebx)
40a858:	4b                   	dec    %ebx
40a859:	3b 5d c0             	cmp    -0x40(%ebp),%ebx
40a85c:	73 f2                	jae    0x40a850
40a85e:	8b 45 a0             	mov    -0x60(%ebp),%eax
40a861:	3b 5d c0             	cmp    -0x40(%ebp),%ebx
40a864:	73 04                	jae    0x40a86a
40a866:	43                   	inc    %ebx
40a867:	66 ff 00             	incw   (%eax)
40a86a:	fe 03                	incb   (%ebx)
40a86c:	2a d8                	sub    %al,%bl
40a86e:	80 eb 03             	sub    $0x3,%bl
40a871:	0f be cb             	movsbl %bl,%ecx
40a874:	88 58 03             	mov    %bl,0x3(%eax)
40a877:	c6 44 01 04 00       	movb   $0x0,0x4(%ecx,%eax,1)
40a87c:	8b 45 8c             	mov    -0x74(%ebp),%eax
40a87f:	8b 4d fc             	mov    -0x4(%ebp),%ecx
40a882:	5f                   	pop    %edi
40a883:	5e                   	pop    %esi
40a884:	33 cd                	xor    %ebp,%ecx
40a886:	5b                   	pop    %ebx
40a887:	e8 74 67 ff ff       	call   0x401000
40a88c:	c9                   	leave
40a88d:	c3                   	ret
40a88e:	80 3b 30             	cmpb   $0x30,(%ebx)
40a891:	75 05                	jne    0x40a898
40a893:	4b                   	dec    %ebx
40a894:	3b d9                	cmp    %ecx,%ebx
40a896:	73 f6                	jae    0x40a88e
40a898:	8b 45 a0             	mov    -0x60(%ebp),%eax
40a89b:	3b d9                	cmp    %ecx,%ebx
40a89d:	73 cd                	jae    0x40a86c
40a89f:	33 d2                	xor    %edx,%edx
40a8a1:	66 89 10             	mov    %dx,(%eax)
40a8a4:	ba 00 80 00 00       	mov    $0x8000,%edx
40a8a9:	66 39 55 90          	cmp    %dx,-0x70(%ebp)
40a8ad:	c6 40 03 01          	movb   $0x1,0x3(%eax)
40a8b1:	0f 95 c2             	setne  %dl
40a8b4:	fe ca                	dec    %dl
40a8b6:	80 e2 0d             	and    $0xd,%dl
40a8b9:	80 c2 20             	add    $0x20,%dl
40a8bc:	88 50 02             	mov    %dl,0x2(%eax)
40a8bf:	c6 01 30             	movb   $0x30,(%ecx)
40a8c2:	c6 40 05 00          	movb   $0x0,0x5(%eax)
40a8c6:	e9 8e f7 ff ff       	jmp    0x40a059
40a8cb:	33 c0                	xor    %eax,%eax
40a8cd:	f6 c3 10             	test   $0x10,%bl
40a8d0:	74 01                	je     0x40a8d3
40a8d2:	40                   	inc    %eax
40a8d3:	f6 c3 08             	test   $0x8,%bl
40a8d6:	74 03                	je     0x40a8db
40a8d8:	83 c8 04             	or     $0x4,%eax
40a8db:	f6 c3 04             	test   $0x4,%bl
40a8de:	74 03                	je     0x40a8e3
40a8e0:	83 c8 08             	or     $0x8,%eax
40a8e3:	f6 c3 02             	test   $0x2,%bl
40a8e6:	74 03                	je     0x40a8eb
40a8e8:	83 c8 10             	or     $0x10,%eax
40a8eb:	f6 c3 01             	test   $0x1,%bl
40a8ee:	74 03                	je     0x40a8f3
40a8f0:	83 c8 20             	or     $0x20,%eax
40a8f3:	f7 c3 00 00 08 00    	test   $0x80000,%ebx
40a8f9:	74 03                	je     0x40a8fe
40a8fb:	83 c8 02             	or     $0x2,%eax
40a8fe:	8b cb                	mov    %ebx,%ecx
40a900:	ba 00 03 00 00       	mov    $0x300,%edx
40a905:	23 ca                	and    %edx,%ecx
40a907:	56                   	push   %esi
40a908:	be 00 02 00 00       	mov    $0x200,%esi
40a90d:	74 23                	je     0x40a932
40a90f:	81 f9 00 01 00 00    	cmp    $0x100,%ecx
40a915:	74 16                	je     0x40a92d
40a917:	3b ce                	cmp    %esi,%ecx
40a919:	74 0b                	je     0x40a926
40a91b:	3b ca                	cmp    %edx,%ecx
40a91d:	75 13                	jne    0x40a932
40a91f:	0d 00 0c 00 00       	or     $0xc00,%eax
40a924:	eb 0c                	jmp    0x40a932
40a926:	0d 00 08 00 00       	or     $0x800,%eax
40a92b:	eb 05                	jmp    0x40a932
40a92d:	0d 00 04 00 00       	or     $0x400,%eax
40a932:	8b cb                	mov    %ebx,%ecx
40a934:	81 e1 00 00 03 00    	and    $0x30000,%ecx
40a93a:	74 0c                	je     0x40a948
40a93c:	81 f9 00 00 01 00    	cmp    $0x10000,%ecx
40a942:	75 06                	jne    0x40a94a
40a944:	0b c6                	or     %esi,%eax
40a946:	eb 02                	jmp    0x40a94a
40a948:	0b c2                	or     %edx,%eax
40a94a:	5e                   	pop    %esi
40a94b:	f7 c3 00 00 04 00    	test   $0x40000,%ebx
40a951:	74 05                	je     0x40a958
40a953:	0d 00 10 00 00       	or     $0x1000,%eax
40a958:	c3                   	ret
40a959:	33 c0                	xor    %eax,%eax
40a95b:	f6 c2 10             	test   $0x10,%dl
40a95e:	74 05                	je     0x40a965
40a960:	b8 80 00 00 00       	mov    $0x80,%eax
40a965:	53                   	push   %ebx
40a966:	56                   	push   %esi
40a967:	57                   	push   %edi
40a968:	bb 00 02 00 00       	mov    $0x200,%ebx
40a96d:	f6 c2 08             	test   $0x8,%dl
40a970:	74 02                	je     0x40a974
40a972:	0b c3                	or     %ebx,%eax
40a974:	f6 c2 04             	test   $0x4,%dl
40a977:	74 05                	je     0x40a97e
40a979:	0d 00 04 00 00       	or     $0x400,%eax
40a97e:	f6 c2 02             	test   $0x2,%dl
40a981:	74 05                	je     0x40a988
40a983:	0d 00 08 00 00       	or     $0x800,%eax
40a988:	f6 c2 01             	test   $0x1,%dl
40a98b:	74 05                	je     0x40a992
40a98d:	0d 00 10 00 00       	or     $0x1000,%eax
40a992:	bf 00 01 00 00       	mov    $0x100,%edi
40a997:	f7 c2 00 00 08 00    	test   $0x80000,%edx
40a99d:	74 02                	je     0x40a9a1
40a99f:	0b c7                	or     %edi,%eax
40a9a1:	8b ca                	mov    %edx,%ecx
40a9a3:	be 00 03 00 00       	mov    $0x300,%esi
40a9a8:	23 ce                	and    %esi,%ecx
40a9aa:	74 1f                	je     0x40a9cb
40a9ac:	3b cf                	cmp    %edi,%ecx
40a9ae:	74 16                	je     0x40a9c6
40a9b0:	3b cb                	cmp    %ebx,%ecx
40a9b2:	74 0b                	je     0x40a9bf
40a9b4:	3b ce                	cmp    %esi,%ecx
40a9b6:	75 13                	jne    0x40a9cb
40a9b8:	0d 00 60 00 00       	or     $0x6000,%eax
40a9bd:	eb 0c                	jmp    0x40a9cb
40a9bf:	0d 00 40 00 00       	or     $0x4000,%eax
40a9c4:	eb 05                	jmp    0x40a9cb
40a9c6:	0d 00 20 00 00       	or     $0x2000,%eax
40a9cb:	b9 00 00 00 03       	mov    $0x3000000,%ecx
40a9d0:	5f                   	pop    %edi
40a9d1:	23 d1                	and    %ecx,%edx
40a9d3:	5e                   	pop    %esi
40a9d4:	5b                   	pop    %ebx
40a9d5:	81 fa 00 00 00 01    	cmp    $0x1000000,%edx
40a9db:	74 16                	je     0x40a9f3
40a9dd:	81 fa 00 00 00 02    	cmp    $0x2000000,%edx
40a9e3:	74 0a                	je     0x40a9ef
40a9e5:	3b d1                	cmp    %ecx,%edx
40a9e7:	75 0f                	jne    0x40a9f8
40a9e9:	0d 00 80 00 00       	or     $0x8000,%eax
40a9ee:	c3                   	ret
40a9ef:	83 c8 40             	or     $0x40,%eax
40a9f2:	c3                   	ret
40a9f3:	0d 40 80 00 00       	or     $0x8040,%eax
40a9f8:	c3                   	ret
40a9f9:	8b ff                	mov    %edi,%edi
40a9fb:	55                   	push   %ebp
40a9fc:	8b ec                	mov    %esp,%ebp
40a9fe:	83 ec 14             	sub    $0x14,%esp
40aa01:	53                   	push   %ebx
40aa02:	56                   	push   %esi
40aa03:	57                   	push   %edi
40aa04:	9b d9 7d f8          	fstcw  -0x8(%ebp)