// File: /workspace/github_cpp_makefile_star2_O2/Alcaro[P]bridges/arlib/bmlwrite.cpp
// Function: bmlwriter::node(cstring, cstring, bmlwriter::mode, bool)
void bmlwriter::node(cstring name, cstring val, mode m, bool enter)
{
	m = type(val, m);
	bool inlined = (m <= icol && m_caninline && !enter);
	if (m_data)
	{
		if (inlined) m_data += " ";
		else m_data += "\n"+indent();
	}
	
	m_indent++;
	
	if ((m==anon || m==eq || m==quote) && enter) m_caninline = true;
	if (m==icol || m==col || m==multiline) m_caninline = false;
	//for other modes, inlinability isn't affected
	
	switch (m)
	{
		case ianon:
		case anon:
			m_data += name;
			break;
		case ieq:
		case eq:
			m_data += name+"="+val;
			break;
		case iquote:
		case quote:
			m_data += name+"=\""+val+"\"";
			break;
		case icol:
		case col:
			m_data += name+": "+val;
			break;
		case multiline:
			string prefix = "\n"+indent()+":";
			m_data += name + prefix + val.replace("\n", prefix);
			break;
	}
	if (!enter) m_indent--;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r8, %r12
movq %rcx, %r13
movq %rdx, %r15
movq %rsi, (%rsp)
movq %rdi, %rbx
movb 0xa0(%rsp), %r14b
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %rcx, %rsi
movq %r8, %rdx
movl %r9d, %ecx
callq 0x59d8
movl %eax, %ebp
cmpl $0x3, %eax
jg 0x5713
movl %r14d, %eax
xorb $0x1, %al
andb 0x14(%rbx), %al
jmp 0x5715
xorl %eax, %eax
movzbl 0xf(%rbx), %ecx
testb %cl, %cl
jns 0x5722
movl 0x8(%rbx), %ecx
jmp 0x5725
xorl $0xf, %ecx
testl %ecx, %ecx
je 0x5798
testb %al, %al
je 0x573e
leaq 0x23348(%rip), %rsi     # 0x28a7c
movq %rbx, %rdi
callq 0x426a
jmp 0x5798
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5e68
movq (%r14), %rdx
movq 0x8(%r14), %rcx
leaq 0x2318b(%rip), %rsi     # 0x288e7
movq %r15, %r14
leaq 0x18(%rsp), %r15
movq %r15, %rdi
callq 0x41b8
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x4296
movq %r15, %rdi
movq %r14, %r15
callq 0x56b4
leaq 0x8(%rsp), %rdi
movb 0xa0(%rsp), %r14b
callq 0x56b4
incl 0x10(%rbx)
leal -0x4(%rbp), %eax
cmpl $0x3, %eax
setae %al
movl %r14d, %ecx
xorb $0x1, %cl
orb %al, %cl
jne 0x57b2
movb $0x1, 0x14(%rbx)
cmpl $0x8, %ebp
ja 0x58cb
movl %ebp, %eax
leaq 0x22b4c(%rip), %rcx     # 0x28310
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $0x0, 0x14(%rbx)
addl $-0x3, %ebp
leaq 0x22b59(%rip), %rax     # 0x28334
movslq (%rax,%rbp,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x22b66(%rip), %rcx     # 0x28351
jmp 0x587c
leaq 0x22b57(%rip), %rcx     # 0x2834e
leaq 0x28(%rsp), %rbp
movq %rbp, %rdi
movq (%rsp), %rsi
movq %r15, %rdx
callq 0x5ee3
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rbp, %rsi
movq %r13, %rdx
movq %r12, %rcx
callq 0x5eb2
leaq 0x22b27(%rip), %rdx     # 0x2834f
leaq 0x18(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x418a
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x4296
movq %r15, %rdi
callq 0x56b4
movq %r14, %rdi
movb 0xa0(%rsp), %r14b
callq 0x56b4
movq %rbp, %rdi
jmp 0x58c6
movq %rbx, %rdi
movq (%rsp), %rsi
movq %r15, %rdx
callq 0x4296
jmp 0x58cb
leaq 0x22ad0(%rip), %rcx     # 0x2834c
movl %r14d, %ebp
leaq 0x8(%rsp), %r14
movq %r14, %rdi
movq (%rsp), %rsi
movq %r15, %rdx
callq 0x5ee3
leaq 0x18(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movq %r13, %rdx
movq %r12, %rcx
callq 0x5eb2
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x4296
movq %r15, %rdi
callq 0x56b4
movq %r14, %rdi
movl %ebp, %r14d
callq 0x56b4
testb %r14b, %r14b
jne 0x58d3
decl 0x10(%rbx)
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x28(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5e68
movq (%r14), %rdx
movq 0x8(%r14), %rcx
leaq 0x22fe7(%rip), %rsi     # 0x288e7
movq %r15, %rbp
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x41b8
leaq 0x22a3d(%rip), %rdx     # 0x28354
leaq 0x18(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x418a
movq %r15, %rdi
callq 0x56b4
movq %r14, %rdi
callq 0x56b4
movq (%r12), %rcx
movq 0x8(%r12), %r8
leaq 0x28(%rsp), %r13
movq %r13, %rdi
movq (%rsp), %rsi
movq %rbp, %rdx
callq 0x5f1a
leaq 0x48(%rsp), %r14
movq %r14, %rdi
leaq 0x22f84(%rip), %rsi     # 0x288e7
callq 0x42ce
movq (%r12), %r8
movq 0x8(%r12), %r9
movq (%r14), %rdx
movq 0x8(%r14), %rcx
leaq 0x58(%rsp), %r14
leaq 0x38(%rsp), %rsi
movq %r14, %rdi
callq 0x14db2
movq (%r14), %rdx
movq 0x8(%r14), %rcx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %r13, %rsi
callq 0x5eb2
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rbx, %rdi
callq 0x4296
movq %r15, %rdi
callq 0x56b4
movq %r14, %rdi
movb 0xa0(%rsp), %r14b
callq 0x56b4
movq %r13, %rdi
callq 0x56b4
movq %r12, %rdi
jmp 0x58c6