// File: /workspace/github_c_makefile_star2_O1/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 0x6131
movb $0x0, 0x17bf3(%rip)     # 0x1dc80
cmpq $0x0, 0x8(%rbx)
je 0x60bb
leaq 0x17be5(%rip), %r14     # 0x1dc80
movq %r14, %rdi
callq 0x31a0
movw $0x2d, (%rax,%r14)
movq 0x8(%rbx), %rsi
movl $0x1ff, %edx            # imm = 0x1FF
movq %r14, %rdi
callq 0x3260
leaq 0x17bbe(%rip), %r14     # 0x1dc80
movq %r14, %rdi
callq 0x31a0
movq (%rbx), %rcx
movl 0x340(%rcx), %ecx
incl %ecx
cmpq %rcx, %rax
jae 0x60eb
movq %r14, %rdi
callq 0x31a0
movw $0x20, (%rax,%r14)
jmp 0x60c2
cmpq $0x0, 0x10(%rbx)
je 0x6171
cmpq $0x0, 0x8(%rbx)
je 0x6109
movq %r14, %rdi
callq 0x31a0
movl $0x207c20, (%rax,%r14)  # imm = 0x207C20
movq %r14, %rdi
callq 0x31a0
movw $0x2d2d, (%rax,%r14)    # imm = 0x2D2D
movb $0x0, 0x2(%rax,%r14)
movq 0x10(%rbx), %rsi
movl $0x1ff, %edx            # imm = 0x1FF
movq %r14, %rdi
callq 0x3260
jmp 0x6171
movq 0x10(%rbx), %rcx
testq %rcx, %rcx
je 0x614a
leaq 0x17b3f(%rip), %rdi     # 0x1dc80
leaq 0xe582(%rip), %rdx      # 0x146ca
jmp 0x6165
movq 0x8(%rbx), %rcx
testq %rcx, %rcx
je 0x6265
leaq 0x17b22(%rip), %rdi     # 0x1dc80
leaq 0xe566(%rip), %rdx      # 0x146cb
movl $0x200, %esi            # imm = 0x200
xorl %eax, %eax
callq 0x31e0
movq 0x18(%rbx), %r15
testq %r15, %r15
je 0x61c8
movl $0x1, %ebp
leaq 0x17afa(%rip), %r14     # 0x1dc80
movq %r14, %rdi
callq 0x31a0
movw $0x3c20, (%rax,%r14)    # imm = 0x3C20
movb $0x0, 0x2(%rax,%r14)
movl $0x1ff, %edx            # imm = 0x1FF
movq %r14, %rdi
movq %r15, %rsi
callq 0x3260
movq %r14, %rdi
callq 0x31a0
movw $0x3e, (%rax,%r14)
movl %ebp, %eax
movq 0x18(%rbx,%rax,8), %r15
incl %ebp
testq %r15, %r15
jne 0x6186
movq 0x340(%rbx), %r15
testq %r15, %r15
je 0x625a
movl $0x1, %ebp
leaq 0x17a9c(%rip), %r14     # 0x1dc80
movq %r14, %rdi
callq 0x31a0
movw $0x20, (%rax,%r14)
cmpl $0x1, %ebp
jne 0x6207
movq %r14, %rdi
callq 0x31a0
movw $0x5b, (%rax,%r14)
movq %r14, %rdi
callq 0x31a0
movw $0x3c, (%rax,%r14)
movl $0x1ff, %edx            # imm = 0x1FF
movq %r14, %rdi
movq %r15, %rsi
callq 0x3260
movq %r14, %rdi
callq 0x31a0
movw $0x3e, (%rax,%r14)
movl %ebp, %eax
movq 0x340(%rbx,%rax,8), %r15
incl %ebp
testq %r15, %r15
jne 0x61e4
cmpl $0x1, %ebp
je 0x625a
movq %r14, %rdi
callq 0x31a0
movw $0x5d, (%rax,%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movb $0x0, 0x17a14(%rip)     # 0x1dc80
jmp 0x6171