// File: /workspace/github_c_makefile_star2_O1/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 0x252f(%rip), %rdx      # 0x6a86
xorl %eax, %eax
callq 0x2110
movl %eax, %ebx
testq %r12, %r12
je 0x45a9
movslq 0x18(%r12), %r13
testq %r13, %r13
je 0x45a9
callq 0x2270
movq (%rax), %rax
testb $0x8, (%rax,%r13,2)
je 0x46d6
movslq %ebx, %rax
leaq (%r14,%rax), %rdi
xorl %ecx, %ecx
movl %r15d, %edx
subl %eax, %edx
cmovlel %ecx, %edx
movslq %edx, %rsi
leaq 0x24e3(%rip), %rdx      # 0x6a80
movl %r13d, %ecx
xorl %eax, %eax
callq 0x2110
jmp 0x45cd
movslq %ebx, %rdi
addq %r14, %rdi
movl %r15d, %eax
subl %ebx, %eax
movl $0x0, %ecx
cmovlel %ecx, %eax
movslq %eax, %rsi
leaq 0x24bf(%rip), %rdx      # 0x6a85
xorl %eax, %eax
callq 0x2110
movl %eax, %r13d
addl %ebx, %r13d
testq %r12, %r12
je 0x4670
movq (%r12), %rcx
testq %rcx, %rcx
je 0x4670
cmpl $0x0, 0x8(%r12)
je 0x4611
leaq 0x2491(%rip), %rdx      # 0x6a89
leaq -0x130(%rbp), %rbx
movl $0x100, %esi            # imm = 0x100
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2110
movq %rbx, %rcx
movslq %r13d, %rax
addq %rax, %r14
xorl %edx, %edx
movl %r15d, %esi
subl %eax, %esi
cmovlel %edx, %esi
movq -0x30(%rbp), %rdx
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 0x2110
movl %eax, %ebx
addl %r13d, %ebx
cmpl %r15d, %ebx
jl 0x46c2
leaq 0x229f(%rip), %rdi      # 0x68fa
leaq 0x2430(%rip), %rdx      # 0x6a92
movl $0x1a6, %esi            # imm = 0x1A6
xorl %eax, %eax
callq 0x5224
jmp 0x46c2
movslq %r13d, %rax
addq %rax, %r14
xorl %eax, %eax
subl %r13d, %r15d
cmovlel %eax, %r15d
movq -0x30(%rbp), %rdx
addq $0x1dc, %rdx            # imm = 0x1DC
movslq %r15d, %rsi
testq %r12, %r12
je 0x46ac
cmpl $0x0, 0x8(%r12)
leaq 0x1ed2(%rip), %rax      # 0x6571
leaq 0x23e6(%rip), %rcx      # 0x6a8c
cmoveq %rax, %rcx
jmp 0x46b3
leaq 0x1ebe(%rip), %rcx      # 0x6571
movq %r14, %rdi
xorl %eax, %eax
callq 0x2110
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 0x2340(%rip), %rdi      # 0x6a1d
leaq 0x2216(%rip), %rsi      # 0x68fa
leaq 0x2344(%rip), %rcx      # 0x6a2f
movl $0x18e, %edx            # imm = 0x18E
callq 0x2140