#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 */
scalar_t__ isdigit(int);
int /*<<< orphan*/ random128();
int /*<<< orphan*/ strcpy(char *, int /*<<< orphan*/);
const char *random128_alpha() {
  static char randombuf[128 / 8 * 2 + 1];
  char *p;
  strcpy(randombuf, random128());
  for (p = randombuf; *p; p++)
    if (isdigit((int)(unsigned char)*p))
      *p = "GHIJKLMNOP"[*p - '0'];
  return (randombuf);
}


x86 assembly (clang, -O0):
<random128_alpha>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <random128@plt>
mov    %eax,%esi
lea    0x2f08(%rip),%rdi
call   1040 <strcpy@plt>
lea    0x2efc(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     11ae <random128_alpha+0x7e>
mov    -0x8(%rbp),%rax
movzbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     1198 <random128_alpha+0x68>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
sub    $0x30,%eax
movslq %eax,%rcx
lea    0xe71(%rip),%rax
mov    (%rax,%rcx,1),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
jmp    119d <random128_alpha+0x6d>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1158 <random128_alpha+0x28>
lea    0x2e9b(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random128_alpha>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1050 <random128@plt>
lea    0x2f0e(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <strcpy@plt>
mov    0x2efe(%rip),%al
test   %al,%al
je     1187 <random128_alpha+0x57>
lea    0xea3(%rip),%r14
jmp    116c <random128_alpha+0x3c>
nop
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
je     1187 <random128_alpha+0x57>
movzbl %al,%edi
call   1030 <isdigit@plt>
test   %rax,%rax
je     1160 <random128_alpha+0x30>
movsbq (%rbx),%rax
movzbl -0x30(%rax,%r14,1),%eax
mov    %al,(%rbx)
jmp    1160 <random128_alpha+0x30>
lea    0x2ec2(%rip),%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@random128_alpha.randombuf = internal global [33 x i8] zeroinitializer
@.str = [11 x i8] c"GHIJKLMNOP\00"
define i8* @random128_alpha() {
%1 = alloca i8*
%2 = call i32 (...) @random128()
%3 = call i32 @strcpy(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @random128_alpha.randombuf, i64 0, i64 0), i32 %2)
store i8* getelementptr inbounds ([33 x i8], [33 x i8]* @random128_alpha.randombuf, i64 0, i64 0), i8** %1
br label %4
4: ; preds = %24, %0
%5 = load i8*, i8** %1
%6 = load i8, i8* %5
%7 = icmp ne i8 %6, 0
br i1 %7, label %8, label %27
8: ; preds = %4
%9 = load i8*, i8** %1
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = call i64 @isdigit(i32 %11)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %23
14: ; preds = %8
%15 = load i8*, i8** %1
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = sub nsw i32 %17, 48
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [11 x i8], [11 x i8]* @.str, i64 0, i64 %19
%21 = load i8, i8* %20
%22 = load i8*, i8** %1
store i8 %21, i8* %22
br label %23
23: ; preds = %14, %8
br label %24
24: ; preds = %23
%25 = load i8*, i8** %1
%26 = getelementptr inbounds i8, i8* %25, i32 1
store i8* %26, i8** %1
br label %4
27: ; preds = %4
ret i8* getelementptr inbounds ([33 x i8], [33 x i8]* @random128_alpha.randombuf, i64 0, i64 0)
}

LLVM IR (-O2):
@random128_alpha.randombuf = internal global [33 x i8] zeroinitializer
@.str = [11 x i8] c"GHIJKLMNOP\00"
define i8* @random128_alpha() {
%1 = tail call i32 (...) @random128()
%2 = tail call i32 @strcpy(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @random128_alpha.randombuf, i64 0, i64 0), i32 %1)
%3 = load i8, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @random128_alpha.randombuf, i64 0, i64 0)
%4 = icmp eq i8 %3, 0
br i1 %4, label %21, label %5
5: ; preds = %0, %17
%6 = phi i8 [ %19, %17 ], [ %3, %0 ]
%7 = phi i8* [ %18, %17 ], [ getelementptr inbounds ([33 x i8], [33 x i8]* @random128_alpha.randombuf, i64 0, i64 0), %0 ]
%8 = zext i8 %6 to i32
%9 = tail call i64 @isdigit(i32 %8)
%10 = icmp eq i64 %9, 0
br i1 %10, label %17, label %11
11: ; preds = %5
%12 = load i8, i8* %7
%13 = sext i8 %12 to i64
%14 = add nsw i64 %13, -48
%15 = getelementptr inbounds [11 x i8], [11 x i8]* @.str, i64 0, i64 %14
%16 = load i8, i8* %15
store i8 %16, i8* %7
br label %17
17: ; preds = %5, %11
%18 = getelementptr inbounds i8, i8* %7, i64 1
%19 = load i8, i8* %18
%20 = icmp eq i8 %19, 0
br i1 %20, label %21, label %5
21: ; preds = %17, %0
ret i8* getelementptr inbounds ([33 x i8], [33 x i8]* @random128_alpha.randombuf, i64 0, i64 0)
}