40dda8:	8b 7d 0c             	mov    0xc(%ebp),%edi
40ddab:	85 ff                	test   %edi,%edi
40ddad:	0f 84 0a 01 00 00    	je     0x40debd
40ddb3:	8b 5d 10             	mov    0x10(%ebp),%ebx
40ddb6:	85 db                	test   %ebx,%ebx
40ddb8:	0f 84 ff 00 00 00    	je     0x40debd
40ddbe:	80 3f 00             	cmpb   $0x0,(%edi)
40ddc1:	75 15                	jne    0x40ddd8
40ddc3:	8b 45 08             	mov    0x8(%ebp),%eax
40ddc6:	85 c0                	test   %eax,%eax
40ddc8:	0f 84 fd 00 00 00    	je     0x40decb
40ddce:	33 c9                	xor    %ecx,%ecx
40ddd0:	66 89 08             	mov    %cx,(%eax)
40ddd3:	e9 f3 00 00 00       	jmp    0x40decb
40ddd8:	8b 75 14             	mov    0x14(%ebp),%esi
40dddb:	80 7e 14 00          	cmpb   $0x0,0x14(%esi)
40dddf:	75 07                	jne    0x40dde8
40dde1:	8b ce                	mov    %esi,%ecx
40dde3:	e8 b8 b0 ff ff       	call   0x408ea0
40dde8:	8b 46 0c             	mov    0xc(%esi),%eax
40ddeb:	8b 48 08             	mov    0x8(%eax),%ecx
40ddee:	89 4d fc             	mov    %ecx,-0x4(%ebp)
40ddf1:	81 f9 e9 fd 00 00    	cmp    $0xfde9,%ecx
40ddf7:	75 23                	jne    0x40de1c
40ddf9:	56                   	push   %esi
40ddfa:	68 b8 23 42 00       	push   $0x4223b8
40ddff:	53                   	push   %ebx
40de00:	57                   	push   %edi
40de01:	ff 75 08             	push   0x8(%ebp)
40de04:	e8 c0 30 00 00       	call   0x410ec9
40de09:	83 c4 14             	add    $0x14,%esp
40de0c:	85 c0                	test   %eax,%eax
40de0e:	0f 89 b9 00 00 00    	jns    0x40decd
40de14:	83 c8 ff             	or     $0xffffffff,%eax
40de17:	e9 b1 00 00 00       	jmp    0x40decd
40de1c:	33 d2                	xor    %edx,%edx
40de1e:	39 90 a8 00 00 00    	cmp    %edx,0xa8(%eax)
40de24:	75 13                	jne    0x40de39
40de26:	8b 4d 08             	mov    0x8(%ebp),%ecx
40de29:	85 c9                	test   %ecx,%ecx
40de2b:	0f 84 87 00 00 00    	je     0x40deb8
40de31:	0f b6 07             	movzbl (%edi),%eax
40de34:	66 89 01             	mov    %ax,(%ecx)
40de37:	eb 7f                	jmp    0x40deb8
40de39:	0f b6 0f             	movzbl (%edi),%ecx
40de3c:	8b 00                	mov    (%eax),%eax
40de3e:	66 39 14 48          	cmp    %dx,(%eax,%ecx,2)
40de42:	7d 54                	jge    0x40de98
40de44:	8b 46 0c             	mov    0xc(%esi),%eax
40de47:	8b 48 04             	mov    0x4(%eax),%ecx
40de4a:	83 f9 01             	cmp    $0x1,%ecx
40de4d:	7e 23                	jle    0x40de72
40de4f:	3b d9                	cmp    %ecx,%ebx
40de51:	7c 1f                	jl     0x40de72
40de53:	33 c0                	xor    %eax,%eax
40de55:	39 45 08             	cmp    %eax,0x8(%ebp)
40de58:	0f 95 c0             	setne  %al
40de5b:	50                   	push   %eax
40de5c:	ff 75 08             	push   0x8(%ebp)
40de5f:	51                   	push   %ecx
40de60:	57                   	push   %edi
40de61:	6a 09                	push   $0x9
40de63:	ff 75 fc             	push   -0x4(%ebp)
40de66:	e8 09 11 00 00       	call   0x40ef74
40de6b:	83 c4 18             	add    $0x18,%esp
40de6e:	85 c0                	test   %eax,%eax
40de70:	75 0e                	jne    0x40de80
40de72:	8b 46 0c             	mov    0xc(%esi),%eax
40de75:	3b 58 04             	cmp    0x4(%eax),%ebx
40de78:	72 0e                	jb     0x40de88
40de7a:	80 7f 01 00          	cmpb   $0x0,0x1(%edi)
40de7e:	74 08                	je     0x40de88
40de80:	8b 46 0c             	mov    0xc(%esi),%eax
40de83:	8b 40 04             	mov    0x4(%eax),%eax
40de86:	eb 45                	jmp    0x40decd
40de88:	c6 46 1c 01          	movb   $0x1,0x1c(%esi)
40de8c:	c7 46 18 2a 00 00 00 	movl   $0x2a,0x18(%esi)
40de93:	e9 7c ff ff ff       	jmp    0x40de14
40de98:	33 c0                	xor    %eax,%eax
40de9a:	39 45 08             	cmp    %eax,0x8(%ebp)
40de9d:	0f 95 c0             	setne  %al
40dea0:	50                   	push   %eax
40dea1:	ff 75 08             	push   0x8(%ebp)
40dea4:	6a 01                	push   $0x1
40dea6:	57                   	push   %edi
40dea7:	6a 09                	push   $0x9
40dea9:	ff 75 fc             	push   -0x4(%ebp)
40deac:	e8 c3 10 00 00       	call   0x40ef74
40deb1:	83 c4 18             	add    $0x18,%esp
40deb4:	85 c0                	test   %eax,%eax
40deb6:	74 d0                	je     0x40de88
40deb8:	33 c0                	xor    %eax,%eax
40deba:	40                   	inc    %eax
40debb:	eb 10                	jmp    0x40decd
40debd:	33 d2                	xor    %edx,%edx
40debf:	89 15 b8 23 42 00    	mov    %edx,0x4223b8
40dec5:	89 15 bc 23 42 00    	mov    %edx,0x4223bc
40decb:	33 c0                	xor    %eax,%eax
40decd:	5f                   	pop    %edi
40dece:	5e                   	pop    %esi
40decf:	5b                   	pop    %ebx
40ded0:	c9                   	leave
40ded1:	c3                   	ret
40ded2:	8b ff                	mov    %edi,%edi
40ded4:	55                   	push   %ebp
40ded5:	8b ec                	mov    %esp,%ebp
40ded7:	83 ec 28             	sub    $0x28,%esp
40deda:	8d 4d d8             	lea    -0x28(%ebp),%ecx
40dedd:	56                   	push   %esi
40dede:	6a 00                	push   $0x0
40dee0:	e8 85 88 ff ff       	call   0x40676a
40dee5:	8d 45 d8             	lea    -0x28(%ebp),%eax
40dee8:	50                   	push   %eax
40dee9:	ff 75 10             	push   0x10(%ebp)
40deec:	ff 75 0c             	push   0xc(%ebp)
40deef:	ff 75 08             	push   0x8(%ebp)
40def2:	e8 a8 fe ff ff       	call   0x40dd9f
40def7:	83 c4 10             	add    $0x10,%esp
40defa:	8d 4d d8             	lea    -0x28(%ebp),%ecx
40defd:	8b f0                	mov    %eax,%esi
40deff:	e8 ae 88 ff ff       	call   0x4067b2
40df04:	8b c6                	mov    %esi,%eax
40df06:	5e                   	pop    %esi
40df07:	c9                   	leave
40df08:	c3                   	ret
40df09:	8b 0d c0 10 42 00    	mov    0x4210c0,%ecx
40df0f:	33 c0                	xor    %eax,%eax
40df11:	83 c9 01             	or     $0x1,%ecx
40df14:	39 0d c0 23 42 00    	cmp    %ecx,0x4223c0
40df1a:	0f 94 c0             	sete   %al
40df1d:	c3                   	ret
40df1e:	8b ff                	mov    %edi,%edi
40df20:	55                   	push   %ebp
40df21:	8b ec                	mov    %esp,%ebp
40df23:	8b 55 0c             	mov    0xc(%ebp),%edx
40df26:	83 6a 08 01          	subl   $0x1,0x8(%edx)
40df2a:	79 11                	jns    0x40df3d
40df2c:	ff 75 10             	push   0x10(%ebp)
40df2f:	52                   	push   %edx
40df30:	ff 75 08             	push   0x8(%ebp)
40df33:	e8 05 e0 ff ff       	call   0x40bf3d
40df38:	83 c4 0c             	add    $0xc,%esp
40df3b:	5d                   	pop    %ebp
40df3c:	c3                   	ret
40df3d:	8b 02                	mov    (%edx),%eax
40df3f:	8a 4d 08             	mov    0x8(%ebp),%cl
40df42:	88 08                	mov    %cl,(%eax)
40df44:	ff 02                	incl   (%edx)
40df46:	0f b6 c1             	movzbl %cl,%eax
40df49:	5d                   	pop    %ebp
40df4a:	c3                   	ret
40df4b:	8b ff                	mov    %edi,%edi
40df4d:	56                   	push   %esi
40df4e:	57                   	push   %edi
40df4f:	bf c8 23 42 00       	mov    $0x4223c8,%edi
40df54:	33 f6                	xor    %esi,%esi
40df56:	6a 00                	push   $0x0
40df58:	68 a0 0f 00 00       	push   $0xfa0
40df5d:	57                   	push   %edi
40df5e:	e8 b0 cb ff ff       	call   0x40ab13
40df63:	85 c0                	test   %eax,%eax
40df65:	74 18                	je     0x40df7f
40df67:	ff 05 18 25 42 00    	incl   0x422518
40df6d:	83 c6 18             	add    $0x18,%esi
40df70:	83 c7 18             	add    $0x18,%edi
40df73:	81 fe 50 01 00 00    	cmp    $0x150,%esi
40df79:	72 db                	jb     0x40df56
40df7b:	b0 01                	mov    $0x1,%al
40df7d:	eb 0a                	jmp    0x40df89
40df7f:	6a 00                	push   $0x0
40df81:	e8 1d 00 00 00       	call   0x40dfa3
40df86:	59                   	pop    %ecx
40df87:	32 c0                	xor    %al,%al
40df89:	5f                   	pop    %edi
40df8a:	5e                   	pop    %esi
40df8b:	c3                   	ret
40df8c:	8b ff                	mov    %edi,%edi
40df8e:	55                   	push   %ebp
40df8f:	8b ec                	mov    %esp,%ebp
40df91:	6b 45 08 18          	imul   $0x18,0x8(%ebp),%eax
40df95:	05 c8 23 42 00       	add    $0x4223c8,%eax
40df9a:	50                   	push   %eax
40df9b:	ff 15 90 90 41 00    	call   *0x419090
40dfa1:	5d                   	pop    %ebp
40dfa2:	c3                   	ret
40dfa3:	8b ff                	mov    %edi,%edi
40dfa5:	56                   	push   %esi
40dfa6:	8b 35 18 25 42 00    	mov    0x422518,%esi
40dfac:	85 f6                	test   %esi,%esi
40dfae:	74 20                	je     0x40dfd0
40dfb0:	6b c6 18             	imul   $0x18,%esi,%eax
40dfb3:	57                   	push   %edi
40dfb4:	8d b8 b0 23 42 00    	lea    0x4223b0(%eax),%edi
40dfba:	57                   	push   %edi
40dfbb:	ff 15 98 90 41 00    	call   *0x419098
40dfc1:	ff 0d 18 25 42 00    	decl   0x422518
40dfc7:	83 ef 18             	sub    $0x18,%edi
40dfca:	83 ee 01             	sub    $0x1,%esi
40dfcd:	75 eb                	jne    0x40dfba
40dfcf:	5f                   	pop    %edi
40dfd0:	b0 01                	mov    $0x1,%al
40dfd2:	5e                   	pop    %esi
40dfd3:	c3                   	ret
40dfd4:	8b ff                	mov    %edi,%edi
40dfd6:	55                   	push   %ebp
40dfd7:	8b ec                	mov    %esp,%ebp
40dfd9:	6b 45 08 18          	imul   $0x18,0x8(%ebp),%eax
40dfdd:	05 c8 23 42 00       	add    $0x4223c8,%eax
40dfe2:	50                   	push   %eax
40dfe3:	ff 15 94 90 41 00    	call   *0x419094
40dfe9:	5d                   	pop    %ebp
40dfea:	c3                   	ret
40dfeb:	8b ff                	mov    %edi,%edi
40dfed:	55                   	push   %ebp
40dfee:	8b ec                	mov    %esp,%ebp
40dff0:	8b 55 08             	mov    0x8(%ebp),%edx
40dff3:	56                   	push   %esi
40dff4:	57                   	push   %edi
40dff5:	85 d2                	test   %edx,%edx
40dff7:	74 13                	je     0x40e00c
40dff9:	8b 4d 0c             	mov    0xc(%ebp),%ecx
40dffc:	85 c9                	test   %ecx,%ecx
40dffe:	74 0c                	je     0x40e00c
40e000:	8b 75 10             	mov    0x10(%ebp),%esi
40e003:	85 f6                	test   %esi,%esi
40e005:	75 1a                	jne    0x40e021
40e007:	33 c0                	xor    %eax,%eax
40e009:	66 89 02             	mov    %ax,(%edx)
40e00c:	e8 1e c7 ff ff       	call   0x40a72f
40e011:	6a 16                	push   $0x16
40e013:	5e                   	pop    %esi
40e014:	89 30                	mov    %esi,(%eax)
40e016:	e8 ae 94 ff ff       	call   0x4074c9
40e01b:	5f                   	pop    %edi
40e01c:	8b c6                	mov    %esi,%eax
40e01e:	5e                   	pop    %esi
40e01f:	5d                   	pop    %ebp
40e020:	c3                   	ret
40e021:	8b fa                	mov    %edx,%edi
40e023:	2b f2                	sub    %edx,%esi
40e025:	0f b7 04 3e          	movzwl (%esi,%edi,1),%eax
40e029:	66 89 07             	mov    %ax,(%edi)
40e02c:	8d 7f 02             	lea    0x2(%edi),%edi
40e02f:	66 85 c0             	test   %ax,%ax
40e032:	74 17                	je     0x40e04b
40e034:	83 e9 01             	sub    $0x1,%ecx
40e037:	75 ec                	jne    0x40e025
40e039:	85 c9                	test   %ecx,%ecx
40e03b:	75 0e                	jne    0x40e04b
40e03d:	33 c0                	xor    %eax,%eax
40e03f:	66 89 02             	mov    %ax,(%edx)
40e042:	e8 e8 c6 ff ff       	call   0x40a72f
40e047:	6a 22                	push   $0x22
40e049:	eb c8                	jmp    0x40e013
40e04b:	33 f6                	xor    %esi,%esi
40e04d:	eb cc                	jmp    0x40e01b
40e04f:	8b ff                	mov    %edi,%edi
40e051:	55                   	push   %ebp
40e052:	8b ec                	mov    %esp,%ebp
40e054:	51                   	push   %ecx
40e055:	8b 4d 08             	mov    0x8(%ebp),%ecx
40e058:	53                   	push   %ebx
40e059:	8b 5d 10             	mov    0x10(%ebp),%ebx
40e05c:	56                   	push   %esi
40e05d:	8b 75 14             	mov    0x14(%ebp),%esi
40e060:	57                   	push   %edi
40e061:	85 f6                	test   %esi,%esi
40e063:	75 1f                	jne    0x40e084
40e065:	85 c9                	test   %ecx,%ecx
40e067:	75 1f                	jne    0x40e088
40e069:	39 75 0c             	cmp    %esi,0xc(%ebp)
40e06c:	74 2a                	je     0x40e098
40e06e:	e8 bc c6 ff ff       	call   0x40a72f
40e073:	6a 16                	push   $0x16
40e075:	5e                   	pop    %esi
40e076:	89 30                	mov    %esi,(%eax)
40e078:	e8 4c 94 ff ff       	call   0x4074c9
40e07d:	8b c6                	mov    %esi,%eax
40e07f:	5f                   	pop    %edi
40e080:	5e                   	pop    %esi
40e081:	5b                   	pop    %ebx
40e082:	c9                   	leave
40e083:	c3                   	ret
40e084:	85 c9                	test   %ecx,%ecx
40e086:	74 e6                	je     0x40e06e
40e088:	8b 45 0c             	mov    0xc(%ebp),%eax
40e08b:	85 c0                	test   %eax,%eax
40e08d:	74 df                	je     0x40e06e
40e08f:	85 f6                	test   %esi,%esi
40e091:	75 09                	jne    0x40e09c
40e093:	33 c0                	xor    %eax,%eax
40e095:	66 89 01             	mov    %ax,(%ecx)
40e098:	33 c0                	xor    %eax,%eax
40e09a:	eb e3                	jmp    0x40e07f
40e09c:	85 db                	test   %ebx,%ebx
40e09e:	75 07                	jne    0x40e0a7
40e0a0:	33 c0                	xor    %eax,%eax
40e0a2:	66 89 01             	mov    %ax,(%ecx)
40e0a5:	eb c7                	jmp    0x40e06e
40e0a7:	2b d9                	sub    %ecx,%ebx
40e0a9:	89 75 fc             	mov    %esi,-0x4(%ebp)
40e0ac:	8b d1                	mov    %ecx,%edx
40e0ae:	8b f8                	mov    %eax,%edi
40e0b0:	83 fe ff             	cmp    $0xffffffff,%esi
40e0b3:	75 16                	jne    0x40e0cb
40e0b5:	0f b7 04 13          	movzwl (%ebx,%edx,1),%eax
40e0b9:	66 89 02             	mov    %ax,(%edx)
40e0bc:	8d 52 02             	lea    0x2(%edx),%edx
40e0bf:	66 85 c0             	test   %ax,%ax
40e0c2:	74 d4                	je     0x40e098
40e0c4:	83 ef 01             	sub    $0x1,%edi
40e0c7:	75 ec                	jne    0x40e0b5
40e0c9:	eb 26                	jmp    0x40e0f1
40e0cb:	0f b7 04 13          	movzwl (%ebx,%edx,1),%eax
40e0cf:	66 89 02             	mov    %ax,(%edx)
40e0d2:	8d 52 02             	lea    0x2(%edx),%edx
40e0d5:	66 85 c0             	test   %ax,%ax
40e0d8:	74 be                	je     0x40e098
40e0da:	8b 45 fc             	mov    -0x4(%ebp),%eax
40e0dd:	83 ef 01             	sub    $0x1,%edi
40e0e0:	74 08                	je     0x40e0ea
40e0e2:	83 e8 01             	sub    $0x1,%eax
40e0e5:	89 45 fc             	mov    %eax,-0x4(%ebp)
40e0e8:	75 e1                	jne    0x40e0cb
40e0ea:	85 c0                	test   %eax,%eax
40e0ec:	75 03                	jne    0x40e0f1
40e0ee:	66 89 02             	mov    %ax,(%edx)
40e0f1:	85 ff                	test   %edi,%edi
40e0f3:	75 a3                	jne    0x40e098
40e0f5:	83 fe ff             	cmp    $0xffffffff,%esi
40e0f8:	75 12                	jne    0x40e10c
40e0fa:	8b 45 0c             	mov    0xc(%ebp),%eax
40e0fd:	33 d2                	xor    %edx,%edx
40e0ff:	6a 50                	push   $0x50
40e101:	66 89 54 41 fe       	mov    %dx,-0x2(%ecx,%eax,2)
40e106:	58                   	pop    %eax
40e107:	e9 73 ff ff ff       	jmp    0x40e07f
40e10c:	33 c0                	xor    %eax,%eax
40e10e:	66 89 01             	mov    %ax,(%ecx)
40e111:	e8 19 c6 ff ff       	call   0x40a72f
40e116:	6a 22                	push   $0x22
40e118:	e9 58 ff ff ff       	jmp    0x40e075
40e11d:	8b ff                	mov    %edi,%edi
40e11f:	55                   	push   %ebp
40e120:	8b ec                	mov    %esp,%ebp
40e122:	5d                   	pop    %ebp
40e123:	e9 27 ff ff ff       	jmp    0x40e04f
40e128:	8b ff                	mov    %edi,%edi
40e12a:	55                   	push   %ebp
40e12b:	8b ec                	mov    %esp,%ebp