#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*/ client_emission(char *);
int /*<<< orphan*/ client_init(char *, char *);
int /*<<< orphan*/ client_nouvelUtilisateur();
char *client_reception();
int /*<<< orphan*/ client_terminaison();
int /*<<< orphan*/ printf(char *, ...);
int main() {
  char *message;
  client_init("localhost", "5050");
  client_emission("HEL test_$");
  client_nouvelUtilisateur();
  message = client_reception();
  if (message != NULL) {
    printf("Reception d'un message:\n");
    printf("%s\n", message);
  }
  client_terminaison();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe8a(%rip),%rdi
lea    0xe8d(%rip),%rsi
call   1070 <client_init@plt>
lea    0xe86(%rip),%rdi
call   1050 <client_emission@plt>
mov    $0x0,%al
call   1060 <client_nouvelUtilisateur@plt>
mov    $0x0,%al
call   1030 <client_reception@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     11cb <main+0x6b>
lea    0xe68(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rsi
lea    0xe6f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1080 <client_terminaison@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xe98(%rip),%rdi
lea    0xe9b(%rip),%rsi
call   1070 <client_init@plt>
lea    0xe94(%rip),%rdi
call   1050 <client_emission@plt>
xor    %eax,%eax
call   1060 <client_nouvelUtilisateur@plt>
xor    %eax,%eax
call   1030 <client_reception@plt>
test   %rax,%rax
je     11aa <main+0x4a>
mov    %rax,%rbx
lea    0xe7d(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1080 <client_terminaison@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"localhost\00"
@.str.1 = [5 x i8] c"5050\00"
@.str.2 = [11 x i8] c"HEL test_$\00"
@.str.3 = [25 x i8] c"Reception d'un message:\0A\00"
@.str.4 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = call i32 @client_init(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @client_emission(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 (...) @client_nouvelUtilisateur()
%6 = call i8* (...) @client_reception()
store i8* %6, i8** %2
%7 = load i8*, i8** %2
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %13
9: ; preds = %0
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%11 = load i8*, i8** %2
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* %11)
br label %13
13: ; preds = %9, %0
%14 = call i32 (...) @client_terminaison()
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"localhost\00"
@.str.1 = [5 x i8] c"5050\00"
@.str.2 = [11 x i8] c"HEL test_$\00"
@str = [24 x i8] c"Reception d'un message:\00"
define i32 @main() {
%1 = tail call i32 @client_init(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @client_emission(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 (...) @client_nouvelUtilisateur()
%4 = tail call i8* (...) @client_reception()
%5 = icmp eq i8* %4, null
br i1 %5, label %9, label %6
6: ; preds = %0
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%8 = tail call i32 @puts(i8* %4)
br label %9
9: ; preds = %6, %0
%10 = tail call i32 (...) @client_terminaison()
ret i32 0
}