40ef2b:	8b f8                	mov    %eax,%edi
40ef2d:	eb af                	jmp    0x40eede
40ef2f:	8b 7d f8             	mov    -0x8(%ebp),%edi
40ef32:	2b f8                	sub    %eax,%edi
40ef34:	d1 ff                	sar    $1,%edi
40ef36:	83 c0 02             	add    $0x2,%eax
40ef39:	89 7e 34             	mov    %edi,0x34(%esi)
40ef3c:	5f                   	pop    %edi
40ef3d:	89 46 30             	mov    %eax,0x30(%esi)
40ef40:	5e                   	pop    %esi
40ef41:	5b                   	pop    %ebx
40ef42:	c9                   	leave
40ef43:	c2 08 00             	ret    $0x8
40ef46:	8b ff                	mov    %edi,%edi
40ef48:	55                   	push   %ebp
40ef49:	8b ec                	mov    %esp,%ebp
40ef4b:	51                   	push   %ecx
40ef4c:	53                   	push   %ebx
40ef4d:	56                   	push   %esi
40ef4e:	8b f1                	mov    %ecx,%esi
40ef50:	57                   	push   %edi
40ef51:	8d 4e 3c             	lea    0x3c(%esi),%ecx
40ef54:	8b b9 04 04 00 00    	mov    0x404(%ecx),%edi
40ef5a:	85 ff                	test   %edi,%edi
40ef5c:	75 02                	jne    0x40ef60
40ef5e:	8b f9                	mov    %ecx,%edi
40ef60:	e8 89 ea ff ff       	call   0x40d9ee
40ef65:	8a 7d 0c             	mov    0xc(%ebp),%bh
40ef68:	8b 55 08             	mov    0x8(%ebp),%edx
40ef6b:	8d 48 ff             	lea    -0x1(%eax),%ecx
40ef6e:	03 cf                	add    %edi,%ecx
40ef70:	89 4e 30             	mov    %ecx,0x30(%esi)
40ef73:	8b c1                	mov    %ecx,%eax
40ef75:	89 4d fc             	mov    %ecx,-0x4(%ebp)
40ef78:	8b 7e 24             	mov    0x24(%esi),%edi
40ef7b:	85 ff                	test   %edi,%edi
40ef7d:	7f 04                	jg     0x40ef83
40ef7f:	85 d2                	test   %edx,%edx
40ef81:	74 30                	je     0x40efb3
40ef83:	8d 47 ff             	lea    -0x1(%edi),%eax
40ef86:	89 46 24             	mov    %eax,0x24(%esi)
40ef89:	8a c2                	mov    %dl,%al
40ef8b:	24 0f                	and    $0xf,%al
40ef8d:	c1 ea 04             	shr    $0x4,%edx
40ef90:	04 30                	add    $0x30,%al
40ef92:	8a d8                	mov    %al,%bl
40ef94:	3c 39                	cmp    $0x39,%al
40ef96:	76 0b                	jbe    0x40efa3
40ef98:	8a c7                	mov    %bh,%al
40ef9a:	34 01                	xor    $0x1,%al
40ef9c:	c0 e0 05             	shl    $0x5,%al
40ef9f:	04 07                	add    $0x7,%al
40efa1:	02 c3                	add    %bl,%al
40efa3:	8b 7d fc             	mov    -0x4(%ebp),%edi
40efa6:	88 07                	mov    %al,(%edi)
40efa8:	ff 4e 30             	decl   0x30(%esi)
40efab:	8b 46 30             	mov    0x30(%esi),%eax
40efae:	89 45 fc             	mov    %eax,-0x4(%ebp)
40efb1:	eb c5                	jmp    0x40ef78
40efb3:	2b c8                	sub    %eax,%ecx
40efb5:	40                   	inc    %eax
40efb6:	89 4e 34             	mov    %ecx,0x34(%esi)
40efb9:	5f                   	pop    %edi
40efba:	89 46 30             	mov    %eax,0x30(%esi)
40efbd:	5e                   	pop    %esi
40efbe:	5b                   	pop    %ebx
40efbf:	c9                   	leave
40efc0:	c2 08 00             	ret    $0x8
40efc3:	8b ff                	mov    %edi,%edi
40efc5:	55                   	push   %ebp
40efc6:	8b ec                	mov    %esp,%ebp
40efc8:	51                   	push   %ecx
40efc9:	53                   	push   %ebx
40efca:	56                   	push   %esi
40efcb:	8b f1                	mov    %ecx,%esi
40efcd:	57                   	push   %edi
40efce:	8d 4e 3c             	lea    0x3c(%esi),%ecx
40efd1:	8b b9 04 04 00 00    	mov    0x404(%ecx),%edi
40efd7:	85 ff                	test   %edi,%edi
40efd9:	75 02                	jne    0x40efdd
40efdb:	8b f9                	mov    %ecx,%edi
40efdd:	e8 24 ea ff ff       	call   0x40da06
40efe2:	48                   	dec    %eax
40efe3:	8d 0c 47             	lea    (%edi,%eax,2),%ecx
40efe6:	8b 7d 08             	mov    0x8(%ebp),%edi
40efe9:	89 4d fc             	mov    %ecx,-0x4(%ebp)
40efec:	8b c1                	mov    %ecx,%eax
40efee:	89 4e 30             	mov    %ecx,0x30(%esi)
40eff1:	8b d9                	mov    %ecx,%ebx
40eff3:	8a 4d 0c             	mov    0xc(%ebp),%cl
40eff6:	8b 56 24             	mov    0x24(%esi),%edx
40eff9:	85 d2                	test   %edx,%edx
40effb:	7f 04                	jg     0x40f001
40effd:	85 ff                	test   %edi,%edi
40efff:	74 35                	je     0x40f036
40f001:	8d 42 ff             	lea    -0x1(%edx),%eax
40f004:	89 46 24             	mov    %eax,0x24(%esi)
40f007:	8b c7                	mov    %edi,%eax
40f009:	83 e0 0f             	and    $0xf,%eax
40f00c:	c1 ef 04             	shr    $0x4,%edi
40f00f:	83 c0 30             	add    $0x30,%eax
40f012:	0f b7 d0             	movzwl %ax,%edx
40f015:	83 fa 39             	cmp    $0x39,%edx
40f018:	76 0e                	jbe    0x40f028
40f01a:	8a c1                	mov    %cl,%al
40f01c:	34 01                	xor    $0x1,%al
40f01e:	c0 e0 05             	shl    $0x5,%al
40f021:	04 07                	add    $0x7,%al
40f023:	02 c2                	add    %dl,%al
40f025:	0f b6 d0             	movzbl %al,%edx
40f028:	66 89 13             	mov    %dx,(%ebx)
40f02b:	83 46 30 fe          	addl   $0xfffffffe,0x30(%esi)
40f02f:	8b 46 30             	mov    0x30(%esi),%eax
40f032:	8b d8                	mov    %eax,%ebx
40f034:	eb c0                	jmp    0x40eff6
40f036:	8b 4d fc             	mov    -0x4(%ebp),%ecx
40f039:	2b c8                	sub    %eax,%ecx
40f03b:	d1 f9                	sar    $1,%ecx
40f03d:	83 c0 02             	add    $0x2,%eax
40f040:	89 4e 34             	mov    %ecx,0x34(%esi)
40f043:	5f                   	pop    %edi
40f044:	89 46 30             	mov    %eax,0x30(%esi)
40f047:	5e                   	pop    %esi
40f048:	5b                   	pop    %ebx
40f049:	c9                   	leave
40f04a:	c2 08 00             	ret    $0x8
40f04d:	8b ff                	mov    %edi,%edi
40f04f:	55                   	push   %ebp
40f050:	8b ec                	mov    %esp,%ebp
40f052:	51                   	push   %ecx
40f053:	51                   	push   %ecx
40f054:	53                   	push   %ebx
40f055:	56                   	push   %esi
40f056:	8b f1                	mov    %ecx,%esi
40f058:	57                   	push   %edi
40f059:	8d 4e 3c             	lea    0x3c(%esi),%ecx
40f05c:	8b b9 04 04 00 00    	mov    0x404(%ecx),%edi
40f062:	85 ff                	test   %edi,%edi
40f064:	75 02                	jne    0x40f068
40f066:	8b f9                	mov    %ecx,%edi
40f068:	e8 81 e9 ff ff       	call   0x40d9ee
40f06d:	8b 5d 08             	mov    0x8(%ebp),%ebx
40f070:	8d 48 ff             	lea    -0x1(%eax),%ecx
40f073:	03 cf                	add    %edi,%ecx
40f075:	8b 7d 0c             	mov    0xc(%ebp),%edi
40f078:	89 4d f8             	mov    %ecx,-0x8(%ebp)
40f07b:	8b d1                	mov    %ecx,%edx
40f07d:	89 4e 30             	mov    %ecx,0x30(%esi)
40f080:	89 4d fc             	mov    %ecx,-0x4(%ebp)
40f083:	8b 46 24             	mov    0x24(%esi),%eax
40f086:	85 c0                	test   %eax,%eax
40f088:	7f 09                	jg     0x40f093
40f08a:	8b c3                	mov    %ebx,%eax
40f08c:	0b c7                	or     %edi,%eax
40f08e:	74 20                	je     0x40f0b0
40f090:	8b 46 24             	mov    0x24(%esi),%eax
40f093:	48                   	dec    %eax
40f094:	89 46 24             	mov    %eax,0x24(%esi)
40f097:	8a c3                	mov    %bl,%al
40f099:	24 07                	and    $0x7,%al
40f09b:	0f ac fb 03          	shrd   $0x3,%edi,%ebx
40f09f:	04 30                	add    $0x30,%al
40f0a1:	88 01                	mov    %al,(%ecx)
40f0a3:	c1 ef 03             	shr    $0x3,%edi
40f0a6:	ff 4e 30             	decl   0x30(%esi)
40f0a9:	8b 56 30             	mov    0x30(%esi),%edx
40f0ac:	8b ca                	mov    %edx,%ecx
40f0ae:	eb d3                	jmp    0x40f083
40f0b0:	8b 4d f8             	mov    -0x8(%ebp),%ecx
40f0b3:	8d 42 01             	lea    0x1(%edx),%eax
40f0b6:	2b ca                	sub    %edx,%ecx
40f0b8:	89 4e 34             	mov    %ecx,0x34(%esi)
40f0bb:	5f                   	pop    %edi
40f0bc:	89 46 30             	mov    %eax,0x30(%esi)
40f0bf:	5e                   	pop    %esi
40f0c0:	5b                   	pop    %ebx
40f0c1:	c9                   	leave
40f0c2:	c2 0c 00             	ret    $0xc
40f0c5:	8b ff                	mov    %edi,%edi
40f0c7:	55                   	push   %ebp
40f0c8:	8b ec                	mov    %esp,%ebp
40f0ca:	83 ec 10             	sub    $0x10,%esp
40f0cd:	53                   	push   %ebx
40f0ce:	56                   	push   %esi
40f0cf:	8b f1                	mov    %ecx,%esi
40f0d1:	57                   	push   %edi
40f0d2:	8d 4e 3c             	lea    0x3c(%esi),%ecx
40f0d5:	8b b9 04 04 00 00    	mov    0x404(%ecx),%edi
40f0db:	85 ff                	test   %edi,%edi
40f0dd:	75 02                	jne    0x40f0e1
40f0df:	8b f9                	mov    %ecx,%edi
40f0e1:	e8 20 e9 ff ff       	call   0x40da06
40f0e6:	8b 55 0c             	mov    0xc(%ebp),%edx
40f0e9:	8b 5d 08             	mov    0x8(%ebp),%ebx
40f0ec:	8d 48 ff             	lea    -0x1(%eax),%ecx
40f0ef:	8d 0c 4f             	lea    (%edi,%ecx,2),%ecx
40f0f2:	89 4d f8             	mov    %ecx,-0x8(%ebp)
40f0f5:	8b f9                	mov    %ecx,%edi
40f0f7:	89 4e 30             	mov    %ecx,0x30(%esi)
40f0fa:	89 4d fc             	mov    %ecx,-0x4(%ebp)
40f0fd:	8b 46 24             	mov    0x24(%esi),%eax
40f100:	89 5d fc             	mov    %ebx,-0x4(%ebp)
40f103:	89 55 f4             	mov    %edx,-0xc(%ebp)
40f106:	85 c0                	test   %eax,%eax
40f108:	7f 09                	jg     0x40f113
40f10a:	8b c3                	mov    %ebx,%eax
40f10c:	0b c2                	or     %edx,%eax
40f10e:	74 25                	je     0x40f135
40f110:	8b 46 24             	mov    0x24(%esi),%eax
40f113:	48                   	dec    %eax
40f114:	89 46 24             	mov    %eax,0x24(%esi)
40f117:	8b 45 fc             	mov    -0x4(%ebp),%eax
40f11a:	83 e0 07             	and    $0x7,%eax
40f11d:	0f ac d3 03          	shrd   $0x3,%edx,%ebx
40f121:	83 c0 30             	add    $0x30,%eax
40f124:	66 89 01             	mov    %ax,(%ecx)
40f127:	c1 ea 03             	shr    $0x3,%edx
40f12a:	83 46 30 fe          	addl   $0xfffffffe,0x30(%esi)
40f12e:	8b 7e 30             	mov    0x30(%esi),%edi
40f131:	8b cf                	mov    %edi,%ecx
40f133:	eb c8                	jmp    0x40f0fd
40f135:	8b 4d f8             	mov    -0x8(%ebp),%ecx
40f138:	8d 47 02             	lea    0x2(%edi),%eax
40f13b:	2b cf                	sub    %edi,%ecx
40f13d:	d1 f9                	sar    $1,%ecx
40f13f:	89 4e 34             	mov    %ecx,0x34(%esi)
40f142:	5f                   	pop    %edi
40f143:	89 46 30             	mov    %eax,0x30(%esi)
40f146:	5e                   	pop    %esi
40f147:	5b                   	pop    %ebx
40f148:	c9                   	leave
40f149:	c2 0c 00             	ret    $0xc
40f14c:	8b ff                	mov    %edi,%edi
40f14e:	55                   	push   %ebp
40f14f:	8b ec                	mov    %esp,%ebp
40f151:	83 ec 0c             	sub    $0xc,%esp
40f154:	53                   	push   %ebx
40f155:	56                   	push   %esi
40f156:	8b f1                	mov    %ecx,%esi
40f158:	57                   	push   %edi
40f159:	8d 4e 3c             	lea    0x3c(%esi),%ecx
40f15c:	8b b9 04 04 00 00    	mov    0x404(%ecx),%edi
40f162:	85 ff                	test   %edi,%edi
40f164:	75 02                	jne    0x40f168
40f166:	8b f9                	mov    %ecx,%edi
40f168:	e8 81 e8 ff ff       	call   0x40d9ee
40f16d:	48                   	dec    %eax
40f16e:	03 f8                	add    %eax,%edi
40f170:	8b 45 08             	mov    0x8(%ebp),%eax
40f173:	89 7d f4             	mov    %edi,-0xc(%ebp)
40f176:	8b cf                	mov    %edi,%ecx
40f178:	89 7e 30             	mov    %edi,0x30(%esi)
40f17b:	89 7d f8             	mov    %edi,-0x8(%ebp)
40f17e:	8b 7d 0c             	mov    0xc(%ebp),%edi
40f181:	89 45 fc             	mov    %eax,-0x4(%ebp)
40f184:	8b 56 24             	mov    0x24(%esi),%edx
40f187:	85 d2                	test   %edx,%edx
40f189:	7f 04                	jg     0x40f18f
40f18b:	0b c7                	or     %edi,%eax
40f18d:	74 4f                	je     0x40f1de
40f18f:	6a 00                	push   $0x0
40f191:	6a 0a                	push   $0xa
40f193:	57                   	push   %edi
40f194:	ff 75 fc             	push   -0x4(%ebp)
40f197:	8d 42 ff             	lea    -0x1(%edx),%eax
40f19a:	89 46 24             	mov    %eax,0x24(%esi)
40f19d:	e8 ee eb 01 00       	call   0x42dd90
40f1a2:	6a 00                	push   $0x0
40f1a4:	6a 0a                	push   $0xa
40f1a6:	8a d8                	mov    %al,%bl
40f1a8:	57                   	push   %edi
40f1a9:	ff 75 fc             	push   -0x4(%ebp)
40f1ac:	80 c3 30             	add    $0x30,%bl
40f1af:	8a fb                	mov    %bl,%bh
40f1b1:	e8 6a eb 01 00       	call   0x42dd20
40f1b6:	89 45 fc             	mov    %eax,-0x4(%ebp)
40f1b9:	8b fa                	mov    %edx,%edi
40f1bb:	80 fb 39             	cmp    $0x39,%bl
40f1be:	7e 0e                	jle    0x40f1ce
40f1c0:	8a 5d 10             	mov    0x10(%ebp),%bl
40f1c3:	80 f3 01             	xor    $0x1,%bl
40f1c6:	c0 e3 05             	shl    $0x5,%bl
40f1c9:	80 c3 07             	add    $0x7,%bl
40f1cc:	02 df                	add    %bh,%bl
40f1ce:	8b 4d f8             	mov    -0x8(%ebp),%ecx
40f1d1:	88 19                	mov    %bl,(%ecx)
40f1d3:	ff 4e 30             	decl   0x30(%esi)
40f1d6:	8b 4e 30             	mov    0x30(%esi),%ecx
40f1d9:	89 4d f8             	mov    %ecx,-0x8(%ebp)
40f1dc:	eb a6                	jmp    0x40f184
40f1de:	8b 7d f4             	mov    -0xc(%ebp),%edi
40f1e1:	8d 41 01             	lea    0x1(%ecx),%eax
40f1e4:	2b f9                	sub    %ecx,%edi
40f1e6:	89 7e 34             	mov    %edi,0x34(%esi)
40f1e9:	5f                   	pop    %edi
40f1ea:	89 46 30             	mov    %eax,0x30(%esi)
40f1ed:	5e                   	pop    %esi
40f1ee:	5b                   	pop    %ebx
40f1ef:	c9                   	leave
40f1f0:	c2 0c 00             	ret    $0xc
40f1f3:	8b ff                	mov    %edi,%edi
40f1f5:	55                   	push   %ebp
40f1f6:	8b ec                	mov    %esp,%ebp
40f1f8:	83 ec 0c             	sub    $0xc,%esp
40f1fb:	53                   	push   %ebx
40f1fc:	56                   	push   %esi
40f1fd:	8b f1                	mov    %ecx,%esi
40f1ff:	57                   	push   %edi
40f200:	8d 4e 3c             	lea    0x3c(%esi),%ecx
40f203:	8b b9 04 04 00 00    	mov    0x404(%ecx),%edi
40f209:	85 ff                	test   %edi,%edi
40f20b:	75 02                	jne    0x40f20f
40f20d:	8b f9                	mov    %ecx,%edi
40f20f:	e8 f2 e7 ff ff       	call   0x40da06
40f214:	8b 5d 08             	mov    0x8(%ebp),%ebx
40f217:	89 5d fc             	mov    %ebx,-0x4(%ebp)
40f21a:	8d 3c 47             	lea    (%edi,%eax,2),%edi
40f21d:	83 c7 fe             	add    $0xfffffffe,%edi
40f220:	89 7d f4             	mov    %edi,-0xc(%ebp)
40f223:	8b cf                	mov    %edi,%ecx
40f225:	89 7e 30             	mov    %edi,0x30(%esi)
40f228:	89 7d f8             	mov    %edi,-0x8(%ebp)
40f22b:	8b 7d 0c             	mov    0xc(%ebp),%edi
40f22e:	8b 56 24             	mov    0x24(%esi),%edx
40f231:	85 d2                	test   %edx,%edx
40f233:	7f 06                	jg     0x40f23b
40f235:	8b c3                	mov    %ebx,%eax
40f237:	0b c7                	or     %edi,%eax
40f239:	74 5e                	je     0x40f299
40f23b:	6a 00                	push   $0x0
40f23d:	6a 0a                	push   $0xa
40f23f:	57                   	push   %edi
40f240:	8d 42 ff             	lea    -0x1(%edx),%eax
40f243:	53                   	push   %ebx
40f244:	89 46 24             	mov    %eax,0x24(%esi)
40f247:	e8 44 eb 01 00       	call   0x42dd90
40f24c:	6a 00                	push   $0x0
40f24e:	66 83 c0 30          	add    $0x30,%ax
40f252:	6a 0a                	push   $0xa
40f254:	0f b7 d8             	movzwl %ax,%ebx
40f257:	8b 45 fc             	mov    -0x4(%ebp),%eax
40f25a:	57                   	push   %edi
40f25b:	50                   	push   %eax
40f25c:	e8 bf ea 01 00       	call   0x42dd20
40f261:	89 45 fc             	mov    %eax,-0x4(%ebp)
40f264:	8b fa                	mov    %edx,%edi
40f266:	83 fb 39             	cmp    $0x39,%ebx
40f269:	76 15                	jbe    0x40f280
40f26b:	8a 4d 10             	mov    0x10(%ebp),%cl
40f26e:	80 f1 01             	xor    $0x1,%cl