#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 strlen(char *);
void mkPairPartnerSymbols(int *pairList, char *pairSymbols, int size) {
  int i;
  char symbols[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567"
                   "890!@#$%^&*=+{}|[]\\;'";
  int symbolMax = strlen(symbols);
  int index;
  for (i = 0, index = 0; i < size; i++) {
    pairSymbols[i] = ' ';
    if (pairList[i] >= 0) {
      if (pairList[i] < i) {
        --index;
        if (index < 0)
          index = symbolMax - 1;
      }
      pairSymbols[i] = symbols[index];
      if (pairList[i] > i) {
        ++index;
        if (index >= symbolMax)
          index = 0;
      }
    }
  }
}


x86 assembly (clang, -O0):
<mkPairPartnerSymbols>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
lea    -0x70(%rbp),%rdi
lea    0xebf(%rip),%rsi
mov    $0x51,%edx
call   1040 <memcpy@plt>
lea    -0x70(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x74(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x78(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1224 <mkPairPartnerSymbols+0x104>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movb   $0x20,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jl     1211 <mkPairPartnerSymbols+0xf1>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x18(%rbp),%eax
jge    11c4 <mkPairPartnerSymbols+0xa4>
mov    -0x78(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x78(%rbp)
cmpl   $0x0,-0x78(%rbp)
jge    11bf <mkPairPartnerSymbols+0x9f>
mov    -0x74(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    11c4 <mkPairPartnerSymbols+0xa4>
movslq -0x78(%rbp),%rax
mov    -0x70(%rbp,%rax,1),%dl
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x18(%rbp),%eax
jle    120c <mkPairPartnerSymbols+0xec>
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
mov    -0x78(%rbp),%eax
cmp    -0x74(%rbp),%eax
jl     1207 <mkPairPartnerSymbols+0xe7>
movl   $0x0,-0x78(%rbp)
jmp    120c <mkPairPartnerSymbols+0xec>
jmp    1211 <mkPairPartnerSymbols+0xf1>
jmp    1216 <mkPairPartnerSymbols+0xf6>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1165 <mkPairPartnerSymbols+0x45>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mkPairPartnerSymbols>:
push   %rbp
push   %r14
push   %rbx
sub    $0x60,%rsp
mov    %edx,%ebp
mov    %rsi,%r14
mov    %rdi,%rbx
movaps 0xf19(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xefd(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xee1(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xec5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xea9(%rip),%xmm0
movaps %xmm0,(%rsp)
movb   $0x0,0x50(%rsp)
mov    %rsp,%rdi
call   1030 <strlen@plt>
test   %ebp,%ebp
jle    11c4 <mkPairPartnerSymbols+0xb4>
mov    %ebp,%r9d
xor    %r8d,%r8d
xor    %esi,%esi
xor    %edx,%edx
jmp    1189 <mkPairPartnerSymbols+0x79>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rsi
cmp    %rsi,%r9
je     11c4 <mkPairPartnerSymbols+0xb4>
movb   $0x20,(%r14,%rsi,1)
mov    (%rbx,%rsi,4),%ebp
test   %ebp,%ebp
js     1180 <mkPairPartnerSymbols+0x70>
test   %edx,%edx
mov    %edx,%edi
cmovle %eax,%edi
add    $0xffffffff,%edi
cmp    %rbp,%rsi
cmova  %edi,%edx
movslq %edx,%rdi
movzbl (%rsp,%rdi,1),%ecx
mov    %cl,(%r14,%rsi,1)
movslq (%rbx,%rsi,4),%rcx
cmp    %rcx,%rsi
jge    1180 <mkPairPartnerSymbols+0x70>
add    $0x1,%edx
cmp    %eax,%edx
cmovge %r8d,%edx
jmp    1180 <mkPairPartnerSymbols+0x70>
add    $0x60,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@__const.mkPairPartnerSymbols.symbols = [81 x i8] c"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*=+{}|[]\\;'\00"
define void @mkPairPartnerSymbols(i32* %0, i8* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca [81 x i8]
%9 = alloca i32
%10 = alloca i32
store i32* %0, i32** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%11 = bitcast [81 x i8]* %8 to i8*
%12 = getelementptr inbounds [81 x i8], [81 x i8]* %8, i64 0, i64 0
%13 = call i32 @strlen(i8* %12)
store i32 %13, i32* %9
store i32 0, i32* %7
store i32 0, i32* %10
br label %14
14: ; preds = %72, %3
%15 = load i32, i32* %7
%16 = load i32, i32* %6
%17 = icmp slt i32 %15, %16
br i1 %17, label %18, label %75
18: ; preds = %14
%19 = load i8*, i8** %5
%20 = load i32, i32* %7
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i8, i8* %19, i64 %21
store i8 32, i8* %22
%23 = load i32*, i32** %4
%24 = load i32, i32* %7
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i32, i32* %23, i64 %25
%27 = load i32, i32* %26
%28 = icmp sge i32 %27, 0
br i1 %28, label %29, label %71
29: ; preds = %18
%30 = load i32*, i32** %4
%31 = load i32, i32* %7
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds i32, i32* %30, i64 %32
%34 = load i32, i32* %33
%35 = load i32, i32* %7
%36 = icmp slt i32 %34, %35
br i1 %36, label %37, label %46
37: ; preds = %29
%38 = load i32, i32* %10
%39 = add nsw i32 %38, -1
store i32 %39, i32* %10
%40 = load i32, i32* %10
%41 = icmp slt i32 %40, 0
br i1 %41, label %42, label %45
42: ; preds = %37
%43 = load i32, i32* %9
%44 = sub nsw i32 %43, 1
store i32 %44, i32* %10
br label %45
45: ; preds = %42, %37
br label %46
46: ; preds = %45, %29
%47 = load i32, i32* %10
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds [81 x i8], [81 x i8]* %8, i64 0, i64 %48
%50 = load i8, i8* %49
%51 = load i8*, i8** %5
%52 = load i32, i32* %7
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds i8, i8* %51, i64 %53
store i8 %50, i8* %54
%55 = load i32*, i32** %4
%56 = load i32, i32* %7
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds i32, i32* %55, i64 %57
%59 = load i32, i32* %58
%60 = load i32, i32* %7
%61 = icmp sgt i32 %59, %60
br i1 %61, label %62, label %70
62: ; preds = %46
%63 = load i32, i32* %10
%64 = add nsw i32 %63, 1
store i32 %64, i32* %10
%65 = load i32, i32* %10
%66 = load i32, i32* %9
%67 = icmp sge i32 %65, %66
br i1 %67, label %68, label %69
68: ; preds = %62
store i32 0, i32* %10
br label %69
69: ; preds = %68, %62
br label %70
70: ; preds = %69, %46
br label %71
71: ; preds = %70, %18
br label %72
72: ; preds = %71
%73 = load i32, i32* %7
%74 = add nsw i32 %73, 1
store i32 %74, i32* %7
br label %14
75: ; preds = %14
ret void
}

LLVM IR (-O2):
@__const.mkPairPartnerSymbols.symbols = [81 x i8] c"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*=+{}|[]\\;'\00"
define void @mkPairPartnerSymbols(i32* nocapture %0, i8* nocapture writeonly %1, i32 %2) {
%4 = alloca [81 x i8]
%5 = getelementptr inbounds [81 x i8], [81 x i8]* %4, i64 0, i64 0
%6 = call i32 @strlen(i8* %5)
%7 = icmp sgt i32 %2, 0
br i1 %7, label %8, label %38
8: ; preds = %3
%9 = zext i32 %2 to i64
br label %10
10: ; preds = %8, %34
%11 = phi i64 [ 0, %8 ], [ %36, %34 ]
%12 = phi i32 [ 0, %8 ], [ %35, %34 ]
%13 = getelementptr inbounds i8, i8* %1, i64 %11
store i8 32, i8* %13
%14 = getelementptr inbounds i32, i32* %0, i64 %11
%15 = load i32, i32* %14
%16 = icmp sgt i32 %15, -1
br i1 %16, label %17, label %34
17: ; preds = %10
%18 = zext i32 %15 to i64
%19 = icmp ugt i64 %11, %18
%20 = icmp slt i32 %12, 1
%21 = select i1 %20, i32 %6, i32 %12
%22 = add nsw i32 %21, -1
%23 = select i1 %19, i32 %22, i32 %12
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [81 x i8], [81 x i8]* %4, i64 0, i64 %24
%26 = load i8, i8* %25
store i8 %26, i8* %13
%27 = load i32, i32* %14
%28 = sext i32 %27 to i64
%29 = icmp slt i64 %11, %28
br i1 %29, label %30, label %34
30: ; preds = %17
%31 = add nsw i32 %23, 1
%32 = icmp slt i32 %31, %6
%33 = select i1 %32, i32 %31, i32 0
br label %34
34: ; preds = %10, %30, %17
%35 = phi i32 [ %33, %30 ], [ %23, %17 ], [ %12, %10 ]
%36 = add nuw nsw i64 %11, 1
%37 = icmp eq i64 %36, %9
br i1 %37, label %38, label %10
38: ; preds = %34, %3
ret void
}