#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*/ GetProfileString(char *, char *, char *, char *);
int /*<<< orphan*/ printf(char *, char *);
void main() {
  char ip[16];
  char mac[32];
  char id[10], num[10];
  GetProfileString("./cls.conf", "cls_server", "ip", ip);
  printf("%s\n", ip);
  GetProfileString("./cls.conf", "server", "ip", ip);
  printf("%s\n", ip);
  GetProfileString("./cls.conf", "server", "mac", mac);
  printf("%s\n", mac);
  GetProfileString("./cls.conf", "port", "id", id);
  printf("%s\n", id);
  GetProfileString("./cls.conf", "port", "num", num);
  printf("%s\n", num);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    -0x10(%rbp),%rcx
lea    0xecd(%rip),%rdi
lea    0xed1(%rip),%rsi
lea    0xed5(%rip),%rdx
call   1030 <GetProfileString@plt>
lea    -0x10(%rbp),%rsi
lea    0xec8(%rip),%rdi
call   1040 <printf@plt>
lea    -0x10(%rbp),%rcx
lea    0xe9f(%rip),%rdi
lea    0xea7(%rip),%rsi
lea    0xea7(%rip),%rdx
call   1030 <GetProfileString@plt>
lea    -0x10(%rbp),%rsi
lea    0xe9a(%rip),%rdi
call   1040 <printf@plt>
lea    -0x30(%rbp),%rcx
lea    0xe71(%rip),%rdi
lea    0xe79(%rip),%rsi
lea    0xe80(%rip),%rdx
call   1030 <GetProfileString@plt>
lea    -0x30(%rbp),%rsi
lea    0xe6c(%rip),%rdi
call   1040 <printf@plt>
lea    -0x3a(%rbp),%rcx
lea    0xe43(%rip),%rdi
lea    0xe5d(%rip),%rsi
lea    0xe5b(%rip),%rdx
call   1030 <GetProfileString@plt>
lea    -0x3a(%rbp),%rsi
lea    0xe3e(%rip),%rdi
call   1040 <printf@plt>
lea    -0x44(%rbp),%rcx
lea    0xe15(%rip),%rdi
lea    0xe2f(%rip),%rsi
lea    0xe30(%rip),%rdx
call   1030 <GetProfileString@plt>
lea    -0x44(%rbp),%rsi
lea    0xe10(%rip),%rdi
call   1040 <printf@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x50,%rsp
lea    0xecc(%rip),%r14
lea    0xed0(%rip),%rsi
lea    0xed4(%rip),%r15
lea    0x20(%rsp),%rbx
mov    %r14,%rdi
mov    %r15,%rdx
mov    %rbx,%rcx
call   1030 <GetProfileString@plt>
lea    0xebd(%rip),%r12
mov    %r12,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
lea    0xea1(%rip),%r13
mov    %r14,%rdi
mov    %r13,%rsi
mov    %r15,%rdx
mov    %rbx,%rcx
call   1030 <GetProfileString@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
lea    0xe8c(%rip),%rdx
lea    0x30(%rsp),%rbx
mov    %r14,%rdi
mov    %r13,%rsi
mov    %rbx,%rcx
call   1030 <GetProfileString@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
lea    0xe6b(%rip),%r15
lea    0xe69(%rip),%rdx
lea    0x16(%rsp),%rbx
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rcx
call   1030 <GetProfileString@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
lea    0xe47(%rip),%rdx
lea    0xc(%rsp),%rbx
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rcx
call   1030 <GetProfileString@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
add    $0x50,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [11 x i8] c"./cls.conf\00"
@.str.1 = [11 x i8] c"cls_server\00"
@.str.2 = [3 x i8] c"ip\00"
@.str.3 = [4 x i8] c"%s\0A\00"
@.str.4 = [7 x i8] c"server\00"
@.str.5 = [4 x i8] c"mac\00"
@.str.6 = [5 x i8] c"port\00"
@.str.7 = [3 x i8] c"id\00"
@.str.8 = [4 x i8] c"num\00"
define void @main() {
%1 = alloca [16 x i8]
%2 = alloca [32 x i8]
%3 = alloca [10 x i8]
%4 = alloca [10 x i8]
%5 = getelementptr inbounds [16 x i8], [16 x i8]* %1, i64 0, i64 0
%6 = call i32 @GetProfileString(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [16 x i8], [16 x i8]* %1, i64 0, i64 0
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %7)
%9 = getelementptr inbounds [16 x i8], [16 x i8]* %1, i64 0, i64 0
%10 = call i32 @GetProfileString(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %9)
%11 = getelementptr inbounds [16 x i8], [16 x i8]* %1, i64 0, i64 0
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %11)
%13 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%14 = call i32 @GetProfileString(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8* %13)
%15 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%16 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %15)
%17 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%18 = call i32 @GetProfileString(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i8* %17)
%19 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%20 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %19)
%21 = getelementptr inbounds [10 x i8], [10 x i8]* %4, i64 0, i64 0
%22 = call i32 @GetProfileString(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8* %21)
%23 = getelementptr inbounds [10 x i8], [10 x i8]* %4, i64 0, i64 0
%24 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %23)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"./cls.conf\00"
@.str.1 = [11 x i8] c"cls_server\00"
@.str.2 = [3 x i8] c"ip\00"
@.str.3 = [4 x i8] c"%s\0A\00"
@.str.4 = [7 x i8] c"server\00"
@.str.5 = [4 x i8] c"mac\00"
@.str.6 = [5 x i8] c"port\00"
@.str.7 = [3 x i8] c"id\00"
@.str.8 = [4 x i8] c"num\00"
define void @main() {
%1 = alloca [16 x i8]
%2 = alloca [32 x i8]
%3 = alloca [10 x i8]
%4 = alloca [10 x i8]
%5 = getelementptr inbounds [16 x i8], [16 x i8]* %1, i64 0, i64 0
%6 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%7 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%8 = getelementptr inbounds [10 x i8], [10 x i8]* %4, i64 0, i64 0
%9 = call i32 @GetProfileString(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %5)
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %5)
%11 = call i32 @GetProfileString(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %5)
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %5)
%13 = call i32 @GetProfileString(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8* %6)
%14 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %6)
%15 = call i32 @GetProfileString(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i8* %7)
%16 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %7)
%17 = call i32 @GetProfileString(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8* %8)
%18 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %8)
ret void
}