40a002:	c6 45 d9 cc          	movb   $0xcc,-0x27(%ebp)
40a006:	c6 45 da fb          	movb   $0xfb,-0x26(%ebp)
40a00a:	c6 45 db 3f          	movb   $0x3f,-0x25(%ebp)
40a00e:	c7 45 8c 01 00 00 00 	movl   $0x1,-0x74(%ebp)
40a015:	89 4d 90             	mov    %ecx,-0x70(%ebp)
40a018:	66 85 c9             	test   %cx,%cx
40a01b:	74 06                	je     0x40a023
40a01d:	c6 43 02 2d          	movb   $0x2d,0x2(%ebx)
40a021:	eb 04                	jmp    0x40a027
40a023:	c6 43 02 20          	movb   $0x20,0x2(%ebx)
40a027:	8b 75 f4             	mov    -0xc(%ebp),%esi
40a02a:	8b 7d f0             	mov    -0x10(%ebp),%edi
40a02d:	66 85 d2             	test   %dx,%dx
40a030:	75 2f                	jne    0x40a061
40a032:	85 f6                	test   %esi,%esi
40a034:	75 2b                	jne    0x40a061
40a036:	85 ff                	test   %edi,%edi
40a038:	75 27                	jne    0x40a061
40a03a:	33 d2                	xor    %edx,%edx
40a03c:	66 3b c8             	cmp    %ax,%cx
40a03f:	0f 95 c0             	setne  %al
40a042:	fe c8                	dec    %al
40a044:	24 0d                	and    $0xd,%al
40a046:	04 20                	add    $0x20,%al
40a048:	66 89 13             	mov    %dx,(%ebx)
40a04b:	88 43 02             	mov    %al,0x2(%ebx)
40a04e:	c6 43 03 01          	movb   $0x1,0x3(%ebx)
40a052:	c6 43 04 30          	movb   $0x30,0x4(%ebx)
40a056:	88 53 05             	mov    %dl,0x5(%ebx)
40a059:	33 c0                	xor    %eax,%eax
40a05b:	40                   	inc    %eax
40a05c:	e9 1e 08 00 00       	jmp    0x40a87f
40a061:	b8 ff 7f 00 00       	mov    $0x7fff,%eax
40a066:	66 3b d0             	cmp    %ax,%dx
40a069:	0f 85 9f 00 00 00    	jne    0x40a10e
40a06f:	33 c0                	xor    %eax,%eax
40a071:	40                   	inc    %eax
40a072:	66 89 03             	mov    %ax,(%ebx)
40a075:	b8 00 00 00 80       	mov    $0x80000000,%eax
40a07a:	3b f0                	cmp    %eax,%esi
40a07c:	75 04                	jne    0x40a082
40a07e:	85 ff                	test   %edi,%edi
40a080:	74 0f                	je     0x40a091
40a082:	f7 c6 00 00 00 40    	test   $0x40000000,%esi
40a088:	75 07                	jne    0x40a091
40a08a:	68 cc e4 41 00       	push   $0x41e4cc
40a08f:	eb 51                	jmp    0x40a0e2
40a091:	66 85 c9             	test   %cx,%cx
40a094:	74 13                	je     0x40a0a9
40a096:	81 fe 00 00 00 c0    	cmp    $0xc0000000,%esi
40a09c:	75 0b                	jne    0x40a0a9
40a09e:	85 ff                	test   %edi,%edi
40a0a0:	75 3b                	jne    0x40a0dd
40a0a2:	68 c4 e4 41 00       	push   $0x41e4c4
40a0a7:	eb 0d                	jmp    0x40a0b6
40a0a9:	3b f0                	cmp    %eax,%esi
40a0ab:	75 30                	jne    0x40a0dd
40a0ad:	85 ff                	test   %edi,%edi
40a0af:	75 2c                	jne    0x40a0dd
40a0b1:	68 bc e4 41 00       	push   $0x41e4bc
40a0b6:	8d 43 04             	lea    0x4(%ebx),%eax
40a0b9:	6a 16                	push   $0x16
40a0bb:	50                   	push   %eax
40a0bc:	e8 5a a4 ff ff       	call   0x40451b
40a0c1:	83 c4 0c             	add    $0xc,%esp
40a0c4:	33 f6                	xor    %esi,%esi
40a0c6:	85 c0                	test   %eax,%eax
40a0c8:	74 0d                	je     0x40a0d7
40a0ca:	56                   	push   %esi
40a0cb:	56                   	push   %esi
40a0cc:	56                   	push   %esi
40a0cd:	56                   	push   %esi
40a0ce:	56                   	push   %esi
40a0cf:	e8 45 9a ff ff       	call   0x403b19
40a0d4:	83 c4 14             	add    $0x14,%esp
40a0d7:	c6 43 03 05          	movb   $0x5,0x3(%ebx)
40a0db:	eb 2a                	jmp    0x40a107
40a0dd:	68 b4 e4 41 00       	push   $0x41e4b4
40a0e2:	8d 43 04             	lea    0x4(%ebx),%eax
40a0e5:	6a 16                	push   $0x16
40a0e7:	50                   	push   %eax
40a0e8:	e8 2e a4 ff ff       	call   0x40451b
40a0ed:	83 c4 0c             	add    $0xc,%esp
40a0f0:	33 f6                	xor    %esi,%esi
40a0f2:	85 c0                	test   %eax,%eax
40a0f4:	74 0d                	je     0x40a103
40a0f6:	56                   	push   %esi
40a0f7:	56                   	push   %esi
40a0f8:	56                   	push   %esi
40a0f9:	56                   	push   %esi
40a0fa:	56                   	push   %esi
40a0fb:	e8 19 9a ff ff       	call   0x403b19
40a100:	83 c4 14             	add    $0x14,%esp
40a103:	c6 43 03 06          	movb   $0x6,0x3(%ebx)
40a107:	33 c0                	xor    %eax,%eax
40a109:	e9 71 07 00 00       	jmp    0x40a87f
40a10e:	0f b7 ca             	movzwl %dx,%ecx
40a111:	8b d9                	mov    %ecx,%ebx
40a113:	69 c9 10 4d 00 00    	imul   $0x4d10,%ecx,%ecx
40a119:	c1 eb 08             	shr    $0x8,%ebx
40a11c:	8b c6                	mov    %esi,%eax
40a11e:	c1 e8 18             	shr    $0x18,%eax
40a121:	8d 04 43             	lea    (%ebx,%eax,2),%eax
40a124:	6b c0 4d             	imul   $0x4d,%eax,%eax
40a127:	8d 84 08 0c ed bc ec 	lea    -0x134312f4(%eax,%ecx,1),%eax
40a12e:	c1 f8 10             	sar    $0x10,%eax
40a131:	0f b7 c0             	movzwl %ax,%eax
40a134:	33 c9                	xor    %ecx,%ecx
40a136:	0f bf d8             	movswl %ax,%ebx
40a139:	66 89 4d e0          	mov    %cx,-0x20(%ebp)
40a13d:	b9 c0 fd 41 00       	mov    $0x41fdc0,%ecx
40a142:	f7 db                	neg    %ebx
40a144:	83 e9 60             	sub    $0x60,%ecx
40a147:	89 45 b4             	mov    %eax,-0x4c(%ebp)
40a14a:	66 89 55 ea          	mov    %dx,-0x16(%ebp)
40a14e:	89 75 e6             	mov    %esi,-0x1a(%ebp)
40a151:	89 7d e2             	mov    %edi,-0x1e(%ebp)
40a154:	89 4d 9c             	mov    %ecx,-0x64(%ebp)
40a157:	85 db                	test   %ebx,%ebx
40a159:	0f 84 9c 02 00 00    	je     0x40a3fb
40a15f:	7d 0d                	jge    0x40a16e
40a161:	b8 20 ff 41 00       	mov    $0x41ff20,%eax
40a166:	f7 db                	neg    %ebx
40a168:	83 e8 60             	sub    $0x60,%eax
40a16b:	89 45 9c             	mov    %eax,-0x64(%ebp)
40a16e:	85 db                	test   %ebx,%ebx
40a170:	0f 84 85 02 00 00    	je     0x40a3fb
40a176:	83 45 9c 54          	addl   $0x54,-0x64(%ebp)
40a17a:	8b cb                	mov    %ebx,%ecx
40a17c:	83 e1 07             	and    $0x7,%ecx
40a17f:	c1 fb 03             	sar    $0x3,%ebx
40a182:	85 c9                	test   %ecx,%ecx
40a184:	0f 84 67 02 00 00    	je     0x40a3f1
40a18a:	6b c9 0c             	imul   $0xc,%ecx,%ecx
40a18d:	03 4d 9c             	add    -0x64(%ebp),%ecx
40a190:	8b c1                	mov    %ecx,%eax
40a192:	89 4d bc             	mov    %ecx,-0x44(%ebp)
40a195:	b9 00 80 00 00       	mov    $0x8000,%ecx
40a19a:	66 39 08             	cmp    %cx,(%eax)
40a19d:	72 11                	jb     0x40a1b0
40a19f:	8b f0                	mov    %eax,%esi
40a1a1:	8d 7d c4             	lea    -0x3c(%ebp),%edi
40a1a4:	a5                   	movsl  %ds:(%esi),%es:(%edi)
40a1a5:	a5                   	movsl  %ds:(%esi),%es:(%edi)
40a1a6:	8d 45 c4             	lea    -0x3c(%ebp),%eax
40a1a9:	a5                   	movsl  %ds:(%esi),%es:(%edi)
40a1aa:	ff 4d c6             	decl   -0x3a(%ebp)
40a1ad:	89 45 bc             	mov    %eax,-0x44(%ebp)
40a1b0:	0f b7 50 0a          	movzwl 0xa(%eax),%edx
40a1b4:	33 c9                	xor    %ecx,%ecx
40a1b6:	89 4d ac             	mov    %ecx,-0x54(%ebp)
40a1b9:	89 4d f0             	mov    %ecx,-0x10(%ebp)
40a1bc:	89 4d f4             	mov    %ecx,-0xc(%ebp)
40a1bf:	89 4d f8             	mov    %ecx,-0x8(%ebp)
40a1c2:	8b 4d ea             	mov    -0x16(%ebp),%ecx
40a1c5:	8b f2                	mov    %edx,%esi
40a1c7:	33 f1                	xor    %ecx,%esi
40a1c9:	81 e6 00 80 00 00    	and    $0x8000,%esi
40a1cf:	89 75 b8             	mov    %esi,-0x48(%ebp)
40a1d2:	be ff 7f 00 00       	mov    $0x7fff,%esi
40a1d7:	23 ce                	and    %esi,%ecx
40a1d9:	23 d6                	and    %esi,%edx
40a1db:	8d 34 0a             	lea    (%edx,%ecx,1),%esi
40a1de:	0f b7 fe             	movzwl %si,%edi
40a1e1:	be ff 7f 00 00       	mov    $0x7fff,%esi
40a1e6:	66 3b ce             	cmp    %si,%cx
40a1e9:	0f 83 ac 02 00 00    	jae    0x40a49b
40a1ef:	66 3b d6             	cmp    %si,%dx
40a1f2:	0f 83 a3 02 00 00    	jae    0x40a49b
40a1f8:	be fd bf 00 00       	mov    $0xbffd,%esi
40a1fd:	66 3b fe             	cmp    %si,%di
40a200:	0f 87 95 02 00 00    	ja     0x40a49b
40a206:	be bf 3f 00 00       	mov    $0x3fbf,%esi
40a20b:	66 3b fe             	cmp    %si,%di
40a20e:	77 10                	ja     0x40a220
40a210:	33 f6                	xor    %esi,%esi
40a212:	89 75 e8             	mov    %esi,-0x18(%ebp)
40a215:	89 75 e4             	mov    %esi,-0x1c(%ebp)
40a218:	89 75 e0             	mov    %esi,-0x20(%ebp)
40a21b:	e9 d3 01 00 00       	jmp    0x40a3f3
40a220:	33 f6                	xor    %esi,%esi
40a222:	66 3b ce             	cmp    %si,%cx
40a225:	75 1f                	jne    0x40a246
40a227:	47                   	inc    %edi
40a228:	f7 45 e8 ff ff ff 7f 	testl  $0x7fffffff,-0x18(%ebp)
40a22f:	75 15                	jne    0x40a246
40a231:	39 75 e4             	cmp    %esi,-0x1c(%ebp)
40a234:	75 10                	jne    0x40a246
40a236:	39 75 e0             	cmp    %esi,-0x20(%ebp)
40a239:	75 0b                	jne    0x40a246
40a23b:	33 c0                	xor    %eax,%eax
40a23d:	66 89 45 ea          	mov    %ax,-0x16(%ebp)
40a241:	e9 ad 01 00 00       	jmp    0x40a3f3
40a246:	66 3b d6             	cmp    %si,%dx
40a249:	75 13                	jne    0x40a25e
40a24b:	47                   	inc    %edi
40a24c:	f7 40 08 ff ff ff 7f 	testl  $0x7fffffff,0x8(%eax)
40a253:	75 09                	jne    0x40a25e
40a255:	39 70 04             	cmp    %esi,0x4(%eax)
40a258:	75 04                	jne    0x40a25e
40a25a:	39 30                	cmp    %esi,(%eax)
40a25c:	74 b4                	je     0x40a212
40a25e:	21 75 a8             	and    %esi,-0x58(%ebp)
40a261:	8d 75 f4             	lea    -0xc(%ebp),%esi
40a264:	c7 45 c0 05 00 00 00 	movl   $0x5,-0x40(%ebp)
40a26b:	8b 4d a8             	mov    -0x58(%ebp),%ecx
40a26e:	8b 55 c0             	mov    -0x40(%ebp),%edx
40a271:	03 c9                	add    %ecx,%ecx
40a273:	89 55 b0             	mov    %edx,-0x50(%ebp)
40a276:	85 d2                	test   %edx,%edx
40a278:	7e 55                	jle    0x40a2cf
40a27a:	8d 4c 0d e0          	lea    -0x20(%ebp,%ecx,1),%ecx
40a27e:	83 c0 08             	add    $0x8,%eax
40a281:	89 4d 94             	mov    %ecx,-0x6c(%ebp)
40a284:	89 45 98             	mov    %eax,-0x68(%ebp)
40a287:	8b 45 94             	mov    -0x6c(%ebp),%eax
40a28a:	0f b7 08             	movzwl (%eax),%ecx
40a28d:	8b 45 98             	mov    -0x68(%ebp),%eax
40a290:	0f b7 00             	movzwl (%eax),%eax
40a293:	8b 56 fc             	mov    -0x4(%esi),%edx
40a296:	0f af c8             	imul   %eax,%ecx
40a299:	83 65 a4 00          	andl   $0x0,-0x5c(%ebp)
40a29d:	8d 04 0a             	lea    (%edx,%ecx,1),%eax
40a2a0:	3b c2                	cmp    %edx,%eax
40a2a2:	72 04                	jb     0x40a2a8
40a2a4:	3b c1                	cmp    %ecx,%eax
40a2a6:	73 07                	jae    0x40a2af
40a2a8:	c7 45 a4 01 00 00 00 	movl   $0x1,-0x5c(%ebp)
40a2af:	83 7d a4 00          	cmpl   $0x0,-0x5c(%ebp)
40a2b3:	89 46 fc             	mov    %eax,-0x4(%esi)
40a2b6:	74 03                	je     0x40a2bb
40a2b8:	66 ff 06             	incw   (%esi)
40a2bb:	83 45 94 02          	addl   $0x2,-0x6c(%ebp)
40a2bf:	83 6d 98 02          	subl   $0x2,-0x68(%ebp)
40a2c3:	ff 4d b0             	decl   -0x50(%ebp)
40a2c6:	83 7d b0 00          	cmpl   $0x0,-0x50(%ebp)
40a2ca:	7f bb                	jg     0x40a287
40a2cc:	8b 45 bc             	mov    -0x44(%ebp),%eax
40a2cf:	46                   	inc    %esi
40a2d0:	46                   	inc    %esi
40a2d1:	ff 45 a8             	incl   -0x58(%ebp)
40a2d4:	ff 4d c0             	decl   -0x40(%ebp)
40a2d7:	83 7d c0 00          	cmpl   $0x0,-0x40(%ebp)
40a2db:	7f 8e                	jg     0x40a26b
40a2dd:	81 c7 02 c0 00 00    	add    $0xc002,%edi
40a2e3:	66 85 ff             	test   %di,%di
40a2e6:	7e 3b                	jle    0x40a323
40a2e8:	f7 45 f8 00 00 00 80 	testl  $0x80000000,-0x8(%ebp)
40a2ef:	75 2d                	jne    0x40a31e
40a2f1:	8b 45 f4             	mov    -0xc(%ebp),%eax
40a2f4:	8b 4d f0             	mov    -0x10(%ebp),%ecx
40a2f7:	d1 65 f0             	shll   $1,-0x10(%ebp)
40a2fa:	8b d0                	mov    %eax,%edx
40a2fc:	03 c0                	add    %eax,%eax
40a2fe:	c1 e9 1f             	shr    $0x1f,%ecx
40a301:	0b c1                	or     %ecx,%eax
40a303:	89 45 f4             	mov    %eax,-0xc(%ebp)
40a306:	8b 45 f8             	mov    -0x8(%ebp),%eax
40a309:	c1 ea 1f             	shr    $0x1f,%edx
40a30c:	03 c0                	add    %eax,%eax
40a30e:	0b c2                	or     %edx,%eax
40a310:	81 c7 ff ff 00 00    	add    $0xffff,%edi
40a316:	89 45 f8             	mov    %eax,-0x8(%ebp)
40a319:	66 85 ff             	test   %di,%di
40a31c:	7f ca                	jg     0x40a2e8
40a31e:	66 85 ff             	test   %di,%di
40a321:	7f 4d                	jg     0x40a370
40a323:	81 c7 ff ff 00 00    	add    $0xffff,%edi
40a329:	66 85 ff             	test   %di,%di
40a32c:	7d 42                	jge    0x40a370
40a32e:	8b c7                	mov    %edi,%eax
40a330:	f7 d8                	neg    %eax
40a332:	0f b7 c0             	movzwl %ax,%eax
40a335:	03 f8                	add    %eax,%edi
40a337:	f6 45 f0 01          	testb  $0x1,-0x10(%ebp)
40a33b:	74 03                	je     0x40a340
40a33d:	ff 45 ac             	incl   -0x54(%ebp)
40a340:	8b 4d f8             	mov    -0x8(%ebp),%ecx
40a343:	8b 75 f4             	mov    -0xc(%ebp),%esi
40a346:	8b 55 f4             	mov    -0xc(%ebp),%edx
40a349:	d1 6d f8             	shrl   $1,-0x8(%ebp)
40a34c:	c1 e1 1f             	shl    $0x1f,%ecx
40a34f:	d1 ee                	shr    $1,%esi
40a351:	0b f1                	or     %ecx,%esi
40a353:	8b 4d f0             	mov    -0x10(%ebp),%ecx
40a356:	c1 e2 1f             	shl    $0x1f,%edx
40a359:	d1 e9                	shr    $1,%ecx
40a35b:	0b ca                	or     %edx,%ecx
40a35d:	48                   	dec    %eax
40a35e:	89 75 f4             	mov    %esi,-0xc(%ebp)
40a361:	89 4d f0             	mov    %ecx,-0x10(%ebp)
40a364:	75 d1                	jne    0x40a337
40a366:	39 45 ac             	cmp    %eax,-0x54(%ebp)
40a369:	74 05                	je     0x40a370
40a36b:	66 83 4d f0 01       	orw    $0x1,-0x10(%ebp)
40a370:	b8 00 80 00 00       	mov    $0x8000,%eax
40a375:	8b c8                	mov    %eax,%ecx
40a377:	66 39 4d f0          	cmp    %cx,-0x10(%ebp)
40a37b:	77 11                	ja     0x40a38e
40a37d:	8b 4d f0             	mov    -0x10(%ebp),%ecx
40a380:	81 e1 ff ff 01 00    	and    $0x1ffff,%ecx
40a386:	81 f9 00 80 01 00    	cmp    $0x18000,%ecx
40a38c:	75 34                	jne    0x40a3c2
40a38e:	83 7d f2 ff          	cmpl   $0xffffffff,-0xe(%ebp)
40a392:	75 2b                	jne    0x40a3bf
40a394:	83 65 f2 00          	andl   $0x0,-0xe(%ebp)
40a398:	83 7d f6 ff          	cmpl   $0xffffffff,-0xa(%ebp)
40a39c:	75 1c                	jne    0x40a3ba
40a39e:	83 65 f6 00          	andl   $0x0,-0xa(%ebp)
40a3a2:	b9 ff ff 00 00       	mov    $0xffff,%ecx
40a3a7:	66 39 4d fa          	cmp    %cx,-0x6(%ebp)
40a3ab:	75 07                	jne    0x40a3b4
40a3ad:	66 89 45 fa          	mov    %ax,-0x6(%ebp)
40a3b1:	47                   	inc    %edi
40a3b2:	eb 0e                	jmp    0x40a3c2
40a3b4:	66 ff 45 fa          	incw   -0x6(%ebp)
40a3b8:	eb 08                	jmp    0x40a3c2
40a3ba:	ff 45 f6             	incl   -0xa(%ebp)
40a3bd:	eb 03                	jmp    0x40a3c2
40a3bf:	ff 45 f2             	incl   -0xe(%ebp)
40a3c2:	b8 ff 7f 00 00       	mov    $0x7fff,%eax
40a3c7:	66 3b f8             	cmp    %ax,%di
40a3ca:	0f 82 ab 00 00 00    	jb     0x40a47b
40a3d0:	33 c0                	xor    %eax,%eax
40a3d2:	33 c9                	xor    %ecx,%ecx
40a3d4:	66 39 45 b8          	cmp    %ax,-0x48(%ebp)
40a3d8:	89 45 e4             	mov    %eax,-0x1c(%ebp)
40a3db:	0f 94 c1             	sete   %cl
40a3de:	89 45 e0             	mov    %eax,-0x20(%ebp)
40a3e1:	49                   	dec    %ecx
40a3e2:	81 e1 00 00 00 80    	and    $0x80000000,%ecx
40a3e8:	81 c1 00 80 ff 7f    	add    $0x7fff8000,%ecx
40a3ee:	89 4d e8             	mov    %ecx,-0x18(%ebp)
40a3f1:	33 f6                	xor    %esi,%esi
40a3f3:	3b de                	cmp    %esi,%ebx
40a3f5:	0f 85 7b fd ff ff    	jne    0x40a176
40a3fb:	8b 4d e8             	mov    -0x18(%ebp),%ecx
40a3fe:	c1 e9 10             	shr    $0x10,%ecx
40a401:	ba ff 3f 00 00       	mov    $0x3fff,%edx
40a406:	b8 ff 7f 00 00       	mov    $0x7fff,%eax
40a40b:	66 3b ca             	cmp    %dx,%cx
40a40e:	0f 82 a3 02 00 00    	jb     0x40a6b7
40a414:	ff 45 b4             	incl   -0x4c(%ebp)
40a417:	33 d2                	xor    %edx,%edx
40a419:	89 55 b0             	mov    %edx,-0x50(%ebp)
40a41c:	89 55 f0             	mov    %edx,-0x10(%ebp)
40a41f:	89 55 f4             	mov    %edx,-0xc(%ebp)
40a422:	89 55 f8             	mov    %edx,-0x8(%ebp)
40a425:	8b 55 da             	mov    -0x26(%ebp),%edx
40a428:	0f b7 c9             	movzwl %cx,%ecx