// File: /workspace/github_c_makefile_star2_O0/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
subq $0x1c0, %rsp            # imm = 0x1C0
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x140(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x24(%rbp), %eax
jle 0x5c49
movl -0xc(%rbp), %eax
subl -0x24(%rbp), %eax
movl %eax, -0x144(%rbp)
jmp 0x5c53
xorl %eax, %eax
movl %eax, -0x144(%rbp)
jmp 0x5c53
movq -0x140(%rbp), %rdi
movl -0x144(%rbp), %eax
movslq %eax, %rsi
leaq 0x2fbc(%rip), %rdx      # 0x8c26
movb $0x0, %al
callq 0x2110
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x5d2c
movq -0x20(%rbp), %rax
cmpl $0x0, 0x18(%rax)
je 0x5d2c
callq 0x2270
movq (%rax), %rax
movq -0x20(%rbp), %rcx
movslq 0x18(%rcx), %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x5cae
jmp 0x5ccd
leaq 0x2f08(%rip), %rdi      # 0x8bbd
leaq 0x2dde(%rip), %rsi      # 0x8a9a
movl $0x18e, %edx            # imm = 0x18E
leaq 0x2f07(%rip), %rcx      # 0x8bcf
callq 0x2140
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x150(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x24(%rbp), %eax
jle 0x5cf5
movl -0xc(%rbp), %eax
subl -0x24(%rbp), %eax
movl %eax, -0x154(%rbp)
jmp 0x5cff
xorl %eax, %eax
movl %eax, -0x154(%rbp)
jmp 0x5cff
movq -0x150(%rbp), %rdi
movl -0x154(%rbp), %eax
movslq %eax, %rsi
movq -0x20(%rbp), %rax
movl 0x18(%rax), %ecx
leaq 0x2f03(%rip), %rdx      # 0x8c20
movb $0x0, %al
callq 0x2110
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0x5d82
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x160(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x24(%rbp), %eax
jle 0x5d54
movl -0xc(%rbp), %eax
subl -0x24(%rbp), %eax
movl %eax, -0x164(%rbp)
jmp 0x5d5e
xorl %eax, %eax
movl %eax, -0x164(%rbp)
jmp 0x5d5e
movq -0x160(%rbp), %rdi
movl -0x164(%rbp), %eax
movslq %eax, %rsi
leaq 0x2eb0(%rip), %rdx      # 0x8c25
movb $0x0, %al
callq 0x2110
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x5f15
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
je 0x5f15
movq -0x20(%rbp), %rax
cmpl $0x0, 0x8(%rax)
je 0x5e0e
leaq -0x130(%rbp), %rax
movq %rax, -0x170(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
je 0x5dcd
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x178(%rbp)
jmp 0x5ddd
leaq 0x292d(%rip), %rax      # 0x8701
movq %rax, -0x178(%rbp)
jmp 0x5ddd
movq -0x170(%rbp), %rdi
movq -0x178(%rbp), %rcx
movl $0x100, %esi            # imm = 0x100
leaq 0x2e32(%rip), %rdx      # 0x8c29
movb $0x0, %al
callq 0x2110
leaq -0x130(%rbp), %rax
movq %rax, -0x138(%rbp)
jmp 0x5e1c
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x138(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x0, 0x18(%rax)
je 0x5e89
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x180(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x24(%rbp), %eax
jle 0x5e4e
movl -0xc(%rbp), %eax
subl -0x24(%rbp), %eax
movl %eax, -0x184(%rbp)
jmp 0x5e58
xorl %eax, %eax
movl %eax, -0x184(%rbp)
jmp 0x5e58
movq -0x180(%rbp), %rdi
movl -0x184(%rbp), %eax
movslq %eax, %rsi
movq -0x18(%rbp), %rdx
addq $0x1b4, %rdx            # imm = 0x1B4
movq -0x138(%rbp), %rcx
movb $0x0, %al
callq 0x2110
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0x5eea
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x190(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x24(%rbp), %eax
jle 0x5eb1
movl -0xc(%rbp), %eax
subl -0x24(%rbp), %eax
movl %eax, -0x194(%rbp)
jmp 0x5ebb
xorl %eax, %eax
movl %eax, -0x194(%rbp)
jmp 0x5ebb
movq -0x190(%rbp), %rdi
movl -0x194(%rbp), %eax
movslq %eax, %rsi
movq -0x18(%rbp), %rdx
addq $0x18c, %rdx            # imm = 0x18C
movq -0x138(%rbp), %rcx
movb $0x0, %al
callq 0x2110
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0xc(%rbp), %eax
jl 0x5f10
jmp 0x5ef4
leaq 0x2b9f(%rip), %rdi      # 0x8a9a
movl $0x1a6, %esi            # imm = 0x1A6
leaq 0x2d2b(%rip), %rdx      # 0x8c32
movb $0x0, %al
callq 0x7000
jmp 0x5f10
jmp 0x5fc6
movq -0x8(%rbp), %rax
movslq -0x24(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x1a0(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x24(%rbp), %eax
jle 0x5f3d
movl -0xc(%rbp), %eax
subl -0x24(%rbp), %eax
movl %eax, -0x1a4(%rbp)
jmp 0x5f47
xorl %eax, %eax
movl %eax, -0x1a4(%rbp)
jmp 0x5f47
movl -0x1a4(%rbp), %eax
cltq
movq %rax, -0x1b8(%rbp)
movq -0x18(%rbp), %rax
addq $0x1dc, %rax            # imm = 0x1DC
movq %rax, -0x1b0(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x20(%rbp)
movb %al, -0x1a5(%rbp)
je 0x5f87
movq -0x20(%rbp), %rax
cmpl $0x0, 0x8(%rax)
setne %al
movb %al, -0x1a5(%rbp)
movq -0x1b0(%rbp), %rdx
movq -0x1b8(%rbp), %rsi
movq -0x1a0(%rbp), %rdi
movb -0x1a5(%rbp), %r8b
leaq 0x2757(%rip), %rcx      # 0x8701
leaq 0x2c7b(%rip), %rax      # 0x8c2c
testb $0x1, %r8b
cmovneq %rax, %rcx
movb $0x0, %al
callq 0x2110
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
addq $0x1c0, %rsp            # imm = 0x1C0
popq %rbp
retq
nopw %cs:(%rax,%rax)