40f003:	3b c2                	cmp    %edx,%eax
40f005:	7d ef                	jge    0x40eff6
40f007:	eb 02                	jmp    0x40f00b
40f009:	73 01                	jae    0x40f00c
40f00b:	42                   	inc    %edx
40f00c:	85 d2                	test   %edx,%edx
40f00e:	0f 84 e9 02 00 00    	je     0x40f2fd
40f014:	8b 45 0c             	mov    0xc(%ebp),%eax
40f017:	8b 5d cc             	mov    -0x34(%ebp),%ebx
40f01a:	8b 34 98             	mov    (%eax,%ebx,4),%esi
40f01d:	8b 4c 98 fc          	mov    -0x4(%eax,%ebx,4),%ecx
40f021:	0f bd c6             	bsr    %esi,%eax
40f024:	89 75 d0             	mov    %esi,-0x30(%ebp)
40f027:	89 4d e0             	mov    %ecx,-0x20(%ebp)
40f02a:	74 09                	je     0x40f035
40f02c:	bf 1f 00 00 00       	mov    $0x1f,%edi
40f031:	2b f8                	sub    %eax,%edi
40f033:	eb 05                	jmp    0x40f03a
40f035:	bf 20 00 00 00       	mov    $0x20,%edi
40f03a:	b8 20 00 00 00       	mov    $0x20,%eax
40f03f:	89 7d f4             	mov    %edi,-0xc(%ebp)
40f042:	2b c7                	sub    %edi,%eax
40f044:	89 45 d4             	mov    %eax,-0x2c(%ebp)
40f047:	85 ff                	test   %edi,%edi
40f049:	74 27                	je     0x40f072
40f04b:	8b c1                	mov    %ecx,%eax
40f04d:	8b 4d d4             	mov    -0x2c(%ebp),%ecx
40f050:	d3 e8                	shr    %cl,%eax
40f052:	8b cf                	mov    %edi,%ecx
40f054:	d3 65 e0             	shll   %cl,-0x20(%ebp)
40f057:	d3 e6                	shl    %cl,%esi
40f059:	0b f0                	or     %eax,%esi
40f05b:	89 75 d0             	mov    %esi,-0x30(%ebp)
40f05e:	83 fb 02             	cmp    $0x2,%ebx
40f061:	76 0f                	jbe    0x40f072
40f063:	8b 75 0c             	mov    0xc(%ebp),%esi
40f066:	8b 4d d4             	mov    -0x2c(%ebp),%ecx
40f069:	8b 44 9e f8          	mov    -0x8(%esi,%ebx,4),%eax
40f06d:	d3 e8                	shr    %cl,%eax
40f06f:	09 45 e0             	or     %eax,-0x20(%ebp)
40f072:	33 f6                	xor    %esi,%esi
40f074:	c7 45 e4 00 00 00 00 	movl   $0x0,-0x1c(%ebp)
40f07b:	83 c2 ff             	add    $0xffffffff,%edx
40f07e:	89 55 e8             	mov    %edx,-0x18(%ebp)
40f081:	0f 88 2e 02 00 00    	js     0x40f2b5
40f087:	8d 04 1a             	lea    (%edx,%ebx,1),%eax
40f08a:	8b 5d 08             	mov    0x8(%ebp),%ebx
40f08d:	89 45 c8             	mov    %eax,-0x38(%ebp)
40f090:	8d 4b 04             	lea    0x4(%ebx),%ecx
40f093:	8d 0c 91             	lea    (%ecx,%edx,4),%ecx
40f096:	89 4d c4             	mov    %ecx,-0x3c(%ebp)
40f099:	8d 4b fc             	lea    -0x4(%ebx),%ecx
40f09c:	8d 0c 81             	lea    (%ecx,%eax,4),%ecx
40f09f:	89 4d b4             	mov    %ecx,-0x4c(%ebp)
40f0a2:	3b 45 f8             	cmp    -0x8(%ebp),%eax
40f0a5:	77 05                	ja     0x40f0ac
40f0a7:	8b 41 08             	mov    0x8(%ecx),%eax
40f0aa:	eb 02                	jmp    0x40f0ae
40f0ac:	33 c0                	xor    %eax,%eax
40f0ae:	8b 51 04             	mov    0x4(%ecx),%edx
40f0b1:	8b 09                	mov    (%ecx),%ecx
40f0b3:	89 45 b8             	mov    %eax,-0x48(%ebp)
40f0b6:	c7 45 dc 00 00 00 00 	movl   $0x0,-0x24(%ebp)
40f0bd:	89 45 fc             	mov    %eax,-0x4(%ebp)
40f0c0:	89 4d ec             	mov    %ecx,-0x14(%ebp)
40f0c3:	85 ff                	test   %edi,%edi
40f0c5:	74 49                	je     0x40f110
40f0c7:	8b f9                	mov    %ecx,%edi
40f0c9:	8b c2                	mov    %edx,%eax
40f0cb:	8b 4d d4             	mov    -0x2c(%ebp),%ecx
40f0ce:	33 f6                	xor    %esi,%esi
40f0d0:	8b 55 fc             	mov    -0x4(%ebp),%edx
40f0d3:	d3 ef                	shr    %cl,%edi
40f0d5:	8b 4d f4             	mov    -0xc(%ebp),%ecx
40f0d8:	e8 b3 34 01 00       	call   0x422590
40f0dd:	8b 4d f4             	mov    -0xc(%ebp),%ecx
40f0e0:	0b f2                	or     %edx,%esi
40f0e2:	0b f8                	or     %eax,%edi
40f0e4:	8b c6                	mov    %esi,%eax
40f0e6:	8b 75 ec             	mov    -0x14(%ebp),%esi
40f0e9:	8b d7                	mov    %edi,%edx
40f0eb:	d3 e6                	shl    %cl,%esi
40f0ed:	83 7d c8 03          	cmpl   $0x3,-0x38(%ebp)
40f0f1:	89 45 fc             	mov    %eax,-0x4(%ebp)
40f0f4:	89 75 ec             	mov    %esi,-0x14(%ebp)
40f0f7:	72 17                	jb     0x40f110
40f0f9:	8b 45 cc             	mov    -0x34(%ebp),%eax
40f0fc:	03 45 e8             	add    -0x18(%ebp),%eax
40f0ff:	8b 4d d4             	mov    -0x2c(%ebp),%ecx
40f102:	8b 44 83 f8          	mov    -0x8(%ebx,%eax,4),%eax
40f106:	d3 e8                	shr    %cl,%eax
40f108:	0b f0                	or     %eax,%esi
40f10a:	8b 45 fc             	mov    -0x4(%ebp),%eax
40f10d:	89 75 ec             	mov    %esi,-0x14(%ebp)
40f110:	53                   	push   %ebx
40f111:	6a 00                	push   $0x0
40f113:	ff 75 d0             	push   -0x30(%ebp)
40f116:	50                   	push   %eax
40f117:	52                   	push   %edx
40f118:	e8 d3 33 01 00       	call   0x4224f0
40f11d:	89 5d dc             	mov    %ebx,-0x24(%ebp)
40f120:	5b                   	pop    %ebx
40f121:	90                   	nop
40f122:	8b d8                	mov    %eax,%ebx
40f124:	33 f6                	xor    %esi,%esi
40f126:	8b c2                	mov    %edx,%eax
40f128:	89 5d fc             	mov    %ebx,-0x4(%ebp)
40f12b:	89 45 f0             	mov    %eax,-0x10(%ebp)
40f12e:	8b f9                	mov    %ecx,%edi
40f130:	89 5d bc             	mov    %ebx,-0x44(%ebp)
40f133:	89 45 c0             	mov    %eax,-0x40(%ebp)
40f136:	89 75 dc             	mov    %esi,-0x24(%ebp)
40f139:	85 c0                	test   %eax,%eax
40f13b:	75 05                	jne    0x40f142
40f13d:	83 fb ff             	cmp    $0xffffffff,%ebx
40f140:	76 2a                	jbe    0x40f16c
40f142:	6a 00                	push   $0x0
40f144:	ff 75 d0             	push   -0x30(%ebp)
40f147:	83 c3 01             	add    $0x1,%ebx
40f14a:	83 d0 ff             	adc    $0xffffffff,%eax
40f14d:	50                   	push   %eax
40f14e:	53                   	push   %ebx
40f14f:	e8 bc 8a ff ff       	call   0x407c10
40f154:	03 f8                	add    %eax,%edi
40f156:	13 f2                	adc    %edx,%esi
40f158:	83 cb ff             	or     $0xffffffff,%ebx
40f15b:	33 c0                	xor    %eax,%eax
40f15d:	89 75 dc             	mov    %esi,-0x24(%ebp)
40f160:	89 5d fc             	mov    %ebx,-0x4(%ebp)
40f163:	89 5d bc             	mov    %ebx,-0x44(%ebp)
40f166:	89 45 f0             	mov    %eax,-0x10(%ebp)
40f169:	89 45 c0             	mov    %eax,-0x40(%ebp)
40f16c:	85 f6                	test   %esi,%esi
40f16e:	77 50                	ja     0x40f1c0
40f170:	72 05                	jb     0x40f177
40f172:	83 ff ff             	cmp    $0xffffffff,%edi
40f175:	77 49                	ja     0x40f1c0
40f177:	50                   	push   %eax
40f178:	53                   	push   %ebx
40f179:	33 c9                	xor    %ecx,%ecx
40f17b:	8b f7                	mov    %edi,%esi
40f17d:	0b 4d ec             	or     -0x14(%ebp),%ecx
40f180:	6a 00                	push   $0x0
40f182:	ff 75 e0             	push   -0x20(%ebp)
40f185:	89 4d fc             	mov    %ecx,-0x4(%ebp)
40f188:	e8 83 8a ff ff       	call   0x407c10
40f18d:	3b d6                	cmp    %esi,%edx
40f18f:	72 29                	jb     0x40f1ba
40f191:	77 05                	ja     0x40f198
40f193:	3b 45 fc             	cmp    -0x4(%ebp),%eax
40f196:	76 22                	jbe    0x40f1ba
40f198:	8b 45 f0             	mov    -0x10(%ebp),%eax
40f19b:	83 c3 ff             	add    $0xffffffff,%ebx
40f19e:	89 5d bc             	mov    %ebx,-0x44(%ebp)
40f1a1:	83 d0 ff             	adc    $0xffffffff,%eax
40f1a4:	03 7d d0             	add    -0x30(%ebp),%edi
40f1a7:	89 45 f0             	mov    %eax,-0x10(%ebp)
40f1aa:	83 55 dc 00          	adcl   $0x0,-0x24(%ebp)
40f1ae:	89 45 c0             	mov    %eax,-0x40(%ebp)
40f1b1:	75 0a                	jne    0x40f1bd
40f1b3:	83 ff ff             	cmp    $0xffffffff,%edi
40f1b6:	76 bf                	jbe    0x40f177
40f1b8:	eb 03                	jmp    0x40f1bd
40f1ba:	8b 45 f0             	mov    -0x10(%ebp),%eax
40f1bd:	89 5d fc             	mov    %ebx,-0x4(%ebp)
40f1c0:	85 c0                	test   %eax,%eax
40f1c2:	75 08                	jne    0x40f1cc
40f1c4:	85 db                	test   %ebx,%ebx
40f1c6:	0f 84 b3 00 00 00    	je     0x40f27f
40f1cc:	8b 4d cc             	mov    -0x34(%ebp),%ecx
40f1cf:	33 ff                	xor    %edi,%edi
40f1d1:	33 f6                	xor    %esi,%esi
40f1d3:	85 c9                	test   %ecx,%ecx
40f1d5:	74 55                	je     0x40f22c
40f1d7:	8b 45 0c             	mov    0xc(%ebp),%eax
40f1da:	8b 5d c4             	mov    -0x3c(%ebp),%ebx
40f1dd:	83 c0 04             	add    $0x4,%eax
40f1e0:	89 45 dc             	mov    %eax,-0x24(%ebp)
40f1e3:	89 4d ec             	mov    %ecx,-0x14(%ebp)
40f1e6:	8b 00                	mov    (%eax),%eax
40f1e8:	89 45 f8             	mov    %eax,-0x8(%ebp)
40f1eb:	8b 45 c0             	mov    -0x40(%ebp),%eax
40f1ee:	f7 65 f8             	mull   -0x8(%ebp)
40f1f1:	8b c8                	mov    %eax,%ecx
40f1f3:	8b 45 bc             	mov    -0x44(%ebp),%eax
40f1f6:	f7 65 f8             	mull   -0x8(%ebp)
40f1f9:	03 d1                	add    %ecx,%edx
40f1fb:	03 f8                	add    %eax,%edi
40f1fd:	8b 03                	mov    (%ebx),%eax
40f1ff:	8b cf                	mov    %edi,%ecx
40f201:	13 f2                	adc    %edx,%esi
40f203:	8b fe                	mov    %esi,%edi
40f205:	33 f6                	xor    %esi,%esi
40f207:	3b c1                	cmp    %ecx,%eax
40f209:	73 05                	jae    0x40f210
40f20b:	83 c7 01             	add    $0x1,%edi
40f20e:	13 f6                	adc    %esi,%esi
40f210:	2b c1                	sub    %ecx,%eax
40f212:	89 03                	mov    %eax,(%ebx)
40f214:	83 c3 04             	add    $0x4,%ebx
40f217:	8b 45 dc             	mov    -0x24(%ebp),%eax
40f21a:	83 c0 04             	add    $0x4,%eax
40f21d:	83 6d ec 01          	subl   $0x1,-0x14(%ebp)
40f221:	89 45 dc             	mov    %eax,-0x24(%ebp)
40f224:	75 c0                	jne    0x40f1e6
40f226:	8b 5d fc             	mov    -0x4(%ebp),%ebx
40f229:	8b 4d cc             	mov    -0x34(%ebp),%ecx
40f22c:	33 c0                	xor    %eax,%eax
40f22e:	3b c6                	cmp    %esi,%eax
40f230:	77 46                	ja     0x40f278
40f232:	72 05                	jb     0x40f239
40f234:	39 7d b8             	cmp    %edi,-0x48(%ebp)
40f237:	73 3f                	jae    0x40f278
40f239:	85 c9                	test   %ecx,%ecx
40f23b:	74 34                	je     0x40f271
40f23d:	8b 75 0c             	mov    0xc(%ebp),%esi
40f240:	33 db                	xor    %ebx,%ebx
40f242:	8b 55 c4             	mov    -0x3c(%ebp),%edx
40f245:	83 c6 04             	add    $0x4,%esi
40f248:	8b f9                	mov    %ecx,%edi
40f24a:	8d 9b 00 00 00 00    	lea    0x0(%ebx),%ebx
40f250:	8b 0a                	mov    (%edx),%ecx
40f252:	8d 76 04             	lea    0x4(%esi),%esi
40f255:	33 c0                	xor    %eax,%eax
40f257:	8d 52 04             	lea    0x4(%edx),%edx
40f25a:	03 4e fc             	add    -0x4(%esi),%ecx
40f25d:	13 c0                	adc    %eax,%eax
40f25f:	03 cb                	add    %ebx,%ecx
40f261:	89 4a fc             	mov    %ecx,-0x4(%edx)
40f264:	83 d0 00             	adc    $0x0,%eax
40f267:	8b d8                	mov    %eax,%ebx
40f269:	83 ef 01             	sub    $0x1,%edi
40f26c:	75 e2                	jne    0x40f250
40f26e:	8b 5d fc             	mov    -0x4(%ebp),%ebx
40f271:	83 c3 ff             	add    $0xffffffff,%ebx
40f274:	83 55 f0 ff          	adcl   $0xffffffff,-0x10(%ebp)
40f278:	8b 45 c8             	mov    -0x38(%ebp),%eax
40f27b:	48                   	dec    %eax
40f27c:	89 45 f8             	mov    %eax,-0x8(%ebp)
40f27f:	8b 75 e4             	mov    -0x1c(%ebp),%esi
40f282:	33 c0                	xor    %eax,%eax
40f284:	8b 55 e8             	mov    -0x18(%ebp),%edx
40f287:	03 c3                	add    %ebx,%eax
40f289:	8b 4d b4             	mov    -0x4c(%ebp),%ecx
40f28c:	8b 5d 08             	mov    0x8(%ebp),%ebx
40f28f:	83 d6 00             	adc    $0x0,%esi
40f292:	83 6d c4 04          	subl   $0x4,-0x3c(%ebp)
40f296:	4a                   	dec    %edx
40f297:	8b 7d f4             	mov    -0xc(%ebp),%edi
40f29a:	83 e9 04             	sub    $0x4,%ecx
40f29d:	89 45 e4             	mov    %eax,-0x1c(%ebp)
40f2a0:	8b 45 c8             	mov    -0x38(%ebp),%eax
40f2a3:	48                   	dec    %eax
40f2a4:	89 55 e8             	mov    %edx,-0x18(%ebp)
40f2a7:	89 45 c8             	mov    %eax,-0x38(%ebp)
40f2aa:	89 4d b4             	mov    %ecx,-0x4c(%ebp)
40f2ad:	85 d2                	test   %edx,%edx
40f2af:	0f 89 ed fd ff ff    	jns    0x40f0a2
40f2b5:	8b 4d f8             	mov    -0x8(%ebp),%ecx
40f2b8:	8b 5d 08             	mov    0x8(%ebp),%ebx
40f2bb:	41                   	inc    %ecx
40f2bc:	8b c1                	mov    %ecx,%eax
40f2be:	3b 03                	cmp    (%ebx),%eax
40f2c0:	73 1c                	jae    0x40f2de
40f2c2:	8d 53 04             	lea    0x4(%ebx),%edx
40f2c5:	8d 14 82             	lea    (%edx,%eax,4),%edx
40f2c8:	eb 06                	jmp    0x40f2d0
40f2ca:	8d 9b 00 00 00 00    	lea    0x0(%ebx),%ebx
40f2d0:	c7 02 00 00 00 00    	movl   $0x0,(%edx)
40f2d6:	8d 52 04             	lea    0x4(%edx),%edx
40f2d9:	40                   	inc    %eax
40f2da:	3b 03                	cmp    (%ebx),%eax
40f2dc:	72 f2                	jb     0x40f2d0
40f2de:	89 0b                	mov    %ecx,(%ebx)
40f2e0:	85 c9                	test   %ecx,%ecx
40f2e2:	74 0d                	je     0x40f2f1
40f2e4:	83 3c 8b 00          	cmpl   $0x0,(%ebx,%ecx,4)
40f2e8:	75 07                	jne    0x40f2f1
40f2ea:	83 c1 ff             	add    $0xffffffff,%ecx
40f2ed:	89 0b                	mov    %ecx,(%ebx)
40f2ef:	75 f3                	jne    0x40f2e4
40f2f1:	8b 45 e4             	mov    -0x1c(%ebp),%eax
40f2f4:	8b d6                	mov    %esi,%edx
40f2f6:	5f                   	pop    %edi
40f2f7:	5e                   	pop    %esi
40f2f8:	5b                   	pop    %ebx
40f2f9:	8b e5                	mov    %ebp,%esp
40f2fb:	5d                   	pop    %ebp
40f2fc:	c3                   	ret
40f2fd:	5f                   	pop    %edi
40f2fe:	5e                   	pop    %esi
40f2ff:	33 c0                	xor    %eax,%eax
40f301:	33 d2                	xor    %edx,%edx
40f303:	5b                   	pop    %ebx
40f304:	8b e5                	mov    %ebp,%esp
40f306:	5d                   	pop    %ebp
40f307:	c3                   	ret
40f308:	8b ff                	mov    %edi,%edi
40f30a:	55                   	push   %ebp
40f30b:	8b ec                	mov    %esp,%ebp
40f30d:	8b 01                	mov    (%ecx),%eax
40f30f:	48                   	dec    %eax
40f310:	89 01                	mov    %eax,(%ecx)
40f312:	8a 4d 08             	mov    0x8(%ebp),%cl
40f315:	84 c9                	test   %cl,%cl
40f317:	74 14                	je     0x40f32d
40f319:	38 08                	cmp    %cl,(%eax)
40f31b:	74 10                	je     0x40f32d
40f31d:	e8 d9 fa ff ff       	call   0x40edfb
40f322:	c7 00 16 00 00 00    	movl   $0x16,(%eax)
40f328:	e8 54 dd ff ff       	call   0x40d081
40f32d:	5d                   	pop    %ebp
40f32e:	c2 04 00             	ret    $0x4
40f331:	8b ff                	mov    %edi,%edi
40f333:	55                   	push   %ebp
40f334:	8b ec                	mov    %esp,%ebp
40f336:	8b 01                	mov    (%ecx),%eax
40f338:	83 c0 fe             	add    $0xfffffffe,%eax
40f33b:	89 01                	mov    %eax,(%ecx)
40f33d:	66 8b 4d 08          	mov    0x8(%ebp),%cx
40f341:	66 85 c9             	test   %cx,%cx
40f344:	74 15                	je     0x40f35b
40f346:	66 39 08             	cmp    %cx,(%eax)
40f349:	74 10                	je     0x40f35b
40f34b:	e8 ab fa ff ff       	call   0x40edfb
40f350:	c7 00 16 00 00 00    	movl   $0x16,(%eax)
40f356:	e8 26 dd ff ff       	call   0x40d081
40f35b:	5d                   	pop    %ebp
40f35c:	c2 04 00             	ret    $0x4
40f35f:	8b ff                	mov    %edi,%edi
40f361:	55                   	push   %ebp
40f362:	8b ec                	mov    %esp,%ebp
40f364:	8b 4d 10             	mov    0x10(%ebp),%ecx
40f367:	56                   	push   %esi
40f368:	85 c9                	test   %ecx,%ecx
40f36a:	74 30                	je     0x40f39c
40f36c:	8b 55 08             	mov    0x8(%ebp),%edx
40f36f:	8b 31                	mov    (%ecx),%esi
40f371:	8d 42 01             	lea    0x1(%edx),%eax
40f374:	3d 00 01 00 00       	cmp    $0x100,%eax
40f379:	77 0b                	ja     0x40f386
40f37b:	8b 06                	mov    (%esi),%eax
40f37d:	0f b7 04 50          	movzwl (%eax,%edx,2),%eax
40f381:	23 45 0c             	and    0xc(%ebp),%eax
40f384:	eb 2a                	jmp    0x40f3b0
40f386:	83 7e 04 01          	cmpl   $0x1,0x4(%esi)
40f38a:	7e 0c                	jle    0x40f398
40f38c:	51                   	push   %ecx
40f38d:	ff 75 0c             	push   0xc(%ebp)
40f390:	52                   	push   %edx