#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*/ sprintf(char *, char *, char *, char *, char *, ...);
void gestionInvalide(char *temp, int config_base, int invalide, char *DateHeure,
                     char *Papp, char *Base, char *Hchc, char *Hchp) {
  if (config_base == 1 && invalide == 0)
    sprintf(temp, "%s \t %s \t %s\r\n", DateHeure, Papp, Base);
  else if (config_base == 1 && invalide != 0)
    sprintf(temp, "%s \t %s \t %s \t %i\r\n", DateHeure, Papp, Base, invalide);
  else if (invalide == 0)
    sprintf(temp, "%s \t %s \t %s \t %s\r\n", DateHeure, Papp, Hchc, Hchp);
  else
    sprintf(temp, "%s \t %s \t %s \t %s \t %i\r\n", DateHeure, Papp, Hchc, Hchp,
            invalide);
}


x86 assembly (clang, -O0):
<gestionInvalide>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
cmpl   $0x1,-0xc(%rbp)
jne    116d <gestionInvalide+0x5d>
cmpl   $0x0,-0x10(%rbp)
jne    116d <gestionInvalide+0x5d>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
lea    0xea4(%rip),%rsi
mov    $0x0,%al
call   1030 <sprintf@plt>
jmp    120b <gestionInvalide+0xfb>
cmpl   $0x1,-0xc(%rbp)
jne    11a8 <gestionInvalide+0x98>
cmpl   $0x0,-0x10(%rbp)
je     11a8 <gestionInvalide+0x98>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x10(%rbp),%r9d
lea    0xe7d(%rip),%rsi
mov    $0x0,%al
call   1030 <sprintf@plt>
jmp    1206 <gestionInvalide+0xf6>
cmpl   $0x0,-0x10(%rbp)
jne    11d9 <gestionInvalide+0xc9>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    0x10(%rbp),%r8
mov    0x18(%rbp),%r9
lea    0xe33(%rip),%rsi
mov    $0x0,%al
call   1030 <sprintf@plt>
jmp    1201 <gestionInvalide+0xf1>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    0x10(%rbp),%r8
mov    0x18(%rbp),%r9
mov    -0x10(%rbp),%eax
lea    0xe1d(%rip),%rsi
mov    %eax,(%rsp)
mov    $0x0,%al
call   1030 <sprintf@plt>
jmp    1206 <gestionInvalide+0xf6>
jmp    120b <gestionInvalide+0xfb>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gestionInvalide>:
push   %rax
mov    %r9,%r11
mov    %edx,%eax
mov    0x18(%rsp),%r9
mov    0x10(%rsp),%r10
cmp    $0x1,%esi
jne    1142 <gestionInvalide+0x32>
test   %eax,%eax
jne    1142 <gestionInvalide+0x32>
lea    0xed5(%rip),%rsi
mov    %rcx,%rdx
mov    %r8,%rcx
mov    %r11,%r8
xor    %eax,%eax
pop    %r9
jmp    1030 <sprintf@plt>
cmp    $0x1,%esi
jne    1167 <gestionInvalide+0x57>
test   %eax,%eax
je     1167 <gestionInvalide+0x57>
lea    0xec7(%rip),%rsi
mov    %rcx,%rdx
mov    %r8,%rcx
mov    %r11,%r8
mov    %eax,%r9d
xor    %eax,%eax
pop    %r11
jmp    1030 <sprintf@plt>
test   %eax,%eax
je     1187 <gestionInvalide+0x77>
mov    %eax,(%rsp)
lea    0xe9f(%rip),%rsi
mov    %rcx,%rdx
mov    %r8,%rcx
mov    %r10,%r8
xor    %eax,%eax
call   1030 <sprintf@plt>
pop    %rax
ret
lea    0xe72(%rip),%rsi
mov    %rcx,%rdx
mov    %r8,%rcx
mov    %r10,%r8
xor    %eax,%eax
pop    %r11
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"%s \09 %s \09 %s\0D\0A\00"
@.str.1 = [20 x i8] c"%s \09 %s \09 %s \09 %i\0D\0A\00"
@.str.2 = [20 x i8] c"%s \09 %s \09 %s \09 %s\0D\0A\00"
@.str.3 = [25 x i8] c"%s \09 %s \09 %s \09 %s \09 %i\0D\0A\00"
define void @gestionInvalide(i8* %0, i32 %1, i32 %2, i8* %3, i8* %4, i8* %5, i8* %6, i8* %7) {
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i8*
%16 = alloca i8*
store i8* %0, i8** %9
store i32 %1, i32* %10
store i32 %2, i32* %11
store i8* %3, i8** %12
store i8* %4, i8** %13
store i8* %5, i8** %14
store i8* %6, i8** %15
store i8* %7, i8** %16
%17 = load i32, i32* %10
%18 = icmp eq i32 %17, 1
br i1 %18, label %19, label %28
19: ; preds = %8
%20 = load i32, i32* %11
%21 = icmp eq i32 %20, 0
br i1 %21, label %22, label %28
22: ; preds = %19
%23 = load i8*, i8** %9
%24 = load i8*, i8** %12
%25 = load i8*, i8** %13
%26 = load i8*, i8** %14
%27 = call i32 (i8*, i8*, i8*, i8*, i8*, ...) @sprintf(i8* %23, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %24, i8* %25, i8* %26)
br label %61
28: ; preds = %19, %8
%29 = load i32, i32* %10
%30 = icmp eq i32 %29, 1
br i1 %30, label %31, label %41
31: ; preds = %28
%32 = load i32, i32* %11
%33 = icmp ne i32 %32, 0
br i1 %33, label %34, label %41
34: ; preds = %31
%35 = load i8*, i8** %9
%36 = load i8*, i8** %12
%37 = load i8*, i8** %13
%38 = load i8*, i8** %14
%39 = load i32, i32* %11
%40 = call i32 (i8*, i8*, i8*, i8*, i8*, ...) @sprintf(i8* %35, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* %36, i8* %37, i8* %38, i32 %39)
br label %60
41: ; preds = %31, %28
%42 = load i32, i32* %11
%43 = icmp eq i32 %42, 0
br i1 %43, label %44, label %51
44: ; preds = %41
%45 = load i8*, i8** %9
%46 = load i8*, i8** %12
%47 = load i8*, i8** %13
%48 = load i8*, i8** %15
%49 = load i8*, i8** %16
%50 = call i32 (i8*, i8*, i8*, i8*, i8*, ...) @sprintf(i8* %45, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i8* %46, i8* %47, i8* %48, i8* %49)
br label %59
51: ; preds = %41
%52 = load i8*, i8** %9
%53 = load i8*, i8** %12
%54 = load i8*, i8** %13
%55 = load i8*, i8** %15
%56 = load i8*, i8** %16
%57 = load i32, i32* %11
%58 = call i32 (i8*, i8*, i8*, i8*, i8*, ...) @sprintf(i8* %52, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i8* %53, i8* %54, i8* %55, i8* %56, i32 %57)
br label %59
59: ; preds = %51, %44
br label %60
60: ; preds = %59, %34
br label %61
61: ; preds = %60, %22
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s \09 %s \09 %s\0D\0A\00"
@.str.1 = [20 x i8] c"%s \09 %s \09 %s \09 %i\0D\0A\00"
@.str.2 = [20 x i8] c"%s \09 %s \09 %s \09 %s\0D\0A\00"
@.str.3 = [25 x i8] c"%s \09 %s \09 %s \09 %s \09 %i\0D\0A\00"
define void @gestionInvalide(i8* nocapture writeonly %0, i32 %1, i32 %2, i8* %3, i8* %4, i8* %5, i8* %6, i8* %7) {
%9 = icmp eq i32 %1, 1
%10 = icmp eq i32 %2, 0
%11 = and i1 %9, %10
br i1 %11, label %12, label %14
12: ; preds = %8
%13 = tail call i32 (i8*, i8*, i8*, i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %4, i8* %5)
br label %24
14: ; preds = %8
%15 = icmp ne i32 %2, 0
%16 = and i1 %9, %15
br i1 %16, label %17, label %19
17: ; preds = %14
%18 = tail call i32 (i8*, i8*, i8*, i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* %3, i8* %4, i8* %5, i32 %2)
br label %24
19: ; preds = %14
br i1 %10, label %20, label %22
20: ; preds = %19
%21 = tail call i32 (i8*, i8*, i8*, i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i8* %3, i8* %4, i8* %6, i8* %7)
br label %24
22: ; preds = %19
%23 = tail call i32 (i8*, i8*, i8*, i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i8* %3, i8* %4, i8* %6, i8* %7, i32 %2)
br label %24
24: ; preds = %17, %22, %20, %12
ret void
}