// File: /workspace/github_c_makefile_star2_O1/alexgirao[P]aimant/aimant.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 'p': pos += snprintf(buf + pos, SOZ(bufsz,pos), "pid file to send signal (USR1) to reopen log files\n"); break;
		case 'l': pos += snprintf(buf + pos, SOZ(bufsz,pos), "log file to feed sink\n"); break;
		case 's': pos += snprintf(buf + pos, SOZ(bufsz,pos), "svlogd path, default is \"%s\"\n", args->svlogd_path); break;
		case 'c': pos += snprintf(buf + pos, SOZ(bufsz,pos), "count to rotate (bytes), default is %li\n", args->count_to_rotate); break;
		case 'o': pos += snprintf(buf + pos, SOZ(bufsz,pos), "svlogd output directory, default is \".\"\n"); break;
		case 'e':
		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 $0x1028, %rsp           # imm = 0x1028
movq %rsi, %rbx
movq %rdi, %rcx
leaq -0x104f(%rbp), %rdi
movw $0xa, -0x1(%rdi)
leaq 0x6286(%rip), %rdx      # 0xb752
xorl %r13d, %r13d
movl $0xfff, %esi            # imm = 0xFFF
xorl %eax, %eax
callq 0x2180
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 0x6269(%rip), %rdx      # 0xb76d
xorl %eax, %eax
callq 0x2180
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 0x62fb(%rip), %rdx      # 0xb832
xorl %eax, %eax
callq 0x2180
leal (%rax,%r12), %r14d
incl %r14d
leaq -0x50(%rbp), %r15
xorl %r13d, %r13d
movq %rbx, %rdi
movl %r13d, %esi
movq %r15, %rdx
callq 0x8c96
movl %eax, %r13d
movslq %r14d, %rax
addq %rbp, %rax
addq $-0x1050, %rax          # imm = 0xEFB0
testl %r13d, %r13d
js 0x5753
movl $0x1000, %esi           # imm = 0x1000
subl %r14d, %esi
movq %rax, %rdi
movq %rbx, %rdx
movq %r15, %rcx
callq 0x8d2c
movl %eax, %r12d
addl %r14d, %r12d
movl -0x38(%rbp), %eax
addl $-0x63, %eax
cmpl $0x10, %eax
ja 0x55dc
leaq 0x5ac4(%rip), %rcx      # 0xb064
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 0x625b(%rip), %rdx      # 0xb832
jmp 0x5715
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 0x622a(%rip), %rdx      # 0xb834
jmp 0x5715
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 0x613c(%rip), %rdx      # 0xb779
jmp 0x5715
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 0x6154(%rip), %rdx      # 0xb7c4
leaq 0xbd89(%rip), %rcx      # 0x11400
jmp 0x56ae
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
movq 0xbe59(%rip), %rcx      # 0x11500
leaq 0x6134(%rip), %rdx      # 0xb7e2
xorl %eax, %eax
callq 0x2180
jmp 0x571c
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 0x60c8(%rip), %rdx      # 0xb7ad
jmp 0x5715
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 0x60f6(%rip), %rdx      # 0xb80b
xorl %eax, %eax
callq 0x2180
movl %eax, %r14d
addl %r12d, %r14d
cmpl $0x1000, %r14d          # imm = 0x1000
jl 0x554c
leaq 0x5986(%rip), %rdi      # 0xb0bc
leaq 0x6105(%rip), %rdx      # 0xb842
movl $0x46f, %esi            # imm = 0x46F
xorl %eax, %eax
callq 0x9a2c
movl $0x1, %edi
callq 0x2350
leaq -0x1050(%rbp), %rdx
leaq -0x50(%rbp), %rcx
movl %r14d, %edi
movq %rax, %rsi
callq 0x2959
addq $0x1028, %rsp           # imm = 0x1028
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq