// File: Alcaro[P]bridges/arlib/string.cpp
// Function: cstring::iendswith(cstring) const
bool cstring::iendswith(cstring other) const
{
	if (other.length() > this->length()) return false;
	const char* a = (char*)this->ptr()+this->length()-other.length();
	const char* b = (char*)other.ptr();
	for (size_t i=0;i<other.length();i++)
	{
		if (tolower(a[i]) != tolower(b[i])) return false;
	}
	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x170, %rsp            # imm = 0x170
movq %rsi, -0xe8(%rbp)
movq %rdx, -0xe0(%rbp)
movq %rdi, -0xf0(%rbp)
movq -0xf0(%rbp), %rax
movq %rax, -0x118(%rbp)
leaq -0xe8(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x110(%rbp)
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rdi
callq 0x5cc0
movsbl %al, %eax
cmpl $0x0, %eax
jl 0x390db
movq -0x110(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x5cc0
movsbl %al, %eax
xorl $0xf, %eax
movzbl %al, %eax
movl %eax, -0x64(%rbp)
jmp 0x390e8
movq -0x110(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x64(%rbp)
movq -0x118(%rbp), %rax
movl -0x64(%rbp), %ecx
movl %ecx, -0x124(%rbp)
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rax
movq %rax, -0x120(%rbp)
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rdi
callq 0x5cc0
movsbl %al, %eax
cmpl $0x0, %eax
jl 0x39144
movq -0x120(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x5cc0
movsbl %al, %eax
xorl $0xf, %eax
movzbl %al, %eax
movl %eax, -0x7c(%rbp)
jmp 0x39151
movq -0x120(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x7c(%rbp)
movl -0x124(%rbp), %eax
cmpl -0x7c(%rbp), %eax
jbe 0x39168
movb $0x0, -0xd1(%rbp)
jmp 0x3941d
movq -0x118(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x130(%rbp)
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x5cc0
movsbl %al, %eax
cmpl $0x0, %eax
jl 0x391a0
movq -0x130(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x391ae
movq -0x130(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x118(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rcx, -0x140(%rbp)
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
movq %rax, -0x138(%rbp)
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rdi
callq 0x5cc0
movsbl %al, %eax
cmpl $0x0, %eax
jl 0x39215
movq -0x138(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x5cc0
movsbl %al, %eax
xorl $0xf, %eax
movzbl %al, %eax
movl %eax, -0x94(%rbp)
jmp 0x39225
movq -0x138(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x94(%rbp)
movq -0x140(%rbp), %rax
movl -0x94(%rbp), %ecx
addq %rcx, %rax
movq %rax, -0x150(%rbp)
leaq -0xe8(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rax
movq %rax, -0x148(%rbp)
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rdi
callq 0x5cc0
movsbl %al, %eax
cmpl $0x0, %eax
jl 0x39298
movq -0x148(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x5cc0
movsbl %al, %eax
xorl $0xf, %eax
movzbl %al, %eax
movl %eax, -0xac(%rbp)
jmp 0x392a8
movq -0x148(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0xac(%rbp)
movq -0x150(%rbp), %rax
movl -0xac(%rbp), %ecx
movl %ecx, %edx
xorl %ecx, %ecx
subq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0xf8(%rbp)
leaq -0xe8(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x158(%rbp)
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdi
callq 0x5cc0
movsbl %al, %eax
cmpl $0x0, %eax
jl 0x392fe
movq -0x158(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x3930c
movq -0x158(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x100(%rbp)
movq $0x0, -0x108(%rbp)
movq -0x108(%rbp), %rax
movq %rax, -0x168(%rbp)
leaq -0xe8(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rax
movq %rax, -0x160(%rbp)
movq %rax, -0xc0(%rbp)
movq -0xc0(%rbp), %rdi
callq 0x5cc0
movsbl %al, %eax
cmpl $0x0, %eax
jl 0x3938c
movq -0x160(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x5cc0
movsbl %al, %eax
xorl $0xf, %eax
movzbl %al, %eax
movl %eax, -0xc4(%rbp)
jmp 0x3939c
movq -0x160(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0xc4(%rbp)
movq -0x168(%rbp), %rax
movl -0xc4(%rbp), %ecx
cmpq %rcx, %rax
jae 0x39416
movq -0xf8(%rbp), %rax
movq -0x108(%rbp), %rcx
movzbl (%rax,%rcx), %edi
callq 0x38890
movzbl %al, %eax
movl %eax, -0x16c(%rbp)
movq -0x100(%rbp), %rax
movq -0x108(%rbp), %rcx
movzbl (%rax,%rcx), %edi
callq 0x38890
movb %al, %cl
movl -0x16c(%rbp), %eax
movzbl %cl, %ecx
cmpl %ecx, %eax
je 0x393fd
movb $0x0, -0xd1(%rbp)
jmp 0x3941d
jmp 0x393ff
movq -0x108(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x108(%rbp)
jmp 0x39322
movb $0x1, -0xd1(%rbp)
movb -0xd1(%rbp), %al
andb $0x1, %al
addq $0x170, %rsp            # imm = 0x170
popq %rbp
retq
nop