#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 */

/* Variables and functions */
int /*<<< orphan*/ remove(char *);
int /*<<< orphan*/ system(char *);
void gp2x_module_deinit(void) {
  system("/sbin/rmmod mousedev &> /dev/null");
  system("/sbin/rmmod keybdev  &> /dev/null");
  system("/sbin/rmmod joydev   &> /dev/null");
  system("/sbin/rmmod input    &> /dev/null");
  system("/sbin/rmmod minimal  &> /dev/null");
  remove("/mnt/minimal.o");
}


x86 assembly (clang, -O0):
<gp2x_module_deinit>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <system@plt>
lea    0xeeb(%rip),%rdi
call   1040 <system@plt>
lea    0xf01(%rip),%rdi
call   1040 <system@plt>
lea    0xf17(%rip),%rdi
call   1040 <system@plt>
lea    0xf2d(%rip),%rdi
call   1040 <system@plt>
lea    0xf43(%rip),%rdi
call   1030 <remove@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gp2x_module_deinit>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <system@plt>
lea    0xeee(%rip),%rdi
call   1040 <system@plt>
lea    0xf04(%rip),%rdi
call   1040 <system@plt>
lea    0xf1a(%rip),%rdi
call   1040 <system@plt>
lea    0xf30(%rip),%rdi
call   1040 <system@plt>
lea    0xf46(%rip),%rdi
pop    %rax
jmp    1030 <remove@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"/sbin/rmmod mousedev &> /dev/null\00"
@.str.1 = [34 x i8] c"/sbin/rmmod keybdev &> /dev/null\00"
@.str.2 = [34 x i8] c"/sbin/rmmod joydev &> /dev/null\00"
@.str.3 = [34 x i8] c"/sbin/rmmod input &> /dev/null\00"
@.str.4 = [34 x i8] c"/sbin/rmmod minimal &> /dev/null\00"
@.str.5 = [15 x i8] c"/mnt/minimal.o\00"
define void @gp2x_module_deinit() {
%1 = call i32 @system(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @system(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @system(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @system(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @system(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @remove(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"/sbin/rmmod mousedev &> /dev/null\00"
@.str.1 = [34 x i8] c"/sbin/rmmod keybdev &> /dev/null\00"
@.str.2 = [34 x i8] c"/sbin/rmmod joydev &> /dev/null\00"
@.str.3 = [34 x i8] c"/sbin/rmmod input &> /dev/null\00"
@.str.4 = [34 x i8] c"/sbin/rmmod minimal &> /dev/null\00"
@.str.5 = [15 x i8] c"/mnt/minimal.o\00"
define void @gp2x_module_deinit() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @system(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @system(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @system(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @system(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0))
%6 = tail call i32 @remove(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0))
ret void
}