#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 int uint32_t;

/* Variables and functions */
scalar_t__ ceilf(float);
scalar_t__ is_ambiguous_size(int);
float srslte_ra_type0_P(int);
uint32_t dci_format2B_sizeof(uint32_t nof_prb, uint32_t nof_ports) {
  uint32_t n = (uint32_t)ceilf((float)nof_prb / srslte_ra_type0_P(nof_prb)) +
               2 + 3 + 1 + 2 * (5 + 1 + 2);
  if (nof_prb > 10) {
    n++;
  }
  while (is_ambiguous_size(n)) {
    n++;
  }
  return n;
}


x86 assembly (clang, -O0):
<dci_format2B_sizeof>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cvtsi2ssl -0x4(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <srslte_ra_type0_P@plt>
movaps %xmm0,%xmm1
movss  -0x10(%rbp),%xmm0
divss  %xmm1,%xmm0
call   1050 <ceilf@plt>
add    $0x2,%eax
add    $0x3,%eax
add    $0x1,%eax
add    $0x10,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0xa,-0x4(%rbp)
jle    1183 <dci_format2B_sizeof+0x53>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1188 <dci_format2B_sizeof+0x58>
mov    -0xc(%rbp),%edi
call   1040 <is_ambiguous_size@plt>
cmp    $0x0,%rax
je     11a8 <dci_format2B_sizeof+0x78>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1188 <dci_format2B_sizeof+0x58>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dci_format2B_sizeof>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
cvtsi2ss %edi,%xmm0
movss  %xmm0,0xc(%rsp)
call   1030 <srslte_ra_type0_P@plt>
movss  0xc(%rsp),%xmm1
divss  %xmm0,%xmm1
movaps %xmm1,%xmm0
call   1050 <ceilf@plt>
xor    %ecx,%ecx
cmp    $0xb,%ebx
setge  %cl
lea    (%rcx,%rax,1),%ebx
add    $0x16,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1040 <is_ambiguous_size@plt>
add    $0x1,%ebx
test   %rax,%rax
jne    1170 <dci_format2B_sizeof+0x40>
add    $0xffffffff,%ebx
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @dci_format2B_sizeof(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = sitofp i32 %6 to float
%8 = load i32, i32* %3
%9 = call float @srslte_ra_type0_P(i32 %8)
%10 = fdiv float %7, %9
%11 = call i64 @ceilf(float %10)
%12 = trunc i64 %11 to i32
%13 = add nsw i32 %12, 2
%14 = add nsw i32 %13, 3
%15 = add nsw i32 %14, 1
%16 = add nsw i32 %15, 16
store i32 %16, i32* %5
%17 = load i32, i32* %3
%18 = icmp sgt i32 %17, 10
br i1 %18, label %19, label %22
19: ; preds = %2
%20 = load i32, i32* %5
%21 = add nsw i32 %20, 1
store i32 %21, i32* %5
br label %22
22: ; preds = %19, %2
br label %23
23: ; preds = %27, %22
%24 = load i32, i32* %5
%25 = call i64 @is_ambiguous_size(i32 %24)
%26 = icmp ne i64 %25, 0
br i1 %26, label %27, label %30
27: ; preds = %23
%28 = load i32, i32* %5
%29 = add nsw i32 %28, 1
store i32 %29, i32* %5
br label %23
30: ; preds = %23
%31 = load i32, i32* %5
ret i32 %31
}

LLVM IR (-O2):
define i32 @dci_format2B_sizeof(i32 %0, i32 %1) {
%3 = sitofp i32 %0 to float
%4 = tail call float @srslte_ra_type0_P(i32 %0)
%5 = fdiv float %3, %4
%6 = tail call i64 @ceilf(float %5)
%7 = trunc i64 %6 to i32
%8 = icmp sgt i32 %0, 10
%9 = select i1 %8, i32 23, i32 22
%10 = add nsw i32 %9, %7
br label %11
11: ; preds = %11, %2
%12 = phi i32 [ %10, %2 ], [ %15, %11 ]
%13 = tail call i64 @is_ambiguous_size(i32 %12)
%14 = icmp eq i64 %13, 0
%15 = add nsw i32 %12, 1
br i1 %14, label %16, label %11
16: ; preds = %11
ret i32 %12
}