#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef void proc_dir_entry;

/* Variables and functions */
int /*<<< orphan*/ remove_proc_entry(char *, void *);
void viafb_remove_proc(struct proc_dir_entry *viafb_entry) {
  remove_proc_entry("dvp0", viafb_entry);
  remove_proc_entry("dvp1", viafb_entry);
  remove_proc_entry("dfph", viafb_entry);
  remove_proc_entry("dfpl", viafb_entry);
  remove_proc_entry("vt1636", viafb_entry);
  remove_proc_entry("vt1625", viafb_entry);
  remove_proc_entry("viafb", ((void *)0));
}


x86 assembly (clang, -O0):
<viafb_remove_proc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <remove_proc_entry@plt>
mov    -0x8(%rbp),%rsi
lea    0xece(%rip),%rdi
call   1030 <remove_proc_entry@plt>
mov    -0x8(%rbp),%rsi
lea    0xec3(%rip),%rdi
call   1030 <remove_proc_entry@plt>
mov    -0x8(%rbp),%rsi
lea    0xeb8(%rip),%rdi
call   1030 <remove_proc_entry@plt>
mov    -0x8(%rbp),%rsi
lea    0xead(%rip),%rdi
call   1030 <remove_proc_entry@plt>
mov    -0x8(%rbp),%rsi
lea    0xea4(%rip),%rdi
call   1030 <remove_proc_entry@plt>
lea    0xe9f(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <remove_proc_entry@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<viafb_remove_proc>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
mov    %rbx,%rsi
call   1030 <remove_proc_entry@plt>
lea    0xedb(%rip),%rdi
mov    %rbx,%rsi
call   1030 <remove_proc_entry@plt>
lea    0xed1(%rip),%rdi
mov    %rbx,%rsi
call   1030 <remove_proc_entry@plt>
lea    0xec7(%rip),%rdi
mov    %rbx,%rsi
call   1030 <remove_proc_entry@plt>
lea    0xebd(%rip),%rdi
mov    %rbx,%rsi
call   1030 <remove_proc_entry@plt>
lea    0xeb5(%rip),%rdi
mov    %rbx,%rsi
call   1030 <remove_proc_entry@plt>
lea    0xead(%rip),%rdi
xor    %esi,%esi
pop    %rbx
jmp    1030 <remove_proc_entry@plt>

LLVM IR (-O0):
%struct.proc_dir_entry = type opaque
@.str = [5 x i8] c"dvp0\00"
@.str.1 = [5 x i8] c"dvp1\00"
@.str.2 = [5 x i8] c"dfph\00"
@.str.3 = [5 x i8] c"dfpl\00"
@.str.4 = [7 x i8] c"vt1636\00"
@.str.5 = [7 x i8] c"vt1625\00"
@.str.6 = [6 x i8] c"viafb\00"
define void @viafb_remove_proc(%struct.proc_dir_entry* %0) {
%2 = alloca %struct.proc_dir_entry*
store %struct.proc_dir_entry* %0, %struct.proc_dir_entry** %2
%3 = load %struct.proc_dir_entry*, %struct.proc_dir_entry** %2
%4 = bitcast %struct.proc_dir_entry* %3 to i8*
%5 = call i32 @remove_proc_entry(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load %struct.proc_dir_entry*, %struct.proc_dir_entry** %2
%7 = bitcast %struct.proc_dir_entry* %6 to i8*
%8 = call i32 @remove_proc_entry(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%9 = load %struct.proc_dir_entry*, %struct.proc_dir_entry** %2
%10 = bitcast %struct.proc_dir_entry* %9 to i8*
%11 = call i32 @remove_proc_entry(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %10)
%12 = load %struct.proc_dir_entry*, %struct.proc_dir_entry** %2
%13 = bitcast %struct.proc_dir_entry* %12 to i8*
%14 = call i32 @remove_proc_entry(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %13)
%15 = load %struct.proc_dir_entry*, %struct.proc_dir_entry** %2
%16 = bitcast %struct.proc_dir_entry* %15 to i8*
%17 = call i32 @remove_proc_entry(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* %16)
%18 = load %struct.proc_dir_entry*, %struct.proc_dir_entry** %2
%19 = bitcast %struct.proc_dir_entry* %18 to i8*
%20 = call i32 @remove_proc_entry(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* %19)
%21 = call i32 @remove_proc_entry(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8* null)
ret void
}

LLVM IR (-O2):
%struct.proc_dir_entry = type opaque
@.str = [5 x i8] c"dvp0\00"
@.str.1 = [5 x i8] c"dvp1\00"
@.str.2 = [5 x i8] c"dfph\00"
@.str.3 = [5 x i8] c"dfpl\00"
@.str.4 = [7 x i8] c"vt1636\00"
@.str.5 = [7 x i8] c"vt1625\00"
@.str.6 = [6 x i8] c"viafb\00"
define void @viafb_remove_proc(%struct.proc_dir_entry* %0) {
%2 = bitcast %struct.proc_dir_entry* %0 to i8*
%3 = tail call i32 @remove_proc_entry(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = tail call i32 @remove_proc_entry(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%5 = tail call i32 @remove_proc_entry(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %2)
%6 = tail call i32 @remove_proc_entry(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8* %2)
%7 = tail call i32 @remove_proc_entry(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* %2)
%8 = tail call i32 @remove_proc_entry(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* %2)
%9 = tail call i32 @remove_proc_entry(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8* null)
ret void
}