// File: /workspace/github_c_makefile_star2_O2/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 0x5dae(%rip), %rdx      # 0xa752
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 0x5d91(%rip), %rdx      # 0xa76d
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 0x5e23(%rip), %rdx      # 0xa832
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 0x8013
movl %eax, %r13d
movslq %r14d, %rax
leaq (%rax,%rbp), %rdi
addq $-0x1050, %rdi          # imm = 0xEFB0
testl %r13d, %r13d
js 0x4bfa
movl $0x1000, %esi           # imm = 0x1000
subl %r14d, %esi
movq %rbx, %rdx
movq %r15, %rcx
callq 0x80a4
movl %eax, %r12d
addl %r14d, %r12d
movl -0x38(%rbp), %ecx
addl $-0x63, %ecx
movslq %r12d, %rax
cmpl $0x10, %ecx
ja 0x4aaf
leaq 0x55ea(%rip), %rdx      # 0xa064
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
leal -0x1000(%rax), %ecx
negl %ecx
cmpl $0x1000, %eax           # imm = 0x1000
leaq -0x1050(%rbp,%rax), %rdi
movl $0x0, %eax
cmovgel %eax, %ecx
movslq %ecx, %rsi
leaq 0x5d88(%rip), %rdx      # 0xa832
jmp 0x4bbe
leal -0x1000(%rax), %ecx
negl %ecx
cmpl $0x1000, %eax           # imm = 0x1000
leaq -0x1050(%rbp,%rax), %rdi
movl $0x0, %eax
cmovgel %eax, %ecx
movslq %ecx, %rsi
leaq 0x5d5e(%rip), %rdx      # 0xa834
jmp 0x4bbe
leal -0x1000(%rax), %ecx
negl %ecx
cmpl $0x1000, %eax           # imm = 0x1000
leaq -0x1050(%rbp,%rax), %rdi
movl $0x0, %eax
cmovgel %eax, %ecx
movslq %ecx, %rsi
leaq 0x5c77(%rip), %rdx      # 0xa779
jmp 0x4bbe
leal -0x1000(%rax), %ecx
negl %ecx
cmpl $0x1000, %eax           # imm = 0x1000
leaq -0x1050(%rbp,%rax), %rdi
movl $0x0, %eax
cmovgel %eax, %ecx
movslq %ecx, %rsi
leaq 0x5c96(%rip), %rdx      # 0xa7c4
leaq 0xb8cb(%rip), %rcx      # 0x10400
jmp 0x4b65
leal -0x1000(%rax), %ecx
negl %ecx
cmpl $0x1000, %eax           # imm = 0x1000
leaq -0x1050(%rbp,%rax), %rdi
movl $0x0, %eax
cmovgel %eax, %ecx
movslq %ecx, %rsi
movq 0xb9a2(%rip), %rcx      # 0x10500
leaq 0x5c7d(%rip), %rdx      # 0xa7e2
xorl %eax, %eax
callq 0x2180
jmp 0x4bc5
leal -0x1000(%rax), %ecx
negl %ecx
cmpl $0x1000, %eax           # imm = 0x1000
leaq -0x1050(%rbp,%rax), %rdi
movl $0x0, %eax
cmovgel %eax, %ecx
movslq %ecx, %rsi
leaq 0x5c18(%rip), %rdx      # 0xa7ad
jmp 0x4bbe
leal -0x1000(%rax), %ecx
negl %ecx
cmpl $0x1000, %eax           # imm = 0x1000
leaq -0x1050(%rbp,%rax), %rdi
movl $0x0, %eax
cmovgel %eax, %ecx
movslq %ecx, %rsi
leaq 0x5c4d(%rip), %rdx      # 0xa80b
xorl %eax, %eax
callq 0x2180
movl %eax, %r14d
addl %r12d, %r14d
cmpl $0x1000, %r14d          # imm = 0x1000
jl 0x4a24
leaq 0x54dd(%rip), %rdi      # 0xa0bc
leaq 0x5c5c(%rip), %rdx      # 0xa842
movl $0x46f, %esi            # imm = 0x46F
xorl %eax, %eax
callq 0x8e04
pushq $0x1
popq %rdi
callq 0x2340
leal -0x1000(%r14), %eax
negl %eax
xorl %ecx, %ecx
cmpl $0x1000, %r14d          # imm = 0x1000
cmovgel %ecx, %eax
movslq %eax, %rsi
leaq 0x5c19(%rip), %rdx      # 0xa832
xorl %eax, %eax
callq 0x2180
movq 0xb3d1(%rip), %rax      # 0xfff8
movq (%rax), %rsi
leaq -0x1050(%rbp), %rdi
callq 0x21c0
addq $0x1028, %rsp           # imm = 0x1028
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq