#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 */
char *malloc(int);
int /*<<< orphan*/ printf(char *, char);
void without_type_qualifier(void) {
  char *pc_a = malloc(1), *pc_b = malloc(1);
  *pc_a = 'a', *pc_b = 'b';
  printf("*pc_a"
         " = %c\n",
         (*pc_a));
  printf("*pc_b"
         " = %c\n",
         (*pc_b));
  pc_b = pc_a;
  printf("*pc_a"
         " = %c\n",
         (*pc_a));
  printf("*pc_b"
         " = %c\n",
         (*pc_b));
}


x86 assembly (clang, -O0):
<without_type_qualifier>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    $0x1,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x61,(%rax)
mov    -0x10(%rbp),%rax
movb   $0x62,(%rax)
mov    -0x8(%rbp),%rax
lea    0xea3(%rip),%rdi
movsbl (%rax),%esi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
lea    0xe9c(%rip),%rdi
movsbl (%rax),%esi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
lea    0xe75(%rip),%rdi
movsbl (%rax),%esi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
lea    0xe6e(%rip),%rdi
movsbl (%rax),%esi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<without_type_qualifier>:
push   %r14
push   %rbx
push   %rax
lea    0xee5(%rip),%r14
mov    %r14,%rdi
mov    $0x61,%esi
call   1030 <printf@plt>
lea    0xedd(%rip),%rbx
mov    %rbx,%rdi
mov    $0x62,%esi
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0x61,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x61,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [12 x i8] c"*pc_a = %c\0A\00"
@.str.1 = [12 x i8] c"*pc_b = %c\0A\00"
define void @without_type_qualifier() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8 signext 97)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8 signext 98)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8 signext 97)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8 signext 97)
ret void
}