// File: /workspace/github_c_makefile_star2_O0/ksherlock[P]nroff_man/read1.c
// Function: get_arg
int get_arg(unsigned *i_ptr, unsigned type) {
	unsigned i = *i_ptr;
	uint_fast8_t c = type;

	if (type == 0) c = type = buffer[i++];
	arg_buffer[0] = 0;
	if (type == 0) return 0; /* error. */
	if (type == '[') {
		unsigned j = 0;
		for (;;) {
			c = buffer[i++];
			if (c == 0) return 0;
			if (c == ']') break;
			if (j < 31) arg_buffer[j] = c;
			++j;
		}
		if (j < 32)
			arg_buffer[j] = 0;
		else arg_buffer[31] = 0;
		*i_ptr = i;
		return j;
	}
	if (type == '(') {
		c = buffer[i++];
		if (!c) return 0;
		arg_buffer[0] = c;
		c = buffer[i++];
		if (!c) return 0;
		arg_buffer[1] = c;
		arg_buffer[2] = 0;
		*i_ptr = i;
		return 2;
	}
	arg_buffer[0] = c;
	arg_buffer[1] = 0;
	*i_ptr = i;
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
movb %al, -0x19(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x4680
movl -0x18(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x18(%rbp)
movl %eax, %eax
movl %eax, %ecx
leaq 0xbc8a(%rip), %rax      # 0x10300
movzbl (%rax,%rcx), %eax
movl %eax, -0x14(%rbp)
movb %al, -0x19(%rbp)
movb $0x0, 0xcc79(%rip)      # 0x11300
cmpl $0x0, -0x14(%rbp)
jne 0x4699
movl $0x0, -0x4(%rbp)
jmp 0x47e7
cmpl $0x5b, -0x14(%rbp)
jne 0x473c
movl $0x0, -0x20(%rbp)
movl -0x18(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x18(%rbp)
movl %eax, %eax
movl %eax, %ecx
leaq 0xbc40(%rip), %rax      # 0x10300
movb (%rax,%rcx), %al
movb %al, -0x19(%rbp)
movzbl -0x19(%rbp), %eax
cmpl $0x0, %eax
jne 0x46db
movl $0x0, -0x4(%rbp)
jmp 0x47e7
movzbl -0x19(%rbp), %eax
cmpl $0x5d, %eax
jne 0x46e6
jmp 0x4709
cmpl $0x1f, -0x20(%rbp)
jae 0x46fe
movb -0x19(%rbp), %dl
movl -0x20(%rbp), %eax
movl %eax, %ecx
leaq 0xcc05(%rip), %rax      # 0x11300
movb %dl, (%rax,%rcx)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x46aa
cmpl $0x20, -0x20(%rbp)
jae 0x4721
movl -0x20(%rbp), %eax
movl %eax, %ecx
leaq 0xcbe5(%rip), %rax      # 0x11300
movb $0x0, (%rax,%rcx)
jmp 0x4728
movb $0x0, 0xcbf7(%rip)      # 0x1131f
movl -0x18(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x47e7
cmpl $0x28, -0x14(%rbp)
jne 0x47c7
movl -0x18(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x18(%rbp)
movl %eax, %eax
movl %eax, %ecx
leaq 0xbba4(%rip), %rax      # 0x10300
movb (%rax,%rcx), %al
movb %al, -0x19(%rbp)
cmpb $0x0, -0x19(%rbp)
jne 0x4771
movl $0x0, -0x4(%rbp)
jmp 0x47e7
movb -0x19(%rbp), %al
movb %al, 0xcb86(%rip)       # 0x11300
movl -0x18(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x18(%rbp)
movl %eax, %eax
movl %eax, %ecx
leaq 0xbb70(%rip), %rax      # 0x10300
movb (%rax,%rcx), %al
movb %al, -0x19(%rbp)
cmpb $0x0, -0x19(%rbp)
jne 0x47a5
movl $0x0, -0x4(%rbp)
jmp 0x47e7
movb -0x19(%rbp), %al
movb %al, 0xcb53(%rip)       # 0x11301
movb $0x0, 0xcb4d(%rip)      # 0x11302
movl -0x18(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl $0x2, -0x4(%rbp)
jmp 0x47e7
movb -0x19(%rbp), %al
movb %al, 0xcb30(%rip)       # 0x11300
movb $0x0, 0xcb2a(%rip)      # 0x11301
movl -0x18(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)