406853:	85 c0                	test   %eax,%eax
406855:	78 ef                	js     0x406846
406857:	56                   	push   %esi
406858:	e8 be fa ff ff       	call   0x40631b
40685d:	59                   	pop    %ecx
40685e:	89 7d fc             	mov    %edi,-0x4(%ebp)
406861:	f6 46 0c 40          	testb  $0x40,0xc(%esi)
406865:	75 71                	jne    0x4068d8
406867:	56                   	push   %esi
406868:	e8 cc 76 00 00       	call   0x40df39
40686d:	59                   	pop    %ecx
40686e:	8b d0                	mov    %eax,%edx
406870:	83 fa ff             	cmp    $0xffffffff,%edx
406873:	74 19                	je     0x40688e
406875:	83 fa fe             	cmp    $0xfffffffe,%edx
406878:	74 14                	je     0x40688e
40687a:	8b ca                	mov    %edx,%ecx
40687c:	c1 f9 05             	sar    $0x5,%ecx
40687f:	83 e0 1f             	and    $0x1f,%eax
406882:	c1 e0 06             	shl    $0x6,%eax
406885:	03 04 8d 20 2a 42 00 	add    0x422a20(,%ecx,4),%eax
40688c:	eb 05                	jmp    0x406893
40688e:	b8 18 10 42 00       	mov    $0x421018,%eax
406893:	f6 40 24 7f          	testb  $0x7f,0x24(%eax)
406897:	75 29                	jne    0x4068c2
406899:	83 fa ff             	cmp    $0xffffffff,%edx
40689c:	74 19                	je     0x4068b7
40689e:	83 fa fe             	cmp    $0xfffffffe,%edx
4068a1:	74 14                	je     0x4068b7
4068a3:	8b c2                	mov    %edx,%eax
4068a5:	c1 f8 05             	sar    $0x5,%eax
4068a8:	83 e2 1f             	and    $0x1f,%edx
4068ab:	c1 e2 06             	shl    $0x6,%edx
4068ae:	03 14 85 20 2a 42 00 	add    0x422a20(,%eax,4),%edx
4068b5:	eb 05                	jmp    0x4068bc
4068b7:	ba 18 10 42 00       	mov    $0x421018,%edx
4068bc:	f6 42 24 80          	testb  $0x80,0x24(%edx)
4068c0:	74 16                	je     0x4068d8
4068c2:	e8 b6 18 00 00       	call   0x40817d
4068c7:	c7 00 16 00 00 00    	movl   $0x16,(%eax)
4068cd:	e8 23 4d 00 00       	call   0x40b5f5
4068d2:	83 cf ff             	or     $0xffffffff,%edi
4068d5:	89 7d e4             	mov    %edi,-0x1c(%ebp)
4068d8:	85 ff                	test   %edi,%edi
4068da:	75 23                	jne    0x4068ff
4068dc:	ff 4e 04             	decl   0x4(%esi)
4068df:	78 0e                	js     0x4068ef
4068e1:	8b 06                	mov    (%esi),%eax
4068e3:	8b 4d 08             	mov    0x8(%ebp),%ecx
4068e6:	88 08                	mov    %cl,(%eax)
4068e8:	0f b6 f9             	movzbl %cl,%edi
4068eb:	ff 06                	incl   (%esi)
4068ed:	eb 0d                	jmp    0x4068fc
4068ef:	56                   	push   %esi
4068f0:	ff 75 08             	push   0x8(%ebp)
4068f3:	e8 38 4d 00 00       	call   0x40b630
4068f8:	59                   	pop    %ecx
4068f9:	59                   	pop    %ecx
4068fa:	8b f8                	mov    %eax,%edi
4068fc:	89 7d e4             	mov    %edi,-0x1c(%ebp)
4068ff:	c7 45 fc fe ff ff ff 	movl   $0xfffffffe,-0x4(%ebp)
406906:	e8 0e 00 00 00       	call   0x406919
40690b:	8b c7                	mov    %edi,%eax
40690d:	e8 e3 44 00 00       	call   0x40adf5
406912:	c3                   	ret
406913:	8b 75 0c             	mov    0xc(%ebp),%esi
406916:	8b 7d e4             	mov    -0x1c(%ebp),%edi
406919:	56                   	push   %esi
40691a:	e8 6b fa ff ff       	call   0x40638a
40691f:	59                   	pop    %ecx
406920:	c3                   	ret
406921:	55                   	push   %ebp
406922:	8b ec                	mov    %esp,%ebp
406924:	83 7d 08 00          	cmpl   $0x0,0x8(%ebp)
406928:	75 15                	jne    0x40693f
40692a:	e8 4e 18 00 00       	call   0x40817d
40692f:	c7 00 16 00 00 00    	movl   $0x16,(%eax)
406935:	e8 bb 4c 00 00       	call   0x40b5f5
40693a:	83 c8 ff             	or     $0xffffffff,%eax
40693d:	5d                   	pop    %ebp
40693e:	c3                   	ret
40693f:	8b 45 0c             	mov    0xc(%ebp),%eax
406942:	85 c0                	test   %eax,%eax
406944:	74 e4                	je     0x40692a
406946:	6a 00                	push   $0x0
406948:	ff 70 04             	push   0x4(%eax)
40694b:	ff 30                	push   (%eax)
40694d:	ff 75 08             	push   0x8(%ebp)
406950:	e8 05 00 00 00       	call   0x40695a
406955:	83 c4 10             	add    $0x10,%esp
406958:	5d                   	pop    %ebp
406959:	c3                   	ret
40695a:	6a 0c                	push   $0xc
40695c:	68 b0 e2 41 00       	push   $0x41e2b0
406961:	e8 4a 44 00 00       	call   0x40adb0
406966:	33 c0                	xor    %eax,%eax
406968:	8b 75 08             	mov    0x8(%ebp),%esi
40696b:	85 f6                	test   %esi,%esi
40696d:	0f 95 c0             	setne  %al
406970:	85 c0                	test   %eax,%eax
406972:	75 15                	jne    0x406989
406974:	e8 04 18 00 00       	call   0x40817d
406979:	c7 00 16 00 00 00    	movl   $0x16,(%eax)
40697f:	e8 71 4c 00 00       	call   0x40b5f5
406984:	83 c8 ff             	or     $0xffffffff,%eax
406987:	eb 3f                	jmp    0x4069c8
406989:	8b 7d 14             	mov    0x14(%ebp),%edi
40698c:	85 ff                	test   %edi,%edi
40698e:	74 0a                	je     0x40699a
406990:	83 ff 01             	cmp    $0x1,%edi
406993:	74 05                	je     0x40699a
406995:	83 ff 02             	cmp    $0x2,%edi
406998:	75 da                	jne    0x406974
40699a:	56                   	push   %esi
40699b:	e8 7b f9 ff ff       	call   0x40631b
4069a0:	59                   	pop    %ecx
4069a1:	83 65 fc 00          	andl   $0x0,-0x4(%ebp)
4069a5:	57                   	push   %edi
4069a6:	ff 75 10             	push   0x10(%ebp)
4069a9:	ff 75 0c             	push   0xc(%ebp)
4069ac:	56                   	push   %esi
4069ad:	e8 2a 00 00 00       	call   0x4069dc
4069b2:	83 c4 10             	add    $0x10,%esp
4069b5:	8b f8                	mov    %eax,%edi
4069b7:	89 7d e4             	mov    %edi,-0x1c(%ebp)
4069ba:	c7 45 fc fe ff ff ff 	movl   $0xfffffffe,-0x4(%ebp)
4069c1:	e8 0e 00 00 00       	call   0x4069d4
4069c6:	8b c7                	mov    %edi,%eax
4069c8:	e8 28 44 00 00       	call   0x40adf5
4069cd:	c3                   	ret
4069ce:	8b 75 08             	mov    0x8(%ebp),%esi
4069d1:	8b 7d e4             	mov    -0x1c(%ebp),%edi
4069d4:	56                   	push   %esi
4069d5:	e8 b0 f9 ff ff       	call   0x40638a
4069da:	59                   	pop    %ecx
4069db:	c3                   	ret
4069dc:	55                   	push   %ebp
4069dd:	8b ec                	mov    %esp,%ebp
4069df:	56                   	push   %esi
4069e0:	8b 75 08             	mov    0x8(%ebp),%esi
4069e3:	57                   	push   %edi
4069e4:	8b 46 0c             	mov    0xc(%esi),%eax
4069e7:	a8 83                	test   $0x83,%al
4069e9:	0f 84 8c 00 00 00    	je     0x406a7b
4069ef:	8b 7d 14             	mov    0x14(%ebp),%edi
4069f2:	85 ff                	test   %edi,%edi
4069f4:	74 0a                	je     0x406a00
4069f6:	83 ff 01             	cmp    $0x1,%edi
4069f9:	74 05                	je     0x406a00
4069fb:	83 ff 02             	cmp    $0x2,%edi
4069fe:	75 7b                	jne    0x406a7b
406a00:	83 e0 ef             	and    $0xffffffef,%eax
406a03:	53                   	push   %ebx
406a04:	89 46 0c             	mov    %eax,0xc(%esi)
406a07:	83 ff 01             	cmp    $0x1,%edi
406a0a:	75 15                	jne    0x406a21
406a0c:	56                   	push   %esi
406a0d:	e8 d5 82 00 00       	call   0x40ece7
406a12:	8b 5d 0c             	mov    0xc(%ebp),%ebx
406a15:	03 d8                	add    %eax,%ebx
406a17:	8b 45 10             	mov    0x10(%ebp),%eax
406a1a:	13 c2                	adc    %edx,%eax
406a1c:	59                   	pop    %ecx
406a1d:	33 ff                	xor    %edi,%edi
406a1f:	eb 06                	jmp    0x406a27
406a21:	8b 45 10             	mov    0x10(%ebp),%eax
406a24:	8b 5d 0c             	mov    0xc(%ebp),%ebx
406a27:	56                   	push   %esi
406a28:	89 45 08             	mov    %eax,0x8(%ebp)
406a2b:	e8 ea fa ff ff       	call   0x40651a
406a30:	8b 46 0c             	mov    0xc(%esi),%eax
406a33:	59                   	pop    %ecx
406a34:	84 c0                	test   %al,%al
406a36:	79 08                	jns    0x406a40
406a38:	83 e0 fc             	and    $0xfffffffc,%eax
406a3b:	89 46 0c             	mov    %eax,0xc(%esi)
406a3e:	eb 16                	jmp    0x406a56
406a40:	a8 01                	test   $0x1,%al
406a42:	74 12                	je     0x406a56
406a44:	a8 08                	test   $0x8,%al
406a46:	74 0e                	je     0x406a56
406a48:	a9 00 04 00 00       	test   $0x400,%eax
406a4d:	75 07                	jne    0x406a56
406a4f:	c7 46 18 00 02 00 00 	movl   $0x200,0x18(%esi)
406a56:	57                   	push   %edi
406a57:	ff 75 08             	push   0x8(%ebp)
406a5a:	53                   	push   %ebx
406a5b:	56                   	push   %esi
406a5c:	e8 d8 74 00 00       	call   0x40df39
406a61:	59                   	pop    %ecx
406a62:	50                   	push   %eax
406a63:	e8 2a 86 00 00       	call   0x40f092
406a68:	83 c4 10             	add    $0x10,%esp
406a6b:	23 c2                	and    %edx,%eax
406a6d:	83 c9 ff             	or     $0xffffffff,%ecx
406a70:	5b                   	pop    %ebx
406a71:	3b c1                	cmp    %ecx,%eax
406a73:	74 02                	je     0x406a77
406a75:	33 c9                	xor    %ecx,%ecx
406a77:	8b c1                	mov    %ecx,%eax
406a79:	eb 0e                	jmp    0x406a89
406a7b:	e8 fd 16 00 00       	call   0x40817d
406a80:	c7 00 16 00 00 00    	movl   $0x16,(%eax)
406a86:	83 c8 ff             	or     $0xffffffff,%eax
406a89:	5f                   	pop    %edi
406a8a:	5e                   	pop    %esi
406a8b:	5d                   	pop    %ebp
406a8c:	c3                   	ret
406a8d:	55                   	push   %ebp
406a8e:	8b ec                	mov    %esp,%ebp
406a90:	51                   	push   %ecx
406a91:	51                   	push   %ecx
406a92:	8b 4d 0c             	mov    0xc(%ebp),%ecx
406a95:	53                   	push   %ebx
406a96:	56                   	push   %esi
406a97:	57                   	push   %edi
406a98:	85 c9                	test   %ecx,%ecx
406a9a:	74 1e                	je     0x406aba
406a9c:	8b 5d 10             	mov    0x10(%ebp),%ebx
406a9f:	85 db                	test   %ebx,%ebx
406aa1:	74 17                	je     0x406aba
406aa3:	8b 75 14             	mov    0x14(%ebp),%esi
406aa6:	85 f6                	test   %esi,%esi
406aa8:	75 17                	jne    0x406ac1
406aaa:	e8 ce 16 00 00       	call   0x40817d
406aaf:	c7 00 16 00 00 00    	movl   $0x16,(%eax)
406ab5:	e8 3b 4b 00 00       	call   0x40b5f5
406aba:	33 c0                	xor    %eax,%eax
406abc:	5f                   	pop    %edi
406abd:	5e                   	pop    %esi
406abe:	5b                   	pop    %ebx
406abf:	c9                   	leave
406ac0:	c3                   	ret
406ac1:	83 7d 08 00          	cmpl   $0x0,0x8(%ebp)
406ac5:	74 e3                	je     0x406aaa
406ac7:	83 c8 ff             	or     $0xffffffff,%eax
406aca:	33 d2                	xor    %edx,%edx
406acc:	f7 f1                	div    %ecx
406ace:	3b d8                	cmp    %eax,%ebx
406ad0:	77 d8                	ja     0x406aaa
406ad2:	8b f9                	mov    %ecx,%edi
406ad4:	0f af fb             	imul   %ebx,%edi
406ad7:	f7 46 0c 0c 01 00 00 	testl  $0x10c,0xc(%esi)
406ade:	8b df                	mov    %edi,%ebx
406ae0:	74 05                	je     0x406ae7
406ae2:	8b 4e 18             	mov    0x18(%esi),%ecx
406ae5:	eb 05                	jmp    0x406aec
406ae7:	b9 00 10 00 00       	mov    $0x1000,%ecx
406aec:	89 4d fc             	mov    %ecx,-0x4(%ebp)
406aef:	85 ff                	test   %edi,%edi
406af1:	0f 84 d3 00 00 00    	je     0x406bca
406af7:	8b 56 0c             	mov    0xc(%esi),%edx
406afa:	81 e2 08 01 00 00    	and    $0x108,%edx
406b00:	74 36                	je     0x406b38
406b02:	8b 46 04             	mov    0x4(%esi),%eax
406b05:	89 45 f8             	mov    %eax,-0x8(%ebp)
406b08:	85 c0                	test   %eax,%eax
406b0a:	74 2c                	je     0x406b38
406b0c:	0f 88 c0 00 00 00    	js     0x406bd2
406b12:	3b d8                	cmp    %eax,%ebx
406b14:	73 05                	jae    0x406b1b
406b16:	8b c3                	mov    %ebx,%eax
406b18:	89 5d f8             	mov    %ebx,-0x8(%ebp)
406b1b:	50                   	push   %eax
406b1c:	ff 75 08             	push   0x8(%ebp)
406b1f:	ff 36                	push   (%esi)
406b21:	e8 7a eb ff ff       	call   0x4056a0
406b26:	8b 45 f8             	mov    -0x8(%ebp),%eax
406b29:	29 46 04             	sub    %eax,0x4(%esi)
406b2c:	01 06                	add    %eax,(%esi)
406b2e:	83 c4 0c             	add    $0xc,%esp
406b31:	2b d8                	sub    %eax,%ebx
406b33:	01 45 08             	add    %eax,0x8(%ebp)
406b36:	eb 5d                	jmp    0x406b95
406b38:	3b d9                	cmp    %ecx,%ebx
406b3a:	72 5e                	jb     0x406b9a
406b3c:	85 d2                	test   %edx,%edx
406b3e:	74 12                	je     0x406b52
406b40:	56                   	push   %esi
406b41:	e8 d4 f9 ff ff       	call   0x40651a
406b46:	59                   	pop    %ecx
406b47:	85 c0                	test   %eax,%eax
406b49:	0f 85 87 00 00 00    	jne    0x406bd6
406b4f:	8b 4d fc             	mov    -0x4(%ebp),%ecx
406b52:	8b c3                	mov    %ebx,%eax
406b54:	85 c9                	test   %ecx,%ecx
406b56:	74 0d                	je     0x406b65
406b58:	33 d2                	xor    %edx,%edx
406b5a:	f7 f1                	div    %ecx
406b5c:	8b c3                	mov    %ebx,%eax
406b5e:	2b c2                	sub    %edx,%eax
406b60:	89 45 f8             	mov    %eax,-0x8(%ebp)
406b63:	eb 03                	jmp    0x406b68
406b65:	89 5d f8             	mov    %ebx,-0x8(%ebp)
406b68:	50                   	push   %eax
406b69:	ff 75 08             	push   0x8(%ebp)
406b6c:	56                   	push   %esi
406b6d:	e8 c7 73 00 00       	call   0x40df39
406b72:	59                   	pop    %ecx
406b73:	50                   	push   %eax
406b74:	e8 8a 76 00 00       	call   0x40e203
406b79:	83 c4 0c             	add    $0xc,%esp
406b7c:	83 f8 ff             	cmp    $0xffffffff,%eax
406b7f:	74 51                	je     0x406bd2
406b81:	8b 4d f8             	mov    -0x8(%ebp),%ecx
406b84:	8b d1                	mov    %ecx,%edx
406b86:	3b c1                	cmp    %ecx,%eax
406b88:	77 02                	ja     0x406b8c
406b8a:	8b d0                	mov    %eax,%edx
406b8c:	01 55 08             	add    %edx,0x8(%ebp)
406b8f:	2b da                	sub    %edx,%ebx
406b91:	3b c1                	cmp    %ecx,%eax
406b93:	72 3d                	jb     0x406bd2
406b95:	8b 4d fc             	mov    -0x4(%ebp),%ecx
406b98:	eb 28                	jmp    0x406bc2
406b9a:	8b 45 08             	mov    0x8(%ebp),%eax
406b9d:	56                   	push   %esi
406b9e:	0f be 00             	movsbl (%eax),%eax
406ba1:	50                   	push   %eax
406ba2:	e8 89 4a 00 00       	call   0x40b630
406ba7:	59                   	pop    %ecx
406ba8:	59                   	pop    %ecx
406ba9:	83 f8 ff             	cmp    $0xffffffff,%eax
406bac:	74 28                	je     0x406bd6
406bae:	ff 45 08             	incl   0x8(%ebp)
406bb1:	8b 4e 18             	mov    0x18(%esi),%ecx
406bb4:	4b                   	dec    %ebx
406bb5:	89 4d fc             	mov    %ecx,-0x4(%ebp)
406bb8:	85 c9                	test   %ecx,%ecx
406bba:	7f 06                	jg     0x406bc2
406bbc:	33 c9                	xor    %ecx,%ecx
406bbe:	41                   	inc    %ecx
406bbf:	89 4d fc             	mov    %ecx,-0x4(%ebp)
406bc2:	85 db                	test   %ebx,%ebx
406bc4:	0f 85 2d ff ff ff    	jne    0x406af7
406bca:	8b 45 10             	mov    0x10(%ebp),%eax
406bcd:	e9 ea fe ff ff       	jmp    0x406abc
406bd2:	83 4e 0c 20          	orl    $0x20,0xc(%esi)
406bd6:	2b fb                	sub    %ebx,%edi
406bd8:	8b c7                	mov    %edi,%eax
406bda:	33 d2                	xor    %edx,%edx
406bdc:	f7 75 0c             	divl   0xc(%ebp)
406bdf:	e9 d8 fe ff ff       	jmp    0x406abc
406be4:	6a 0c                	push   $0xc
406be6:	68 d0 e2 41 00       	push   $0x41e2d0
406beb:	e8 c0 41 00 00       	call   0x40adb0
406bf0:	83 7d 0c 00          	cmpl   $0x0,0xc(%ebp)
406bf4:	74 24                	je     0x406c1a
406bf6:	83 7d 10 00          	cmpl   $0x0,0x10(%ebp)
406bfa:	74 1e                	je     0x406c1a