// File: /workspace/github_c_makefile_star2_O0/markdryan[P]subtilis/arch/arm32/assembler.c
// Function: prv_get_uint32_list
static int32_t *prv_get_uint32_list(subtilis_arm_ass_context_t *c,
				    size_t *count,
				    subtilis_arm_ass_valid_int_fn_t fn,
				    subtilis_error_t *err)
{
	const char *tbuf;
	int32_t *new_nums;
	int32_t num;
	int32_t *nums = NULL;
	size_t max_nums = 0;
	size_t num_count = 0;
	subtilis_arm_exp_val_t *val = NULL;

	do {
		val = subtilis_arm_exp_val_get(c, err);
		if (err->type != SUBTILIS_ERROR_OK)
			goto cleanup;

		if (val->type == SUBTILIS_ARM_EXP_TYPE_INT) {
			num = val->val.integer;
		} else if (val->type == SUBTILIS_ARM_EXP_TYPE_REAL) {
			num = (int32_t)val->val.real;
		} else {
			subtilis_error_set_integer_expected(
			    err, subtilis_arm_exp_type_name(val),
			    c->l->stream->name, c->l->line);
			goto cleanup;
		}

		subtilis_arm_exp_val_free(val);
		val = NULL;

		if (fn && !fn(num)) {
			subtilis_error_set_ass_integer_too_big(
			    err, c->t->tok.integer, c->l->stream->name,
			    c->l->line);
			goto cleanup;
		}

		if (num_count == max_nums) {
			max_nums += 32;
			new_nums = realloc(nums, max_nums * sizeof(*nums));
			if (!new_nums)
				goto cleanup;
			nums = new_nums;
		}

		nums[num_count++] = num;
		tbuf = subtilis_token_get_text(c->t);
	} while ((c->t->type == SUBTILIS_TOKEN_OPERATOR) && !strcmp(tbuf, ","));

	*count = num_count;

	return nums;

cleanup:

	subtilis_arm_exp_val_free(val);
	free(nums);

	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq $0x0, -0x48(%rbp)
movq $0x0, -0x50(%rbp)
movq $0x0, -0x58(%rbp)
movq $0x0, -0x60(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x9b4f0
movq %rax, -0x60(%rbp)
movq -0x28(%rbp), %rax
cmpl $0x0, (%rax)
je 0x92e0a
jmp 0x92fb4
movq -0x60(%rbp), %rax
cmpl $0x6, (%rax)
jne 0x92e1f
movq -0x60(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x3c(%rbp)
jmp 0x92e91
movq -0x60(%rbp), %rax
cmpl $0x7, (%rax)
jne 0x92e36
movq -0x60(%rbp), %rax
cvttsd2si 0x8(%rax), %eax
movl %eax, -0x3c(%rbp)
jmp 0x92e8f
movq -0x28(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rdi
callq 0x9b550
movq -0x68(%rbp), %rdi
movq %rax, %rdx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x30(%rax), %r8
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x38(%rax), %r9d
movl $0x17, %esi
leaq 0x18404(%rip), %rcx     # 0xab276
leaq 0x1b2a7(%rip), %rax     # 0xae120
movq %rax, (%rsp)
movl $0xe66, 0x8(%rsp)       # imm = 0xE66
callq 0x156d0
jmp 0x92fb4
jmp 0x92e91
movq -0x60(%rbp), %rdi
callq 0x9a4c0
movq $0x0, -0x60(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x92f01
movq -0x20(%rbp), %rax
movl -0x3c(%rbp), %edi
callq *%rax
testb $0x1, %al
jne 0x92f01
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl 0x8(%rax), %edx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x30(%rax), %r8
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x38(%rax), %r9d
movl $0x5f, %esi
xorl %ecx, %ecx
leaq 0x1b235(%rip), %rax     # 0xae120
movq %rax, (%rsp)
movl $0xe70, 0x8(%rsp)       # imm = 0xE70
callq 0x157b0
jmp 0x92fb4
movq -0x58(%rbp), %rax
cmpq -0x50(%rbp), %rax
jne 0x92f3d
movq -0x50(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rsi
shlq $0x2, %rsi
callq 0x121e0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x92f35
jmp 0x92fb4
movq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movl -0x3c(%rbp), %edx
movq -0x48(%rbp), %rax
movq -0x58(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0x58(%rbp)
movl %edx, (%rax,%rcx,4)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x12d70
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
xorl %eax, %eax
cmpl $0x2, (%rcx)
movb %al, -0x69(%rbp)
jne 0x92f94
movq -0x30(%rbp), %rdi
leaq 0x17625(%rip), %rsi     # 0xaa5a9
callq 0x12140
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
movb %al, -0x69(%rbp)
movb -0x69(%rbp), %al
testb $0x1, %al
jne 0x92deb
movq -0x58(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x48(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x92fce
movq -0x60(%rbp), %rdi
callq 0x9a4c0
movq -0x48(%rbp), %rdi
callq 0x12290
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax,%rax)