// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/classes/i18n/language.cpp
// Function: smooth::I18n::Language::ParseHeader(smooth::XML::Node*)
S::Errors::Error S::I18n::Language::ParseHeader(XML::Node *language)
{
	if (language == NIL) return Error();

	XML::Node	*info = language->GetNodeByName("info");

	/* Return an error if we didn't find an info node.
	 */
	if (info == NIL) return Error();

	for (Int i = 0; i < info->GetNOfNodes(); i++)
	{
		String	 property = info->GetNthNode(i)->GetAttributeByName("name")->GetContent();

		if (property == "language")	 SetName(info->GetNthNode(i)->GetContent());

		if (property == "righttoleft")	 rightToLeft = (info->GetNthNode(i)->GetContent() == "true" ? True : False);
		if (property == "encoding")	 encoding    =  info->GetNthNode(i)->GetContent();
		if (property == "author")	 author	     =  info->GetNthNode(i)->GetContent();
		if (property == "url")		 url	     =  info->GetNthNode(i)->GetContent();
		if (property == "incomplete")	 incomplete  = (info->GetNthNode(i)->GetContent() == "true" ? True : False);
	}

	return Success();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %r12
pushq $-0x1
popq %rbp
testq %rdx, %rdx
je 0x968b6
movq %rdx, %rbx
movq %rsi, %r14
leaq 0x6e268(%rip), %rsi     # 0x10490e
leaq 0x28(%rsp), %r15
movq %r15, %rdi
callq 0x58c40
movq %rbx, %rdi
movq %r15, %rsi
callq 0x57950
movq %rax, %r15
leaq 0x28(%rsp), %rdi
callq 0x5a588
testq %r15, %r15
je 0x968b6
movq %r12, (%rsp)
leaq 0x8(%r14), %rax
movq %rax, 0x20(%rsp)
leaq 0xf0(%r14), %rax
movq %rax, 0x18(%rsp)
leaq 0x120(%r14), %rax
movq %rax, 0x10(%rsp)
leaq 0x138(%r14), %rax
movq %rax, 0x8(%rsp)
leaq 0x40(%rsp), %r12
leaq 0x28(%rsp), %r13
xorl %ebp, %ebp
movq %r15, %rdi
callq 0x57130
cmpl %eax, %ebp
jge 0x968b0
movq %r15, %rdi
movl %ebp, %esi
callq 0x590b0
movq %rax, %rbx
movq %r12, %rdi
leaq 0x6cdfc(%rip), %rsi     # 0x103534
callq 0x58c40
movq %rbx, %rdi
movq %r12, %rsi
callq 0x5a060
movq %rax, %rdi
callq 0x56780
movq %r13, %rdi
movq %rax, %rsi
callq 0x58280
movq %r12, %rdi
callq 0x5a588
movq %r13, %rdi
leaq 0x50b5c(%rip), %rsi     # 0xe72c9
callq 0x59180
testb %al, %al
je 0x96795
movq %r15, %rdi
movl %ebp, %esi
callq 0x590b0
movq %rax, %rdi
callq 0x5a160
movq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0x56630
movq %r13, %rdi
leaq 0x50a33(%rip), %rsi     # 0xe71d2
callq 0x59180
testb %al, %al
je 0x967d0
movq %r15, %rdi
movl %ebp, %esi
callq 0x590b0
movq %rax, %rdi
callq 0x5a160
movq %rax, %rdi
leaq 0x6bf0e(%rip), %rsi     # 0x1026d2
callq 0x59180
movb %al, 0x150(%r14)
movq %r13, %rdi
leaq 0x50a04(%rip), %rsi     # 0xe71de
callq 0x59180
testb %al, %al
je 0x96802
movq %r15, %rdi
movl %ebp, %esi
callq 0x590b0
movq %rax, %rdi
callq 0x5a160
movq 0x18(%rsp), %rdi
movq %rax, %rsi
callq 0x56630
movq %r13, %rdi
leaq 0x509db(%rip), %rsi     # 0xe71e7
callq 0x59180
testb %al, %al
je 0x96834
movq %r15, %rdi
movl %ebp, %esi
callq 0x590b0
movq %rax, %rdi
callq 0x5a160
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x56630
movq %r13, %rdi
leaq 0x509b0(%rip), %rsi     # 0xe71ee
callq 0x59180
testb %al, %al
je 0x96866
movq %r15, %rdi
movl %ebp, %esi
callq 0x590b0
movq %rax, %rdi
callq 0x5a160
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x56630
movq %r13, %rdi
leaq 0x50982(%rip), %rsi     # 0xe71f2
callq 0x59180
testb %al, %al
je 0x968a1
movq %r15, %rdi
movl %ebp, %esi
callq 0x590b0
movq %rax, %rdi
callq 0x5a160
movq %rax, %rdi
leaq 0x6be3d(%rip), %rsi     # 0x1026d2
callq 0x59180
movb %al, 0x151(%r14)
movq %r13, %rdi
callq 0x5a588
incl %ebp
jmp 0x96711
movq (%rsp), %r12
xorl %ebp, %ebp
movq 0xcae0b(%rip), %rax     # 0x1616c8
addq $0x10, %rax
movq %rax, (%r12)
movl %ebp, 0x8(%r12)
movq %r12, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x968e8
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
jmp 0x968f0
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x5a588
movq %rbx, %rdi
callq 0x58260
nop