// File: /workspace/github_cpp_makefile_star2_O1/gliktaras[P]skyperole/skyperole.cpp
// Function: setWindowRole(unsigned long)
void setWindowRole(Window window) {
    if (!isSkypeWindow(window)) {
        return;
    }

    std::vector<std::string> windowNames = getStringProperty(window, WM_NAME_ATOM);
    for (size_t i = 0; i < windowNames.size(); ++i) {
        for (int j = 0; j < SKYPE_WINDOW_TYPE_COUNT; ++j) {
            if (isSubstring(SKYPE_WINDOW_TYPES[j][0], windowNames[i])) {
                setStringProperty(window, WM_WINDOW_ROLE_ATOM, SKYPE_WINDOW_TYPES[j][1]);
                return;
            }
        }
    }

    if (verbose) {
        std::cerr << "Recognized Skype window " << std::hex << window << ", "
                  << "could not identify it further." << std::endl;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
callq 0x2b34
testb %al, %al
je 0x2dbf
movq 0x3782(%rip), %rdx      # 0x6390
leaq 0x30(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x298b
movq 0x8(%r14), %rax
cmpq (%r14), %rax
setne %al
je 0x2d19
xorl %r14d, %r14d
leaq 0x3548(%rip), %r15      # 0x6180
movb %al, 0xf(%rsp)
movq %r14, %r12
shlq $0x5, %r12
xorl %r13d, %r13d
movq 0x30(%rsp), %rbp
movq (%rbp,%r12), %rdi
movq 0x8(%rbp,%r12), %rsi
addq %rdi, %rsi
movq (%r13,%r15), %rdx
movq 0x8(%r13,%r15), %rcx
addq %rdx, %rcx
callq 0x319e
addq %r12, %rbp
movq (%rbp), %rcx
addq 0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x2ca2
addq $0x40, %r13
cmpq $0x200, %r13            # imm = 0x200
jne 0x2c46
movq 0x38(%rsp), %rax
subq 0x30(%rsp), %rax
incq %r14
sarq $0x5, %rax
cmpq %rax, %r14
setb %al
jb 0x2c38
jmp 0x2d19
movq 0x36ef(%rip), %r14      # 0x6398
leaq 0x20(%rsp), %r12
movq %r12, -0x10(%r12)
movq 0x20(%r13,%r15), %rsi
movq 0x28(%r13,%r15), %rdx
addq %rsi, %rdx
leaq 0x10(%rsp), %rdi
callq 0x307e
movq 0x36af(%rip), %rdi      # 0x6380
movl 0x18(%rsp), %eax
movl $0x1f, %ecx
movq %rbx, %rsi
movq %r14, %rdx
movl $0x8, %r8d
xorl %r9d, %r9d
pushq %rax
pushq 0x18(%rsp)
callq 0x2130
addq $0x10, %rsp
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x2d0e
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2190
testb $0x1, 0xf(%rsp)
jne 0x2db5
cmpb $0x1, 0x3680(%rip)      # 0x63a0
jne 0x2db5
movq 0x32c3(%rip), %r14      # 0x5ff0
leaq 0x13d0(%rip), %rsi      # 0x4104
movl $0x18, %edx
movq %r14, %rdi
callq 0x21b0
movq (%r14), %rax
movq -0x18(%rax), %rax
movl 0x18(%r14,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x18(%r14,%rax)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x20c0
movq %rax, %rbx
leaq 0x13b0(%rip), %rsi      # 0x411d
movl $0x2, %edx
movq %rax, %rdi
callq 0x21b0
leaq 0x139f(%rip), %rsi      # 0x4120
movl $0x1e, %edx
movq %rbx, %rdi
callq 0x21b0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2160
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
leaq 0x30(%rsp), %rdi
callq 0x3022
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x2df1
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2190
jmp 0x2df1
jmp 0x2dee
jmp 0x2dee
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x3022
movq %rbx, %rdi
callq 0x2220