#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 LireParametre(char *, char *, char *);
int ModifierInformationsConfig(char *, char *);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int RetournerInformationConfig(char *parametreALire, char *valeurDefaut,
                               char *resultat) {
  int retourFonction =
      LireParametre("switchmanager.config", parametreALire, resultat);
  if (retourFonction != 200)
    return retourFonction;
  if (strcmp(resultat, "") == 0) {
    retourFonction = ModifierInformationsConfig(parametreALire, valeurDefaut);
    if (retourFonction != 200)
      return retourFonction;
    strcpy(resultat, valeurDefaut);
  }
  return 200;
}


x86 assembly (clang, -O0):
<RetournerInformationConfig>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
lea    0xe9d(%rip),%rdi
call   1060 <LireParametre@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0xc8,-0x24(%rbp)
je     1183 <RetournerInformationConfig+0x43>
mov    -0x24(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    11d9 <RetournerInformationConfig+0x99>
mov    -0x20(%rbp),%rdi
lea    0xe86(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    11d2 <RetournerInformationConfig+0x92>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <ModifierInformationsConfig@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0xc8,-0x24(%rbp)
je     11c5 <RetournerInformationConfig+0x85>
mov    -0x24(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    11d9 <RetournerInformationConfig+0x99>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcpy@plt>
movl   $0xc8,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RetournerInformationConfig>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r15
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xeab(%rip),%rdi
mov    %rbx,%rsi
call   1060 <LireParametre@plt>
cmp    $0xc8,%eax
jne    11a2 <RetournerInformationConfig+0x62>
lea    0xea9(%rip),%rsi
mov    %r15,%rdi
call   1050 <strcmp@plt>
mov    %rax,%rcx
mov    $0xc8,%eax
test   %rcx,%rcx
jne    11a2 <RetournerInformationConfig+0x62>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <ModifierInformationsConfig@plt>
cmp    $0xc8,%eax
jne    11a2 <RetournerInformationConfig+0x62>
mov    %r15,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    $0xc8,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [21 x i8] c"switchmanager.config\00"
@.str.1 = [1 x i8] zeroinitializer
define i32 @RetournerInformationConfig(i8* %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
%9 = load i8*, i8** %5
%10 = load i8*, i8** %7
%11 = call i32 @LireParametre(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %9, i8* %10)
store i32 %11, i32* %8
%12 = load i32, i32* %8
%13 = icmp ne i32 %12, 200
br i1 %13, label %14, label %16
14: ; preds = %3
%15 = load i32, i32* %8
store i32 %15, i32* %4
br label %33
16: ; preds = %3
%17 = load i8*, i8** %7
%18 = call i64 @strcmp(i8* %17, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%19 = icmp eq i64 %18, 0
br i1 %19, label %20, label %32
20: ; preds = %16
%21 = load i8*, i8** %5
%22 = load i8*, i8** %6
%23 = call i32 @ModifierInformationsConfig(i8* %21, i8* %22)
store i32 %23, i32* %8
%24 = load i32, i32* %8
%25 = icmp ne i32 %24, 200
br i1 %25, label %26, label %28
26: ; preds = %20
%27 = load i32, i32* %8
store i32 %27, i32* %4
br label %33
28: ; preds = %20
%29 = load i8*, i8** %7
%30 = load i8*, i8** %6
%31 = call i32 @strcpy(i8* %29, i8* %30)
br label %32
32: ; preds = %28, %16
store i32 200, i32* %4
br label %33
33: ; preds = %32, %26, %14
%34 = load i32, i32* %4
ret i32 %34
}

LLVM IR (-O2):
@.str = [21 x i8] c"switchmanager.config\00"
@.str.1 = [1 x i8] zeroinitializer
define i32 @RetournerInformationConfig(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @LireParametre(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %2)
%5 = icmp eq i32 %4, 200
br i1 %5, label %6, label %14
6: ; preds = %3
%7 = tail call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %6
%10 = tail call i32 @ModifierInformationsConfig(i8* %0, i8* %1)
%11 = icmp eq i32 %10, 200
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = tail call i32 @strcpy(i8* %2, i8* %1)
br label %14
14: ; preds = %6, %12, %9, %3
%15 = phi i32 [ %4, %3 ], [ %10, %9 ], [ 200, %12 ], [ 200, %6 ]
ret i32 %15
}