476c97:	85 db                	test   %ebx,%ebx
476c99:	74 38                	je     0x476cd3
476c9b:	49                   	dec    %ecx
476c9c:	33 d2                	xor    %edx,%edx
476c9e:	6a 0a                	push   $0xa
476ca0:	89 4e 24             	mov    %ecx,0x24(%esi)
476ca3:	8b c3                	mov    %ebx,%eax
476ca5:	59                   	pop    %ecx
476ca6:	f7 f1                	div    %ecx
476ca8:	8b c3                	mov    %ebx,%eax
476caa:	6a 0a                	push   $0xa
476cac:	5b                   	pop    %ebx
476cad:	8d 4a 30             	lea    0x30(%edx),%ecx
476cb0:	33 d2                	xor    %edx,%edx
476cb2:	f7 f3                	div    %ebx
476cb4:	8b d8                	mov    %eax,%ebx
476cb6:	80 f9 39             	cmp    $0x39,%cl
476cb9:	7e 0c                	jle    0x476cc7
476cbb:	8a 45 0c             	mov    0xc(%ebp),%al
476cbe:	34 01                	xor    $0x1,%al
476cc0:	c0 e0 05             	shl    $0x5,%al
476cc3:	04 07                	add    $0x7,%al
476cc5:	02 c8                	add    %al,%cl
476cc7:	88 0f                	mov    %cl,(%edi)
476cc9:	ff 4e 30             	decl   0x30(%esi)
476ccc:	8b 46 30             	mov    0x30(%esi),%eax
476ccf:	8b f8                	mov    %eax,%edi
476cd1:	eb bd                	jmp    0x476c90
476cd3:	8b 7d f8             	mov    -0x8(%ebp),%edi
476cd6:	2b f8                	sub    %eax,%edi
476cd8:	40                   	inc    %eax
476cd9:	89 7e 34             	mov    %edi,0x34(%esi)
476cdc:	5f                   	pop    %edi
476cdd:	89 46 30             	mov    %eax,0x30(%esi)
476ce0:	5e                   	pop    %esi
476ce1:	5b                   	pop    %ebx
476ce2:	c9                   	leave
476ce3:	c2 08 00             	ret    $0x8
476ce6:	8b ff                	mov    %edi,%edi
476ce8:	55                   	push   %ebp
476ce9:	8b ec                	mov    %esp,%ebp
476ceb:	51                   	push   %ecx
476cec:	51                   	push   %ecx
476ced:	53                   	push   %ebx
476cee:	56                   	push   %esi
476cef:	8b f1                	mov    %ecx,%esi
476cf1:	57                   	push   %edi
476cf2:	8d 4e 3c             	lea    0x3c(%esi),%ecx
476cf5:	8b b9 04 04 00 00    	mov    0x404(%ecx),%edi
476cfb:	85 ff                	test   %edi,%edi
476cfd:	75 02                	jne    0x476d01
476cff:	8b f9                	mov    %ecx,%edi
476d01:	e8 3c eb ff ff       	call   0x475842
476d06:	8b 5d 08             	mov    0x8(%ebp),%ebx
476d09:	8d 3c 47             	lea    (%edi,%eax,2),%edi
476d0c:	83 c7 fe             	add    $0xfffffffe,%edi
476d0f:	89 7d f8             	mov    %edi,-0x8(%ebp)
476d12:	8b c7                	mov    %edi,%eax
476d14:	89 7e 30             	mov    %edi,0x30(%esi)
476d17:	89 7d fc             	mov    %edi,-0x4(%ebp)
476d1a:	8b 4e 24             	mov    0x24(%esi),%ecx
476d1d:	85 c9                	test   %ecx,%ecx
476d1f:	7f 04                	jg     0x476d25
476d21:	85 db                	test   %ebx,%ebx
476d23:	74 46                	je     0x476d6b
476d25:	49                   	dec    %ecx
476d26:	33 d2                	xor    %edx,%edx
476d28:	6a 0a                	push   $0xa
476d2a:	89 4e 24             	mov    %ecx,0x24(%esi)
476d2d:	8b c3                	mov    %ebx,%eax
476d2f:	59                   	pop    %ecx
476d30:	f7 f1                	div    %ecx
476d32:	8b c3                	mov    %ebx,%eax
476d34:	83 c2 30             	add    $0x30,%edx
476d37:	0f b7 ca             	movzwl %dx,%ecx
476d3a:	33 d2                	xor    %edx,%edx
476d3c:	6a 0a                	push   $0xa
476d3e:	5b                   	pop    %ebx
476d3f:	f7 f3                	div    %ebx
476d41:	8b d8                	mov    %eax,%ebx
476d43:	83 f9 39             	cmp    $0x39,%ecx
476d46:	76 11                	jbe    0x476d59
476d48:	8a 45 0c             	mov    0xc(%ebp),%al
476d4b:	34 01                	xor    $0x1,%al
476d4d:	c0 e0 05             	shl    $0x5,%al
476d50:	04 07                	add    $0x7,%al
476d52:	02 c1                	add    %cl,%al
476d54:	66 98                	cbtw
476d56:	0f b7 c8             	movzwl %ax,%ecx
476d59:	66 0f be c1          	movsbw %cl,%ax
476d5d:	66 89 07             	mov    %ax,(%edi)
476d60:	83 46 30 fe          	addl   $0xfffffffe,0x30(%esi)
476d64:	8b 46 30             	mov    0x30(%esi),%eax
476d67:	8b f8                	mov    %eax,%edi
476d69:	eb af                	jmp    0x476d1a
476d6b:	8b 7d f8             	mov    -0x8(%ebp),%edi
476d6e:	2b f8                	sub    %eax,%edi
476d70:	d1 ff                	sar    $1,%edi
476d72:	83 c0 02             	add    $0x2,%eax
476d75:	89 7e 34             	mov    %edi,0x34(%esi)
476d78:	5f                   	pop    %edi
476d79:	89 46 30             	mov    %eax,0x30(%esi)
476d7c:	5e                   	pop    %esi
476d7d:	5b                   	pop    %ebx
476d7e:	c9                   	leave
476d7f:	c2 08 00             	ret    $0x8
476d82:	8b ff                	mov    %edi,%edi
476d84:	55                   	push   %ebp
476d85:	8b ec                	mov    %esp,%ebp
476d87:	51                   	push   %ecx
476d88:	53                   	push   %ebx
476d89:	56                   	push   %esi
476d8a:	8b f1                	mov    %ecx,%esi
476d8c:	57                   	push   %edi
476d8d:	8d 4e 3c             	lea    0x3c(%esi),%ecx
476d90:	8b b9 04 04 00 00    	mov    0x404(%ecx),%edi
476d96:	85 ff                	test   %edi,%edi
476d98:	75 02                	jne    0x476d9c
476d9a:	8b f9                	mov    %ecx,%edi
476d9c:	e8 89 ea ff ff       	call   0x47582a
476da1:	8a 7d 0c             	mov    0xc(%ebp),%bh
476da4:	8b 55 08             	mov    0x8(%ebp),%edx
476da7:	8d 48 ff             	lea    -0x1(%eax),%ecx
476daa:	03 cf                	add    %edi,%ecx
476dac:	89 4e 30             	mov    %ecx,0x30(%esi)
476daf:	8b c1                	mov    %ecx,%eax
476db1:	89 4d fc             	mov    %ecx,-0x4(%ebp)
476db4:	8b 7e 24             	mov    0x24(%esi),%edi
476db7:	85 ff                	test   %edi,%edi
476db9:	7f 04                	jg     0x476dbf
476dbb:	85 d2                	test   %edx,%edx
476dbd:	74 30                	je     0x476def
476dbf:	8d 47 ff             	lea    -0x1(%edi),%eax
476dc2:	89 46 24             	mov    %eax,0x24(%esi)
476dc5:	8a c2                	mov    %dl,%al
476dc7:	24 0f                	and    $0xf,%al
476dc9:	c1 ea 04             	shr    $0x4,%edx
476dcc:	04 30                	add    $0x30,%al
476dce:	8a d8                	mov    %al,%bl
476dd0:	3c 39                	cmp    $0x39,%al
476dd2:	76 0b                	jbe    0x476ddf
476dd4:	8a c7                	mov    %bh,%al
476dd6:	34 01                	xor    $0x1,%al
476dd8:	c0 e0 05             	shl    $0x5,%al
476ddb:	04 07                	add    $0x7,%al
476ddd:	02 c3                	add    %bl,%al
476ddf:	8b 7d fc             	mov    -0x4(%ebp),%edi
476de2:	88 07                	mov    %al,(%edi)
476de4:	ff 4e 30             	decl   0x30(%esi)
476de7:	8b 46 30             	mov    0x30(%esi),%eax
476dea:	89 45 fc             	mov    %eax,-0x4(%ebp)
476ded:	eb c5                	jmp    0x476db4
476def:	2b c8                	sub    %eax,%ecx
476df1:	40                   	inc    %eax
476df2:	89 4e 34             	mov    %ecx,0x34(%esi)
476df5:	5f                   	pop    %edi
476df6:	89 46 30             	mov    %eax,0x30(%esi)
476df9:	5e                   	pop    %esi
476dfa:	5b                   	pop    %ebx
476dfb:	c9                   	leave
476dfc:	c2 08 00             	ret    $0x8
476dff:	8b ff                	mov    %edi,%edi
476e01:	55                   	push   %ebp
476e02:	8b ec                	mov    %esp,%ebp
476e04:	51                   	push   %ecx
476e05:	53                   	push   %ebx
476e06:	56                   	push   %esi
476e07:	8b f1                	mov    %ecx,%esi
476e09:	57                   	push   %edi
476e0a:	8d 4e 3c             	lea    0x3c(%esi),%ecx
476e0d:	8b b9 04 04 00 00    	mov    0x404(%ecx),%edi
476e13:	85 ff                	test   %edi,%edi
476e15:	75 02                	jne    0x476e19
476e17:	8b f9                	mov    %ecx,%edi
476e19:	e8 24 ea ff ff       	call   0x475842
476e1e:	48                   	dec    %eax
476e1f:	8d 0c 47             	lea    (%edi,%eax,2),%ecx
476e22:	8b 7d 08             	mov    0x8(%ebp),%edi
476e25:	89 4d fc             	mov    %ecx,-0x4(%ebp)
476e28:	8b c1                	mov    %ecx,%eax
476e2a:	89 4e 30             	mov    %ecx,0x30(%esi)
476e2d:	8b d9                	mov    %ecx,%ebx
476e2f:	8a 4d 0c             	mov    0xc(%ebp),%cl
476e32:	8b 56 24             	mov    0x24(%esi),%edx
476e35:	85 d2                	test   %edx,%edx
476e37:	7f 04                	jg     0x476e3d
476e39:	85 ff                	test   %edi,%edi
476e3b:	74 35                	je     0x476e72
476e3d:	8d 42 ff             	lea    -0x1(%edx),%eax
476e40:	89 46 24             	mov    %eax,0x24(%esi)
476e43:	8b c7                	mov    %edi,%eax
476e45:	83 e0 0f             	and    $0xf,%eax
476e48:	c1 ef 04             	shr    $0x4,%edi
476e4b:	83 c0 30             	add    $0x30,%eax
476e4e:	0f b7 d0             	movzwl %ax,%edx
476e51:	83 fa 39             	cmp    $0x39,%edx
476e54:	76 0e                	jbe    0x476e64
476e56:	8a c1                	mov    %cl,%al
476e58:	34 01                	xor    $0x1,%al
476e5a:	c0 e0 05             	shl    $0x5,%al
476e5d:	04 07                	add    $0x7,%al
476e5f:	02 c2                	add    %dl,%al
476e61:	0f b6 d0             	movzbl %al,%edx
476e64:	66 89 13             	mov    %dx,(%ebx)
476e67:	83 46 30 fe          	addl   $0xfffffffe,0x30(%esi)
476e6b:	8b 46 30             	mov    0x30(%esi),%eax
476e6e:	8b d8                	mov    %eax,%ebx
476e70:	eb c0                	jmp    0x476e32
476e72:	8b 4d fc             	mov    -0x4(%ebp),%ecx
476e75:	2b c8                	sub    %eax,%ecx
476e77:	d1 f9                	sar    $1,%ecx
476e79:	83 c0 02             	add    $0x2,%eax
476e7c:	89 4e 34             	mov    %ecx,0x34(%esi)
476e7f:	5f                   	pop    %edi
476e80:	89 46 30             	mov    %eax,0x30(%esi)
476e83:	5e                   	pop    %esi
476e84:	5b                   	pop    %ebx
476e85:	c9                   	leave
476e86:	c2 08 00             	ret    $0x8
476e89:	8b ff                	mov    %edi,%edi
476e8b:	55                   	push   %ebp
476e8c:	8b ec                	mov    %esp,%ebp
476e8e:	51                   	push   %ecx
476e8f:	51                   	push   %ecx
476e90:	53                   	push   %ebx
476e91:	56                   	push   %esi
476e92:	8b f1                	mov    %ecx,%esi
476e94:	57                   	push   %edi
476e95:	8d 4e 3c             	lea    0x3c(%esi),%ecx
476e98:	8b b9 04 04 00 00    	mov    0x404(%ecx),%edi
476e9e:	85 ff                	test   %edi,%edi
476ea0:	75 02                	jne    0x476ea4
476ea2:	8b f9                	mov    %ecx,%edi
476ea4:	e8 81 e9 ff ff       	call   0x47582a
476ea9:	8b 5d 08             	mov    0x8(%ebp),%ebx
476eac:	8d 48 ff             	lea    -0x1(%eax),%ecx
476eaf:	03 cf                	add    %edi,%ecx
476eb1:	8b 7d 0c             	mov    0xc(%ebp),%edi
476eb4:	89 4d f8             	mov    %ecx,-0x8(%ebp)
476eb7:	8b d1                	mov    %ecx,%edx
476eb9:	89 4e 30             	mov    %ecx,0x30(%esi)
476ebc:	89 4d fc             	mov    %ecx,-0x4(%ebp)
476ebf:	8b 46 24             	mov    0x24(%esi),%eax
476ec2:	85 c0                	test   %eax,%eax
476ec4:	7f 09                	jg     0x476ecf
476ec6:	8b c3                	mov    %ebx,%eax
476ec8:	0b c7                	or     %edi,%eax
476eca:	74 20                	je     0x476eec
476ecc:	8b 46 24             	mov    0x24(%esi),%eax
476ecf:	48                   	dec    %eax
476ed0:	89 46 24             	mov    %eax,0x24(%esi)
476ed3:	8a c3                	mov    %bl,%al
476ed5:	24 07                	and    $0x7,%al
476ed7:	0f ac fb 03          	shrd   $0x3,%edi,%ebx
476edb:	04 30                	add    $0x30,%al
476edd:	88 01                	mov    %al,(%ecx)
476edf:	c1 ef 03             	shr    $0x3,%edi
476ee2:	ff 4e 30             	decl   0x30(%esi)
476ee5:	8b 56 30             	mov    0x30(%esi),%edx
476ee8:	8b ca                	mov    %edx,%ecx
476eea:	eb d3                	jmp    0x476ebf
476eec:	8b 4d f8             	mov    -0x8(%ebp),%ecx
476eef:	8d 42 01             	lea    0x1(%edx),%eax
476ef2:	2b ca                	sub    %edx,%ecx
476ef4:	89 4e 34             	mov    %ecx,0x34(%esi)
476ef7:	5f                   	pop    %edi
476ef8:	89 46 30             	mov    %eax,0x30(%esi)
476efb:	5e                   	pop    %esi
476efc:	5b                   	pop    %ebx
476efd:	c9                   	leave
476efe:	c2 0c 00             	ret    $0xc
476f01:	8b ff                	mov    %edi,%edi
476f03:	55                   	push   %ebp
476f04:	8b ec                	mov    %esp,%ebp
476f06:	83 ec 10             	sub    $0x10,%esp
476f09:	53                   	push   %ebx
476f0a:	56                   	push   %esi
476f0b:	8b f1                	mov    %ecx,%esi
476f0d:	57                   	push   %edi
476f0e:	8d 4e 3c             	lea    0x3c(%esi),%ecx
476f11:	8b b9 04 04 00 00    	mov    0x404(%ecx),%edi
476f17:	85 ff                	test   %edi,%edi
476f19:	75 02                	jne    0x476f1d
476f1b:	8b f9                	mov    %ecx,%edi
476f1d:	e8 20 e9 ff ff       	call   0x475842
476f22:	8b 55 0c             	mov    0xc(%ebp),%edx
476f25:	8b 5d 08             	mov    0x8(%ebp),%ebx
476f28:	8d 48 ff             	lea    -0x1(%eax),%ecx
476f2b:	8d 0c 4f             	lea    (%edi,%ecx,2),%ecx
476f2e:	89 4d f8             	mov    %ecx,-0x8(%ebp)
476f31:	8b f9                	mov    %ecx,%edi
476f33:	89 4e 30             	mov    %ecx,0x30(%esi)
476f36:	89 4d fc             	mov    %ecx,-0x4(%ebp)
476f39:	8b 46 24             	mov    0x24(%esi),%eax
476f3c:	89 5d fc             	mov    %ebx,-0x4(%ebp)
476f3f:	89 55 f4             	mov    %edx,-0xc(%ebp)
476f42:	85 c0                	test   %eax,%eax
476f44:	7f 09                	jg     0x476f4f
476f46:	8b c3                	mov    %ebx,%eax
476f48:	0b c2                	or     %edx,%eax
476f4a:	74 25                	je     0x476f71
476f4c:	8b 46 24             	mov    0x24(%esi),%eax
476f4f:	48                   	dec    %eax
476f50:	89 46 24             	mov    %eax,0x24(%esi)
476f53:	8b 45 fc             	mov    -0x4(%ebp),%eax
476f56:	83 e0 07             	and    $0x7,%eax
476f59:	0f ac d3 03          	shrd   $0x3,%edx,%ebx
476f5d:	83 c0 30             	add    $0x30,%eax
476f60:	66 89 01             	mov    %ax,(%ecx)
476f63:	c1 ea 03             	shr    $0x3,%edx
476f66:	83 46 30 fe          	addl   $0xfffffffe,0x30(%esi)
476f6a:	8b 7e 30             	mov    0x30(%esi),%edi
476f6d:	8b cf                	mov    %edi,%ecx
476f6f:	eb c8                	jmp    0x476f39
476f71:	8b 4d f8             	mov    -0x8(%ebp),%ecx
476f74:	8d 47 02             	lea    0x2(%edi),%eax
476f77:	2b cf                	sub    %edi,%ecx
476f79:	d1 f9                	sar    $1,%ecx
476f7b:	89 4e 34             	mov    %ecx,0x34(%esi)
476f7e:	5f                   	pop    %edi
476f7f:	89 46 30             	mov    %eax,0x30(%esi)
476f82:	5e                   	pop    %esi
476f83:	5b                   	pop    %ebx
476f84:	c9                   	leave
476f85:	c2 0c 00             	ret    $0xc
476f88:	8b ff                	mov    %edi,%edi
476f8a:	55                   	push   %ebp
476f8b:	8b ec                	mov    %esp,%ebp
476f8d:	83 ec 0c             	sub    $0xc,%esp
476f90:	53                   	push   %ebx
476f91:	56                   	push   %esi
476f92:	8b f1                	mov    %ecx,%esi
476f94:	57                   	push   %edi
476f95:	8d 4e 3c             	lea    0x3c(%esi),%ecx
476f98:	8b b9 04 04 00 00    	mov    0x404(%ecx),%edi
476f9e:	85 ff                	test   %edi,%edi
476fa0:	75 02                	jne    0x476fa4
476fa2:	8b f9                	mov    %ecx,%edi
476fa4:	e8 81 e8 ff ff       	call   0x47582a
476fa9:	48                   	dec    %eax
476faa:	03 f8                	add    %eax,%edi
476fac:	8b 45 08             	mov    0x8(%ebp),%eax
476faf:	89 7d f4             	mov    %edi,-0xc(%ebp)
476fb2:	8b cf                	mov    %edi,%ecx
476fb4:	89 7e 30             	mov    %edi,0x30(%esi)
476fb7:	89 7d f8             	mov    %edi,-0x8(%ebp)
476fba:	8b 7d 0c             	mov    0xc(%ebp),%edi
476fbd:	89 45 fc             	mov    %eax,-0x4(%ebp)
476fc0:	8b 56 24             	mov    0x24(%esi),%edx
476fc3:	85 d2                	test   %edx,%edx