#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 */
struct sockaddr_in {
  int /*<<< orphan*/ sin_addr;
  int /*<<< orphan*/ sin_port;
  int /*<<< orphan*/ sin_family;
};
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ addr;

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ AF_LOCAL;
int EXIT_SUCCESS;
int O_APPEND;
int O_CREAT;
int /*<<< orphan*/ O_RDONLY;
int O_WRONLY;
int /*<<< orphan*/ SOCK_STREAM;
int /*<<< orphan*/ bzero(char *, int);
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ connect(int, struct sockaddr *, int);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ htons(int);
int /*<<< orphan*/ inet_pton(int /*<<< orphan*/, char *, int /*<<< orphan*/ *);
int open(char *, int, ...);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ read(int, char *, int);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
int /*<<< orphan*/ strncat(char *, char *, int);
scalar_t__ strncmp(char *, char *, int);
char *strtok(char *, char *);
int /*<<< orphan*/ write(int, char *, int);
int main() {
  int sockid;
  char buffer[32768];
  struct sockaddr_in addr;
  sockid = socket(AF_INET, SOCK_STREAM, 0);
  addr.sin_family = AF_INET;
  addr.sin_port = htons(9000);
  inet_pton(AF_LOCAL, "127.0.0.1", &addr.sin_addr);
  connect(sockid, (struct sockaddr *)&addr, sizeof(addr));
  while (1) {
    printf("Bitte Kommando eingeben: ");
    bzero(buffer, 32768);
    fgets(buffer, 32767, stdin);
    if (strcmp("exit\n", buffer) == 0) {
      write(sockid, buffer, strlen(buffer));
      break;
    }
    if (strncmp("put", buffer, 3) == 0) {
      buffer[strlen(buffer) - 1] = ' ';
      int i;
      char buffer_tmp[strlen(buffer) + 1];
      strcpy(buffer_tmp, buffer);
      i = 0;
      char *geteilt;
      char *argv[20];
      geteilt = strtok(buffer_tmp, " ");
      while (geteilt != NULL) {
        argv[i] = geteilt;
        geteilt = strtok(NULL, " ");
        i++;
      }
      argv[i] = 0;
      int f = open(argv[1], O_RDONLY);
      if (!f) {
        printf("An error has occured\n");
        bzero(buffer, 32768);
      } else {
        char foo[32767];
        read(f, foo, 32767);
        strncat(buffer, foo, 2000);
        write(sockid, buffer, strlen(buffer));
        bzero(buffer, 32768);
        read(sockid, buffer, 32767);
        printf("%s\n", buffer);
        close(f);
      }
    }
    if (strncmp("get", buffer, 3) == 0) {
      int i;
      char buffer_tmp[strlen(buffer) + 1];
      strcpy(buffer_tmp, buffer);
      i = 0;
      char *geteilt;
      char *argv[20];
      geteilt = strtok(buffer_tmp, " ");
      while (geteilt != NULL) {
        argv[i] = geteilt;
        geteilt = strtok(NULL, " ");
        i++;
      }
      argv[i] = 0;
      write(sockid, buffer, strlen(buffer));
      bzero(buffer, 32768);
      read(sockid, buffer, 32767);
      if (!strncmp("-1", buffer, 2)) {
        printf("An error has occured\n");
      } else {
        argv[1][strlen(argv[1]) - 1] = '\0';
        int f = open(argv[1], O_WRONLY | O_CREAT | O_APPEND, 00644);
        write(f, buffer, strlen(buffer));
        close(f);
      }
    } else {
      write(sockid, buffer, strlen(buffer));
      bzero(buffer, 32768);
      read(sockid, buffer, 32767);
      printf("%s\n", buffer);
    }
  }
  close(sockid);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10230,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2db7(%rip),%rax
mov    (%rax),%edi
mov    0x2d86(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1130 <socket@plt>
mov    %eax,-0x8(%rbp)
mov    0x2d9b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8018(%rbp)
mov    $0x2328,%edi
call   1070 <htons@plt>
mov    %eax,-0x801c(%rbp)
mov    0x2d64(%rip),%rax
mov    (%rax),%edi
lea    -0x8020(%rbp),%rdx
lea    0xd8c(%rip),%rsi
call   10e0 <inet_pton@plt>
mov    -0x8(%rbp),%edi
lea    -0x8020(%rbp),%rsi
mov    $0xc,%edx
call   1120 <connect@plt>
lea    0xd76(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    -0x8010(%rbp),%rdi
mov    $0x8000,%esi
call   1110 <bzero@plt>
lea    -0x8010(%rbp),%rdi
mov    0x2d16(%rip),%rax
mov    (%rax),%edx
mov    $0x7fff,%esi
call   10c0 <fgets@plt>
lea    -0x8010(%rbp),%rsi
lea    0xd50(%rip),%rdi
call   10d0 <strcmp@plt>
cmp    $0x0,%rax
jne    131f <main+0x10f>
mov    -0x8(%rbp),%eax
mov    %eax,-0x101c4(%rbp)
lea    -0x8010(%rbp),%rax
mov    %rax,-0x101c0(%rbp)
lea    -0x8010(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x101c4(%rbp),%edi
mov    -0x101c0(%rbp),%rsi
mov    %eax,%edx
call   1050 <write@plt>
jmp    17dc <main+0x5cc>
lea    -0x8010(%rbp),%rsi
lea    0xcfd(%rip),%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1531 <main+0x321>
lea    -0x8010(%rbp),%rdi
mov    %rdi,-0x101d8(%rbp)
call   1060 <strlen@plt>
mov    -0x101d8(%rbp),%rdi
add    $0xffffffff,%eax
cltq
movb   $0x20,-0x8010(%rbp,%rax,1)
20
call   1060 <strlen@plt>
add    $0x1,%eax
mov    %rsp,%rcx
mov    %rcx,-0x8030(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x101d0(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x8038(%rbp)
lea    -0x8010(%rbp),%rsi
call   1040 <strcpy@plt>
mov    -0x101d0(%rbp),%rdi
movl   $0x0,-0x8024(%rbp)
lea    0xc62(%rip),%rsi
call   1100 <strtok@plt>
mov    %rax,-0x8040(%rbp)
cmpq   $0x0,-0x8040(%rbp)
je     141b <main+0x20b>
mov    -0x8040(%rbp),%rcx
movslq -0x8024(%rbp),%rax
mov    %rcx,-0x80e0(%rbp,%rax,8)
ff
xor    %eax,%eax
mov    %eax,%edi
lea    0xc27(%rip),%rsi
call   1100 <strtok@plt>
mov    %rax,-0x8040(%rbp)
mov    -0x8024(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8024(%rbp)
jmp    13cc <main+0x1bc>
movslq -0x8024(%rbp),%rax
movq   $0x0,-0x80e0(%rbp,%rax,8)
mov    -0x80d8(%rbp),%rdi
mov    0x2b9c(%rip),%rax
mov    (%rax),%esi
mov    $0x0,%al
call   10f0 <open@plt>
mov    %eax,-0x80e4(%rbp)
cmpl   $0x0,-0x80e4(%rbp)
jne    147c <main+0x26c>
lea    0xbcf(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
lea    -0x8010(%rbp),%rdi
mov    $0x8000,%esi
call   1110 <bzero@plt>
jmp    1527 <main+0x317>
mov    -0x80e4(%rbp),%edi
lea    -0x100f0(%rbp),%rsi
mov    $0x7fff,%edx
call   10b0 <read@plt>
lea    -0x8010(%rbp),%rdi
lea    -0x100f0(%rbp),%rsi
mov    $0x7d0,%edx
call   1090 <strncat@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x101e4(%rbp)
lea    -0x8010(%rbp),%rax
mov    %rax,-0x101e0(%rbp)
lea    -0x8010(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x101e4(%rbp),%edi
mov    -0x101e0(%rbp),%rsi
mov    %eax,%edx
call   1050 <write@plt>
lea    -0x8010(%rbp),%rdi
mov    $0x8000,%esi
call   1110 <bzero@plt>
mov    -0x8(%rbp),%edi
lea    -0x8010(%rbp),%rsi
mov    $0x7fff,%edx
call   10b0 <read@plt>
lea    -0x8010(%rbp),%rsi
lea    0xb2f(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
mov    -0x80e4(%rbp),%edi
call   10a0 <close@plt>
mov    -0x8030(%rbp),%rax
mov    %rax,%rsp
lea    -0x8010(%rbp),%rsi
lea    0xb09(%rip),%rdi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1766 <main+0x556>
lea    -0x8010(%rbp),%rdi
call   1060 <strlen@plt>
add    $0x1,%eax
mov    %rsp,%rcx
mov    %rcx,-0x10100(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x101f0(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x10108(%rbp)
lea    -0x8010(%rbp),%rsi
call   1040 <strcpy@plt>
mov    -0x101f0(%rbp),%rdi
movl   $0x0,-0x100f4(%rbp)
lea    0xa70(%rip),%rsi
call   1100 <strtok@plt>
mov    %rax,-0x10110(%rbp)
cmpq   $0x0,-0x10110(%rbp)
je     160d <main+0x3fd>
mov    -0x10110(%rbp),%rcx
movslq -0x100f4(%rbp),%rax
mov    %rcx,-0x101b0(%rbp,%rax,8)
ff
xor    %eax,%eax
mov    %eax,%edi
lea    0xa35(%rip),%rsi
call   1100 <strtok@plt>
mov    %rax,-0x10110(%rbp)
mov    -0x100f4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x100f4(%rbp)
jmp    15be <main+0x3ae>
movslq -0x100f4(%rbp),%rax
movq   $0x0,-0x101b0(%rbp,%rax,8)
mov    -0x8(%rbp),%eax
mov    %eax,-0x101fc(%rbp)
lea    -0x8010(%rbp),%rax
mov    %rax,-0x101f8(%rbp)
lea    -0x8010(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x101fc(%rbp),%edi
mov    -0x101f8(%rbp),%rsi
mov    %eax,%edx
call   1050 <write@plt>
lea    -0x8010(%rbp),%rdi
mov    $0x8000,%esi
call   1110 <bzero@plt>
mov    -0x8(%rbp),%edi
lea    -0x8010(%rbp),%rsi
mov    $0x7fff,%edx
call   10b0 <read@plt>
lea    -0x8010(%rbp),%rsi
lea    0x9c2(%rip),%rdi
mov    $0x2,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    16b1 <main+0x4a1>
lea    0x989(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
jmp    1757 <main+0x547>
mov    -0x101a8(%rbp),%rax
mov    %rax,-0x10218(%rbp)
mov    -0x101a8(%rbp),%rdi
call   1060 <strlen@plt>
mov    %eax,%ecx
mov    -0x10218(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x101a8(%rbp),%rdi
mov    0x28b4(%rip),%rax
mov    (%rax),%esi
mov    0x2903(%rip),%rax
or     (%rax),%esi
mov    0x289a(%rip),%rax
or     (%rax),%esi
mov    $0x1a4,%edx
mov    $0x0,%al
call   10f0 <open@plt>
mov    %eax,-0x101b4(%rbp)
mov    -0x101b4(%rbp),%eax
mov    %eax,-0x1020c(%rbp)
lea    -0x8010(%rbp),%rax
mov    %rax,-0x10208(%rbp)
lea    -0x8010(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x1020c(%rbp),%edi
mov    -0x10208(%rbp),%rsi
mov    %eax,%edx
call   1050 <write@plt>
mov    -0x101b4(%rbp),%edi
call   10a0 <close@plt>
mov    -0x10100(%rbp),%rax
mov    %rax,%rsp
jmp    17d7 <main+0x5c7>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10224(%rbp)
lea    -0x8010(%rbp),%rax
mov    %rax,-0x10220(%rbp)
lea    -0x8010(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x10224(%rbp),%edi
mov    -0x10220(%rbp),%rsi
mov    %eax,%edx
call   1050 <write@plt>
lea    -0x8010(%rbp),%rdi
mov    $0x8000,%esi
call   1110 <bzero@plt>
mov    -0x8(%rbp),%edi
lea    -0x8010(%rbp),%rsi
mov    $0x7fff,%edx
call   10b0 <read@plt>
lea    -0x8010(%rbp),%rsi
lea    0x874(%rip),%rdi
mov    $0x0,%al
call   1080 <printf@plt>
jmp    128d <main+0x7d>
mov    -0x8(%rbp),%edi
call   10a0 <close@plt>
mov    0x27c5(%rip),%rax
mov    (%rax),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x100b8,%rsp
mov    0x2da5(%rip),%rbx
mov    (%rbx),%edi
mov    0x2d74(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1140 <socket@plt>
mov    %eax,%r14d
mov    (%rbx),%eax
mov    %eax,-0x30(%rbp)
mov    $0x2328,%edi
call   1080 <htons@plt>
mov    %eax,-0x34(%rbp)
mov    0x2d5f(%rip),%rax
mov    (%rax),%edi
lea    0xd8e(%rip),%rsi
lea    -0x38(%rbp),%rbx
mov    %rbx,%rdx
call   10f0 <inet_pton@plt>
mov    %r14d,%edi
mov    %rbx,%rsi
mov    $0xc,%edx
call   1130 <connect@plt>
lea    0xd75(%rip),%rdi
xor    %eax,%eax
call   1090 <printf@plt>
lea    -0x100e0(%rbp),%r12
mov    %r12,%rdi
mov    $0x8000,%esi
call   1120 <bzero@plt>
mov    0x2d19(%rip),%rax
mov    (%rax),%edx
mov    %r12,%rdi
mov    $0x7fff,%esi
call   10d0 <fgets@plt>
lea    0xd57(%rip),%rdi
mov    %r12,%rsi
call   10e0 <strcmp@plt>
test   %rax,%rax
je     15fd <main+0x3dd>
lea    0xd3d(%rip),%r13
mov    %r14d,-0x2c(%rbp)
jmp    136b <main+0x14b>
xchg   %ax,%ax
mov    %r14d,%edi
mov    %r12,%rsi
mov    %eax,%edx
call   1060 <write@plt>
mov    %r12,%rdi
mov    $0x8000,%esi
call   1120 <bzero@plt>
mov    %r14d,%edi
mov    %r12,%rsi
mov    $0x7fff,%edx
call   10c0 <read@plt>
mov    %r12,%rdi
call   1050 <puts@plt>
lea    0xce1(%rip),%rdi
xor    %eax,%eax
call   1090 <printf@plt>
mov    %r12,%rdi
mov    $0x8000,%esi
call   1120 <bzero@plt>
mov    0x2c8c(%rip),%rax
mov    (%rax),%edx
mov    %r12,%rdi
mov    $0x7fff,%esi
call   10d0 <fgets@plt>
lea    0xcca(%rip),%rdi
mov    %r12,%rsi
call   10e0 <strcmp@plt>
test   %rax,%rax
je     15fd <main+0x3dd>
lea    0xcb8(%rip),%rdi
mov    %r12,%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
jne    14b2 <main+0x292>
mov    %r12,%rdi
call   1070 <strlen@plt>
cltq
movb   $0x20,-0x1(%rax,%r12,1)
mov    %r12,%rdi
call   1070 <strlen@plt>
mov    %rsp,%r14
add    $0x1,%eax
mov    %rsp,%rbx
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %rbx,%rdi
mov    %r12,%rsi
call   1040 <strcpy@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
call   1110 <strtok@plt>
xor    %ebx,%ebx
test   %rax,%rax
je     13fb <main+0x1db>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rax,-0xe0(%rbp,%rbx,8)
ff
xor    %edi,%edi
mov    %r13,%rsi
call   1110 <strtok@plt>
add    $0x1,%rbx
test   %rax,%rax
jne    13e0 <main+0x1c0>
mov    %ebx,%eax
movq   $0x0,-0xe0(%rbp,%rax,8)
mov    -0xd8(%rbp),%rdi
mov    0x2bc1(%rip),%rax
mov    (%rax),%esi
xor    %eax,%eax
call   1100 <open@plt>
test   %eax,%eax
je     1492 <main+0x272>
mov    %eax,%r15d
mov    %eax,%edi
lea    -0x80e0(%rbp),%rbx
mov    %rbx,%rsi
mov    $0x7fff,%edx
call   10c0 <read@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
mov    $0x7d0,%edx
call   10a0 <strncat@plt>
mov    %r12,%rdi
call   1070 <strlen@plt>
mov    -0x2c(%rbp),%ebx
mov    %ebx,%edi
mov    %r12,%rsi
mov    %eax,%edx
call   1060 <write@plt>
mov    %r12,%rdi
mov    $0x8000,%esi
call   1120 <bzero@plt>
mov    %ebx,%edi
mov    %r12,%rsi
mov    $0x7fff,%edx
call   10c0 <read@plt>
mov    %r12,%rdi
call   1050 <puts@plt>
mov    %r15d,%edi
call   10b0 <close@plt>
jmp    14ab <main+0x28b>
lea    0xb9c(%rip),%rdi
call   1050 <puts@plt>
mov    %r12,%rdi
mov    $0x8000,%esi
call   1120 <bzero@plt>
mov    %r14,%rsp
mov    -0x2c(%rbp),%r14d
lea    0xb75(%rip),%rdi
mov    %r12,%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
mov    %rax,%rbx
mov    %r12,%rdi
call   1070 <strlen@plt>
test   %rbx,%rbx
jne    12f0 <main+0xd0>
mov    %rsp,%r15
add    $0x1,%eax
mov    %rsp,%rbx
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %rbx,%rdi
mov    %r12,%rsi
call   1040 <strcpy@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
call   1110 <strtok@plt>
xor    %ebx,%ebx
test   %rax,%rax
je     152b <main+0x30b>
xchg   %ax,%ax
mov    %rax,-0x80e0(%rbp,%rbx,8)
ff
xor    %edi,%edi
mov    %r13,%rsi
call   1110 <strtok@plt>
add    $0x1,%rbx
test   %rax,%rax
jne    1510 <main+0x2f0>
mov    %ebx,%eax
movq   $0x0,-0x80e0(%rbp,%rax,8)
mov    %r12,%rdi
call   1070 <strlen@plt>
mov    %r14d,%edi
mov    %r12,%rsi
mov    %eax,%edx
call   1060 <write@plt>
mov    %r12,%rdi
mov    $0x8000,%esi
call   1120 <bzero@plt>
mov    %r14d,%edi
mov    %r12,%rsi
mov    $0x7fff,%edx
call   10c0 <read@plt>
lea    0xac0(%rip),%rdi
mov    %r12,%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     15e9 <main+0x3c9>
mov    -0x80d8(%rbp),%rbx
mov    %rbx,%rdi
call   1070 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%rbx,1)
mov    0x2a57(%rip),%rax
mov    (%rax),%esi
mov    0x29f6(%rip),%rax
or     (%rax),%esi
mov    0x29e5(%rip),%rax
or     (%rax),%esi
mov    %rbx,%rdi
mov    $0x1a4,%edx
xor    %eax,%eax
call   1100 <open@plt>
mov    %eax,%ebx
mov    %r12,%rdi
call   1070 <strlen@plt>
mov    %ebx,%edi
mov    %r12,%rsi
mov    %eax,%edx
call   1060 <write@plt>
mov    %ebx,%edi
call   10b0 <close@plt>
mov    %r15,%rsp
jmp    1322 <main+0x102>
lea    0xa45(%rip),%rdi
call   1050 <puts@plt>
mov    %r15,%rsp
jmp    1322 <main+0x102>
lea    -0x100e0(%rbp),%rbx
mov    %rbx,%rdi
call   1070 <strlen@plt>
mov    %r14d,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1060 <write@plt>
mov    %r14d,%edi
call   10b0 <close@plt>
mov    0x2988(%rip),%rax
mov    (%rax),%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.sockaddr_in = type { i32, i32, i32 }
%struct.sockaddr = type { i32 }
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
@AF_LOCAL = global i32 0
@.str = [10 x i8] c"127.0.0.1\00"
@.str.1 = [26 x i8] c"Bitte Kommando eingeben: \00"
@stdin = global i32 0
@.str.2 = [6 x i8] c"exit\0A\00"
@.str.3 = [4 x i8] c"put\00"
@.str.4 = [2 x i8] c" \00"
@O_RDONLY = global i32 0
@.str.5 = [22 x i8] c"An error has occured\0A\00"
@.str.6 = [4 x i8] c"%s\0A\00"
@.str.7 = [4 x i8] c"get\00"
@.str.8 = [3 x i8] c"-1\00"
@O_WRONLY = global i32 0
@O_CREAT = global i32 0
@O_APPEND = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [32768 x i8]
%4 = alloca %struct.sockaddr_in
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i8*
%9 = alloca [20 x i8*]
%10 = alloca i32
%11 = alloca [32767 x i8]
%12 = alloca i32
%13 = alloca i8*
%14 = alloca i64
%15 = alloca i8*
%16 = alloca [20 x i8*]
%17 = alloca i32
store i32 0, i32* %1
%18 = load i32, i32* @AF_INET
%19 = load i32, i32* @SOCK_STREAM
%20 = call i32 @socket(i32 %18, i32 %19, i32 0)
store i32 %20, i32* %2
%21 = load i32, i32* @AF_INET
%22 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %4, i32 0, i32 2
store i32 %21, i32* %22
%23 = call i32 @htons(i32 9000)
%24 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %4, i32 0, i32 1
store i32 %23, i32* %24
%25 = load i32, i32* @AF_LOCAL
%26 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %4, i32 0, i32 0
%27 = call i32 @inet_pton(i32 %25, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32* %26)
%28 = load i32, i32* %2
%29 = bitcast %struct.sockaddr_in* %4 to %struct.sockaddr*
%30 = call i32 @connect(i32 %28, %struct.sockaddr* %29, i32 12)
br label %31
31: ; preds = %0, %197
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%33 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 0
%34 = call i32 @bzero(i8* %33, i32 32768)
%35 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 0
%36 = load i32, i32* @stdin
%37 = call i32 @fgets(i8* %35, i32 32767, i32 %36)
%38 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 0
%39 = call i64 @strcmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* %38)
%40 = icmp eq i64 %39, 0
br i1 %40, label %41, label %47
41: ; preds = %31
%42 = load i32, i32* %2
%43 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 0
%44 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 0
%45 = call i32 @strlen(i8* %44)
%46 = call i32 @write(i32 %42, i8* %43, i32 %45)
br label %198
47: ; preds = %31
%48 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 0
%49 = call i64 @strncmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %48, i32 3)
%50 = icmp eq i64 %49, 0
br i1 %50, label %51, label %114
51: ; preds = %47
%52 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 0
%53 = call i32 @strlen(i8* %52)
%54 = sub nsw i32 %53, 1
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 %55
store i8 32, i8* %56
%57 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 0
%58 = call i32 @strlen(i8* %57)
%59 = add nsw i32 %58, 1
%60 = zext i32 %59 to i64
%61 = call i8* @llvm.stacksave()
store i8* %61, i8** %6
%62 = alloca i8, i64 %60
store i64 %60, i64* %7
%63 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 0
%64 = call i32 @strcpy(i8* %62, i8* %63)
store i32 0, i32* %5
%65 = call i8* @strtok(i8* %62, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i8* %65, i8** %8
br label %66
66: ; preds = %69, %51
%67 = load i8*, i8** %8
%68 = icmp ne i8* %67, null
br i1 %68, label %69, label %77
69: ; preds = %66
%70 = load i8*, i8** %8
%71 = load i32, i32* %5
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds [20 x i8*], [20 x i8*]* %9, i64 0, i64 %72
store i8* %70, i8** %73
%74 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i8* %74, i8** %8
%75 = load i32, i32* %5
%76 = add nsw i32 %75, 1
store i32 %76, i32* %5
br label %66
77: ; preds = %66
%78 = load i32, i32* %5
%79 = sext i32 %78 to i64
%80 = getelementptr inbounds [20 x i8*], [20 x i8*]* %9, i64 0, i64 %79
store i8* null, i8** %80
%81 = getelementptr inbounds [20 x i8*], [20 x i8*]* %9, i64 0, i64 1
%82 = load i8*, i8** %81
%83 = load i32, i32* @O_RDONLY
%84 = call i32 (i8*, i32, ...) @open(i8* %82, i32 %83)
store i32 %84, i32* %10
%85 = load i32, i32* %10
%86 = icmp ne i32 %85, 0
br i1 %86, label %91, label %87
87: ; preds = %77
%88 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0))
%89 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 0
%90 = call i32 @bzero(i8* %89, i32 32768)
br label %112
91: ; preds = %77
%92 = load i32, i32* %10
%93 = getelementptr inbounds [32767 x i8], [32767 x i8]* %11, i64 0, i64 0
%94 = call i32 @read(i32 %92, i8* %93, i32 32767)
%95 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 0
%96 = getelementptr inbounds [32767 x i8], [32767 x i8]* %11, i64 0, i64 0
%97 = call i32 @strncat(i8* %95, i8* %96, i32 2000)
%98 = load i32, i32* %2
%99 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 0
%100 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 0
%101 = call i32 @strlen(i8* %100)
%102 = call i32 @write(i32 %98, i8* %99, i32 %101)
%103 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 0
%104 = call i32 @bzero(i8* %103, i32 32768)
%105 = load i32, i32* %2
%106 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 0
%107 = call i32 @read(i32 %105, i8* %106, i32 32767)
%108 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 0
%109 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %108)
%110 = load i32, i32* %10
%111 = call i32 @close(i32 %110)
br label %112
112: ; preds = %91, %87
%113 = load i8*, i8** %6
br label %114
114: ; preds = %112, %47
%115 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 0
%116 = call i64 @strncmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %115, i32 3)
%117 = icmp eq i64 %116, 0
br i1 %117, label %118, label %184
118: ; preds = %114
%119 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 0
%120 = call i32 @strlen(i8* %119)
%121 = add nsw i32 %120, 1
%122 = zext i32 %121 to i64
%123 = call i8* @llvm.stacksave()
store i8* %123, i8** %13
%124 = alloca i8, i64 %122
store i64 %122, i64* %14
%125 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 0
%126 = call i32 @strcpy(i8* %124, i8* %125)
store i32 0, i32* %12
%127 = call i8* @strtok(i8* %124, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i8* %127, i8** %15
br label %128
128: ; preds = %131, %118
%129 = load i8*, i8** %15
%130 = icmp ne i8* %129, null
br i1 %130, label %131, label %139
131: ; preds = %128
%132 = load i8*, i8** %15
%133 = load i32, i32* %12
%134 = sext i32 %133 to i64
%135 = getelementptr inbounds [20 x i8*], [20 x i8*]* %16, i64 0, i64 %134
store i8* %132, i8** %135
%136 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i8* %136, i8** %15
%137 = load i32, i32* %12
%138 = add nsw i32 %137, 1
store i32 %138, i32* %12
br label %128
139: ; preds = %128
%140 = load i32, i32* %12
%141 = sext i32 %140 to i64
%142 = getelementptr inbounds [20 x i8*], [20 x i8*]* %16, i64 0, i64 %141
store i8* null, i8** %142
%143 = load i32, i32* %2
%144 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 0
%145 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 0
%146 = call i32 @strlen(i8* %145)
%147 = call i32 @write(i32 %143, i8* %144, i32 %146)
%148 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 0
%149 = call i32 @bzero(i8* %148, i32 32768)
%150 = load i32, i32* %2
%151 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 0
%152 = call i32 @read(i32 %150, i8* %151, i32 32767)
%153 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 0
%154 = call i64 @strncmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i8* %153, i32 2)
%155 = icmp ne i64 %154, 0
br i1 %155, label %158, label %156
156: ; preds = %139
%157 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0))
br label %182
158: ; preds = %139
%159 = getelementptr inbounds [20 x i8*], [20 x i8*]* %16, i64 0, i64 1
%160 = load i8*, i8** %159
%161 = getelementptr inbounds [20 x i8*], [20 x i8*]* %16, i64 0, i64 1
%162 = load i8*, i8** %161
%163 = call i32 @strlen(i8* %162)
%164 = sub nsw i32 %163, 1
%165 = sext i32 %164 to i64
%166 = getelementptr inbounds i8, i8* %160, i64 %165
store i8 0, i8* %166
%167 = getelementptr inbounds [20 x i8*], [20 x i8*]* %16, i64 0, i64 1
%168 = load i8*, i8** %167
%169 = load i32, i32* @O_WRONLY
%170 = load i32, i32* @O_CREAT
%171 = or i32 %169, %170
%172 = load i32, i32* @O_APPEND
%173 = or i32 %171, %172
%174 = call i32 (i8*, i32, ...) @open(i8* %168, i32 %173, i32 420)
store i32 %174, i32* %17
%175 = load i32, i32* %17
%176 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 0
%177 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 0
%178 = call i32 @strlen(i8* %177)
%179 = call i32 @write(i32 %175, i8* %176, i32 %178)
%180 = load i32, i32* %17
%181 = call i32 @close(i32 %180)
br label %182
182: ; preds = %158, %156
%183 = load i8*, i8** %13
br label %197
184: ; preds = %114
%185 = load i32, i32* %2
%186 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 0
%187 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 0
%188 = call i32 @strlen(i8* %187)
%189 = call i32 @write(i32 %185, i8* %186, i32 %188)
%190 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 0
%191 = call i32 @bzero(i8* %190, i32 32768)
%192 = load i32, i32* %2
%193 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 0
%194 = call i32 @read(i32 %192, i8* %193, i32 32767)
%195 = getelementptr inbounds [32768 x i8], [32768 x i8]* %3, i64 0, i64 0
%196 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %195)
br label %197
197: ; preds = %184, %182
br label %31
198: ; preds = %41
%199 = load i32, i32* %2
%200 = call i32 @close(i32 %199)
%201 = load i32, i32* @EXIT_SUCCESS
ret i32 %201
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32, i32, i32 }
%struct.sockaddr = type { i32 }
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
@AF_LOCAL = global i32 0
@.str = [10 x i8] c"127.0.0.1\00"
@.str.1 = [26 x i8] c"Bitte Kommando eingeben: \00"
@stdin = global i32 0
@.str.2 = [6 x i8] c"exit\0A\00"
@.str.3 = [4 x i8] c"put\00"
@.str.4 = [2 x i8] c" \00"
@O_RDONLY = global i32 0
@.str.7 = [4 x i8] c"get\00"
@.str.8 = [3 x i8] c"-1\00"
@O_WRONLY = global i32 0
@O_CREAT = global i32 0
@O_APPEND = global i32 0
@EXIT_SUCCESS = global i32 0
@str.9 = [21 x i8] c"An error has occured\00"
define i32 @main() {
%1 = alloca [32768 x i8]
%2 = alloca %struct.sockaddr_in
%3 = alloca [20 x i8*]
%4 = alloca [32767 x i8]
%5 = alloca [20 x i8*]
%6 = getelementptr inbounds [32768 x i8], [32768 x i8]* %1, i64 0, i64 0
%7 = bitcast %struct.sockaddr_in* %2 to i8*
%8 = load i32, i32* @AF_INET
%9 = load i32, i32* @SOCK_STREAM
%10 = tail call i32 @socket(i32 %8, i32 %9, i32 0)
%11 = load i32, i32* @AF_INET
%12 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %2, i64 0, i32 2
store i32 %11, i32* %12
%13 = tail call i32 @htons(i32 9000)
%14 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %2, i64 0, i32 1
store i32 %13, i32* %14
%15 = load i32, i32* @AF_LOCAL
%16 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %2, i64 0, i32 0
%17 = call i32 @inet_pton(i32 %15, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32* %16)
%18 = bitcast %struct.sockaddr_in* %2 to %struct.sockaddr*
%19 = call i32 @connect(i32 %10, %struct.sockaddr* %18, i32 12)
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%21 = call i32 @bzero(i8* %6, i32 32768)
%22 = load i32, i32* @stdin
%23 = call i32 @fgets(i8* %6, i32 32767, i32 %22)
%24 = call i64 @strcmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* %6)
%25 = icmp eq i64 %24, 0
br i1 %25, label %32, label %26
26: ; preds = %0
%27 = bitcast [20 x i8*]* %3 to i8*
%28 = getelementptr inbounds [20 x i8*], [20 x i8*]* %3, i64 0, i64 1
%29 = getelementptr inbounds [32767 x i8], [32767 x i8]* %4, i64 0, i64 0
%30 = bitcast [20 x i8*]* %5 to i8*
%31 = getelementptr inbounds [20 x i8*], [20 x i8*]* %5, i64 0, i64 1
br label %37
32: ; preds = %133, %0
%33 = call i32 @strlen(i8* %6)
%34 = call i32 @write(i32 %10, i8* %6, i32 %33)
%35 = call i32 @close(i32 %10)
%36 = load i32, i32* @EXIT_SUCCESS
ret i32 %36
37: ; preds = %26, %133
%38 = call i64 @strncmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %6, i32 3)
%39 = icmp eq i64 %38, 0
br i1 %39, label %40, label %81
40: ; preds = %37
%41 = call i32 @strlen(i8* %6)
%42 = add nsw i32 %41, -1
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds [32768 x i8], [32768 x i8]* %1, i64 0, i64 %43
store i8 32, i8* %44
%45 = call i32 @strlen(i8* %6)
%46 = add nsw i32 %45, 1
%47 = zext i32 %46 to i64
%48 = call i8* @llvm.stacksave()
%49 = alloca i8, i64 %47
%50 = call i32 @strcpy(i8* %49, i8* %6)
%51 = call i8* @strtok(i8* %49, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%52 = icmp eq i8* %51, null
br i1 %52, label %60, label %53
53: ; preds = %40, %53
%54 = phi i64 [ %58, %53 ], [ 0, %40 ]
%55 = phi i8* [ %57, %53 ], [ %51, %40 ]
%56 = getelementptr inbounds [20 x i8*], [20 x i8*]* %3, i64 0, i64 %54
store i8* %55, i8** %56
%57 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%58 = add nuw i64 %54, 1
%59 = icmp eq i8* %57, null
br i1 %59, label %60, label %53
60: ; preds = %53, %40
%61 = phi i64 [ 0, %40 ], [ %58, %53 ]
%62 = and i64 %61, 4294967295
%63 = getelementptr inbounds [20 x i8*], [20 x i8*]* %3, i64 0, i64 %62
store i8* null, i8** %63
%64 = load i8*, i8** %28
%65 = load i32, i32* @O_RDONLY
%66 = call i32 (i8*, i32, ...) @open(i8* %64, i32 %65)
%67 = icmp eq i32 %66, 0
br i1 %67, label %68, label %71
68: ; preds = %60
%69 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.9, i64 0, i64 0))
%70 = call i32 @bzero(i8* %6, i32 32768)
br label %80
71: ; preds = %60
%72 = call i32 @read(i32 %66, i8* %29, i32 32767)
%73 = call i32 @strncat(i8* %6, i8* %29, i32 2000)
%74 = call i32 @strlen(i8* %6)
%75 = call i32 @write(i32 %10, i8* %6, i32 %74)
%76 = call i32 @bzero(i8* %6, i32 32768)
%77 = call i32 @read(i32 %10, i8* %6, i32 32767)
%78 = call i32 @puts(i8* %6)
%79 = call i32 @close(i32 %66)
br label %80
80: ; preds = %71, %68
br label %81
81: ; preds = %80, %37
%82 = call i64 @strncmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i8* %6, i32 3)
%83 = icmp eq i64 %82, 0
%84 = call i32 @strlen(i8* %6)
br i1 %83, label %85, label %128
85: ; preds = %81
%86 = add nsw i32 %84, 1
%87 = zext i32 %86 to i64
%88 = call i8* @llvm.stacksave()
%89 = alloca i8, i64 %87
%90 = call i32 @strcpy(i8* %89, i8* %6)
%91 = call i8* @strtok(i8* %89, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%92 = icmp eq i8* %91, null
br i1 %92, label %100, label %93
93: ; preds = %85, %93
%94 = phi i64 [ %98, %93 ], [ 0, %85 ]
%95 = phi i8* [ %97, %93 ], [ %91, %85 ]
%96 = getelementptr inbounds [20 x i8*], [20 x i8*]* %5, i64 0, i64 %94
store i8* %95, i8** %96
%97 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%98 = add nuw i64 %94, 1
%99 = icmp eq i8* %97, null
br i1 %99, label %100, label %93
100: ; preds = %93, %85
%101 = phi i64 [ 0, %85 ], [ %98, %93 ]
%102 = and i64 %101, 4294967295
%103 = getelementptr inbounds [20 x i8*], [20 x i8*]* %5, i64 0, i64 %102
store i8* null, i8** %103
%104 = call i32 @strlen(i8* %6)
%105 = call i32 @write(i32 %10, i8* %6, i32 %104)
%106 = call i32 @bzero(i8* %6, i32 32768)
%107 = call i32 @read(i32 %10, i8* %6, i32 32767)
%108 = call i64 @strncmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i8* %6, i32 2)
%109 = icmp eq i64 %108, 0
br i1 %109, label %110, label %112
110: ; preds = %100
%111 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.9, i64 0, i64 0))
br label %127
112: ; preds = %100
%113 = load i8*, i8** %31
%114 = call i32 @strlen(i8* %113)
%115 = add nsw i32 %114, -1
%116 = sext i32 %115 to i64
%117 = getelementptr inbounds i8, i8* %113, i64 %116
store i8 0, i8* %117
%118 = load i32, i32* @O_WRONLY
%119 = load i32, i32* @O_CREAT
%120 = or i32 %119, %118
%121 = load i32, i32* @O_APPEND
%122 = or i32 %120, %121
%123 = call i32 (i8*, i32, ...) @open(i8* %113, i32 %122, i32 420)
%124 = call i32 @strlen(i8* %6)
%125 = call i32 @write(i32 %123, i8* %6, i32 %124)
%126 = call i32 @close(i32 %123)
br label %127
127: ; preds = %112, %110
br label %133
128: ; preds = %81
%129 = call i32 @write(i32 %10, i8* %6, i32 %84)
%130 = call i32 @bzero(i8* %6, i32 32768)
%131 = call i32 @read(i32 %10, i8* %6, i32 32767)
%132 = call i32 @puts(i8* %6)
br label %133
133: ; preds = %128, %127
%134 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%135 = call i32 @bzero(i8* %6, i32 32768)
%136 = load i32, i32* @stdin
%137 = call i32 @fgets(i8* %6, i32 32767, i32 %136)
%138 = call i64 @strcmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* %6)
%139 = icmp eq i64 %138, 0
br i1 %139, label %32, label %37
}