// File: /workspace/github_c_makefile_star2_O3/j-hoppe[P]tu58fs/getopt2.c
// Function: getopt_getoptionsyntax
static char *getopt_getoptionsyntax(getopt_option_descr_t *odesc, int style)
//	getopt_t *_this, getopt_option_descr_t *odesc)
{
	static char buffer[2 * GETOPT_MAX_LINELEN];
	unsigned i;
	char *s;

	// mount a single "-option arg arg [arg arg]"
	if (style == 0) {
		if (odesc->long_name)
			snprintf(buffer, sizeof(buffer), "--%s", odesc->long_name);
		else if (odesc->short_name)
			snprintf(buffer, sizeof(buffer), "-%s", odesc->short_name);
		else  buffer[0] = 0; // no option name: non-optopn commadnline arguments
	}
	else { // both names comma separated: "-short, --long"
		buffer[0] = 0;
		if (odesc->short_name) {
			strncat(buffer, "-", sizeof(buffer) - 1);
			strncat(buffer, odesc->short_name, sizeof(buffer) - 1);
		}
		// expand short name field for widthes name, so summary is aligned
		while (strlen(buffer) < 1+odesc->parent->max_short_name_len)
			strncat(buffer, " ", sizeof(buffer) - 1);

		if (odesc->long_name) {
			if (odesc->short_name)
				strncat(buffer, " | ", sizeof(buffer) - 1);
			strncat(buffer, "--", sizeof(buffer) - 1);
			strncat(buffer, odesc->long_name, sizeof(buffer) - 1);
		}
	}

	for (i = 0; (s = odesc->fix_args[i]); i++) {
		strncat(buffer, " <", sizeof(buffer) - 1);
		strncat(buffer, s, sizeof(buffer) - 1);
		strncat(buffer, ">", sizeof(buffer) - 1);
	}
	for (i = 0; (s = odesc->var_args[i]); i++) {
		strncat(buffer, " ", sizeof(buffer) - 1);
		if (i == 0) strncat(buffer, "[", sizeof(buffer) - 1);
		strncat(buffer, "<", sizeof(buffer) - 1);
		strncat(buffer, s, sizeof(buffer) - 1);
		strncat(buffer, ">", sizeof(buffer) - 1);
	}
	if (i > 0) strncat(buffer, "]", sizeof(buffer) - 1);

	return buffer;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testl %esi, %esi
je 0x60b6
movb $0x0, 0x17c5e(%rip)     # 0x1dc70
cmpq $0x0, 0x8(%rbx)
je 0x6040
leaq 0x17c50(%rip), %r14     # 0x1dc70
movq %r14, %rdi
callq 0x3190
movw $0x2d, (%rax,%r14)
movq 0x8(%rbx), %rsi
movl $0x1ff, %edx            # imm = 0x1FF
movq %r14, %rdi
callq 0x3250
leaq 0x17c29(%rip), %r14     # 0x1dc70
movq %r14, %rdi
callq 0x3190
movq (%rbx), %rcx
movl 0x340(%rcx), %ecx
incl %ecx
cmpq %rcx, %rax
jae 0x6070
movq %r14, %rdi
callq 0x3190
movw $0x20, (%rax,%r14)
jmp 0x6047
cmpq $0x0, 0x10(%rbx)
je 0x60f6
cmpq $0x0, 0x8(%rbx)
je 0x608e
movq %r14, %rdi
callq 0x3190
movl $0x207c20, (%rax,%r14)  # imm = 0x207C20
movq %r14, %rdi
callq 0x3190
movw $0x2d2d, (%rax,%r14)    # imm = 0x2D2D
movb $0x0, 0x2(%rax,%r14)
movq 0x10(%rbx), %rsi
movl $0x1ff, %edx            # imm = 0x1FF
movq %r14, %rdi
callq 0x3250
jmp 0x60f6
movq 0x10(%rbx), %rcx
testq %rcx, %rcx
je 0x60cf
leaq 0x17baa(%rip), %rdi     # 0x1dc70
leaq 0xe5fd(%rip), %rdx      # 0x146ca
jmp 0x60ea
movq 0x8(%rbx), %rcx
testq %rcx, %rcx
je 0x61ea
leaq 0x17b8d(%rip), %rdi     # 0x1dc70
leaq 0xe5e1(%rip), %rdx      # 0x146cb
movl $0x200, %esi            # imm = 0x200
xorl %eax, %eax
callq 0x31d0
movq 0x18(%rbx), %r15
testq %r15, %r15
je 0x614d
movl $0x1, %ebp
leaq 0x17b65(%rip), %r14     # 0x1dc70
movq %r14, %rdi
callq 0x3190
movw $0x3c20, (%rax,%r14)    # imm = 0x3C20
movb $0x0, 0x2(%rax,%r14)
movl $0x1ff, %edx            # imm = 0x1FF
movq %r14, %rdi
movq %r15, %rsi
callq 0x3250
movq %r14, %rdi
callq 0x3190
movw $0x3e, (%rax,%r14)
movl %ebp, %eax
movq 0x18(%rbx,%rax,8), %r15
incl %ebp
testq %r15, %r15
jne 0x610b
movq 0x340(%rbx), %r15
testq %r15, %r15
je 0x61df
movl $0x1, %ebp
leaq 0x17b07(%rip), %r14     # 0x1dc70
movq %r14, %rdi
callq 0x3190
movw $0x20, (%rax,%r14)
cmpl $0x1, %ebp
jne 0x618c
movq %r14, %rdi
callq 0x3190
movw $0x5b, (%rax,%r14)
movq %r14, %rdi
callq 0x3190
movw $0x3c, (%rax,%r14)
movl $0x1ff, %edx            # imm = 0x1FF
movq %r14, %rdi
movq %r15, %rsi
callq 0x3250
movq %r14, %rdi
callq 0x3190
movw $0x3e, (%rax,%r14)
movl %ebp, %eax
movq 0x340(%rbx,%rax,8), %r15
incl %ebp
testq %r15, %r15
jne 0x6169
cmpl $0x1, %ebp
je 0x61df
movq %r14, %rdi
callq 0x3190
movw $0x5d, (%rax,%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movb $0x0, 0x17a7f(%rip)     # 0x1dc70
jmp 0x60f6