#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*/ MINITELChangerAttribut(int, int);
int /*<<< orphan*/ MINITELCurseurXY(int, int, int);
int /*<<< orphan*/ MINITELEnvoyerCaractere(int, char);
int /*<<< orphan*/ MINITELEnvoyerTexte(int, unsigned char *);
int /*<<< orphan*/ printf(char *);
void InitChat(int iFdMinitel) {
  printf("Vidage de l'écran...\n");
  MINITELEnvoyerCaractere(iFdMinitel, 0x0C);
  printf(" -\n");
  printf("Intro...\n");
  MINITELCurseurXY(iFdMinitel, 1, 1);
  int k = 0;
  MINITELCurseurXY(iFdMinitel, 2, 1);
  MINITELChangerAttribut(iFdMinitel, 0x4F);
  MINITELEnvoyerTexte(iFdMinitel, (unsigned char *)"// (ratyle //");
  MINITELChangerAttribut(iFdMinitel, 0x4C);
  MINITELCurseurXY(iFdMinitel, 3, 1);
  for (k = 0; k < 40; k++) {
    MINITELEnvoyerCaractere(iFdMinitel, '_');
  }
}


x86 assembly (clang, -O0):
<InitChat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xe9e(%rip),%rdi
call   1060 <printf@plt>
mov    -0x4(%rbp),%edi
mov    $0xc,%esi
call   1070 <MINITELEnvoyerCaractere@plt>
lea    0xe9c(%rip),%rdi
call   1060 <printf@plt>
lea    0xe94(%rip),%rdi
call   1060 <printf@plt>
mov    -0x4(%rbp),%edi
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <MINITELCurseurXY@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x2,%esi
mov    $0x1,%edx
call   1030 <MINITELCurseurXY@plt>
mov    -0x4(%rbp),%edi
mov    $0x4f,%esi
call   1050 <MINITELChangerAttribut@plt>
mov    -0x4(%rbp),%edi
lea    0xe5a(%rip),%rsi
call   1040 <MINITELEnvoyerTexte@plt>
mov    -0x4(%rbp),%edi
mov    $0x4c,%esi
call   1050 <MINITELChangerAttribut@plt>
mov    -0x4(%rbp),%edi
mov    $0x3,%esi
mov    $0x1,%edx
call   1030 <MINITELCurseurXY@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x28,-0x8(%rbp)
jge    121b <InitChat+0xcb>
mov    -0x4(%rbp),%edi
mov    $0x5f,%esi
call   1070 <MINITELEnvoyerCaractere@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11f6 <InitChat+0xa6>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<InitChat>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0xeb2(%rip),%rdi
call   1050 <puts@plt>
mov    %ebx,%edi
mov    $0xc,%esi
call   1070 <MINITELEnvoyerCaractere@plt>
lea    0xeb0(%rip),%rdi
call   1050 <puts@plt>
lea    0xea7(%rip),%rdi
call   1050 <puts@plt>
mov    %ebx,%edi
mov    $0x1,%esi
mov    $0x1,%edx
call   1030 <MINITELCurseurXY@plt>
mov    %ebx,%edi
mov    $0x2,%esi
mov    $0x1,%edx
call   1030 <MINITELCurseurXY@plt>
mov    %ebx,%edi
mov    $0x4f,%esi
call   1060 <MINITELChangerAttribut@plt>
lea    0xe46(%rip),%rsi
mov    %ebx,%edi
call   1040 <MINITELEnvoyerTexte@plt>
mov    %ebx,%edi
mov    $0x4c,%esi
call   1060 <MINITELChangerAttribut@plt>
mov    %ebx,%edi
mov    $0x3,%esi
mov    $0x1,%edx
call   1030 <MINITELCurseurXY@plt>
mov    $0x28,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebx,%edi
mov    $0x5f,%esi
call   1070 <MINITELEnvoyerCaractere@plt>
add    $0xffffffff,%ebp
jne    11f0 <InitChat+0xa0>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [23 x i8] c"Vidage de l'\C3\A9cran...\0A\00"
@.str.1 = [4 x i8] c" -\0A\00"
@.str.2 = [10 x i8] c"Intro...\0A\00"
@.str.3 = [14 x i8] c"// (ratyle //\00"
define void @InitChat(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* %2
%6 = call i32 @MINITELEnvoyerCaractere(i32 %5, i8 signext 12)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%9 = load i32, i32* %2
%10 = call i32 @MINITELCurseurXY(i32 %9, i32 1, i32 1)
store i32 0, i32* %3
%11 = load i32, i32* %2
%12 = call i32 @MINITELCurseurXY(i32 %11, i32 2, i32 1)
%13 = load i32, i32* %2
%14 = call i32 @MINITELChangerAttribut(i32 %13, i32 79)
%15 = load i32, i32* %2
%16 = call i32 @MINITELEnvoyerTexte(i32 %15, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
%17 = load i32, i32* %2
%18 = call i32 @MINITELChangerAttribut(i32 %17, i32 76)
%19 = load i32, i32* %2
%20 = call i32 @MINITELCurseurXY(i32 %19, i32 3, i32 1)
store i32 0, i32* %3
br label %21
21: ; preds = %27, %1
%22 = load i32, i32* %3
%23 = icmp slt i32 %22, 40
br i1 %23, label %24, label %30
24: ; preds = %21
%25 = load i32, i32* %2
%26 = call i32 @MINITELEnvoyerCaractere(i32 %25, i8 signext 95)
br label %27
27: ; preds = %24
%28 = load i32, i32* %3
%29 = add nsw i32 %28, 1
store i32 %29, i32* %3
br label %21
30: ; preds = %21
ret void
}

LLVM IR (-O2):
@.str.3 = [14 x i8] c"// (ratyle //\00"
@str = [22 x i8] c"Vidage de l'\C3\A9cran...\00"
@str.4 = [3 x i8] c" -\00"
@str.5 = [9 x i8] c"Intro...\00"
define void @InitChat(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @MINITELEnvoyerCaractere(i32 %0, i8 signext 12)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str.4, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.5, i64 0, i64 0))
%6 = tail call i32 @MINITELCurseurXY(i32 %0, i32 1, i32 1)
%7 = tail call i32 @MINITELCurseurXY(i32 %0, i32 2, i32 1)
%8 = tail call i32 @MINITELChangerAttribut(i32 %0, i32 79)
%9 = tail call i32 @MINITELEnvoyerTexte(i32 %0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
%10 = tail call i32 @MINITELChangerAttribut(i32 %0, i32 76)
%11 = tail call i32 @MINITELCurseurXY(i32 %0, i32 3, i32 1)
br label %12
12: ; preds = %1, %12
%13 = phi i32 [ 0, %1 ], [ %15, %12 ]
%14 = tail call i32 @MINITELEnvoyerCaractere(i32 %0, i8 signext 95)
%15 = add nuw nsw i32 %13, 1
%16 = icmp eq i32 %15, 40
br i1 %16, label %17, label %12
17: ; preds = %12
ret void
}