// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
movq %rsi, %rdi
callq 0x120f0
leaq 0x1(%rax), %rdi
callq 0x121d0
testq %rax, %rax
je 0x60d57
movq %rax, %rbx
movq %rax, %rdi
movq %r12, %rsi
callq 0x12070
movq 0x30(%r15), %rdi
leaq 0x8(%rsp), %rdx
movq %r12, %rsi
callq 0x2d68e
testb %al, %al
je 0x60d7b
leaq 0x38(%r15), %r13
movq 0x8(%rsp), %rsi
movq %r13, %rdi
callq 0x59b05
testb %al, %al
je 0x60e0e
movq 0x8(%rsp), %rsi
movq %r13, %rdi
callq 0x59b35
movq 0x8(%rsp), %rax
jmp 0x60d99
leaq 0xff82(%rip), %rdx      # 0x70ce0
pushq $0x1
popq %rsi
movq %r14, %rdi
movl $0x166, %ecx            # imm = 0x166
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x1429e
movq 0x30(%r15), %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x2d6dc
movq %rax, 0x8(%rsp)
cmpl $0x0, (%r14)
jne 0x60e3e
movq (%r15), %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x4c77f
cmpl $0x0, (%r14)
jne 0x60e3e
movq 0x8(%r15), %rdi
movq 0x10(%r15), %rsi
movq %r14, %rdx
callq 0x12e0e
cmpl $0x0, (%r14)
jne 0x60e3e
movq 0x10(%r15), %rdi
callq 0x12a25
movq 0x10(%r15), %rsi
cmpl $0x2, (%rsi)
jne 0x60de4
cmpb $0x3a, (%rax)
jne 0x60de4
cmpb $0x0, 0x1(%rax)
je 0x60e54
movq 0x8(%r15), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0xfee9(%rip), %rax      # 0x70ce0
leaq 0xcfc7(%rip), %rcx      # 0x6ddc5
pushq $0x64
popq %rsi
movq %r14, %rdi
movq %rbx, %rdx
pushq $0x183                  # imm = 0x183
jmp 0x60e36
movq 0x8(%r15), %rax
movq 0x30(%rax), %r8
movl 0x38(%rax), %r9d
leaq 0xfebf(%rip), %rax      # 0x70ce0
leaq 0xcf9d(%rip), %rcx      # 0x6ddc5
pushq $0x20
popq %rsi
movq %r14, %rdi
movq %r12, %rdx
pushq $0x170                  # imm = 0x170
pushq %rax
callq 0x140cd
popq %rax
popq %rcx
movq %rbx, %rdi
callq 0x122c0
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0x8(%r15), %rdi
movq %r14, %rdx
callq 0x12e0e
jmp 0x60e3e