// File: /workspace/github_c_makefile_star2_O0/SequentMicrosystems[P]wdt-rpi/src/wdt.c
// Function: doHelp
void doHelp(int argc, char *argv[])
{
	if (argc == 3)
	{
		if (strcasecmp(argv[2], "-warranty") == 0)
		{
			printf("\t-warranty:   Display the warranty\n");
			printf("\tUsage:       wdt -warranty\n");
			printf("\tExample:     wdt -warranty\n");
		}
		else if (strcasecmp(argv[2], "-r") == 0
			|| strcasecmp(argv[2], "-reload") == 0)
		{
			printf(
				"\t-r/-reload:  Reload the timer, prevent Raspberry Pi to be repowered\n");
			printf("\tUsage:       wdt -r\n");
			printf("\tExample:     wdt -r\n");
		}
		else if (strcasecmp(argv[2], "-d") == 0
			|| strcasecmp(argv[2], "-default") == 0)
		{
			printf(
				"\t-d/-default: Set the default period (sec); The watchdog will reload this period after reset\n");
			printf("\tUsage:       wdt -d <value>\n");
			printf("\tUsage:       wdt -default <value>\n");
			printf("\tExample:     Set the default period to 270 seconds:\n");
			printf("\t             wdt -d 270\n");
		}
		else if (strcasecmp(argv[2], "-p") == 0
			|| strcasecmp(argv[2], "-period") == 0)
		{
			printf("\t-p/-period:  Set the current period and reload the timer\n");
			printf("\tUsage:       wdt -p <value>\n");
			printf(
				"\tExample:     Set the wdt period to 20 sec and reload the timer:\n");
			printf("\t             wdt -p 20\n");
			printf("\tExample:     Disable the watchdog:\n");
			printf("\t             wdt -p 0\n");
		}
		else if (strcasecmp(argv[2], "-c") == 0
			|| strcasecmp(argv[2], "-clear") == 0)
		{
			printf("\t-c/-clear:   Clear the reset counter  \n");
			printf("\tUsage:       wdt -c\n");
			printf("\tExample:     wdt -c\n");
		}
		else if (strcasecmp(argv[2], "-off") == 0
			|| strcasecmp(argv[2], "-offinterval") == 0)
		{
			printf(
				"\t-off/-offinterval:   Set the off interval (seconds), The Raspberry will keept off this amount of time when the repower operation is performed\n");
			printf("\tUsage:       wdt -off <value>\n");
			printf("\tExample:     Set the wdt off period to 1 hour:\n");
			printf("\t             wdt -off 3600\n");
		}
		else if (strcasecmp(argv[2], "-g") == 0
			|| strcasecmp(argv[2], "-get") == 0)
		{
			printf("\t-g/-get:     Get watchdog parameters\n");
			printf("\tUsage:       wdt -g <option>\n");
			printf("\t<option>:    d/default = default period(sec)\n");
			printf("\t             p/period = period(sec)\n");
			printf(
				"\t             r/resets = total number of resets performed \n");
			printf("\t             v/vin = input voltage(mV)\n");
			printf(
				"\t             off/offinterval = how mutch wdt keep raspberry powered off (sec) \n");
			printf("\t             vr/vrasp = Raspberry voltage(mV)\n");
			printf("\t             vb/vbat = Battery voltage(mV)\n");
			printf(
				"\t             c/charge = charge status (0 - off, 1 - charge complete, 2 - charging, 3 - fault)\n");
			printf(
				"\t             rob/repoweronbattery = if the watchdog power off the Raspberry, will repower on battery only if this is 1\n");
			printf(
				"\t             pbe/powerbuttonenable = power button enabled/disabled (1/0)\n");
			printf(
				"\t             pbs/powerbuttonstatus = 1 - power button has been pushed; 0 - not  \n");
			printf(
				"\t             bint = power button interrupt generation enabled/disabled (1/0)\n");
			printf("\t             rtc (return RTC \"mm:dd:yyyy hh:mm:ss\"  \n");
			printf("\t             t/temp = cpu temperature(degC)\n");
			printf("\t             fv = firmware version\n");
			printf("\t             ecv - end charge voltage (mV)\n");
			printf("\t             buv = battery under voltage thereshold \n");			
			printf("\tExample:     wdt -g d get the wdt default period \n");
		}
		else if (strcasecmp(argv[2], "-rob") == 0
			|| strcasecmp(argv[2], "-repoweronbattery") == 0)
		{
			printf(
				"\t-rob/-repoweronbattery:   Set the \"repower on battery\" flag, 1-power back on Raspberry if the main power i missing, 0 - wait for main power \n");
			printf("\tUsage:       wdt -rob <value>\n");
			printf(
				"\tExample:     Do not power back on Raspberry if on battery\n");
			printf("\t             wdt -rob 0\n");
		}
		else if (strcasecmp(argv[2], "-pbe") == 0
			|| strcasecmp(argv[2], "-powerbuttonenable") == 0)
		{
			printf(
				"\t-pbe/-powerbuttonenable:   Enable / disable the power button, you can read his status and it can power back on raspberry if is pushed \n");
			printf("\tUsage:       wdt -pbe <value>\n");
			printf("\tExample:     Enable power button\n");
			printf("\t             wdt -pbe 1\n");
		}
		else if (strcasecmp(argv[2], "-rtc") == 0)
		{
			printf("\t-rtc:		  Set the RTC time and date\n");
			printf(
				"\tUsage:       wdt -rtc <mon> <day> <year> <hour> <min> <sec>\n");
			printf("\tExample:     Set time and date to 02/14/2023 12:54:32\n");
			printf("\t             wdt -rtc 2 14 2023 12 54 32\n");

		}
		else if (strcasecmp(argv[2], "-bint") == 0)
		{
			printf(
				"\t-bint:		  Enable / Disable interrupt generation on button push event\n");
			printf("\tUsage:       wdt -bint <0/1>\n");
			printf("\tExample:     Enable interrupt generation\n");
			printf("\t             wdt -bint 1\n");
		}
		else if (strcasecmp(argv[2], "-bc") == 0)
		{
			printf(
				"\t-bc:		  Prevent charging\n");
			printf("\tUsage:       wdt -bc <0/1>\n");
			printf("\tExample:     Disable charging\n");
			printf("\t             wdt -bc 1\n");
		}
		else if (strcasecmp(argv[2], "-buv") == 0)
		{
			printf(
				"\t-buv:		  Set battery undervoltage threshold in mV\n");
			printf("\tUsage:       wdt -buv [800,40000]\n");
			printf("\tExample:     Set the undervoltage threshold at 2.8V \n");
			printf("\t             wdt -buv 2800\n");
		}
		else if (strcasecmp(argv[2], "-chsel") == 0)
		{
			printf(
				"\t-chsel:		  Select charger chemestry (for multichemestry version only), check end charge voltage (wdt -g ecv)\n");
			printf("\tUsage:       wdt -chsel [0..7]\n");
			printf("\tExample:     Set the liIon with 4.2V end of charge voltage \n");
			printf("\t             wdt -chsel 5\n");
		}
		else
		{
			printf("Invalid command!\n");
			printf("%s: %s\n", argv[0], usage);
		}
	}
	else
	{
		printf("%s: %s\n", argv[0], usage);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x3, -0x4(%rbp)
jne 0x1879
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x3360(%rip), %rsi      # 0x4548
callq 0x1030
cmpl $0x0, %eax
jne 0x1221
leaq 0x3359(%rip), %rdi      # 0x4552
movb $0x0, %al
callq 0x1050
leaq 0x336f(%rip), %rdi      # 0x4576
movb $0x0, %al
callq 0x1050
leaq 0x337e(%rip), %rdi      # 0x4593
movb $0x0, %al
callq 0x1050
jmp 0x1877
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x3380(%rip), %rsi      # 0x45b0
callq 0x1030
cmpl $0x0, %eax
je 0x1253
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x336a(%rip), %rsi      # 0x45b3
callq 0x1030
cmpl $0x0, %eax
jne 0x1282
leaq 0x3361(%rip), %rdi      # 0x45bb
movb $0x0, %al
callq 0x1050
leaq 0x3399(%rip), %rdi      # 0x4601
movb $0x0, %al
callq 0x1050
leaq 0x33a1(%rip), %rdi      # 0x4617
movb $0x0, %al
callq 0x1050
jmp 0x1875
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x339c(%rip), %rsi      # 0x462d
callq 0x1030
cmpl $0x0, %eax
je 0x12b4
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x3386(%rip), %rsi      # 0x4630
callq 0x1030
cmpl $0x0, %eax
jne 0x12ff
leaq 0x337e(%rip), %rdi      # 0x4639
movb $0x0, %al
callq 0x1050
leaq 0x33ce(%rip), %rdi      # 0x4697
movb $0x0, %al
callq 0x1050
leaq 0x33de(%rip), %rdi      # 0x46b5
movb $0x0, %al
callq 0x1050
leaq 0x33f4(%rip), %rdi      # 0x46d9
movb $0x0, %al
callq 0x1050
leaq 0x341c(%rip), %rdi      # 0x470f
movb $0x0, %al
callq 0x1050
jmp 0x1873
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x341b(%rip), %rsi      # 0x4729
callq 0x1030
cmpl $0x0, %eax
je 0x1331
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x3405(%rip), %rsi      # 0x472c
callq 0x1030
cmpl $0x0, %eax
jne 0x138a
leaq 0x33fc(%rip), %rdi      # 0x4734
movb $0x0, %al
callq 0x1050
leaq 0x3429(%rip), %rdi      # 0x476f
movb $0x0, %al
callq 0x1050
leaq 0x3439(%rip), %rdi      # 0x478d
movb $0x0, %al
callq 0x1050
leaq 0x346d(%rip), %rdi      # 0x47cf
movb $0x0, %al
callq 0x1050
leaq 0x3478(%rip), %rdi      # 0x47e8
movb $0x0, %al
callq 0x1050
leaq 0x348f(%rip), %rdi      # 0x480d
movb $0x0, %al
callq 0x1050
jmp 0x1871
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x348c(%rip), %rsi      # 0x4825
callq 0x1030
cmpl $0x0, %eax
je 0x13bc
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x3476(%rip), %rsi      # 0x4828
callq 0x1030
cmpl $0x0, %eax
jne 0x13eb
leaq 0x346c(%rip), %rdi      # 0x482f
movb $0x0, %al
callq 0x1050
leaq 0x3487(%rip), %rdi      # 0x4858
movb $0x0, %al
callq 0x1050
leaq 0x348f(%rip), %rdi      # 0x486e
movb $0x0, %al
callq 0x1050
jmp 0x186f
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x348a(%rip), %rsi      # 0x4884
callq 0x1030
cmpl $0x0, %eax
je 0x141d
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x3476(%rip), %rsi      # 0x4889
callq 0x1030
cmpl $0x0, %eax
jne 0x145a
leaq 0x3472(%rip), %rdi      # 0x4896
movb $0x0, %al
callq 0x1050
leaq 0x34f4(%rip), %rdi      # 0x4926
movb $0x0, %al
callq 0x1050
leaq 0x3506(%rip), %rdi      # 0x4946
movb $0x0, %al
callq 0x1050
leaq 0x3529(%rip), %rdi      # 0x4977
movb $0x0, %al
callq 0x1050
jmp 0x186d
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x352b(%rip), %rsi      # 0x4994
callq 0x1030
cmpl $0x0, %eax
je 0x1490
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x3515(%rip), %rsi      # 0x4997
callq 0x1030
cmpl $0x0, %eax
jne 0x15ad
leaq 0x3505(%rip), %rdi      # 0x499c
movb $0x0, %al
callq 0x1050
leaq 0x351e(%rip), %rdi      # 0x49c3
movb $0x0, %al
callq 0x1050
leaq 0x352f(%rip), %rdi      # 0x49e2
movb $0x0, %al
callq 0x1050
leaq 0x3550(%rip), %rdi      # 0x4a11
movb $0x0, %al
callq 0x1050
leaq 0x3568(%rip), %rdi      # 0x4a37
movb $0x0, %al
callq 0x1050
leaq 0x3596(%rip), %rdi      # 0x4a73
movb $0x0, %al
callq 0x1050
leaq 0x35b1(%rip), %rdi      # 0x4a9c
movb $0x0, %al
callq 0x1050
leaq 0x35f4(%rip), %rdi      # 0x4aed
movb $0x0, %al
callq 0x1050
leaq 0x3616(%rip), %rdi      # 0x4b1d
movb $0x0, %al
callq 0x1050
leaq 0x3635(%rip), %rdi      # 0x4b4a
movb $0x0, %al
callq 0x1050
leaq 0x3687(%rip), %rdi      # 0x4baa
movb $0x0, %al
callq 0x1050
leaq 0x36f2(%rip), %rdi      # 0x4c23
movb $0x0, %al
callq 0x1050
leaq 0x372f(%rip), %rdi      # 0x4c6e
movb $0x0, %al
callq 0x1050
leaq 0x3774(%rip), %rdi      # 0x4cc1
movb $0x0, %al
callq 0x1050
leaq 0x37b5(%rip), %rdi      # 0x4d10
movb $0x0, %al
callq 0x1050
leaq 0x37de(%rip), %rdi      # 0x4d47
movb $0x0, %al
callq 0x1050
leaq 0x37fe(%rip), %rdi      # 0x4d75
movb $0x0, %al
callq 0x1050
leaq 0x3815(%rip), %rdi      # 0x4d9a
movb $0x0, %al
callq 0x1050
leaq 0x3834(%rip), %rdi      # 0x4dc7
movb $0x0, %al
callq 0x1050
leaq 0x385d(%rip), %rdi      # 0x4dfe
movb $0x0, %al
callq 0x1050
jmp 0x186b
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x3876(%rip), %rsi      # 0x4e32
callq 0x1030
cmpl $0x0, %eax
je 0x15df
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x3862(%rip), %rsi      # 0x4e37
callq 0x1030
cmpl $0x0, %eax
jne 0x161c
leaq 0x3863(%rip), %rdi      # 0x4e49
movb $0x0, %al
callq 0x1050
leaq 0x38e4(%rip), %rdi      # 0x4ed8
movb $0x0, %al
callq 0x1050
leaq 0x38f6(%rip), %rdi      # 0x4ef8
movb $0x0, %al
callq 0x1050
leaq 0x3924(%rip), %rdi      # 0x4f34
movb $0x0, %al
callq 0x1050
jmp 0x1869
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x3923(%rip), %rsi      # 0x4f4e
callq 0x1030
cmpl $0x0, %eax
je 0x164e
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x390f(%rip), %rsi      # 0x4f53
callq 0x1030
cmpl $0x0, %eax
jne 0x168b
leaq 0x3911(%rip), %rdi      # 0x4f66
movb $0x0, %al
callq 0x1050
leaq 0x398c(%rip), %rdi      # 0x4fef
movb $0x0, %al
callq 0x1050
leaq 0x399e(%rip), %rdi      # 0x500f
movb $0x0, %al
callq 0x1050
leaq 0x39b3(%rip), %rdi      # 0x5032
movb $0x0, %al
callq 0x1050
jmp 0x1867
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x39b2(%rip), %rsi      # 0x504c
callq 0x1030
cmpl $0x0, %eax
jne 0x16e1
leaq 0x39a6(%rip), %rdi      # 0x5051
movb $0x0, %al
callq 0x1050
leaq 0x39bd(%rip), %rdi      # 0x5076
movb $0x0, %al
callq 0x1050
leaq 0x39ed(%rip), %rdi      # 0x50b4
movb $0x0, %al
callq 0x1050
leaq 0x3a17(%rip), %rdi      # 0x50ec
movb $0x0, %al
callq 0x1050
jmp 0x1865
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x3a27(%rip), %rsi      # 0x5117
callq 0x1030
cmpl $0x0, %eax
jne 0x1737
leaq 0x3a1c(%rip), %rdi      # 0x511d
movb $0x0, %al
callq 0x1050
leaq 0x3a55(%rip), %rdi      # 0x5164
movb $0x0, %al
callq 0x1050
leaq 0x3a66(%rip), %rdi      # 0x5183
movb $0x0, %al
callq 0x1050
leaq 0x3a83(%rip), %rdi      # 0x51ae
movb $0x0, %al
callq 0x1050
jmp 0x1863
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x3a83(%rip), %rsi      # 0x51c9
callq 0x1030
cmpl $0x0, %eax
jne 0x178d
leaq 0x3a76(%rip), %rdi      # 0x51cd
movb $0x0, %al
callq 0x1050
leaq 0x3a83(%rip), %rdi      # 0x51e8
movb $0x0, %al
callq 0x1050
leaq 0x3a92(%rip), %rdi      # 0x5205
movb $0x0, %al
callq 0x1050
leaq 0x3aa4(%rip), %rdi      # 0x5225
movb $0x0, %al
callq 0x1050
jmp 0x1861
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x3aa2(%rip), %rsi      # 0x523e
callq 0x1030
cmpl $0x0, %eax
jne 0x17e0
leaq 0x3a96(%rip), %rdi      # 0x5243
movb $0x0, %al
callq 0x1050
leaq 0x3abc(%rip), %rdi      # 0x5277
movb $0x0, %al
callq 0x1050
leaq 0x3ad2(%rip), %rdi      # 0x529b
movb $0x0, %al
callq 0x1050
leaq 0x3afb(%rip), %rdi      # 0x52d2
movb $0x0, %al
callq 0x1050
jmp 0x185f
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
leaq 0x3b00(%rip), %rsi      # 0x52ef
callq 0x1030
cmpl $0x0, %eax
jne 0x1833
leaq 0x3af6(%rip), %rdi      # 0x52f6
movb $0x0, %al
callq 0x1050
leaq 0x3b57(%rip), %rdi      # 0x5365
movb $0x0, %al
callq 0x1050
leaq 0x3b6a(%rip), %rdi      # 0x5386
movb $0x0, %al
callq 0x1050
leaq 0x3b9a(%rip), %rdi      # 0x53c4
movb $0x0, %al
callq 0x1050
jmp 0x185d
leaq 0x3ba6(%rip), %rdi      # 0x53e0
movb $0x0, %al
callq 0x1050
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq 0x5821(%rip), %rdx      # 0x7070
leaq 0x3b9c(%rip), %rdi      # 0x53f2
movb $0x0, %al
callq 0x1050
jmp 0x185f
jmp 0x1861
jmp 0x1863
jmp 0x1865
jmp 0x1867
jmp 0x1869
jmp 0x186b
jmp 0x186d
jmp 0x186f
jmp 0x1871
jmp 0x1873
jmp 0x1875
jmp 0x1877
jmp 0x1895
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq 0x57e9(%rip), %rdx      # 0x7070
leaq 0x3b64(%rip), %rdi      # 0x53f2
movb $0x0, %al
callq 0x1050
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)