#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*/ convNumIP(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ sprintf(char *, char *, char *, char const);
void geraEndIPHost(const char *param, char *nIPDec, char *nIPBin) {
  register char i = 0;
  *(nIPDec + 0) = '\0';
  *(nIPBin + 0) = '\0';
  while (*(param + i) != '/') {
    sprintf(nIPDec,
            "%s"
            "%c",
            nIPDec, *(param + i));
    ++i;
  }
  convNumIP(nIPDec, nIPBin, 0);
}


x86 assembly (clang, -O0):
<geraEndIPHost>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movb   $0x0,-0x19(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
movsbl -0x19(%rbp),%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2f,%eax
je     118e <geraEndIPHost+0x6e>
mov    -0x10(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%rax
movsbl -0x19(%rbp),%ecx
movslq %ecx,%rcx
lea    0xe88(%rip),%rsi
movsbl (%rax,%rcx,1),%ecx
call   1040 <sprintf@plt>
mov    -0x19(%rbp),%al
add    $0x1,%al
mov    %al,-0x19(%rbp)
jmp    1146 <geraEndIPHost+0x26>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
xor    %edx,%edx
call   1030 <convNumIP@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<geraEndIPHost>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r13
movb   $0x0,(%rsi)
movb   $0x0,(%rdx)
mov    (%rdi),%al
cmp    $0x2f,%al
je     1171 <geraEndIPHost+0x51>
mov    %rdi,%r15
mov    $0x1,%bl
lea    0xeb9(%rip),%r12
nopw   0x0(%rax,%rax,1)
movsbl %al,%ecx
mov    %r13,%rdi
mov    %r12,%rsi
mov    %r13,%rdx
call   1040 <sprintf@plt>
movsbq %bl,%rbx
movzbl (%r15,%rbx,1),%eax
add    $0x1,%bl
cmp    $0x2f,%al
jne    1150 <geraEndIPHost+0x30>
mov    %r13,%rdi
mov    %r14,%rsi
xor    %edx,%edx
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
jmp    1030 <convNumIP@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"%s%c\00"
define void @geraEndIPHost(i8* nocapture %0, i8* %1, i8* %2) {
store i8 0, i8* %1
store i8 0, i8* %2
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 47
br i1 %5, label %15, label %6
6: ; preds = %3, %6
%7 = phi i8 [ %13, %6 ], [ %4, %3 ]
%8 = phi i8 [ %10, %6 ], [ 0, %3 ]
%9 = tail call i32 @sprintf(i8* %1, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %1, i8 signext %7)
%10 = add i8 %8, 1
%11 = sext i8 %10 to i64
%12 = getelementptr inbounds i8, i8* %0, i64 %11
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 47
br i1 %14, label %15, label %6
15: ; preds = %6, %3
%16 = tail call i32 @convNumIP(i8* %1, i8* %2, i32 0)
ret void
}