#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*/ chdir(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ system(char *);
int GET_UPDATE() {
  char com[5012];
  printf("Changing Directory...\n");
  chdir("Downloads");
  printf("DOWNLOADING!!! DO NOT HALT THE PROGRAM NOW!\n");
  system("wget https://github.com/DatOneLefty/ForceOS/archive/master.zip");
  system("unzip master.zip");
  system("cp -fR ForceOS-master/* ../../ForceOS");
}


x86 assembly (clang, -O0):
<GET_UPDATE>:
push   %rbp
mov    %rsp,%rbp
sub    $0x13a0,%rsp
lea    0xebe(%rip),%rdi
call   1050 <printf@plt>
lea    0xec9(%rip),%rdi
call   1030 <chdir@plt>
lea    0xec7(%rip),%rdi
call   1050 <printf@plt>
lea    0xee8(%rip),%rdi
call   1040 <system@plt>
lea    0xf1b(%rip),%rdi
call   1040 <system@plt>
lea    0xf20(%rip),%rdi
call   1040 <system@plt>
mov    -0x4(%rbp),%eax
add    $0x13a0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GET_UPDATE>:
push   %rax
lea    0xf48(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
call   1040 <chdir@plt>
lea    0xf46(%rip),%rdi
call   1030 <puts@plt>
lea    0xeae(%rip),%rdi
call   1050 <system@plt>
lea    0xee1(%rip),%rdi
call   1050 <system@plt>
lea    0xee6(%rip),%rdi
pop    %rax
jmp    1050 <system@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"Changing Directory...\0A\00"
@.str.1 = [10 x i8] c"Downloads\00"
@.str.2 = [45 x i8] c"DOWNLOADING!!! DO NOT HALT THE PROGRAM NOW!\0A\00"
@.str.3 = [63 x i8] c"wget https://github.com/DatOneLefty/ForceOS/archive/master.zip\00"
@.str.4 = [17 x i8] c"unzip master.zip\00"
@.str.5 = [38 x i8] c"cp -fR ForceOS-master/* ../../ForceOS\00"
define i32 @GET_UPDATE() {
%1 = alloca i32
%2 = alloca [5012 x i8]
%3 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @chdir(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @system(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.3, i64 0, i64 0))
%7 = call i32 @system(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
%8 = call i32 @system(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.5, i64 0, i64 0))
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
@.str.1 = [10 x i8] c"Downloads\00"
@.str.3 = [63 x i8] c"wget https://github.com/DatOneLefty/ForceOS/archive/master.zip\00"
@.str.4 = [17 x i8] c"unzip master.zip\00"
@.str.5 = [38 x i8] c"cp -fR ForceOS-master/* ../../ForceOS\00"
@str = [22 x i8] c"Changing Directory...\00"
@str.6 = [44 x i8] c"DOWNLOADING!!! DO NOT HALT THE PROGRAM NOW!\00"
define i32 @GET_UPDATE() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @chdir(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.6, i64 0, i64 0))
%4 = tail call i32 @system(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @system(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
%6 = tail call i32 @system(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.5, i64 0, i64 0))
ret i32 undef
}