#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 *);
int /*<<< orphan*/ viderDossierNiveauSauvegardeCaverne(char const *);
int /*<<< orphan*/ viderDossierNiveauSauvegardeSalle(char const *);
void viderDossierNiveauSauvegarde(const char *nomPartie) {
  char chemin[200];
  viderDossierNiveauSauvegardeSalle(nomPartie);
  viderDossierNiveauSauvegardeCaverne(nomPartie);
  sprintf(chemin, "Sauvegarde/%s/Niveau/salle_actuelle.txt", nomPartie);
  remove(chemin);
  sprintf(chemin, "Sauvegarde/%s/Niveau/position_joueur.txt", nomPartie);
  remove(chemin);
  sprintf(chemin, "Sauvegarde/%s/Niveau", nomPartie);
  rmdir(chemin);
}


x86 assembly (clang, -O0):
<viderDossierNiveauSauvegarde>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1070 <viderDossierNiveauSauvegardeSalle@plt>
mov    -0x8(%rbp),%rdi
call   1050 <viderDossierNiveauSauvegardeCaverne@plt>
lea    -0xd0(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xe7d(%rip),%rsi
call   1060 <sprintf@plt>
lea    -0xd0(%rbp),%rdi
call   1030 <remove@plt>
lea    -0xd0(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xe82(%rip),%rsi
call   1060 <sprintf@plt>
lea    -0xd0(%rbp),%rdi
call   1030 <remove@plt>
lea    -0xd0(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xe88(%rip),%rsi
call   1060 <sprintf@plt>
lea    -0xd0(%rbp),%rdi
call   1040 <rmdir@plt>
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<viderDossierNiveauSauvegarde>:
push   %r14
push   %rbx
sub    $0xc8,%rsp
mov    %rdi,%rbx
call   1070 <viderDossierNiveauSauvegardeSalle@plt>
mov    %rbx,%rdi
call   1050 <viderDossierNiveauSauvegardeCaverne@plt>
lea    0xe8f(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
mov    %rbx,%rdx
call   1060 <sprintf@plt>
mov    %r14,%rdi
call   1030 <remove@plt>
lea    0xe9a(%rip),%rsi
mov    %r14,%rdi
mov    %rbx,%rdx
call   1060 <sprintf@plt>
mov    %r14,%rdi
call   1030 <remove@plt>
lea    0xea9(%rip),%rsi
mov    %r14,%rdi
mov    %rbx,%rdx
call   1060 <sprintf@plt>
mov    %r14,%rdi
call   1040 <rmdir@plt>
add    $0xc8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [40 x i8] c"Sauvegarde/%s/Niveau/salle_actuelle.txt\00"
@.str.1 = [41 x i8] c"Sauvegarde/%s/Niveau/position_joueur.txt\00"
@.str.2 = [21 x i8] c"Sauvegarde/%s/Niveau\00"
define void @viderDossierNiveauSauvegarde(i8* %0) {
%2 = alloca i8*
%3 = alloca [200 x i8]
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @viderDossierNiveauSauvegardeSalle(i8* %4)
%6 = load i8*, i8** %2
%7 = call i32 @viderDossierNiveauSauvegardeCaverne(i8* %6)
%8 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%9 = load i8*, i8** %2
%10 = call i32 @sprintf(i8* %8, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%12 = call i32 @remove(i8* %11)
%13 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%14 = load i8*, i8** %2
%15 = call i32 @sprintf(i8* %13, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i8* %14)
%16 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%17 = call i32 @remove(i8* %16)
%18 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%19 = load i8*, i8** %2
%20 = call i32 @sprintf(i8* %18, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i8* %19)
%21 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%22 = call i32 @rmdir(i8* %21)
ret void
}

LLVM IR (-O2):
@.str = [40 x i8] c"Sauvegarde/%s/Niveau/salle_actuelle.txt\00"
@.str.1 = [41 x i8] c"Sauvegarde/%s/Niveau/position_joueur.txt\00"
@.str.2 = [21 x i8] c"Sauvegarde/%s/Niveau\00"
define void @viderDossierNiveauSauvegarde(i8* %0) {
%2 = alloca [200 x i8]
%3 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%4 = tail call i32 @viderDossierNiveauSauvegardeSalle(i8* %0)
%5 = tail call i32 @viderDossierNiveauSauvegardeCaverne(i8* %0)
%6 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* %0)
%7 = call i32 @remove(i8* %3)
%8 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%9 = call i32 @remove(i8* %3)
%10 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i8* %0)
%11 = call i32 @rmdir(i8* %3)
ret void
}