// File: /workspace/github_c_makefile_star2_O1/j-hoppe[P]tu58fs/getopt2.c
// Function: getopt_help
void getopt_help(getopt_t *_this, FILE *stream, unsigned linelen, unsigned indent, char *commandname)
{
	unsigned i;
	char linebuff[2 * GETOPT_MAX_LINELEN];
	char phrase[2 * GETOPT_MAX_LINELEN];
	getopt_option_descr_t *odesc;
	assert(linelen < GETOPT_MAX_LINELEN);

	// 1. print commandline summary
	linebuff[0] = 0;
	phrase[0] = 0;
	// 1.1. print options
	//fprintf(stream, "Command line summary:\n");
	snprintf(linebuff, sizeof(linebuff), "%s ", commandname);
	for (i = 0; (odesc = _this->option_descrs[i]); i++) {
		// mount a single "-option arg arg [arg arg]"
		strncpy(phrase, getopt_getoptionsyntax(odesc, 0), sizeof(phrase));
		strncat(linebuff, " ", sizeof(linebuff)-1);
		output_append(stream, linebuff, sizeof(linebuff), phrase, /*linebreak*/0, linelen, indent);
	}
	// 1.2. print non-option cline arguments
	if (_this->nonoption_descr) {
		strncpy(phrase, getopt_getoptionsyntax(_this->nonoption_descr, 0), sizeof(phrase));
		strncat(linebuff, " ", sizeof(linebuff)-1);
		output_append(stream, linebuff, sizeof(linebuff), phrase, /*linebreak*/0, linelen, indent);
	}

	fprintf(stream, "%s\n", linebuff);

	// 2. print option info
	fprintf(stream, "\n");
	// fprintf(stream, "Command line options:\n");

	// first: nonoption arguments
	if (_this->nonoption_descr)
		getopt_help_option_intern(_this->nonoption_descr, stream, linelen, indent);
	// now options
	for (i = 0; (odesc = _this->option_descrs[i]); i++)
		getopt_help_option_intern(_this->option_descrs[i], stream, linelen, indent);

	if (_this->ignore_case)
		fprintf(stream, "\nOption names are case insensitive.\n");
	else
		fprintf(stream, "\nOption names are case sensitive.\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x418, %rsp            # imm = 0x418
movl %ecx, 0xc(%rsp)
cmpl $0x100, %edx            # imm = 0x100
jae 0x6055
movq %rsi, %rbp
movq %rdi, %r15
movl %edx, %r14d
xorl %eax, %eax
leaq 0x10(%rsp), %rdi
movb %al, (%rdi)
movb %al, 0x210(%rsp)
leaq 0xe602(%rip), %rdx      # 0x144dd
movl $0x200, %esi            # imm = 0x200
movq %r8, %rcx
xorl %eax, %eax
callq 0x31e0
movq 0x10(%r15), %rdi
testq %rdi, %rdi
je 0x5f55
movl $0x1, %ebx
leaq 0x210(%rsp), %r13
leaq 0x10(%rsp), %r12
xorl %esi, %esi
callq 0x6074
movl $0x200, %edx            # imm = 0x200
movq %r13, %rdi
leaq 0x17d65(%rip), %rsi     # 0x1dc80
callq 0x30a0
movq %r12, %rdi
callq 0x31a0
movw $0x20, 0x10(%rsp,%rax)
movq %rbp, %rdi
movq %r12, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
movl %r14d, %r8d
movl 0xc(%rsp), %r9d
callq 0x6271
movl %ebx, %eax
movq 0x10(%r15,%rax,8), %rdi
incl %ebx
testq %rdi, %rdi
jne 0x5f05
movq 0x8(%r15), %rdi
testq %rdi, %rdi
je 0x5fad
xorl %esi, %esi
callq 0x6074
leaq 0x17d14(%rip), %rsi     # 0x1dc80
leaq 0x210(%rsp), %r12
movl $0x200, %edx            # imm = 0x200
movq %r12, %rdi
callq 0x30a0
leaq 0x10(%rsp), %r13
movq %r13, %rdi
callq 0x31a0
movw $0x20, 0x10(%rsp,%rax)
movq %rbp, %rdi
movq %r13, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
movl %r14d, %r8d
movl 0xc(%rsp), %r9d
callq 0x6271
leaq 0xfd92(%rip), %rsi      # 0x15d46
leaq 0x10(%rsp), %rdx
movq %rbp, %rdi
xorl %eax, %eax
callq 0x3320
movl $0xa, %edi
movq %rbp, %rsi
callq 0x32a0
movq 0x8(%r15), %rdi
testq %rdi, %rdi
movq %rbp, %r12
movl 0xc(%rsp), %ebp
je 0x5fed
movq %r12, %rsi
movl %r14d, %edx
movl %ebp, %ecx
callq 0x630f
movq 0x10(%r15), %rdi
testq %rdi, %rdi
je 0x6016
movl $0x1, %ebx
movq %r12, %rsi
movl %r14d, %edx
movl %ebp, %ecx
callq 0x630f
movl %ebx, %eax
movq 0x10(%r15,%rax,8), %rdi
incl %ebx
testq %rdi, %rdi
jne 0x5ffb
cmpl $0x0, (%r15)
je 0x602a
leaq 0xe4be(%rip), %rdi      # 0x144e1
movl $0x24, %esi
jmp 0x6036
leaq 0xe4d5(%rip), %rdi      # 0x14506
movl $0x22, %esi
movl $0x1, %edx
movq %r12, %rcx
callq 0x3560
addq $0x418, %rsp            # imm = 0x418
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xe41b(%rip), %rdi      # 0x14477
leaq 0xe2df(%rip), %rsi      # 0x14342
leaq 0xe42a(%rip), %rcx      # 0x14494
movl $0x2e7, %edx            # imm = 0x2E7
callq 0x3210