40a9ee:	33 ff                	xor    %edi,%edi
40a9f0:	3b c1                	cmp    %ecx,%eax
40a9f2:	75 30                	jne    0x40aa24
40a9f4:	8d 44 89 50          	lea    0x50(%ecx,%ecx,4),%eax
40a9f8:	c1 e0 02             	shl    $0x2,%eax
40a9fb:	50                   	push   %eax
40a9fc:	ff 35 9c 1d 41 00    	push   0x411d9c
40aa02:	57                   	push   %edi
40aa03:	ff 35 a0 1d 41 00    	push   0x411da0
40aa09:	ff 15 fc d0 40 00    	call   *0x40d0fc
40aa0f:	3b c7                	cmp    %edi,%eax
40aa11:	74 61                	je     0x40aa74
40aa13:	83 05 88 1d 41 00 10 	addl   $0x10,0x411d88
40aa1a:	a3 9c 1d 41 00       	mov    %eax,0x411d9c
40aa1f:	a1 98 1d 41 00       	mov    0x411d98,%eax
40aa24:	8b 0d 9c 1d 41 00    	mov    0x411d9c,%ecx
40aa2a:	68 c4 41 00 00       	push   $0x41c4
40aa2f:	6a 08                	push   $0x8
40aa31:	8d 04 80             	lea    (%eax,%eax,4),%eax
40aa34:	ff 35 a0 1d 41 00    	push   0x411da0
40aa3a:	8d 34 81             	lea    (%ecx,%eax,4),%esi
40aa3d:	ff 15 00 d1 40 00    	call   *0x40d100
40aa43:	3b c7                	cmp    %edi,%eax
40aa45:	89 46 10             	mov    %eax,0x10(%esi)
40aa48:	74 2a                	je     0x40aa74
40aa4a:	6a 04                	push   $0x4
40aa4c:	68 00 20 00 00       	push   $0x2000
40aa51:	68 00 00 10 00       	push   $0x100000
40aa56:	57                   	push   %edi
40aa57:	ff 15 6c d0 40 00    	call   *0x40d06c
40aa5d:	3b c7                	cmp    %edi,%eax
40aa5f:	89 46 0c             	mov    %eax,0xc(%esi)
40aa62:	75 14                	jne    0x40aa78
40aa64:	ff 76 10             	push   0x10(%esi)
40aa67:	57                   	push   %edi
40aa68:	ff 35 a0 1d 41 00    	push   0x411da0
40aa6e:	ff 15 f4 d0 40 00    	call   *0x40d0f4
40aa74:	33 c0                	xor    %eax,%eax
40aa76:	eb 17                	jmp    0x40aa8f
40aa78:	83 4e 08 ff          	orl    $0xffffffff,0x8(%esi)
40aa7c:	89 3e                	mov    %edi,(%esi)
40aa7e:	89 7e 04             	mov    %edi,0x4(%esi)
40aa81:	ff 05 98 1d 41 00    	incl   0x411d98
40aa87:	8b 46 10             	mov    0x10(%esi),%eax
40aa8a:	83 08 ff             	orl    $0xffffffff,(%eax)
40aa8d:	8b c6                	mov    %esi,%eax
40aa8f:	5f                   	pop    %edi
40aa90:	5e                   	pop    %esi
40aa91:	c3                   	ret
40aa92:	55                   	push   %ebp
40aa93:	8b ec                	mov    %esp,%ebp
40aa95:	51                   	push   %ecx
40aa96:	8b 4d 08             	mov    0x8(%ebp),%ecx
40aa99:	53                   	push   %ebx
40aa9a:	56                   	push   %esi
40aa9b:	57                   	push   %edi
40aa9c:	8b 71 10             	mov    0x10(%ecx),%esi
40aa9f:	8b 41 08             	mov    0x8(%ecx),%eax
40aaa2:	33 db                	xor    %ebx,%ebx
40aaa4:	85 c0                	test   %eax,%eax
40aaa6:	7c 05                	jl     0x40aaad
40aaa8:	d1 e0                	shl    $1,%eax
40aaaa:	43                   	inc    %ebx
40aaab:	eb f7                	jmp    0x40aaa4
40aaad:	8b c3                	mov    %ebx,%eax
40aaaf:	6a 3f                	push   $0x3f
40aab1:	69 c0 04 02 00 00    	imul   $0x204,%eax,%eax
40aab7:	5a                   	pop    %edx
40aab8:	8d 84 30 44 01 00 00 	lea    0x144(%eax,%esi,1),%eax
40aabf:	89 45 fc             	mov    %eax,-0x4(%ebp)
40aac2:	89 40 08             	mov    %eax,0x8(%eax)
40aac5:	89 40 04             	mov    %eax,0x4(%eax)
40aac8:	83 c0 08             	add    $0x8,%eax
40aacb:	4a                   	dec    %edx
40aacc:	75 f4                	jne    0x40aac2
40aace:	8b fb                	mov    %ebx,%edi
40aad0:	6a 04                	push   $0x4
40aad2:	c1 e7 0f             	shl    $0xf,%edi
40aad5:	03 79 0c             	add    0xc(%ecx),%edi
40aad8:	68 00 10 00 00       	push   $0x1000
40aadd:	68 00 80 00 00       	push   $0x8000
40aae2:	57                   	push   %edi
40aae3:	ff 15 6c d0 40 00    	call   *0x40d06c
40aae9:	85 c0                	test   %eax,%eax
40aaeb:	75 08                	jne    0x40aaf5
40aaed:	83 c8 ff             	or     $0xffffffff,%eax
40aaf0:	e9 93 00 00 00       	jmp    0x40ab88
40aaf5:	8d 97 00 70 00 00    	lea    0x7000(%edi),%edx
40aafb:	3b fa                	cmp    %edx,%edi
40aafd:	77 3c                	ja     0x40ab3b
40aaff:	8d 47 10             	lea    0x10(%edi),%eax
40ab02:	83 48 f8 ff          	orl    $0xffffffff,-0x8(%eax)
40ab06:	83 88 ec 0f 00 00 ff 	orl    $0xffffffff,0xfec(%eax)
40ab0d:	8d 88 fc 0f 00 00    	lea    0xffc(%eax),%ecx
40ab13:	c7 40 fc f0 0f 00 00 	movl   $0xff0,-0x4(%eax)
40ab1a:	89 08                	mov    %ecx,(%eax)
40ab1c:	8d 88 fc ef ff ff    	lea    -0x1004(%eax),%ecx
40ab22:	89 48 04             	mov    %ecx,0x4(%eax)
40ab25:	c7 80 e8 0f 00 00 f0 	movl   $0xff0,0xfe8(%eax)
40ab2c:	0f 00 00
40ab2f:	05 00 10 00 00       	add    $0x1000,%eax
40ab34:	8d 48 f0             	lea    -0x10(%eax),%ecx
40ab37:	3b ca                	cmp    %edx,%ecx
40ab39:	76 c7                	jbe    0x40ab02
40ab3b:	8b 45 fc             	mov    -0x4(%ebp),%eax
40ab3e:	8d 4f 0c             	lea    0xc(%edi),%ecx
40ab41:	05 f8 01 00 00       	add    $0x1f8,%eax
40ab46:	6a 01                	push   $0x1
40ab48:	5f                   	pop    %edi
40ab49:	89 48 04             	mov    %ecx,0x4(%eax)
40ab4c:	89 41 08             	mov    %eax,0x8(%ecx)
40ab4f:	8d 4a 0c             	lea    0xc(%edx),%ecx
40ab52:	89 48 08             	mov    %ecx,0x8(%eax)
40ab55:	89 41 04             	mov    %eax,0x4(%ecx)
40ab58:	83 64 9e 44 00       	andl   $0x0,0x44(%esi,%ebx,4)
40ab5d:	89 bc 9e c4 00 00 00 	mov    %edi,0xc4(%esi,%ebx,4)
40ab64:	8a 46 43             	mov    0x43(%esi),%al
40ab67:	8a c8                	mov    %al,%cl
40ab69:	fe c1                	inc    %cl
40ab6b:	84 c0                	test   %al,%al
40ab6d:	8b 45 08             	mov    0x8(%ebp),%eax
40ab70:	88 4e 43             	mov    %cl,0x43(%esi)
40ab73:	75 03                	jne    0x40ab78
40ab75:	09 78 04             	or     %edi,0x4(%eax)
40ab78:	ba 00 00 00 80       	mov    $0x80000000,%edx
40ab7d:	8b cb                	mov    %ebx,%ecx
40ab7f:	d3 ea                	shr    %cl,%edx
40ab81:	f7 d2                	not    %edx
40ab83:	21 50 08             	and    %edx,0x8(%eax)
40ab86:	8b c3                	mov    %ebx,%eax
40ab88:	5f                   	pop    %edi
40ab89:	5e                   	pop    %esi
40ab8a:	5b                   	pop    %ebx
40ab8b:	c9                   	leave
40ab8c:	c3                   	ret
40ab8d:	55                   	push   %ebp
40ab8e:	8b ec                	mov    %esp,%ebp
40ab90:	83 ec 0c             	sub    $0xc,%esp
40ab93:	8b 4d 08             	mov    0x8(%ebp),%ecx
40ab96:	8b 45 10             	mov    0x10(%ebp),%eax
40ab99:	53                   	push   %ebx
40ab9a:	56                   	push   %esi
40ab9b:	57                   	push   %edi
40ab9c:	8b 7d 0c             	mov    0xc(%ebp),%edi
40ab9f:	8b d7                	mov    %edi,%edx
40aba1:	8d 70 17             	lea    0x17(%eax),%esi
40aba4:	2b 51 0c             	sub    0xc(%ecx),%edx
40aba7:	8b 41 10             	mov    0x10(%ecx),%eax
40abaa:	83 e6 f0             	and    $0xfffffff0,%esi
40abad:	c1 ea 0f             	shr    $0xf,%edx
40abb0:	8b ca                	mov    %edx,%ecx
40abb2:	69 c9 04 02 00 00    	imul   $0x204,%ecx,%ecx
40abb8:	8d 8c 01 44 01 00 00 	lea    0x144(%ecx,%eax,1),%ecx
40abbf:	89 4d f4             	mov    %ecx,-0xc(%ebp)
40abc2:	8b 4f fc             	mov    -0x4(%edi),%ecx
40abc5:	49                   	dec    %ecx
40abc6:	3b f1                	cmp    %ecx,%esi
40abc8:	89 4d 10             	mov    %ecx,0x10(%ebp)
40abcb:	8b 5c 39 fc          	mov    -0x4(%ecx,%edi,1),%ebx
40abcf:	8d 7c 39 fc          	lea    -0x4(%ecx,%edi,1),%edi
40abd3:	89 5d fc             	mov    %ebx,-0x4(%ebp)
40abd6:	0f 8e 5f 01 00 00    	jle    0x40ad3b
40abdc:	f6 c3 01             	test   $0x1,%bl
40abdf:	0f 85 4f 01 00 00    	jne    0x40ad34
40abe5:	03 d9                	add    %ecx,%ebx
40abe7:	3b f3                	cmp    %ebx,%esi
40abe9:	0f 8f 45 01 00 00    	jg     0x40ad34
40abef:	8b 4d fc             	mov    -0x4(%ebp),%ecx
40abf2:	c1 f9 04             	sar    $0x4,%ecx
40abf5:	49                   	dec    %ecx
40abf6:	83 f9 3f             	cmp    $0x3f,%ecx
40abf9:	89 4d f8             	mov    %ecx,-0x8(%ebp)
40abfc:	76 06                	jbe    0x40ac04
40abfe:	6a 3f                	push   $0x3f
40ac00:	59                   	pop    %ecx
40ac01:	89 4d f8             	mov    %ecx,-0x8(%ebp)
40ac04:	8b 5f 04             	mov    0x4(%edi),%ebx
40ac07:	3b 5f 08             	cmp    0x8(%edi),%ebx
40ac0a:	75 48                	jne    0x40ac54
40ac0c:	83 f9 20             	cmp    $0x20,%ecx
40ac0f:	73 1f                	jae    0x40ac30
40ac11:	bb 00 00 00 80       	mov    $0x80000000,%ebx
40ac16:	d3 eb                	shr    %cl,%ebx
40ac18:	8b 4d f8             	mov    -0x8(%ebp),%ecx
40ac1b:	8d 4c 01 04          	lea    0x4(%ecx,%eax,1),%ecx
40ac1f:	f7 d3                	not    %ebx
40ac21:	21 5c 90 44          	and    %ebx,0x44(%eax,%edx,4)
40ac25:	fe 09                	decb   (%ecx)
40ac27:	75 2b                	jne    0x40ac54
40ac29:	8b 4d 08             	mov    0x8(%ebp),%ecx
40ac2c:	21 19                	and    %ebx,(%ecx)
40ac2e:	eb 24                	jmp    0x40ac54
40ac30:	83 c1 e0             	add    $0xffffffe0,%ecx
40ac33:	bb 00 00 00 80       	mov    $0x80000000,%ebx
40ac38:	d3 eb                	shr    %cl,%ebx
40ac3a:	8b 4d f8             	mov    -0x8(%ebp),%ecx
40ac3d:	8d 4c 01 04          	lea    0x4(%ecx,%eax,1),%ecx
40ac41:	f7 d3                	not    %ebx
40ac43:	21 9c 90 c4 00 00 00 	and    %ebx,0xc4(%eax,%edx,4)
40ac4a:	fe 09                	decb   (%ecx)
40ac4c:	75 06                	jne    0x40ac54
40ac4e:	8b 4d 08             	mov    0x8(%ebp),%ecx
40ac51:	21 59 04             	and    %ebx,0x4(%ecx)
40ac54:	8b 4f 08             	mov    0x8(%edi),%ecx
40ac57:	8b 5f 04             	mov    0x4(%edi),%ebx
40ac5a:	89 59 04             	mov    %ebx,0x4(%ecx)
40ac5d:	8b 4f 04             	mov    0x4(%edi),%ecx
40ac60:	8b 7f 08             	mov    0x8(%edi),%edi
40ac63:	89 79 08             	mov    %edi,0x8(%ecx)
40ac66:	8b 4d 10             	mov    0x10(%ebp),%ecx
40ac69:	2b ce                	sub    %esi,%ecx
40ac6b:	01 4d fc             	add    %ecx,-0x4(%ebp)
40ac6e:	83 7d fc 00          	cmpl   $0x0,-0x4(%ebp)
40ac72:	0f 8e aa 00 00 00    	jle    0x40ad22
40ac78:	8b 7d fc             	mov    -0x4(%ebp),%edi
40ac7b:	8b 4d 0c             	mov    0xc(%ebp),%ecx
40ac7e:	c1 ff 04             	sar    $0x4,%edi
40ac81:	4f                   	dec    %edi
40ac82:	8d 4c 31 fc          	lea    -0x4(%ecx,%esi,1),%ecx
40ac86:	83 ff 3f             	cmp    $0x3f,%edi
40ac89:	76 03                	jbe    0x40ac8e
40ac8b:	6a 3f                	push   $0x3f
40ac8d:	5f                   	pop    %edi
40ac8e:	8b 5d f4             	mov    -0xc(%ebp),%ebx
40ac91:	8d 1c fb             	lea    (%ebx,%edi,8),%ebx
40ac94:	89 5d 10             	mov    %ebx,0x10(%ebp)
40ac97:	8b 5b 04             	mov    0x4(%ebx),%ebx
40ac9a:	89 59 04             	mov    %ebx,0x4(%ecx)
40ac9d:	8b 5d 10             	mov    0x10(%ebp),%ebx
40aca0:	89 59 08             	mov    %ebx,0x8(%ecx)
40aca3:	89 4b 04             	mov    %ecx,0x4(%ebx)
40aca6:	8b 59 04             	mov    0x4(%ecx),%ebx
40aca9:	89 4b 08             	mov    %ecx,0x8(%ebx)
40acac:	8b 59 04             	mov    0x4(%ecx),%ebx
40acaf:	3b 59 08             	cmp    0x8(%ecx),%ebx
40acb2:	75 5c                	jne    0x40ad10
40acb4:	8a 4c 07 04          	mov    0x4(%edi,%eax,1),%cl
40acb8:	83 ff 20             	cmp    $0x20,%edi
40acbb:	88 4d 13             	mov    %cl,0x13(%ebp)
40acbe:	fe c1                	inc    %cl
40acc0:	88 4c 07 04          	mov    %cl,0x4(%edi,%eax,1)
40acc4:	73 21                	jae    0x40ace7
40acc6:	80 7d 13 00          	cmpb   $0x0,0x13(%ebp)
40acca:	75 0e                	jne    0x40acda
40accc:	bb 00 00 00 80       	mov    $0x80000000,%ebx
40acd1:	8b cf                	mov    %edi,%ecx
40acd3:	d3 eb                	shr    %cl,%ebx
40acd5:	8b 4d 08             	mov    0x8(%ebp),%ecx
40acd8:	09 19                	or     %ebx,(%ecx)
40acda:	8d 44 90 44          	lea    0x44(%eax,%edx,4),%eax
40acde:	ba 00 00 00 80       	mov    $0x80000000,%edx
40ace3:	8b cf                	mov    %edi,%ecx
40ace5:	eb 25                	jmp    0x40ad0c
40ace7:	80 7d 13 00          	cmpb   $0x0,0x13(%ebp)
40aceb:	75 10                	jne    0x40acfd
40aced:	8d 4f e0             	lea    -0x20(%edi),%ecx
40acf0:	bb 00 00 00 80       	mov    $0x80000000,%ebx
40acf5:	d3 eb                	shr    %cl,%ebx
40acf7:	8b 4d 08             	mov    0x8(%ebp),%ecx
40acfa:	09 59 04             	or     %ebx,0x4(%ecx)
40acfd:	8d 84 90 c4 00 00 00 	lea    0xc4(%eax,%edx,4),%eax
40ad04:	8d 4f e0             	lea    -0x20(%edi),%ecx
40ad07:	ba 00 00 00 80       	mov    $0x80000000,%edx
40ad0c:	d3 ea                	shr    %cl,%edx
40ad0e:	09 10                	or     %edx,(%eax)
40ad10:	8b 55 0c             	mov    0xc(%ebp),%edx
40ad13:	8b 4d fc             	mov    -0x4(%ebp),%ecx
40ad16:	8d 44 32 fc          	lea    -0x4(%edx,%esi,1),%eax
40ad1a:	89 08                	mov    %ecx,(%eax)
40ad1c:	89 4c 01 fc          	mov    %ecx,-0x4(%ecx,%eax,1)
40ad20:	eb 03                	jmp    0x40ad25
40ad22:	8b 55 0c             	mov    0xc(%ebp),%edx
40ad25:	8d 46 01             	lea    0x1(%esi),%eax
40ad28:	89 42 fc             	mov    %eax,-0x4(%edx)
40ad2b:	89 44 32 f8          	mov    %eax,-0x8(%edx,%esi,1)
40ad2f:	e9 47 01 00 00       	jmp    0x40ae7b
40ad34:	33 c0                	xor    %eax,%eax
40ad36:	e9 43 01 00 00       	jmp    0x40ae7e
40ad3b:	0f 8d 3a 01 00 00    	jge    0x40ae7b
40ad41:	8b 5d 0c             	mov    0xc(%ebp),%ebx
40ad44:	29 75 10             	sub    %esi,0x10(%ebp)
40ad47:	8d 4e 01             	lea    0x1(%esi),%ecx
40ad4a:	89 4b fc             	mov    %ecx,-0x4(%ebx)
40ad4d:	8d 5c 33 fc          	lea    -0x4(%ebx,%esi,1),%ebx
40ad51:	8b 75 10             	mov    0x10(%ebp),%esi
40ad54:	89 5d 0c             	mov    %ebx,0xc(%ebp)
40ad57:	c1 fe 04             	sar    $0x4,%esi
40ad5a:	4e                   	dec    %esi
40ad5b:	89 4b fc             	mov    %ecx,-0x4(%ebx)
40ad5e:	83 fe 3f             	cmp    $0x3f,%esi
40ad61:	76 03                	jbe    0x40ad66
40ad63:	6a 3f                	push   $0x3f
40ad65:	5e                   	pop    %esi
40ad66:	f6 45 fc 01          	testb  $0x1,-0x4(%ebp)
40ad6a:	0f 85 85 00 00 00    	jne    0x40adf5
40ad70:	8b 75 fc             	mov    -0x4(%ebp),%esi
40ad73:	c1 fe 04             	sar    $0x4,%esi
40ad76:	4e                   	dec    %esi
40ad77:	83 fe 3f             	cmp    $0x3f,%esi
40ad7a:	76 03                	jbe    0x40ad7f
40ad7c:	6a 3f                	push   $0x3f
40ad7e:	5e                   	pop    %esi
40ad7f:	8b 4f 04             	mov    0x4(%edi),%ecx
40ad82:	3b 4f 08             	cmp    0x8(%edi),%ecx
40ad85:	75 47                	jne    0x40adce
40ad87:	83 fe 20             	cmp    $0x20,%esi
40ad8a:	73 1e                	jae    0x40adaa
40ad8c:	bb 00 00 00 80       	mov    $0x80000000,%ebx
40ad91:	8b ce                	mov    %esi,%ecx
40ad93:	d3 eb                	shr    %cl,%ebx
40ad95:	8d 74 06 04          	lea    0x4(%esi,%eax,1),%esi
40ad99:	f7 d3                	not    %ebx
40ad9b:	21 5c 90 44          	and    %ebx,0x44(%eax,%edx,4)
40ad9f:	fe 0e                	decb   (%esi)
40ada1:	75 28                	jne    0x40adcb
40ada3:	8b 4d 08             	mov    0x8(%ebp),%ecx
40ada6:	21 19                	and    %ebx,(%ecx)
40ada8:	eb 21                	jmp    0x40adcb
40adaa:	8d 4e e0             	lea    -0x20(%esi),%ecx
40adad:	bb 00 00 00 80       	mov    $0x80000000,%ebx
40adb2:	d3 eb                	shr    %cl,%ebx
40adb4:	8d 4c 06 04          	lea    0x4(%esi,%eax,1),%ecx
40adb8:	f7 d3                	not    %ebx
40adba:	21 9c 90 c4 00 00 00 	and    %ebx,0xc4(%eax,%edx,4)
40adc1:	fe 09                	decb   (%ecx)
40adc3:	75 06                	jne    0x40adcb
40adc5:	8b 4d 08             	mov    0x8(%ebp),%ecx
40adc8:	21 59 04             	and    %ebx,0x4(%ecx)
40adcb:	8b 5d 0c             	mov    0xc(%ebp),%ebx
40adce:	8b 4f 08             	mov    0x8(%edi),%ecx
40add1:	8b 77 04             	mov    0x4(%edi),%esi
40add4:	89 71 04             	mov    %esi,0x4(%ecx)
40add7:	8b 4f 04             	mov    0x4(%edi),%ecx
40adda:	8b 77 08             	mov    0x8(%edi),%esi
40addd:	89 71 08             	mov    %esi,0x8(%ecx)
40ade0:	8b 75 10             	mov    0x10(%ebp),%esi
40ade3:	03 75 fc             	add    -0x4(%ebp),%esi
40ade6:	89 75 10             	mov    %esi,0x10(%ebp)
40ade9:	c1 fe 04             	sar    $0x4,%esi
40adec:	4e                   	dec    %esi
40aded:	83 fe 3f             	cmp    $0x3f,%esi
40adf0:	76 03                	jbe    0x40adf5
40adf2:	6a 3f                	push   $0x3f
40adf4:	5e                   	pop    %esi
40adf5:	8b 4d f4             	mov    -0xc(%ebp),%ecx
40adf8:	8b 7c f1 04          	mov    0x4(%ecx,%esi,8),%edi
40adfc:	8d 0c f1             	lea    (%ecx,%esi,8),%ecx
40adff:	89 7b 04             	mov    %edi,0x4(%ebx)
40ae02:	89 4b 08             	mov    %ecx,0x8(%ebx)
40ae05:	89 59 04             	mov    %ebx,0x4(%ecx)