#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 */
typedef scalar_t__ uint32_t;

/* Variables and functions */
scalar_t__ dci_format0_sizeof_(scalar_t__);
scalar_t__ is_ambiguous_size(scalar_t__);
scalar_t__ riv_nbits(scalar_t__);
uint32_t dci_format1A_sizeof(uint32_t nof_prb) {
  uint32_t n;
  n = 1 + 1 + riv_nbits(nof_prb) + 5 + 3 + 1 + 2 + 2;
  while (n < dci_format0_sizeof_(nof_prb)) {
    n++;
  }
  if (is_ambiguous_size(n)) {
    n++;
  }
  return n;
}


x86 assembly (clang, -O0):
<dci_format1A_sizeof>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <riv_nbits@plt>
add    $0x2,%rax
add    $0x5,%rax
add    $0x3,%rax
add    $0x1,%rax
add    $0x2,%rax
add    $0x2,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <dci_format0_sizeof_@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
jge    1193 <dci_format1A_sizeof+0x63>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1161 <dci_format1A_sizeof+0x31>
mov    -0x10(%rbp),%rdi
call   1030 <is_ambiguous_size@plt>
cmp    $0x0,%rax
je     11b2 <dci_format1A_sizeof+0x82>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dci_format1A_sizeof>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <riv_nbits@plt>
mov    %rax,%rbx
add    $0xe,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r14,%rdi
call   1050 <dci_format0_sizeof_@plt>
add    $0x1,%rbx
cmp    %rax,%rbx
jl     1150 <dci_format1A_sizeof+0x20>
mov    %rbx,%rdi
call   1030 <is_ambiguous_size@plt>
cmp    $0x1,%rax
sbb    $0xffffffffffffffff,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @dci_format1A_sizeof(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i64 @riv_nbits(i64 %4)
%6 = add nsw i64 2, %5
%7 = add nsw i64 %6, 5
%8 = add nsw i64 %7, 3
%9 = add nsw i64 %8, 1
%10 = add nsw i64 %9, 2
%11 = add nsw i64 %10, 2
store i64 %11, i64* %3
br label %12
12: ; preds = %17, %1
%13 = load i64, i64* %3
%14 = load i64, i64* %2
%15 = call i64 @dci_format0_sizeof_(i64 %14)
%16 = icmp slt i64 %13, %15
br i1 %16, label %17, label %20
17: ; preds = %12
%18 = load i64, i64* %3
%19 = add nsw i64 %18, 1
store i64 %19, i64* %3
br label %12
20: ; preds = %12
%21 = load i64, i64* %3
%22 = call i64 @is_ambiguous_size(i64 %21)
%23 = icmp ne i64 %22, 0
br i1 %23, label %24, label %27
24: ; preds = %20
%25 = load i64, i64* %3
%26 = add nsw i64 %25, 1
store i64 %26, i64* %3
br label %27
27: ; preds = %24, %20
%28 = load i64, i64* %3
ret i64 %28
}

LLVM IR (-O2):
define i64 @dci_format1A_sizeof(i64 %0) {
%2 = tail call i64 @riv_nbits(i64 %0)
%3 = add nsw i64 %2, 15
br label %4
4: ; preds = %4, %1
%5 = phi i64 [ %3, %1 ], [ %8, %4 ]
%6 = tail call i64 @dci_format0_sizeof_(i64 %0)
%7 = icmp slt i64 %5, %6
%8 = add nsw i64 %5, 1
br i1 %7, label %4, label %9
9: ; preds = %4
%10 = tail call i64 @is_ambiguous_size(i64 %5)
%11 = icmp ne i64 %10, 0
%12 = zext i1 %11 to i64
%13 = add nsw i64 %5, %12
ret i64 %13
}