// File: /workspace/github_c_makefile_star2_O1/Carton32[P]quectel-CM/mbim-cm.c
// Function: mbim_dump_subscriber_status
static void mbim_dump_subscriber_status(MBIM_SUBSCRIBER_READY_STATUS_T *pInfo, const char *direction)
{
    mbim_debug("%s ReadyState = %s", direction, MBIMSubscriberReadyStateStr(le32toh(pInfo->ReadyState)));
    mbim_debug("%s SIMICCID = %s", direction, mbim_get_segment(pInfo, le32toh(pInfo->SimIccIdOffset), le32toh(pInfo->SimIccIdSize)));
    mbim_debug("%s SubscriberID = %s", direction, mbim_get_segment(pInfo, le32toh(pInfo->SubscriberIdOffset), le32toh(pInfo->SubscriberIdSize)));
    /* maybe more than one number */
    uint32_t idx;
    for (idx = 0; idx < le32toh(pInfo->ElementCount); idx++) {
        UINT32 offset = ((UINT32*)((UINT8*)pInfo+offsetof(MBIM_SUBSCRIBER_READY_STATUS_T, TelephoneNumbersRefList)))[0];
        UINT32 length = ((UINT32*)((UINT8*)pInfo+offsetof(MBIM_SUBSCRIBER_READY_STATUS_T, TelephoneNumbersRefList)))[1];
        mbim_debug("%s Number = %s", direction, mbim_get_segment(pInfo, le32toh(offset), le32toh(length)));
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, (%rsp)
movq %rdi, %r14
movq 0x14c28(%rip), %rax     # 0x29fc0
movq (%rax), %r15
callq 0xeb2f
movl (%r14), %edx
movl $0x4, %ecx
leaq 0x147e1(%rip), %rbx     # 0x29b90
leaq 0xcb37(%rip), %r8       # 0x21eed
cmpl %edx, -0x4(%rcx,%rbx)
je 0x153c8
addq $0xc, %rcx
cmpq $0x58, %rcx
jne 0x153b6
jmp 0x153cc
movq (%rcx,%rbx), %r8
leaq 0xcc86(%rip), %rsi      # 0x22059
movq %r15, %rdi
movq %rax, %rdx
movq (%rsp), %rcx
xorl %eax, %eax
callq 0x52c0
leaq 0x158bd(%rip), %rax     # 0x2aca8
movq (%rax), %r15
testq %r15, %r15
je 0x15435
callq 0xeb2f
movl (%r14), %edx
movl $0x4, %ecx
leaq 0xcae6(%rip), %r8       # 0x21eed
cmpl %edx, -0x4(%rcx,%rbx)
je 0x15419
addq $0xc, %rcx
cmpq $0x58, %rcx
jne 0x15407
jmp 0x1541d
movq (%rcx,%rbx), %r8
leaq 0xcc35(%rip), %rsi      # 0x22059
movq %r15, %rdi
movq %rax, %rdx
movq (%rsp), %rcx
xorl %eax, %eax
callq 0x52c0
movq 0x14b84(%rip), %rax     # 0x29fc0
movq (%rax), %r12
callq 0xeb2f
movl 0x10(%r14), %ecx
cmpq $0x2, %rcx
jae 0x15452
xorl %edx, %edx
jmp 0x15477
movl 0xc(%r14), %esi
shrl %ecx
xorl %edx, %edx
leaq 0x1698f(%rip), %rdi     # 0x2bdf0
movl %esi, %r8d
movb (%r14,%r8), %r8b
movb %r8b, (%rdx,%rdi)
incq %rdx
addl $0x2, %esi
cmpq %rdx, %rcx
jne 0x15461
leaq 0x16972(%rip), %r15     # 0x2bdf0
movb $0x0, (%rdx,%r15)
leaq 0xcbe8(%rip), %rsi      # 0x22072
movq %r12, %rdi
movq %rax, %rdx
movq (%rsp), %rcx
movq %r15, %r8
xorl %eax, %eax
callq 0x52c0
leaq 0x15803(%rip), %rax     # 0x2aca8
movq (%rax), %r12
testq %r12, %r12
je 0x154fd
callq 0xeb2f
movl 0x10(%r14), %ecx
cmpq $0x2, %rcx
jae 0x154c0
xorl %edx, %edx
jmp 0x154dd
movl 0xc(%r14), %esi
shrl %ecx
xorl %edx, %edx
movl %esi, %edi
movb (%r14,%rdi), %dil
movb %dil, (%rdx,%r15)
incq %rdx
addl $0x2, %esi
cmpq %rdx, %rcx
jne 0x154c8
movb $0x0, (%rdx,%r15)
leaq 0xcb89(%rip), %rsi      # 0x22072
movq %r12, %rdi
movq %rax, %rdx
movq (%rsp), %rcx
movq %r15, %r8
xorl %eax, %eax
callq 0x52c0
movq 0x14abc(%rip), %rax     # 0x29fc0
movq (%rax), %r12
callq 0xeb2f
movl 0x8(%r14), %ecx
cmpq $0x2, %rcx
jae 0x1551a
xorl %edx, %edx
jmp 0x15537
movl 0x4(%r14), %esi
shrl %ecx
xorl %edx, %edx
movl %esi, %edi
movb (%r14,%rdi), %dil
movb %dil, (%rdx,%r15)
incq %rdx
addl $0x2, %esi
cmpq %rdx, %rcx
jne 0x15522
movb $0x0, (%rdx,%r15)
leaq 0xcb46(%rip), %rsi      # 0x22089
movq %r12, %rdi
movq %rax, %rdx
movq (%rsp), %rcx
movq %r15, %r8
xorl %eax, %eax
callq 0x52c0
leaq 0x1574a(%rip), %rax     # 0x2aca8
movq (%rax), %r12
testq %r12, %r12
je 0x155b6
callq 0xeb2f
movl 0x8(%r14), %ecx
cmpq $0x2, %rcx
jae 0x15579
xorl %edx, %edx
jmp 0x15596
movl 0x4(%r14), %esi
shrl %ecx
xorl %edx, %edx
movl %esi, %edi
movb (%r14,%rdi), %dil
movb %dil, (%rdx,%r15)
incq %rdx
addl $0x2, %esi
cmpq %rdx, %rcx
jne 0x15581
movb $0x0, (%rdx,%r15)
leaq 0xcae7(%rip), %rsi      # 0x22089
movq %r12, %rdi
movq %rax, %rdx
movq (%rsp), %rcx
movq %r15, %r8
xorl %eax, %eax
callq 0x52c0
cmpl $0x0, 0x18(%r14)
je 0x15686
xorl %ebp, %ebp
movl 0x1c(%r14), %ebx
movl 0x20(%r14), %r12d
movq 0x149ee(%rip), %rax     # 0x29fc0
movq (%rax), %r13
callq 0xeb2f
cmpq $0x2, %r12
jae 0x155e4
xorl %edx, %edx
jmp 0x15602
movl %r12d, %ecx
shrl %ecx
movl %ebx, %esi
xorl %edx, %edx
movl %esi, %edi
movb (%r14,%rdi), %dil
movb %dil, (%rdx,%r15)
incq %rdx
addl $0x2, %esi
cmpq %rdx, %rcx
jne 0x155ed
movb $0x0, (%rdx,%r15)
movq %r13, %rdi
leaq 0xca93(%rip), %rsi      # 0x220a4
movq %rax, %rdx
movq (%rsp), %rcx
movq %r15, %r8
xorl %eax, %eax
callq 0x52c0
leaq 0x1567f(%rip), %rax     # 0x2aca8
movq (%rax), %r13
testq %r13, %r13
je 0x1567a
callq 0xeb2f
cmpl $0x2, %r12d
jae 0x15640
xorl %ecx, %ecx
jmp 0x1565a
shrl %r12d
xorl %ecx, %ecx
movl %ebx, %edx
movb (%r14,%rdx), %dl
movb %dl, (%rcx,%r15)
incq %rcx
addl $0x2, %ebx
cmpq %rcx, %r12
jne 0x15645
movb $0x0, (%rcx,%r15)
movq %r13, %rdi
leaq 0xca3b(%rip), %rsi      # 0x220a4
movq %rax, %rdx
movq (%rsp), %rcx
movq %r15, %r8
xorl %eax, %eax
callq 0x52c0
incl %ebp
cmpl 0x18(%r14), %ebp
jb 0x155c3
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq