	SECTION _TEXT CLASS=CODE USE32
	SECTION _DATA CLASS=DATA USE32
	SECTION _BSS  CLASS=BSS USE32
	SECTION _CONST  CLASS=CONST USE32
	SECTION _STRING  CLASS=STRING USE32
	SECTION cstartup CLASS=INITDATA USE32
	SECTION crundown CLASS=EXITDATA USE32
	SECTION cppinit  CLASS=CPPINIT USE32
	SECTION cppexit  CLASS=CPPEXIT USE32
	GROUP DGROUP _DATA _BSS _CONST _STRING

SECTION _TEXT
[GLOBAL	__splitpath]
;
; Line 4:	{
;
__splitpath:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
;
; Line 6:		v = strchr(path,':');
;
	PUSH	BYTE 03AH
	PUSH	DWORD [EBP+08H]
	CALL	_strchr
	ADD	ESP,BYTE 08H
	MOV	EBX,EAX
;
; Line 7:		p = path;
;
	MOV	EDI,DWORD [EBP+08H]
;
; Line 8:		x = drive;
;
	MOV	ESI,DWORD [EBP+0CH]
	JMP	L_1
L_3:
;
; Line 10:			*x++ = *p++;
;
	MOV	EAX,EDI
	INC	EDI
	MOV	ECX,ESI
	INC	ESI
	MOV	AL,BYTE [EAX+00H]
	MOV	BYTE [ECX+00H],AL
L_1:
;
; Line 9:		while (p <=v)
;
	CMP	EDI,EBX
	JBE	SHORT	L_3
L_2:
;
; Line 11:		*x = 0;
;
	MOV	BYTE [ESI+00H],00H
;
; Line 12:		v = strrchr(path,'\\');
;
	PUSH	BYTE 05CH
	PUSH	DWORD [EBP+08H]
	CALL	_strrchr
	ADD	ESP,BYTE 08H
	MOV	EBX,EAX
;
; Line 13:		x = dir;
;
	MOV	ESI,DWORD [EBP+010H]
	JMP	L_4
L_6:
;
; Line 15:			*x++ = *p++;
;
	MOV	EAX,EDI
	INC	EDI
	MOV	ECX,ESI
	INC	ESI
	MOV	AL,BYTE [EAX+00H]
	MOV	BYTE [ECX+00H],AL
L_4:
;
; Line 14:		while (p <= v)
;
	CMP	EDI,EBX
	JBE	SHORT	L_6
L_5:
;
; Line 16:		*x = 0;
;
	MOV	BYTE [ESI+00H],00H
;
; Line 17:		v = strrchr(path,'.');
;
	PUSH	BYTE 02EH
	PUSH	DWORD [EBP+08H]
	CALL	_strrchr
	ADD	ESP,BYTE 08H
	MOV	EBX,EAX
;
; Line 18:		if (v == 0)
;
	TEST	EBX,EBX
	JNE	NEAR	L_7
;
; Line 19:			v = path + strlen(path);
;
	PUSH	EDI
	MOV	EDI,DWORD [EBP+08H]
	CLD
	SUB	EAX,EAX
	MOV	ECX,0FFFFFFFFH
	REPNZ	SCASB
	NOT	ECX
	DEC	ECX
	MOV	EAX,ECX
	POP	EDI
	ADD	EAX,DWORD [EBP+08H]
	MOV	EBX,EAX
L_7:
;
; Line 20:		x = name;
;
	MOV	ESI,DWORD [EBP+014H]
	JMP	L_9
L_11:
;
; Line 22:			*x++ = *p++;
;
	MOV	EAX,EDI
	INC	EDI
	MOV	ECX,ESI
	INC	ESI
	MOV	AL,BYTE [EAX+00H]
	MOV	BYTE [ECX+00H],AL
L_9:
;
; Line 21:		while (p < v)
;
	CMP	EDI,EBX
	JB	SHORT	L_11
L_10:
;
; Line 23:		*x = 0;
;
	MOV	BYTE [ESI+00H],00H
;
; Line 24:		x = ext;
;
	MOV	ESI,DWORD [EBP+018H]
	JMP	L_12
L_14:
;
; Line 26:			*x++=*p++;
;
	MOV	EAX,EDI
	INC	EDI
	MOV	ECX,ESI
	INC	ESI
	MOV	AL,BYTE [EAX+00H]
	MOV	BYTE [ECX+00H],AL
L_12:
;
; Line 25:		while (*p)
;
	CMP	BYTE [EDI+00H],BYTE 00H
	JNE	SHORT	L_14
L_13:
;
; Line 27:		*x = 0;
;
	MOV	BYTE [ESI+00H],00H
;
; Line 28:	}
;
	POP	EDI
	POP	ESI
	POP	EBX
	POP	EBP
	RET
[GLOBAL	__makepath]
;
; Line 30:	{
;
__makepath:
	PUSH	EBP
	MOV	EBP,ESP
	PUSH	EBX
	PUSH	ESI
	PUSH	EDI
	MOV	EBX,DWORD [EBP+08H]
	MOV	ESI,DWORD [EBP+018H]
	MOV	EDI,DWORD [EBP+014H]
;
; Line 31:		path[0] = 0;
;
	MOV	BYTE [EBX+00H],00H
;
; Line 32:		if (drive)
;
	CMP	DWORD [EBP+0CH],BYTE 00H
	JE	NEAR	L_15
;
; Line 33:			strcat(path,drive);
;
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+0CH]
	MOV	EDI,EBX
	CLD
	SUB	EAX,EAX
	MOV	ECX,0FFFFFFFFH
	REPNZ	SCASB
	DEC	EDI
	XCHG	ESI,EDI
	PUSH	EDI
	SUB	EAX,EAX
	MOV	ECX,0FFFFFFFFH
	REPNZ	SCASB
	NOT	ECX
	MOV	EAX,ECX
	POP	EDI
	XCHG	ESI,EDI
	REPNZ	MOVSB
	POP	EDI
	POP	ESI
L_15:
;
; Line 34:		if (dir)
;
	CMP	DWORD [EBP+010H],BYTE 00H
	JE	NEAR	L_17
;
; Line 35:			strcat(path,dir);
;
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,DWORD [EBP+010H]
	MOV	EDI,EBX
	CLD
	SUB	EAX,EAX
	MOV	ECX,0FFFFFFFFH
	REPNZ	SCASB
	DEC	EDI
	XCHG	ESI,EDI
	PUSH	EDI
	SUB	EAX,EAX
	MOV	ECX,0FFFFFFFFH
	REPNZ	SCASB
	NOT	ECX
	MOV	EAX,ECX
	POP	EDI
	XCHG	ESI,EDI
	REPNZ	MOVSB
	POP	EDI
	POP	ESI
L_17:
;
; Line 36:		if (name)
;
	TEST	EDI,EDI
	JE	NEAR	L_19
;
; Line 37:			strcat(path,name);
;
	PUSH	ESI
	PUSH	EDI
	MOV	ESI,EDI
	MOV	EDI,EBX
	CLD
	SUB	EAX,EAX
	MOV	ECX,0FFFFFFFFH
	REPNZ	SCASB
	DEC	EDI
	XCHG	ESI,EDI
	PUSH	EDI
	SUB	EAX,EAX
	MOV	ECX,0FFFFFFFFH
	REPNZ	SCASB
	NOT	ECX
	MOV	EAX,ECX
	POP	EDI
	XCHG	ESI,EDI
	REPNZ	MOVSB
	POP	EDI
	POP	ESI
L_19:
;
; Line 38:		if (ext)
;
	TEST	ESI,ESI
	JE	NEAR	L_21
;
; Line 39:			strcat(path,ext);
;
	PUSH	ESI
	PUSH	EDI
	MOV	EDI,EBX
	CLD
	SUB	EAX,EAX
	MOV	ECX,0FFFFFFFFH
	REPNZ	SCASB
	DEC	EDI
	XCHG	ESI,EDI
	PUSH	EDI
	SUB	EAX,EAX
	MOV	ECX,0FFFFFFFFH
	REPNZ	SCASB
	NOT	ECX
	MOV	EAX,ECX
	POP	EDI
	XCHG	ESI,EDI
	REPNZ	MOVSB
	POP	EDI
	POP	ESI
L_21:
;
; Line 40:	}
;
	POP	EDI
	POP	ESI
	POP	EBX
	POP	EBP
	RET


SECTION _TEXT
[EXTERN	_strrchr]
[EXTERN	_strchr]
