#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 *ILibWrapper_ReadString(char *, int, int);
void ILibWrapper_BlockToUserNamePWD(char *block, int blockLen, char **username,
                                    int *usernameLen, char **password,
                                    int *passwordLen) {
  *usernameLen = (int)block[6];
  *passwordLen = (int)block[7 + *usernameLen];
  *username = ILibWrapper_ReadString(block, 7, *usernameLen);
  *password = ILibWrapper_ReadString(block, 8 + *usernameLen, *passwordLen);
}


x86 assembly (clang, -O0):
<ILibWrapper_BlockToUserNamePWD>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rax
movsbl 0x6(%rax),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    (%rcx),%ecx
add    $0x7,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%ecx
mov    -0x30(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rax
mov    (%rax),%edx
mov    $0x7,%esi
call   1030 <ILibWrapper_ReadString@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rax
mov    (%rax),%esi
add    $0x8,%esi
mov    -0x30(%rbp),%rax
mov    (%rax),%edx
call   1030 <ILibWrapper_ReadString@plt>
mov    %rax,%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ILibWrapper_BlockToUserNamePWD>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %r9,%r15
mov    %r8,%r14
mov    %rcx,%r13
mov    %rdx,%r12
mov    %rdi,%rbx
movsbl 0x6(%rdi),%eax
cltq
mov    %eax,(%rcx)
movsbl 0x7(%rax,%rdi,1),%eax
mov    %eax,(%r9)
mov    (%rcx),%edx
mov    $0x7,%esi
call   1030 <ILibWrapper_ReadString@plt>
mov    %rax,(%r12)
mov    0x0(%r13),%esi
add    $0x8,%esi
mov    (%r15),%edx
mov    %rbx,%rdi
call   1030 <ILibWrapper_ReadString@plt>
mov    %rax,(%r14)
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @ILibWrapper_BlockToUserNamePWD(i8* %0, i32 %1, i8** %2, i32* %3, i8** %4, i32* %5) {
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8**
%10 = alloca i32*
%11 = alloca i8**
%12 = alloca i32*
store i8* %0, i8** %7
store i32 %1, i32* %8
store i8** %2, i8*** %9
store i32* %3, i32** %10
store i8** %4, i8*** %11
store i32* %5, i32** %12
%13 = load i8*, i8** %7
%14 = getelementptr inbounds i8, i8* %13, i64 6
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = load i32*, i32** %10
store i32 %16, i32* %17
%18 = load i8*, i8** %7
%19 = load i32*, i32** %10
%20 = load i32, i32* %19
%21 = add nsw i32 7, %20
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8, i8* %18, i64 %22
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
%26 = load i32*, i32** %12
store i32 %25, i32* %26
%27 = load i8*, i8** %7
%28 = load i32*, i32** %10
%29 = load i32, i32* %28
%30 = call i8* @ILibWrapper_ReadString(i8* %27, i32 7, i32 %29)
%31 = load i8**, i8*** %9
store i8* %30, i8** %31
%32 = load i8*, i8** %7
%33 = load i32*, i32** %10
%34 = load i32, i32* %33
%35 = add nsw i32 8, %34
%36 = load i32*, i32** %12
%37 = load i32, i32* %36
%38 = call i8* @ILibWrapper_ReadString(i8* %32, i32 %35, i32 %37)
%39 = load i8**, i8*** %11
store i8* %38, i8** %39
ret void
}

LLVM IR (-O2):
define void @ILibWrapper_BlockToUserNamePWD(i8* %0, i32 %1, i8** nocapture writeonly %2, i32* nocapture %3, i8** nocapture writeonly %4, i32* nocapture %5) {
%7 = getelementptr inbounds i8, i8* %0, i64 6
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
store i32 %9, i32* %3
%10 = add nsw i32 %9, 7
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %0, i64 %11
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
store i32 %14, i32* %5
%15 = load i32, i32* %3
%16 = tail call i8* @ILibWrapper_ReadString(i8* %0, i32 7, i32 %15)
store i8* %16, i8** %2
%17 = load i32, i32* %3
%18 = add nsw i32 %17, 8
%19 = load i32, i32* %5
%20 = tail call i8* @ILibWrapper_ReadString(i8* %0, i32 %18, i32 %19)
store i8* %20, i8** %4
ret void
}