// File: /workspace/github_c_makefile_star2_O3/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 0x5fda
movq %rsi, %rbp
movq %rdi, %r15
movl %edx, %r14d
xorl %eax, %eax
leaq 0x10(%rsp), %rdi
movb %al, (%rdi)
movb %al, 0x210(%rsp)
leaq 0xe67d(%rip), %rdx      # 0x144dd
movl $0x200, %esi            # imm = 0x200
movq %r8, %rcx
xorl %eax, %eax
callq 0x31d0
movq 0x10(%r15), %rdi
testq %rdi, %rdi
je 0x5eda
movl $0x1, %ebx
leaq 0x210(%rsp), %r13
leaq 0x10(%rsp), %r12
xorl %esi, %esi
callq 0x5ff9
movl $0x200, %edx            # imm = 0x200
movq %r13, %rdi
leaq 0x17dd0(%rip), %rsi     # 0x1dc70
callq 0x30a0
movq %r12, %rdi
callq 0x3190
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 0x61f6
movl %ebx, %eax
movq 0x10(%r15,%rax,8), %rdi
incl %ebx
testq %rdi, %rdi
jne 0x5e8a
movq 0x8(%r15), %rdi
testq %rdi, %rdi
je 0x5f32
xorl %esi, %esi
callq 0x5ff9
leaq 0x17d7f(%rip), %rsi     # 0x1dc70
leaq 0x210(%rsp), %r12
movl $0x200, %edx            # imm = 0x200
movq %r12, %rdi
callq 0x30a0
leaq 0x10(%rsp), %r13
movq %r13, %rdi
callq 0x3190
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 0x61f6
leaq 0xfea5(%rip), %rsi      # 0x15dde
leaq 0x10(%rsp), %rdx
movq %rbp, %rdi
xorl %eax, %eax
callq 0x3310
movl $0xa, %edi
movq %rbp, %rsi
callq 0x3290
movq 0x8(%r15), %rdi
testq %rdi, %rdi
movq %rbp, %r12
movl 0xc(%rsp), %ebp
je 0x5f72
movq %r12, %rsi
movl %r14d, %edx
movl %ebp, %ecx
callq 0x6294
movq 0x10(%r15), %rdi
testq %rdi, %rdi
je 0x5f9b
movl $0x1, %ebx
movq %r12, %rsi
movl %r14d, %edx
movl %ebp, %ecx
callq 0x6294
movl %ebx, %eax
movq 0x10(%r15,%rax,8), %rdi
incl %ebx
testq %rdi, %rdi
jne 0x5f80
cmpl $0x0, (%r15)
je 0x5faf
leaq 0xe539(%rip), %rdi      # 0x144e1
movl $0x24, %esi
jmp 0x5fbb
leaq 0xe550(%rip), %rdi      # 0x14506
movl $0x22, %esi
movl $0x1, %edx
movq %r12, %rcx
callq 0x3550
addq $0x418, %rsp            # imm = 0x418
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xe496(%rip), %rdi      # 0x14477
leaq 0xe35a(%rip), %rsi      # 0x14342
leaq 0xe4a5(%rip), %rcx      # 0x14494
movl $0x2e7, %edx            # imm = 0x2E7
callq 0x3200