// File: /workspace/github_c_makefile_star2_O0/OstCollector[P]config2c/config2c.c
// Function: parse_enum
static void parse_enum(string name, const struct node_enum_list *list)
{
	const struct node_enum_list *cur;
	osi(0, "static int parse__enum_%s(struct pass_to_conv *ctx, enum %s *value, "
		"const struct node_value *input)\n", name, name);
	osi(0, "{\n");
	osi(1, "if (input->type != VAL_SCALE_IDEN) {\n");
	osi(2, "ctx->node = input;\n");
	osi(2, "ctx->msg = \"invalid type, expecting enum.\";\n");
	osi(2, "return -EINVAL;\n");
	osi(1, "}\n");
	for (cur = list; cur; cur = cur->next) {
		osi(1, "if (!strcmp(input->enum_str, \"%s\")) {\n", cur->name);
		osi(2, "*value = %s;\n", cur->name);
		osi(2, "return 0;\n");
		osi(1, "}\n");
		if (cur->alias) {
			osi(1, "if (!strcmp(input->enum_str, \"%s\")) {\n", cur->alias);
			osi(2, "*value = %s;\n", cur->name);
			osi(2, "return 0;\n");
			osi(1, "}\n");
		}
	}
	osi(1, "ctx->node = input;\n");
	osi(1, "ctx->msg = \"unknown enum value.\";\n");
	osi(1, "ctx-EINVAL;\n");
	osi(0, "}\n"); /* func body */
	osi(0, "\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
xorl %edi, %edi
callq 0x6fd0
movq 0xdf22(%rip), %rdi      # 0x1b2a0
movq -0x8(%rbp), %rdx
movq -0x8(%rbp), %rcx
leaq 0xa34c(%rip), %rsi      # 0x176d9
movb $0x0, %al
callq 0x2100
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jle 0xd3c5
movq 0xdc4d(%rip), %rax      # 0x1aff0
movq (%rax), %rdi
leaq 0x85a7(%rip), %rsi      # 0x15954
leaq 0x85b8(%rip), %rdx      # 0x1596c
movb $0x0, %al
callq 0x2100
movl $0x1, %edi
callq 0x2180
jmp 0xd3c7
jmp 0xd3c9
jmp 0xd3cb
xorl %edi, %edi
callq 0x6fd0
movq 0xdec7(%rip), %rdi      # 0x1b2a0
leaq 0xa3d5(%rip), %rsi      # 0x177b5
movb $0x0, %al
callq 0x2100
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jle 0xd418
movq 0xdbfa(%rip), %rax      # 0x1aff0
movq (%rax), %rdi
leaq 0x8554(%rip), %rsi      # 0x15954
leaq 0x8565(%rip), %rdx      # 0x1596c
movb $0x0, %al
callq 0x2100
movl $0x1, %edi
callq 0x2180
jmp 0xd41a
jmp 0xd41c
jmp 0xd41e
movl $0x1, %edi
callq 0x6fd0
movq 0xde71(%rip), %rdi      # 0x1b2a0
leaq 0xa308(%rip), %rsi      # 0x1773e
movb $0x0, %al
callq 0x2100
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jle 0xd46e
movq 0xdba4(%rip), %rax      # 0x1aff0
movq (%rax), %rdi
leaq 0x84fe(%rip), %rsi      # 0x15954
leaq 0x850f(%rip), %rdx      # 0x1596c
movb $0x0, %al
callq 0x2100
movl $0x1, %edi
callq 0x2180
jmp 0xd470
jmp 0xd472
jmp 0xd474
movl $0x2, %edi
callq 0x6fd0
movq 0xde1b(%rip), %rdi      # 0x1b2a0
leaq 0x9331(%rip), %rsi      # 0x167bd
movb $0x0, %al
callq 0x2100
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jle 0xd4c4
movq 0xdb4e(%rip), %rax      # 0x1aff0
movq (%rax), %rdi
leaq 0x84a8(%rip), %rsi      # 0x15954
leaq 0x84b9(%rip), %rdx      # 0x1596c
movb $0x0, %al
callq 0x2100
movl $0x1, %edi
callq 0x2180
jmp 0xd4c6
jmp 0xd4c8
jmp 0xd4ca
movl $0x2, %edi
callq 0x6fd0
movq 0xddc5(%rip), %rdi      # 0x1b2a0
leaq 0xa282(%rip), %rsi      # 0x17764
movb $0x0, %al
callq 0x2100
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jle 0xd51a
movq 0xdaf8(%rip), %rax      # 0x1aff0
movq (%rax), %rdi
leaq 0x8452(%rip), %rsi      # 0x15954
leaq 0x8463(%rip), %rdx      # 0x1596c
movb $0x0, %al
callq 0x2100
movl $0x1, %edi
callq 0x2180
jmp 0xd51c
jmp 0xd51e
jmp 0xd520
movl $0x2, %edi
callq 0x6fd0
movq 0xdd6f(%rip), %rdi      # 0x1b2a0
leaq 0x92d1(%rip), %rsi      # 0x16809
movb $0x0, %al
callq 0x2100
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jle 0xd570
movq 0xdaa2(%rip), %rax      # 0x1aff0
movq (%rax), %rdi
leaq 0x83fc(%rip), %rsi      # 0x15954
leaq 0x840d(%rip), %rdx      # 0x1596c
movb $0x0, %al
callq 0x2100
movl $0x1, %edi
callq 0x2180
jmp 0xd572
jmp 0xd574
jmp 0xd576
movl $0x1, %edi
callq 0x6fd0
movq 0xdd19(%rip), %rdi      # 0x1b2a0
leaq 0x88cf(%rip), %rsi      # 0x15e5d
movb $0x0, %al
callq 0x2100
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jle 0xd5c6
movq 0xda4c(%rip), %rax      # 0x1aff0
movq (%rax), %rdi
leaq 0x83a6(%rip), %rsi      # 0x15954
leaq 0x83b7(%rip), %rdx      # 0x1596c
movb $0x0, %al
callq 0x2100
movl $0x1, %edi
callq 0x2180
jmp 0xd5c8
jmp 0xd5ca
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xd8d0
jmp 0xd5df
movl $0x1, %edi
callq 0x6fd0
movq 0xdcb0(%rip), %rdi      # 0x1b2a0
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0xa192(%rip), %rsi      # 0x17791
movb $0x0, %al
callq 0x2100
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jle 0xd637
movq 0xd9db(%rip), %rax      # 0x1aff0
movq (%rax), %rdi
leaq 0x8335(%rip), %rsi      # 0x15954
leaq 0x8346(%rip), %rdx      # 0x1596c
movb $0x0, %al
callq 0x2100
movl $0x1, %edi
callq 0x2180
jmp 0xd639
jmp 0xd63b
jmp 0xd63d
movl $0x2, %edi
callq 0x6fd0
movq 0xdc52(%rip), %rdi      # 0x1b2a0
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0xa15b(%rip), %rsi      # 0x177b8
movb $0x0, %al
callq 0x2100
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jle 0xd695
movq 0xd97d(%rip), %rax      # 0x1aff0
movq (%rax), %rdi
leaq 0x82d7(%rip), %rsi      # 0x15954
leaq 0x82e8(%rip), %rdx      # 0x1596c
movb $0x0, %al
callq 0x2100
movl $0x1, %edi
callq 0x2180
jmp 0xd697
jmp 0xd699
jmp 0xd69b
movl $0x2, %edi
callq 0x6fd0
movq 0xdbf4(%rip), %rdi      # 0x1b2a0
leaq 0x87d2(%rip), %rsi      # 0x15e85
movb $0x0, %al
callq 0x2100
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jle 0xd6eb
movq 0xd927(%rip), %rax      # 0x1aff0
movq (%rax), %rdi
leaq 0x8281(%rip), %rsi      # 0x15954
leaq 0x8292(%rip), %rdx      # 0x1596c
movb $0x0, %al
callq 0x2100
movl $0x1, %edi
callq 0x2180
jmp 0xd6ed
jmp 0xd6ef
jmp 0xd6f1
movl $0x1, %edi
callq 0x6fd0
movq 0xdb9e(%rip), %rdi      # 0x1b2a0
leaq 0x8754(%rip), %rsi      # 0x15e5d
movb $0x0, %al
callq 0x2100
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jle 0xd741
movq 0xd8d1(%rip), %rax      # 0x1aff0
movq (%rax), %rdi
leaq 0x822b(%rip), %rsi      # 0x15954
leaq 0x823c(%rip), %rdx      # 0x1596c
movb $0x0, %al
callq 0x2100
movl $0x1, %edi
callq 0x2180
jmp 0xd743
jmp 0xd745
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0xd8be
jmp 0xd756
movl $0x1, %edi
callq 0x6fd0
movq 0xdb39(%rip), %rdi      # 0x1b2a0
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdx
leaq 0xa01b(%rip), %rsi      # 0x17791
movb $0x0, %al
callq 0x2100
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jle 0xd7ae
movq 0xd864(%rip), %rax      # 0x1aff0
movq (%rax), %rdi
leaq 0x81be(%rip), %rsi      # 0x15954
leaq 0x81cf(%rip), %rdx      # 0x1596c
movb $0x0, %al
callq 0x2100
movl $0x1, %edi
callq 0x2180
jmp 0xd7b0
jmp 0xd7b2
jmp 0xd7b4
movl $0x2, %edi
callq 0x6fd0
movq 0xdadb(%rip), %rdi      # 0x1b2a0
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0x9fe4(%rip), %rsi      # 0x177b8
movb $0x0, %al
callq 0x2100
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jle 0xd80c
movq 0xd806(%rip), %rax      # 0x1aff0
movq (%rax), %rdi
leaq 0x8160(%rip), %rsi      # 0x15954
leaq 0x8171(%rip), %rdx      # 0x1596c
movb $0x0, %al
callq 0x2100
movl $0x1, %edi
callq 0x2180
jmp 0xd80e
jmp 0xd810
jmp 0xd812
movl $0x2, %edi
callq 0x6fd0
movq 0xda7d(%rip), %rdi      # 0x1b2a0
leaq 0x865b(%rip), %rsi      # 0x15e85
movb $0x0, %al
callq 0x2100
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jle 0xd862
movq 0xd7b0(%rip), %rax      # 0x1aff0
movq (%rax), %rdi
leaq 0x810a(%rip), %rsi      # 0x15954
leaq 0x811b(%rip), %rdx      # 0x1596c
movb $0x0, %al
callq 0x2100
movl $0x1, %edi
callq 0x2180
jmp 0xd864
jmp 0xd866
jmp 0xd868
movl $0x1, %edi
callq 0x6fd0
movq 0xda27(%rip), %rdi      # 0x1b2a0
leaq 0x85dd(%rip), %rsi      # 0x15e5d
movb $0x0, %al
callq 0x2100
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jle 0xd8b8
movq 0xd75a(%rip), %rax      # 0x1aff0
movq (%rax), %rdi
leaq 0x80b4(%rip), %rsi      # 0x15954
leaq 0x80c5(%rip), %rdx      # 0x1596c
movb $0x0, %al
callq 0x2100
movl $0x1, %edi
callq 0x2180
jmp 0xd8ba
jmp 0xd8bc
jmp 0xd8be
jmp 0xd8c0
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0xd5d2
jmp 0xd8d2
movl $0x1, %edi
callq 0x6fd0
movq 0xd9bd(%rip), %rdi      # 0x1b2a0
leaq 0x8ed3(%rip), %rsi      # 0x167bd
movb $0x0, %al
callq 0x2100
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jle 0xd922
movq 0xd6f0(%rip), %rax      # 0x1aff0
movq (%rax), %rdi
leaq 0x804a(%rip), %rsi      # 0x15954
leaq 0x805b(%rip), %rdx      # 0x1596c
movb $0x0, %al
callq 0x2100
movl $0x1, %edi
callq 0x2180
jmp 0xd924
jmp 0xd926
jmp 0xd928
movl $0x1, %edi
callq 0x6fd0
movq 0xd967(%rip), %rdi      # 0x1b2a0
leaq 0x9e86(%rip), %rsi      # 0x177c6
movb $0x0, %al
callq 0x2100
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jle 0xd978
movq 0xd69a(%rip), %rax      # 0x1aff0
movq (%rax), %rdi
leaq 0x7ff4(%rip), %rsi      # 0x15954
leaq 0x8005(%rip), %rdx      # 0x1596c
movb $0x0, %al
callq 0x2100
movl $0x1, %edi
callq 0x2180
jmp 0xd97a
jmp 0xd97c
jmp 0xd97e
movl $0x1, %edi
callq 0x6fd0
movq 0xd911(%rip), %rdi      # 0x1b2a0
leaq 0x9e53(%rip), %rsi      # 0x177e9
movb $0x0, %al
callq 0x2100
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jle 0xd9ce
movq 0xd644(%rip), %rax      # 0x1aff0
movq (%rax), %rdi
leaq 0x7f9e(%rip), %rsi      # 0x15954
leaq 0x7faf(%rip), %rdx      # 0x1596c
movb $0x0, %al
callq 0x2100
movl $0x1, %edi
callq 0x2180
jmp 0xd9d0
jmp 0xd9d2
jmp 0xd9d4
xorl %edi, %edi
callq 0x6fd0
movq 0xd8be(%rip), %rdi      # 0x1b2a0
leaq 0x8474(%rip), %rsi      # 0x15e5d
movb $0x0, %al
callq 0x2100
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jle 0xda21
movq 0xd5f1(%rip), %rax      # 0x1aff0
movq (%rax), %rdi
leaq 0x7f4b(%rip), %rsi      # 0x15954
leaq 0x7f5c(%rip), %rdx      # 0x1596c
movb $0x0, %al
callq 0x2100
movl $0x1, %edi
callq 0x2180
jmp 0xda23
jmp 0xda25
jmp 0xda27
xorl %edi, %edi
callq 0x6fd0
movq 0xd86b(%rip), %rdi      # 0x1b2a0
leaq 0x8767(%rip), %rsi      # 0x161a3
movb $0x0, %al
callq 0x2100
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jle 0xda74
movq 0xd59e(%rip), %rax      # 0x1aff0
movq (%rax), %rdi
leaq 0x7ef8(%rip), %rsi      # 0x15954
leaq 0x7f09(%rip), %rdx      # 0x1596c
movb $0x0, %al
callq 0x2100
movl $0x1, %edi
callq 0x2180
jmp 0xda76
jmp 0xda78
addq $0x20, %rsp
popq %rbp
retq
nop