// File: /workspace/github_c_makefile_star2_O1/alexgirao[P]aimant/chargenx.c
// Function: help
static void help(const char *argv0, struct getopt_x *state)
{
	char buf[4096];
	int bufsz = sizeof(buf);
	struct option opt[1];
	int pos = 0;
	int c = 0;

	pos += snprintf(buf + pos, SOZ(bufsz,pos), "\n");
	pos += snprintf(buf + pos, SOZ(bufsz,pos), "  usage: %s [options] ...\n", argv0);
	pos += snprintf(buf + pos, SOZ(bufsz,pos), "  options:\n");
	pos += snprintf(buf + pos, SOZ(bufsz,pos), "\n");

	while ((c = getopt_x_option(state, c, opt)) >= 0) {
		pos += getopt_x_option_format(buf + pos, bufsz - pos, state, opt);
		switch (opt->val) {
		case 'a':
			pos += snprintf(buf + pos, SOZ(bufsz,pos), "start delay in usecs, default is without delay\n");
			break;
		case 'z':
			pos += snprintf(buf + pos, SOZ(bufsz,pos), "end delay in usecs, default is withour delay\n");
			break;
		case 'b':
			pos += snprintf(buf + pos, SOZ(bufsz,pos), "between line delay in usecs, default\n");
			pos += getopt_x_option_format(buf + pos, SOZ(bufsz,pos), state, NULL);
			pos += snprintf(buf + pos, SOZ(bufsz,pos), "is %li usecs\n", args->between_delay);
			break;
		case 'u':
			pos += snprintf(buf + pos, SOZ(bufsz,pos), "a microsecond sleep after each # lines\n");
			pos += getopt_x_option_format(buf + pos, SOZ(bufsz,pos), state, NULL);
			pos += snprintf(buf + pos, SOZ(bufsz,pos), "this conflicts with -b\n");
			break;
		case 'n':
			pos += snprintf(buf + pos, SOZ(bufsz,pos), "number of lines (default to unlimited), %i\n", END_CHAR - START_CHAR);
			pos += getopt_x_option_format(buf + pos, SOZ(bufsz,pos), state, NULL);
			pos += snprintf(buf + pos, SOZ(bufsz,pos), "loop on all chars\n");
			break;
		case 'i':
			pos += snprintf(buf + pos, SOZ(bufsz,pos), "line identification prefix\n");
			break;
		case 'p':
			pos += snprintf(buf + pos, SOZ(bufsz,pos), "file to write the process pid, default\n");
			pos += getopt_x_option_format(buf + pos, SOZ(bufsz,pos), state, NULL);
			pos += snprintf(buf + pos, SOZ(bufsz,pos), "is to suppress pid information\n");
			break;
		case 'c':
			pos += snprintf(buf + pos, SOZ(bufsz,pos), "from %i ('%c') to %i ('%c')\n",
					START_CHAR, START_CHAR, END_CHAR - 1, END_CHAR - 1);
			break;
		case 'o':
			pos += snprintf(buf + pos, SOZ(bufsz,pos), "path to redirect stdout, re-open file upon SIGUSR1\n");
			break;
		case 'e':
			pos += snprintf(buf + pos, SOZ(bufsz,pos), "path to redirect stderr\n");
			break;
		case 't':
			pos += snprintf(buf + pos, SOZ(bufsz,pos), "do not append to output file, but truncate\n");
			break;
		case 'd':
			pos += snprintf(buf + pos, SOZ(bufsz,pos), "run on background\n");
			break;
		case 'r':
		case 'h':
			pos += snprintf(buf + pos, SOZ(bufsz,pos), "\n");
			break;
		default:
			pos += snprintf(buf + pos, SOZ(bufsz,pos), "undocumented\n");
		}
		if (pos >= bufsz) {
			DEBUG("buffer too small");
			exit(1);
		}
	}
	pos += snprintf(buf + pos, SOZ(bufsz,pos), "\n");

	fputs(buf, stderr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1038, %rsp           # imm = 0x1038
movq %rsi, %rbx
movq %rdi, %rcx
leaq -0x104f(%rbp), %rdi
movw $0xa, -0x1(%rdi)
leaq 0x304c(%rip), %rdx      # 0x63b9
xorl %r13d, %r13d
movl $0xfff, %esi            # imm = 0xFFF
xorl %eax, %eax
callq 0x2110
movl $0xfff, %r14d           # imm = 0xFFF
movl %eax, %ecx
subl %r14d, %ecx
negl %ecx
cmpl %r14d, %eax
movslq %eax, %r15
leaq -0x104f(%rbp,%r15), %rdi
cmovgel %r13d, %ecx
movslq %ecx, %rsi
leaq 0x302f(%rip), %rdx      # 0x63d4
xorl %eax, %eax
callq 0x2110
leal (%r15,%rax), %r12d
addl %r15d, %eax
incl %eax
cltq
leaq (%rax,%rbp), %rdi
addq $-0x1050, %rdi          # imm = 0xEFB0
subl %r12d, %r14d
cmpl $0x1000, %eax           # imm = 0x1000
cmovgel %r13d, %r14d
movslq %r14d, %rsi
leaq 0x3198(%rip), %rdx      # 0x6570
xorl %eax, %eax
callq 0x2110
leal (%rax,%r12), %r14d
incl %r14d
leaq -0x50(%rbp), %r12
xorl %r13d, %r13d
movq %rbx, %rdi
movl %r13d, %esi
movq %r12, %rdx
callq 0x448e
movl %eax, %r13d
movslq %r14d, %rax
addq %rbp, %rax
addq $-0x1050, %rax          # imm = 0xEFB0
testl %r13d, %r13d
js 0x391c
movl $0x1000, %esi           # imm = 0x1000
subl %r14d, %esi
movq %rax, %rdi
movq %rbx, %rdx
movq %r12, %r15
movq %r12, %rcx
callq 0x4524
movl %eax, %r12d
addl %r14d, %r12d
movl -0x38(%rbp), %eax
addl $-0x61, %eax
cmpl $0x19, %eax
ja 0x38ad
leaq 0x2c24(%rip), %rcx      # 0x606c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leal -0x1000(%r12), %eax
negl %eax
cmpl $0x1000, %r12d          # imm = 0x1000
movslq %r12d, %rcx
leaq -0x1050(%rbp,%rcx), %rdi
movl $0x0, %ecx
cmovgel %ecx, %eax
movslq %eax, %rsi
leaq 0x30f1(%rip), %rdx      # 0x6570
jmp 0x38db
leal -0x1000(%r12), %eax
negl %eax
cmpl $0x1000, %r12d          # imm = 0x1000
movslq %r12d, %rcx
leaq -0x1050(%rbp,%rcx), %rdi
movl $0x0, %ecx
cmovgel %ecx, %eax
movslq %eax, %rsi
leaq 0x30c0(%rip), %rdx      # 0x6572
jmp 0x38db
leal -0x1000(%r12), %eax
negl %eax
cmpl $0x1000, %r12d          # imm = 0x1000
movslq %r12d, %rcx
leaq -0x1050(%rbp,%rcx), %rdi
movl $0x0, %ecx
cmovgel %ecx, %eax
movslq %eax, %rsi
leaq 0x2f2b(%rip), %rdx      # 0x6410
jmp 0x38db
leal -0x1000(%r12), %eax
negl %eax
cmpl $0x1000, %r12d          # imm = 0x1000
movslq %r12d, %rcx
leaq -0x1050(%rbp,%rcx), %rdi
movl $0x0, %ecx
cmovgel %ecx, %eax
movslq %eax, %rsi
leaq 0x2fd9(%rip), %rdx      # 0x64f1
jmp 0x38db
movl %r12d, %eax
movl $0x1000, %ecx           # imm = 0x1000
subl %ecx, %eax
negl %eax
cmpl %ecx, %r12d
movslq %r12d, %rcx
leaq -0x1050(%rbp,%rcx), %rdi
movl $0x0, %ecx
cmovgel %ecx, %eax
movslq %eax, %rsi
leaq 0x2fc4(%rip), %rdx      # 0x650d
xorl %eax, %eax
callq 0x2110
addl %r12d, %eax
movl %eax, %esi
movl $0x1000, %ecx           # imm = 0x1000
subl %ecx, %esi
negl %esi
cmpl %ecx, %eax
movl $0x1000, %r12d          # imm = 0x1000
movslq %eax, %r14
leaq -0x1050(%rbp,%r14), %rdi
movl $0x0, %eax
cmovgel %eax, %esi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x4524
addl %eax, %r14d
movl %r14d, %eax
subl %r12d, %eax
negl %eax
cmpl %r12d, %r14d
movslq %r14d, %r14
leaq -0x1050(%rbp,%r14), %rdi
movl $0x0, %ecx
cmovgel %ecx, %eax
movslq %eax, %rsi
leaq 0x2f87(%rip), %rdx      # 0x6535
jmp 0x3712
movl %r12d, %eax
movl $0x1000, %ecx           # imm = 0x1000
subl %ecx, %eax
negl %eax
cmpl %ecx, %r12d
movslq %r12d, %rcx
leaq -0x1050(%rbp,%rcx), %rdi
movl $0x0, %ecx
cmovgel %ecx, %eax
movslq %eax, %rsi
leaq 0x2ed3(%rip), %rdx      # 0x64b2
movl $0x5e, %ecx
xorl %eax, %eax
callq 0x2110
addl %r12d, %eax
movl %eax, %esi
movl $0x1000, %ecx           # imm = 0x1000
subl %ecx, %esi
negl %esi
cmpl %ecx, %eax
movl $0x1000, %r12d          # imm = 0x1000
movslq %eax, %r14
leaq -0x1050(%rbp,%r14), %rdi
movl $0x0, %eax
cmovgel %eax, %esi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x4524
addl %eax, %r14d
movl %r14d, %eax
subl %r12d, %eax
negl %eax
cmpl %r12d, %r14d
movslq %r14d, %r14
leaq -0x1050(%rbp,%r14), %rdi
movl $0x0, %ecx
cmovgel %ecx, %eax
movslq %eax, %rsi
leaq 0x2e95(%rip), %rdx      # 0x64de
jmp 0x3712
leal -0x1000(%r12), %eax
negl %eax
cmpl $0x1000, %r12d          # imm = 0x1000
movslq %r12d, %rcx
leaq -0x1050(%rbp,%rcx), %rdi
movl $0x0, %ecx
cmovgel %ecx, %eax
movslq %eax, %rsi
leaq 0x2f2a(%rip), %rdx      # 0x65a6
jmp 0x38db
movl %r12d, %eax
movl $0x1000, %ecx           # imm = 0x1000
subl %ecx, %eax
negl %eax
cmpl %ecx, %r12d
movslq %r12d, %rcx
leaq -0x1050(%rbp,%rcx), %rdi
movl $0x0, %ecx
cmovgel %ecx, %eax
movslq %eax, %rsi
leaq 0x2dc5(%rip), %rdx      # 0x6472
xorl %eax, %eax
callq 0x2110
addl %r12d, %eax
movl %eax, %esi
movl $0x1000, %ecx           # imm = 0x1000
subl %ecx, %esi
negl %esi
cmpl %ecx, %eax
movl $0x1000, %r12d          # imm = 0x1000
movslq %eax, %r14
leaq -0x1050(%rbp,%r14), %rdi
movl $0x0, %eax
cmovgel %eax, %esi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x4524
addl %eax, %r14d
movl %r14d, %eax
subl %r12d, %eax
negl %eax
cmpl %r12d, %r14d
movslq %r14d, %r14
leaq -0x1050(%rbp,%r14), %rdi
movl $0x0, %ecx
cmovgel %ecx, %eax
movslq %eax, %rsi
leaq 0x2d88(%rip), %rdx      # 0x649a
xorl %eax, %eax
callq 0x2110
jmp 0x38a8
leal -0x1000(%r12), %eax
negl %eax
cmpl $0x1000, %r12d          # imm = 0x1000
movslq %r12d, %rcx
leaq -0x1050(%rbp,%rcx), %rdi
movl $0x0, %ecx
cmovgel %ecx, %eax
movslq %eax, %rsi
leaq 0x2e73(%rip), %rdx      # 0x65bf
jmp 0x38db
leal -0x1000(%r12), %eax
negl %eax
cmpl $0x1000, %r12d          # imm = 0x1000
movslq %r12d, %rcx
leaq -0x1050(%rbp,%rcx), %rdi
movl $0x0, %ecx
cmovgel %ecx, %eax
movslq %eax, %rsi
leaq 0x2c61(%rip), %rdx      # 0x63e0
jmp 0x38db
leal -0x1000(%r12), %eax
negl %eax
cmpl $0x1000, %r12d          # imm = 0x1000
movslq %r12d, %rcx
leaq -0x1050(%rbp,%rcx), %rdi
movl $0x0, %ecx
cmovgel %ecx, %eax
movslq %eax, %rsi
leaq 0x2e39(%rip), %rdx      # 0x65eb
jmp 0x38db
leal -0x1000(%r12), %eax
negl %eax
cmpl $0x1000, %r12d          # imm = 0x1000
movslq %r12d, %rcx
leaq -0x1050(%rbp,%rcx), %rdi
movl $0x0, %ecx
cmovgel %ecx, %eax
movslq %eax, %rsi
movl $0x7e, (%rsp)
leaq 0x2d69(%rip), %rdx      # 0x6555
movl $0x21, %ecx
movl $0x21, %r8d
movl $0x7e, %r9d
xorl %eax, %eax
callq 0x2110
jmp 0x38e2
movl %r12d, %eax
movl $0x1000, %ecx           # imm = 0x1000
subl %ecx, %eax
negl %eax
cmpl %ecx, %r12d
movslq %r12d, %rcx
leaq -0x1050(%rbp,%rcx), %rdi
movl $0x0, %ecx
cmovgel %ecx, %eax
movslq %eax, %rsi
leaq 0x2c09(%rip), %rdx      # 0x643e
xorl %eax, %eax
callq 0x2110
addl %r12d, %eax
movl %eax, %esi
movl $0x1000, %ecx           # imm = 0x1000
subl %ecx, %esi
negl %esi
cmpl %ecx, %eax
movl $0x1000, %r12d          # imm = 0x1000
movslq %eax, %r14
leaq -0x1050(%rbp,%r14), %rdi
movl $0x0, %eax
cmovgel %eax, %esi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x4524
addl %eax, %r14d
movl %r14d, %eax
subl %r12d, %eax
negl %eax
cmpl %r12d, %r14d
movslq %r14d, %r14
leaq -0x1050(%rbp,%r14), %rdi
movl $0x0, %ecx
cmovgel %ecx, %eax
movslq %eax, %rsi
movq 0x59ce(%rip), %rcx      # 0x9268
leaq 0x2bc3(%rip), %rdx      # 0x6464
xorl %eax, %eax
callq 0x2110
addl %eax, %r14d
jmp 0x38e8
leal -0x1000(%r12), %eax
negl %eax
cmpl $0x1000, %r12d          # imm = 0x1000
movslq %r12d, %rcx
leaq -0x1050(%rbp,%rcx), %rdi
movl $0x0, %ecx
cmovgel %ecx, %eax
movslq %eax, %rsi
leaq 0x2d23(%rip), %rdx      # 0x65fe
xorl %eax, %eax
callq 0x2110
movl %eax, %r14d
addl %r12d, %r14d
cmpl $0x1000, %r14d          # imm = 0x1000
movq %r15, %r12
jl 0x33ed
leaq 0x27d5(%rip), %rdi      # 0x60d4
leaq 0x2d06(%rip), %rdx      # 0x660c
movl $0xdd, %esi
xorl %eax, %eax
callq 0x5224
movl $0x1, %edi
callq 0x2240
leaq -0x1050(%rbp), %rdx
leaq -0x50(%rbp), %rcx
movl %r14d, %edi
movq %rax, %rsi
callq 0x23b0
addq $0x1038, %rsp           # imm = 0x1038
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq