#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*/ s;
typedef int /*<<< orphan*/ method;
typedef int /*<<< orphan*/ choose;

/* Variables and functions */
int LINE_MAX;
int /*<<< orphan*/ atoi(char *);
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ remove_term(char *);
int /*<<< orphan*/ stdin;
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strlen(char *);
scalar_t__ sys_clipboard_copy(char *, int /*<<< orphan*/, int /*<<< orphan*/);
scalar_t__ sys_clipboard_paste(char **, int *);
int main(int argc, char **argv) {
  char choose[LINE_MAX], s[LINE_MAX], method[LINE_MAX], *p;
  int bytes, length, pos, i;
  const int line_bytes = sizeof(int);
  while (1) {
    printf("\n");
    printf("p - show content in clipboard\n");
    printf("c - copy data into clipboard\n");
    printf("choose: ");
    if (fgets(choose, sizeof(choose), stdin) == NULL)
      continue;
    remove_term(choose);
    if (strcmp(choose, "p") == 0) {
      if (sys_clipboard_paste(&p, &bytes) != 0) {
        printf("paste failure\n");
        continue;
      }
      pos = 0;
      printf("---- content start ----\n");
      while (pos < bytes) {
        length = *((int *)&p[pos]);
        for (i = 0; i < length; i++)
          printf("%c", p[pos + line_bytes + i]);
        printf("\n");
        pos += line_bytes + length;
      }
      printf("----- content end -----\n");
    } else if (strcmp(choose, "c") == 0) {
      printf("input content: ");
      if (fgets(s, sizeof(s), stdin) == NULL)
        continue;
      remove_term(s);
      printf("choose method:[0-TRUNC 1-APPEND_LINE "
             "2-APPEND_CONTENT]: ");
      if (fgets(method, sizeof(method), stdin) == NULL)
        continue;
      remove_term(method);
      if (sys_clipboard_copy(s, strlen(s), atoi(method)) != 0) {
        printf("copy failure\n");
        continue;
      }
    } else
      continue;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e40(%rip),%rax
mov    (%rax),%ecx
mov    %rcx,-0x80(%rbp)
mov    %rsp,%rdx
mov    %rdx,-0x18(%rbp)
mov    %rcx,%rsi
add    $0xf,%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%rdx
sub    %rsi,%rdx
mov    %rdx,-0x78(%rbp)
mov    %rdx,%rsp
mov    %rcx,-0x20(%rbp)
mov    (%rax),%ecx
mov    %rcx,-0x70(%rbp)
mov    %rcx,%rsi
add    $0xf,%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%rdx
sub    %rsi,%rdx
mov    %rdx,-0x68(%rbp)
mov    %rdx,%rsp
mov    %rcx,-0x28(%rbp)
mov    (%rax),%eax
mov    %rax,-0x60(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x58(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x30(%rbp)
movl   $0x4,-0x4c(%rbp)
jmp    1219 <main+0x99>
lea    0xe4e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xdd2(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xde3(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xdf3(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x78(%rbp),%rdi
mov    -0x80(%rbp),%rax
mov    %eax,%esi
mov    0x2d86(%rip),%rax
mov    (%rax),%edx
call   1060 <fgets@plt>
cmp    $0x0,%rax
jne    1278 <main+0xf8>
jmp    1214 <main+0x94>
mov    -0x78(%rbp),%rdi
call   1080 <remove_term@plt>
mov    -0x78(%rbp),%rdi
lea    0xdba(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
jne    1369 <main+0x1e9>
lea    -0x38(%rbp),%rdi
lea    -0x3c(%rbp),%rsi
call   10a0 <sys_clipboard_paste@plt>
cmp    $0x0,%rax
je     12c5 <main+0x145>
lea    0xd8f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1214 <main+0x94>
movl   $0x0,-0x44(%rbp)
lea    0xd84(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x44(%rbp),%eax
cmp    -0x3c(%rbp),%eax
jge    1356 <main+0x1d6>
mov    -0x38(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    (%rax,%rcx,1),%eax
mov    %eax,-0x40(%rbp)
movl   $0x0,-0x48(%rbp)
mov    -0x48(%rbp),%eax
cmp    -0x40(%rbp),%eax
jge    1337 <main+0x1b7>
mov    -0x38(%rbp),%rax
mov    -0x44(%rbp),%ecx
add    $0x4,%ecx
add    -0x48(%rbp),%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%esi
lea    0xd4e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    12fb <main+0x17b>
lea    0xd30(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x40(%rbp),%eax
add    $0x4,%eax
add    -0x44(%rbp),%eax
mov    %eax,-0x44(%rbp)
jmp    12da <main+0x15a>
lea    0xd16(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1454 <main+0x2d4>
mov    -0x78(%rbp),%rdi
lea    0xcfd(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
jne    144a <main+0x2ca>
lea    0xd02(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x68(%rbp),%rdi
mov    -0x70(%rbp),%rax
mov    %eax,%esi
mov    0x2c46(%rip),%rax
mov    (%rax),%edx
call   1060 <fgets@plt>
cmp    $0x0,%rax
jne    13b8 <main+0x238>
jmp    1214 <main+0x94>
mov    -0x68(%rbp),%rdi
call   1080 <remove_term@plt>
lea    0xcd4(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x58(%rbp),%rdi
mov    -0x60(%rbp),%rax
mov    %eax,%esi
mov    0x2c08(%rip),%rax
mov    (%rax),%edx
call   1060 <fgets@plt>
cmp    $0x0,%rax
jne    13f6 <main+0x276>
jmp    1214 <main+0x94>
mov    -0x58(%rbp),%rdi
call   1080 <remove_term@plt>
mov    -0x68(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x58(%rbp),%rdi
mov    %eax,-0x84(%rbp)
call   1090 <atoi@plt>
mov    -0x68(%rbp),%rdi
mov    -0x84(%rbp),%esi
mov    %eax,%edx
call   1030 <sys_clipboard_copy@plt>
cmp    $0x0,%rax
je     1445 <main+0x2c5>
lea    0xc9c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1214 <main+0x94>
jmp    144f <main+0x2cf>
jmp    1214 <main+0x94>
jmp    1454 <main+0x2d4>
jmp    1214 <main+0x94>

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    0x2e28(%rip),%rax
mov    (%rax),%r12d
mov    %rsp,%r15
mov    %r12,%rax
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r15
mov    %r15,%rsp
mov    %rsp,%r14
sub    %rax,%r14
mov    %r14,%rsp
mov    %rsp,%rcx
sub    %rax,%rcx
mov    %rcx,-0x38(%rbp)
mov    %rcx,%rsp
lea    0xe6a(%rip),%rbx
lea    0xe81(%rip),%r13
mov    %r12,-0x50(%rbp)
mov    %r14,-0x48(%rbp)
jmp    1222 <main+0x82>
nopl   (%rax)
lea    -0x40(%rbp),%rdi
lea    -0x2c(%rbp),%rsi
call   10c0 <sys_clipboard_paste@plt>
lea    0xeba(%rip),%rdi
test   %rax,%rax
je     1341 <main+0x1a1>
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    %r13,%rdi
call   1040 <puts@plt>
lea    0xdbd(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x2d97(%rip),%rax
mov    (%rax),%edx
mov    %r15,%rdi
mov    %r12d,%esi
call   1080 <fgets@plt>
test   %rax,%rax
je     1222 <main+0x82>
mov    %r15,%rdi
call   10a0 <remove_term@plt>
mov    %r15,%rdi
lea    0xd94(%rip),%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
je     1200 <main+0x60>
mov    %r15,%rdi
lea    0xd82(%rip),%rsi
call   1090 <strcmp@plt>
test   %rax,%rax
jne    1222 <main+0x82>
lea    0xd73(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x2d40(%rip),%rax
mov    (%rax),%edx
mov    %r14,%rdi
mov    %r12d,%esi
call   1080 <fgets@plt>
test   %rax,%rax
je     1222 <main+0x82>
mov    %r14,%rdi
call   10a0 <remove_term@plt>
lea    0xd50(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x2d0d(%rip),%rax
mov    (%rax),%edx
mov    -0x38(%rbp),%rdi
mov    %r12d,%esi
call   1080 <fgets@plt>
test   %rax,%rax
je     1222 <main+0x82>
mov    -0x38(%rbp),%rbx
mov    %rbx,%rdi
call   10a0 <remove_term@plt>
mov    %r14,%rdi
call   1060 <strlen@plt>
mov    %eax,%r13d
mov    %rbx,%rdi
call   10b0 <atoi@plt>
mov    %r14,%rdi
mov    %r13d,%esi
lea    0xd56(%rip),%r13
lea    0xd31(%rip),%rbx
mov    %eax,%edx
call   1050 <sys_clipboard_copy@plt>
lea    0xd5e(%rip),%rdi
test   %rax,%rax
jne    121d <main+0x7d>
jmp    1222 <main+0x82>
lea    0xd56(%rip),%rdi
call   1040 <puts@plt>
cmpl   $0x0,-0x2c(%rbp)
lea    0xd5e(%rip),%rdi
jle    121d <main+0x7d>
xor    %ebx,%ebx
jmp    1382 <main+0x1e2>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0xa,%edi
call   1030 <putchar@plt>
add    %r13d,%ebx
cmp    -0x2c(%rbp),%ebx
jge    13cb <main+0x22b>
mov    -0x40(%rbp),%rax
movslq %ebx,%rbx
mov    (%rax,%rbx,1),%r13d
add    $0x4,%ebx
test   %r13d,%r13d
jle    1370 <main+0x1d0>
movslq %ebx,%r12
movsbl (%rax,%r12,1),%edi
call   1030 <putchar@plt>
cmp    $0x1,%r13d
je     1370 <main+0x1d0>
lea    -0x1(%r13),%r14
nopl   0x0(%rax)
mov    -0x40(%rbp),%rax
movsbl 0x1(%rax,%r12,1),%edi
call   1030 <putchar@plt>
add    $0x1,%r12
add    $0xffffffffffffffff,%r14
jne    13b0 <main+0x210>
jmp    1370 <main+0x1d0>
lea    0xce4(%rip),%rdi
mov    -0x50(%rbp),%r12
mov    -0x48(%rbp),%r14
lea    0xc75(%rip),%rbx
lea    0xc8c(%rip),%r13
call   1040 <puts@plt>
jmp    1222 <main+0x82>

LLVM IR (-O0):
@LINE_MAX = global i32 0
@.str = [2 x i8] c"\0A\00"
@.str.1 = [31 x i8] c"p - show content in clipboard\0A\00"
@.str.2 = [30 x i8] c"c - copy data into clipboard\0A\00"
@.str.3 = [9 x i8] c"choose: \00"
@stdin = global i32 0
@.str.4 = [2 x i8] c"p\00"
@.str.5 = [15 x i8] c"paste failure\0A\00"
@.str.6 = [25 x i8] c"---- content start ----\0A\00"
@.str.7 = [3 x i8] c"%c\00"
@.str.8 = [25 x i8] c"----- content end -----\0A\00"
@.str.9 = [2 x i8] c"c\00"
@.str.10 = [16 x i8] c"input content: \00"
@.str.11 = [57 x i8] c"choose method:[0-TRUNC 1-APPEND_LINE 2-APPEND_CONTENT]: \00"
@.str.12 = [14 x i8] c"copy failure\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%16 = load i32, i32* @LINE_MAX
%17 = zext i32 %16 to i64
%18 = call i8* @llvm.stacksave()
store i8* %18, i8** %6
%19 = alloca i8, i64 %17
store i64 %17, i64* %7
%20 = load i32, i32* @LINE_MAX
%21 = zext i32 %20 to i64
%22 = alloca i8, i64 %21
store i64 %21, i64* %8
%23 = load i32, i32* @LINE_MAX
%24 = zext i32 %23 to i64
%25 = alloca i8, i64 %24
store i64 %24, i64* %9
store i32 4, i32* %15
br label %26
26: ; preds = %114, %112, %109, %102, %94, %44, %36, %2
br label %27
27: ; preds = %26
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%32 = trunc i64 %17 to i32
%33 = load i32, i32* @stdin
%34 = call i32* @fgets(i8* %19, i32 %32, i32 %33)
%35 = icmp eq i32* %34, null
br i1 %35, label %36, label %37
36: ; preds = %27
br label %26
37: ; preds = %27
%38 = call i32 @remove_term(i8* %19)
%39 = call i64 @strcmp(i8* %19, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%40 = icmp eq i64 %39, 0
br i1 %40, label %41, label %85
41: ; preds = %37
%42 = call i64 @sys_clipboard_paste(i8** %10, i32* %11)
%43 = icmp ne i64 %42, 0
br i1 %43, label %44, label %46
44: ; preds = %41
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0))
br label %26
46: ; preds = %41
store i32 0, i32* %13
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.6, i64 0, i64 0))
br label %48
48: ; preds = %77, %46
%49 = load i32, i32* %13
%50 = load i32, i32* %11
%51 = icmp slt i32 %49, %50
br i1 %51, label %52, label %83
52: ; preds = %48
%53 = load i8*, i8** %10
%54 = load i32, i32* %13
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds i8, i8* %53, i64 %55
%57 = bitcast i8* %56 to i32*
%58 = load i32, i32* %57
store i32 %58, i32* %12
store i32 0, i32* %14
br label %59
59: ; preds = %74, %52
%60 = load i32, i32* %14
%61 = load i32, i32* %12
%62 = icmp slt i32 %60, %61
br i1 %62, label %63, label %77
63: ; preds = %59
%64 = load i8*, i8** %10
%65 = load i32, i32* %13
%66 = add nsw i32 %65, 4
%67 = load i32, i32* %14
%68 = add nsw i32 %66, %67
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds i8, i8* %64, i64 %69
%71 = load i8, i8* %70
%72 = sext i8 %71 to i32
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32 %72)
br label %74
74: ; preds = %63
%75 = load i32, i32* %14
%76 = add nsw i32 %75, 1
store i32 %76, i32* %14
br label %59
77: ; preds = %59
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%79 = load i32, i32* %12
%80 = add nsw i32 4, %79
%81 = load i32, i32* %13
%82 = add nsw i32 %81, %80
store i32 %82, i32* %13
br label %48
83: ; preds = %48
%84 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.8, i64 0, i64 0))
br label %114
85: ; preds = %37
%86 = call i64 @strcmp(i8* %19, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
%87 = icmp eq i64 %86, 0
br i1 %87, label %88, label %112
88: ; preds = %85
%89 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i64 0, i64 0))
%90 = trunc i64 %21 to i32
%91 = load i32, i32* @stdin
%92 = call i32* @fgets(i8* %22, i32 %90, i32 %91)
%93 = icmp eq i32* %92, null
br i1 %93, label %94, label %95
94: ; preds = %88
br label %26
95: ; preds = %88
%96 = call i32 @remove_term(i8* %22)
%97 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.11, i64 0, i64 0))
%98 = trunc i64 %24 to i32
%99 = load i32, i32* @stdin
%100 = call i32* @fgets(i8* %25, i32 %98, i32 %99)
%101 = icmp eq i32* %100, null
br i1 %101, label %102, label %103
102: ; preds = %95
br label %26
103: ; preds = %95
%104 = call i32 @remove_term(i8* %25)
%105 = call i32 @strlen(i8* %22)
%106 = call i32 @atoi(i8* %25)
%107 = call i64 @sys_clipboard_copy(i8* %22, i32 %105, i32 %106)
%108 = icmp ne i64 %107, 0
br i1 %108, label %109, label %111
109: ; preds = %103
%110 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.12, i64 0, i64 0))
br label %26
111: ; preds = %103
br label %113
112: ; preds = %85
br label %26
113: ; preds = %111
br label %114
114: ; preds = %113, %83
br label %26
}

LLVM IR (-O2):
@LINE_MAX = global i32 0
@.str.3 = [9 x i8] c"choose: \00"
@stdin = global i32 0
@.str.4 = [2 x i8] c"p\00"
@.str.9 = [2 x i8] c"c\00"
@.str.10 = [16 x i8] c"input content: \00"
@.str.11 = [57 x i8] c"choose method:[0-TRUNC 1-APPEND_LINE 2-APPEND_CONTENT]: \00"
@str = [30 x i8] c"p - show content in clipboard\00"
@str.13 = [29 x i8] c"c - copy data into clipboard\00"
@str.14 = [13 x i8] c"copy failure\00"
@str.15 = [24 x i8] c"---- content start ----\00"
@str.16 = [24 x i8] c"----- content end -----\00"
@str.17 = [14 x i8] c"paste failure\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = load i32, i32* @LINE_MAX
%6 = zext i32 %5 to i64
%7 = alloca i8, i64 %6
%8 = alloca i8, i64 %6
%9 = alloca i8, i64 %6
%10 = bitcast i8** %3 to i8*
%11 = bitcast i32* %4 to i8*
br label %12
12: ; preds = %30, %2
%13 = call i32 @putchar(i32 10)
%14 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
%15 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.13, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%17 = load i32, i32* @stdin
%18 = call i32* @fgets(i8* %7, i32 %5, i32 %17)
%19 = icmp eq i32* %18, null
br i1 %19, label %30, label %20
20: ; preds = %12
%21 = call i32 @remove_term(i8* %7)
%22 = call i64 @strcmp(i8* %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%23 = icmp eq i64 %22, 0
br i1 %23, label %24, label %67
24: ; preds = %20
%25 = call i64 @sys_clipboard_paste(i8** %3, i32* %4)
%26 = icmp eq i64 %25, 0
br i1 %26, label %31, label %27
27: ; preds = %62, %24, %81, %31
%28 = phi i8* [ getelementptr inbounds ([24 x i8], [24 x i8]* @str.16, i64 0, i64 0), %31 ], [ getelementptr inbounds ([13 x i8], [13 x i8]* @str.14, i64 0, i64 0), %81 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @str.17, i64 0, i64 0), %24 ], [ getelementptr inbounds ([24 x i8], [24 x i8]* @str.16, i64 0, i64 0), %62 ]
%29 = call i32 @puts(i8* dereferenceable(1) %28)
br label %30
30: ; preds = %27, %81, %12, %70, %75, %67
br label %12
31: ; preds = %24
%32 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str.15, i64 0, i64 0))
%33 = load i32, i32* %4
%34 = icmp sgt i32 %33, 0
br i1 %34, label %35, label %27
35: ; preds = %31, %62
%36 = phi i32 [ %64, %62 ], [ 0, %31 ]
%37 = load i8*, i8** %3
%38 = sext i32 %36 to i64
%39 = getelementptr inbounds i8, i8* %37, i64 %38
%40 = bitcast i8* %39 to i32*
%41 = load i32, i32* %40
%42 = icmp sgt i32 %41, 0
%43 = add i32 %36, 4
br i1 %42, label %44, label %62
44: ; preds = %35
%45 = sext i32 %43 to i64
%46 = zext i32 %41 to i64
%47 = getelementptr inbounds i8, i8* %37, i64 %45
%48 = load i8, i8* %47
%49 = sext i8 %48 to i32
%50 = call i32 @putchar(i32 %49)
%51 = icmp eq i32 %41, 1
br i1 %51, label %62, label %52
52: ; preds = %44, %52
%53 = phi i64 [ %60, %52 ], [ 1, %44 ]
%54 = load i8*, i8** %3
%55 = add nsw i64 %53, %45
%56 = getelementptr inbounds i8, i8* %54, i64 %55
%57 = load i8, i8* %56
%58 = sext i8 %57 to i32
%59 = call i32 @putchar(i32 %58)
%60 = add nuw nsw i64 %53, 1
%61 = icmp eq i64 %60, %46
br i1 %61, label %62, label %52
62: ; preds = %52, %44, %35
%63 = call i32 @putchar(i32 10)
%64 = add i32 %43, %41
%65 = load i32, i32* %4
%66 = icmp slt i32 %64, %65
br i1 %66, label %35, label %27
67: ; preds = %20
%68 = call i64 @strcmp(i8* %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
%69 = icmp eq i64 %68, 0
br i1 %69, label %70, label %30
70: ; preds = %67
%71 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.10, i64 0, i64 0))
%72 = load i32, i32* @stdin
%73 = call i32* @fgets(i8* %8, i32 %5, i32 %72)
%74 = icmp eq i32* %73, null
br i1 %74, label %30, label %75
75: ; preds = %70
%76 = call i32 @remove_term(i8* %8)
%77 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @.str.11, i64 0, i64 0))
%78 = load i32, i32* @stdin
%79 = call i32* @fgets(i8* %9, i32 %5, i32 %78)
%80 = icmp eq i32* %79, null
br i1 %80, label %30, label %81
81: ; preds = %75
%82 = call i32 @remove_term(i8* %9)
%83 = call i32 @strlen(i8* %8)
%84 = call i32 @atoi(i8* %9)
%85 = call i64 @sys_clipboard_copy(i8* %8, i32 %83, i32 %84)
%86 = icmp eq i64 %85, 0
br i1 %86, label %30, label %27
}