#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*/ system(char *);
int motor_driver_enable() {
  system("echo 48 > /sys/class/gpio/export");
  system("echo 47 > /sys/class/gpio/export");
  system("echo 15 > /sys/class/gpio/export");
  system("echo 14 > /sys/class/gpio/export");
  system("echo 49 > /sys/class/gpio/export");
  system("echo out > /sys/class/gpio/gpio48/direction");
  system("echo out > /sys/class/gpio/gpio47/direction");
  system("echo out > /sys/class/gpio/gpio15/direction");
  system("echo out > /sys/class/gpio/gpio14/direction");
  system("echo out > /sys/class/gpio/gpio49/direction");
  system("echo mode1 > /sys/kernel/debug/gpio_debug/gpio12/current_pinmux");
  system("echo 0 > /sys/class/pwm/pwmchip0/export");
  system("echo 1000000 > /sys/class/pwm/pwmchip0/pwm0/period");
  system("echo 1 > /sys/class/pwm/pwmchip0/pwm0/enable");
  system("echo mode1 > /sys/kernel/debug/gpio_debug/gpio13/current_pinmux");
  system("echo 1 > /sys/class/pwm/pwmchip0/export");
  system("echo 1000000 > /sys/class/pwm/pwmchip0/pwm1/period");
  system("echo 1 > /sys/class/pwm/pwmchip0/pwm1/enable");
  system("echo 1 > /sys/class/gpio/gpio49/value");
  return 1;
}


x86 assembly (clang, -O0):
<motor_driver_enable>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <system@plt>
lea    0xefa(%rip),%rdi
call   1030 <system@plt>
lea    0xf0f(%rip),%rdi
call   1030 <system@plt>
lea    0xf24(%rip),%rdi
call   1030 <system@plt>
lea    0xf39(%rip),%rdi
call   1030 <system@plt>
lea    0xf4e(%rip),%rdi
call   1030 <system@plt>
lea    0xf6e(%rip),%rdi
call   1030 <system@plt>
lea    0xf8e(%rip),%rdi
call   1030 <system@plt>
lea    0xfae(%rip),%rdi
call   1030 <system@plt>
lea    0xfce(%rip),%rdi
call   1030 <system@plt>
lea    0xfee(%rip),%rdi
call   1030 <system@plt>
lea    0x1022(%rip),%rdi
call   1030 <system@plt>
lea    0x103e(%rip),%rdi
call   1030 <system@plt>
lea    0x1065(%rip),%rdi
call   1030 <system@plt>
lea    0x1086(%rip),%rdi
call   1030 <system@plt>
lea    0x10ba(%rip),%rdi
call   1030 <system@plt>
lea    0x10d6(%rip),%rdi
call   1030 <system@plt>
lea    0x10fd(%rip),%rdi
call   1030 <system@plt>
lea    0x111e(%rip),%rdi
call   1030 <system@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<motor_driver_enable>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <system@plt>
lea    0xefd(%rip),%rdi
call   1030 <system@plt>
lea    0xf12(%rip),%rdi
call   1030 <system@plt>
lea    0xf27(%rip),%rdi
call   1030 <system@plt>
lea    0xf3c(%rip),%rdi
call   1030 <system@plt>
lea    0xf51(%rip),%rdi
call   1030 <system@plt>
lea    0xf71(%rip),%rdi
call   1030 <system@plt>
lea    0xf91(%rip),%rdi
call   1030 <system@plt>
lea    0xfb1(%rip),%rdi
call   1030 <system@plt>
lea    0xfd1(%rip),%rdi
call   1030 <system@plt>
lea    0xff1(%rip),%rdi
call   1030 <system@plt>
lea    0x1025(%rip),%rdi
call   1030 <system@plt>
lea    0x1041(%rip),%rdi
call   1030 <system@plt>
lea    0x1068(%rip),%rdi
call   1030 <system@plt>
lea    0x1089(%rip),%rdi
call   1030 <system@plt>
lea    0x10bd(%rip),%rdi
call   1030 <system@plt>
lea    0x10d9(%rip),%rdi
call   1030 <system@plt>
lea    0x1100(%rip),%rdi
call   1030 <system@plt>
lea    0x1121(%rip),%rdi
call   1030 <system@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [33 x i8] c"echo 48 > /sys/class/gpio/export\00"
@.str.1 = [33 x i8] c"echo 47 > /sys/class/gpio/export\00"
@.str.2 = [33 x i8] c"echo 15 > /sys/class/gpio/export\00"
@.str.3 = [33 x i8] c"echo 14 > /sys/class/gpio/export\00"
@.str.4 = [33 x i8] c"echo 49 > /sys/class/gpio/export\00"
@.str.5 = [44 x i8] c"echo out > /sys/class/gpio/gpio48/direction\00"
@.str.6 = [44 x i8] c"echo out > /sys/class/gpio/gpio47/direction\00"
@.str.7 = [44 x i8] c"echo out > /sys/class/gpio/gpio15/direction\00"
@.str.8 = [44 x i8] c"echo out > /sys/class/gpio/gpio14/direction\00"
@.str.9 = [44 x i8] c"echo out > /sys/class/gpio/gpio49/direction\00"
@.str.10 = [64 x i8] c"echo mode1 > /sys/kernel/debug/gpio_debug/gpio12/current_pinmux\00"
@.str.11 = [40 x i8] c"echo 0 > /sys/class/pwm/pwmchip0/export\00"
@.str.12 = [51 x i8] c"echo 1000000 > /sys/class/pwm/pwmchip0/pwm0/period\00"
@.str.13 = [45 x i8] c"echo 1 > /sys/class/pwm/pwmchip0/pwm0/enable\00"
@.str.14 = [64 x i8] c"echo mode1 > /sys/kernel/debug/gpio_debug/gpio13/current_pinmux\00"
@.str.15 = [40 x i8] c"echo 1 > /sys/class/pwm/pwmchip0/export\00"
@.str.16 = [51 x i8] c"echo 1000000 > /sys/class/pwm/pwmchip0/pwm1/period\00"
@.str.17 = [45 x i8] c"echo 1 > /sys/class/pwm/pwmchip0/pwm1/enable\00"
@.str.18 = [38 x i8] c"echo 1 > /sys/class/gpio/gpio49/value\00"
define i32 @motor_driver_enable() {
%1 = call i32 @system(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @system(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @system(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @system(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @system(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @system(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 @system(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.6, i64 0, i64 0))
%8 = call i32 @system(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.7, i64 0, i64 0))
%9 = call i32 @system(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.8, i64 0, i64 0))
%10 = call i32 @system(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.9, i64 0, i64 0))
%11 = call i32 @system(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.10, i64 0, i64 0))
%12 = call i32 @system(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.11, i64 0, i64 0))
%13 = call i32 @system(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.12, i64 0, i64 0))
%14 = call i32 @system(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.13, i64 0, i64 0))
%15 = call i32 @system(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.14, i64 0, i64 0))
%16 = call i32 @system(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.15, i64 0, i64 0))
%17 = call i32 @system(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.16, i64 0, i64 0))
%18 = call i32 @system(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.17, i64 0, i64 0))
%19 = call i32 @system(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.18, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@.str = [33 x i8] c"echo 48 > /sys/class/gpio/export\00"
@.str.1 = [33 x i8] c"echo 47 > /sys/class/gpio/export\00"
@.str.2 = [33 x i8] c"echo 15 > /sys/class/gpio/export\00"
@.str.3 = [33 x i8] c"echo 14 > /sys/class/gpio/export\00"
@.str.4 = [33 x i8] c"echo 49 > /sys/class/gpio/export\00"
@.str.5 = [44 x i8] c"echo out > /sys/class/gpio/gpio48/direction\00"
@.str.6 = [44 x i8] c"echo out > /sys/class/gpio/gpio47/direction\00"
@.str.7 = [44 x i8] c"echo out > /sys/class/gpio/gpio15/direction\00"
@.str.8 = [44 x i8] c"echo out > /sys/class/gpio/gpio14/direction\00"
@.str.9 = [44 x i8] c"echo out > /sys/class/gpio/gpio49/direction\00"
@.str.10 = [64 x i8] c"echo mode1 > /sys/kernel/debug/gpio_debug/gpio12/current_pinmux\00"
@.str.11 = [40 x i8] c"echo 0 > /sys/class/pwm/pwmchip0/export\00"
@.str.12 = [51 x i8] c"echo 1000000 > /sys/class/pwm/pwmchip0/pwm0/period\00"
@.str.13 = [45 x i8] c"echo 1 > /sys/class/pwm/pwmchip0/pwm0/enable\00"
@.str.14 = [64 x i8] c"echo mode1 > /sys/kernel/debug/gpio_debug/gpio13/current_pinmux\00"
@.str.15 = [40 x i8] c"echo 1 > /sys/class/pwm/pwmchip0/export\00"
@.str.16 = [51 x i8] c"echo 1000000 > /sys/class/pwm/pwmchip0/pwm1/period\00"
@.str.17 = [45 x i8] c"echo 1 > /sys/class/pwm/pwmchip0/pwm1/enable\00"
@.str.18 = [38 x i8] c"echo 1 > /sys/class/gpio/gpio49/value\00"
define i32 @motor_driver_enable() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @system(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @system(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @system(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @system(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0))
%6 = tail call i32 @system(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.5, i64 0, i64 0))
%7 = tail call i32 @system(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.6, i64 0, i64 0))
%8 = tail call i32 @system(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.7, i64 0, i64 0))
%9 = tail call i32 @system(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.8, i64 0, i64 0))
%10 = tail call i32 @system(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.9, i64 0, i64 0))
%11 = tail call i32 @system(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.10, i64 0, i64 0))
%12 = tail call i32 @system(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.11, i64 0, i64 0))
%13 = tail call i32 @system(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.12, i64 0, i64 0))
%14 = tail call i32 @system(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.13, i64 0, i64 0))
%15 = tail call i32 @system(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.14, i64 0, i64 0))
%16 = tail call i32 @system(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.15, i64 0, i64 0))
%17 = tail call i32 @system(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.16, i64 0, i64 0))
%18 = tail call i32 @system(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.17, i64 0, i64 0))
%19 = tail call i32 @system(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.18, i64 0, i64 0))
ret i32 1
}