
.intel_syntax noprefix

.global ReturnDirective

.extern RunLineQueue
.extern AddLineQueueX
.extern AddLineQueue
.extern CreateFloat
.extern EvalOperand
.extern SizeFromRegister
.extern SizeFromMemtype
.extern LstWrite
.extern ExpandCStrings
.extern HllContinueIf
.extern ExpandHllProc
.extern GetLabelStr
.extern GetCurrOffset
.extern CurrProc
.extern LclAlloc
.extern asmerr
.extern Parse_Pass
.extern SymFind
.extern tstrcpy


.SECTION .text
	.ALIGN	16

$_001:	mov	qword ptr [rsp+0x8], rcx
	mov	qword ptr [rsp+0x20], r9
	push	rsi
	push	rdi
	push	rbx
	push	rbp
	mov	rbp, rsp
	imul	ebx, dword ptr [rcx], 32
	add	rbx, rdx
	mov	rcx, r8
	xor	esi, esi
	xor	edi, edi
	xor	edx, edx
	mov	qword ptr [rcx], rdx
	mov	al, byte ptr [rbx]
	test	al, al
	jz	$_012
	cmp	al, 6
	jnz	$_002
	cmp	byte ptr [rbx+0x20], 40
	jnz	$_002
	mov	al, 40
	mov	qword ptr [rcx], rbx
	add	rbx, 32
	mov	rcx, qword ptr [rbp+0x28]
	inc	dword ptr [rcx]
$_002:	cmp	al, 3
	jnz	$_003
	inc	esi
	jmp	$_012

$_003:	mov	rdi, rbx
	inc	edx
	add	rbx, 32
	cmp	al, 40
	jnz	$_009
	mov	ecx, 1
	mov	al, byte ptr [rbx]
$_004:	test	al, al
	jz	$_007
	cmp	al, 40
	jnz	$_005
	inc	ecx
	jmp	$_006

$_005:	cmp	al, 41
	jnz	$_006
	dec	ecx
	jz	$_007
$_006:	add	rbx, 32
	mov	al, byte ptr [rbx]
	inc	edx
	jmp	$_004

$_007:	cmp	al, 41
	jnz	$_008
	inc	edx
	add	rbx, 32
$_008:	jmp	$_011

$_009:	mov	al, byte ptr [rbx]
$_010:	test	al, al
	jz	$_011
	cmp	al, 3
	jz	$_011
	add	rbx, 32
	mov	al, byte ptr [rbx]
	inc	edx
	jmp	$_010

$_011:	mov	al, byte ptr [rbx]
	cmp	al, 3
	jnz	$_012
	inc	esi
$_012:	mov	rax, qword ptr [rbp+0x40]
	mov	dword ptr [rax], edx
	mov	rax, rbx
	mov	rbx, qword ptr [rbp+0x48]
	mov	dword ptr [rbx], esi
	mov	rbx, qword ptr [rbp+0x50]
	mov	dword ptr [rbx], edi
	leave
	pop	rbx
	pop	rdi
	pop	rsi
	ret

$_013:
	mov	qword ptr [rsp+0x10], rdx
	mov	qword ptr [rsp+0x18], r8
	mov	qword ptr [rsp+0x20], r9
	push	rsi
	push	rdi
	push	rbx
	push	rbp
	mov	rbp, rsp
	sub	rsp, 440
	mov	rsi, rcx
	imul	ebx, dword ptr [rsi], 32
	add	rbx, rdx
	lea	rdi, [rbp-0x178]
	mov	eax, dword ptr [r14+0x5C]
	mov	dword ptr [rbp-0x6C], eax
	mov	dword ptr [rbp-0x70], 779
	mov	r8, qword ptr [rbp+0x30]
	mov	edx, dword ptr [rsi]
	mov	rcx, rdi
	call	ExpandHllProc@PLT
	cmp	eax, -1
	jz	$_014
	cmp	byte ptr [rdi], 0
	jz	$_014
	mov	rcx, rdi
	call	AddLineQueue@PLT
	lea	rax, [rbp-0x74]
	mov	qword ptr [rsp+0x28], rax
	lea	rax, [rbp-0x78]
	mov	qword ptr [rsp+0x20], rax
	lea	r9, [rbp+0x40]
	lea	r8, [rbp+0x38]
	mov	rdx, qword ptr [rbp+0x30]
	mov	rcx, rsi
	call	$_001
$_014:	cmp	dword ptr [rbp+0x40], 0
	jz	$_015
	imul	eax, dword ptr [rbp+0x40], 32
	mov	rcx, qword ptr [rbx+rax+0x18]
	sub	rcx, qword ptr [rbx+0x18]
	mov	rdx, rsi
	mov	rsi, qword ptr [rbx+0x18]
	mov	rax, rdi
	rep movsb
	mov	byte ptr [rdi], 0
	mov	rdi, rax
	mov	rsi, rdx
	jmp	$_016

$_015:	mov	rdx, qword ptr [rbx+0x10]
	mov	rcx, rdi
	call	tstrcpy@PLT
$_016:	mov	byte ptr [rbp-0x179], 0
	mov	ecx, dword ptr [rsi]
	add	ecx, dword ptr [rbp+0x40]
	cmp	byte ptr [rbx], 40
	jnz	$_024
	cmp	byte ptr [rbx+0x20], 38
	jnz	$_024
	jmp	$_018

$_017:	inc	rdi
$_018:	cmp	byte ptr [rdi], 38
	jnz	$_017
	inc	rdi
	mov	rdx, rdi
$_019:	cmp	byte ptr [rdx], 0
	jz	$_020
	inc	rdx
	jmp	$_019

$_020:	jmp	$_022

$_021:	mov	byte ptr [rdx-0x1], 0
	dec	rdx
$_022:	cmp	byte ptr [rdx-0x1], 32
	jbe	$_021
	cmp	byte ptr [rdx-0x1], 41
	jnz	$_023
	mov	byte ptr [rdx-0x1], 0
$_023:	inc	byte ptr [rbp-0x179]
	add	dword ptr [rsi], 2
	jmp	$_025

$_024:	cmp	byte ptr [rdi], 38
	jnz	$_025
	inc	rdi
	inc	byte ptr [rbp-0x179]
	inc	dword ptr [rsi]
$_025:	mov	byte ptr [rsp+0x20], 2
	lea	r9, [rbp-0x68]
	mov	r8d, ecx
	mov	rdx, qword ptr [rbp+0x30]
	mov	rcx, rsi
	call	EvalOperand@PLT
	test	eax, eax
	jne	$_069
	mov	esi, 1
	cmp	byte ptr [rbp-0x179], 0
	jz	$_026
	mov	dword ptr [rbp-0x70], 808
	jmp	$_068

$_026:	cmp	dword ptr [rbp-0x2C], 0
	jne	$_032
	mov	rdx, qword ptr [rbp-0x58]
	test	rdx, rdx
	jz	$_027
	cmp	byte ptr [rdx], 9
	jnz	$_027
	mov	r8, qword ptr [rdx+0x10]
	mov	edx, dword ptr [rbp-0x6C]
	lea	rcx, [DS0000+rip]
	call	AddLineQueueX@PLT
	dec	esi
	jmp	$_031

$_027:	mov	eax, dword ptr [rbp-0x68]
	mov	edx, dword ptr [rbp-0x64]
	test	edx, edx
	jnz	$_029
	test	eax, eax
	jz	$_029
	mov	ecx, dword ptr [rbp-0x6C]
	cmp	ecx, 163
	jnz	$_028
	mov	ecx, 17
$_028:	mov	r8d, eax
	mov	edx, ecx
	lea	rcx, [DS0001+rip]
	call	AddLineQueueX@PLT
	dec	esi
	jmp	$_031

$_029:	test	eax, eax
	jnz	$_031
	test	edx, edx
	jnz	$_031
	mov	eax, dword ptr [rbp-0x6C]
	cmp	eax, 163
	jnz	$_030
	mov	eax, 17
$_030:	mov	r8d, eax
	mov	edx, eax
	lea	rcx, [DS0002+rip]
	call	AddLineQueueX@PLT
	dec	esi
$_031:	jmp	$_068

$_032:	cmp	dword ptr [rbp-0x2C], 2
	jnz	$_040
	test	byte ptr [rbp-0x28], 0x01
	jnz	$_040
	mov	rbx, qword ptr [rbp-0x50]
	mov	eax, dword ptr [rbx+0x4]
	cmp	eax, 17
	jz	$_033
	cmp	eax, 163
	jnz	$_034
$_033:	dec	esi
	jmp	$_039

$_034:	mov	ecx, eax
	call	SizeFromRegister@PLT
	jmp	$_038

$_035:	mov	dword ptr [rbp-0x6C], 9
	jmp	$_039

$_036:	mov	dword ptr [rbp-0x6C], 17
	jmp	$_039

$_037:	mov	dword ptr [rbp-0x6C], 163
	jmp	$_039

$_038:	cmp	rax, 2
	jz	$_035
	cmp	rax, 4
	jz	$_036
	cmp	rax, 8
	jz	$_037
$_039:	jmp	$_068

$_040:	cmp	dword ptr [rbp-0x2C], 3
	jne	$_054
	cmp	qword ptr [rbp+0x38], 0
	jnz	$_043
	cmp	byte ptr [rbx], 11
	jnz	$_041
	cmp	byte ptr [rbx+0x1], 0
	jnz	$_042
$_041:	cmp	byte ptr [rbx], 40
	jnz	$_043
	cmp	byte ptr [rbx+0x20], 11
	jnz	$_043
	cmp	byte ptr [rbx+0x21], 0
	jz	$_043
	cmp	byte ptr [rbx+0x40], 41
	jnz	$_043
$_042:	xor	r8d, r8d
	mov	edx, 254
	movzx	ecx, byte ptr [rbp-0x24]
	call	SizeFromMemtype@PLT
	jmp	$_046

$_043:	mov	rdx, qword ptr [rbp+0x38]
	test	rdx, rdx
	jz	$_044
	mov	ecx, dword ptr [rdx+0x4]
	mov	eax, ecx
	add	eax, eax
	mov	al, byte ptr [r12+rax*8+0xC]
	jmp	$_045

$_044:	mov	al, byte ptr [rbp-0x24]
$_045:	xor	r8d, r8d
	mov	edx, 254
	movzx	ecx, al
	call	SizeFromMemtype@PLT
$_046:	jmp	$_052

$_047:	mov	rdx, rdi
	lea	rcx, [DS0003+rip]
	call	AddLineQueueX@PLT
	jmp	$_069

$_048:	mov	dword ptr [rbp-0x70], 1143
	jmp	$_053

$_049:	mov	dword ptr [rbp-0x70], 709
	jmp	$_053

$_050:	lea	r8, [rbp-0x178]
	lea	rdx, [rbp-0x68]
	mov	ecx, 10
	call	CreateFloat@PLT
	lea	rdx, [rbp-0x178]
	lea	rcx, [DS0004+rip]
	call	AddLineQueueX@PLT
	jmp	$_069

$_051:	mov	dword ptr [rbp-0x70], 1132
	jmp	$_053

$_052:	cmp	eax, 2
	jz	$_047
	cmp	eax, 4
	jz	$_048
	cmp	eax, 8
	jz	$_049
	cmp	eax, 10
	jz	$_050
	cmp	eax, 16
	jz	$_051
$_053:	mov	dword ptr [rbp-0x6C], 40
	lea	rdi, [rbp-0x178]
	mov	ecx, eax
	mov	r8, rdi
	lea	rdx, [rbp-0x68]
	call	CreateFloat@PLT
	jmp	$_068

$_054:	cmp	dword ptr [rbp-0x2C], 1
	jne	$_067
	mov	al, byte ptr [rbp-0x24]
	jmp	$_065

$_055:	mov	dword ptr [rbp-0x70], 816
	cmp	dword ptr [rbp-0x6C], 163
	jnz	$_056
	mov	dword ptr [rbp-0x6C], 17
$_056:	jmp	$_066

$_057:	cmp	dword ptr [rbp-0x6C], 9
	jz	$_058
	mov	dword ptr [rbp-0x70], 815
	mov	dword ptr [rbp-0x6C], 17
$_058:	jmp	$_066

$_059:	mov	dword ptr [rbp-0x6C], 17
	jmp	$_066

$_060:	cmp	dword ptr [rbp-0x6C], 163
	jne	$_066
	mov	r8, rdi
	mov	rdx, rdi
	lea	rcx, [DS0005+rip]
	call	AddLineQueueX@PLT
	jmp	$_069

$_061:	mov	dword ptr [rbp-0x6C], 9
	jmp	$_066

$_062:	mov	dword ptr [rbp-0x6C], 40
	mov	dword ptr [rbp-0x70], 1143
	jmp	$_066

$_063:	mov	dword ptr [rbp-0x6C], 40
	mov	dword ptr [rbp-0x70], 709
	jmp	$_066

$_064:	mov	dword ptr [rbp-0x6C], 40
	mov	dword ptr [rbp-0x70], 1132
	jmp	$_066

$_065:	cmp	al, 0
	je	$_055
	cmp	al, 64
	je	$_055
	cmp	al, 1
	je	$_055
	cmp	al, 65
	je	$_057
	cmp	al, 3
	je	$_059
	cmp	al, 67
	je	$_059
	cmp	al, 15
	je	$_060
	cmp	al, 79
	je	$_060
	cmp	al, 33
	jz	$_061
	cmp	al, 35
	jz	$_062
	cmp	al, 39
	jz	$_063
	cmp	al, 47
	jz	$_064
$_066:	jmp	$_068

$_067:	cmp	dword ptr [rbp-0x2C], -2
	jnz	$_068
	cmp	byte ptr [rdi], 123
	jnz	$_068
	mov	rdx, rdi
	lea	rcx, [DS0006+rip]
	call	AddLineQueueX@PLT
	xor	esi, esi
$_068:	test	esi, esi
	jz	$_069
	mov	r9, rdi
	mov	r8d, dword ptr [rbp-0x6C]
	mov	edx, dword ptr [rbp-0x70]
	lea	rcx, [DS0007+rip]
	call	AddLineQueueX@PLT
$_069:	leave
	pop	rbx
	pop	rdi
	pop	rsi
	ret

ReturnDirective:
	mov	qword ptr [rsp+0x8], rcx
	mov	qword ptr [rsp+0x10], rdx
	push	rsi
	push	rdi
	push	rbx
	push	rbp
	mov	rbp, rsp
	sub	rsp, 200
	cmp	qword ptr [CurrProc+rip], 0
	jnz	$_070
	mov	ecx, 2012
	call	asmerr@PLT
	jmp	$_081

$_070:	mov	rsi, qword ptr [r14+0x2F8]
	test	rsi, rsi
	jnz	$_071
	mov	ecx, 56
	call	LclAlloc@PLT
	mov	rsi, rax
	mov	qword ptr [r14+0x2F8], rax
	mov	dword ptr [rsi+0x28], 5
	inc	dword ptr [r14+0x36C]
	mov	eax, dword ptr [r14+0x36C]
	mov	dword ptr [rsi+0x14], eax
$_071:	mov	rcx, qword ptr [rbp+0x30]
	call	ExpandCStrings@PLT
	inc	dword ptr [rbp+0x28]
	lea	rdi, [rbp-0x94]
	lea	rax, [rbp-0x8]
	mov	qword ptr [rsp+0x28], rax
	lea	rax, [rbp-0x14]
	mov	qword ptr [rsp+0x20], rax
	lea	r9, [rbp-0x4]
	lea	r8, [rbp-0x10]
	mov	rdx, qword ptr [rbp+0x30]
	lea	rcx, [rbp+0x28]
	call	$_001
	mov	rdx, rdi
	mov	ecx, dword ptr [rsi+0x14]
	call	GetLabelStr@PLT
	cmp	dword ptr [rbp-0x14], 0
	je	$_074
	cmp	dword ptr [rbp-0x8], 0
	je	$_072
	mov	ebx, dword ptr [rbp+0x28]
	mov	eax, dword ptr [rbp-0x4]
	add	dword ptr [rbp+0x28], eax
	inc	dword ptr [r14+0x36C]
	mov	eax, dword ptr [r14+0x36C]
	mov	dword ptr [rsi+0x18], eax
	mov	dword ptr [rsp+0x28], 0
	mov	qword ptr [rsp+0x20], rsi
	mov	r9d, 2
	mov	r8, qword ptr [rbp+0x30]
	lea	rdx, [rbp+0x28]
	mov	rcx, rsi
	call	HllContinueIf@PLT
	mov	dword ptr [rbp+0x28], ebx
	mov	r9d, dword ptr [rbp-0x4]
	mov	r8, qword ptr [rbp-0x10]
	mov	rdx, qword ptr [rbp+0x30]
	lea	rcx, [rbp+0x28]
	call	$_013
	mov	r8, rdi
	mov	edx, 629
	lea	rcx, [DS0008+rip]
	call	AddLineQueueX@PLT
	mov	rdx, rdi
	mov	ecx, dword ptr [rsi+0x18]
	call	GetLabelStr@PLT
	mov	rdx, rax
	lea	rcx, [DS0009+rip]
	call	AddLineQueueX@PLT
	jmp	$_073

$_072:	mov	eax, dword ptr [rbp-0x4]
	add	dword ptr [rbp+0x28], eax
	mov	dword ptr [rsp+0x28], 1
	mov	qword ptr [rsp+0x20], rsi
	mov	r9d, 1
	mov	r8, qword ptr [rbp+0x30]
	lea	rdx, [rbp+0x28]
	mov	rcx, rsi
	call	HllContinueIf@PLT
$_073:
	jmp	$_078

$_074:	cmp	dword ptr [rbp-0x8], 0
	jz	$_075
	mov	r9d, dword ptr [rbp-0x4]
	mov	r8, qword ptr [rbp-0x10]
	mov	rdx, qword ptr [rbp+0x30]
	lea	rcx, [rbp+0x28]
	call	$_013
	call	RunLineQueue@PLT
$_075:	mov	rcx, rdi
	call	SymFind@PLT
	test	rax, rax
	jz	$_077
	mov	ebx, dword ptr [rax+0x30]
	call	GetCurrOffset@PLT
	mov	rcx, qword ptr [CurrProc+rip]
	test	byte ptr [rcx+0x13], 0x20
	jz	$_076
	cmp	qword ptr [r14+0x2E0], 0
	jnz	$_076
	lea	edx, [rax+0x2]
	cmp	edx, ebx
	jnz	$_076
	cmp	dword ptr [Parse_Pass+rip], 1
	jbe	$_076
	mov	ebx, eax
	and	byte ptr [rcx+0x13], 0xDF
$_076:	cmp	ebx, eax
	seta	al
$_077:	test	al, al
	jz	$_078
	mov	r8, rdi
	mov	edx, 629
	lea	rcx, [DS0008+rip]
	call	AddLineQueueX@PLT
$_078:	test	byte ptr [r14], 0x08
	jz	$_079
	call	GetCurrOffset@PLT
	xor	r8d, r8d
	mov	edx, eax
	mov	ecx, 4
	call	LstWrite@PLT
$_079:	cmp	qword ptr [r14+0x2B0], 0
	jz	$_080
	call	RunLineQueue@PLT
$_080:	xor	eax, eax
$_081:	leave
	pop	rbx
	pop	rdi
	pop	rsi
	ret


.SECTION .data
	.ALIGN	16

DS0000:
	.byte  0x20, 0x6C, 0x65, 0x61, 0x20, 0x25, 0x72, 0x2C
	.byte  0x20, 0x40, 0x43, 0x53, 0x74, 0x72, 0x28, 0x25
	.byte  0x73, 0x29, 0x00

DS0001:
	.byte  0x20, 0x6D, 0x6F, 0x76, 0x20, 0x25, 0x72, 0x2C
	.byte  0x20, 0x25, 0x64, 0x00

DS0002:
	.byte  0x20, 0x78, 0x6F, 0x72, 0x20, 0x25, 0x72, 0x2C
	.byte  0x20, 0x25, 0x72, 0x00

DS0003:
	.byte  0x20, 0x6D, 0x6F, 0x76, 0x20, 0x61, 0x78, 0x2C
	.byte  0x20, 0x25, 0x73, 0x0A, 0x20, 0x6D, 0x6F, 0x76
	.byte  0x64, 0x20, 0x78, 0x6D, 0x6D, 0x30, 0x2C, 0x20
	.byte  0x65, 0x61, 0x78, 0x00

DS0004:
	.byte  0x20, 0x6D, 0x6F, 0x76, 0x61, 0x70, 0x73, 0x20
	.byte  0x78, 0x6D, 0x6D, 0x30, 0x2C, 0x20, 0x78, 0x6D
	.byte  0x6D, 0x77, 0x6F, 0x72, 0x64, 0x20, 0x70, 0x74
	.byte  0x72, 0x20, 0x25, 0x73, 0x00

DS0005:
	.byte  0x20, 0x6D, 0x6F, 0x76, 0x20, 0x72, 0x61, 0x78
	.byte  0x2C, 0x20, 0x71, 0x77, 0x6F, 0x72, 0x64, 0x20
	.byte  0x70, 0x74, 0x72, 0x20, 0x25, 0x73, 0x0A, 0x20
	.byte  0x6D, 0x6F, 0x76, 0x20, 0x72, 0x64, 0x78, 0x2C
	.byte  0x20, 0x71, 0x77, 0x6F, 0x72, 0x64, 0x20, 0x70
	.byte  0x74, 0x72, 0x20, 0x25, 0x73, 0x5B, 0x38, 0x5D
	.byte  0x00

DS0006:
	.byte  0x6D, 0x6F, 0x76, 0x61, 0x70, 0x73, 0x20, 0x78
	.byte  0x6D, 0x6D, 0x30, 0x2C, 0x25, 0x73, 0x00

DS0007:
	.byte  0x25, 0x72, 0x20, 0x25, 0x72, 0x2C, 0x25, 0x73
	.byte  0x00

DS0008:
	.byte  0x20, 0x25, 0x72, 0x20, 0x25, 0x73, 0x00

DS0009:
	.byte  0x25, 0x73, 0x3A, 0x00


.att_syntax prefix
