// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x450, %rsp            # imm = 0x450
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
cmpl $0x100, -0x14(%rbp)     # imm = 0x100
jae 0x6dc8
jmp 0x6de7
leaq 0x1468e(%rip), %rdi     # 0x1b45d
leaq 0x14552(%rip), %rsi     # 0x1b328
movl $0x2e7, %edx            # imm = 0x2E7
leaq 0x14698(%rip), %rcx     # 0x1b47a
callq 0x3200
movb $0x0, -0x230(%rbp)
movb $0x0, -0x430(%rbp)
leaq -0x230(%rbp), %rdi
movq -0x20(%rbp), %rcx
movl $0x200, %esi            # imm = 0x200
leaq 0x146b7(%rip), %rdx     # 0x1b4c3
movb $0x0, %al
callq 0x31d0
movl $0x0, -0x24(%rbp)
movq -0x8(%rbp), %rax
movl -0x24(%rbp), %ecx
movq 0x10(%rax,%rcx,8), %rax
movq %rax, -0x438(%rbp)
cmpq $0x0, %rax
je 0x6eb2
leaq -0x430(%rbp), %rax
movq %rax, -0x440(%rbp)
movq -0x438(%rbp), %rdi
xorl %esi, %esi
callq 0x7000
movq -0x440(%rbp), %rdi
movq %rax, %rsi
movl $0x200, %edx            # imm = 0x200
callq 0x3090
leaq -0x230(%rbp), %rdi
leaq 0x168f3(%rip), %rsi     # 0x1d764
movl $0x1ff, %edx            # imm = 0x1FF
callq 0x3250
movq -0x10(%rbp), %rdi
leaq -0x230(%rbp), %rsi
leaq -0x430(%rbp), %rcx
movl -0x14(%rbp), %r9d
movl -0x18(%rbp), %eax
movl $0x200, %edx            # imm = 0x200
xorl %r8d, %r8d
movl %eax, (%rsp)
callq 0x72b0
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x6e1a
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x6f2f
leaq -0x430(%rbp), %rax
movq %rax, -0x448(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
xorl %esi, %esi
callq 0x7000
movq -0x448(%rbp), %rdi
movq %rax, %rsi
movl $0x200, %edx            # imm = 0x200
callq 0x3090
leaq -0x230(%rbp), %rdi
leaq 0x16868(%rip), %rsi     # 0x1d764
movl $0x1ff, %edx            # imm = 0x1FF
callq 0x3250
movq -0x10(%rbp), %rdi
leaq -0x230(%rbp), %rsi
leaq -0x430(%rbp), %rcx
movl -0x14(%rbp), %r9d
movl -0x18(%rbp), %eax
movl $0x200, %edx            # imm = 0x200
xorl %r8d, %r8d
movl %eax, (%rsp)
callq 0x72b0
movq -0x10(%rbp), %rdi
leaq -0x230(%rbp), %rdx
leaq 0x15d53(%rip), %rsi     # 0x1cc94
movb $0x0, %al
callq 0x3300
movq -0x10(%rbp), %rdi
leaq 0x15770(%rip), %rsi     # 0x1c6c3
movb $0x0, %al
callq 0x3300
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x6f7c
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
movl -0x18(%rbp), %ecx
callq 0x7380
movl $0x0, -0x24(%rbp)
movq -0x8(%rbp), %rax
movl -0x24(%rbp), %ecx
movq 0x10(%rax,%rcx,8), %rax
movq %rax, -0x438(%rbp)
cmpq $0x0, %rax
je 0x6fc2
movq -0x8(%rbp), %rax
movl -0x24(%rbp), %ecx
movq 0x10(%rax,%rcx,8), %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
movl -0x18(%rbp), %ecx
callq 0x7380
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x6f83
movq -0x8(%rbp), %rax
cmpl $0x0, (%rax)
je 0x6fdf
movq -0x10(%rbp), %rdi
leaq 0x144f1(%rip), %rsi     # 0x1b4c7
movb $0x0, %al
callq 0x3300
jmp 0x6ff1
movq -0x10(%rbp), %rdi
leaq 0x14502(%rip), %rsi     # 0x1b4ec
movb $0x0, %al
callq 0x3300
addq $0x450, %rsp            # imm = 0x450
popq %rbp
retq
nopw (%rax,%rax)