40bd45:	8b 40 0c             	mov    0xc(%eax),%eax
40bd48:	90                   	nop
40bd49:	a8 01                	test   $0x1,%al
40bd4b:	74 28                	je     0x40bd75
40bd4d:	ff 75 0c             	push   0xc(%ebp)
40bd50:	e8 63 01 00 00       	call   0x40beb8
40bd55:	59                   	pop    %ecx
40bd56:	8b 4d 0c             	mov    0xc(%ebp),%ecx
40bd59:	83 61 08 00          	andl   $0x0,0x8(%ecx)
40bd5d:	84 c0                	test   %al,%al
40bd5f:	8b 45 0c             	mov    0xc(%ebp),%eax
40bd62:	74 b6                	je     0x40bd1a
40bd64:	8b 48 04             	mov    0x4(%eax),%ecx
40bd67:	89 08                	mov    %ecx,(%eax)
40bd69:	8b 45 0c             	mov    0xc(%ebp),%eax
40bd6c:	6a fe                	push   $0xfffffffe
40bd6e:	59                   	pop    %ecx
40bd6f:	83 c0 0c             	add    $0xc,%eax
40bd72:	f0 21 08             	lock and %ecx,(%eax)
40bd75:	8b 45 0c             	mov    0xc(%ebp),%eax
40bd78:	6a 02                	push   $0x2
40bd7a:	59                   	pop    %ecx
40bd7b:	83 c0 0c             	add    $0xc,%eax
40bd7e:	f0 09 08             	lock or %ecx,(%eax)
40bd81:	8b 45 0c             	mov    0xc(%ebp),%eax
40bd84:	6a f7                	push   $0xfffffff7
40bd86:	59                   	pop    %ecx
40bd87:	83 c0 0c             	add    $0xc,%eax
40bd8a:	f0 21 08             	lock and %ecx,(%eax)
40bd8d:	8b 45 0c             	mov    0xc(%ebp),%eax
40bd90:	83 60 08 00          	andl   $0x0,0x8(%eax)
40bd94:	8b 45 0c             	mov    0xc(%ebp),%eax
40bd97:	8b 40 0c             	mov    0xc(%eax),%eax
40bd9a:	90                   	nop
40bd9b:	a9 c0 04 00 00       	test   $0x4c0,%eax
40bda0:	75 16                	jne    0x40bdb8
40bda2:	ff 75 0c             	push   0xc(%ebp)
40bda5:	e8 9e 01 00 00       	call   0x40bf48
40bdaa:	59                   	pop    %ecx
40bdab:	84 c0                	test   %al,%al
40bdad:	75 09                	jne    0x40bdb8
40bdaf:	ff 75 0c             	push   0xc(%ebp)
40bdb2:	e8 0f 5c 00 00       	call   0x4119c6
40bdb7:	59                   	pop    %ecx
40bdb8:	53                   	push   %ebx
40bdb9:	ff 75 10             	push   0x10(%ebp)
40bdbc:	8b 5d 08             	mov    0x8(%ebp),%ebx
40bdbf:	ff 75 0c             	push   0xc(%ebp)
40bdc2:	53                   	push   %ebx
40bdc3:	e8 1e 00 00 00       	call   0x40bde6
40bdc8:	83 c4 0c             	add    $0xc,%esp
40bdcb:	84 c0                	test   %al,%al
40bdcd:	75 11                	jne    0x40bde0
40bdcf:	8b 45 0c             	mov    0xc(%ebp),%eax
40bdd2:	6a 10                	push   $0x10
40bdd4:	59                   	pop    %ecx
40bdd5:	83 c0 0c             	add    $0xc,%eax
40bdd8:	f0 09 08             	lock or %ecx,(%eax)
40bddb:	83 c8 ff             	or     $0xffffffff,%eax
40bdde:	eb 03                	jmp    0x40bde3
40bde0:	0f b6 c3             	movzbl %bl,%eax
40bde3:	5b                   	pop    %ebx
40bde4:	5d                   	pop    %ebp
40bde5:	c3                   	ret
40bde6:	8b ff                	mov    %edi,%edi
40bde8:	55                   	push   %ebp
40bde9:	8b ec                	mov    %esp,%ebp
40bdeb:	56                   	push   %esi
40bdec:	57                   	push   %edi
40bded:	ff 75 0c             	push   0xc(%ebp)
40bdf0:	e8 ce f3 ff ff       	call   0x40b1c3
40bdf5:	59                   	pop    %ecx
40bdf6:	8b 4d 0c             	mov    0xc(%ebp),%ecx
40bdf9:	8b d0                	mov    %eax,%edx
40bdfb:	8b 49 0c             	mov    0xc(%ecx),%ecx
40bdfe:	90                   	nop
40bdff:	f6 c1 c0             	test   $0xc0,%cl
40be02:	0f 84 93 00 00 00    	je     0x40be9b
40be08:	8b 4d 0c             	mov    0xc(%ebp),%ecx
40be0b:	33 ff                	xor    %edi,%edi
40be0d:	8b 41 04             	mov    0x4(%ecx),%eax
40be10:	8b 31                	mov    (%ecx),%esi
40be12:	2b f0                	sub    %eax,%esi
40be14:	40                   	inc    %eax
40be15:	89 01                	mov    %eax,(%ecx)
40be17:	8b 45 0c             	mov    0xc(%ebp),%eax
40be1a:	8b 48 18             	mov    0x18(%eax),%ecx
40be1d:	49                   	dec    %ecx
40be1e:	89 48 08             	mov    %ecx,0x8(%eax)
40be21:	85 f6                	test   %esi,%esi
40be23:	7e 27                	jle    0x40be4c
40be25:	ff 75 10             	push   0x10(%ebp)
40be28:	8b 45 0c             	mov    0xc(%ebp),%eax
40be2b:	56                   	push   %esi
40be2c:	ff 70 04             	push   0x4(%eax)
40be2f:	52                   	push   %edx
40be30:	e8 8e fb ff ff       	call   0x40b9c3
40be35:	83 c4 10             	add    $0x10,%esp
40be38:	8b f8                	mov    %eax,%edi
40be3a:	8b 4d 0c             	mov    0xc(%ebp),%ecx
40be3d:	3b fe                	cmp    %esi,%edi
40be3f:	8a 45 08             	mov    0x8(%ebp),%al
40be42:	8b 49 04             	mov    0x4(%ecx),%ecx
40be45:	88 01                	mov    %al,(%ecx)
40be47:	0f 94 c0             	sete   %al
40be4a:	eb 68                	jmp    0x40beb4
40be4c:	83 fa ff             	cmp    $0xffffffff,%edx
40be4f:	74 1b                	je     0x40be6c
40be51:	83 fa fe             	cmp    $0xfffffffe,%edx
40be54:	74 16                	je     0x40be6c
40be56:	8b c2                	mov    %edx,%eax
40be58:	8b ca                	mov    %edx,%ecx
40be5a:	83 e0 3f             	and    $0x3f,%eax
40be5d:	c1 f9 06             	sar    $0x6,%ecx
40be60:	6b c0 38             	imul   $0x38,%eax,%eax
40be63:	03 04 8d a8 21 42 00 	add    0x4221a8(,%ecx,4),%eax
40be6a:	eb 05                	jmp    0x40be71
40be6c:	b8 e8 11 42 00       	mov    $0x4211e8,%eax
40be71:	f6 40 28 20          	testb  $0x20,0x28(%eax)
40be75:	74 c3                	je     0x40be3a
40be77:	6a 02                	push   $0x2
40be79:	57                   	push   %edi
40be7a:	57                   	push   %edi
40be7b:	52                   	push   %edx
40be7c:	e8 7e 4f 00 00       	call   0x410dff
40be81:	23 c2                	and    %edx,%eax
40be83:	83 c4 10             	add    $0x10,%esp
40be86:	83 f8 ff             	cmp    $0xffffffff,%eax
40be89:	75 af                	jne    0x40be3a
40be8b:	8b 45 0c             	mov    0xc(%ebp),%eax
40be8e:	6a 10                	push   $0x10
40be90:	59                   	pop    %ecx
40be91:	83 c0 0c             	add    $0xc,%eax
40be94:	f0 09 08             	lock or %ecx,(%eax)
40be97:	b0 01                	mov    $0x1,%al
40be99:	eb 19                	jmp    0x40beb4
40be9b:	ff 75 10             	push   0x10(%ebp)
40be9e:	8d 45 08             	lea    0x8(%ebp),%eax
40bea1:	6a 01                	push   $0x1
40bea3:	50                   	push   %eax
40bea4:	52                   	push   %edx
40bea5:	e8 19 fb ff ff       	call   0x40b9c3
40beaa:	83 c4 10             	add    $0x10,%esp
40bead:	48                   	dec    %eax
40beae:	f7 d8                	neg    %eax
40beb0:	1a c0                	sbb    %al,%al
40beb2:	fe c0                	inc    %al
40beb4:	5f                   	pop    %edi
40beb5:	5e                   	pop    %esi
40beb6:	5d                   	pop    %ebp
40beb7:	c3                   	ret
40beb8:	8b ff                	mov    %edi,%edi
40beba:	55                   	push   %ebp
40bebb:	8b ec                	mov    %esp,%ebp
40bebd:	8b 45 08             	mov    0x8(%ebp),%eax
40bec0:	83 ec 10             	sub    $0x10,%esp
40bec3:	8b 40 0c             	mov    0xc(%eax),%eax
40bec6:	90                   	nop
40bec7:	c1 e8 03             	shr    $0x3,%eax
40beca:	a8 01                	test   $0x1,%al
40becc:	74 04                	je     0x40bed2
40bece:	b0 01                	mov    $0x1,%al
40bed0:	c9                   	leave
40bed1:	c3                   	ret
40bed2:	8b 45 08             	mov    0x8(%ebp),%eax
40bed5:	53                   	push   %ebx
40bed6:	56                   	push   %esi
40bed7:	8b 40 0c             	mov    0xc(%eax),%eax
40beda:	90                   	nop
40bedb:	a8 c0                	test   $0xc0,%al
40bedd:	8b 45 08             	mov    0x8(%ebp),%eax
40bee0:	74 07                	je     0x40bee9
40bee2:	8b 08                	mov    (%eax),%ecx
40bee4:	3b 48 04             	cmp    0x4(%eax),%ecx
40bee7:	74 4e                	je     0x40bf37
40bee9:	8b 40 10             	mov    0x10(%eax),%eax
40beec:	90                   	nop
40beed:	50                   	push   %eax
40beee:	e8 08 3a 00 00       	call   0x40f8fb
40bef3:	8b f0                	mov    %eax,%esi
40bef5:	59                   	pop    %ecx
40bef6:	83 fe ff             	cmp    $0xffffffff,%esi
40bef9:	74 3c                	je     0x40bf37
40befb:	33 db                	xor    %ebx,%ebx
40befd:	8d 45 f8             	lea    -0x8(%ebp),%eax
40bf00:	43                   	inc    %ebx
40bf01:	53                   	push   %ebx
40bf02:	50                   	push   %eax
40bf03:	6a 00                	push   $0x0
40bf05:	6a 00                	push   $0x0
40bf07:	56                   	push   %esi
40bf08:	ff 15 f0 90 41 00    	call   *0x4190f0
40bf0e:	85 c0                	test   %eax,%eax
40bf10:	74 25                	je     0x40bf37
40bf12:	8d 45 f0             	lea    -0x10(%ebp),%eax
40bf15:	50                   	push   %eax
40bf16:	56                   	push   %esi
40bf17:	ff 15 ec 90 41 00    	call   *0x4190ec
40bf1d:	85 c0                	test   %eax,%eax
40bf1f:	74 16                	je     0x40bf37
40bf21:	8b 45 f8             	mov    -0x8(%ebp),%eax
40bf24:	3b 45 f0             	cmp    -0x10(%ebp),%eax
40bf27:	75 08                	jne    0x40bf31
40bf29:	8b 45 fc             	mov    -0x4(%ebp),%eax
40bf2c:	3b 45 f4             	cmp    -0xc(%ebp),%eax
40bf2f:	74 02                	je     0x40bf33
40bf31:	32 db                	xor    %bl,%bl
40bf33:	8a c3                	mov    %bl,%al
40bf35:	eb 02                	jmp    0x40bf39
40bf37:	32 c0                	xor    %al,%al
40bf39:	5e                   	pop    %esi
40bf3a:	5b                   	pop    %ebx
40bf3b:	c9                   	leave
40bf3c:	c3                   	ret
40bf3d:	8b ff                	mov    %edi,%edi
40bf3f:	55                   	push   %ebp
40bf40:	8b ec                	mov    %esp,%ebp
40bf42:	5d                   	pop    %ebp
40bf43:	e9 a8 fd ff ff       	jmp    0x40bcf0
40bf48:	8b ff                	mov    %edi,%edi
40bf4a:	55                   	push   %ebp
40bf4b:	8b ec                	mov    %esp,%ebp
40bf4d:	6a 02                	push   $0x2
40bf4f:	e8 37 a7 ff ff       	call   0x40668b
40bf54:	59                   	pop    %ecx
40bf55:	39 45 08             	cmp    %eax,0x8(%ebp)
40bf58:	74 28                	je     0x40bf82
40bf5a:	6a 01                	push   $0x1
40bf5c:	e8 2a a7 ff ff       	call   0x40668b
40bf61:	59                   	pop    %ecx
40bf62:	39 45 08             	cmp    %eax,0x8(%ebp)
40bf65:	75 17                	jne    0x40bf7e
40bf67:	ff 75 08             	push   0x8(%ebp)
40bf6a:	e8 54 f2 ff ff       	call   0x40b1c3
40bf6f:	50                   	push   %eax
40bf70:	e8 8c 4c 00 00       	call   0x410c01
40bf75:	85 c0                	test   %eax,%eax
40bf77:	59                   	pop    %ecx
40bf78:	59                   	pop    %ecx
40bf79:	0f 95 c0             	setne  %al
40bf7c:	5d                   	pop    %ebp
40bf7d:	c3                   	ret
40bf7e:	32 c0                	xor    %al,%al
40bf80:	5d                   	pop    %ebp
40bf81:	c3                   	ret
40bf82:	b0 01                	mov    $0x1,%al
40bf84:	5d                   	pop    %ebp
40bf85:	c3                   	ret
40bf86:	8b ff                	mov    %edi,%edi
40bf88:	55                   	push   %ebp
40bf89:	8b ec                	mov    %esp,%ebp
40bf8b:	53                   	push   %ebx
40bf8c:	56                   	push   %esi
40bf8d:	8b 75 08             	mov    0x8(%ebp),%esi
40bf90:	57                   	push   %edi
40bf91:	56                   	push   %esi
40bf92:	e8 b1 ff ff ff       	call   0x40bf48
40bf97:	59                   	pop    %ecx
40bf98:	84 c0                	test   %al,%al
40bf9a:	0f 84 8a 00 00 00    	je     0x40c02a
40bfa0:	6a 01                	push   $0x1
40bfa2:	e8 e4 a6 ff ff       	call   0x40668b
40bfa7:	59                   	pop    %ecx
40bfa8:	6a 02                	push   $0x2
40bfaa:	5b                   	pop    %ebx
40bfab:	3b f0                	cmp    %eax,%esi
40bfad:	75 07                	jne    0x40bfb6
40bfaf:	bf ac 23 42 00       	mov    $0x4223ac,%edi
40bfb4:	eb 10                	jmp    0x40bfc6
40bfb6:	53                   	push   %ebx
40bfb7:	e8 cf a6 ff ff       	call   0x40668b
40bfbc:	59                   	pop    %ecx
40bfbd:	3b f0                	cmp    %eax,%esi
40bfbf:	75 69                	jne    0x40c02a
40bfc1:	bf b0 23 42 00       	mov    $0x4223b0,%edi
40bfc6:	ff 05 44 1e 42 00    	incl   0x421e44
40bfcc:	8d 4e 0c             	lea    0xc(%esi),%ecx
40bfcf:	8b 01                	mov    (%ecx),%eax
40bfd1:	90                   	nop
40bfd2:	a9 c0 04 00 00       	test   $0x4c0,%eax
40bfd7:	75 51                	jne    0x40c02a
40bfd9:	b8 82 02 00 00       	mov    $0x282,%eax
40bfde:	f0 09 01             	lock or %eax,(%ecx)
40bfe1:	83 3f 00             	cmpl   $0x0,(%edi)
40bfe4:	75 15                	jne    0x40bffb
40bfe6:	68 00 10 00 00       	push   $0x1000
40bfeb:	e8 e2 0f 00 00       	call   0x40cfd2
40bff0:	6a 00                	push   $0x0
40bff2:	89 07                	mov    %eax,(%edi)
40bff4:	e8 a6 e7 ff ff       	call   0x40a79f
40bff9:	59                   	pop    %ecx
40bffa:	59                   	pop    %ecx
40bffb:	8b 0f                	mov    (%edi),%ecx
40bffd:	85 c9                	test   %ecx,%ecx
40bfff:	75 12                	jne    0x40c013
40c001:	8d 4e 14             	lea    0x14(%esi),%ecx
40c004:	89 5e 08             	mov    %ebx,0x8(%esi)
40c007:	89 4e 04             	mov    %ecx,0x4(%esi)
40c00a:	89 0e                	mov    %ecx,(%esi)
40c00c:	89 5e 18             	mov    %ebx,0x18(%esi)
40c00f:	b0 01                	mov    $0x1,%al
40c011:	eb 19                	jmp    0x40c02c
40c013:	89 4e 04             	mov    %ecx,0x4(%esi)
40c016:	8b 07                	mov    (%edi),%eax
40c018:	89 06                	mov    %eax,(%esi)
40c01a:	c7 46 08 00 10 00 00 	movl   $0x1000,0x8(%esi)
40c021:	c7 46 18 00 10 00 00 	movl   $0x1000,0x18(%esi)
40c028:	eb e5                	jmp    0x40c00f
40c02a:	32 c0                	xor    %al,%al
40c02c:	5f                   	pop    %edi
40c02d:	5e                   	pop    %esi
40c02e:	5b                   	pop    %ebx
40c02f:	5d                   	pop    %ebp
40c030:	c3                   	ret
40c031:	8b ff                	mov    %edi,%edi
40c033:	55                   	push   %ebp
40c034:	8b ec                	mov    %esp,%ebp
40c036:	80 7d 08 00          	cmpb   $0x0,0x8(%ebp)
40c03a:	74 31                	je     0x40c06d
40c03c:	56                   	push   %esi
40c03d:	8b 75 0c             	mov    0xc(%ebp),%esi
40c040:	57                   	push   %edi
40c041:	8d 7e 0c             	lea    0xc(%esi),%edi
40c044:	8b 07                	mov    (%edi),%eax
40c046:	90                   	nop
40c047:	c1 e8 09             	shr    $0x9,%eax
40c04a:	a8 01                	test   $0x1,%al
40c04c:	74 1d                	je     0x40c06b
40c04e:	ff 75 10             	push   0x10(%ebp)
40c051:	56                   	push   %esi
40c052:	e8 63 ee ff ff       	call   0x40aeba
40c057:	59                   	pop    %ecx
40c058:	59                   	pop    %ecx
40c059:	b8 7f fd ff ff       	mov    $0xfffffd7f,%eax
40c05e:	f0 21 07             	lock and %eax,(%edi)
40c061:	33 c0                	xor    %eax,%eax
40c063:	89 46 18             	mov    %eax,0x18(%esi)
40c066:	89 46 04             	mov    %eax,0x4(%esi)
40c069:	89 06                	mov    %eax,(%esi)
40c06b:	5f                   	pop    %edi
40c06c:	5e                   	pop    %esi
40c06d:	5d                   	pop    %ebp
40c06e:	c3                   	ret
40c06f:	6a 08                	push   $0x8
40c071:	68 e8 00 42 00       	push   $0x4200e8
40c076:	e8 25 7e ff ff       	call   0x403ea0
40c07b:	8b 45 08             	mov    0x8(%ebp),%eax
40c07e:	ff 30                	push   (%eax)
40c080:	e8 07 1f 00 00       	call   0x40df8c
40c085:	59                   	pop    %ecx