#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 */
char *CG_ConfigString(int);
int /*<<< orphan*/ CG_LoadingClient(int);
int /*<<< orphan*/ CG_NewClientInfo(int);
void CG_RegisterClients(void) {
  int i;
  for (i = 0; i < 64; i++) {
    const char *clientInfo;
    clientInfo = CG_ConfigString(((64 + 256) + 256) + i);
    if (!clientInfo[0]) {
      continue;
    }
    CG_LoadingClient(i);
    CG_NewClientInfo(i);
  }
}


x86 assembly (clang, -O0):
<CG_RegisterClients>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x40,-0x4(%rbp)
jge    118b <CG_RegisterClients+0x5b>
mov    -0x4(%rbp),%edi
add    $0x240,%edi
call   1050 <CG_ConfigString@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
jne    116d <CG_RegisterClients+0x3d>
jmp    117d <CG_RegisterClients+0x4d>
mov    -0x4(%rbp),%edi
call   1040 <CG_LoadingClient@plt>
mov    -0x4(%rbp),%edi
call   1030 <CG_NewClientInfo@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    113f <CG_RegisterClients+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CG_RegisterClients>:
push   %rbx
xor    %ebx,%ebx
jmp    1148 <CG_RegisterClients+0x18>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%ebx
cmp    $0x40,%ebx
je     1168 <CG_RegisterClients+0x38>
lea    0x240(%rbx),%edi
call   1050 <CG_ConfigString@plt>
cmpb   $0x0,(%rax)
je     1140 <CG_RegisterClients+0x10>
mov    %ebx,%edi
call   1040 <CG_LoadingClient@plt>
mov    %ebx,%edi
call   1030 <CG_NewClientInfo@plt>
jmp    1140 <CG_RegisterClients+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @CG_RegisterClients() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
br label %3
3: ; preds = %20, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 64
br i1 %5, label %6, label %23
6: ; preds = %3
%7 = load i32, i32* %1
%8 = add nsw i32 576, %7
%9 = call i8* @CG_ConfigString(i32 %8)
store i8* %9, i8** %2
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i64 0
%12 = load i8, i8* %11
%13 = icmp ne i8 %12, 0
br i1 %13, label %15, label %14
14: ; preds = %6
br label %20
15: ; preds = %6
%16 = load i32, i32* %1
%17 = call i32 @CG_LoadingClient(i32 %16)
%18 = load i32, i32* %1
%19 = call i32 @CG_NewClientInfo(i32 %18)
br label %20
20: ; preds = %15, %14
%21 = load i32, i32* %1
%22 = add nsw i32 %21, 1
store i32 %22, i32* %1
br label %3
23: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @CG_RegisterClients() {
br label %1
1: ; preds = %0, %10
%2 = phi i32 [ 0, %0 ], [ %11, %10 ]
%3 = add nuw nsw i32 %2, 576
%4 = tail call i8* @CG_ConfigString(i32 %3)
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %1
%8 = tail call i32 @CG_LoadingClient(i32 %2)
%9 = tail call i32 @CG_NewClientInfo(i32 %2)
br label %10
10: ; preds = %1, %7
%11 = add nuw nsw i32 %2, 1
%12 = icmp eq i32 %11, 64
br i1 %12, label %13, label %1
13: ; preds = %10
ret void
}