#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, int *);
main() {
  static int a, b, *pt;
  a = 100;
  pt = &a;
  b = *pt;
  printf("aの値=%d\t aのアドレス=%p\n", a, &a);
  printf("bの値=%d\t bのアドレス=%p\n", b, &b);
  printf("ptの値=%p\t ptのアドレス=%p\n", a, &a);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x64,0x2f12(%rip)
lea    0x2f0b(%rip),%rax
mov    %rax,0x2f0c(%rip)
mov    0x2f05(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x2ef9(%rip)
mov    0x2eef(%rip),%esi
lea    0xeb8(%rip),%rdi
lea    0x2ee1(%rip),%rdx
call   1030 <printf@plt>
mov    0x2eda(%rip),%esi
lea    0xec0(%rip),%rdi
lea    0x2ecc(%rip),%rdx
call   1030 <printf@plt>
mov    0x2ebd(%rip),%esi
lea    0xec8(%rip),%rdi
lea    0x2eaf(%rip),%rdx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
movl   $0x64,0x2f0e(%rip)
lea    0x2f07(%rip),%rbx
movl   $0x64,0x2f01(%rip)
lea    0x2efa(%rip),%r14
lea    0xec3(%rip),%rdi
mov    $0x64,%esi
mov    %rbx,%rdx
call   1030 <printf@plt>
mov    0x2ee0(%rip),%esi
lea    0xeca(%rip),%rdi
mov    %r14,%rdx
call   1030 <printf@plt>
mov    0x2ec7(%rip),%esi
lea    0xed6(%rip),%rdi
mov    %rbx,%rdx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@main.a = internal global i32 0
@main.b = internal global i32 0
@main.pt = internal global i32* null
@.str = [33 x i8] c"a\E3\81\AE\E5\80\A4=%d\09 a\E3\81\AE\E3\82\A2\E3\83\89\E3\83\AC\E3\82\B9=%p\0A\00"
@.str.1 = [33 x i8] c"b\E3\81\AE\E5\80\A4=%d\09 b\E3\81\AE\E3\82\A2\E3\83\89\E3\83\AC\E3\82\B9=%p\0A\00"
@.str.2 = [35 x i8] c"pt\E3\81\AE\E5\80\A4=%p\09 pt\E3\81\AE\E3\82\A2\E3\83\89\E3\83\AC\E3\82\B9=%p\0A\00"
define i32 @main() {
store i32 100, i32* @main.a
store i32* @main.a, i32** @main.pt
%1 = load i32*, i32** @main.pt
%2 = load i32, i32* %1
store i32 %2, i32* @main.b
%3 = load i32, i32* @main.a
%4 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %3, i32* @main.a)
%5 = load i32, i32* @main.b
%6 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i32 %5, i32* @main.b)
%7 = load i32, i32* @main.a
%8 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i32 %7, i32* @main.a)
ret i32 0
}

LLVM IR (-O2):
@main.a = internal global i32 0
@main.b = internal global i32 0
@.str = [33 x i8] c"a\E3\81\AE\E5\80\A4=%d\09 a\E3\81\AE\E3\82\A2\E3\83\89\E3\83\AC\E3\82\B9=%p\0A\00"
@.str.1 = [33 x i8] c"b\E3\81\AE\E5\80\A4=%d\09 b\E3\81\AE\E3\82\A2\E3\83\89\E3\83\AC\E3\82\B9=%p\0A\00"
@.str.2 = [35 x i8] c"pt\E3\81\AE\E5\80\A4=%p\09 pt\E3\81\AE\E3\82\A2\E3\83\89\E3\83\AC\E3\82\B9=%p\0A\00"
define i32 @main() {
store i32 100, i32* @main.a
store i32 100, i32* @main.b
%1 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 100, i32* @main.a)
%2 = load i32, i32* @main.b
%3 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), i32 %2, i32* @main.b)
%4 = load i32, i32* @main.a
%5 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i32 %4, i32* @main.a)
ret i32 0
}