void readlen_nocheck(a, b, p) int *a, *b;
char **p;
{
  int t;
  *a = readnump(p);
  if (*a == 0) {
    *a = 1;
  };
  *b = 1;
  if (**p == '/') {
    *p = *p + 1;
    *b = readnump(p);
    if (*b == 0) {
      *b = 2;
      while (**p == '/') {
        *b = *b * 2;
        *p = *p + 1;
      };
    };
  };
  t = *b;
  while (t > 1) {
    if (t % 2 != 0) {
      t = 1;
    } else {
      t = t / 2;
    };
  };
}


x86 assembly (clang, -O0):
<readlen_nocheck>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   1030 <readnump@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
cmpl   $0x0,(%rax)
jne    114e <readlen_nocheck+0x3e>
mov    -0x8(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    11ea <readlen_nocheck+0xda>
mov    -0x18(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   1030 <readnump@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
cmpl   $0x0,(%rax)
jne    11e5 <readlen_nocheck+0xd5>
mov    -0x10(%rbp),%rax
movl   $0x2,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    11e0 <readlen_nocheck+0xd0>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
shl    $0x1,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
jmp    11a7 <readlen_nocheck+0x97>
jmp    11e5 <readlen_nocheck+0xd5>
jmp    11ea <readlen_nocheck+0xda>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x1,-0x1c(%rbp)
jle    1230 <readlen_nocheck+0x120>
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     121d <readlen_nocheck+0x10d>
movl   $0x1,-0x1c(%rbp)
jmp    122b <readlen_nocheck+0x11b>
mov    -0x1c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x1c(%rbp)
jmp    11f3 <readlen_nocheck+0xe3>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readlen_nocheck>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rdx,%rdi
xor    %eax,%eax
call   1030 <readnump@plt>
test   %eax,%eax
mov    $0x1,%ecx
cmovne %eax,%ecx
mov    %ecx,(%r15)
movl   $0x1,(%r14)
mov    (%rbx),%rax
cmpb   $0x2f,(%rax)
jne    1191 <readlen_nocheck+0x81>
add    $0x1,%rax
mov    %rax,(%rbx)
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <readnump@plt>
mov    %eax,(%r14)
test   %eax,%eax
jne    1191 <readlen_nocheck+0x81>
movl   $0x2,(%r14)
mov    (%rbx),%rax
cmpb   $0x2f,(%rax)
jne    1191 <readlen_nocheck+0x81>
add    $0x1,%rax
mov    $0x2,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    %ecx,%ecx
mov    %ecx,(%r14)
mov    %rax,(%rbx)
cmpb   $0x2f,(%rax)
lea    0x1(%rax),%rax
je     1180 <readlen_nocheck+0x70>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @readlen_nocheck(i32* %0, i32* %1, i8** %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i8**
%7 = alloca i32
store i32* %0, i32** %4
store i32* %1, i32** %5
store i8** %2, i8*** %6
%8 = load i8**, i8*** %6
%9 = call i32 (i8**, ...) bitcast (i32 (...)* @readnump to i32 (i8**, ...)*)(i8** %8)
%10 = load i32*, i32** %4
store i32 %9, i32* %10
%11 = load i32*, i32** %4
%12 = load i32, i32* %11
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %3
%15 = load i32*, i32** %4
store i32 1, i32* %15
br label %16
16: ; preds = %14, %3
%17 = load i32*, i32** %5
store i32 1, i32* %17
%18 = load i8**, i8*** %6
%19 = load i8*, i8** %18
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 47
br i1 %22, label %23, label %53
23: ; preds = %16
%24 = load i8**, i8*** %6
%25 = load i8*, i8** %24
%26 = getelementptr inbounds i8, i8* %25, i64 1
%27 = load i8**, i8*** %6
store i8* %26, i8** %27
%28 = load i8**, i8*** %6
%29 = call i32 (i8**, ...) bitcast (i32 (...)* @readnump to i32 (i8**, ...)*)(i8** %28)
%30 = load i32*, i32** %5
store i32 %29, i32* %30
%31 = load i32*, i32** %5
%32 = load i32, i32* %31
%33 = icmp eq i32 %32, 0
br i1 %33, label %34, label %52
34: ; preds = %23
%35 = load i32*, i32** %5
store i32 2, i32* %35
br label %36
36: ; preds = %42, %34
%37 = load i8**, i8*** %6
%38 = load i8*, i8** %37
%39 = load i8, i8* %38
%40 = sext i8 %39 to i32
%41 = icmp eq i32 %40, 47
br i1 %41, label %42, label %51
42: ; preds = %36
%43 = load i32*, i32** %5
%44 = load i32, i32* %43
%45 = mul nsw i32 %44, 2
%46 = load i32*, i32** %5
store i32 %45, i32* %46
%47 = load i8**, i8*** %6
%48 = load i8*, i8** %47
%49 = getelementptr inbounds i8, i8* %48, i64 1
%50 = load i8**, i8*** %6
store i8* %49, i8** %50
br label %36
51: ; preds = %36
br label %52
52: ; preds = %51, %23
br label %53
53: ; preds = %52, %16
%54 = load i32*, i32** %5
%55 = load i32, i32* %54
store i32 %55, i32* %7
br label %56
56: ; preds = %67, %53
%57 = load i32, i32* %7
%58 = icmp sgt i32 %57, 1
br i1 %58, label %59, label %68
59: ; preds = %56
%60 = load i32, i32* %7
%61 = srem i32 %60, 2
%62 = icmp ne i32 %61, 0
br i1 %62, label %63, label %64
63: ; preds = %59
store i32 1, i32* %7
br label %67
64: ; preds = %59
%65 = load i32, i32* %7
%66 = sdiv i32 %65, 2
store i32 %66, i32* %7
br label %67
67: ; preds = %64, %63
br label %56
68: ; preds = %56
ret void
}

LLVM IR (-O2):
define void @readlen_nocheck(i32* nocapture writeonly %0, i32* nocapture %1, i8** %2) {
%4 = tail call i32 (i8**, ...) bitcast (i32 (...)* @readnump to i32 (i8**, ...)*)(i8** %2)
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 1, i32 %4
store i32 %6, i32* %0
store i32 1, i32* %1
%7 = load i8*, i8** %2
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 47
br i1 %9, label %10, label %25
10: ; preds = %3
%11 = getelementptr inbounds i8, i8* %7, i64 1
store i8* %11, i8** %2
%12 = tail call i32 (i8**, ...) bitcast (i32 (...)* @readnump to i32 (i8**, ...)*)(i8** %2)
store i32 %12, i32* %1
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %25
14: ; preds = %10
store i32 2, i32* %1
%15 = load i8*, i8** %2
%16 = load i8, i8* %15
%17 = icmp eq i8 %16, 47
br i1 %17, label %18, label %25
18: ; preds = %14, %18
%19 = phi i32 [ %21, %18 ], [ 2, %14 ]
%20 = phi i8* [ %22, %18 ], [ %15, %14 ]
%21 = shl nsw i32 %19, 1
store i32 %21, i32* %1
%22 = getelementptr inbounds i8, i8* %20, i64 1
store i8* %22, i8** %2
%23 = load i8, i8* %22
%24 = icmp eq i8 %23, 47
br i1 %24, label %18, label %25
25: ; preds = %18, %10, %14, %3
ret void
}