// File: /workspace/github_c_makefile_star2_O3/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, %r14d
movq %rdi, %r15
testl %esi, %esi
movl $0x0, %esi
cmovgl %r14d, %esi
leaq 0x25f9(%rip), %rdx      # 0x5a83
xorl %eax, %eax
callq 0x1110
movl %eax, %ebx
testq %r12, %r12
je 0x34e2
movslq 0x18(%r12), %r13
testq %r13, %r13
je 0x34e2
callq 0x1260
movq (%rax), %rax
testb $0x8, (%rax,%r13,2)
je 0x3613
movslq %ebx, %rbx
leaq (%r15,%rbx), %rdi
xorl %eax, %eax
movl %r14d, %ecx
subl %ebx, %ecx
cmovlel %eax, %ecx
movslq %ecx, %rsi
leaq 0x25ad(%rip), %rdx      # 0x5a7d
movl %r13d, %ecx
xorl %eax, %eax
callq 0x1110
movl %eax, %r13d
addl %ebx, %r13d
jmp 0x3515
movslq %ebx, %rdi
addq %r15, %rdi
movl %r14d, %eax
subl %ebx, %eax
movl $0x0, %ecx
cmovlel %ecx, %eax
movslq %eax, %rsi
leaq 0x2583(%rip), %rdx      # 0x5a82
xorl %eax, %eax
callq 0x1110
movl %eax, %r13d
addl %ebx, %r13d
testq %r12, %r12
je 0x35cd
movq (%r12), %rcx
testq %rcx, %rcx
je 0x35aa
cmpl $0x0, 0x8(%r12)
je 0x354a
leaq 0x2555(%rip), %rdx      # 0x5a86
leaq -0x130(%rbp), %rbx
movl $0x100, %esi            # imm = 0x100
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1110
movq %rbx, %rcx
movslq %r13d, %rax
addq %rax, %r15
xorl %edx, %edx
movl %r14d, %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 %r15, %rdi
xorl %eax, %eax
callq 0x1110
movl %eax, %r12d
addl %r13d, %r12d
cmpl %r14d, %r12d
jl 0x35fe
leaq 0x2362(%rip), %rdi      # 0x58f7
leaq 0x24f3(%rip), %rdx      # 0x5a8f
movl $0x1a6, %esi            # imm = 0x1A6
xorl %eax, %eax
callq 0x4228
jmp 0x35fe
xorl %eax, %eax
subl %r13d, %r14d
cmovlel %eax, %r14d
cmpl $0x0, 0x8(%r12)
leaq 0x1fb1(%rip), %rax      # 0x5571
leaq 0x24c2(%rip), %rcx      # 0x5a89
cmoveq %rax, %rcx
jmp 0x35dd
xorl %eax, %eax
subl %r13d, %r14d
cmovlel %eax, %r14d
leaq 0x1f94(%rip), %rcx      # 0x5571
movslq %r13d, %r12
addq %r12, %r15
movslq %r14d, %rsi
movq -0x30(%rbp), %rdx
addq $0x1dc, %rdx            # imm = 0x1DC
movq %r15, %rdi
xorl %eax, %eax
callq 0x1110
addl %eax, %r12d
movl %r12d, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2400(%rip), %rdi      # 0x5a1a
leaq 0x22d6(%rip), %rsi      # 0x58f7
leaq 0x2404(%rip), %rcx      # 0x5a2c
movl $0x18e, %edx            # imm = 0x18E
callq 0x1140