	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function manage_bandwidth
_manage_bandwidth:                      ## @manage_bandwidth
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	%ecx, %r13d
	negl	%r13d
	testl	%r8d, %r8d
	movq	_BANDWIDTH_AVAILABLE_INITIAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %r12d
	movl	%r8d, -64(%rbp)                 ## 4-byte Spill
	cmovel	%r8d, %r12d
	movl	%edx, -72(%rbp)                 ## 4-byte Spill
	movl	%esi, -68(%rbp)                 ## 4-byte Spill
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
	cmovel	%ecx, %r13d
	movl	%r12d, %r14d
	addl	%r13d, %r14d
	js	LBB0_12
## %bb.1:
	cmpl	%eax, %r14d
	jg	LBB0_12
## %bb.2:
	movl	$5, %ebx
	leaq	-56(%rbp), %r15
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r12d, %edi
	callq	_cpu_to_be32
	movl	%eax, -56(%rbp)
	movl	%r14d, %edi
	callq	_cpu_to_be32
	movl	%eax, -52(%rbp)
	movq	_TCODE_LOCK_COMPARE_SWAP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SCODE_100@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_CSR_BANDWIDTH_AVAILABLE@GOTPCREL(%rip), %rax
	movq	(%rax), %r9
	movq	_CSR_REGISTER_BASE@GOTPCREL(%rip), %rax
	addq	(%rax), %r9
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	-68(%rbp), %edx                 ## 4-byte Reload
	movl	-72(%rbp), %ecx                 ## 4-byte Reload
	pushq	$8
	pushq	%r15
	callq	_fw_run_transaction
	addq	$16, %rsp
	cmpl	$129, %eax
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$128, %eax
	je	LBB0_5
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	decl	%ebx
	jne	LBB0_10
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	callq	_be32_to_cpup
	cmpl	%r12d, %eax
	je	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	callq	_be32_to_cpup
	movl	%eax, %r12d
	decl	%ebx
	je	LBB0_13
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	%r12d, %r14d
	addl	%r13d, %r14d
	js	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	_BANDWIDTH_AVAILABLE_INITIAL@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jle	LBB0_3
LBB0_12:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	jmp	LBB0_14
LBB0_13:
	movq	_EIO@GOTPCREL(%rip), %rcx
LBB0_14:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_15:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_17
## %bb.16:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	cmpl	$0, -64(%rbp)                   ## 4-byte Folded Reload
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	cmovnel	%ecx, %eax
	jmp	LBB0_15
LBB0_7:
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	jmp	LBB0_15
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_BANDWIDTH_AVAILABLE_INITIAL,4,2 ## @BANDWIDTH_AVAILABLE_INITIAL
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_TCODE_LOCK_COMPARE_SWAP,4,2    ## @TCODE_LOCK_COMPARE_SWAP
	.comm	_SCODE_100,4,2                  ## @SCODE_100
	.comm	_CSR_REGISTER_BASE,8,3          ## @CSR_REGISTER_BASE
	.comm	_CSR_BANDWIDTH_AVAILABLE,8,3    ## @CSR_BANDWIDTH_AVAILABLE
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_manage_bandwidth
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function manage_bandwidth
_manage_bandwidth:                      ; @manage_bandwidth
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x26, _BANDWIDTH_AVAILABLE_INITIAL@GOTPAGE
Lloh4:
	ldr	x26, [x26, _BANDWIDTH_AVAILABLE_INITIAL@GOTPAGEOFF]
	str	x8, [sp, #24]
	ldr	w8, [x26]
	stp	w4, w3, [sp, #8]                ; 8-byte Folded Spill
	cmp	w4, #0
	csel	w24, wzr, w8, eq
	cneg	w27, w3, ne
	adds	w25, w24, w27
	b.mi	LBB0_10
; %bb.1:
	cmp	w25, w8
	b.gt	LBB0_10
; %bb.2:
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
	mov	w28, #5
Lloh5:
	adrp	x20, _CSR_REGISTER_BASE@GOTPAGE
Lloh6:
	ldr	x20, [x20, _CSR_REGISTER_BASE@GOTPAGEOFF]
Lloh7:
	adrp	x19, _CSR_BANDWIDTH_AVAILABLE@GOTPAGE
Lloh8:
	ldr	x19, [x19, _CSR_BANDWIDTH_AVAILABLE@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x24
	bl	_cpu_to_be32
	str	w0, [sp, #16]
	mov	x0, x25
	bl	_cpu_to_be32
	str	w0, [sp, #20]
Lloh9:
	adrp	x8, _TCODE_LOCK_COMPARE_SWAP@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TCODE_LOCK_COMPARE_SWAP@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x8, _SCODE_100@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SCODE_100@GOTPAGEOFF]
Lloh14:
	ldr	w4, [x8]
	ldr	x8, [x20]
	ldr	x9, [x19]
	add	x5, x9, x8
	add	x6, sp, #16
	mov	x0, x23
	mov	x2, x22
	mov	x3, x21
	mov	w7, #8
	bl	_fw_run_transaction
	cmp	w0, #129
	b.eq	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w0, #128
	b.eq	LBB0_15
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	subs	w28, w28, #1
	b.ne	LBB0_8
	b	LBB0_11
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x0, sp, #16
	bl	_be32_to_cpup
	cmp	w0, w24
	b.eq	LBB0_16
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x0, sp, #16
	bl	_be32_to_cpup
	mov	x24, x0
	subs	w28, w28, #1
	b.eq	LBB0_11
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	adds	w25, w24, w27
	b.mi	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x26]
	cmp	w25, w8
	b.le	LBB0_3
LBB0_10:
Lloh15:
	adrp	x8, _EBUSY@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
Lloh17:
	adrp	x8, _EIO@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_13:
	ldr	x8, [sp, #24]
Lloh19:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh20:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.14:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_15:
Lloh22:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	ldp	w9, w0, [sp, #8]                ; 8-byte Folded Reload
	cmp	w9, #0
	csneg	w0, w0, w8, eq
	b	LBB0_13
LBB0_16:
	ldr	w0, [sp, #12]                   ; 4-byte Folded Reload
	b	LBB0_13
LBB0_17:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_BANDWIDTH_AVAILABLE_INITIAL,4,2 ; @BANDWIDTH_AVAILABLE_INITIAL
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_TCODE_LOCK_COMPARE_SWAP,4,2    ; @TCODE_LOCK_COMPARE_SWAP
	.comm	_SCODE_100,4,2                  ; @SCODE_100
	.comm	_CSR_REGISTER_BASE,8,3          ; @CSR_REGISTER_BASE
	.comm	_CSR_BANDWIDTH_AVAILABLE,8,3    ; @CSR_BANDWIDTH_AVAILABLE
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_manage_bandwidth
.subsections_via_symbols
