// File: /workspace/github_c_makefile_star2_O2/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 0x5ddc
movb $0x0, 0x17f38(%rip)     # 0x1dc70
cmpq $0x0, 0x8(%rbx)
je 0x5d66
leaq 0x17f2a(%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 0x17f03(%rip), %r14     # 0x1dc70
movq %r14, %rdi
callq 0x3190
movq (%rbx), %rcx
movl 0x340(%rcx), %ecx
incl %ecx
cmpq %rcx, %rax
jae 0x5d96
movq %r14, %rdi
callq 0x3190
movw $0x20, (%rax,%r14)
jmp 0x5d6d
cmpq $0x0, 0x10(%rbx)
je 0x5e1c
cmpq $0x0, 0x8(%rbx)
je 0x5db4
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 0x5e1c
movq 0x10(%rbx), %rcx
testq %rcx, %rcx
je 0x5df5
leaq 0x17e84(%rip), %rdi     # 0x1dc70
leaq 0xd8e9(%rip), %rdx      # 0x136dc
jmp 0x5e10
movq 0x8(%rbx), %rcx
testq %rcx, %rcx
je 0x5eec
leaq 0x17e67(%rip), %rdi     # 0x1dc70
leaq 0xd8cd(%rip), %rdx      # 0x136dd
movl $0x200, %esi            # imm = 0x200
xorl %eax, %eax
callq 0x31d0
xorl %ebp, %ebp
leaq 0x17e4b(%rip), %r14     # 0x1dc70
movl %ebp, %eax
movq 0x18(%rbx,%rax,8), %r15
testq %r15, %r15
je 0x5e69
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)
incl %ebp
jmp 0x5e25
xorl %ebp, %ebp
movl %ebp, %eax
movq 0x340(%rbx,%rax,8), %r15
testq %r15, %r15
je 0x5ece
movq %r14, %rdi
callq 0x3190
movw $0x20, (%rax,%r14)
testl %ebp, %ebp
jne 0x5e9c
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)
incl %ebp
jmp 0x5e6b
testl %ebp, %ebp
je 0x5ee1
movq %r14, %rdi
callq 0x3190
movw $0x5d, (%rax,%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movb $0x0, 0x17d7d(%rip)     # 0x1dc70
jmp 0x5e1c