int main() {
  int b = 10;
  int *d = &b;
  char *s = strdup("abcdefghijklmn");
  char *ch = s;
  while (*ch++)
    printf("%c\n", *ch);
  printf("-------\n");
  ch = s;
  printf("%p\n", ch);
  printf("%c\n", *ch);
  printf("%s\n", s);
  printf("%p\n", *++ch);
  printf("%s\n", s);
  char *cp = s + 15;
  if (ch < cp)
    printf("ok1\n");
  char *cr = s - 3;
  if (cr < ch)
    printf("ok2\n");
  char c = 'a';
  char *cpp = &c;
  cpp++;
  printf("cpp %d\n", *cpp);
  char array[10] = "abcdefghi";
  printf("array %s\n", array);
  char *ap = &array[3];
  ap++;
  printf("ap %c\n", *ap);
  printf("ap[2] %c\n", ap[2]);
  printf("ap[-2] %c\n", ap[-2]);
  printf("2[ap] %c\n", 2 [ap]);
  printf("ap[12] %c\n", ap[12]);
  char a2[10];
  char *sa = array;
  printf("sa %c\n", *sa);
  printf("a2 %s\n", a2);
  zstrcpy(a2, array);
  printf("sa %c\n", *sa);
  printf("a2 %s\n", a2);
  printf("sizeof array %d\n", sizeof(array));
  szof(array);
  char ay[] = "iiiihellowwww";
  char *say = "hellowwww";
  say++;
  printf("say %s\n", say);
  printf("ay %s\n", ay);
  printf("sayc %c\n", *(++say));
  printf("ayc %c\n", ++(*(ay + 5)));
  const char *ccs = malloc(10);
  strncpy(ccs, "qwe123", 6);
  char *cs = ccs;
  printf("ccs %s\n", ccs);
  cs[1] = '1';
  printf("cs %s\n", cs);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    0xe78(%rip),%rdi
call   1080 <strdup@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
cmpb   $0x0,(%rax)
je     11cb <main+0x6b>
mov    -0x20(%rbp),%rax
movsbl (%rax),%esi
lea    0xe9b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1199 <main+0x39>
lea    0xe3d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rsi
lea    0xe2c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x20(%rbp),%rax
movsbl (%rax),%esi
lea    0xe59(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x18(%rbp),%rsi
lea    0xe6a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x20(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x20(%rbp)
movsbl 0x1(%rax),%esi
lea    0xde4(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x18(%rbp),%rsi
lea    0xe37(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x18(%rbp),%rax
add    $0xf,%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
jae    1275 <main+0x115>
lea    0xdae(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x18(%rbp),%rax
add    $0xfffffffffffffffd,%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
cmp    -0x20(%rbp),%rax
jae    129d <main+0x13d>
lea    0xd8b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movb   $0x61,-0x31(%rbp)
lea    -0x31(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
movsbl (%rax),%esi
lea    0xd63(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    0xd5d(%rip),%rax
mov    %rax,-0x4a(%rbp)
mov    0xd5a(%rip),%ax
mov    %ax,-0x42(%rbp)
lea    -0x4a(%rbp),%rsi
lea    0xd4d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x4a(%rbp),%rax
add    $0x3,%rax
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rax
movsbl (%rax),%esi
lea    0xd2a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x58(%rbp),%rax
movsbl 0x2(%rax),%esi
lea    0xd1b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x58(%rbp),%rax
movsbl -0x2(%rax),%esi
lea    0xd0f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x58(%rbp),%rax
movsbl 0x2(%rax),%esi
lea    0xd04(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x58(%rbp),%rax
movsbl 0xc(%rax),%esi
lea    0xcf8(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x4a(%rbp),%rax
mov    %rax,-0x70(%rbp)
mov    -0x70(%rbp),%rax
movsbl (%rax),%esi
lea    0xce6(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x62(%rbp),%rsi
lea    0xcdb(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x62(%rbp),%rdi
lea    -0x4a(%rbp),%rsi
mov    $0x0,%al
call   1040 <zstrcpy@plt>
mov    -0x70(%rbp),%rax
movsbl (%rax),%esi
lea    0xcb0(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x62(%rbp),%rsi
lea    0xca5(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xc9e(%rip),%rdi
mov    $0xa,%esi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x4a(%rbp),%rdi
mov    $0x0,%al
call   1060 <szof@plt>
mov    0xc91(%rip),%rax
mov    %rax,-0x7e(%rbp)
mov    0xc8f(%rip),%eax
mov    %eax,-0x76(%rbp)
mov    0xc89(%rip),%ax
mov    %ax,-0x72(%rbp)
lea    0xc76(%rip),%rax
mov    %rax,-0x88(%rbp)
mov    -0x88(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x88(%rbp)
mov    -0x88(%rbp),%rsi
lea    0xc59(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x7e(%rbp),%rsi
lea    0xbe2(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x88(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x88(%rbp)
movsbl 0x1(%rax),%esi
lea    0xc28(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x79(%rbp),%al
add    $0x1,%al
mov    %al,-0x79(%rbp)
movsbl %al,%esi
lea    0xc10(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0xa,%edi
call   1070 <malloc@plt>
mov    %rax,-0x90(%rbp)
mov    -0x90(%rbp),%rdi
lea    0xbf2(%rip),%rsi
mov    $0x6,%edx
call   1030 <strncpy@plt>
mov    -0x90(%rbp),%rax
mov    %rax,-0x98(%rbp)
mov    -0x90(%rbp),%rsi
lea    0xbd3(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x98(%rbp),%rax
movb   $0x31,0x1(%rax)
mov    -0x98(%rbp),%rsi
lea    0xbb4(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x28,%rsp
lea    0xe8e(%rip),%rdi
call   1080 <strdup@plt>
mov    %rax,%r14
cmpb   $0x0,(%rax)
je     11a6 <main+0x46>
mov    %r14,%rbx
add    $0x1,%rbx
lea    0xeba(%rip),%r15
nopl   (%rax)
movsbl (%rbx),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
cmpb   $0x0,(%rbx)
lea    0x1(%rbx),%rbx
jne    1190 <main+0x30>
lea    0xf00(%rip),%rdi
call   1030 <puts@plt>
lea    0xe56(%rip),%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
movsbl (%r14),%esi
lea    0xe76(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14,%rdi
call   1030 <puts@plt>
movsbl 0x1(%r14),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14,%rdi
call   1030 <puts@plt>
lea    0xeb7(%rip),%rdi
call   1030 <puts@plt>
lea    0xeaf(%rip),%rdi
call   1030 <puts@plt>
lea    0xdfd(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movabs $0x6867666564636261,%rax
66 67 68
mov    %rax,(%rsp)
movw   $0x69,0x8(%rsp)
lea    0xdec(%rip),%rdi
mov    %rsp,%r14
mov    %r14,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
movsbl 0x4(%rsp),%esi
lea    0xddd(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movsbl 0x6(%rsp),%esi
lea    0xdd1(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movsbl 0x2(%rsp),%esi
lea    0xdc8(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movsbl 0x6(%rsp),%esi
lea    0xdc0(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movsbl 0x10(%rsp),%esi
lea    0xdb7(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movsbl (%rsp),%esi
lea    0xdb0(%rip),%r15
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xda6(%rip),%r12
lea    0x1e(%rsp),%rbx
mov    %r12,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1040 <zstrcpy@plt>
movsbl (%rsp),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd6c(%rip),%rdi
mov    $0xa,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <szof@plt>
movabs $0x777777776f6c6c,%rax
mov    %rax,0x16(%rsp)
movabs $0x6c6c656869696969,%rax
65 6c 6c
mov    %rax,0x10(%rsp)
lea    0xd50(%rip),%rdi
lea    0xd40(%rip),%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xcd6(%rip),%rdi
lea    0x10(%rsp),%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd30(%rip),%rdi
mov    $0x6c,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x15(%rsp),%al
add    $0x1,%al
mov    %al,0x15(%rsp)
movsbl %al,%esi
lea    0xd11(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1070 <malloc@plt>
mov    %rax,%rbx
movl   $0x31657771,(%rax)
movw   $0x3332,0x4(%rax)
lea    0xcf9(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
movb   $0x31,0x1(%rbx)
lea    0xce5(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [15 x i8] c"abcdefghijklmn\00"
@.str.1 = [4 x i8] c"%c\0A\00"
@.str.2 = [9 x i8] c"-------\0A\00"
@.str.3 = [4 x i8] c"%p\0A\00"
@.str.4 = [4 x i8] c"%s\0A\00"
@.str.5 = [5 x i8] c"ok1\0A\00"
@.str.6 = [5 x i8] c"ok2\0A\00"
@.str.7 = [8 x i8] c"cpp %d\0A\00"
@__const.main.array = [10 x i8] c"abcdefghi\00"
@.str.8 = [10 x i8] c"array %s\0A\00"
@.str.9 = [7 x i8] c"ap %c\0A\00"
@.str.10 = [10 x i8] c"ap[2] %c\0A\00"
@.str.11 = [11 x i8] c"ap[-2] %c\0A\00"
@.str.12 = [10 x i8] c"2[ap] %c\0A\00"
@.str.13 = [11 x i8] c"ap[12] %c\0A\00"
@.str.14 = [7 x i8] c"sa %c\0A\00"
@.str.15 = [7 x i8] c"a2 %s\0A\00"
@.str.16 = [17 x i8] c"sizeof array %d\0A\00"
@__const.main.ay = [14 x i8] c"iiiihellowwww\00"
@.str.17 = [10 x i8] c"hellowwww\00"
@.str.18 = [8 x i8] c"say %s\0A\00"
@.str.19 = [7 x i8] c"ay %s\0A\00"
@.str.20 = [9 x i8] c"sayc %c\0A\00"
@.str.21 = [8 x i8] c"ayc %c\0A\00"
@.str.22 = [7 x i8] c"qwe123\00"
@.str.23 = [8 x i8] c"ccs %s\0A\00"
@.str.24 = [7 x i8] c"cs %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8
%9 = alloca i8*
%10 = alloca [10 x i8]
%11 = alloca i8*
%12 = alloca [10 x i8]
%13 = alloca i8*
%14 = alloca [14 x i8]
%15 = alloca i8*
%16 = alloca i8*
%17 = alloca i8*
store i32 0, i32* %1
store i32 10, i32* %2
store i32* %2, i32** %3
%18 = call i8* @strdup(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
store i8* %18, i8** %4
%19 = load i8*, i8** %4
store i8* %19, i8** %5
br label %20
20: ; preds = %25, %0
%21 = load i8*, i8** %5
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %5
%23 = load i8, i8* %21
%24 = icmp ne i8 %23, 0
br i1 %24, label %25, label %30
25: ; preds = %20
%26 = load i8*, i8** %5
%27 = load i8, i8* %26
%28 = sext i8 %27 to i32
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %28)
br label %20
30: ; preds = %20
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%32 = load i8*, i8** %4
store i8* %32, i8** %5
%33 = load i8*, i8** %5
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %33)
%35 = load i8*, i8** %5
%36 = load i8, i8* %35
%37 = sext i8 %36 to i32
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %37)
%39 = load i8*, i8** %4
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* %39)
%41 = load i8*, i8** %5
%42 = getelementptr inbounds i8, i8* %41, i32 1
store i8* %42, i8** %5
%43 = load i8, i8* %42
%44 = sext i8 %43 to i32
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %44)
%46 = load i8*, i8** %4
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* %46)
%48 = load i8*, i8** %4
%49 = getelementptr inbounds i8, i8* %48, i64 15
store i8* %49, i8** %6
%50 = load i8*, i8** %5
%51 = load i8*, i8** %6
%52 = icmp ult i8* %50, %51
br i1 %52, label %53, label %55
53: ; preds = %30
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
br label %55
55: ; preds = %53, %30
%56 = load i8*, i8** %4
%57 = getelementptr inbounds i8, i8* %56, i64 -3
store i8* %57, i8** %7
%58 = load i8*, i8** %7
%59 = load i8*, i8** %5
%60 = icmp ult i8* %58, %59
br i1 %60, label %61, label %63
61: ; preds = %55
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
br label %63
63: ; preds = %61, %55
store i8 97, i8* %8
store i8* %8, i8** %9
%64 = load i8*, i8** %9
%65 = getelementptr inbounds i8, i8* %64, i32 1
store i8* %65, i8** %9
%66 = load i8*, i8** %9
%67 = load i8, i8* %66
%68 = sext i8 %67 to i32
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i32 %68)
%70 = bitcast [10 x i8]* %10 to i8*
%71 = getelementptr inbounds [10 x i8], [10 x i8]* %10, i64 0, i64 0
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0), i8* %71)
%73 = getelementptr inbounds [10 x i8], [10 x i8]* %10, i64 0, i64 3
store i8* %73, i8** %11
%74 = load i8*, i8** %11
%75 = getelementptr inbounds i8, i8* %74, i32 1
store i8* %75, i8** %11
%76 = load i8*, i8** %11
%77 = load i8, i8* %76
%78 = sext i8 %77 to i32
%79 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), i32 %78)
%80 = load i8*, i8** %11
%81 = getelementptr inbounds i8, i8* %80, i64 2
%82 = load i8, i8* %81
%83 = sext i8 %82 to i32
%84 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0), i32 %83)
%85 = load i8*, i8** %11
%86 = getelementptr inbounds i8, i8* %85, i64 -2
%87 = load i8, i8* %86
%88 = sext i8 %87 to i32
%89 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0), i32 %88)
%90 = load i8*, i8** %11
%91 = getelementptr inbounds i8, i8* %90, i64 2
%92 = load i8, i8* %91
%93 = sext i8 %92 to i32
%94 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i64 0, i64 0), i32 %93)
%95 = load i8*, i8** %11
%96 = getelementptr inbounds i8, i8* %95, i64 12
%97 = load i8, i8* %96
%98 = sext i8 %97 to i32
%99 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.13, i64 0, i64 0), i32 %98)
%100 = getelementptr inbounds [10 x i8], [10 x i8]* %10, i64 0, i64 0
store i8* %100, i8** %13
%101 = load i8*, i8** %13
%102 = load i8, i8* %101
%103 = sext i8 %102 to i32
%104 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i64 0, i64 0), i32 %103)
%105 = getelementptr inbounds [10 x i8], [10 x i8]* %12, i64 0, i64 0
%106 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i64 0, i64 0), i8* %105)
%107 = getelementptr inbounds [10 x i8], [10 x i8]* %12, i64 0, i64 0
%108 = getelementptr inbounds [10 x i8], [10 x i8]* %10, i64 0, i64 0
%109 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @zstrcpy to i32 (i8*, i8*, ...)*)(i8* %107, i8* %108)
%110 = load i8*, i8** %13
%111 = load i8, i8* %110
%112 = sext i8 %111 to i32
%113 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i64 0, i64 0), i32 %112)
%114 = getelementptr inbounds [10 x i8], [10 x i8]* %12, i64 0, i64 0
%115 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i64 0, i64 0), i8* %114)
%116 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.16, i64 0, i64 0), i64 10)
%117 = getelementptr inbounds [10 x i8], [10 x i8]* %10, i64 0, i64 0
%118 = call i32 (i8*, ...) bitcast (i32 (...)* @szof to i32 (i8*, ...)*)(i8* %117)
%119 = bitcast [14 x i8]* %14 to i8*
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.17, i64 0, i64 0), i8** %15
%120 = load i8*, i8** %15
%121 = getelementptr inbounds i8, i8* %120, i32 1
store i8* %121, i8** %15
%122 = load i8*, i8** %15
%123 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.18, i64 0, i64 0), i8* %122)
%124 = getelementptr inbounds [14 x i8], [14 x i8]* %14, i64 0, i64 0
%125 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.19, i64 0, i64 0), i8* %124)
%126 = load i8*, i8** %15
%127 = getelementptr inbounds i8, i8* %126, i32 1
store i8* %127, i8** %15
%128 = load i8, i8* %127
%129 = sext i8 %128 to i32
%130 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.20, i64 0, i64 0), i32 %129)
%131 = getelementptr inbounds [14 x i8], [14 x i8]* %14, i64 0, i64 0
%132 = getelementptr inbounds i8, i8* %131, i64 5
%133 = load i8, i8* %132
%134 = add i8 %133, 1
store i8 %134, i8* %132
%135 = sext i8 %134 to i32
%136 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.21, i64 0, i64 0), i32 %135)
%137 = call i8* @malloc(i64 10)
store i8* %137, i8** %16
%138 = load i8*, i8** %16
%139 = call i8* @strncpy(i8* %138, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.22, i64 0, i64 0), i64 6)
%140 = load i8*, i8** %16
store i8* %140, i8** %17
%141 = load i8*, i8** %16
%142 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.23, i64 0, i64 0), i8* %141)
%143 = load i8*, i8** %17
%144 = getelementptr inbounds i8, i8* %143, i64 1
store i8 49, i8* %144
%145 = load i8*, i8** %17
%146 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.24, i64 0, i64 0), i8* %145)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"abcdefghijklmn\00"
@.str.1 = [4 x i8] c"%c\0A\00"
@.str.3 = [4 x i8] c"%p\0A\00"
@.str.7 = [8 x i8] c"cpp %d\0A\00"
@__const.main.array = [10 x i8] c"abcdefghi\00"
@.str.8 = [10 x i8] c"array %s\0A\00"
@.str.9 = [7 x i8] c"ap %c\0A\00"
@.str.10 = [10 x i8] c"ap[2] %c\0A\00"
@.str.11 = [11 x i8] c"ap[-2] %c\0A\00"
@.str.12 = [10 x i8] c"2[ap] %c\0A\00"
@.str.13 = [11 x i8] c"ap[12] %c\0A\00"
@.str.14 = [7 x i8] c"sa %c\0A\00"
@.str.15 = [7 x i8] c"a2 %s\0A\00"
@.str.16 = [17 x i8] c"sizeof array %d\0A\00"
@__const.main.ay = [14 x i8] c"iiiihellowwww\00"
@.str.17 = [10 x i8] c"hellowwww\00"
@.str.18 = [8 x i8] c"say %s\0A\00"
@.str.19 = [7 x i8] c"ay %s\0A\00"
@.str.20 = [9 x i8] c"sayc %c\0A\00"
@.str.21 = [8 x i8] c"ayc %c\0A\00"
@.str.22 = [7 x i8] c"qwe123\00"
@.str.23 = [8 x i8] c"ccs %s\0A\00"
@.str.24 = [7 x i8] c"cs %s\0A\00"
@str = [8 x i8] c"-------\00"
@str.25 = [4 x i8] c"ok1\00"
@str.26 = [4 x i8] c"ok2\00"
define i32 @main() {
%1 = alloca [10 x i8]
%2 = alloca [10 x i8]
%3 = alloca [14 x i8]
%4 = tail call dereferenceable_or_null(15) i8* @strdup(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
br i1 %6, label %15, label %7
7: ; preds = %0, %7
%8 = phi i8* [ %9, %7 ], [ %4, %0 ]
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %11)
%13 = load i8, i8* %9
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %7
15: ; preds = %7, %0
%16 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %4)
%18 = load i8, i8* %4
%19 = sext i8 %18 to i32
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %19)
%21 = tail call i32 @puts(i8* %4)
%22 = getelementptr inbounds i8, i8* %4, i64 1
%23 = load i8, i8* %22
%24 = sext i8 %23 to i32
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %24)
%26 = tail call i32 @puts(i8* %4)
%27 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.25, i64 0, i64 0))
%28 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.26, i64 0, i64 0))
%29 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i32 poison)
%30 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.8, i64 0, i64 0), i8* %30)
%32 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 4
%33 = load i8, i8* %32
%34 = sext i8 %33 to i32
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), i32 %34)
%36 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 6
%37 = load i8, i8* %36
%38 = sext i8 %37 to i32
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.10, i64 0, i64 0), i32 %38)
%40 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 2
%41 = load i8, i8* %40
%42 = sext i8 %41 to i32
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0), i32 %42)
%44 = load i8, i8* %36
%45 = sext i8 %44 to i32
%46 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i64 0, i64 0), i32 %45)
%47 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 16
%48 = load i8, i8* %47
%49 = sext i8 %48 to i32
%50 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.13, i64 0, i64 0), i32 %49)
%51 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%52 = load i8, i8* %30
%53 = sext i8 %52 to i32
%54 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i64 0, i64 0), i32 %53)
%55 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i64 0, i64 0), i8* %51)
%56 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @zstrcpy to i32 (i8*, i8*, ...)*)(i8* %51, i8* %30)
%57 = load i8, i8* %30
%58 = sext i8 %57 to i32
%59 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.14, i64 0, i64 0), i32 %58)
%60 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.15, i64 0, i64 0), i8* %51)
%61 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.16, i64 0, i64 0), i64 10)
%62 = call i32 (i8*, ...) bitcast (i32 (...)* @szof to i32 (i8*, ...)*)(i8* %30)
%63 = getelementptr inbounds [14 x i8], [14 x i8]* %3, i64 0, i64 0
%64 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.18, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.17, i64 0, i64 1))
%65 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.19, i64 0, i64 0), i8* %63)
%66 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.20, i64 0, i64 0), i32 108)
%67 = getelementptr inbounds [14 x i8], [14 x i8]* %3, i64 0, i64 5
%68 = load i8, i8* %67
%69 = add i8 %68, 1
store i8 %69, i8* %67
%70 = sext i8 %69 to i32
%71 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.21, i64 0, i64 0), i32 %70)
%72 = call dereferenceable_or_null(10) i8* @malloc(i64 10)
%73 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.23, i64 0, i64 0), i8* %72)
%74 = getelementptr inbounds i8, i8* %72, i64 1
store i8 49, i8* %74
%75 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.24, i64 0, i64 0), i8* %72)
ret i32 0
}