#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 *, ...);
void dump_K(unsigned char K[26]) {
  int i;
  printf("K: ");
  for (i = 0; i < 26; i++)
    printf("%c", K[i]);
  printf("\n");
}


x86 assembly (clang, -O0):
<dump_K>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x1a,-0xc(%rbp)
jge    1163 <dump_K+0x53>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movzbl (%rax,%rcx,1),%esi
lea    0xeb6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1131 <dump_K+0x21>
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_K>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movzbl (%rbx),%edi
call   1030 <putchar@plt>
movzbl 0x1(%rbx),%edi
call   1030 <putchar@plt>
movzbl 0x2(%rbx),%edi
call   1030 <putchar@plt>
movzbl 0x3(%rbx),%edi
call   1030 <putchar@plt>
movzbl 0x4(%rbx),%edi
call   1030 <putchar@plt>
movzbl 0x5(%rbx),%edi
call   1030 <putchar@plt>
movzbl 0x6(%rbx),%edi
call   1030 <putchar@plt>
movzbl 0x7(%rbx),%edi
call   1030 <putchar@plt>
movzbl 0x8(%rbx),%edi
call   1030 <putchar@plt>
movzbl 0x9(%rbx),%edi
call   1030 <putchar@plt>
movzbl 0xa(%rbx),%edi
call   1030 <putchar@plt>
movzbl 0xb(%rbx),%edi
call   1030 <putchar@plt>
movzbl 0xc(%rbx),%edi
call   1030 <putchar@plt>
movzbl 0xd(%rbx),%edi
call   1030 <putchar@plt>
movzbl 0xe(%rbx),%edi
call   1030 <putchar@plt>
movzbl 0xf(%rbx),%edi
call   1030 <putchar@plt>
movzbl 0x10(%rbx),%edi
call   1030 <putchar@plt>
movzbl 0x11(%rbx),%edi
call   1030 <putchar@plt>
movzbl 0x12(%rbx),%edi
call   1030 <putchar@plt>
movzbl 0x13(%rbx),%edi
call   1030 <putchar@plt>
movzbl 0x14(%rbx),%edi
call   1030 <putchar@plt>
movzbl 0x15(%rbx),%edi
call   1030 <putchar@plt>
movzbl 0x16(%rbx),%edi
call   1030 <putchar@plt>
movzbl 0x17(%rbx),%edi
call   1030 <putchar@plt>
movzbl 0x18(%rbx),%edi
call   1030 <putchar@plt>
movzbl 0x19(%rbx),%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"K: \00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [2 x i8] c"\0A\00"
define void @dump_K(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
br label %5
5: ; preds = %16, %1
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 26
br i1 %7, label %8, label %19
8: ; preds = %5
%9 = load i8*, i8** %2
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %9, i64 %11
%13 = load i8, i8* %12
%14 = zext i8 %13 to i32
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %14)
br label %16
16: ; preds = %8
%17 = load i32, i32* %3
%18 = add nsw i32 %17, 1
store i32 %18, i32* %3
br label %5
19: ; preds = %5
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"K: \00"
define void @dump_K(i8* nocapture %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = load i8, i8* %0
%4 = zext i8 %3 to i32
%5 = tail call i32 @putchar(i32 %4)
%6 = getelementptr inbounds i8, i8* %0, i64 1
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = tail call i32 @putchar(i32 %8)
%10 = getelementptr inbounds i8, i8* %0, i64 2
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = tail call i32 @putchar(i32 %12)
%14 = getelementptr inbounds i8, i8* %0, i64 3
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = tail call i32 @putchar(i32 %16)
%18 = getelementptr inbounds i8, i8* %0, i64 4
%19 = load i8, i8* %18
%20 = zext i8 %19 to i32
%21 = tail call i32 @putchar(i32 %20)
%22 = getelementptr inbounds i8, i8* %0, i64 5
%23 = load i8, i8* %22
%24 = zext i8 %23 to i32
%25 = tail call i32 @putchar(i32 %24)
%26 = getelementptr inbounds i8, i8* %0, i64 6
%27 = load i8, i8* %26
%28 = zext i8 %27 to i32
%29 = tail call i32 @putchar(i32 %28)
%30 = getelementptr inbounds i8, i8* %0, i64 7
%31 = load i8, i8* %30
%32 = zext i8 %31 to i32
%33 = tail call i32 @putchar(i32 %32)
%34 = getelementptr inbounds i8, i8* %0, i64 8
%35 = load i8, i8* %34
%36 = zext i8 %35 to i32
%37 = tail call i32 @putchar(i32 %36)
%38 = getelementptr inbounds i8, i8* %0, i64 9
%39 = load i8, i8* %38
%40 = zext i8 %39 to i32
%41 = tail call i32 @putchar(i32 %40)
%42 = getelementptr inbounds i8, i8* %0, i64 10
%43 = load i8, i8* %42
%44 = zext i8 %43 to i32
%45 = tail call i32 @putchar(i32 %44)
%46 = getelementptr inbounds i8, i8* %0, i64 11
%47 = load i8, i8* %46
%48 = zext i8 %47 to i32
%49 = tail call i32 @putchar(i32 %48)
%50 = getelementptr inbounds i8, i8* %0, i64 12
%51 = load i8, i8* %50
%52 = zext i8 %51 to i32
%53 = tail call i32 @putchar(i32 %52)
%54 = getelementptr inbounds i8, i8* %0, i64 13
%55 = load i8, i8* %54
%56 = zext i8 %55 to i32
%57 = tail call i32 @putchar(i32 %56)
%58 = getelementptr inbounds i8, i8* %0, i64 14
%59 = load i8, i8* %58
%60 = zext i8 %59 to i32
%61 = tail call i32 @putchar(i32 %60)
%62 = getelementptr inbounds i8, i8* %0, i64 15
%63 = load i8, i8* %62
%64 = zext i8 %63 to i32
%65 = tail call i32 @putchar(i32 %64)
%66 = getelementptr inbounds i8, i8* %0, i64 16
%67 = load i8, i8* %66
%68 = zext i8 %67 to i32
%69 = tail call i32 @putchar(i32 %68)
%70 = getelementptr inbounds i8, i8* %0, i64 17
%71 = load i8, i8* %70
%72 = zext i8 %71 to i32
%73 = tail call i32 @putchar(i32 %72)
%74 = getelementptr inbounds i8, i8* %0, i64 18
%75 = load i8, i8* %74
%76 = zext i8 %75 to i32
%77 = tail call i32 @putchar(i32 %76)
%78 = getelementptr inbounds i8, i8* %0, i64 19
%79 = load i8, i8* %78
%80 = zext i8 %79 to i32
%81 = tail call i32 @putchar(i32 %80)
%82 = getelementptr inbounds i8, i8* %0, i64 20
%83 = load i8, i8* %82
%84 = zext i8 %83 to i32
%85 = tail call i32 @putchar(i32 %84)
%86 = getelementptr inbounds i8, i8* %0, i64 21
%87 = load i8, i8* %86
%88 = zext i8 %87 to i32
%89 = tail call i32 @putchar(i32 %88)
%90 = getelementptr inbounds i8, i8* %0, i64 22
%91 = load i8, i8* %90
%92 = zext i8 %91 to i32
%93 = tail call i32 @putchar(i32 %92)
%94 = getelementptr inbounds i8, i8* %0, i64 23
%95 = load i8, i8* %94
%96 = zext i8 %95 to i32
%97 = tail call i32 @putchar(i32 %96)
%98 = getelementptr inbounds i8, i8* %0, i64 24
%99 = load i8, i8* %98
%100 = zext i8 %99 to i32
%101 = tail call i32 @putchar(i32 %100)
%102 = getelementptr inbounds i8, i8* %0, i64 25
%103 = load i8, i8* %102
%104 = zext i8 %103 to i32
%105 = tail call i32 @putchar(i32 %104)
%106 = tail call i32 @putchar(i32 10)
ret void
}