40a788:	8b d8                	mov    %eax,%ebx
40a78a:	e8 07 ff ff ff       	call   0x40a696
40a78f:	84 c0                	test   %al,%al
40a791:	0f 84 8b 00 00 00    	je     0x40a822
40a797:	56                   	push   %esi
40a798:	e8 52 fa ff ff       	call   0x40a1ef
40a79d:	84 c0                	test   %al,%al
40a79f:	74 2e                	je     0x40a7cf
40a7a1:	83 c3 04             	add    $0x4,%ebx
40a7a4:	39 5d 10             	cmp    %ebx,0x10(%ebp)
40a7a7:	0f 86 51 01 00 00    	jbe    0x40a8fe
40a7ad:	8b 7d 0c             	mov    0xc(%ebp),%edi
40a7b0:	6a 04                	push   $0x4
40a7b2:	68 b0 a6 42 00       	push   $0x42a6b0
40a7b7:	57                   	push   %edi
40a7b8:	e8 f4 1b 01 00       	call   0x41c3b1
40a7bd:	56                   	push   %esi
40a7be:	83 c7 08             	add    $0x8,%edi
40a7c1:	57                   	push   %edi
40a7c2:	e8 0c fa 00 00       	call   0x41a1d3
40a7c7:	83 c4 14             	add    $0x14,%esp
40a7ca:	e9 2b 01 00 00       	jmp    0x40a8fa
40a7cf:	66 83 3e 5c          	cmpw   $0x5c,(%esi)
40a7d3:	0f 85 25 01 00 00    	jne    0x40a8fe
40a7d9:	83 c6 02             	add    $0x2,%esi
40a7dc:	66 83 3e 5c          	cmpw   $0x5c,(%esi)
40a7e0:	0f 85 18 01 00 00    	jne    0x40a8fe
40a7e6:	83 c3 06             	add    $0x6,%ebx
40a7e9:	39 5d 10             	cmp    %ebx,0x10(%ebp)
40a7ec:	0f 86 0c 01 00 00    	jbe    0x40a8fe
40a7f2:	8b 7d 0c             	mov    0xc(%ebp),%edi
40a7f5:	6a 04                	push   $0x4
40a7f7:	68 b0 a6 42 00       	push   $0x42a6b0
40a7fc:	57                   	push   %edi
40a7fd:	e8 af 1b 01 00       	call   0x41c3b1
40a802:	8d 47 08             	lea    0x8(%edi),%eax
40a805:	68 a8 a6 42 00       	push   $0x42a6a8
40a80a:	50                   	push   %eax
40a80b:	e8 c3 f9 00 00       	call   0x41a1d3
40a810:	56                   	push   %esi
40a811:	83 c7 0e             	add    $0xe,%edi
40a814:	57                   	push   %edi
40a815:	e8 b9 f9 00 00       	call   0x41a1d3
40a81a:	83 c4 1c             	add    $0x1c,%esp
40a81d:	e9 d8 00 00 00       	jmp    0x40a8fa
40a822:	8d 85 00 f0 ff ff    	lea    -0x1000(%ebp),%eax
40a828:	50                   	push   %eax
40a829:	bf ff 07 00 00       	mov    $0x7ff,%edi
40a82e:	57                   	push   %edi
40a82f:	ff 15 70 a0 42 00    	call   *0x42a070
40a835:	85 c0                	test   %eax,%eax
40a837:	0f 84 c1 00 00 00    	je     0x40a8fe
40a83d:	3b c7                	cmp    %edi,%eax
40a83f:	0f 87 b9 00 00 00    	ja     0x40a8fe
40a845:	0f b7 06             	movzwl (%esi),%eax
40a848:	50                   	push   %eax
40a849:	e8 89 f7 ff ff       	call   0x409fd7
40a84e:	84 c0                	test   %al,%al
40a850:	74 3d                	je     0x40a88f
40a852:	83 c3 06             	add    $0x6,%ebx
40a855:	39 5d 10             	cmp    %ebx,0x10(%ebp)
40a858:	0f 86 a0 00 00 00    	jbe    0x40a8fe
40a85e:	8b 7d 0c             	mov    0xc(%ebp),%edi
40a861:	6a 04                	push   $0x4
40a863:	68 b0 a6 42 00       	push   $0x42a6b0
40a868:	57                   	push   %edi
40a869:	e8 43 1b 01 00       	call   0x41c3b1
40a86e:	6a 02                	push   $0x2
40a870:	8d 85 00 f0 ff ff    	lea    -0x1000(%ebp),%eax
40a876:	50                   	push   %eax
40a877:	8d 47 08             	lea    0x8(%edi),%eax
40a87a:	50                   	push   %eax
40a87b:	e8 31 1b 01 00       	call   0x41c3b1
40a880:	56                   	push   %esi
40a881:	83 c7 0c             	add    $0xc,%edi
40a884:	57                   	push   %edi
40a885:	e8 49 f9 00 00       	call   0x41a1d3
40a88a:	83 c4 20             	add    $0x20,%esp
40a88d:	eb 6b                	jmp    0x40a8fa
40a88f:	68 00 08 00 00       	push   $0x800
40a894:	8d 85 00 f0 ff ff    	lea    -0x1000(%ebp),%eax
40a89a:	50                   	push   %eax
40a89b:	e8 5c f7 ff ff       	call   0x409ffc
40a8a0:	8d 85 00 f0 ff ff    	lea    -0x1000(%ebp),%eax
40a8a6:	50                   	push   %eax
40a8a7:	e8 df f8 00 00       	call   0x41a18b
40a8ac:	8d 44 18 04          	lea    0x4(%eax,%ebx,1),%eax
40a8b0:	59                   	pop    %ecx
40a8b1:	39 45 10             	cmp    %eax,0x10(%ebp)
40a8b4:	76 48                	jbe    0x40a8fe
40a8b6:	8b 7d 0c             	mov    0xc(%ebp),%edi
40a8b9:	6a 04                	push   $0x4
40a8bb:	68 b0 a6 42 00       	push   $0x42a6b0
40a8c0:	57                   	push   %edi
40a8c1:	e8 eb 1a 01 00       	call   0x41c3b1
40a8c6:	8d 85 00 f0 ff ff    	lea    -0x1000(%ebp),%eax
40a8cc:	50                   	push   %eax
40a8cd:	8d 47 08             	lea    0x8(%edi),%eax
40a8d0:	50                   	push   %eax
40a8d1:	e8 fd f8 00 00       	call   0x41a1d3
40a8d6:	83 c4 14             	add    $0x14,%esp
40a8d9:	66 83 3e 2e          	cmpw   $0x2e,(%esi)
40a8dd:	75 11                	jne    0x40a8f0
40a8df:	0f b7 46 02          	movzwl 0x2(%esi),%eax
40a8e3:	50                   	push   %eax
40a8e4:	e8 ee f6 ff ff       	call   0x409fd7
40a8e9:	84 c0                	test   %al,%al
40a8eb:	74 03                	je     0x40a8f0
40a8ed:	83 c6 04             	add    $0x4,%esi
40a8f0:	ff 75 10             	push   0x10(%ebp)
40a8f3:	56                   	push   %esi
40a8f4:	57                   	push   %edi
40a8f5:	e8 52 60 00 00       	call   0x41094c
40a8fa:	b0 01                	mov    $0x1,%al
40a8fc:	eb 02                	jmp    0x40a900
40a8fe:	32 c0                	xor    %al,%al
40a900:	5f                   	pop    %edi
40a901:	5b                   	pop    %ebx
40a902:	5e                   	pop    %esi
40a903:	c9                   	leave
40a904:	c2 0c 00             	ret    $0xc
40a907:	55                   	push   %ebp
40a908:	8b ec                	mov    %esp,%ebp
40a90a:	b8 04 20 00 00       	mov    $0x2004,%eax
40a90f:	e8 bc fb 00 00       	call   0x41a4d0
40a914:	8b 45 08             	mov    0x8(%ebp),%eax
40a917:	53                   	push   %ebx
40a918:	56                   	push   %esi
40a919:	85 c0                	test   %eax,%eax
40a91b:	0f 84 84 00 00 00    	je     0x40a9a5
40a921:	66 83 38 00          	cmpw   $0x0,(%eax)
40a925:	74 7e                	je     0x40a9a5
40a927:	57                   	push   %edi
40a928:	8b 3d 74 a0 42 00    	mov    0x42a074,%edi
40a92e:	8d 4d fc             	lea    -0x4(%ebp),%ecx
40a931:	51                   	push   %ecx
40a932:	8d 8d fc ef ff ff    	lea    -0x1004(%ebp),%ecx
40a938:	51                   	push   %ecx
40a939:	be 00 08 00 00       	mov    $0x800,%esi
40a93e:	56                   	push   %esi
40a93f:	50                   	push   %eax
40a940:	ff d7                	call   *%edi
40a942:	8b d8                	mov    %eax,%ebx
40a944:	85 db                	test   %ebx,%ebx
40a946:	74 04                	je     0x40a94c
40a948:	3b de                	cmp    %esi,%ebx
40a94a:	76 2b                	jbe    0x40a977
40a94c:	56                   	push   %esi
40a94d:	8d 85 fc df ff ff    	lea    -0x2004(%ebp),%eax
40a953:	50                   	push   %eax
40a954:	ff 75 08             	push   0x8(%ebp)
40a957:	e8 fe fd ff ff       	call   0x40a75a
40a95c:	84 c0                	test   %al,%al
40a95e:	74 17                	je     0x40a977
40a960:	8d 45 fc             	lea    -0x4(%ebp),%eax
40a963:	50                   	push   %eax
40a964:	8d 85 fc ef ff ff    	lea    -0x1004(%ebp),%eax
40a96a:	50                   	push   %eax
40a96b:	56                   	push   %esi
40a96c:	8d 85 fc df ff ff    	lea    -0x2004(%ebp),%eax
40a972:	50                   	push   %eax
40a973:	ff d7                	call   *%edi
40a975:	8b d8                	mov    %eax,%ebx
40a977:	5f                   	pop    %edi
40a978:	85 db                	test   %ebx,%ebx
40a97a:	74 13                	je     0x40a98f
40a97c:	3b de                	cmp    %esi,%ebx
40a97e:	73 0f                	jae    0x40a98f
40a980:	ff 75 10             	push   0x10(%ebp)
40a983:	8d 85 fc ef ff ff    	lea    -0x1004(%ebp),%eax
40a989:	50                   	push   %eax
40a98a:	ff 75 0c             	push   0xc(%ebp)
40a98d:	eb 0f                	jmp    0x40a99e
40a98f:	8b 45 0c             	mov    0xc(%ebp),%eax
40a992:	39 45 08             	cmp    %eax,0x8(%ebp)
40a995:	74 1c                	je     0x40a9b3
40a997:	ff 75 10             	push   0x10(%ebp)
40a99a:	ff 75 08             	push   0x8(%ebp)
40a99d:	50                   	push   %eax
40a99e:	e8 7c 5f 00 00       	call   0x41091f
40a9a3:	eb 0e                	jmp    0x40a9b3
40a9a5:	83 7d 10 00          	cmpl   $0x0,0x10(%ebp)
40a9a9:	76 08                	jbe    0x40a9b3
40a9ab:	8b 4d 0c             	mov    0xc(%ebp),%ecx
40a9ae:	33 c0                	xor    %eax,%eax
40a9b0:	66 89 01             	mov    %ax,(%ecx)
40a9b3:	5e                   	pop    %esi
40a9b4:	5b                   	pop    %ebx
40a9b5:	c9                   	leave
40a9b6:	c2 0c 00             	ret    $0xc
40a9b9:	56                   	push   %esi
40a9ba:	6a 01                	push   $0x1
40a9bc:	8b f1                	mov    %ecx,%esi
40a9be:	e8 db ec ff ff       	call   0x40969e
40a9c3:	83 66 10 00          	andl   $0x0,0x10(%esi)
40a9c7:	8b c6                	mov    %esi,%eax
40a9c9:	5e                   	pop    %esi
40a9ca:	c3                   	ret
40a9cb:	56                   	push   %esi
40a9cc:	8b f1                	mov    %ecx,%esi
40a9ce:	ff 76 10             	push   0x10(%esi)
40a9d1:	e8 25 1a 01 00       	call   0x41c3fb
40a9d6:	59                   	pop    %ecx
40a9d7:	8b ce                	mov    %esi,%ecx
40a9d9:	5e                   	pop    %esi
40a9da:	e9 f5 ec ff ff       	jmp    0x4096d4
40a9df:	56                   	push   %esi
40a9e0:	8b f1                	mov    %ecx,%esi
40a9e2:	83 7e 10 00          	cmpl   $0x0,0x10(%esi)
40a9e6:	75 0e                	jne    0x40a9f6
40a9e8:	68 04 00 04 00       	push   $0x40004
40a9ed:	e8 d3 f0 00 00       	call   0x419ac5
40a9f2:	59                   	pop    %ecx
40a9f3:	89 46 10             	mov    %eax,0x10(%esi)
40a9f6:	5e                   	pop    %esi
40a9f7:	c3                   	ret
40a9f8:	8b 44 24 08          	mov    0x8(%esp),%eax
40a9fc:	8b 4c 24 04          	mov    0x4(%esp),%ecx
40aa00:	89 01                	mov    %eax,(%ecx)
40aa02:	c2 08 00             	ret    $0x8
40aa05:	56                   	push   %esi
40aa06:	57                   	push   %edi
40aa07:	8b 7c 24 0c          	mov    0xc(%esp),%edi
40aa0b:	8b cf                	mov    %edi,%ecx
40aa0d:	e8 3d ed ff ff       	call   0x40974f
40aa12:	8b f0                	mov    %eax,%esi
40aa14:	25 00 c0 00 00       	and    $0xc000,%eax
40aa19:	8b cf                	mov    %edi,%ecx
40aa1b:	74 72                	je     0x40aa8f
40aa1d:	3d 00 40 00 00       	cmp    $0x4000,%eax
40aa22:	74 42                	je     0x40aa66
40aa24:	6a 02                	push   $0x2
40aa26:	3d 00 80 00 00       	cmp    $0x8000,%eax
40aa2b:	74 25                	je     0x40aa52
40aa2d:	e8 06 ed ff ff       	call   0x409738
40aa32:	8b cf                	mov    %edi,%ecx
40aa34:	e8 16 ed ff ff       	call   0x40974f
40aa39:	8b f0                	mov    %eax,%esi
40aa3b:	6a 10                	push   $0x10
40aa3d:	8b cf                	mov    %edi,%ecx
40aa3f:	c1 e6 10             	shl    $0x10,%esi
40aa42:	e8 f1 ec ff ff       	call   0x409738
40aa47:	8b cf                	mov    %edi,%ecx
40aa49:	e8 01 ed ff ff       	call   0x40974f
40aa4e:	0b f0                	or     %eax,%esi
40aa50:	eb 0e                	jmp    0x40aa60
40aa52:	e8 e1 ec ff ff       	call   0x409738
40aa57:	8b cf                	mov    %edi,%ecx
40aa59:	e8 f1 ec ff ff       	call   0x40974f
40aa5e:	8b f0                	mov    %eax,%esi
40aa60:	6a 10                	push   $0x10
40aa62:	8b cf                	mov    %edi,%ecx
40aa64:	eb 20                	jmp    0x40aa86
40aa66:	f7 c6 00 3c 00 00    	test   $0x3c00,%esi
40aa6c:	75 0d                	jne    0x40aa7b
40aa6e:	c1 ee 02             	shr    $0x2,%esi
40aa71:	81 ce 00 ff ff ff    	or     $0xffffff00,%esi
40aa77:	6a 0e                	push   $0xe
40aa79:	eb 0b                	jmp    0x40aa86
40aa7b:	c1 ee 06             	shr    $0x6,%esi
40aa7e:	81 e6 ff 00 00 00    	and    $0xff,%esi
40aa84:	6a 0a                	push   $0xa
40aa86:	e8 ad ec ff ff       	call   0x409738
40aa8b:	8b c6                	mov    %esi,%eax
40aa8d:	eb 0f                	jmp    0x40aa9e
40aa8f:	6a 06                	push   $0x6
40aa91:	e8 a2 ec ff ff       	call   0x409738
40aa96:	8b c6                	mov    %esi,%eax
40aa98:	c1 e8 0a             	shr    $0xa,%eax
40aa9b:	83 e0 0f             	and    $0xf,%eax
40aa9e:	5f                   	pop    %edi
40aa9f:	5e                   	pop    %esi
40aaa0:	c2 04 00             	ret    $0x4
40aaa3:	55                   	push   %ebp
40aaa4:	8b ec                	mov    %esp,%ebp
40aaa6:	8b 55 08             	mov    0x8(%ebp),%edx
40aaa9:	b8 00 00 04 00       	mov    $0x40000,%eax
40aaae:	3b d0                	cmp    %eax,%edx
40aab0:	73 21                	jae    0x40aad3
40aab2:	8b 49 10             	mov    0x10(%ecx),%ecx
40aab5:	03 ca                	add    %edx,%ecx
40aab7:	39 4d 0c             	cmp    %ecx,0xc(%ebp)
40aaba:	74 17                	je     0x40aad3
40aabc:	2b c2                	sub    %edx,%eax
40aabe:	39 45 10             	cmp    %eax,0x10(%ebp)
40aac1:	73 03                	jae    0x40aac6
40aac3:	8b 45 10             	mov    0x10(%ebp),%eax
40aac6:	50                   	push   %eax
40aac7:	ff 75 0c             	push   0xc(%ebp)
40aaca:	51                   	push   %ecx
40aacb:	e8 a0 1a 01 00       	call   0x41c570
40aad0:	83 c4 0c             	add    $0xc,%esp
40aad3:	5d                   	pop    %ebp
40aad4:	c2 0c 00             	ret    $0xc
40aad7:	56                   	push   %esi
40aad8:	8b 74 24 0c          	mov    0xc(%esp),%esi
40aadc:	56                   	push   %esi
40aadd:	ff 74 24 0c          	push   0xc(%esp)
40aae1:	6a ff                	push   $0xffffffff
40aae3:	e8 95 ac ff ff       	call   0x40577d
40aae8:	33 d2                	xor    %edx,%edx
40aaea:	f7 d0                	not    %eax
40aaec:	33 c9                	xor    %ecx,%ecx
40aaee:	39 81 6c f0 42 00    	cmp    %eax,0x42f06c(%ecx)
40aaf4:	75 08                	jne    0x40aafe
40aaf6:	39 b1 68 f0 42 00    	cmp    %esi,0x42f068(%ecx)
40aafc:	74 0f                	je     0x40ab0d
40aafe:	83 c1 0c             	add    $0xc,%ecx
40ab01:	42                   	inc    %edx
40ab02:	83 f9 48             	cmp    $0x48,%ecx
40ab05:	72 e7                	jb     0x40aaee
40ab07:	33 c0                	xor    %eax,%eax
40ab09:	5e                   	pop    %esi
40ab0a:	c2 08 00             	ret    $0x8
40ab0d:	6b d2 0c             	imul   $0xc,%edx,%edx
40ab10:	8b 82 70 f0 42 00    	mov    0x42f070(%edx),%eax
40ab16:	eb f1                	jmp    0x40ab09
40ab18:	8b 44 24 08          	mov    0x8(%esp),%eax
40ab1c:	8b 4c 24 04          	mov    0x4(%esp),%ecx
40ab20:	99                   	cltd
40ab21:	83 e2 07             	and    $0x7,%edx
40ab24:	03 c2                	add    %edx,%eax
40ab26:	c1 f8 03             	sar    $0x3,%eax
40ab29:	0f b6 14 08          	movzbl (%eax,%ecx,1),%edx
40ab2d:	40                   	inc    %eax
40ab2e:	56                   	push   %esi
40ab2f:	0f b6 34 08          	movzbl (%eax,%ecx,1),%esi
40ab33:	8d 4c 08 01          	lea    0x1(%eax,%ecx,1),%ecx
40ab37:	0f b6 41 01          	movzbl 0x1(%ecx),%eax
40ab3b:	0f b6 09             	movzbl (%ecx),%ecx
40ab3e:	c1 e0 08             	shl    $0x8,%eax
40ab41:	0b c1                	or     %ecx,%eax
40ab43:	8b 4c 24 0c          	mov    0xc(%esp),%ecx
40ab47:	c1 e6 08             	shl    $0x8,%esi
40ab4a:	0b d6                	or     %esi,%edx
40ab4c:	c1 e0 10             	shl    $0x10,%eax
40ab4f:	0b c2                	or     %edx,%eax
40ab51:	83 e1 07             	and    $0x7,%ecx
40ab54:	d3 e8                	shr    %cl,%eax
40ab56:	6a 20                	push   $0x20
40ab58:	59                   	pop    %ecx
40ab59:	2b 4c 24 10          	sub    0x10(%esp),%ecx
40ab5d:	83 ca ff             	or     $0xffffffff,%edx
40ab60:	d3 ea                	shr    %cl,%edx
40ab62:	5e                   	pop    %esi
40ab63:	23 c2                	and    %edx,%eax
40ab65:	c2 0c 00             	ret    $0xc
40ab68:	55                   	push   %ebp
40ab69:	8b ec                	mov    %esp,%ebp
40ab6b:	8b 4d 10             	mov    0x10(%ebp),%ecx