#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*/ rmdir(char *);
int /*<<< orphan*/ sprintf(char *, char *, char const *);
void viderDossierInventaireSauvegarde(const char *nomPartie) {
  char chemin[200];
  sprintf(chemin, "Sauvegarde/%s/Inventaire/tek.txt", nomPartie);
  remove(chemin);
  sprintf(chemin, "Sauvegarde/%s/Inventaire/armure.txt", nomPartie);
  remove(chemin);
  sprintf(chemin, "Sauvegarde/%s/Inventaire/arme.txt", nomPartie);
  remove(chemin);
  sprintf(chemin, "Sauvegarde/%s/Inventaire/tresor.txt", nomPartie);
  remove(chemin);
  sprintf(chemin, "Sauvegarde/%s/Inventaire/potion.txt", nomPartie);
  remove(chemin);
  sprintf(chemin, "Sauvegarde/%s/Inventaire/cle.txt", nomPartie);
  remove(chemin);
  sprintf(chemin, "Sauvegarde/%s/Inventaire", nomPartie);
  rmdir(chemin);
}


x86 assembly (clang, -O0):
<viderDossierInventaireSauvegarde>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xd0(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xeaf(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0xd0(%rbp),%rdi
call   1030 <remove@plt>
lea    -0xd0(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xead(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0xd0(%rbp),%rdi
call   1030 <remove@plt>
lea    -0xd0(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xeae(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0xd0(%rbp),%rdi
call   1030 <remove@plt>
lea    -0xd0(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xead(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0xd0(%rbp),%rdi
call   1030 <remove@plt>
lea    -0xd0(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xeae(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0xd0(%rbp),%rdi
call   1030 <remove@plt>
lea    -0xd0(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xeaf(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0xd0(%rbp),%rdi
call   1030 <remove@plt>
lea    -0xd0(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xead(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0xd0(%rbp),%rdi
call   1040 <rmdir@plt>
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<viderDossierInventaireSauvegarde>:
push   %r14
push   %rbx
sub    $0xc8,%rsp
mov    %rdi,%rbx
lea    0xebc(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
mov    %rbx,%rdx
call   1050 <sprintf@plt>
mov    %r14,%rdi
call   1030 <remove@plt>
lea    0xec0(%rip),%rsi
mov    %r14,%rdi
mov    %rbx,%rdx
call   1050 <sprintf@plt>
mov    %r14,%rdi
call   1030 <remove@plt>
lea    0xeca(%rip),%rsi
mov    %r14,%rdi
mov    %rbx,%rdx
call   1050 <sprintf@plt>
mov    %r14,%rdi
call   1030 <remove@plt>
lea    0xed2(%rip),%rsi
mov    %r14,%rdi
mov    %rbx,%rdx
call   1050 <sprintf@plt>
mov    %r14,%rdi
call   1030 <remove@plt>
lea    0xedc(%rip),%rsi
mov    %r14,%rdi
mov    %rbx,%rdx
call   1050 <sprintf@plt>
mov    %r14,%rdi
call   1030 <remove@plt>
lea    0xee6(%rip),%rsi
mov    %r14,%rdi
mov    %rbx,%rdx
call   1050 <sprintf@plt>
mov    %r14,%rdi
call   1030 <remove@plt>
lea    0xeed(%rip),%rsi
mov    %r14,%rdi
mov    %rbx,%rdx
call   1050 <sprintf@plt>
mov    %r14,%rdi
call   1040 <rmdir@plt>
add    $0xc8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [33 x i8] c"Sauvegarde/%s/Inventaire/tek.txt\00"
@.str.1 = [36 x i8] c"Sauvegarde/%s/Inventaire/armure.txt\00"
@.str.2 = [34 x i8] c"Sauvegarde/%s/Inventaire/arme.txt\00"
@.str.3 = [36 x i8] c"Sauvegarde/%s/Inventaire/tresor.txt\00"
@.str.4 = [36 x i8] c"Sauvegarde/%s/Inventaire/potion.txt\00"
@.str.5 = [33 x i8] c"Sauvegarde/%s/Inventaire/cle.txt\00"
@.str.6 = [25 x i8] c"Sauvegarde/%s/Inventaire\00"
define void @viderDossierInventaireSauvegarde(i8* %0) {
%2 = alloca i8*
%3 = alloca [200 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%8 = call i32 @remove(i8* %7)
%9 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%10 = load i8*, i8** %2
%11 = call i32 @sprintf(i8* %9, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i8* %10)
%12 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%13 = call i32 @remove(i8* %12)
%14 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%15 = load i8*, i8** %2
%16 = call i32 @sprintf(i8* %14, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i8* %15)
%17 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%18 = call i32 @remove(i8* %17)
%19 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%20 = load i8*, i8** %2
%21 = call i32 @sprintf(i8* %19, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i8* %20)
%22 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%23 = call i32 @remove(i8* %22)
%24 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%25 = load i8*, i8** %2
%26 = call i32 @sprintf(i8* %24, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0), i8* %25)
%27 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%28 = call i32 @remove(i8* %27)
%29 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%30 = load i8*, i8** %2
%31 = call i32 @sprintf(i8* %29, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), i8* %30)
%32 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%33 = call i32 @remove(i8* %32)
%34 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%35 = load i8*, i8** %2
%36 = call i32 @sprintf(i8* %34, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0), i8* %35)
%37 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%38 = call i32 @rmdir(i8* %37)
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"Sauvegarde/%s/Inventaire/tek.txt\00"
@.str.1 = [36 x i8] c"Sauvegarde/%s/Inventaire/armure.txt\00"
@.str.2 = [34 x i8] c"Sauvegarde/%s/Inventaire/arme.txt\00"
@.str.3 = [36 x i8] c"Sauvegarde/%s/Inventaire/tresor.txt\00"
@.str.4 = [36 x i8] c"Sauvegarde/%s/Inventaire/potion.txt\00"
@.str.5 = [33 x i8] c"Sauvegarde/%s/Inventaire/cle.txt\00"
@.str.6 = [25 x i8] c"Sauvegarde/%s/Inventaire\00"
define void @viderDossierInventaireSauvegarde(i8* %0) {
%2 = alloca [200 x i8]
%3 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = call i32 @remove(i8* %3)
%6 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%7 = call i32 @remove(i8* %3)
%8 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i8* %0)
%9 = call i32 @remove(i8* %3)
%10 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i8* %0)
%11 = call i32 @remove(i8* %3)
%12 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0), i8* %0)
%13 = call i32 @remove(i8* %3)
%14 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.5, i64 0, i64 0), i8* %0)
%15 = call i32 @remove(i8* %3)
%16 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0), i8* %0)
%17 = call i32 @rmdir(i8* %3)
ret void
}