#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*/ strcpy(char *, char *);
int /*<<< orphan*/ strlen(char *);
scalar_t__ strncmp(char *, char *, int /*<<< orphan*/);
char *strstr(char *, char *);
int copieTexteDeConfig(char *parametre, char *ligne, char *configParam) {
  char *valeurDansLaLigne;
  if (strncmp(parametre, ligne, strlen(parametre)) == 0) {
    valeurDansLaLigne = strstr((char *)ligne, "=");
    valeurDansLaLigne = valeurDansLaLigne + strlen("=");
    strcpy(configParam, valeurDansLaLigne);
    return 200;
  }
  return 404;
}


x86 assembly (clang, -O0):
<copieTexteDeConfig>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x38(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    11d7 <copieTexteDeConfig+0x97>
mov    -0x18(%rbp),%rdi
lea    0xe6f(%rip),%rsi
call   1060 <strstr@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x40(%rbp)
lea    0xe57(%rip),%rdi
call   1050 <strlen@plt>
mov    %eax,%ecx
mov    -0x40(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1040 <strcpy@plt>
movl   $0xc8,-0x4(%rbp)
jmp    11de <copieTexteDeConfig+0x9e>
movl   $0x194,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copieTexteDeConfig>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
call   1050 <strlen@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
mov    %rax,%rcx
mov    $0x194,%eax
test   %rcx,%rcx
jne    119c <copieTexteDeConfig+0x5c>
mov    %r15,%rdi
mov    $0x3d,%esi
call   1060 <strchr@plt>
mov    %rax,%rbx
lea    0xe7c(%rip),%rdi
call   1050 <strlen@plt>
movslq %eax,%rsi
add    %rbx,%rsi
mov    %r14,%rdi
call   1040 <strcpy@plt>
mov    $0xc8,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [2 x i8] c"=\00"
define i32 @copieTexteDeConfig(i8* %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %5
%12 = call i32 @strlen(i8* %11)
%13 = call i64 @strncmp(i8* %9, i8* %10, i32 %12)
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %25
15: ; preds = %3
%16 = load i8*, i8** %6
%17 = call i8* @strstr(i8* %16, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %17, i8** %8
%18 = load i8*, i8** %8
%19 = call i32 @strlen(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8, i8* %18, i64 %20
store i8* %21, i8** %8
%22 = load i8*, i8** %7
%23 = load i8*, i8** %8
%24 = call i32 @strcpy(i8* %22, i8* %23)
store i32 200, i32* %4
br label %26
25: ; preds = %3
store i32 404, i32* %4
br label %26
26: ; preds = %25, %15
%27 = load i32, i32* %4
ret i32 %27
}

LLVM IR (-O2):
@.str = [2 x i8] c"=\00"
define i32 @copieTexteDeConfig(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @strlen(i8* %0)
%5 = tail call i64 @strncmp(i8* %0, i8* %1, i32 %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %3
%8 = tail call i8* @strchr(i8* dereferenceable(1) %1, i32 61)
%9 = tail call i32 @strlen(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %8, i64 %10
%12 = tail call i32 @strcpy(i8* %2, i8* %11)
br label %13
13: ; preds = %3, %7
%14 = phi i32 [ 200, %7 ], [ 404, %3 ]
ret i32 %14
}