#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() {
  char a[3] = {'A', 'B', 'C'};
  char *p[3] = {&a[0], &a[1], &a[2]};
  for (int i = 0; i < 3; i++) {
    printf("%c\n", *(p[i]));
  }
  char *ps[3] = {"jlkj", "jkjlj", "sdfsd"};
  for (int i = 0; i < 3; i++) {
    printf("%s\n", ps[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%ax
mov    %ax,-0x7(%rbp)
mov    0xed2(%rip),%al
mov    %al,-0x5(%rbp)
lea    -0x7(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    -0x7(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
lea    -0x7(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x3,-0x24(%rbp)
jge    118c <main+0x7c>
movslq -0x24(%rbp),%rax
mov    -0x20(%rbp,%rax,8),%rax
movsbl (%rax),%esi
lea    0xe8c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    115a <main+0x4a>
mov    0x2c6d(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0x2c6a(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0x2c67(%rip),%rax
mov    %rax,-0x30(%rbp)
movl   $0x0,-0x44(%rbp)
cmpl   $0x3,-0x44(%rbp)
jge    11e3 <main+0xd3>
movslq -0x44(%rbp),%rax
mov    -0x40(%rbp,%rax,8),%rsi
lea    0xe4a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    11b4 <main+0xa4>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x41,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x42,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x43,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xea8(%rip),%rdi
call   1030 <puts@plt>
lea    0xea1(%rip),%rdi
call   1030 <puts@plt>
lea    0xe9b(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.a = [3 x i8] c"ABC"
@.str = [4 x i8] c"%c\0A\00"
@.str.1 = [5 x i8] c"jlkj\00"
@.str.2 = [6 x i8] c"jkjlj\00"
@.str.3 = [6 x i8] c"sdfsd\00"
@__const.main.ps = [3 x i8*] [i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i32 0, i32 0)]
@.str.4 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x i8]
%3 = alloca [3 x i8*]
%4 = alloca i32
%5 = alloca [3 x i8*]
%6 = alloca i32
store i32 0, i32* %1
%7 = bitcast [3 x i8]* %2 to i8*
%8 = getelementptr inbounds [3 x i8*], [3 x i8*]* %3, i64 0, i64 0
%9 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 0
store i8* %9, i8** %8
%10 = getelementptr inbounds i8*, i8** %8, i64 1
%11 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 1
store i8* %11, i8** %10
%12 = getelementptr inbounds i8*, i8** %10, i64 1
%13 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 2
store i8* %13, i8** %12
store i32 0, i32* %4
br label %14
14: ; preds = %25, %0
%15 = load i32, i32* %4
%16 = icmp slt i32 %15, 3
br i1 %16, label %17, label %28
17: ; preds = %14
%18 = load i32, i32* %4
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [3 x i8*], [3 x i8*]* %3, i64 0, i64 %19
%21 = load i8*, i8** %20
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %23)
br label %25
25: ; preds = %17
%26 = load i32, i32* %4
%27 = add nsw i32 %26, 1
store i32 %27, i32* %4
br label %14
28: ; preds = %14
%29 = bitcast [3 x i8*]* %5 to i8*
store i32 0, i32* %6
br label %30
30: ; preds = %39, %28
%31 = load i32, i32* %6
%32 = icmp slt i32 %31, 3
br i1 %32, label %33, label %42
33: ; preds = %30
%34 = load i32, i32* %6
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [3 x i8*], [3 x i8*]* %5, i64 0, i64 %35
%37 = load i8*, i8** %36
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* %37)
br label %39
39: ; preds = %33
%40 = load i32, i32* %6
%41 = add nsw i32 %40, 1
store i32 %41, i32* %6
br label %30
42: ; preds = %30
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%c\0A\00"
@.str.1 = [5 x i8] c"jlkj\00"
@.str.2 = [6 x i8] c"jkjlj\00"
@.str.3 = [6 x i8] c"sdfsd\00"
define i32 @main() {
%1 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 65)
%2 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 66)
%3 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 67)
%4 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}