#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 *, char, char, ...);
int main(void) {
  char c = 'Q';
  char *char_pointer = &c;
  printf("%c %c %i\n", c, *char_pointer, *char_pointer);
  c = '/';
  printf("%c %c\n", c, *char_pointer);
  *char_pointer = '(';
  printf("%c %c\n", c, *char_pointer);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x51,-0x5(%rbp)
lea    -0x5(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x5(%rbp),%dl
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
lea    0xebe(%rip),%rdi
movsbl %dl,%esi
movsbl %al,%edx
mov    $0x0,%al
call   1030 <printf@plt>
movb   $0x2f,-0x5(%rbp)
mov    -0x5(%rbp),%cl
mov    -0x10(%rbp),%rax
lea    0xea9(%rip),%rdi
movsbl %cl,%esi
movsbl (%rax),%edx
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
movb   $0x28,(%rax)
mov    -0x5(%rbp),%cl
mov    -0x10(%rbp),%rax
lea    0xe87(%rip),%rdi
movsbl %cl,%esi
movsbl (%rax),%edx
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rdi
mov    $0x51,%esi
mov    $0x51,%edx
mov    $0x51,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed5(%rip),%rbx
mov    %rbx,%rdi
mov    $0x2f,%esi
mov    $0x2f,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x28,%esi
mov    $0x28,%edx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"%c %c %i\0A\00"
@.str.1 = [7 x i8] c"%c %c\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8*
store i32 0, i32* %1
store i8 81, i8* %2
store i8* %2, i8** %3
%4 = load i8, i8* %2
%5 = load i8*, i8** %3
%6 = load i8, i8* %5
%7 = load i8*, i8** %3
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = call i32 (i8*, i8, i8, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8 signext %4, i8 signext %6, i32 %9)
store i8 47, i8* %2
%11 = load i8, i8* %2
%12 = load i8*, i8** %3
%13 = load i8, i8* %12
%14 = call i32 (i8*, i8, i8, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8 signext %11, i8 signext %13)
%15 = load i8*, i8** %3
store i8 40, i8* %15
%16 = load i8, i8* %2
%17 = load i8*, i8** %3
%18 = load i8, i8* %17
%19 = call i32 (i8*, i8, i8, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8 signext %16, i8 signext %18)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"%c %c %i\0A\00"
@.str.1 = [7 x i8] c"%c %c\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, i8, i8, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8 signext 81, i8 signext 81, i32 81)
%2 = tail call i32 (i8*, i8, i8, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8 signext 47, i8 signext 47)
%3 = tail call i32 (i8*, i8, i8, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8 signext 40, i8 signext 40)
ret i32 0
}