// File: /workspace/github_c_makefile_star2_O2/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 0x5d00
movl %edx, %r14d
movq %rsi, %rbp
movq %rdi, %r15
xorl %ebx, %ebx
leaq 0x10(%rsp), %r12
movb %bl, (%r12)
leaq 0x210(%rsp), %r13
movb %bl, (%r13)
leaq 0xd93d(%rip), %rdx      # 0x134ef
movl $0x200, %esi            # imm = 0x200
movq %r12, %rdi
movq %r8, %rcx
xorl %eax, %eax
callq 0x31d0
movl %ebx, %eax
movq 0x10(%r15,%rax,8), %rdi
testq %rdi, %rdi
je 0x5c16
xorl %esi, %esi
callq 0x5d1f
movl $0x200, %edx            # imm = 0x200
movq %r13, %rdi
leaq 0x1808a(%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 0x5ef8
incl %ebx
jmp 0x5bc4
movq 0x8(%r15), %rdi
testq %rdi, %rdi
je 0x5c6e
xorl %esi, %esi
callq 0x5d1f
leaq 0x18043(%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 0x5ef8
leaq 0xf11c(%rip), %rsi      # 0x14d91
xorl %ebx, %ebx
leaq 0x10(%rsp), %rdx
movq %rbp, %rdi
xorl %eax, %eax
callq 0x3310
pushq $0xa
popq %rdi
movq %rbp, %rsi
callq 0x3290
movq 0x8(%r15), %rdi
testq %rdi, %rdi
je 0x5cbc
movq %rbp, %rsi
movl %r14d, %edx
movl 0xc(%rsp), %ecx
callq 0x5f91
jmp 0x5cbc
movq %rbp, %rsi
movl %r14d, %edx
movl 0xc(%rsp), %ecx
callq 0x5f91
incl %ebx
movl %ebx, %eax
movq 0x10(%r15,%rax,8), %rdi
testq %rdi, %rdi
jne 0x5cab
cmpl $0x0, (%r15)
je 0x5cd9
leaq 0xd81e(%rip), %rdi      # 0x134f3
pushq $0x24
jmp 0x5ce2
leaq 0xd838(%rip), %rdi      # 0x13518
pushq $0x22
popq %rsi
pushq $0x1
popq %rdx
movq %rbp, %rcx
callq 0x3550
addq $0x418, %rsp            # imm = 0x418
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xd782(%rip), %rdi      # 0x13489
leaq 0xd646(%rip), %rsi      # 0x13354
leaq 0xd791(%rip), %rcx      # 0x134a6
movl $0x2e7, %edx            # imm = 0x2E7
callq 0x3200