// File: /workspace/github_c_makefile_star2_O0/Cloudef[P]dwm-fork/dwm.c
// Function: applyrules
void
applyrules(Client *c) {
   const char *class, *instance;
   unsigned int i;
   const Rule *r;
   Monitor *m;
   XClassHint ch = { 0 };

   /* rule matching */
   c->iswidget = False;
   c->isbelow  = False;
   c->isabove  = False;
   c->iszombie = False;
   c->issticky = False;
   c->isborder = True;
   c->isfloating   = c->tags = 0;
   c->isfullscreen = False;
   if(XGetClassHint(dpy, c->win, &ch)) {
      class = ch.res_class ? ch.res_class : broken;
      instance = ch.res_name ? ch.res_name : broken;
      for(i = 0; i < LENGTH(rules); i++) {
         r = &rules[i];
         if((!r->title || strstr(c->name, r->title))
               && (!r->class || strstr(class, r->class))
               && (!r->instance || strstr(instance, r->instance)))
         {
            c->isfloating = r->isfloating;
            c->iswidget   = r->iswidget;
            c->isbelow    = r->isbelow;
            c->isabove    = r->isabove;
            c->iszombie   = r->iszombie;
            c->issticky   = r->issticky;
            c->isborder   = r->isborder;
            c->tags |= r->tags;
            for(m = mons; m && m->num != r->monitor; m = m->next);
            if(m)
               c->mon = m;
         }
      }
      if(ch.res_class)
         XFree(ch.res_class);
      if(ch.res_name)
         XFree(ch.res_name);
   }
   c->tags = c->tags & TAGMASK ? c->tags & TAGMASK : c->mon->tagset[c->mon->seltags];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
leaq -0x40(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x50a0
movq -0x8(%rbp), %rax
movl $0x0, 0x170(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x174(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x178(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x17c(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x180(%rax)
movq -0x8(%rbp), %rax
movl $0x1, 0x16c(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x15c(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x168(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x160(%rax)
movq 0x8257(%rip), %rdi      # 0x18618
movq -0x8(%rbp), %rax
movq 0x1a8(%rax), %rsi
leaq -0x40(%rbp), %rdx
callq 0x5380
cmpl $0x0, %eax
je 0x105e4
cmpq $0x0, -0x38(%rbp)
je 0x103ef
movq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x103fc
leaq 0x1e2a(%rip), %rax      # 0x12220
movq %rax, -0x48(%rbp)
jmp 0x103fc
movq -0x48(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x10415
movq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
jmp 0x10422
leaq 0x1e04(%rip), %rax      # 0x12220
movq %rax, -0x50(%rbp)
jmp 0x10422
movq -0x50(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpq $0xb, %rax
jae 0x105c2
movl -0x1c(%rbp), %eax
movl %eax, %ecx
leaq 0x5e96(%rip), %rax      # 0x162e0
shlq $0x6, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x1047b
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x53e0
cmpq $0x0, %rax
je 0x105b2
movq -0x28(%rbp), %rax
cmpq $0x0, (%rax)
je 0x1049f
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rax
movq (%rax), %rsi
callq 0x53e0
cmpq $0x0, %rax
je 0x105b2
movq -0x28(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x104c5
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x53e0
cmpq $0x0, %rax
je 0x105b2
movq -0x28(%rbp), %rax
movl 0x1c(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x168(%rax)
movq -0x28(%rbp), %rax
movl 0x20(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x170(%rax)
movq -0x28(%rbp), %rax
movl 0x24(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x174(%rax)
movq -0x28(%rbp), %rax
movl 0x28(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x178(%rax)
movq -0x28(%rbp), %rax
movl 0x2c(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x17c(%rax)
movq -0x28(%rbp), %rax
movl 0x30(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x180(%rax)
movq -0x28(%rbp), %rax
movl 0x34(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x16c(%rax)
movq -0x28(%rbp), %rax
movl 0x18(%rax), %ecx
movq -0x8(%rbp), %rax
orl 0x15c(%rax), %ecx
movl %ecx, 0x15c(%rax)
movq 0x809e(%rip), %rax      # 0x185f8
movq %rax, -0x30(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x30(%rbp)
movb %al, -0x51(%rbp)
je 0x1057e
movq -0x30(%rbp), %rax
movl 0x14(%rax), %eax
movq -0x28(%rbp), %rcx
cmpl 0x38(%rcx), %eax
setne %al
movb %al, -0x51(%rbp)
movb -0x51(%rbp), %al
testb $0x1, %al
jne 0x10587
jmp 0x1059a
jmp 0x10589
movq -0x30(%rbp), %rax
movq 0x90(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x1055e
cmpq $0x0, -0x30(%rbp)
je 0x105b0
movq -0x30(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x1a0(%rax)
jmp 0x105b2
jmp 0x105b4
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x10431
cmpq $0x0, -0x38(%rbp)
je 0x105d2
movq -0x38(%rbp), %rdi
callq 0x5070
cmpq $0x0, -0x40(%rbp)
je 0x105e2
movq -0x40(%rbp), %rdi
callq 0x5070
jmp 0x105e4
movq -0x8(%rbp), %rax
movl 0x15c(%rax), %eax
andl $0x1ff, %eax            # imm = 0x1FF
cmpl $0x0, %eax
je 0x1060c
movq -0x8(%rbp), %rax
movl 0x15c(%rax), %eax
andl $0x1ff, %eax            # imm = 0x1FF
movl %eax, -0x58(%rbp)
jmp 0x1062c
movq -0x8(%rbp), %rax
movq 0x1a0(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x1a0(%rcx), %rcx
movl 0x58(%rcx), %ecx
movl 0x60(%rax,%rcx,4), %eax
movl %eax, -0x58(%rbp)
movl -0x58(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x15c(%rax)
addq $0x60, %rsp
popq %rbp
retq
nop