#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
char EOF;
int /*<<< orphan*/ close(int /*<<< orphan*/ *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int,
                           int /*<<< orphan*/);
char getc(int /*<<< orphan*/ *);
char getchar();
int *neka_funkcija(char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char **);
int main() {
  FILE *ulazna_datoteka, *izlazna_datoteka;
  ulazna_datoteka = fopen("ulaz.txt", "r");
  izlazna_datoteka = fopen("izlaz.txt", "w");
  if (ulazna_datoteka == NULL) {
    printf("greska1");
    exit(1);
  } else if (izlazna_datoteka == NULL) {
    printf("greska2");
    close(ulazna_datoteka);
    exit(2);
  } else {
    printf("obe otvoreno uspjesno...\n");
    char niz[1000];
    int i;
    for (i = 0; i < 1000; i++)
      niz[i] = 0;
    char c;
    i = 0;
    while ((c = getc(ulazna_datoteka)) != EOF) {
      niz[i++] = c;
    }
    int *pok;
    pok = neka_funkcija(niz);
    for (i = 0; i < 26; i++) {
      printf("%c ima ukupno %d elemenata\n", i + 65, *pok++);
    }
    pok = neka_funkcija(niz);
    for (i = 0; i < 26; i++) {
      fprintf(izlazna_datoteka, "%c%d ", i + 65, *pok++);
    }
  }
  printf("\n%c", (int)('a' - 'A') + 2);
  close(ulazna_datoteka);
  close(izlazna_datoteka);
  char recenica[10];
  scanf("%s", &recenica);
  char c = getchar();
  if (c != 'X')
    printf("%c %s nije do kraja", c, recenica);
  else
    printf("na kraju smo");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe57(%rip),%rdi
lea    0xe59(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x10(%rbp)
lea    0xe4b(%rip),%rdi
lea    0xe4e(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    11f3 <main+0x63>
lea    0xe35(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
cmpq   $0x0,-0x18(%rbp)
jne    121f <main+0x8f>
lea    0xe1a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1040 <close@plt>
mov    $0x2,%edi
call   1090 <exit@plt>
lea    0xe01(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x404(%rbp)
cmpl   $0x3e8,-0x404(%rbp)
jge    126a <main+0xda>
movslq -0x404(%rbp),%rax
movb   $0x0,-0x400(%rbp,%rax,1)
mov    -0x404(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x404(%rbp)
jmp    1237 <main+0xa7>
movl   $0x0,-0x404(%rbp)
mov    -0x10(%rbp),%rdi
call   10b0 <getc@plt>
mov    %al,-0x405(%rbp)
movsbl %al,%eax
mov    0x2d5b(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     12bd <main+0x12d>
mov    -0x405(%rbp),%cl
mov    -0x404(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x404(%rbp)
cltq
mov    %cl,-0x400(%rbp,%rax,1)
jmp    1274 <main+0xe4>
lea    -0x400(%rbp),%rdi
call   10a0 <neka_funkcija@plt>
mov    %rax,-0x410(%rbp)
movl   $0x0,-0x404(%rbp)
cmpl   $0x1a,-0x404(%rbp)
jge    1329 <main+0x199>
mov    -0x404(%rbp),%esi
add    $0x41,%esi
mov    -0x410(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x410(%rbp)
mov    (%rax),%edx
lea    0xd33(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x404(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x404(%rbp)
jmp    12da <main+0x14a>
lea    -0x400(%rbp),%rdi
call   10a0 <neka_funkcija@plt>
mov    %rax,-0x410(%rbp)
movl   $0x0,-0x404(%rbp)
cmpl   $0x1a,-0x404(%rbp)
jge    1397 <main+0x207>
mov    -0x18(%rbp),%rdi
mov    -0x404(%rbp),%edx
add    $0x41,%edx
mov    -0x410(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x410(%rbp)
mov    (%rax),%ecx
lea    0xcdf(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x404(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x404(%rbp)
jmp    1346 <main+0x1b6>
jmp    139c <main+0x20c>
jmp    13a1 <main+0x211>
lea    0xcbb(%rip),%rdi
mov    $0x22,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1040 <close@plt>
mov    -0x18(%rbp),%rdi
call   1040 <close@plt>
lea    -0x41a(%rbp),%rsi
lea    0xc93(%rip),%rdi
call   1070 <scanf@plt>
mov    $0x0,%al
call   1050 <getchar@plt>
mov    %al,-0x41b(%rbp)
movsbl -0x41b(%rbp),%eax
cmp    $0x58,%eax
je     1417 <main+0x287>
movsbl -0x41b(%rbp),%esi
lea    -0x41a(%rbp),%rdx
lea    0xc5f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1425 <main+0x295>
lea    0xc60(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x3e8,%rsp
lea    0xe38(%rip),%rdi
lea    0xe3a(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,%r14
lea    0xe2d(%rip),%rdi
lea    0xe30(%rip),%rsi
call   10a0 <fopen@plt>
test   %r14,%r14
je     14df <main+0x32f>
mov    %rax,%r12
test   %rax,%rax
je     14f7 <main+0x347>
lea    0xe6b(%rip),%rdi
call   1030 <puts@plt>
mov    %rsp,%rbx
mov    $0x3e8,%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1050 <memset@plt>
mov    %r14,%rdi
call   10d0 <getc@plt>
mov    0x2dbc(%rip),%rbp
cmp    0x0(%rbp),%al
je     1253 <main+0xa3>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %al,(%rbx)
mov    %r14,%rdi
call   10d0 <getc@plt>
add    $0x1,%rbx
cmp    0x0(%rbp),%al
jne    1240 <main+0x90>
mov    %rsp,%r15
mov    %r15,%rdi
call   10c0 <neka_funkcija@plt>
mov    %rax,%rbx
mov    (%rax),%edx
lea    0xdbd(%rip),%r13
xor    %ebp,%ebp
mov    %r13,%rdi
mov    $0x41,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x4(%rbx),%edx
mov    %r13,%rdi
mov    $0x42,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rbx),%edx
mov    %r13,%rdi
mov    $0x43,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xc(%rbx),%edx
mov    %r13,%rdi
mov    $0x44,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%rbx),%edx
mov    %r13,%rdi
mov    $0x45,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x14(%rbx),%edx
mov    %r13,%rdi
mov    $0x46,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x18(%rbx),%edx
mov    %r13,%rdi
mov    $0x47,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x1c(%rbx),%edx
mov    %r13,%rdi
mov    $0x48,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x20(%rbx),%edx
mov    %r13,%rdi
mov    $0x49,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x24(%rbx),%edx
mov    %r13,%rdi
mov    $0x4a,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x28(%rbx),%edx
mov    %r13,%rdi
mov    $0x4b,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2c(%rbx),%edx
mov    %r13,%rdi
mov    $0x4c,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x30(%rbx),%edx
mov    %r13,%rdi
mov    $0x4d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x34(%rbx),%edx
mov    %r13,%rdi
mov    $0x4e,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x38(%rbx),%edx
mov    %r13,%rdi
mov    $0x4f,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x3c(%rbx),%edx
mov    %r13,%rdi
mov    $0x50,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x40(%rbx),%edx
mov    %r13,%rdi
mov    $0x51,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x44(%rbx),%edx
mov    %r13,%rdi
mov    $0x52,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x48(%rbx),%edx
mov    %r13,%rdi
mov    $0x53,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x4c(%rbx),%edx
mov    %r13,%rdi
mov    $0x54,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x50(%rbx),%edx
mov    %r13,%rdi
mov    $0x55,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x54(%rbx),%edx
mov    %r13,%rdi
mov    $0x56,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x58(%rbx),%edx
mov    %r13,%rdi
mov    $0x57,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x5c(%rbx),%edx
mov    %r13,%rdi
mov    $0x58,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x60(%rbx),%edx
mov    %r13,%rdi
mov    $0x59,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x64(%rbx),%edx
mov    %r13,%rdi
mov    $0x5a,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
call   10c0 <neka_funkcija@plt>
mov    %rax,%rbx
lea    0xbf4(%rip),%r15
nop
lea    0x41(%rbp),%edx
mov    (%rbx,%rbp,4),%ecx
mov    %r12,%rdi
mov    %r15,%rsi
call   1080 <fprintf@plt>
add    $0x1,%rbp
cmp    $0x1a,%ebp
jne    1450 <main+0x2a0>
lea    0xbd8(%rip),%rdi
mov    $0x22,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
call   1060 <close@plt>
mov    %r12,%rdi
call   1060 <close@plt>
lea    0xbb9(%rip),%rdi
mov    %rsp,%rsi
call   1090 <scanf@plt>
xor    %eax,%eax
call   1070 <getchar@plt>
cmp    $0x58,%al
jne    14b7 <main+0x307>
lea    0xbb6(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    14cb <main+0x31b>
movsbl %al,%esi
lea    0xb8f(%rip),%rdi
mov    %rsp,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x3e8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xb31(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%edi
call   10b0 <exit@plt>
lea    0xb21(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
call   1060 <close@plt>
mov    $0x2,%edi
call   10b0 <exit@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"ulaz.txt\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [10 x i8] c"izlaz.txt\00"
@.str.3 = [2 x i8] c"w\00"
@.str.4 = [8 x i8] c"greska1\00"
@.str.5 = [8 x i8] c"greska2\00"
@.str.6 = [26 x i8] c"obe otvoreno uspjesno...\0A\00"
@EOF = global i8 0
@.str.7 = [28 x i8] c"%c ima ukupno %d elemenata\0A\00"
@.str.8 = [6 x i8] c"%c%d \00"
@.str.9 = [4 x i8] c"\0A%c\00"
@.str.10 = [3 x i8] c"%s\00"
@.str.11 = [20 x i8] c"%c %s nije do kraja\00"
@.str.12 = [13 x i8] c"na kraju smo\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca [1000 x i8]
%5 = alloca i32
%6 = alloca i8
%7 = alloca i32*
%8 = alloca [10 x i8]
%9 = alloca i8
store i32 0, i32* %1
%10 = call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %10, i32** %2
%11 = call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32* %11, i32** %3
%12 = load i32*, i32** %2
%13 = icmp eq i32* %12, null
br i1 %13, label %14, label %17
14: ; preds = %0
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
%16 = call i32 @exit(i32 1)
unreachable
17: ; preds = %0
%18 = load i32*, i32** %3
%19 = icmp eq i32* %18, null
br i1 %19, label %20, label %25
20: ; preds = %17
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
%22 = load i32*, i32** %2
%23 = call i32 @close(i32* %22)
%24 = call i32 @exit(i32 2)
unreachable
25: ; preds = %17
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0))
store i32 0, i32* %5
br label %27
27: ; preds = %34, %25
%28 = load i32, i32* %5
%29 = icmp slt i32 %28, 1000
br i1 %29, label %30, label %37
30: ; preds = %27
%31 = load i32, i32* %5
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds [1000 x i8], [1000 x i8]* %4, i64 0, i64 %32
store i8 0, i8* %33
br label %34
34: ; preds = %30
%35 = load i32, i32* %5
%36 = add nsw i32 %35, 1
store i32 %36, i32* %5
br label %27
37: ; preds = %27
store i32 0, i32* %5
br label %38
38: ; preds = %45, %37
%39 = load i32*, i32** %2
%40 = call signext i8 @getc(i32* %39)
store i8 %40, i8* %6
%41 = sext i8 %40 to i32
%42 = load i8, i8* @EOF
%43 = sext i8 %42 to i32
%44 = icmp ne i32 %41, %43
br i1 %44, label %45, label %51
45: ; preds = %38
%46 = load i8, i8* %6
%47 = load i32, i32* %5
%48 = add nsw i32 %47, 1
store i32 %48, i32* %5
%49 = sext i32 %47 to i64
%50 = getelementptr inbounds [1000 x i8], [1000 x i8]* %4, i64 0, i64 %49
store i8 %46, i8* %50
br label %38
51: ; preds = %38
%52 = getelementptr inbounds [1000 x i8], [1000 x i8]* %4, i64 0, i64 0
%53 = call i32* @neka_funkcija(i8* %52)
store i32* %53, i32** %7
store i32 0, i32* %5
br label %54
54: ; preds = %64, %51
%55 = load i32, i32* %5
%56 = icmp slt i32 %55, 26
br i1 %56, label %57, label %67
57: ; preds = %54
%58 = load i32, i32* %5
%59 = add nsw i32 %58, 65
%60 = load i32*, i32** %7
%61 = getelementptr inbounds i32, i32* %60, i32 1
store i32* %61, i32** %7
%62 = load i32, i32* %60
%63 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i32 %59, i32 %62)
br label %64
64: ; preds = %57
%65 = load i32, i32* %5
%66 = add nsw i32 %65, 1
store i32 %66, i32* %5
br label %54
67: ; preds = %54
%68 = getelementptr inbounds [1000 x i8], [1000 x i8]* %4, i64 0, i64 0
%69 = call i32* @neka_funkcija(i8* %68)
store i32* %69, i32** %7
store i32 0, i32* %5
br label %70
70: ; preds = %81, %67
%71 = load i32, i32* %5
%72 = icmp slt i32 %71, 26
br i1 %72, label %73, label %84
73: ; preds = %70
%74 = load i32*, i32** %3
%75 = load i32, i32* %5
%76 = add nsw i32 %75, 65
%77 = load i32*, i32** %7
%78 = getelementptr inbounds i32, i32* %77, i32 1
store i32* %78, i32** %7
%79 = load i32, i32* %77
%80 = call i32 @fprintf(i32* %74, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i32 %76, i32 %79)
br label %81
81: ; preds = %73
%82 = load i32, i32* %5
%83 = add nsw i32 %82, 1
store i32 %83, i32* %5
br label %70
84: ; preds = %70
br label %85
85: ; preds = %84
br label %86
86: ; preds = %85
%87 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 34)
%88 = load i32*, i32** %2
%89 = call i32 @close(i32* %88)
%90 = load i32*, i32** %3
%91 = call i32 @close(i32* %90)
%92 = bitcast [10 x i8]* %8 to i8**
%93 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i8** %92)
%94 = call signext i8 (...) @getchar()
store i8 %94, i8* %9
%95 = load i8, i8* %9
%96 = sext i8 %95 to i32
%97 = icmp ne i32 %96, 88
br i1 %97, label %98, label %103
98: ; preds = %86
%99 = load i8, i8* %9
%100 = sext i8 %99 to i32
%101 = getelementptr inbounds [10 x i8], [10 x i8]* %8, i64 0, i64 0
%102 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.11, i64 0, i64 0), i32 %100, i8* %101)
br label %105
103: ; preds = %86
%104 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.12, i64 0, i64 0))
br label %105
105: ; preds = %103, %98
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"ulaz.txt\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [10 x i8] c"izlaz.txt\00"
@.str.3 = [2 x i8] c"w\00"
@.str.4 = [8 x i8] c"greska1\00"
@.str.5 = [8 x i8] c"greska2\00"
@EOF = global i8 0
@.str.7 = [28 x i8] c"%c ima ukupno %d elemenata\0A\00"
@.str.8 = [6 x i8] c"%c%d \00"
@.str.9 = [4 x i8] c"\0A%c\00"
@.str.10 = [3 x i8] c"%s\00"
@.str.11 = [20 x i8] c"%c %s nije do kraja\00"
@.str.12 = [13 x i8] c"na kraju smo\00"
@str = [25 x i8] c"obe otvoreno uspjesno...\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = alloca [10 x i8]
%4 = tail call i32* @fopen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%6 = icmp eq i32* %4, null
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
%9 = tail call i32 @exit(i32 1)
unreachable
10: ; preds = %0
%11 = icmp eq i32* %5, null
br i1 %11, label %12, label %16
12: ; preds = %10
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
%14 = tail call i32 @close(i32* %4)
%15 = tail call i32 @exit(i32 2)
unreachable
16: ; preds = %10
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%18 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%19 = tail call signext i8 @getc(i32* %4)
%20 = load i8, i8* @EOF
%21 = icmp eq i8 %19, %20
br i1 %21, label %30, label %22
22: ; preds = %16, %22
%23 = phi i64 [ %25, %22 ], [ 0, %16 ]
%24 = phi i8 [ %27, %22 ], [ %19, %16 ]
%25 = add nuw i64 %23, 1
%26 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 %23
store i8 %24, i8* %26
%27 = tail call signext i8 @getc(i32* %4)
%28 = load i8, i8* @EOF
%29 = icmp eq i8 %27, %28
br i1 %29, label %30, label %22
30: ; preds = %22, %16
%31 = call i32* @neka_funkcija(i8* %18)
%32 = getelementptr inbounds i32, i32* %31, i64 1
%33 = load i32, i32* %31
%34 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i32 65, i32 %33)
%35 = getelementptr inbounds i32, i32* %31, i64 2
%36 = load i32, i32* %32
%37 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i32 66, i32 %36)
%38 = getelementptr inbounds i32, i32* %31, i64 3
%39 = load i32, i32* %35
%40 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i32 67, i32 %39)
%41 = getelementptr inbounds i32, i32* %31, i64 4
%42 = load i32, i32* %38
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i32 68, i32 %42)
%44 = getelementptr inbounds i32, i32* %31, i64 5
%45 = load i32, i32* %41
%46 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i32 69, i32 %45)
%47 = getelementptr inbounds i32, i32* %31, i64 6
%48 = load i32, i32* %44
%49 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i32 70, i32 %48)
%50 = getelementptr inbounds i32, i32* %31, i64 7
%51 = load i32, i32* %47
%52 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i32 71, i32 %51)
%53 = getelementptr inbounds i32, i32* %31, i64 8
%54 = load i32, i32* %50
%55 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i32 72, i32 %54)
%56 = getelementptr inbounds i32, i32* %31, i64 9
%57 = load i32, i32* %53
%58 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i32 73, i32 %57)
%59 = getelementptr inbounds i32, i32* %31, i64 10
%60 = load i32, i32* %56
%61 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i32 74, i32 %60)
%62 = getelementptr inbounds i32, i32* %31, i64 11
%63 = load i32, i32* %59
%64 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i32 75, i32 %63)
%65 = getelementptr inbounds i32, i32* %31, i64 12
%66 = load i32, i32* %62
%67 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i32 76, i32 %66)
%68 = getelementptr inbounds i32, i32* %31, i64 13
%69 = load i32, i32* %65
%70 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i32 77, i32 %69)
%71 = getelementptr inbounds i32, i32* %31, i64 14
%72 = load i32, i32* %68
%73 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i32 78, i32 %72)
%74 = getelementptr inbounds i32, i32* %31, i64 15
%75 = load i32, i32* %71
%76 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i32 79, i32 %75)
%77 = getelementptr inbounds i32, i32* %31, i64 16
%78 = load i32, i32* %74
%79 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i32 80, i32 %78)
%80 = getelementptr inbounds i32, i32* %31, i64 17
%81 = load i32, i32* %77
%82 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i32 81, i32 %81)
%83 = getelementptr inbounds i32, i32* %31, i64 18
%84 = load i32, i32* %80
%85 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i32 82, i32 %84)
%86 = getelementptr inbounds i32, i32* %31, i64 19
%87 = load i32, i32* %83
%88 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i32 83, i32 %87)
%89 = getelementptr inbounds i32, i32* %31, i64 20
%90 = load i32, i32* %86
%91 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i32 84, i32 %90)
%92 = getelementptr inbounds i32, i32* %31, i64 21
%93 = load i32, i32* %89
%94 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i32 85, i32 %93)
%95 = getelementptr inbounds i32, i32* %31, i64 22
%96 = load i32, i32* %92
%97 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i32 86, i32 %96)
%98 = getelementptr inbounds i32, i32* %31, i64 23
%99 = load i32, i32* %95
%100 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i32 87, i32 %99)
%101 = getelementptr inbounds i32, i32* %31, i64 24
%102 = load i32, i32* %98
%103 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i32 88, i32 %102)
%104 = getelementptr inbounds i32, i32* %31, i64 25
%105 = load i32, i32* %101
%106 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i32 89, i32 %105)
%107 = load i32, i32* %104
%108 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.7, i64 0, i64 0), i32 90, i32 %107)
%109 = call i32* @neka_funkcija(i8* %18)
br label %110
110: ; preds = %30, %110
%111 = phi i32 [ 0, %30 ], [ %117, %110 ]
%112 = phi i32* [ %109, %30 ], [ %114, %110 ]
%113 = add nuw nsw i32 %111, 65
%114 = getelementptr inbounds i32, i32* %112, i64 1
%115 = load i32, i32* %112
%116 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i32 %113, i32 %115)
%117 = add nuw nsw i32 %111, 1
%118 = icmp eq i32 %117, 26
br i1 %118, label %119, label %110
119: ; preds = %110
%120 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i32 34)
%121 = call i32 @close(i32* %4)
%122 = call i32 @close(i32* %5)
%123 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%124 = bitcast [10 x i8]* %3 to i8**
%125 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i8** %124)
%126 = call signext i8 (...) @getchar()
%127 = icmp eq i8 %126, 88
br i1 %127, label %131, label %128
128: ; preds = %119
%129 = sext i8 %126 to i32
%130 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.11, i64 0, i64 0), i32 %129, i8* %123)
br label %133
131: ; preds = %119
%132 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.12, i64 0, i64 0))
br label %133
133: ; preds = %131, %128
ret i32 0
}