#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*/ sprintf(char *, char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
void unpackcall(int ncall, char *call) {
  char c[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C',
              'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
              'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', ' '};
  int n;
  int i;
  char tmp[7];
  n = ncall;
  strcpy(call, "......");
  if (n < 262177560) {
    i = n % 27 + 10;
    tmp[5] = c[i];
    n = n / 27;
    i = n % 27 + 10;
    tmp[4] = c[i];
    n = n / 27;
    i = n % 27 + 10;
    tmp[3] = c[i];
    n = n / 27;
    i = n % 10;
    tmp[2] = c[i];
    n = n / 10;
    i = n % 36;
    tmp[1] = c[i];
    n = n / 36;
    i = n;
    tmp[0] = c[i];
    tmp[6] = '\0';
    for (i = 0; i < 5; i++) {
      if (tmp[i] != c[36])
        break;
    }
    sprintf(call, "%-6s", &tmp[i]);
    for (i = 0; i < 6; i++) {
      if (call[i] == c[36]) {
        call[i] = '\0';
      }
    }
  }
}


x86 assembly (clang, -O0):
<unpackcall>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xeb6(%rip),%rsi
mov    $0x25,%edx
call   1040 <memcpy@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x44(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec0(%rip),%rsi
call   1030 <strcpy@plt>
cmpl   $0xfa08318,-0x44(%rbp)
jge    12fe <unpackcall+0x1ce>
mov    -0x44(%rbp),%eax
mov    $0x1b,%ecx
cltd
idiv   %ecx
add    $0xa,%edx
mov    %edx,-0x48(%rbp)
movslq -0x48(%rbp),%rax
mov    -0x40(%rbp,%rax,1),%al
mov    %al,-0x4a(%rbp)
mov    -0x44(%rbp),%eax
mov    $0x1b,%ecx
cltd
idiv   %ecx
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%eax
mov    $0x1b,%ecx
cltd
idiv   %ecx
add    $0xa,%edx
mov    %edx,-0x48(%rbp)
movslq -0x48(%rbp),%rax
mov    -0x40(%rbp,%rax,1),%al
mov    %al,-0x4b(%rbp)
mov    -0x44(%rbp),%eax
mov    $0x1b,%ecx
cltd
idiv   %ecx
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%eax
mov    $0x1b,%ecx
cltd
idiv   %ecx
add    $0xa,%edx
mov    %edx,-0x48(%rbp)
movslq -0x48(%rbp),%rax
mov    -0x40(%rbp,%rax,1),%al
mov    %al,-0x4c(%rbp)
mov    -0x44(%rbp),%eax
mov    $0x1b,%ecx
cltd
idiv   %ecx
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x48(%rbp)
movslq -0x48(%rbp),%rax
mov    -0x40(%rbp,%rax,1),%al
mov    %al,-0x4d(%rbp)
mov    -0x44(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%eax
mov    $0x24,%ecx
cltd
idiv   %ecx
mov    %edx,-0x48(%rbp)
movslq -0x48(%rbp),%rax
mov    -0x40(%rbp,%rax,1),%al
mov    %al,-0x4e(%rbp)
mov    -0x44(%rbp),%eax
mov    $0x24,%ecx
cltd
idiv   %ecx
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%eax
mov    %eax,-0x48(%rbp)
movslq -0x48(%rbp),%rax
mov    -0x40(%rbp,%rax,1),%al
mov    %al,-0x4f(%rbp)
movb   $0x0,-0x49(%rbp)
movl   $0x0,-0x48(%rbp)
cmpl   $0x5,-0x48(%rbp)
jge    1296 <unpackcall+0x166>
movslq -0x48(%rbp),%rax
movsbl -0x4f(%rbp,%rax,1),%eax
movsbl -0x1c(%rbp),%ecx
cmp    %ecx,%eax
je     1283 <unpackcall+0x153>
jmp    1296 <unpackcall+0x166>
jmp    1288 <unpackcall+0x158>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    125f <unpackcall+0x12f>
mov    -0x10(%rbp),%rdi
movslq -0x48(%rbp),%rax
lea    -0x4f(%rbp),%rdx
add    %rax,%rdx
lea    0xd80(%rip),%rsi
call   1050 <sprintf@plt>
movl   $0x0,-0x48(%rbp)
cmpl   $0x6,-0x48(%rbp)
jge    12f9 <unpackcall+0x1c9>
mov    -0x10(%rbp),%rax
movslq -0x48(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
movsbl -0x1c(%rbp),%ecx
cmp    %ecx,%eax
jne    12e6 <unpackcall+0x1b6>
mov    -0x10(%rbp),%rax
movslq -0x48(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
jmp    12eb <unpackcall+0x1bb>
mov    -0x48(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    12b8 <unpackcall+0x188>
jmp    12fe <unpackcall+0x1ce>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unpackcall>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0xef6(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
cmp    $0xfa08317,%ebp
jg     12c1 <unpackcall+0x1a1>
movslq %ebp,%rax
imul   $0x4bda12f7,%rax,%rdx
mov    %rdx,%rcx
shr    $0x3f,%rcx
sar    $0x23,%rdx
add    %ecx,%edx
lea    (%rdx,%rdx,8),%ecx
lea    (%rcx,%rcx,2),%ecx
mov    %ebp,%esi
sub    %ecx,%esi
movslq %esi,%rsi
lea    0xe92(%rip),%rdi
mov    0xa(%rsi,%rdi,1),%cl
mov    %cl,0x6(%rsp)
movslq %edx,%rcx
imul   $0x4bda12f7,%rcx,%rdx
mov    %rdx,%rsi
shr    $0x3f,%rsi
sar    $0x23,%rdx
add    %esi,%edx
lea    (%rdx,%rdx,8),%edx
lea    (%rdx,%rdx,2),%edx
sub    %edx,%ecx
movslq %ecx,%rcx
mov    0xa(%rcx,%rdi,1),%cl
mov    %cl,0x5(%rsp)
imul   $0x59e60383,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x28,%rcx
add    %edx,%ecx
movslq %ecx,%rcx
imul   $0x4bda12f7,%rcx,%rdx
mov    %rdx,%rsi
shr    $0x3f,%rsi
sar    $0x23,%rdx
add    %esi,%edx
lea    (%rdx,%rdx,8),%edx
lea    (%rdx,%rdx,2),%edx
sub    %edx,%ecx
movslq %ecx,%rcx
mov    0xa(%rcx,%rdi,1),%cl
mov    %cl,0x4(%rsp)
imul   $0x6a8bde3d,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x2d,%rcx
add    %edx,%ecx
movslq %ecx,%rcx
imul   $0x66666667,%rcx,%rdx
mov    %rdx,%rsi
shr    $0x3f,%rsi
sar    $0x22,%rdx
add    %esi,%edx
add    %edx,%edx
lea    (%rdx,%rdx,4),%edx
sub    %edx,%ecx
movslq %ecx,%rcx
mov    (%rcx,%rdi,1),%cl
mov    %cl,0x3(%rsp)
imul   $0x2a9e58e5,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x2f,%rcx
add    %edx,%ecx
movswl %cx,%edx
imul   $0xe39,%edx,%edx
mov    %edx,%esi
shr    $0x1f,%esi
sar    $0x11,%edx
add    %esi,%edx
shl    $0x2,%edx
lea    (%rdx,%rdx,8),%edx
sub    %edx,%ecx
movswq %cx,%rcx
mov    (%rcx,%rdi,1),%cl
mov    %cl,0x2(%rsp)
imul   $0x25e21621,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x34,%rax
add    %ecx,%eax
cltq
mov    (%rax,%rdi,1),%al
mov    %al,0x1(%rsp)
movb   $0x0,0x7(%rsp)
add    $0xf0cb9c20,%ebp
cmp    $0x6c1f38,%ebp
lea    0x1(%rsp),%rdx
adc    $0x0,%rdx
lea    0xd9a(%rip),%rsi
mov    %rbx,%rdi
call   1040 <sprintf@plt>
cmpb   $0x20,(%rbx)
je     12c8 <unpackcall+0x1a8>
cmpb   $0x20,0x1(%rbx)
je     12d1 <unpackcall+0x1b1>
cmpb   $0x20,0x2(%rbx)
je     12db <unpackcall+0x1bb>
cmpb   $0x20,0x3(%rbx)
je     12e5 <unpackcall+0x1c5>
cmpb   $0x20,0x4(%rbx)
je     12ef <unpackcall+0x1cf>
cmpb   $0x20,0x5(%rbx)
jne    12c1 <unpackcall+0x1a1>
movb   $0x0,0x5(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
movb   $0x0,(%rbx)
cmpb   $0x20,0x1(%rbx)
jne    12a5 <unpackcall+0x185>
movb   $0x0,0x1(%rbx)
cmpb   $0x20,0x2(%rbx)
jne    12ab <unpackcall+0x18b>
movb   $0x0,0x2(%rbx)
cmpb   $0x20,0x3(%rbx)
jne    12b1 <unpackcall+0x191>
movb   $0x0,0x3(%rbx)
cmpb   $0x20,0x4(%rbx)
jne    12b7 <unpackcall+0x197>
movb   $0x0,0x4(%rbx)
cmpb   $0x20,0x5(%rbx)
je     12bd <unpackcall+0x19d>
jmp    12c1 <unpackcall+0x1a1>

LLVM IR (-O0):
@__const.unpackcall.c = [37 x i8] c"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ "
@.str = [7 x i8] c"......\00"
@.str.1 = [5 x i8] c"%-6s\00"
define void @unpackcall(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca [37 x i8]
%6 = alloca i32
%7 = alloca i32
%8 = alloca [7 x i8]
store i32 %0, i32* %3
store i8* %1, i8** %4
%9 = bitcast [37 x i8]* %5 to i8*
%10 = load i32, i32* %3
store i32 %10, i32* %6
%11 = load i8*, i8** %4
%12 = call i32 @strcpy(i8* %11, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%13 = load i32, i32* %6
%14 = icmp slt i32 %13, 262177560
br i1 %14, label %15, label %119
15: ; preds = %2
%16 = load i32, i32* %6
%17 = srem i32 %16, 27
%18 = add nsw i32 %17, 10
store i32 %18, i32* %7
%19 = load i32, i32* %7
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [37 x i8], [37 x i8]* %5, i64 0, i64 %20
%22 = load i8, i8* %21
%23 = getelementptr inbounds [7 x i8], [7 x i8]* %8, i64 0, i64 5
store i8 %22, i8* %23
%24 = load i32, i32* %6
%25 = sdiv i32 %24, 27
store i32 %25, i32* %6
%26 = load i32, i32* %6
%27 = srem i32 %26, 27
%28 = add nsw i32 %27, 10
store i32 %28, i32* %7
%29 = load i32, i32* %7
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [37 x i8], [37 x i8]* %5, i64 0, i64 %30
%32 = load i8, i8* %31
%33 = getelementptr inbounds [7 x i8], [7 x i8]* %8, i64 0, i64 4
store i8 %32, i8* %33
%34 = load i32, i32* %6
%35 = sdiv i32 %34, 27
store i32 %35, i32* %6
%36 = load i32, i32* %6
%37 = srem i32 %36, 27
%38 = add nsw i32 %37, 10
store i32 %38, i32* %7
%39 = load i32, i32* %7
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds [37 x i8], [37 x i8]* %5, i64 0, i64 %40
%42 = load i8, i8* %41
%43 = getelementptr inbounds [7 x i8], [7 x i8]* %8, i64 0, i64 3
store i8 %42, i8* %43
%44 = load i32, i32* %6
%45 = sdiv i32 %44, 27
store i32 %45, i32* %6
%46 = load i32, i32* %6
%47 = srem i32 %46, 10
store i32 %47, i32* %7
%48 = load i32, i32* %7
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds [37 x i8], [37 x i8]* %5, i64 0, i64 %49
%51 = load i8, i8* %50
%52 = getelementptr inbounds [7 x i8], [7 x i8]* %8, i64 0, i64 2
store i8 %51, i8* %52
%53 = load i32, i32* %6
%54 = sdiv i32 %53, 10
store i32 %54, i32* %6
%55 = load i32, i32* %6
%56 = srem i32 %55, 36
store i32 %56, i32* %7
%57 = load i32, i32* %7
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds [37 x i8], [37 x i8]* %5, i64 0, i64 %58
%60 = load i8, i8* %59
%61 = getelementptr inbounds [7 x i8], [7 x i8]* %8, i64 0, i64 1
store i8 %60, i8* %61
%62 = load i32, i32* %6
%63 = sdiv i32 %62, 36
store i32 %63, i32* %6
%64 = load i32, i32* %6
store i32 %64, i32* %7
%65 = load i32, i32* %7
%66 = sext i32 %65 to i64
%67 = getelementptr inbounds [37 x i8], [37 x i8]* %5, i64 0, i64 %66
%68 = load i8, i8* %67
%69 = getelementptr inbounds [7 x i8], [7 x i8]* %8, i64 0, i64 0
store i8 %68, i8* %69
%70 = getelementptr inbounds [7 x i8], [7 x i8]* %8, i64 0, i64 6
store i8 0, i8* %70
store i32 0, i32* %7
br label %71
71: ; preds = %86, %15
%72 = load i32, i32* %7
%73 = icmp slt i32 %72, 5
br i1 %73, label %74, label %89
74: ; preds = %71
%75 = load i32, i32* %7
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds [7 x i8], [7 x i8]* %8, i64 0, i64 %76
%78 = load i8, i8* %77
%79 = sext i8 %78 to i32
%80 = getelementptr inbounds [37 x i8], [37 x i8]* %5, i64 0, i64 36
%81 = load i8, i8* %80
%82 = sext i8 %81 to i32
%83 = icmp ne i32 %79, %82
br i1 %83, label %84, label %85
84: ; preds = %74
br label %89
85: ; preds = %74
br label %86
86: ; preds = %85
%87 = load i32, i32* %7
%88 = add nsw i32 %87, 1
store i32 %88, i32* %7
br label %71
89: ; preds = %84, %71
%90 = load i8*, i8** %4
%91 = load i32, i32* %7
%92 = sext i32 %91 to i64
%93 = getelementptr inbounds [7 x i8], [7 x i8]* %8, i64 0, i64 %92
%94 = call i32 @sprintf(i8* %90, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %93)
store i32 0, i32* %7
br label %95
95: ; preds = %115, %89
%96 = load i32, i32* %7
%97 = icmp slt i32 %96, 6
br i1 %97, label %98, label %118
98: ; preds = %95
%99 = load i8*, i8** %4
%100 = load i32, i32* %7
%101 = sext i32 %100 to i64
%102 = getelementptr inbounds i8, i8* %99, i64 %101
%103 = load i8, i8* %102
%104 = sext i8 %103 to i32
%105 = getelementptr inbounds [37 x i8], [37 x i8]* %5, i64 0, i64 36
%106 = load i8, i8* %105
%107 = sext i8 %106 to i32
%108 = icmp eq i32 %104, %107
br i1 %108, label %109, label %114
109: ; preds = %98
%110 = load i8*, i8** %4
%111 = load i32, i32* %7
%112 = sext i32 %111 to i64
%113 = getelementptr inbounds i8, i8* %110, i64 %112
store i8 0, i8* %113
br label %114
114: ; preds = %109, %98
br label %115
115: ; preds = %114
%116 = load i32, i32* %7
%117 = add nsw i32 %116, 1
store i32 %117, i32* %7
br label %95
118: ; preds = %95
br label %119
119: ; preds = %118, %2
ret void
}

LLVM IR (-O2):
@__const.unpackcall.c = [37 x i8] c"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ "
@.str = [7 x i8] c"......\00"
@.str.1 = [5 x i8] c"%-6s\00"
define void @unpackcall(i32 %0, i8* %1) {
%3 = alloca [7 x i8]
%4 = getelementptr inbounds [7 x i8], [7 x i8]* %3, i64 0, i64 0
%5 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%6 = icmp slt i32 %0, 262177560
br i1 %6, label %7, label %79
7: ; preds = %2
%8 = srem i32 %0, 27
%9 = add nsw i32 %8, 10
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [37 x i8], [37 x i8]* @__const.unpackcall.c, i64 0, i64 %10
%12 = load i8, i8* %11
%13 = getelementptr inbounds [7 x i8], [7 x i8]* %3, i64 0, i64 5
store i8 %12, i8* %13
%14 = sdiv i32 %0, 27
%15 = srem i32 %14, 27
%16 = add nsw i32 %15, 10
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [37 x i8], [37 x i8]* @__const.unpackcall.c, i64 0, i64 %17
%19 = load i8, i8* %18
%20 = getelementptr inbounds [7 x i8], [7 x i8]* %3, i64 0, i64 4
store i8 %19, i8* %20
%21 = sdiv i32 %0, 729
%22 = srem i32 %21, 27
%23 = add nsw i32 %22, 10
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [37 x i8], [37 x i8]* @__const.unpackcall.c, i64 0, i64 %24
%26 = load i8, i8* %25
%27 = getelementptr inbounds [7 x i8], [7 x i8]* %3, i64 0, i64 3
store i8 %26, i8* %27
%28 = sdiv i32 %0, 19683
%29 = srem i32 %28, 10
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [37 x i8], [37 x i8]* @__const.unpackcall.c, i64 0, i64 %30
%32 = load i8, i8* %31
%33 = getelementptr inbounds [7 x i8], [7 x i8]* %3, i64 0, i64 2
store i8 %32, i8* %33
%34 = sdiv i32 %0, 196830
%35 = trunc i32 %34 to i16
%36 = srem i16 %35, 36
%37 = sext i16 %36 to i64
%38 = getelementptr inbounds [37 x i8], [37 x i8]* @__const.unpackcall.c, i64 0, i64 %37
%39 = load i8, i8* %38
%40 = getelementptr inbounds [7 x i8], [7 x i8]* %3, i64 0, i64 1
store i8 %39, i8* %40
%41 = sdiv i32 %0, 7085880
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds [37 x i8], [37 x i8]* @__const.unpackcall.c, i64 0, i64 %42
%44 = load i8, i8* %43
store i8 %44, i8* %4
%45 = getelementptr inbounds [7 x i8], [7 x i8]* %3, i64 0, i64 6
store i8 0, i8* %45
%46 = add i32 %0, -255091680
%47 = icmp ult i32 %46, 7085880
%48 = zext i1 %47 to i64
%49 = getelementptr inbounds [7 x i8], [7 x i8]* %3, i64 0, i64 %48
%50 = call i32 @sprintf(i8* dereferenceable(1) %1, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %49)
%51 = load i8, i8* %1
%52 = icmp eq i8 %51, 32
br i1 %52, label %53, label %54
53: ; preds = %7
store i8 0, i8* %1
br label %54
54: ; preds = %7, %53
%55 = getelementptr inbounds i8, i8* %1, i64 1
%56 = load i8, i8* %55
%57 = icmp eq i8 %56, 32
br i1 %57, label %58, label %59
58: ; preds = %54
store i8 0, i8* %55
br label %59
59: ; preds = %58, %54
%60 = getelementptr inbounds i8, i8* %1, i64 2
%61 = load i8, i8* %60
%62 = icmp eq i8 %61, 32
br i1 %62, label %63, label %64
63: ; preds = %59
store i8 0, i8* %60
br label %64
64: ; preds = %63, %59
%65 = getelementptr inbounds i8, i8* %1, i64 3
%66 = load i8, i8* %65
%67 = icmp eq i8 %66, 32
br i1 %67, label %68, label %69
68: ; preds = %64
store i8 0, i8* %65
br label %69
69: ; preds = %68, %64
%70 = getelementptr inbounds i8, i8* %1, i64 4
%71 = load i8, i8* %70
%72 = icmp eq i8 %71, 32
br i1 %72, label %73, label %74
73: ; preds = %69
store i8 0, i8* %70
br label %74
74: ; preds = %73, %69
%75 = getelementptr inbounds i8, i8* %1, i64 5
%76 = load i8, i8* %75
%77 = icmp eq i8 %76, 32
br i1 %77, label %78, label %79
78: ; preds = %74
store i8 0, i8* %75
br label %79
79: ; preds = %74, %78, %2
ret void
}