// File: /workspace/github_c_makefile_star2_O2/DrYerzinia[P]C_DigiMode/src/util/argp.c
// Function: argp_print_help
static void argp_print_help(const char *cmd, struct argp_option *ops){

	printf("Usage: %s [OPTION]...\n", cmd);

	while(*(uint8_t*)ops != 0){

		int llen = 6;
		int has_short = isprint(ops->key);

		char *pch;

		printf("  ");

		// Single char option
		if(has_short)
			printf("-%c", ops->key);
		else
			printf("  ");

		// string option
		if(ops->name != NULL){

			if(has_short)
				printf(", ");
			else
				printf("  ");

			printf("--%s", ops->name);
			llen += strlen(ops->name) + 2;

			if(ops->arg != NULL){
				printf("=%s", ops->arg);
				llen += strlen(ops->arg) + 1;
			}
		}

		// Print description
		if(ops->doc != NULL){

			char doc[strlen(ops->doc)];
			strcpy(doc, ops->doc);

			if(llen > 30){
				printf("\n");
				llen = 0;
			} else if(llen == 30){
				llen -= 2;
			}

			if(llen < 30){
				printf("%*s" "%s", (30-llen), " ", " ");
				llen += (30-llen);
			}

			pch = strtok(doc, " ");

			while(pch != NULL){

				llen += strlen(pch) + 1;
				if(llen >= 80){
					printf("\n");
					llen = -2;
				}

				if(llen < 30){
					printf("%*s" "%s", (30-llen), " ", " ");
					llen += (30-llen);
				}

				printf("%s ", pch);

				pch = strtok(NULL, " ");

			};

		}

		printf("\n");

		ops++;

	};

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r12
movq %rdi, %rsi
leaq 0x1304(%rip), %rdi      # 0x33bd
xorl %eax, %eax
callq 0x10a0
leaq 0x107b(%rip), %r14      # 0x3142
pushq $0x1e
popq %rbx
leaq 0x1072(%rip), %r13      # 0x3143
cmpb $0x0, (%r12)
je 0x229f
callq 0x1170
movq (%rax), %rax
movslq 0x8(%r12), %rcx
movzwl (%rax,%rcx,2), %r15d
movq %r14, %rdi
xorl %eax, %eax
callq 0x10a0
btl $0xe, %r15d
jb 0x2113
movq %r14, %rdi
xorl %eax, %eax
callq 0x10a0
cmpq $0x0, (%r12)
movq %r14, %rdi
jmp 0x2132
movl 0x8(%r12), %esi
leaq 0x12b5(%rip), %rdi      # 0x33d4
xorl %eax, %eax
callq 0x10a0
cmpq $0x0, (%r12)
leaq 0x12a6(%rip), %rdi      # 0x33d8
pushq $0x6
popq %rax
movl %eax, %r15d
pushq $0xa
popq %r14
je 0x2192
xorl %eax, %eax
callq 0x10a0
movq (%r12), %rsi
leaq 0x128b(%rip), %rdi      # 0x33db
xorl %eax, %eax
callq 0x10a0
movq (%r12), %rdi
callq 0x1090
movq %rax, %r15
movq 0x10(%r12), %rsi
testq %rsi, %rsi
je 0x218e
leaq 0x126c(%rip), %rdi      # 0x33e0
xorl %eax, %eax
callq 0x10a0
movq 0x10(%r12), %rdi
callq 0x1090
addl %eax, %r15d
addl $0x9, %r15d
jmp 0x2192
addl $0x8, %r15d
movq 0x20(%r12), %rdi
testq %rdi, %rdi
je 0x2287
callq 0x1090
movq %rsp, -0x30(%rbp)
movq %r12, %rcx
movq %rsp, %r12
addq $0xf, %rax
andq $-0x10, %rax
subq %rax, %r12
movq %r12, %rsp
movq %rcx, -0x38(%rbp)
movq 0x20(%rcx), %rsi
movq %r12, %rdi
callq 0x1050
cmpl $0x1f, %r15d
jl 0x21df
movl %r14d, %edi
callq 0x1040
movl %ebx, %esi
jmp 0x21ef
leal -0x1e(%r15), %esi
negl %esi
cmpl $0x1e, %r15d
pushq $0x2
popq %rax
cmovel %eax, %esi
leaq 0x11ee(%rip), %rdi      # 0x33e4
movq %r13, %rdx
movq %r13, %rcx
xorl %eax, %eax
callq 0x10a0
movq %r12, %rdi
movq %r13, %rsi
callq 0x1130
movq %rax, %r15
movl %ebx, %r12d
testq %r15, %r15
je 0x227f
movq %r15, %rdi
callq 0x1090
addl %eax, %r12d
incl %r12d
cmpl $0x50, %r12d
jl 0x223d
movl %r14d, %edi
callq 0x1040
pushq $-0x2
popq %rax
movl %eax, %r12d
jmp 0x2243
cmpl $0x1d, %r12d
jg 0x225f
movl %ebx, %esi
subl %r12d, %esi
leaq 0x1195(%rip), %rdi      # 0x33e4
movq %r13, %rdx
movq %r13, %rcx
xorl %eax, %eax
callq 0x10a0
movl %ebx, %r12d
leaq 0x1184(%rip), %rdi      # 0x33ea
movq %r15, %rsi
xorl %eax, %eax
callq 0x10a0
xorl %edi, %edi
movq %r13, %rsi
callq 0x1130
movq %rax, %r15
jmp 0x2214
movq -0x30(%rbp), %rsp
movq -0x38(%rbp), %r12
movl %r14d, %edi
callq 0x1040
addq $0x30, %r12
leaq 0xea8(%rip), %r14       # 0x3142
jmp 0x20d1
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq