00401000 <.text>:
401000:	55                   	push   %ebp
401001:	8b ec                	mov    %esp,%ebp
401003:	83 ec 5c             	sub    $0x5c,%esp
401006:	83 7d 0c 0f          	cmpl   $0xf,0xc(%ebp)
40100a:	74 2b                	je     0x401037
40100c:	83 7d 0c 46          	cmpl   $0x46,0xc(%ebp)
401010:	8b 45 14             	mov    0x14(%ebp),%eax
401013:	75 0d                	jne    0x401022
401015:	83 48 18 10          	orl    $0x10,0x18(%eax)
401019:	8b 0d 48 a2 42 00    	mov    0x42a248,%ecx
40101f:	89 48 04             	mov    %ecx,0x4(%eax)
401022:	50                   	push   %eax
401023:	ff 75 10             	push   0x10(%ebp)
401026:	ff 75 0c             	push   0xc(%ebp)
401029:	ff 75 08             	push   0x8(%ebp)
40102c:	ff 15 1c 82 40 00    	call   *0x40821c
401032:	e9 42 01 00 00       	jmp    0x401179
401037:	53                   	push   %ebx
401038:	56                   	push   %esi
401039:	8b 35 54 a2 42 00    	mov    0x42a254,%esi
40103f:	8d 45 a4             	lea    -0x5c(%ebp),%eax
401042:	57                   	push   %edi
401043:	50                   	push   %eax
401044:	ff 75 08             	push   0x8(%ebp)
401047:	ff 15 20 82 40 00    	call   *0x408220
40104d:	83 65 f4 00          	andl   $0x0,-0xc(%ebp)
401051:	89 45 0c             	mov    %eax,0xc(%ebp)
401054:	8d 45 e4             	lea    -0x1c(%ebp),%eax
401057:	50                   	push   %eax
401058:	ff 75 08             	push   0x8(%ebp)
40105b:	ff 15 24 82 40 00    	call   *0x408224
401061:	8b 7d f0             	mov    -0x10(%ebp),%edi
401064:	83 65 f0 00          	andl   $0x0,-0x10(%ebp)
401068:	8b 1d 5c 80 40 00    	mov    0x40805c,%ebx
40106e:	e9 80 00 00 00       	jmp    0x4010f3
401073:	0f b6 46 52          	movzbl 0x52(%esi),%eax
401077:	0f b6 56 56          	movzbl 0x56(%esi),%edx
40107b:	0f af 55 e8          	imul   -0x18(%ebp),%edx
40107f:	8b cf                	mov    %edi,%ecx
401081:	2b 4d e8             	sub    -0x18(%ebp),%ecx
401084:	0f af c1             	imul   %ecx,%eax
401087:	03 c2                	add    %edx,%eax
401089:	89 4d 10             	mov    %ecx,0x10(%ebp)
40108c:	99                   	cltd
40108d:	f7 ff                	idiv   %edi
40108f:	33 d2                	xor    %edx,%edx
401091:	8a f0                	mov    %al,%dh
401093:	0f b6 46 51          	movzbl 0x51(%esi),%eax
401097:	0f af c1             	imul   %ecx,%eax
40109a:	0f b6 4e 55          	movzbl 0x55(%esi),%ecx
40109e:	0f af 4d e8          	imul   -0x18(%ebp),%ecx
4010a2:	03 c1                	add    %ecx,%eax
4010a4:	8b ca                	mov    %edx,%ecx
4010a6:	99                   	cltd
4010a7:	f7 ff                	idiv   %edi
4010a9:	0f b6 56 54          	movzbl 0x54(%esi),%edx
4010ad:	0f af 55 e8          	imul   -0x18(%ebp),%edx
4010b1:	8a c8                	mov    %al,%cl
4010b3:	0f b6 46 50          	movzbl 0x50(%esi),%eax
4010b7:	0f af 45 10          	imul   0x10(%ebp),%eax
4010bb:	03 c2                	add    %edx,%eax
4010bd:	99                   	cltd
4010be:	f7 ff                	idiv   %edi
4010c0:	c1 e1 08             	shl    $0x8,%ecx
4010c3:	0f b6 c0             	movzbl %al,%eax
4010c6:	0b c8                	or     %eax,%ecx
4010c8:	8d 45 f4             	lea    -0xc(%ebp),%eax
4010cb:	50                   	push   %eax
4010cc:	89 4d f8             	mov    %ecx,-0x8(%ebp)
4010cf:	ff 15 64 80 40 00    	call   *0x408064
4010d5:	83 45 f0 04          	addl   $0x4,-0x10(%ebp)
4010d9:	89 45 14             	mov    %eax,0x14(%ebp)
4010dc:	50                   	push   %eax
4010dd:	8d 45 e4             	lea    -0x1c(%ebp),%eax
4010e0:	50                   	push   %eax
4010e1:	ff 75 0c             	push   0xc(%ebp)
4010e4:	ff 15 28 82 40 00    	call   *0x408228
4010ea:	ff 75 14             	push   0x14(%ebp)
4010ed:	ff d3                	call   *%ebx
4010ef:	83 45 e8 04          	addl   $0x4,-0x18(%ebp)
4010f3:	39 7d e8             	cmp    %edi,-0x18(%ebp)
4010f6:	0f 8c 77 ff ff ff    	jl     0x401073
4010fc:	83 7e 58 ff          	cmpl   $0xffffffff,0x58(%esi)
401100:	74 65                	je     0x401167
401102:	ff 76 34             	push   0x34(%esi)
401105:	ff 15 54 80 40 00    	call   *0x408054
40110b:	85 c0                	test   %eax,%eax
40110d:	89 45 14             	mov    %eax,0x14(%ebp)
401110:	74 55                	je     0x401167
401112:	8b 7d 0c             	mov    0xc(%ebp),%edi
401115:	6a 01                	push   $0x1
401117:	57                   	push   %edi
401118:	c7 45 e4 10 00 00 00 	movl   $0x10,-0x1c(%ebp)
40111f:	c7 45 e8 08 00 00 00 	movl   $0x8,-0x18(%ebp)
401126:	ff 15 50 80 40 00    	call   *0x408050
40112c:	ff 76 58             	push   0x58(%esi)
40112f:	57                   	push   %edi
401130:	ff 15 58 80 40 00    	call   *0x408058
401136:	ff 75 14             	push   0x14(%ebp)
401139:	8b 35 4c 80 40 00    	mov    0x40804c,%esi
40113f:	57                   	push   %edi
401140:	ff d6                	call   *%esi
401142:	89 45 0c             	mov    %eax,0xc(%ebp)
401145:	8d 45 e4             	lea    -0x1c(%ebp),%eax
401148:	68 20 08 00 00       	push   $0x820
40114d:	50                   	push   %eax
40114e:	6a ff                	push   $0xffffffff
401150:	68 40 92 42 00       	push   $0x429240
401155:	57                   	push   %edi
401156:	ff 15 2c 82 40 00    	call   *0x40822c
40115c:	ff 75 0c             	push   0xc(%ebp)
40115f:	57                   	push   %edi
401160:	ff d6                	call   *%esi
401162:	ff 75 14             	push   0x14(%ebp)
401165:	ff d3                	call   *%ebx
401167:	8d 45 a4             	lea    -0x5c(%ebp),%eax
40116a:	50                   	push   %eax
40116b:	ff 75 08             	push   0x8(%ebp)
40116e:	ff 15 84 82 40 00    	call   *0x408284
401174:	5f                   	pop    %edi
401175:	5e                   	pop    %esi
401176:	33 c0                	xor    %eax,%eax
401178:	5b                   	pop    %ebx
401179:	c9                   	leave
40117a:	c2 10 00             	ret    $0x10
40117d:	8b 4c 24 04          	mov    0x4(%esp),%ecx
401181:	a1 88 a2 42 00       	mov    0x42a288,%eax
401186:	8b d1                	mov    %ecx,%edx
401188:	53                   	push   %ebx
401189:	69 d2 18 08 00 00    	imul   $0x818,%edx,%edx
40118f:	56                   	push   %esi
401190:	57                   	push   %edi
401191:	8b 54 02 08          	mov    0x8(%edx,%eax,1),%edx
401195:	f6 c2 02             	test   $0x2,%dl
401198:	74 4f                	je     0x4011e9
40119a:	8d 71 01             	lea    0x1(%ecx),%esi
40119d:	33 ff                	xor    %edi,%edi
40119f:	3b 35 8c a2 42 00    	cmp    0x42a28c,%esi
4011a5:	73 42                	jae    0x4011e9
4011a7:	8b ce                	mov    %esi,%ecx
4011a9:	69 c9 18 08 00 00    	imul   $0x818,%ecx,%ecx
4011af:	8d 44 01 08          	lea    0x8(%ecx,%eax,1),%eax
4011b3:	8b 08                	mov    (%eax),%ecx
4011b5:	f6 c1 02             	test   $0x2,%cl
4011b8:	74 03                	je     0x4011bd
4011ba:	47                   	inc    %edi
4011bb:	eb 1e                	jmp    0x4011db
4011bd:	f6 c1 04             	test   $0x4,%cl
4011c0:	74 09                	je     0x4011cb
4011c2:	8b cf                	mov    %edi,%ecx
4011c4:	4f                   	dec    %edi
4011c5:	85 c9                	test   %ecx,%ecx
4011c7:	74 20                	je     0x4011e9
4011c9:	eb 10                	jmp    0x4011db
4011cb:	f6 c1 10             	test   $0x10,%cl
4011ce:	75 0b                	jne    0x4011db
4011d0:	8b d9                	mov    %ecx,%ebx
4011d2:	33 da                	xor    %edx,%ebx
4011d4:	83 e3 01             	and    $0x1,%ebx
4011d7:	33 d9                	xor    %ecx,%ebx
4011d9:	89 18                	mov    %ebx,(%eax)
4011db:	46                   	inc    %esi
4011dc:	05 18 08 00 00       	add    $0x818,%eax
4011e1:	3b 35 8c a2 42 00    	cmp    0x42a28c,%esi
4011e7:	72 ca                	jb     0x4011b3
4011e9:	5f                   	pop    %edi
4011ea:	5e                   	pop    %esi
4011eb:	5b                   	pop    %ebx
4011ec:	c2 04 00             	ret    $0x4
4011ef:	55                   	push   %ebp
4011f0:	8b ec                	mov    %esp,%ebp
4011f2:	51                   	push   %ecx
4011f3:	51                   	push   %ecx
4011f4:	8b 55 08             	mov    0x8(%ebp),%edx
4011f7:	53                   	push   %ebx
4011f8:	56                   	push   %esi
4011f9:	8b f2                	mov    %edx,%esi
4011fb:	69 f6 18 08 00 00    	imul   $0x818,%esi,%esi
401201:	8b 1d 88 a2 42 00    	mov    0x42a288,%ebx
401207:	33 c9                	xor    %ecx,%ecx
401209:	03 f3                	add    %ebx,%esi
40120b:	57                   	push   %edi
40120c:	89 4d fc             	mov    %ecx,-0x4(%ebp)
40120f:	89 4d f8             	mov    %ecx,-0x8(%ebp)
401212:	8b 46 08             	mov    0x8(%esi),%eax
401215:	a8 02                	test   $0x2,%al
401217:	74 0b                	je     0x401224
401219:	39 4d 0c             	cmp    %ecx,0xc(%ebp)
40121c:	74 06                	je     0x401224
40121e:	24 be                	and    $0xbe,%al
401220:	42                   	inc    %edx
401221:	89 46 08             	mov    %eax,0x8(%esi)
401224:	3b 15 8c a2 42 00    	cmp    0x42a28c,%edx
40122a:	73 44                	jae    0x401270
40122c:	8b c2                	mov    %edx,%eax
40122e:	69 c0 18 08 00 00    	imul   $0x818,%eax,%eax
401234:	8d 7c 18 08          	lea    0x8(%eax,%ebx,1),%edi
401238:	8d 42 01             	lea    0x1(%edx),%eax
40123b:	8b 0f                	mov    (%edi),%ecx
40123d:	f6 c1 02             	test   $0x2,%cl
401240:	74 0a                	je     0x40124c
401242:	6a 01                	push   $0x1
401244:	52                   	push   %edx
401245:	e8 a5 ff ff ff       	call   0x4011ef
40124a:	8b 0f                	mov    (%edi),%ecx
40124c:	f6 c1 04             	test   $0x4,%cl
40124f:	75 28                	jne    0x401279
401251:	f6 c1 40             	test   $0x40,%cl
401254:	74 03                	je     0x401259
401256:	ff 45 fc             	incl   -0x4(%ebp)
401259:	f6 c1 01             	test   $0x1,%cl
40125c:	74 05                	je     0x401263
40125e:	ff 45 fc             	incl   -0x4(%ebp)
401261:	eb 03                	jmp    0x401266
401263:	ff 45 f8             	incl   -0x8(%ebp)
401266:	3b 05 8c a2 42 00    	cmp    0x42a28c,%eax
40126c:	8b d0                	mov    %eax,%edx
40126e:	72 bc                	jb     0x40122c
401270:	33 c0                	xor    %eax,%eax
401272:	5f                   	pop    %edi
401273:	5e                   	pop    %esi
401274:	5b                   	pop    %ebx
401275:	c9                   	leave
401276:	c2 08 00             	ret    $0x8
401279:	83 7d fc 00          	cmpl   $0x0,-0x4(%ebp)
40127d:	74 f3                	je     0x401272
40127f:	83 7d f8 00          	cmpl   $0x0,-0x8(%ebp)
401283:	74 06                	je     0x40128b
401285:	83 4e 08 40          	orl    $0x40,0x8(%esi)
401289:	eb e7                	jmp    0x401272
40128b:	8b 4e 08             	mov    0x8(%esi),%ecx
40128e:	80 e1 7f             	and    $0x7f,%cl
401291:	83 c9 01             	or     $0x1,%ecx
401294:	89 4e 08             	mov    %ecx,0x8(%esi)
401297:	eb d9                	jmp    0x401272
401299:	8b 4c 24 04          	mov    0x4(%esp),%ecx
40129d:	a1 88 a2 42 00       	mov    0x42a288,%eax
4012a2:	56                   	push   %esi
4012a3:	33 f6                	xor    %esi,%esi
4012a5:	83 f9 20             	cmp    $0x20,%ecx
4012a8:	73 34                	jae    0x4012de
4012aa:	39 35 8c a2 42 00    	cmp    %esi,0x42a28c
4012b0:	76 2c                	jbe    0x4012de
4012b2:	8d 50 08             	lea    0x8(%eax),%edx
4012b5:	57                   	push   %edi
4012b6:	8b 02                	mov    (%edx),%eax
4012b8:	a8 06                	test   $0x6,%al
4012ba:	75 12                	jne    0x4012ce
4012bc:	33 ff                	xor    %edi,%edi
4012be:	47                   	inc    %edi
4012bf:	d3 e7                	shl    %cl,%edi
4012c1:	85 7a fc             	test   %edi,-0x4(%edx)
4012c4:	74 04                	je     0x4012ca
4012c6:	0c 01                	or     $0x1,%al
4012c8:	eb 02                	jmp    0x4012cc
4012ca:	24 fe                	and    $0xfe,%al
4012cc:	89 02                	mov    %eax,(%edx)
4012ce:	46                   	inc    %esi
4012cf:	81 c2 18 08 00 00    	add    $0x818,%edx
4012d5:	3b 35 8c a2 42 00    	cmp    0x42a28c,%esi
4012db:	72 d9                	jb     0x4012b6
4012dd:	5f                   	pop    %edi
4012de:	5e                   	pop    %esi
4012df:	c2 04 00             	ret    $0x4
4012e2:	55                   	push   %ebp
4012e3:	8b ec                	mov    %esp,%ebp
4012e5:	83 ec 0c             	sub    $0xc,%esp
4012e8:	a1 54 a2 42 00       	mov    0x42a254,%eax
4012ed:	83 65 fc 00          	andl   $0x0,-0x4(%ebp)
4012f1:	53                   	push   %ebx
4012f2:	56                   	push   %esi
4012f3:	05 94 00 00 00       	add    $0x94,%eax
4012f8:	57                   	push   %edi
4012f9:	8b 3d 8c a2 42 00    	mov    0x42a28c,%edi
4012ff:	89 45 f8             	mov    %eax,-0x8(%ebp)
401302:	8b 45 f8             	mov    -0x8(%ebp),%eax
401305:	33 db                	xor    %ebx,%ebx
401307:	39 18                	cmp    %ebx,(%eax)
401309:	74 4b                	je     0x401356
40130b:	3b df                	cmp    %edi,%ebx
40130d:	73 45                	jae    0x401354
40130f:	8b 35 88 a2 42 00    	mov    0x42a288,%esi
401315:	83 c6 08             	add    $0x8,%esi
401318:	8b 16                	mov    (%esi),%edx
40131a:	f6 c2 06             	test   $0x6,%dl
40131d:	75 28                	jne    0x401347
40131f:	8b 45 08             	mov    0x8(%ebp),%eax
401322:	85 c0                	test   %eax,%eax
401324:	74 06                	je     0x40132c
401326:	83 3c 98 00          	cmpl   $0x0,(%eax,%ebx,4)
40132a:	74 1b                	je     0x401347
40132c:	8b 4d fc             	mov    -0x4(%ebp),%ecx
40132f:	33 c0                	xor    %eax,%eax
401331:	40                   	inc    %eax
401332:	83 e2 01             	and    $0x1,%edx
401335:	d3 e0                	shl    %cl,%eax
401337:	8b 4e fc             	mov    -0x4(%esi),%ecx
40133a:	23 c8                	and    %eax,%ecx
40133c:	8b c1                	mov    %ecx,%eax
40133e:	8b 4d fc             	mov    -0x4(%ebp),%ecx
401341:	d3 e2                	shl    %cl,%edx
401343:	3b c2                	cmp    %edx,%eax
401345:	75 0b                	jne    0x401352
401347:	43                   	inc    %ebx
401348:	81 c6 18 08 00 00    	add    $0x818,%esi
40134e:	3b df                	cmp    %edi,%ebx
401350:	72 c6                	jb     0x401318
401352:	3b df                	cmp    %edi,%ebx
401354:	74 0d                	je     0x401363
401356:	ff 45 fc             	incl   -0x4(%ebp)
401359:	83 45 f8 04          	addl   $0x4,-0x8(%ebp)
40135d:	83 7d fc 20          	cmpl   $0x20,-0x4(%ebp)
401361:	72 9f                	jb     0x401302
401363:	8b 45 fc             	mov    -0x4(%ebp),%eax
401366:	5f                   	pop    %edi
401367:	5e                   	pop    %esi
401368:	5b                   	pop    %ebx
401369:	c9                   	leave
40136a:	c2 04 00             	ret    $0x4
40136d:	8b 44 24 04          	mov    0x4(%esp),%eax
401371:	85 c0                	test   %eax,%eax
401373:	7d 11                	jge    0x401386
401375:	40                   	inc    %eax
401376:	b9 00 b0 42 00       	mov    $0x42b000,%ecx
40137b:	c1 e0 0b             	shl    $0xb,%eax
40137e:	2b c8                	sub    %eax,%ecx
401380:	51                   	push   %ecx
401381:	e8 c2 4f 00 00       	call   0x406348
401386:	c2 04 00             	ret    $0x4
401389:	56                   	push   %esi
40138a:	8b 74 24 08          	mov    0x8(%esp),%esi
40138e:	eb 6a                	jmp    0x4013fa
401390:	8b c6                	mov    %esi,%eax
401392:	8b 0d 90 a2 42 00    	mov    0x42a290,%ecx
401398:	6b c0 1c             	imul   $0x1c,%eax,%eax
40139b:	03 c1                	add    %ecx,%eax
40139d:	83 38 01             	cmpl   $0x1,(%eax)
4013a0:	74 5c                	je     0x4013fe
4013a2:	50                   	push   %eax
4013a3:	e8 8c 00 00 00       	call   0x401434
4013a8:	3d ff ff ff 7f       	cmp    $0x7fffffff,%eax
4013ad:	74 55                	je     0x401404
4013af:	50                   	push   %eax
4013b0:	e8 b8 ff ff ff       	call   0x40136d
4013b5:	85 c0                	test   %eax,%eax
4013b7:	75 04                	jne    0x4013bd
4013b9:	40                   	inc    %eax
4013ba:	46                   	inc    %esi
4013bb:	eb 07                	jmp    0x4013c4