#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*/ main();
int mkdir(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ system(char *);
int host(void) {
  system("cls");
  printf("Verzeichnis wird erstellt!\n");
  if (mkdir("C:\\Lan-Folder") == -1) {
    printf("Verzeichnis gefunden!\n");
  }
  if (mkdir("C:\\Lan-Folder") == 0) {
    printf("Verzeichnis erstellt!\n\n");
  }
  system("net share LAN-DRIVE=C:\\Lan-Folder /GRANT:Jeder,FULL");
  system("echo Bitte teile den Nutzern diesen Namen mit: ");
  printf("\n\n");
  printf("\n");
  printf("######################################################\n");
  printf("\n");
  system("echo                     %computername%");
  printf("\n");
  printf("######################################################\n");
  printf("\n");
  system("pause");
  main();
}


x86 assembly (clang, -O0):
<host>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeb1(%rip),%rdi
call   1040 <system@plt>
lea    0xea9(%rip),%rdi
call   1050 <printf@plt>
lea    0xeb9(%rip),%rdi
call   1030 <mkdir@plt>
cmp    $0xffffffff,%eax
jne    1181 <host+0x41>
lea    0xeb2(%rip),%rdi
call   1050 <printf@plt>
lea    0xe98(%rip),%rdi
call   1030 <mkdir@plt>
cmp    $0x0,%eax
jne    11a2 <host+0x62>
lea    0xea8(%rip),%rdi
call   1050 <printf@plt>
lea    0xeb4(%rip),%rdi
call   1040 <system@plt>
lea    0xedc(%rip),%rdi
call   1040 <system@plt>
lea    0xe99(%rip),%rdi
call   1050 <printf@plt>
lea    0xe8e(%rip),%rdi
call   1050 <printf@plt>
lea    0xee8(%rip),%rdi
call   1050 <printf@plt>
lea    0xe76(%rip),%rdi
call   1050 <printf@plt>
lea    0xf08(%rip),%rdi
call   1040 <system@plt>
lea    0xe5e(%rip),%rdi
call   1050 <printf@plt>
lea    0xeb8(%rip),%rdi
call   1050 <printf@plt>
lea    0xe46(%rip),%rdi
call   1050 <printf@plt>
lea    0xf00(%rip),%rdi
call   1040 <system@plt>
mov    $0x0,%al
call   1060 <main@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<host>:
push   %rbx
lea    0xea8(%rip),%rdi
call   1060 <system@plt>
lea    0xf40(%rip),%rdi
call   1050 <puts@plt>
lea    0xe94(%rip),%rdi
call   1040 <mkdir@plt>
cmp    $0xffffffff,%eax
jne    1186 <host+0x36>
lea    0xf8c(%rip),%rdi
call   1050 <puts@plt>
lea    0xe77(%rip),%rdi
call   1040 <mkdir@plt>
test   %eax,%eax
jne    11a2 <host+0x52>
lea    0xf59(%rip),%rdi
call   1050 <puts@plt>
lea    0xe69(%rip),%rdi
call   1060 <system@plt>
lea    0xe91(%rip),%rdi
call   1060 <system@plt>
lea    0xf4a(%rip),%rdi
call   1050 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
call   1050 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe86(%rip),%rdi
call   1060 <system@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
call   1050 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe86(%rip),%rdi
call   1060 <system@plt>
xor    %eax,%eax
pop    %rbx
jmp    1070 <main@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"cls\00"
@.str.1 = [28 x i8] c"Verzeichnis wird erstellt!\0A\00"
@.str.2 = [14 x i8] c"C:\\Lan-Folder\00"
@.str.3 = [23 x i8] c"Verzeichnis gefunden!\0A\00"
@.str.4 = [24 x i8] c"Verzeichnis erstellt!\0A\0A\00"
@.str.5 = [52 x i8] c"net share LAN-DRIVE=C:\\Lan-Folder /GRANT:Jeder,FULL\00"
@.str.6 = [48 x i8] c"echo Bitte teile den Nutzern diesen Namen mit: \00"
@.str.7 = [3 x i8] c"\0A\0A\00"
@.str.8 = [2 x i8] c"\0A\00"
@.str.9 = [56 x i8] c"######################################################\0A\00"
@.str.10 = [40 x i8] c"echo %computername%\00"
@.str.11 = [6 x i8] c"pause\00"
define i32 @host() {
%1 = alloca i32
%2 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @mkdir(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
br label %8
8: ; preds = %6, %0
%9 = call i32 @mkdir(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0))
br label %13
13: ; preds = %11, %8
%14 = call i32 @system(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.5, i64 0, i64 0))
%15 = call i32 @system(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.6, i64 0, i64 0))
%16 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
%17 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%18 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.9, i64 0, i64 0))
%19 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%20 = call i32 @system(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.10, i64 0, i64 0))
%21 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%22 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.9, i64 0, i64 0))
%23 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%24 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0))
%25 = call i32 (...) @main()
%26 = load i32, i32* %1
ret i32 %26
}

LLVM IR (-O2):
@.str = [4 x i8] c"cls\00"
@.str.2 = [14 x i8] c"C:\\Lan-Folder\00"
@.str.5 = [52 x i8] c"net share LAN-DRIVE=C:\\Lan-Folder /GRANT:Jeder,FULL\00"
@.str.6 = [48 x i8] c"echo Bitte teile den Nutzern diesen Namen mit: \00"
@.str.10 = [40 x i8] c"echo %computername%\00"
@.str.11 = [6 x i8] c"pause\00"
@str = [27 x i8] c"Verzeichnis wird erstellt!\00"
@str.12 = [2 x i8] c"\0A\00"
@str.14 = [55 x i8] c"######################################################\00"
@str.15 = [23 x i8] c"Verzeichnis erstellt!\0A\00"
@str.16 = [22 x i8] c"Verzeichnis gefunden!\00"
define i32 @host() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @mkdir(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.16, i64 0, i64 0))
br label %7
7: ; preds = %5, %0
%8 = tail call i32 @mkdir(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.15, i64 0, i64 0))
br label %12
12: ; preds = %10, %7
%13 = tail call i32 @system(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.5, i64 0, i64 0))
%14 = tail call i32 @system(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.6, i64 0, i64 0))
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.12, i64 0, i64 0))
%16 = tail call i32 @putchar(i32 10)
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str.14, i64 0, i64 0))
%18 = tail call i32 @putchar(i32 10)
%19 = tail call i32 @system(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.10, i64 0, i64 0))
%20 = tail call i32 @putchar(i32 10)
%21 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str.14, i64 0, i64 0))
%22 = tail call i32 @putchar(i32 10)
%23 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0))
%24 = tail call i32 (...) @main()
ret i32 undef
}