	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ia_open_abr_vc
_ia_open_abr_vc:                        ## @ia_open_abr_vc
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r13
	movslq	(%rdx), %r12
	testl	%ecx, %ecx
	je	LBB0_6
## %bb.1:
	cmpl	$1, %ecx
	jne	LBB0_7
## %bb.2:
	movq	32(%r13), %rbx
	shlq	$6, %r12
	leaq	(%rbx,%r12), %rdi
                                        ## kill: def $edi killed $edi killed $rdi
	xorl	%esi, %esi
	movl	$64, %edx
	callq	_memset
	movq	_ABR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 56(%rbx,%r12)
	movl	20(%r14), %eax
	movl	$2, %esi
	movl	%eax, %ecx
	shll	%cl, %esi
	movl	%esi, %ecx
	shll	$8, %ecx
	orl	%esi, %ecx
	movl	%ecx, (%rbx,%r12)
	movl	$17, %ecx
	subl	40(%r14), %ecx
	movl	$100000, %edx                   ## imm = 0x186A0
	shrl	%cl, %edx
	cmpl	$17, %ecx
	movl	$1, %ecx
	cmovael	%ecx, %edx
	shll	$12, %eax
	addl	$4096, %eax                     ## imm = 0x1000
	movzwl	%ax, %eax
	movq	_MRM@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
	shll	$8, %edi
	orl	%eax, %edi
	orl	%edx, %edi
	movl	%edi, 4(%rbx,%r12)
	movl	12(%r14), %eax
	cltd
	idivl	%esi
	testl	%eax, %eax
	movzbl	%al, %eax
	cmovel	%ecx, %eax
	movl	%eax, 8(%rbx,%r12)
	movl	(%r14), %edi
	callq	_cellrate_to_float
	movq	%rax, 48(%rbx,%r12)
	movl	8(%r14), %edi
	movl	12(%r14), %ecx
	movl	16(%r14), %esi
	cmpl	%esi, %ecx
	jle	LBB0_4
## %bb.3:
	movl	%ecx, %eax
	cltd
	idivl	%esi
	imull	$1000000, %eax, %esi            ## imm = 0xF4240
	jmp	LBB0_5
LBB0_6:
	movq	%rdx, %r15
	movslq	8(%r13), %rax
	movq	_REASS_TABLE@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	movslq	12(%r13), %rdx
	imulq	%rcx, %rdx
	addq	%rax, %rdx
	movq	_NO_AAL5_PKT@GOTPCREL(%rip), %rax
	movq	_REASS_ABR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, (%rdx,%r12,4)
	movslq	8(%r13), %rax
	movq	_ABR_VC_TABLE@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	movslq	12(%r13), %rbx
	imulq	%rcx, %rbx
	addq	%rax, %rbx
	movslq	(%r15), %r12
	movl	$15, %eax
	subl	32(%r14), %eax
	andl	$15, %eax
	shlq	$4, %r12
	movl	%eax, (%r12,%rbx)
	movb	$15, %cl
	subb	28(%r14), %cl
	movl	(%r14), %eax
	shll	%cl, %eax
	testl	%eax, %eax
	movl	$1, %edi
	cmovnel	%eax, %edi
	callq	_cellrate_to_float
	movq	%rax, 8(%r12,%rbx)
	movq	_VC_ACTIVE@GOTPCREL(%rip), %rax
	movq	_VC_ABR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	24(%r13), %rax
	movslq	(%r15), %rdx
	movq	(%rax,%rdx,8), %rax
	movl	%ecx, (%rax)
	movl	4(%r14), %eax
	addl	%eax, 4(%r13)
	incl	16(%r13)
	jmp	LBB0_7
LBB0_4:
	movl	%esi, %eax
	cltd
	idivl	%ecx
	movl	%eax, %ecx
	movl	$1000000, %eax                  ## imm = 0xF4240
	xorl	%edx, %edx
	idivl	%ecx
	movl	%eax, %esi
LBB0_5:
	callq	_min
	movl	%eax, %edi
	callq	_cellrate_to_float
	movq	%rax, 24(%rbx,%r12)
	imull	$10000, 24(%r14), %eax          ## imm = 0x2710
	leal	8191(%rax), %ecx
	testl	%eax, %eax
	cmovsl	%ecx, %eax
	shrl	$13, %eax
	andl	$4095, %eax                     ## imm = 0xFFF
	cmpl	$16383, %ecx                    ## imm = 0x3FFF
	movl	$1, %ecx
	cmovael	%eax, %ecx
	movl	%ecx, 12(%rbx,%r12)
	movl	4(%r14), %edi
	callq	_cellrate_to_float
	movq	%rax, 40(%rbx,%r12)
	movq	24(%rbx,%r12), %rax
	movq	%rax, 32(%rbx,%r12)
	movl	$66, 16(%rbx,%r12)
LBB0_7:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ABR,4,2                        ## @ABR
	.comm	_MRM,4,2                        ## @MRM
	.comm	_REASS_TABLE,4,2                ## @REASS_TABLE
	.comm	_NO_AAL5_PKT,4,2                ## @NO_AAL5_PKT
	.comm	_REASS_ABR,4,2                  ## @REASS_ABR
	.comm	_ABR_VC_TABLE,4,2               ## @ABR_VC_TABLE
	.comm	_VC_ACTIVE,4,2                  ## @VC_ACTIVE
	.comm	_VC_ABR,4,2                     ## @VC_ABR
	.comm	_INVALID_ADTF,4,2               ## @INVALID_ADTF
	.comm	_INVALID_CDF,4,2                ## @INVALID_CDF
	.comm	_INVALID_FRTT,4,2               ## @INVALID_FRTT
	.comm	_INVALID_ICR,4,2                ## @INVALID_ICR
	.comm	_INVALID_MCR,4,2                ## @INVALID_MCR
	.comm	_INVALID_NRM,4,2                ## @INVALID_NRM
	.comm	_INVALID_PCR,4,2                ## @INVALID_PCR
	.comm	_INVALID_RDF,4,2                ## @INVALID_RDF
	.comm	_INVALID_RIF,4,2                ## @INVALID_RIF
	.comm	_INVALID_TBE,4,2                ## @INVALID_TBE
	.comm	_INVALID_TRM,4,2                ## @INVALID_TRM
	.comm	_MAX_ADTF,4,2                   ## @MAX_ADTF
	.comm	_MAX_CDF,4,2                    ## @MAX_CDF
	.comm	_MAX_FRTT,4,2                   ## @MAX_FRTT
	.comm	_MAX_NRM,4,2                    ## @MAX_NRM
	.comm	_MAX_RDF,4,2                    ## @MAX_RDF
	.comm	_MAX_RIF,4,2                    ## @MAX_RIF
	.comm	_MAX_TBE,4,2                    ## @MAX_TBE
	.comm	_MAX_TRM,4,2                    ## @MAX_TRM
	.comm	_MCR_UNAVAILABLE,4,2            ## @MCR_UNAVAILABLE
	.comm	_MIN_FRTT,4,2                   ## @MIN_FRTT
	.comm	_MIN_TBE,4,2                    ## @MIN_TBE
	.no_dead_strip	_ia_open_abr_vc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ia_open_abr_vc
_ia_open_abr_vc:                        ; @ia_open_abr_vc
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	mov	x20, x0
	ldrsw	x22, [x2]
	cbz	w3, LBB0_4
; %bb.1:
	cmp	w3, #1
	b.ne	LBB0_8
; %bb.2:
	ldr	x21, [x20, #32]
	mov	w23, #16960
	movk	w23, #15, lsl #16
	add	x20, x21, x22, lsl #6
	mov	x0, x20
	mov	w1, #0
	mov	w2, #64
	bl	_memset
Lloh0:
	adrp	x8, _ABR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ABR@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x20, #56]
	ldr	w8, [x19, #20]
	mov	w9, #2
	lsl	w9, w9, w8
	orr	w10, w9, w9, lsl #8
	str	w10, [x20]
	ldr	w10, [x19, #40]
	mov	w11, #17
	sub	w10, w11, w10
	mov	w11, #34464
	movk	w11, #1, lsl #16
	lsr	w11, w11, w10
	cmp	w10, #16
	csinc	w10, w11, wzr, ls
	lsl	w8, w8, #12
	add	w8, w8, #1, lsl #12             ; =4096
Lloh3:
	adrp	x11, _MRM@GOTPAGE
Lloh4:
	ldr	x11, [x11, _MRM@GOTPAGEOFF]
	and	w8, w8, #0xf000
Lloh5:
	ldr	w11, [x11]
	orr	w8, w8, w11, lsl #8
	orr	w8, w8, w10
	ldr	w10, [x19, #12]
	sdiv	w9, w10, w9
	and	w10, w9, #0xff
	cmp	w9, #0
	csinc	w9, w10, wzr, ne
	stp	w8, w9, [x20, #4]
	ldr	w0, [x19]
	bl	_cellrate_to_float
	str	x0, [x20, #48]
	ldp	w0, w8, [x19, #8]
	ldr	w9, [x19, #16]
	cmp	w8, w9
	b.le	LBB0_5
; %bb.3:
	sdiv	w8, w8, w9
	mul	w1, w8, w23
	b	LBB0_6
LBB0_4:
	mov	x21, x2
Lloh6:
	adrp	x8, _REASS_TABLE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _REASS_TABLE@GOTPAGEOFF]
Lloh8:
	ldrsw	x8, [x8]
	ldpsw	x9, x10, [x20, #8]
	madd	x8, x10, x8, x9
Lloh9:
	adrp	x9, _NO_AAL5_PKT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _NO_AAL5_PKT@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
Lloh12:
	adrp	x10, _REASS_ABR@GOTPAGE
Lloh13:
	ldr	x10, [x10, _REASS_ABR@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	orr	w9, w10, w9
	str	w9, [x8, x22, lsl #2]
Lloh15:
	adrp	x8, _ABR_VC_TABLE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ABR_VC_TABLE@GOTPAGEOFF]
Lloh17:
	ldrsw	x8, [x8]
	ldpsw	x9, x10, [x20, #8]
	madd	x8, x10, x8, x9
	ldrsw	x9, [x2]
	mov	w10, #15
	add	x22, x8, x9, lsl #4
	ldp	w9, w8, [x19, #28]
	sub	w8, w10, w8
	and	w8, w8, #0xf
	str	w8, [x22]
	ldr	w8, [x19]
	sub	w9, w10, w9
	lsl	w8, w8, w9
	cmp	w8, #0
	csinc	w0, w8, wzr, ne
	bl	_cellrate_to_float
Lloh18:
	adrp	x8, _VC_ACTIVE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _VC_ACTIVE@GOTPAGEOFF]
	str	x0, [x22, #8]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	adrp	x9, _VC_ABR@GOTPAGE
Lloh22:
	ldr	x9, [x9, _VC_ABR@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	x9, [x20, #24]
	ldrsw	x10, [x21]
	ldr	x9, [x9, x10, lsl #3]
	str	w8, [x9]
	ldr	w8, [x19, #4]
	ldr	w9, [x20, #4]
	add	w8, w9, w8
	str	w8, [x20, #4]
	ldr	w8, [x20, #16]
	add	w8, w8, #1
	b	LBB0_7
LBB0_5:
	sdiv	w8, w9, w8
	sdiv	w1, w23, w8
LBB0_6:
	bl	_min
	bl	_cellrate_to_float
	add	x20, x21, x22, lsl #6
	str	x0, [x20, #24]
	ldr	w8, [x19, #24]
	mov	w9, #10000
	mul	w8, w8, w9
	mov	w9, #8191
	mov	w10, #16383
	add	w9, w8, w9
	cmp	w8, #0
	csel	w8, w9, w8, lt
	ubfx	w8, w8, #13, #12
	cmp	w9, w10
	csinc	w8, w8, wzr, hs
	str	w8, [x20, #12]
	ldr	w0, [x19, #4]
	bl	_cellrate_to_float
	ldr	x8, [x20, #24]
	stp	x8, x0, [x20, #32]
	mov	w8, #66
LBB0_7:
	str	w8, [x20, #16]
LBB0_8:
	mov	w0, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ABR,4,2                        ; @ABR
	.comm	_MRM,4,2                        ; @MRM
	.comm	_REASS_TABLE,4,2                ; @REASS_TABLE
	.comm	_NO_AAL5_PKT,4,2                ; @NO_AAL5_PKT
	.comm	_REASS_ABR,4,2                  ; @REASS_ABR
	.comm	_ABR_VC_TABLE,4,2               ; @ABR_VC_TABLE
	.comm	_VC_ACTIVE,4,2                  ; @VC_ACTIVE
	.comm	_VC_ABR,4,2                     ; @VC_ABR
	.comm	_INVALID_ADTF,4,2               ; @INVALID_ADTF
	.comm	_INVALID_CDF,4,2                ; @INVALID_CDF
	.comm	_INVALID_FRTT,4,2               ; @INVALID_FRTT
	.comm	_INVALID_ICR,4,2                ; @INVALID_ICR
	.comm	_INVALID_MCR,4,2                ; @INVALID_MCR
	.comm	_INVALID_NRM,4,2                ; @INVALID_NRM
	.comm	_INVALID_PCR,4,2                ; @INVALID_PCR
	.comm	_INVALID_RDF,4,2                ; @INVALID_RDF
	.comm	_INVALID_RIF,4,2                ; @INVALID_RIF
	.comm	_INVALID_TBE,4,2                ; @INVALID_TBE
	.comm	_INVALID_TRM,4,2                ; @INVALID_TRM
	.comm	_MAX_ADTF,4,2                   ; @MAX_ADTF
	.comm	_MAX_CDF,4,2                    ; @MAX_CDF
	.comm	_MAX_FRTT,4,2                   ; @MAX_FRTT
	.comm	_MAX_NRM,4,2                    ; @MAX_NRM
	.comm	_MAX_RDF,4,2                    ; @MAX_RDF
	.comm	_MAX_RIF,4,2                    ; @MAX_RIF
	.comm	_MAX_TBE,4,2                    ; @MAX_TBE
	.comm	_MAX_TRM,4,2                    ; @MAX_TRM
	.comm	_MCR_UNAVAILABLE,4,2            ; @MCR_UNAVAILABLE
	.comm	_MIN_FRTT,4,2                   ; @MIN_FRTT
	.comm	_MIN_TBE,4,2                    ; @MIN_TBE
	.no_dead_strip	_ia_open_abr_vc
.subsections_via_symbols
