40680e:	89 45 f4             	mov    %eax,-0xc(%ebp)
406811:	8b 04 8a             	mov    (%edx,%ecx,4),%eax
406814:	0f b7 40 08          	movzwl 0x8(%eax),%eax
406818:	66 3b 45 ec          	cmp    -0x14(%ebp),%ax
40681c:	0f 85 d1 00 00 00    	jne    0x4068f3
406822:	41                   	inc    %ecx
406823:	6a 48                	push   $0x48
406825:	8b 04 8a             	mov    (%edx,%ecx,4),%eax
406828:	5f                   	pop    %edi
406829:	66 39 78 08          	cmp    %di,0x8(%eax)
40682d:	8b 7d f0             	mov    -0x10(%ebp),%edi
406830:	89 0e                	mov    %ecx,(%esi)
406832:	0f 84 07 f6 06 00    	je     0x475e3f
406838:	8b 06                	mov    (%esi),%eax
40683a:	6a 48                	push   $0x48
40683c:	8b 04 82             	mov    (%edx,%eax,4),%eax
40683f:	59                   	pop    %ecx
406840:	0f b7 40 08          	movzwl 0x8(%eax),%eax
406844:	66 3b c1             	cmp    %cx,%ax
406847:	0f 85 f0 fe ff ff    	jne    0x40673d
40684d:	ff 06                	incl   (%esi)
40684f:	8b 0e                	mov    (%esi),%ecx
406851:	8b 43 04             	mov    0x4(%ebx),%eax
406854:	6a 7f                	push   $0x7f
406856:	8b 04 88             	mov    (%eax,%ecx,4),%eax
406859:	59                   	pop    %ecx
40685a:	66 39 48 08          	cmp    %cx,0x8(%eax)
40685e:	0f 85 01 f6 06 00    	jne    0x475e65
406864:	8b 5d 14             	mov    0x14(%ebp),%ebx
406867:	53                   	push   %ebx
406868:	e8 e5 ee ff ff       	call   0x405752
40686d:	85 c0                	test   %eax,%eax
40686f:	0f 88 fe f5 06 00    	js     0x475e73
406875:	ff 75 10             	push   0x10(%ebp)
406878:	8d 4d 9c             	lea    -0x64(%ebp),%ecx
40687b:	e8 6d 06 00 00       	call   0x406eed
406880:	8b 45 e0             	mov    -0x20(%ebp),%eax
406883:	89 45 ac             	mov    %eax,-0x54(%ebp)
406886:	8b 03                	mov    (%ebx),%eax
406888:	48                   	dec    %eax
406889:	89 45 b8             	mov    %eax,-0x48(%ebp)
40688c:	8b 45 f4             	mov    -0xc(%ebp),%eax
40688f:	89 45 b0             	mov    %eax,-0x50(%ebp)
406892:	83 ff ff             	cmp    $0xffffffff,%edi
406895:	75 02                	jne    0x406899
406897:	8b f8                	mov    %eax,%edi
406899:	8a 45 18             	mov    0x18(%ebp),%al
40689c:	88 45 bc             	mov    %al,-0x44(%ebp)
40689f:	8d 45 9c             	lea    -0x64(%ebp),%eax
4068a2:	50                   	push   %eax
4068a3:	b9 98 12 4c 00       	mov    $0x4c1298,%ecx
4068a8:	89 7d b4             	mov    %edi,-0x4c(%ebp)
4068ab:	e8 c6 eb ff ff       	call   0x405476
4068b0:	8d 4d c0             	lea    -0x40(%ebp),%ecx
4068b3:	e8 7f 62 00 00       	call   0x40cb37
4068b8:	8d 4d d0             	lea    -0x30(%ebp),%ecx
4068bb:	e8 32 eb ff ff       	call   0x4053f2
4068c0:	8d 4d 9c             	lea    -0x64(%ebp),%ecx
4068c3:	e8 6f 62 00 00       	call   0x40cb37
4068c8:	8b 45 e8             	mov    -0x18(%ebp),%eax
4068cb:	5f                   	pop    %edi
4068cc:	5e                   	pop    %esi
4068cd:	5b                   	pop    %ebx
4068ce:	c9                   	leave
4068cf:	c2 14 00             	ret    $0x14
4068d2:	85 c9                	test   %ecx,%ecx
4068d4:	0f 85 1d ff ff ff    	jne    0x4067f7
4068da:	8b 7d f0             	mov    -0x10(%ebp),%edi
4068dd:	8b 45 f4             	mov    -0xc(%ebp),%eax
4068e0:	83 ff ff             	cmp    $0xffffffff,%edi
4068e3:	0f 85 22 ff ff ff    	jne    0x40680b
4068e9:	8b f8                	mov    %eax,%edi
4068eb:	89 7d f0             	mov    %edi,-0x10(%ebp)
4068ee:	e9 18 ff ff ff       	jmp    0x40680b
4068f3:	6a 48                	push   $0x48
4068f5:	5b                   	pop    %ebx
4068f6:	66 3b c3             	cmp    %bx,%ax
4068f9:	8b 5d 08             	mov    0x8(%ebp),%ebx
4068fc:	0f 85 2c f5 06 00    	jne    0x475e2e
406902:	66 3b 45 ec          	cmp    -0x14(%ebp),%ax
406906:	0f 85 2c ff ff ff    	jne    0x406838
40690c:	e9 11 ff ff ff       	jmp    0x406822
406911:	49                   	dec    %ecx
406912:	78 c6                	js     0x4068da
406914:	e9 de fe ff ff       	jmp    0x4067f7
406919:	41                   	inc    %ecx
40691a:	e9 d8 fe ff ff       	jmp    0x4067f7
40691f:	6a ff                	push   $0xffffffff
406921:	e9 13 f5 06 00       	jmp    0x475e39
406926:	8b 41 04             	mov    0x4(%ecx),%eax
406929:	3b 42 04             	cmp    0x4(%edx),%eax
40692c:	74 03                	je     0x406931
40692e:	32 c0                	xor    %al,%al
406930:	c3                   	ret
406931:	8b 12                	mov    (%edx),%edx
406933:	8b 09                	mov    (%ecx),%ecx
406935:	50                   	push   %eax
406936:	e8 62 55 00 00       	call   0x40be9d
40693b:	59                   	pop    %ecx
40693c:	85 c0                	test   %eax,%eax
40693e:	75 ee                	jne    0x40692e
406940:	b0 01                	mov    $0x1,%al
406942:	c3                   	ret
406943:	55                   	push   %ebp
406944:	8b ec                	mov    %esp,%ebp
406946:	83 ec 10             	sub    $0x10,%esp
406949:	53                   	push   %ebx
40694a:	8b 5d 08             	mov    0x8(%ebp),%ebx
40694d:	56                   	push   %esi
40694e:	8b 43 04             	mov    0x4(%ebx),%eax
406951:	57                   	push   %edi
406952:	8b 30                	mov    (%eax),%esi
406954:	8b ce                	mov    %esi,%ecx
406956:	e8 11 2a 00 00       	call   0x40936c
40695b:	8b 46 08             	mov    0x8(%esi),%eax
40695e:	83 cf ff             	or     $0xffffffff,%edi
406961:	8b 70 04             	mov    0x4(%eax),%esi
406964:	8b 43 04             	mov    0x4(%ebx),%eax
406967:	8b 48 04             	mov    0x4(%eax),%ecx
40696a:	e8 17 69 00 00       	call   0x40d286
40696f:	8d 58 ff             	lea    -0x1(%eax),%ebx
406972:	8b 45 08             	mov    0x8(%ebp),%eax
406975:	83 78 08 02          	cmpl   $0x2,0x8(%eax)
406979:	76 0d                	jbe    0x406988
40697b:	8b 40 04             	mov    0x4(%eax),%eax
40697e:	8b 48 08             	mov    0x8(%eax),%ecx
406981:	e8 00 69 00 00       	call   0x40d286
406986:	8b f8                	mov    %eax,%edi
406988:	8d 4d f0             	lea    -0x10(%ebp),%ecx
40698b:	e8 67 6e 00 00       	call   0x40d7f7
406990:	3b de                	cmp    %esi,%ebx
406992:	7f 51                	jg     0x4069e5
406994:	85 db                	test   %ebx,%ebx
406996:	78 4d                	js     0x4069e5
406998:	85 ff                	test   %edi,%edi
40699a:	0f 88 fd 5b 07 00    	js     0x47c59d
4069a0:	8b c6                	mov    %esi,%eax
4069a2:	2b c3                	sub    %ebx,%eax
4069a4:	3b f8                	cmp    %eax,%edi
4069a6:	0f 8f f1 5b 07 00    	jg     0x47c59d
4069ac:	8b 45 08             	mov    0x8(%ebp),%eax
4069af:	8b 40 04             	mov    0x4(%eax),%eax
4069b2:	8b 30                	mov    (%eax),%esi
4069b4:	8b ce                	mov    %esi,%ecx
4069b6:	e8 b1 29 00 00       	call   0x40936c
4069bb:	57                   	push   %edi
4069bc:	53                   	push   %ebx
4069bd:	ff 76 08             	push   0x8(%esi)
4069c0:	8d 4d f0             	lea    -0x10(%ebp),%ecx
4069c3:	e8 21 00 00 00       	call   0x4069e9
4069c8:	8b 4d 0c             	mov    0xc(%ebp),%ecx
4069cb:	8d 45 f0             	lea    -0x10(%ebp),%eax
4069ce:	50                   	push   %eax
4069cf:	e8 94 01 00 00       	call   0x406b68
4069d4:	8d 4d f0             	lea    -0x10(%ebp),%ecx
4069d7:	e8 5b 61 00 00       	call   0x40cb37
4069dc:	5f                   	pop    %edi
4069dd:	5e                   	pop    %esi
4069de:	33 c0                	xor    %eax,%eax
4069e0:	5b                   	pop    %ebx
4069e1:	c9                   	leave
4069e2:	c2 08 00             	ret    $0x8
4069e5:	8b de                	mov    %esi,%ebx
4069e7:	eb af                	jmp    0x406998
4069e9:	55                   	push   %ebp
4069ea:	8b ec                	mov    %esp,%ebp
4069ec:	53                   	push   %ebx
4069ed:	56                   	push   %esi
4069ee:	8b 75 10             	mov    0x10(%ebp),%esi
4069f1:	57                   	push   %edi
4069f2:	8b f9                	mov    %ecx,%edi
4069f4:	85 f6                	test   %esi,%esi
4069f6:	74 5e                	je     0x406a56
4069f8:	8b 4d 08             	mov    0x8(%ebp),%ecx
4069fb:	8b 5d 0c             	mov    0xc(%ebp),%ebx
4069fe:	3b 59 04             	cmp    0x4(%ecx),%ebx
406a01:	73 53                	jae    0x406a56
406a03:	83 fe ff             	cmp    $0xffffffff,%esi
406a06:	74 47                	je     0x406a4f
406a08:	8d 04 33             	lea    (%ebx,%esi,1),%eax
406a0b:	3b 41 04             	cmp    0x4(%ecx),%eax
406a0e:	77 3f                	ja     0x406a4f
406a10:	8b cf                	mov    %edi,%ecx
406a12:	e8 d3 00 00 00       	call   0x406aea
406a17:	8b cf                	mov    %edi,%ecx
406a19:	84 c0                	test   %al,%al
406a1b:	0f 85 cd b5 06 00    	jne    0x471fee
406a21:	56                   	push   %esi
406a22:	e8 42 59 00 00       	call   0x40c369
406a27:	8b 45 08             	mov    0x8(%ebp),%eax
406a2a:	89 77 04             	mov    %esi,0x4(%edi)
406a2d:	8b 00                	mov    (%eax),%eax
406a2f:	03 f6                	add    %esi,%esi
406a31:	56                   	push   %esi
406a32:	8d 04 58             	lea    (%eax,%ebx,2),%eax
406a35:	50                   	push   %eax
406a36:	ff 37                	push   (%edi)
406a38:	e8 43 84 01 00       	call   0x41ee80
406a3d:	8b 07                	mov    (%edi),%eax
406a3f:	83 c4 0c             	add    $0xc,%esp
406a42:	33 c9                	xor    %ecx,%ecx
406a44:	66 89 0c 06          	mov    %cx,(%esi,%eax,1)
406a48:	5f                   	pop    %edi
406a49:	5e                   	pop    %esi
406a4a:	5b                   	pop    %ebx
406a4b:	5d                   	pop    %ebp
406a4c:	c2 0c 00             	ret    $0xc
406a4f:	8b 71 04             	mov    0x4(%ecx),%esi
406a52:	2b f3                	sub    %ebx,%esi
406a54:	eb ba                	jmp    0x406a10
406a56:	6a ff                	push   $0xffffffff
406a58:	6a 00                	push   $0x0
406a5a:	8b cf                	mov    %edi,%ecx
406a5c:	e8 2a 47 00 00       	call   0x40b18b
406a61:	eb e5                	jmp    0x406a48
406a63:	55                   	push   %ebp
406a64:	8b ec                	mov    %esp,%ebp
406a66:	83 7d 08 00          	cmpl   $0x0,0x8(%ebp)
406a6a:	56                   	push   %esi
406a6b:	8b f1                	mov    %ecx,%esi
406a6d:	74 70                	je     0x406adf
406a6f:	53                   	push   %ebx
406a70:	ff 75 08             	push   0x8(%ebp)
406a73:	e8 63 a2 01 00       	call   0x420cdb
406a78:	59                   	pop    %ecx
406a79:	8b d8                	mov    %eax,%ebx
406a7b:	8b ce                	mov    %esi,%ecx
406a7d:	89 5e 04             	mov    %ebx,0x4(%esi)
406a80:	e8 65 00 00 00       	call   0x406aea
406a85:	8b ce                	mov    %esi,%ecx
406a87:	84 c0                	test   %al,%al
406a89:	74 4c                	je     0x406ad7
406a8b:	8b 46 0c             	mov    0xc(%esi),%eax
406a8e:	ff 08                	decl   (%eax)
406a90:	e8 b5 00 00 00       	call   0x406b4a
406a95:	8b 46 04             	mov    0x4(%esi),%eax
406a98:	40                   	inc    %eax
406a99:	50                   	push   %eax
406a9a:	e8 57 00 00 00       	call   0x406af6
406a9f:	33 c9                	xor    %ecx,%ecx
406aa1:	6a 02                	push   $0x2
406aa3:	5a                   	pop    %edx
406aa4:	89 46 08             	mov    %eax,0x8(%esi)
406aa7:	f7 e2                	mul    %edx
406aa9:	0f 90 c1             	seto   %cl
406aac:	f7 d9                	neg    %ecx
406aae:	0b c8                	or     %eax,%ecx
406ab0:	51                   	push   %ecx
406ab1:	e8 bf 83 01 00       	call   0x41ee75
406ab6:	59                   	pop    %ecx
406ab7:	89 06                	mov    %eax,(%esi)
406ab9:	8b 46 04             	mov    0x4(%esi),%eax
406abc:	8d 04 45 02 00 00 00 	lea    0x2(,%eax,2),%eax
406ac3:	50                   	push   %eax
406ac4:	ff 75 08             	push   0x8(%ebp)
406ac7:	ff 36                	push   (%esi)
406ac9:	e8 b2 83 01 00       	call   0x41ee80
406ace:	83 c4 0c             	add    $0xc,%esp
406ad1:	5b                   	pop    %ebx
406ad2:	5e                   	pop    %esi
406ad3:	5d                   	pop    %ebp
406ad4:	c2 04 00             	ret    $0x4
406ad7:	53                   	push   %ebx
406ad8:	e8 8c 58 00 00       	call   0x40c369
406add:	eb da                	jmp    0x406ab9
406adf:	6a ff                	push   $0xffffffff
406ae1:	6a 00                	push   $0x0
406ae3:	e8 a3 46 00 00       	call   0x40b18b
406ae8:	eb e8                	jmp    0x406ad2
406aea:	8b 49 0c             	mov    0xc(%ecx),%ecx
406aed:	33 c0                	xor    %eax,%eax
406aef:	83 39 01             	cmpl   $0x1,(%ecx)
406af2:	0f 9f c0             	setg   %al
406af5:	c3                   	ret
406af6:	55                   	push   %ebp
406af7:	8b ec                	mov    %esp,%ebp
406af9:	8b 45 08             	mov    0x8(%ebp),%eax
406afc:	85 c0                	test   %eax,%eax
406afe:	74 0a                	je     0x406b0a
406b00:	83 c0 07             	add    $0x7,%eax
406b03:	83 e0 f8             	and    $0xfffffff8,%eax
406b06:	5d                   	pop    %ebp
406b07:	c2 04 00             	ret    $0x4
406b0a:	6a 08                	push   $0x8
406b0c:	58                   	pop    %eax
406b0d:	eb f7                	jmp    0x406b06
406b0f:	55                   	push   %ebp
406b10:	8b ec                	mov    %esp,%ebp
406b12:	8b 45 08             	mov    0x8(%ebp),%eax
406b15:	56                   	push   %esi
406b16:	8b f1                	mov    %ecx,%esi
406b18:	33 c9                	xor    %ecx,%ecx
406b1a:	83 66 04 00          	andl   $0x0,0x4(%esi)
406b1e:	40                   	inc    %eax
406b1f:	6a 02                	push   $0x2
406b21:	5a                   	pop    %edx
406b22:	89 46 08             	mov    %eax,0x8(%esi)
406b25:	f7 e2                	mul    %edx
406b27:	0f 90 c1             	seto   %cl
406b2a:	f7 d9                	neg    %ecx
406b2c:	0b c8                	or     %eax,%ecx
406b2e:	51                   	push   %ecx
406b2f:	e8 b6 89 01 00       	call   0x41f4ea
406b34:	59                   	pop    %ecx
406b35:	33 c9                	xor    %ecx,%ecx
406b37:	89 06                	mov    %eax,(%esi)
406b39:	66 89 08             	mov    %cx,(%eax)
406b3c:	8b ce                	mov    %esi,%ecx
406b3e:	e8 07 00 00 00       	call   0x406b4a
406b43:	8b c6                	mov    %esi,%eax
406b45:	5e                   	pop    %esi
406b46:	5d                   	pop    %ebp
406b47:	c2 04 00             	ret    $0x4
406b4a:	56                   	push   %esi
406b4b:	6a 04                	push   $0x4
406b4d:	8b f1                	mov    %ecx,%esi
406b4f:	e8 96 89 01 00       	call   0x41f4ea
406b54:	59                   	pop    %ecx
406b55:	85 c0                	test   %eax,%eax
406b57:	74 0b                	je     0x406b64
406b59:	c7 00 01 00 00 00    	movl   $0x1,(%eax)
406b5f:	89 46 0c             	mov    %eax,0xc(%esi)
406b62:	5e                   	pop    %esi
406b63:	c3                   	ret
406b64:	33 c0                	xor    %eax,%eax
406b66:	eb f7                	jmp    0x406b5f
406b68:	55                   	push   %ebp
406b69:	8b ec                	mov    %esp,%ebp
406b6b:	56                   	push   %esi
406b6c:	8b f1                	mov    %ecx,%esi
406b6e:	83 7e 0c 04          	cmpl   $0x4,0xc(%esi)
406b72:	74 3f                	je     0x406bb3
406b74:	e8 a7 c0 00 00       	call   0x412c20
406b79:	6a 10                	push   $0x10
406b7b:	c7 46 0c 04 00 00 00 	movl   $0x4,0xc(%esi)
406b82:	e8 63 89 01 00       	call   0x41f4ea
406b87:	8b d0                	mov    %eax,%edx
406b89:	59                   	pop    %ecx
406b8a:	85 d2                	test   %edx,%edx
406b8c:	74 32                	je     0x406bc0
406b8e:	8b 45 08             	mov    0x8(%ebp),%eax
406b91:	8b 08                	mov    (%eax),%ecx
406b93:	89 0a                	mov    %ecx,(%edx)
406b95:	8b 48 04             	mov    0x4(%eax),%ecx
406b98:	89 4a 04             	mov    %ecx,0x4(%edx)
406b9b:	8b 48 08             	mov    0x8(%eax),%ecx
406b9e:	89 4a 08             	mov    %ecx,0x8(%edx)
406ba1:	8b 40 0c             	mov    0xc(%eax),%eax
406ba4:	89 42 0c             	mov    %eax,0xc(%edx)
406ba7:	ff 00                	incl   (%eax)