// File: /workspace/github_c_makefile_star2_O0/ebiggers[P]mysh/mysh_builtin.c
// Function: builtin_set
static int builtin_set(unsigned argc, const char **argv)
{
	const char *pos_params[argc];
	unsigned pos_params_idx;
	unsigned i;
	int ret;

	if (argc == 0) {
		ret = print_all_shell_variables();
		goto out;
	}
	pos_params_idx = 0;
	for (i = 0; i < argc; i++) {
		switch (argv[i][0]) {
		case '-':
			if (argv[i][1] == '-' && argv[i][2] == '\0') {
				i++;
				goto remaining_params;
			}
			/* Fall through */
		case '+':
			ret = set_or_unset_options_in_string(argv[i] + 1, (argv[i][0] == '-'));
			if (ret)
				goto out;
			break;
		default:
			pos_params[pos_params_idx++] = argv[i];
			break;
		}
	}
remaining_params:
	for (; i < argc; i++)
		pos_params[pos_params_idx++] = argv[i];
	if (pos_params_idx != 0) {
		set_positional_params(pos_params_idx,
				      positional_parameters[0],
				      pos_params);
	}
	ret = 0;
out:
	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl -0x4(%rbp), %eax
movq %rsp, %rcx
movq %rcx, -0x18(%rbp)
leaq 0xf(,%rax,8), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x38(%rbp)
movq %rcx, %rsp
movq %rax, -0x20(%rbp)
cmpl $0x0, -0x4(%rbp)
jne 0x2e9b
movb $0x0, %al
callq 0x6430
movl %eax, -0x2c(%rbp)
jmp 0x2fd6
movl $0x0, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x4(%rbp), %eax
jae 0x2f79
movq -0x10(%rbp), %rax
movl -0x28(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
movl %eax, -0x3c(%rbp)
subl $0x2b, %eax
je 0x2f0c
jmp 0x2ecd
movl -0x3c(%rbp), %eax
subl $0x2d, %eax
jne 0x2f49
jmp 0x2ed7
movq -0x10(%rbp), %rax
movl -0x28(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movsbl 0x1(%rax), %eax
cmpl $0x2d, %eax
jne 0x2f0a
movq -0x10(%rbp), %rax
movl -0x28(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movsbl 0x2(%rax), %eax
cmpl $0x0, %eax
jne 0x2f0a
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x2f7b
jmp 0x2f0c
movq -0x10(%rbp), %rax
movl -0x28(%rbp), %ecx
movq (%rax,%rcx,8), %rdi
addq $0x1, %rdi
movq -0x10(%rbp), %rax
movl -0x28(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
sete %al
andb $0x1, %al
movzbl %al, %esi
callq 0x32c0
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x2f47
jmp 0x2fd6
jmp 0x2f69
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
movl -0x28(%rbp), %edx
movq (%rcx,%rdx,8), %rdx
movl -0x24(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x24(%rbp)
movl %ecx, %ecx
movq %rdx, (%rax,%rcx,8)
jmp 0x2f6b
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x2ea9
jmp 0x2f7b
jmp 0x2f7d
movl -0x28(%rbp), %eax
cmpl -0x4(%rbp), %eax
jae 0x2fb0
movq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
movl -0x28(%rbp), %edx
movq (%rcx,%rdx,8), %rdx
movl -0x24(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x24(%rbp)
movl %ecx, %ecx
movq %rdx, (%rax,%rcx,8)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x2f7d
cmpl $0x0, -0x24(%rbp)
je 0x2fcf
movq -0x38(%rbp), %rdx
movl -0x24(%rbp), %edi
leaq 0xb934(%rip), %rax      # 0xe8f8
movq (%rax), %rax
movq (%rax), %rsi
callq 0x6a50
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x18(%rbp), %rcx
movq %rcx, %rsp
movq %rbp, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)