#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*/ bzero(char *, int);
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ write(int, char *, int);
void donner_position_serveur(int correspondant, int positionPerso[2]) {
  char positionChar[100] = "";
  write(correspondant, "true", 100);
  bzero(positionChar, 100);
  sprintf(positionChar, "%d", positionPerso[0]);
  write(correspondant, positionChar, 100);
  bzero(positionChar, 100);
  sprintf(positionChar, "%d", positionPerso[1]);
  write(correspondant, positionChar, 100);
}


x86 assembly (clang, -O0):
<donner_position_serveur>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x80(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1040 <memset@plt>
mov    -0x4(%rbp),%edi
lea    0xe94(%rip),%rsi
mov    $0x64,%edx
call   1030 <write@plt>
lea    -0x80(%rbp),%rdi
mov    $0x64,%esi
call   1050 <bzero@plt>
lea    -0x80(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%edx
lea    0xe70(%rip),%rsi
call   1060 <sprintf@plt>
mov    -0x4(%rbp),%edi
lea    -0x80(%rbp),%rsi
mov    $0x64,%edx
call   1030 <write@plt>
lea    -0x80(%rbp),%rdi
mov    $0x64,%esi
call   1050 <bzero@plt>
lea    -0x80(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%edx
lea    0xe3a(%rip),%rsi
call   1060 <sprintf@plt>
mov    -0x4(%rbp),%edi
lea    -0x80(%rbp),%rsi
mov    $0x64,%edx
call   1030 <write@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<donner_position_serveur>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x68,%rsp
mov    %rsi,%r14
mov    %edi,%ebp
xorps  %xmm0,%xmm0
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
movl   $0x0,0x60(%rsp)
lea    0xe92(%rip),%rsi
mov    $0x64,%edx
call   1030 <write@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x64,%esi
call   1040 <bzero@plt>
mov    (%r14),%edx
lea    0xe73(%rip),%r15
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <sprintf@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0x64,%edx
call   1030 <write@plt>
mov    %rbx,%rdi
mov    $0x64,%esi
call   1040 <bzero@plt>
mov    0x4(%r14),%edx
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <sprintf@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0x64,%edx
call   1030 <write@plt>
add    $0x68,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"true\00"
@.str.1 = [3 x i8] c"%d\00"
define void @donner_position_serveur(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca [100 x i8]
store i32 %0, i32* %3
store i32* %1, i32** %4
%6 = bitcast [100 x i8]* %5 to i8*
%7 = load i32, i32* %3
%8 = call i32 @write(i32 %7, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 100)
%9 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%10 = call i32 @bzero(i8* %9, i32 100)
%11 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%12 = load i32*, i32** %4
%13 = getelementptr inbounds i32, i32* %12, i64 0
%14 = load i32, i32* %13
%15 = call i32 @sprintf(i8* %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %14)
%16 = load i32, i32* %3
%17 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%18 = call i32 @write(i32 %16, i8* %17, i32 100)
%19 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%20 = call i32 @bzero(i8* %19, i32 100)
%21 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%22 = load i32*, i32** %4
%23 = getelementptr inbounds i32, i32* %22, i64 1
%24 = load i32, i32* %23
%25 = call i32 @sprintf(i8* %21, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %24)
%26 = load i32, i32* %3
%27 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%28 = call i32 @write(i32 %26, i8* %27, i32 100)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"true\00"
@.str.1 = [3 x i8] c"%d\00"
define void @donner_position_serveur(i32 %0, i32* nocapture %1) {
%3 = alloca [100 x i8]
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%5 = tail call i32 @write(i32 %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 100)
%6 = call i32 @bzero(i8* %4, i32 100)
%7 = load i32, i32* %1
%8 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = call i32 @write(i32 %0, i8* %4, i32 100)
%10 = call i32 @bzero(i8* %4, i32 100)
%11 = getelementptr inbounds i32, i32* %1, i64 1
%12 = load i32, i32* %11
%13 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %12)
%14 = call i32 @write(i32 %0, i8* %4, i32 100)
ret void
}