#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*/ lr_output_message(char *, int, char **);
int /*<<< orphan*/ sprintf(char **, char *, char, char);
int strlen(char *);
Action() {
  char *b = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
  char *c[200][2];
  int i;
  for (i = 0; i < strlen(b) / 2; i++) {
    sprintf(c[i], "%c%c", b[i * 2], b[i * 2 + 1]);
    lr_output_message("c%d = %s", i, c[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<Action>:
push   %rbp
mov    %rsp,%rbp
sub    $0xca0,%rsp
lea    0xebe(%rip),%rax
mov    %rax,-0x8(%rbp)
movl   $0x0,-0xc94(%rbp)
mov    -0xc94(%rbp),%eax
mov    %eax,-0xc98(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xc98(%rbp),%eax
cmp    %ecx,%eax
jge    1206 <Action+0xd6>
movslq -0xc94(%rbp),%rax
lea    -0xc90(%rbp),%rdi
shl    $0x4,%rax
add    %rax,%rdi
mov    -0x8(%rbp),%rax
mov    -0xc94(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
mov    -0xc94(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
lea    0xe5c(%rip),%rsi
movsbl %dl,%edx
movsbl (%rax,%rcx,1),%ecx
call   1050 <sprintf@plt>
mov    -0xc94(%rbp),%esi
movslq -0xc94(%rbp),%rax
lea    -0xc90(%rbp),%rdx
shl    $0x4,%rax
add    %rax,%rdx
lea    0xe33(%rip),%rdi
call   1040 <lr_output_message@plt>
mov    -0xc94(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc94(%rbp)
jmp    1150 <Action+0x20>
xor    %eax,%eax
add    $0xca0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Action>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc80,%rsp
lea    0xeb9(%rip),%r14
mov    %r14,%rdi
call   1030 <strlen@plt>
cmp    $0x2,%eax
jl     11b4 <Action+0x84>
mov    %rsp,%r15
xor    %ebx,%ebx
lea    0xebb(%rip),%r12
lea    0xeb9(%rip),%r13
nopw   0x0(%rax,%rax,1)
movsbl (%r14,%rbx,2),%edx
movsbl 0x1(%r14,%rbx,2),%ecx
mov    %r15,%rdi
mov    %r12,%rsi
call   1050 <sprintf@plt>
mov    %r13,%rdi
mov    %ebx,%esi
mov    %r15,%rdx
call   1040 <lr_output_message@plt>
add    $0x1,%rbx
mov    %r14,%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %eax,%ecx
sar    %ecx
movslq %ecx,%rax
add    $0x10,%r15
cmp    %rax,%rbx
jl     1170 <Action+0x40>
xor    %eax,%eax
add    $0xc80,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [27 x i8] c"ABCDEFGHIJKLMNOPQRSTUVWXYZ\00"
@.str.1 = [5 x i8] c"%c%c\00"
@.str.2 = [9 x i8] c"c%d = %s\00"
define i32 @Action() {
%1 = alloca i8*
%2 = alloca [200 x [2 x i8*]]
%3 = alloca i32
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8** %1
store i32 0, i32* %3
br label %4
4: ; preds = %35, %0
%5 = load i32, i32* %3
%6 = load i8*, i8** %1
%7 = call i32 @strlen(i8* %6)
%8 = sdiv i32 %7, 2
%9 = icmp slt i32 %5, %8
br i1 %9, label %10, label %38
10: ; preds = %4
%11 = load i32, i32* %3
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [200 x [2 x i8*]], [200 x [2 x i8*]]* %2, i64 0, i64 %12
%14 = getelementptr inbounds [2 x i8*], [2 x i8*]* %13, i64 0, i64 0
%15 = load i8*, i8** %1
%16 = load i32, i32* %3
%17 = mul nsw i32 %16, 2
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8, i8* %15, i64 %18
%20 = load i8, i8* %19
%21 = load i8*, i8** %1
%22 = load i32, i32* %3
%23 = mul nsw i32 %22, 2
%24 = add nsw i32 %23, 1
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i8, i8* %21, i64 %25
%27 = load i8, i8* %26
%28 = call i32 @sprintf(i8** %14, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8 signext %20, i8 signext %27)
%29 = load i32, i32* %3
%30 = load i32, i32* %3
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [200 x [2 x i8*]], [200 x [2 x i8*]]* %2, i64 0, i64 %31
%33 = getelementptr inbounds [2 x i8*], [2 x i8*]* %32, i64 0, i64 0
%34 = call i32 @lr_output_message(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %29, i8** %33)
br label %35
35: ; preds = %10
%36 = load i32, i32* %3
%37 = add nsw i32 %36, 1
store i32 %37, i32* %3
br label %4
38: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"ABCDEFGHIJKLMNOPQRSTUVWXYZ\00"
@.str.1 = [5 x i8] c"%c%c\00"
@.str.2 = [9 x i8] c"c%d = %s\00"
define i32 @Action() {
%1 = alloca [200 x [2 x i8*]]
%2 = bitcast [200 x [2 x i8*]]* %1 to i8*
%3 = call i32 @strlen(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%4 = icmp sgt i32 %3, 1
br i1 %4, label %5, label %22
5: ; preds = %0, %5
%6 = phi i64 [ %17, %5 ], [ 0, %0 ]
%7 = getelementptr inbounds [200 x [2 x i8*]], [200 x [2 x i8*]]* %1, i64 0, i64 %6, i64 0
%8 = shl nuw nsw i64 %6, 1
%9 = getelementptr inbounds [27 x i8], [27 x i8]* @.str, i64 0, i64 %8
%10 = load i8, i8* %9
%11 = or i64 %8, 1
%12 = getelementptr inbounds [27 x i8], [27 x i8]* @.str, i64 0, i64 %11
%13 = load i8, i8* %12
%14 = call i32 @sprintf(i8** %7, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8 signext %10, i8 signext %13)
%15 = trunc i64 %6 to i32
%16 = call i32 @lr_output_message(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %15, i8** %7)
%17 = add nuw nsw i64 %6, 1
%18 = call i32 @strlen(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%19 = sdiv i32 %18, 2
%20 = sext i32 %19 to i64
%21 = icmp slt i64 %17, %20
br i1 %21, label %5, label %22
22: ; preds = %5, %0
ret i32 0
}