#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*/ printf(char *, ...);
int main(int argc, char **argv) {
  int entier = 12;
  int *p1;
  char caractere = 'A';
  char *p2;
  p1 = &entier;
  printf("Affichage de entier : %d\n", entier);
  printf("Affichage de p1 : %p\n", p1);
  printf("Affichage du contenu à l'adresse de p1 : %d\n\n", *p1);
  p2 = &caractere;
  printf("Affichage de caractere : %c\n", caractere);
  printf("Affichage de p2 : %p\n", p2);
  printf("Affichage du contenu à l'adresse de p2 : %c\n\n", *p2);
  *p2 = 'C';
  printf("Affichage de caractere après modification de la valeur contenue dans "
         "p2 : %c\n",
         caractere);
  (*p2)++;
  printf("Affichage de caractere après incrémentation de la valeur contenue "
         "dans p2 : %c\n\n",
         caractere);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xc,-0x14(%rbp)
movb   $0x41,-0x21(%rbp)
lea    -0x14(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x14(%rbp),%esi
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%rsi
lea    0xec5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%rax
mov    (%rax),%esi
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x21(%rbp),%rax
mov    %rax,-0x30(%rbp)
movsbl -0x21(%rbp),%esi
lea    0xedc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x30(%rbp),%rsi
lea    0xee7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x30(%rbp),%rax
movsbl (%rax),%esi
lea    0xee8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x30(%rbp),%rax
movb   $0x43,(%rax)
movsbl -0x21(%rbp),%esi
lea    0xefe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x30(%rbp),%rax
mov    (%rax),%cl
add    $0x1,%cl
mov    %cl,(%rax)
movsbl -0x21(%rbp),%esi
lea    0xf30(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0xc,0x4(%rsp)
movb   $0x41,0x3(%rsp)
lea    0xedb(%rip),%rdi
mov    $0xc,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee2(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x4(%rsp),%esi
lea    0xee1(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf02(%rip),%rdi
mov    $0x41,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf0c(%rip),%rdi
lea    0x3(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
movsbl 0x3(%rsp),%esi
lea    0xf0a(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
movb   $0x43,0x3(%rsp)
lea    0xf26(%rip),%rdi
mov    $0x43,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x3(%rsp),%al
add    $0x1,%al
mov    %al,0x3(%rsp)
movsbl %al,%esi
lea    0xf55(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Affichage de entier : %d\0A\00"
@.str.1 = [22 x i8] c"Affichage de p1 : %p\0A\00"
@.str.2 = [47 x i8] c"Affichage du contenu \C3\A0 l'adresse de p1 : %d\0A\0A\00"
@.str.3 = [29 x i8] c"Affichage de caractere : %c\0A\00"
@.str.4 = [22 x i8] c"Affichage de p2 : %p\0A\00"
@.str.5 = [47 x i8] c"Affichage du contenu \C3\A0 l'adresse de p2 : %c\0A\0A\00"
@.str.6 = [79 x i8] c"Affichage de caractere apr\C3\A8s modification de la valeur contenue dans p2 : %c\0A\00"
@.str.7 = [83 x i8] c"Affichage de caractere apr\C3\A8s incr\C3\A9mentation de la valeur contenue dans p2 : %c\0A\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i8
%9 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 12, i32* %6
store i8 65, i8* %8
store i32* %6, i32** %7
%10 = load i32, i32* %6
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = load i32*, i32** %7
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32* %12)
%14 = load i32*, i32** %7
%15 = load i32, i32* %14
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0), i32 %15)
store i8* %8, i8** %9
%17 = load i8, i8* %8
%18 = sext i8 %17 to i32
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0), i32 %18)
%20 = load i8*, i8** %9
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0), i8* %20)
%22 = load i8*, i8** %9
%23 = load i8, i8* %22
%24 = sext i8 %23 to i32
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.5, i64 0, i64 0), i32 %24)
%26 = load i8*, i8** %9
store i8 67, i8* %26
%27 = load i8, i8* %8
%28 = sext i8 %27 to i32
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.6, i64 0, i64 0), i32 %28)
%30 = load i8*, i8** %9
%31 = load i8, i8* %30
%32 = add i8 %31, 1
store i8 %32, i8* %30
%33 = load i8, i8* %8
%34 = sext i8 %33 to i32
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str.7, i64 0, i64 0), i32 %34)
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"Affichage de entier : %d\0A\00"
@.str.1 = [22 x i8] c"Affichage de p1 : %p\0A\00"
@.str.2 = [47 x i8] c"Affichage du contenu \C3\A0 l'adresse de p1 : %d\0A\0A\00"
@.str.3 = [29 x i8] c"Affichage de caractere : %c\0A\00"
@.str.4 = [22 x i8] c"Affichage de p2 : %p\0A\00"
@.str.5 = [47 x i8] c"Affichage du contenu \C3\A0 l'adresse de p2 : %c\0A\0A\00"
@.str.6 = [79 x i8] c"Affichage de caractere apr\C3\A8s modification de la valeur contenue dans p2 : %c\0A\00"
@.str.7 = [83 x i8] c"Affichage de caractere apr\C3\A8s incr\C3\A9mentation de la valeur contenue dans p2 : %c\0A\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i8
%5 = bitcast i32* %3 to i8*
store i32 12, i32* %3
store i8 65, i8* %4
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 12)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%8 = load i32, i32* %3
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0), i32 %8)
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0), i32 65)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0), i8* %4)
%12 = load i8, i8* %4
%13 = sext i8 %12 to i32
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.5, i64 0, i64 0), i32 %13)
store i8 67, i8* %4
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([79 x i8], [79 x i8]* @.str.6, i64 0, i64 0), i32 67)
%16 = load i8, i8* %4
%17 = add i8 %16, 1
store i8 %17, i8* %4
%18 = sext i8 %17 to i32
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([83 x i8], [83 x i8]* @.str.7, i64 0, i64 0), i32 %18)
ret i32 0
}