// File: textbrowser[P]zepeto/zepeto.cc
// Function: zepeto::purge()
void zepeto::purge(void)
{
  DIR *dir = nullptr;
  struct dirent *dirent = nullptr;

  if((dir = opendir("/tmp")))
    while((dirent = readdir(dir)))
      if(strncmp(dirent->d_name,
		 ".zepeto.sourceme.",
		 strlen(".zepeto.sourceme.")) == 0)
	{
	  std::string string;

	  string += "/tmp/";
	  string += dirent->d_name;
	  std::remove(string.data());
	}

  if(dir)
    closedir(dir);

  if((dir = opendir(m_tempdir.data())))
    while((dirent = readdir(dir)))
      if(strncmp(dirent->d_name,
		 ".zepeto.sourceme.",
		 strlen(".zepeto.sourceme.")) == 0)
	{
	  std::string string;

	  string += m_tempdir;
	  string += "/";
	  string += dirent->d_name;
	  std::remove(string.data());
	}

  if(dir)
    closedir(dir);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %fs:0x28, %rax
movq %rax, -0x8(%rbp)
movq %rdi, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x78(%rbp)
movq $0x0, -0x58(%rbp)
movq $0x0, -0x60(%rbp)
leaq 0x9e17(%rip), %rdi      # 0x11022
callq 0x3520
movq %rax, -0x58(%rbp)
cmpq $0x0, %rax
je 0x72c4
jmp 0x7220
movq -0x58(%rbp), %rdi
callq 0x3530
movq %rax, -0x60(%rbp)
cmpq $0x0, %rax
je 0x72c2
movq -0x60(%rbp), %rdi
addq $0x13, %rdi
leaq 0x9de2(%rip), %rsi      # 0x11028
movl $0x11, %edx
callq 0x31a0
cmpl $0x0, %eax
jne 0x72bd
leaq -0x28(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x34d0
movq -0x80(%rbp), %rdi
leaq 0xa045(%rip), %rsi      # 0x112b2
callq 0x3340
jmp 0x7274
movq -0x60(%rbp), %rsi
addq $0x13, %rsi
leaq -0x28(%rbp), %rdi
callq 0x3340
jmp 0x7287
leaq -0x28(%rbp), %rdi
callq 0x3200
movq %rax, %rdi
callq 0x3620
leaq -0x28(%rbp), %rdi
callq 0x3250
jmp 0x72bd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x3250
jmp 0x73e8
jmp 0x7220
jmp 0x72c4
cmpq $0x0, -0x58(%rbp)
je 0x72d4
movq -0x58(%rbp), %rdi
callq 0x3580
movq -0x78(%rbp), %rdi
addq $0x140, %rdi            # imm = 0x140
callq 0x3200
movq %rax, %rdi
callq 0x3520
movq %rax, -0x58(%rbp)
cmpq $0x0, %rax
je 0x73bd
jmp 0x72fc
movq -0x58(%rbp), %rdi
callq 0x3530
movq %rax, -0x60(%rbp)
cmpq $0x0, %rax
je 0x73bb
movq -0x60(%rbp), %rdi
addq $0x13, %rdi
leaq 0x9d06(%rip), %rsi      # 0x11028
movl $0x11, %edx
callq 0x31a0
cmpl $0x0, %eax
jne 0x73b6
leaq -0x48(%rbp), %rdi
movq %rdi, -0x88(%rbp)
callq 0x34d0
movq -0x78(%rbp), %rsi
movq -0x88(%rbp), %rdi
addq $0x140, %rsi            # imm = 0x140
callq 0x3460
jmp 0x735e
leaq 0x9f51(%rip), %rsi      # 0x112b6
leaq -0x48(%rbp), %rdi
callq 0x3340
jmp 0x7370
movq -0x60(%rbp), %rsi
addq $0x13, %rsi
leaq -0x48(%rbp), %rdi
callq 0x3340
jmp 0x7383
leaq -0x48(%rbp), %rdi
callq 0x3200
movq %rax, %rdi
callq 0x3620
leaq -0x48(%rbp), %rdi
callq 0x3250
jmp 0x73b6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x3250
jmp 0x73e8
jmp 0x72fc
jmp 0x73bd
cmpq $0x0, -0x58(%rbp)
je 0x73cd
movq -0x58(%rbp), %rdi
callq 0x3580
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x7411
addq $0x90, %rsp
popq %rbp
retq
movq -0x68(%rbp), %rax
movq %rax, -0x90(%rbp)
movq %fs:0x28, %rax
movq -0x8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x7411
movq -0x90(%rbp), %rdi
callq 0x35f0
callq 0x33f0
nopw %cs:(%rax,%rax)