#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);
int dci_format0_sizeof(int);
int dci_format1A_sizeof(int);
scalar_t__ is_ambiguous_size(int);
float srslte_ra_type0_P(int);
uint32_t dci_format1_sizeof(uint32_t nof_prb) {
  uint32_t n = (uint32_t)ceilf((float)nof_prb / srslte_ra_type0_P(nof_prb)) +
               5 + 3 + 1 + 2 + 2;
  if (nof_prb > 10) {
    n++;
  }
  while (n == dci_format0_sizeof(nof_prb) ||
         n == dci_format1A_sizeof(nof_prb) || is_ambiguous_size(n)) {
    n++;
  }
  return n;
}


x86 assembly (clang, -O0):
<dci_format1_sizeof>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
cvtsi2ssl -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <srslte_ra_type0_P@plt>
movaps %xmm0,%xmm1
movss  -0xc(%rbp),%xmm0
divss  %xmm1,%xmm0
call   1050 <ceilf@plt>
add    $0x5,%eax
add    $0x3,%eax
add    $0x1,%eax
add    $0x2,%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0xa,-0x4(%rbp)
jle    11a3 <dci_format1_sizeof+0x53>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11a8 <dci_format1_sizeof+0x58>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%edi
call   1060 <dci_format0_sizeof@plt>
mov    -0x14(%rbp),%ecx
mov    %eax,%edx
mov    $0x1,%al
cmp    %edx,%ecx
mov    %al,-0xd(%rbp)
je     11fa <dci_format1_sizeof+0xaa>
mov    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%edi
call   1070 <dci_format1A_sizeof@plt>
mov    -0x18(%rbp),%ecx
mov    %eax,%edx
mov    $0x1,%al
cmp    %edx,%ecx
mov    %al,-0xd(%rbp)
je     11fa <dci_format1_sizeof+0xaa>
mov    -0x8(%rbp),%edi
call   1040 <is_ambiguous_size@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    120a <dci_format1_sizeof+0xba>
jmp    1218 <dci_format1_sizeof+0xc8>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11a8 <dci_format1_sizeof+0x58>
mov    -0x8(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dci_format1_sizeof>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
cvtsi2ss %edi,%xmm0
movss  %xmm0,0x4(%rsp)
call   1030 <srslte_ra_type0_P@plt>
movss  0x4(%rsp),%xmm1
divss  %xmm0,%xmm1
movaps %xmm1,%xmm0
call   1050 <ceilf@plt>
xor    %ecx,%ecx
cmp    $0xb,%ebx
setge  %cl
lea    (%rcx,%rax,1),%ebp
add    $0xd,%ebp
jmp    1193 <dci_format1_sizeof+0x43>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%ebp
mov    %ebx,%edi
call   1060 <dci_format0_sizeof@plt>
cmp    %eax,%ebp
je     1190 <dci_format1_sizeof+0x40>
mov    %ebx,%edi
call   1070 <dci_format1A_sizeof@plt>
cmp    %eax,%ebp
je     1190 <dci_format1_sizeof+0x40>
mov    %ebp,%edi
call   1040 <is_ambiguous_size@plt>
test   %rax,%rax
jne    1190 <dci_format1_sizeof+0x40>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @dci_format1_sizeof(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sitofp i32 %4 to float
%6 = load i32, i32* %2
%7 = call float @srslte_ra_type0_P(i32 %6)
%8 = fdiv float %5, %7
%9 = call i64 @ceilf(float %8)
%10 = trunc i64 %9 to i32
%11 = add nsw i32 %10, 5
%12 = add nsw i32 %11, 3
%13 = add nsw i32 %12, 1
%14 = add nsw i32 %13, 2
%15 = add nsw i32 %14, 2
store i32 %15, i32* %3
%16 = load i32, i32* %2
%17 = icmp sgt i32 %16, 10
br i1 %17, label %18, label %21
18: ; preds = %1
%19 = load i32, i32* %3
%20 = add nsw i32 %19, 1
store i32 %20, i32* %3
br label %21
21: ; preds = %18, %1
br label %22
22: ; preds = %38, %21
%23 = load i32, i32* %3
%24 = load i32, i32* %2
%25 = call i32 @dci_format0_sizeof(i32 %24)
%26 = icmp eq i32 %23, %25
br i1 %26, label %36, label %27
27: ; preds = %22
%28 = load i32, i32* %3
%29 = load i32, i32* %2
%30 = call i32 @dci_format1A_sizeof(i32 %29)
%31 = icmp eq i32 %28, %30
br i1 %31, label %36, label %32
32: ; preds = %27
%33 = load i32, i32* %3
%34 = call i64 @is_ambiguous_size(i32 %33)
%35 = icmp ne i64 %34, 0
br label %36
36: ; preds = %32, %27, %22
%37 = phi i1 [ true, %27 ], [ true, %22 ], [ %35, %32 ]
br i1 %37, label %38, label %41
38: ; preds = %36
%39 = load i32, i32* %3
%40 = add nsw i32 %39, 1
store i32 %40, i32* %3
br label %22
41: ; preds = %36
%42 = load i32, i32* %3
ret i32 %42
}

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