// File: /workspace/github_c_makefile_star2_O0/markdryan[P]subtilis/arch/arm32/assembler.c
// Function: prv_parse_label
static void prv_parse_label(subtilis_arm_ass_context_t *c, const char *name,
			    subtilis_error_t *err)
{
	size_t index;
	const char *tbuf;
	char *name_cpy;

	name_cpy = malloc(strlen(name) + 1);
	if (!name_cpy) {
		subtilis_error_set_oom(err);
		return;
	}
	strcpy(name_cpy, name);

	if (subtilis_string_pool_find(c->label_pool, name, &index)) {
		if (subtilis_bitset_isset(&c->pending_labels, index)) {
			subtilis_bitset_clear(&c->pending_labels, index);
		} else {
			subtilis_error_set_already_defined(
			    err, name, c->l->stream->name, c->l->line);
			goto cleanup;
		}
	} else {
		index = subtilis_string_pool_register(c->label_pool, name, err);
		if (err->type != SUBTILIS_ERROR_OK)
			goto cleanup;
	}

	subtilis_arm_section_add_label(c->arm_s, index, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;

	subtilis_lexer_get(c->l, c->t, err);
	if (err->type != SUBTILIS_ERROR_OK)
		goto cleanup;
	tbuf = subtilis_token_get_text(c->t);
	if ((c->t->type != SUBTILIS_TOKEN_OPERATOR) || strcmp(tbuf, ":")) {
		subtilis_error_set_label_missing_colon(
		    err, name_cpy, c->l->stream->name, c->l->line);
		goto cleanup;
	}

	subtilis_lexer_get(c->l, c->t, err);

cleanup:

	free(name_cpy);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x120d0
movq %rax, %rdi
addq $0x1, %rdi
callq 0x121b0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x93273
movq -0x18(%rbp), %rdi
movl $0x1, %esi
leaq 0x1aebc(%rip), %rdx     # 0xae120
movl $0x166, %ecx            # imm = 0x166
callq 0x158e0
jmp 0x9341d
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x12060
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x10(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0x3d5a0
testb $0x1, %al
jne 0x9329b
jmp 0x93310
movq -0x8(%rbp), %rdi
addq $0x38, %rdi
movq -0x20(%rbp), %rsi
callq 0x88990
testb $0x1, %al
jne 0x932b2
jmp 0x932c5
movq -0x8(%rbp), %rdi
addq $0x38, %rdi
movq -0x20(%rbp), %rsi
callq 0x88a20
jmp 0x9330e
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rdx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x30(%rax), %r8
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x38(%rax), %r9d
movl $0x20, %esi
leaq 0x17f85(%rip), %rcx     # 0xab276
leaq 0x1ae28(%rip), %rax     # 0xae120
movq %rax, (%rsp)
movl $0x170, 0x8(%rsp)       # imm = 0x170
callq 0x156d0
jmp 0x93414
jmp 0x93339
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x3d630
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
je 0x93337
jmp 0x93414
jmp 0x93339
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x70850
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
je 0x9335b
jmp 0x93414
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x18(%rbp), %rdx
callq 0x133f0
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
je 0x93382
jmp 0x93414
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x12d70
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
cmpl $0x2, (%rax)
jne 0x933b5
movq -0x28(%rbp), %rdi
leaq 0x175ae(%rip), %rsi     # 0xaa959
callq 0x12140
cmpl $0x0, %eax
je 0x933fb
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rdx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x30(%rax), %r8
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x38(%rax), %r9d
movl $0x64, %esi
leaq 0x17e95(%rip), %rcx     # 0xab276
leaq 0x1ad38(%rip), %rax     # 0xae120
movq %rax, (%rsp)
movl $0x183, 0x8(%rsp)       # imm = 0x183
callq 0x156d0
jmp 0x93414
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x18(%rbp), %rdx
callq 0x133f0
movq -0x30(%rbp), %rdi
callq 0x12290
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)