#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);
int main() {
  char a[10] = "abcdefzuohui";
  char b[10] = "0123456789";
  int *p = a;
  printf("%d\n\n", *p);
  int c = *p;
  char *np = &c;
  printf("%c\n", *np);
  printf("%c\n", *(np + 1));
  printf("%c\n", *(np + 2));
  printf("%c\n", *(np + 3));
  printf("%c\n", *(np + 4));
  printf("%c\n", *(np + 5));
  printf("%c\n", *(np + 6));
  printf("%c\n", *(np + 7));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0xe(%rbp)
mov    0xed7(%rip),%ax
mov    %ax,-0x6(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xecb(%rip),%ax
mov    %ax,-0x10(%rbp)
lea    -0xe(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
lea    0xeb4(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
lea    -0x24(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
lea    0xe95(%rip),%rdi
movsbl (%rax),%esi
call   1030 <printf@plt>
mov    -0x30(%rbp),%rax
lea    0xe82(%rip),%rdi
movsbl 0x1(%rax),%esi
call   1030 <printf@plt>
mov    -0x30(%rbp),%rax
lea    0xe6e(%rip),%rdi
movsbl 0x2(%rax),%esi
call   1030 <printf@plt>
mov    -0x30(%rbp),%rax
lea    0xe5a(%rip),%rdi
movsbl 0x3(%rax),%esi
call   1030 <printf@plt>
mov    -0x30(%rbp),%rax
lea    0xe46(%rip),%rdi
movsbl 0x4(%rax),%esi
call   1030 <printf@plt>
mov    -0x30(%rbp),%rax
lea    0xe32(%rip),%rdi
movsbl 0x5(%rax),%esi
call   1030 <printf@plt>
mov    -0x30(%rbp),%rax
lea    0xe1e(%rip),%rdi
movsbl 0x6(%rax),%esi
call   1030 <printf@plt>
mov    -0x30(%rbp),%rax
lea    0xe0a(%rip),%rdi
movsbl 0x7(%rax),%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rdi
mov    $0x61,%esi
call   1030 <printf@plt>
lea    0xedc(%rip),%rbx
mov    %rbx,%rdi
mov    $0x61,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x62,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x63,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x64,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.a = [10 x i8] c"abcdefzuoh"
@__const.main.b = [10 x i8] c"0123456789"
@.str = [5 x i8] c"%d\0A\0A\00"
@.str.1 = [4 x i8] c"%c\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i8]
%3 = alloca [10 x i8]
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i8*
store i32 0, i32* %1
%7 = bitcast [10 x i8]* %2 to i8*
%8 = bitcast [10 x i8]* %3 to i8*
%9 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%10 = bitcast i8* %9 to i32*
store i32* %10, i32** %4
%11 = load i32*, i32** %4
%12 = load i32, i32* %11
%13 = trunc i32 %12 to i8
%14 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8 signext %13)
%15 = load i32*, i32** %4
%16 = load i32, i32* %15
store i32 %16, i32* %5
%17 = bitcast i32* %5 to i8*
store i8* %17, i8** %6
%18 = load i8*, i8** %6
%19 = load i8, i8* %18
%20 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8 signext %19)
%21 = load i8*, i8** %6
%22 = getelementptr inbounds i8, i8* %21, i64 1
%23 = load i8, i8* %22
%24 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8 signext %23)
%25 = load i8*, i8** %6
%26 = getelementptr inbounds i8, i8* %25, i64 2
%27 = load i8, i8* %26
%28 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8 signext %27)
%29 = load i8*, i8** %6
%30 = getelementptr inbounds i8, i8* %29, i64 3
%31 = load i8, i8* %30
%32 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8 signext %31)
%33 = load i8*, i8** %6
%34 = getelementptr inbounds i8, i8* %33, i64 4
%35 = load i8, i8* %34
%36 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8 signext %35)
%37 = load i8*, i8** %6
%38 = getelementptr inbounds i8, i8* %37, i64 5
%39 = load i8, i8* %38
%40 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8 signext %39)
%41 = load i8*, i8** %6
%42 = getelementptr inbounds i8, i8* %41, i64 6
%43 = load i8, i8* %42
%44 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8 signext %43)
%45 = load i8*, i8** %6
%46 = getelementptr inbounds i8, i8* %45, i64 7
%47 = load i8, i8* %46
%48 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8 signext %47)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d\0A\0A\00"
@.str.1 = [4 x i8] c"%c\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8 signext 97)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8 signext 97)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8 signext 98)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8 signext 99)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8 signext 100)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8 signext poison)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8 signext poison)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8 signext poison)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8 signext poison)
ret i32 0
}