_RTCC_GenerateDigits:
;RTCC.c,7 :: 		void RTCC_GenerateDigits(char value, char *pos) {
;RTCC.c,8 :: 		*pos = (value / 10) + 48;
LBU	R3, 0(SP)
ORI	R2, R0, 10
DIVU	R3, R2
MFLO	R2
ADDIU	R3, R2, 48
LW	R2, 4(SP)
SB	R3, 0(R2)
;RTCC.c,9 :: 		pos++;
LW	R2, 4(SP)
ADDIU	R4, R2, 1
SW	R4, 4(SP)
;RTCC.c,10 :: 		*pos = (value % 10) + 48;
LBU	R3, 0(SP)
ORI	R2, R0, 10
DIVU	R3, R2
MFHI	R2
ADDIU	R2, R2, 48
SB	R2, 0(R4)
;RTCC.c,11 :: 		}
L_end_RTCC_GenerateDigits:
JR	RA
NOP	
; end of _RTCC_GenerateDigits
_RTCC_GenerateDateStringYMD:
;RTCC.c,13 :: 		void RTCC_GenerateDateStringYMD(TDateTime *dt, char *rtccstring) {
ADDIU	SP, SP, -12
SW	RA, 0(SP)
;RTCC.c,16 :: 		char sep = '-';
ORI	R30, R0, 45
SB	R30, 8(SP)
;RTCC.c,17 :: 		pos = rtccstring;
LW	R2, 16(SP)
SW	R2, 4(SP)
;RTCC.c,18 :: 		RTCC_GenerateDigits((*dt).Year, pos);
LW	R2, 16(SP)
ADDIU	SP, SP, -8
SW	R2, 4(SP)
LW	R2, 20(SP)
LBU	R2, 0(R2)
SB	R2, 0(SP)
JAL	_RTCC_GenerateDigits+0
NOP	
ADDIU	SP, SP, 8
;RTCC.c,19 :: 		pos += 2; *pos = sep; pos++;
LW	R2, 4(SP)
ADDIU	R3, R2, 2
SW	R3, 4(SP)
LBU	R2, 8(SP)
SB	R2, 0(R3)
LW	R2, 4(SP)
ADDIU	R2, R2, 1
SW	R2, 4(SP)
;RTCC.c,20 :: 		RTCC_GenerateDigits((*dt).Month, pos);
ADDIU	SP, SP, -8
SW	R2, 4(SP)
LW	R2, 20(SP)
ADDIU	R2, R2, 1
LBU	R2, 0(R2)
SB	R2, 0(SP)
JAL	_RTCC_GenerateDigits+0
NOP	
ADDIU	SP, SP, 8
;RTCC.c,21 :: 		pos += 2; *pos = sep; pos++;
LW	R2, 4(SP)
ADDIU	R3, R2, 2
SW	R3, 4(SP)
LBU	R2, 8(SP)
SB	R2, 0(R3)
LW	R2, 4(SP)
ADDIU	R2, R2, 1
SW	R2, 4(SP)
;RTCC.c,22 :: 		RTCC_GenerateDigits((*dt).Day, pos);
ADDIU	SP, SP, -8
SW	R2, 4(SP)
LW	R2, 20(SP)
ADDIU	R2, R2, 2
LBU	R2, 0(R2)
SB	R2, 0(SP)
JAL	_RTCC_GenerateDigits+0
NOP	
ADDIU	SP, SP, 8
;RTCC.c,23 :: 		pos += 2;
LW	R2, 4(SP)
ADDIU	R2, R2, 2
SW	R2, 4(SP)
;RTCC.c,24 :: 		*pos = 0;
SB	R0, 0(R2)
;RTCC.c,25 :: 		}
L_end_RTCC_GenerateDateStringYMD:
LW	RA, 0(SP)
ADDIU	SP, SP, 12
JR	RA
NOP	
; end of _RTCC_GenerateDateStringYMD
_RTCC_GenerateDateStringDMY:
;RTCC.c,27 :: 		void RTCC_GenerateDateStringDMY(TDateTime *dt, char *rtccstring) {
ADDIU	SP, SP, -12
SW	RA, 0(SP)
;RTCC.c,30 :: 		char sep = '/';
ORI	R30, R0, 47
SB	R30, 8(SP)
;RTCC.c,31 :: 		pos = rtccstring;
LW	R2, 16(SP)
SW	R2, 4(SP)
;RTCC.c,32 :: 		RTCC_GenerateDigits((*dt).Day, pos);
LW	R2, 16(SP)
ADDIU	SP, SP, -8
SW	R2, 4(SP)
LW	R2, 20(SP)
ADDIU	R2, R2, 2
LBU	R2, 0(R2)
SB	R2, 0(SP)
JAL	_RTCC_GenerateDigits+0
NOP	
ADDIU	SP, SP, 8
;RTCC.c,33 :: 		pos += 2; *pos = sep; pos++;
LW	R2, 4(SP)
ADDIU	R3, R2, 2
SW	R3, 4(SP)
LBU	R2, 8(SP)
SB	R2, 0(R3)
LW	R2, 4(SP)
ADDIU	R2, R2, 1
SW	R2, 4(SP)
;RTCC.c,34 :: 		RTCC_GenerateDigits((*dt).Month, pos);
ADDIU	SP, SP, -8
SW	R2, 4(SP)
LW	R2, 20(SP)
ADDIU	R2, R2, 1
LBU	R2, 0(R2)
SB	R2, 0(SP)
JAL	_RTCC_GenerateDigits+0
NOP	
ADDIU	SP, SP, 8
;RTCC.c,35 :: 		pos += 2; *pos = sep; pos++;
LW	R2, 4(SP)
ADDIU	R3, R2, 2
SW	R3, 4(SP)
LBU	R2, 8(SP)
SB	R2, 0(R3)
LW	R2, 4(SP)
ADDIU	R3, R2, 1
SW	R3, 4(SP)
;RTCC.c,36 :: 		*pos = '2'; pos++;
ORI	R2, R0, 50
SB	R2, 0(R3)
LW	R2, 4(SP)
ADDIU	R3, R2, 1
SW	R3, 4(SP)
;RTCC.c,37 :: 		*pos = '0'; pos++;
ORI	R2, R0, 48
SB	R2, 0(R3)
LW	R2, 4(SP)
ADDIU	R2, R2, 1
SW	R2, 4(SP)
;RTCC.c,38 :: 		RTCC_GenerateDigits((*dt).Year, pos);
ADDIU	SP, SP, -8
SW	R2, 4(SP)
LW	R2, 20(SP)
LBU	R2, 0(R2)
SB	R2, 0(SP)
JAL	_RTCC_GenerateDigits+0
NOP	
ADDIU	SP, SP, 8
;RTCC.c,39 :: 		pos += 2;
LW	R2, 4(SP)
ADDIU	R2, R2, 2
SW	R2, 4(SP)
;RTCC.c,40 :: 		*pos = 0;
SB	R0, 0(R2)
;RTCC.c,41 :: 		}
L_end_RTCC_GenerateDateStringDMY:
LW	RA, 0(SP)
ADDIU	SP, SP, 12
JR	RA
NOP	
; end of _RTCC_GenerateDateStringDMY
_RTCC_GenerateTimeString:
;RTCC.c,43 :: 		void RTCC_GenerateTimeString(TDateTime *dt, char *rtccstring, char incl_sec) {
ADDIU	SP, SP, -8
SW	RA, 0(SP)
;RTCC.c,46 :: 		pos = rtccstring;
LW	R2, 12(SP)
SW	R2, 4(SP)
;RTCC.c,47 :: 		RTCC_GenerateDigits((*dt).Hour, pos);
LW	R2, 12(SP)
ADDIU	SP, SP, -8
SW	R2, 4(SP)
LW	R2, 16(SP)
ADDIU	R2, R2, 3
LBU	R2, 0(R2)
SB	R2, 0(SP)
JAL	_RTCC_GenerateDigits+0
NOP	
ADDIU	SP, SP, 8
;RTCC.c,48 :: 		pos += 2; *pos = ':'; pos++;
LW	R2, 4(SP)
ADDIU	R3, R2, 2
SW	R3, 4(SP)
ORI	R2, R0, 58
SB	R2, 0(R3)
LW	R2, 4(SP)
ADDIU	R2, R2, 1
SW	R2, 4(SP)
;RTCC.c,49 :: 		RTCC_GenerateDigits((*dt).Minute, pos);
ADDIU	SP, SP, -8
SW	R2, 4(SP)
LW	R2, 16(SP)
ADDIU	R2, R2, 4
LBU	R2, 0(R2)
SB	R2, 0(SP)
JAL	_RTCC_GenerateDigits+0
NOP	
ADDIU	SP, SP, 8
;RTCC.c,50 :: 		if (incl_sec) {
LBU	R2, 16(SP)
BNE	R2, R0, L__RTCC_GenerateTimeString6
NOP	
J	L_RTCC_GenerateTimeString0
NOP	
L__RTCC_GenerateTimeString6:
;RTCC.c,51 :: 		pos += 2; *pos = ':'; pos++;
LW	R2, 4(SP)
ADDIU	R3, R2, 2
SW	R3, 4(SP)
ORI	R2, R0, 58
SB	R2, 0(R3)
LW	R2, 4(SP)
ADDIU	R2, R2, 1
SW	R2, 4(SP)
;RTCC.c,52 :: 		RTCC_GenerateDigits((*dt).Second, pos);
ADDIU	SP, SP, -8
SW	R2, 4(SP)
LW	R2, 16(SP)
ADDIU	R2, R2, 5
LBU	R2, 0(R2)
SB	R2, 0(SP)
JAL	_RTCC_GenerateDigits+0
NOP	
ADDIU	SP, SP, 8
;RTCC.c,53 :: 		}
L_RTCC_GenerateTimeString0:
;RTCC.c,54 :: 		pos += 2;
LW	R2, 4(SP)
ADDIU	R2, R2, 2
SW	R2, 4(SP)
;RTCC.c,55 :: 		*pos = 0;
SB	R0, 0(R2)
;RTCC.c,56 :: 		}
L_end_RTCC_GenerateTimeString:
LW	RA, 0(SP)
ADDIU	SP, SP, 8
JR	RA
NOP	
; end of _RTCC_GenerateTimeString
_RTCC_GenerateString:
;RTCC.c,58 :: 		void RTCC_GenerateString(TDateTime *dt, char *rtccstring) {
ADDIU	SP, SP, -4
SW	RA, 0(SP)
;RTCC.c,59 :: 		RTCC_GenerateDateStringDMY(dt, rtccstring);
LW	R2, 8(SP)
ADDIU	SP, SP, -8
SW	R2, 4(SP)
LW	R2, 12(SP)
SW	R2, 0(SP)
JAL	_RTCC_GenerateDateStringDMY+0
NOP	
ADDIU	SP, SP, 8
;RTCC.c,60 :: 		rtccstring[10] = ' ';
LW	R2, 8(SP)
ADDIU	R3, R2, 10
ORI	R2, R0, 32
SB	R2, 0(R3)
;RTCC.c,61 :: 		RTCC_GenerateTimeString(dt, rtccstring + 11, 0);
ADDIU	SP, SP, -12
SB	R0, 8(SP)
LW	R2, 20(SP)
ADDIU	R2, R2, 11
SW	R2, 4(SP)
LW	R2, 16(SP)
SW	R2, 0(SP)
JAL	_RTCC_GenerateTimeString+0
NOP	
ADDIU	SP, SP, 12
;RTCC.c,62 :: 		}
L_end_RTCC_GenerateString:
LW	RA, 0(SP)
ADDIU	SP, SP, 4
JR	RA
NOP	
; end of _RTCC_GenerateString
