40d915:	f7 75 10             	divl   0x10(%ebp)
40d918:	39 45 14             	cmp    %eax,0x14(%ebp)
40d91b:	77 ae                	ja     0x40d8cb
40d91d:	8b d7                	mov    %edi,%edx
40d91f:	8d 42 0c             	lea    0xc(%edx),%eax
40d922:	89 45 ec             	mov    %eax,-0x14(%ebp)
40d925:	8b 00                	mov    (%eax),%eax
40d927:	90                   	nop
40d928:	a9 c0 04 00 00       	test   $0x4c0,%eax
40d92d:	74 08                	je     0x40d937
40d92f:	8b 42 18             	mov    0x18(%edx),%eax
40d932:	89 45 f0             	mov    %eax,-0x10(%ebp)
40d935:	eb 07                	jmp    0x40d93e
40d937:	c7 45 f0 00 10 00 00 	movl   $0x1000,-0x10(%ebp)
40d93e:	8b 7d 10             	mov    0x10(%ebp),%edi
40d941:	8b de                	mov    %esi,%ebx
40d943:	0f af 7d 14          	imul   0x14(%ebp),%edi
40d947:	8b 45 08             	mov    0x8(%ebp),%eax
40d94a:	89 45 f4             	mov    %eax,-0xc(%ebp)
40d94d:	89 5d f8             	mov    %ebx,-0x8(%ebp)
40d950:	8b cf                	mov    %edi,%ecx
40d952:	89 4d fc             	mov    %ecx,-0x4(%ebp)
40d955:	85 ff                	test   %edi,%edi
40d957:	0f 84 2f 01 00 00    	je     0x40da8c
40d95d:	8b 42 0c             	mov    0xc(%edx),%eax
40d960:	90                   	nop
40d961:	a9 c0 04 00 00       	test   $0x4c0,%eax
40d966:	74 46                	je     0x40d9ae
40d968:	8b 5a 08             	mov    0x8(%edx),%ebx
40d96b:	85 db                	test   %ebx,%ebx
40d96d:	74 3c                	je     0x40d9ab
40d96f:	0f 88 f2 00 00 00    	js     0x40da67
40d975:	3b cb                	cmp    %ebx,%ecx
40d977:	73 02                	jae    0x40d97b
40d979:	8b d9                	mov    %ecx,%ebx
40d97b:	8b 45 f8             	mov    -0x8(%ebp),%eax
40d97e:	3b d8                	cmp    %eax,%ebx
40d980:	0f 87 be 00 00 00    	ja     0x40da44
40d986:	8b 4d f4             	mov    -0xc(%ebp),%ecx
40d989:	53                   	push   %ebx
40d98a:	ff 32                	push   (%edx)
40d98c:	50                   	push   %eax
40d98d:	51                   	push   %ecx
40d98e:	e8 bb 01 00 00       	call   0x40db4e
40d993:	8b 55 18             	mov    0x18(%ebp),%edx
40d996:	83 c4 10             	add    $0x10,%esp
40d999:	8b 4d fc             	mov    -0x4(%ebp),%ecx
40d99c:	2b cb                	sub    %ebx,%ecx
40d99e:	29 5a 08             	sub    %ebx,0x8(%edx)
40d9a1:	01 1a                	add    %ebx,(%edx)
40d9a3:	29 5d f8             	sub    %ebx,-0x8(%ebp)
40d9a6:	e9 87 00 00 00       	jmp    0x40da32
40d9ab:	8b 5d f8             	mov    -0x8(%ebp),%ebx
40d9ae:	8b 45 f0             	mov    -0x10(%ebp),%eax
40d9b1:	3b c8                	cmp    %eax,%ecx
40d9b3:	72 54                	jb     0x40da09
40d9b5:	81 f9 ff ff ff 7f    	cmp    $0x7fffffff,%ecx
40d9bb:	76 05                	jbe    0x40d9c2
40d9bd:	b9 ff ff ff 7f       	mov    $0x7fffffff,%ecx
40d9c2:	85 c0                	test   %eax,%eax
40d9c4:	74 0c                	je     0x40d9d2
40d9c6:	33 d2                	xor    %edx,%edx
40d9c8:	8b c1                	mov    %ecx,%eax
40d9ca:	f7 75 f0             	divl   -0x10(%ebp)
40d9cd:	2b ca                	sub    %edx,%ecx
40d9cf:	8b 55 18             	mov    0x18(%ebp),%edx
40d9d2:	3b cb                	cmp    %ebx,%ecx
40d9d4:	77 6e                	ja     0x40da44
40d9d6:	8b 42 04             	mov    0x4(%edx),%eax
40d9d9:	83 62 08 00          	andl   $0x0,0x8(%edx)
40d9dd:	51                   	push   %ecx
40d9de:	8b 4d f4             	mov    -0xc(%ebp),%ecx
40d9e1:	51                   	push   %ecx
40d9e2:	52                   	push   %edx
40d9e3:	89 02                	mov    %eax,(%edx)
40d9e5:	e8 a4 75 00 00       	call   0x414f8e
40d9ea:	59                   	pop    %ecx
40d9eb:	50                   	push   %eax
40d9ec:	e8 09 9e 00 00       	call   0x4177fa
40d9f1:	8b d8                	mov    %eax,%ebx
40d9f3:	83 c4 0c             	add    $0xc,%esp
40d9f6:	85 db                	test   %ebx,%ebx
40d9f8:	74 7a                	je     0x40da74
40d9fa:	8b 4d fc             	mov    -0x4(%ebp),%ecx
40d9fd:	78 68                	js     0x40da67
40d9ff:	8b 55 18             	mov    0x18(%ebp),%edx
40da02:	2b cb                	sub    %ebx,%ecx
40da04:	29 5d f8             	sub    %ebx,-0x8(%ebp)
40da07:	eb 29                	jmp    0x40da32
40da09:	52                   	push   %edx
40da0a:	e8 c4 8f 00 00       	call   0x4169d3
40da0f:	59                   	pop    %ecx
40da10:	83 f8 ff             	cmp    $0xffffffff,%eax
40da13:	74 68                	je     0x40da7d
40da15:	85 db                	test   %ebx,%ebx
40da17:	74 2b                	je     0x40da44
40da19:	8b 4d f4             	mov    -0xc(%ebp),%ecx
40da1c:	8b 55 18             	mov    0x18(%ebp),%edx
40da1f:	88 01                	mov    %al,(%ecx)
40da21:	8b 4d fc             	mov    -0x4(%ebp),%ecx
40da24:	8b 42 18             	mov    0x18(%edx),%eax
40da27:	49                   	dec    %ecx
40da28:	4b                   	dec    %ebx
40da29:	89 45 f0             	mov    %eax,-0x10(%ebp)
40da2c:	89 5d f8             	mov    %ebx,-0x8(%ebp)
40da2f:	33 db                	xor    %ebx,%ebx
40da31:	43                   	inc    %ebx
40da32:	01 5d f4             	add    %ebx,-0xc(%ebp)
40da35:	89 4d fc             	mov    %ecx,-0x4(%ebp)
40da38:	85 c9                	test   %ecx,%ecx
40da3a:	74 50                	je     0x40da8c
40da3c:	8b 5d f8             	mov    -0x8(%ebp),%ebx
40da3f:	e9 19 ff ff ff       	jmp    0x40d95d
40da44:	83 fe ff             	cmp    $0xffffffff,%esi
40da47:	74 0e                	je     0x40da57
40da49:	56                   	push   %esi
40da4a:	6a 00                	push   $0x0
40da4c:	ff 75 08             	push   0x8(%ebp)
40da4f:	e8 9c b4 ff ff       	call   0x408ef0
40da54:	83 c4 0c             	add    $0xc,%esp
40da57:	e8 9f 13 00 00       	call   0x40edfb
40da5c:	c7 00 22 00 00 00    	movl   $0x22,(%eax)
40da62:	e9 6f fe ff ff       	jmp    0x40d8d6
40da67:	8b 45 ec             	mov    -0x14(%ebp),%eax
40da6a:	6a 10                	push   $0x10
40da6c:	5a                   	pop    %edx
40da6d:	f0 09 10             	lock or %edx,(%eax)
40da70:	2b f9                	sub    %ecx,%edi
40da72:	eb 0c                	jmp    0x40da80
40da74:	8b 45 ec             	mov    -0x14(%ebp),%eax
40da77:	6a 08                	push   $0x8
40da79:	59                   	pop    %ecx
40da7a:	f0 09 08             	lock or %ecx,(%eax)
40da7d:	2b 7d fc             	sub    -0x4(%ebp),%edi
40da80:	8b c7                	mov    %edi,%eax
40da82:	33 d2                	xor    %edx,%edx
40da84:	f7 75 10             	divl   0x10(%ebp)
40da87:	e9 51 fe ff ff       	jmp    0x40d8dd
40da8c:	8b 45 14             	mov    0x14(%ebp),%eax
40da8f:	e9 49 fe ff ff       	jmp    0x40d8dd
40da94:	8b ff                	mov    %edi,%edi
40da96:	55                   	push   %ebp
40da97:	8b ec                	mov    %esp,%ebp
40da99:	ff 75 14             	push   0x14(%ebp)
40da9c:	ff 75 10             	push   0x10(%ebp)
40da9f:	ff 75 0c             	push   0xc(%ebp)
40daa2:	6a ff                	push   $0xffffffff
40daa4:	ff 75 08             	push   0x8(%ebp)
40daa7:	e8 05 00 00 00       	call   0x40dab1
40daac:	83 c4 14             	add    $0x14,%esp
40daaf:	5d                   	pop    %ebp
40dab0:	c3                   	ret
40dab1:	6a 0c                	push   $0xc
40dab3:	68 78 15 43 00       	push   $0x431578
40dab8:	e8 03 a5 ff ff       	call   0x407fc0
40dabd:	83 7d 10 00          	cmpl   $0x0,0x10(%ebp)
40dac1:	74 32                	je     0x40daf5
40dac3:	83 7d 14 00          	cmpl   $0x0,0x14(%ebp)
40dac7:	74 2c                	je     0x40daf5
40dac9:	8b 75 18             	mov    0x18(%ebp),%esi
40dacc:	85 f6                	test   %esi,%esi
40dace:	75 37                	jne    0x40db07
40dad0:	83 7d 0c ff          	cmpl   $0xffffffff,0xc(%ebp)
40dad4:	74 0f                	je     0x40dae5
40dad6:	ff 75 0c             	push   0xc(%ebp)
40dad9:	56                   	push   %esi
40dada:	ff 75 08             	push   0x8(%ebp)
40dadd:	e8 0e b4 ff ff       	call   0x408ef0
40dae2:	83 c4 0c             	add    $0xc,%esp
40dae5:	e8 11 13 00 00       	call   0x40edfb
40daea:	c7 00 16 00 00 00    	movl   $0x16,(%eax)
40daf0:	e8 8c f5 ff ff       	call   0x40d081
40daf5:	33 c0                	xor    %eax,%eax
40daf7:	8b 4d f0             	mov    -0x10(%ebp),%ecx
40dafa:	64 89 0d 00 00 00 00 	mov    %ecx,%fs:0x0
40db01:	59                   	pop    %ecx
40db02:	5f                   	pop    %edi
40db03:	5e                   	pop    %esi
40db04:	5b                   	pop    %ebx
40db05:	c9                   	leave
40db06:	c3                   	ret
40db07:	83 65 e4 00          	andl   $0x0,-0x1c(%ebp)
40db0b:	56                   	push   %esi
40db0c:	e8 75 dc ff ff       	call   0x40b786
40db11:	59                   	pop    %ecx
40db12:	83 65 fc 00          	andl   $0x0,-0x4(%ebp)
40db16:	56                   	push   %esi
40db17:	ff 75 14             	push   0x14(%ebp)
40db1a:	ff 75 10             	push   0x10(%ebp)
40db1d:	ff 75 0c             	push   0xc(%ebp)
40db20:	ff 75 08             	push   0x8(%ebp)
40db23:	e8 86 fd ff ff       	call   0x40d8ae
40db28:	83 c4 14             	add    $0x14,%esp
40db2b:	8b f8                	mov    %eax,%edi
40db2d:	89 7d e4             	mov    %edi,-0x1c(%ebp)
40db30:	c7 45 fc fe ff ff ff 	movl   $0xfffffffe,-0x4(%ebp)
40db37:	e8 0a 00 00 00       	call   0x40db46
40db3c:	8b c7                	mov    %edi,%eax
40db3e:	eb b7                	jmp    0x40daf7
40db40:	8b 75 18             	mov    0x18(%ebp),%esi
40db43:	8b 7d e4             	mov    -0x1c(%ebp),%edi
40db46:	56                   	push   %esi
40db47:	e8 4e dc ff ff       	call   0x40b79a
40db4c:	59                   	pop    %ecx
40db4d:	c3                   	ret
40db4e:	8b ff                	mov    %edi,%edi
40db50:	55                   	push   %ebp
40db51:	8b ec                	mov    %esp,%ebp
40db53:	56                   	push   %esi
40db54:	8b 75 14             	mov    0x14(%ebp),%esi
40db57:	85 f6                	test   %esi,%esi
40db59:	75 04                	jne    0x40db5f
40db5b:	33 c0                	xor    %eax,%eax
40db5d:	eb 6d                	jmp    0x40dbcc
40db5f:	8b 45 08             	mov    0x8(%ebp),%eax
40db62:	85 c0                	test   %eax,%eax
40db64:	75 13                	jne    0x40db79
40db66:	e8 90 12 00 00       	call   0x40edfb
40db6b:	6a 16                	push   $0x16
40db6d:	5e                   	pop    %esi
40db6e:	89 30                	mov    %esi,(%eax)
40db70:	e8 0c f5 ff ff       	call   0x40d081
40db75:	8b c6                	mov    %esi,%eax
40db77:	eb 53                	jmp    0x40dbcc
40db79:	57                   	push   %edi
40db7a:	8b 7d 10             	mov    0x10(%ebp),%edi
40db7d:	85 ff                	test   %edi,%edi
40db7f:	74 14                	je     0x40db95
40db81:	39 75 0c             	cmp    %esi,0xc(%ebp)
40db84:	72 0f                	jb     0x40db95
40db86:	56                   	push   %esi
40db87:	57                   	push   %edi
40db88:	50                   	push   %eax
40db89:	e8 e2 ad ff ff       	call   0x408970
40db8e:	83 c4 0c             	add    $0xc,%esp
40db91:	33 c0                	xor    %eax,%eax
40db93:	eb 36                	jmp    0x40dbcb
40db95:	ff 75 0c             	push   0xc(%ebp)
40db98:	6a 00                	push   $0x0
40db9a:	50                   	push   %eax
40db9b:	e8 50 b3 ff ff       	call   0x408ef0
40dba0:	83 c4 0c             	add    $0xc,%esp
40dba3:	85 ff                	test   %edi,%edi
40dba5:	75 09                	jne    0x40dbb0
40dba7:	e8 4f 12 00 00       	call   0x40edfb
40dbac:	6a 16                	push   $0x16
40dbae:	eb 0c                	jmp    0x40dbbc
40dbb0:	39 75 0c             	cmp    %esi,0xc(%ebp)
40dbb3:	73 13                	jae    0x40dbc8
40dbb5:	e8 41 12 00 00       	call   0x40edfb
40dbba:	6a 22                	push   $0x22
40dbbc:	5e                   	pop    %esi
40dbbd:	89 30                	mov    %esi,(%eax)
40dbbf:	e8 bd f4 ff ff       	call   0x40d081
40dbc4:	8b c6                	mov    %esi,%eax
40dbc6:	eb 03                	jmp    0x40dbcb
40dbc8:	6a 16                	push   $0x16
40dbca:	58                   	pop    %eax
40dbcb:	5f                   	pop    %edi
40dbcc:	5e                   	pop    %esi
40dbcd:	5d                   	pop    %ebp
40dbce:	c3                   	ret
40dbcf:	8b ff                	mov    %edi,%edi
40dbd1:	55                   	push   %ebp
40dbd2:	8b ec                	mov    %esp,%ebp
40dbd4:	83 7d 08 00          	cmpl   $0x0,0x8(%ebp)
40dbd8:	75 15                	jne    0x40dbef
40dbda:	e8 1c 12 00 00       	call   0x40edfb
40dbdf:	c7 00 16 00 00 00    	movl   $0x16,(%eax)
40dbe5:	e8 97 f4 ff ff       	call   0x40d081
40dbea:	83 c8 ff             	or     $0xffffffff,%eax
40dbed:	5d                   	pop    %ebp
40dbee:	c3                   	ret
40dbef:	8b 45 0c             	mov    0xc(%ebp),%eax
40dbf2:	85 c0                	test   %eax,%eax
40dbf4:	74 e4                	je     0x40dbda
40dbf6:	6a 00                	push   $0x0
40dbf8:	ff 70 04             	push   0x4(%eax)
40dbfb:	ff 30                	push   (%eax)
40dbfd:	ff 75 08             	push   0x8(%ebp)
40dc00:	e8 c1 02 00 00       	call   0x40dec6
40dc05:	83 c4 10             	add    $0x10,%esp
40dc08:	5d                   	pop    %ebp
40dc09:	c3                   	ret
40dc0a:	8b ff                	mov    %edi,%edi
40dc0c:	55                   	push   %ebp
40dc0d:	8b ec                	mov    %esp,%ebp
40dc0f:	8b 55 08             	mov    0x8(%ebp),%edx
40dc12:	2b 55 10             	sub    0x10(%ebp),%edx
40dc15:	53                   	push   %ebx
40dc16:	56                   	push   %esi
40dc17:	57                   	push   %edi
40dc18:	8b 7d 0c             	mov    0xc(%ebp),%edi
40dc1b:	1b 7d 14             	sbb    0x14(%ebp),%edi
40dc1e:	33 c9                	xor    %ecx,%ecx
40dc20:	33 c0                	xor    %eax,%eax
40dc22:	41                   	inc    %ecx
40dc23:	39 45 0c             	cmp    %eax,0xc(%ebp)
40dc26:	7f 0b                	jg     0x40dc33
40dc28:	7c 05                	jl     0x40dc2f
40dc2a:	39 45 08             	cmp    %eax,0x8(%ebp)
40dc2d:	73 04                	jae    0x40dc33
40dc2f:	8b d9                	mov    %ecx,%ebx
40dc31:	eb 02                	jmp    0x40dc35
40dc33:	8b d8                	mov    %eax,%ebx
40dc35:	39 45 14             	cmp    %eax,0x14(%ebp)
40dc38:	7f 0b                	jg     0x40dc45
40dc3a:	7c 05                	jl     0x40dc41
40dc3c:	39 45 10             	cmp    %eax,0x10(%ebp)
40dc3f:	73 04                	jae    0x40dc45
40dc41:	8b f1                	mov    %ecx,%esi
40dc43:	eb 02                	jmp    0x40dc47
40dc45:	8b f0                	mov    %eax,%esi
40dc47:	3b de                	cmp    %esi,%ebx
40dc49:	74 2c                	je     0x40dc77
40dc4b:	39 45 0c             	cmp    %eax,0xc(%ebp)
40dc4e:	7f 0b                	jg     0x40dc5b
40dc50:	7c 05                	jl     0x40dc57
40dc52:	39 45 08             	cmp    %eax,0x8(%ebp)
40dc55:	73 04                	jae    0x40dc5b
40dc57:	8b f1                	mov    %ecx,%esi
40dc59:	eb 02                	jmp    0x40dc5d
40dc5b:	8b f0                	mov    %eax,%esi
40dc5d:	3b f8                	cmp    %eax,%edi
40dc5f:	7f 06                	jg     0x40dc67
40dc61:	7c 06                	jl     0x40dc69
40dc63:	3b d0                	cmp    %eax,%edx
40dc65:	72 02                	jb     0x40dc69
40dc67:	8b c8                	mov    %eax,%ecx
40dc69:	3b f1                	cmp    %ecx,%esi
40dc6b:	74 0a                	je     0x40dc77
40dc6d:	83 ca ff             	or     $0xffffffff,%edx
40dc70:	b8 16 02 07 80       	mov    $0x80070216,%eax
40dc75:	8b fa                	mov    %edx,%edi
40dc77:	8b 4d 18             	mov    0x18(%ebp),%ecx
40dc7a:	89 11                	mov    %edx,(%ecx)
40dc7c:	89 79 04             	mov    %edi,0x4(%ecx)
40dc7f:	5f                   	pop    %edi
40dc80:	5e                   	pop    %esi
40dc81:	5b                   	pop    %ebx
40dc82:	5d                   	pop    %ebp
40dc83:	c3                   	ret
40dc84:	6a 0c                	push   $0xc
40dc86:	68 98 15 43 00       	push   $0x431598
40dc8b:	e8 30 a3 ff ff       	call   0x407fc0
40dc90:	83 7d 08 00          	cmpl   $0x0,0x8(%ebp)
40dc94:	75 15                	jne    0x40dcab
40dc96:	e8 60 11 00 00       	call   0x40edfb
40dc9b:	c7 00 16 00 00 00    	movl   $0x16,(%eax)
40dca1:	e8 db f3 ff ff       	call   0x40d081