// File: /workspace/github_c_makefile_star2_O2/alexgirao[P]aimant/getopt_x.c
// Function: getopt_x_option_format
int getopt_x_option_format(char *buf, int bufsz, struct getopt_x *state, struct option *opt)
{
	int pos = 0;
	pos += snprintf(buf + pos, SOZ(bufsz,pos), "  ");
	if (opt && opt->val) {
		assert(isalnum(opt->val));
		pos += snprintf(buf + pos, SOZ(bufsz,pos), " -%c", opt->val);
	} else {
		pos += snprintf(buf + pos, SOZ(bufsz,pos), "   ");
	}
	if (opt && opt->name) {
		char tmp[256];
		const char *p;
		if (opt->has_arg) {
			snprintf(tmp, sizeof(tmp), "%s <arg>", opt->name ? opt->name : "");
			p = tmp;
		} else {
			p = opt->name;
		}
		if (opt->val) {
			pos += snprintf(buf + pos, SOZ(bufsz,pos), state->fmt_both, p);
		} else {
			pos += snprintf(buf + pos, SOZ(bufsz,pos), state->fmt_long, p);
		}
		if (pos >= bufsz) {
			/* we can't signalize as error since
			 * getopt_x_option_format follows the same
			 * snprintf semantics
			 */
			DEBUG("warning: buffer truncated");
		}
	} else {
		pos += snprintf(buf + pos, SOZ(bufsz,pos), state->fmt_short, opt && opt->has_arg ? "<arg>" : "");
	}
	return pos;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rcx, %r12
movq %rdx, -0x30(%rbp)
movl %esi, %r15d
movq %rdi, %r14
testl %esi, %esi
movl $0x0, %esi
cmovgl %r15d, %esi
leaq 0x2780(%rip), %rdx      # 0x5a83
xorl %eax, %eax
callq 0x1110
movl %eax, %ebx
testq %r12, %r12
je 0x335f
movslq 0x18(%r12), %r13
testq %r13, %r13
je 0x335f
callq 0x1260
movq (%rax), %rax
testb $0x8, (%rax,%r13,2)
je 0x348d
movslq %ebx, %rbx
leaq (%r14,%rbx), %rdi
xorl %eax, %eax
movl %r15d, %ecx
subl %ebx, %ecx
cmovlel %eax, %ecx
movslq %ecx, %rsi
leaq 0x2734(%rip), %rdx      # 0x5a7d
movl %r13d, %ecx
xorl %eax, %eax
callq 0x1110
movl %eax, %r13d
addl %ebx, %r13d
movq -0x30(%rbp), %rdx
jmp 0x3396
movslq %ebx, %rdi
addq %r14, %rdi
movl %r15d, %eax
subl %ebx, %eax
movl $0x0, %ecx
cmovlel %ecx, %eax
movslq %eax, %rsi
leaq 0x2706(%rip), %rdx      # 0x5a82
xorl %eax, %eax
callq 0x1110
movl %eax, %r13d
addl %ebx, %r13d
testq %r12, %r12
movq -0x30(%rbp), %rdx
je 0x342b
movq (%r12), %rcx
testq %rcx, %rcx
je 0x342b
cmpl $0x0, 0x8(%r12)
je 0x33cf
leaq 0x26d4(%rip), %rdx      # 0x5a86
leaq -0x130(%rbp), %rbx
movl $0x100, %esi            # imm = 0x100
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1110
movq -0x30(%rbp), %rdx
movq %rbx, %rcx
movslq %r13d, %r13
addq %r13, %r14
xorl %eax, %eax
movl %r15d, %esi
subl %r13d, %esi
cmovlel %eax, %esi
leaq 0x1b4(%rdx), %rax
addq $0x18c, %rdx            # imm = 0x18C
cmpl $0x0, 0x18(%r12)
movslq %esi, %rsi
cmovneq %rax, %rdx
movq %r14, %rdi
xorl %eax, %eax
callq 0x1110
movl %eax, %ebx
addl %r13d, %ebx
cmpl %r15d, %ebx
jl 0x3479
leaq 0x24e1(%rip), %rdi      # 0x58f7
leaq 0x2672(%rip), %rdx      # 0x5a8f
movl $0x1a6, %esi            # imm = 0x1A6
xorl %eax, %eax
callq 0x4030
jmp 0x3479
movslq %r13d, %rax
addq %rax, %r14
xorl %ecx, %ecx
subl %eax, %r15d
cmovlel %ecx, %r15d
addq $0x1dc, %rdx            # imm = 0x1DC
movslq %r15d, %rsi
testq %r12, %r12
je 0x3463
cmpl $0x0, 0x8(%r12)
leaq 0x211b(%rip), %rax      # 0x5571
leaq 0x262c(%rip), %rcx      # 0x5a89
cmoveq %rax, %rcx
jmp 0x346a
leaq 0x2107(%rip), %rcx      # 0x5571
movq %r14, %rdi
xorl %eax, %eax
callq 0x1110
movl %eax, %ebx
addl %r13d, %ebx
movl %ebx, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2586(%rip), %rdi      # 0x5a1a
leaq 0x245c(%rip), %rsi      # 0x58f7
leaq 0x258a(%rip), %rcx      # 0x5a2c
movl $0x18e, %edx            # imm = 0x18E
callq 0x1140