	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function igc_update_ring_itr
_igc_update_ring_itr:                   ## @igc_update_ring_itr
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	32(%rdi), %r14
	movl	(%r14), %eax
	andl	$-2, %eax
	cmpl	$128, %eax
	jne	LBB0_2
## %bb.1:
	movq	_IGC_4K_ITR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	jmp	LBB0_16
LBB0_2:
	movl	16(%rbx), %ecx
	testl	%ecx, %ecx
	je	LBB0_3
## %bb.4:
	movl	20(%rbx), %eax
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %esi
	jmp	LBB0_5
LBB0_3:
	xorl	%esi, %esi
LBB0_5:
	movl	8(%rbx), %ecx
	testl	%ecx, %ecx
	je	LBB0_7
## %bb.6:
	movq	_u32@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	12(%rbx), %eax
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %edx
	callq	_max_t
	movl	%eax, %esi
LBB0_7:
	testl	%esi, %esi
	je	LBB0_18
## %bb.8:
	addl	$24, %esi
	movl	%esi, %edi
	movl	$3000, %esi                     ## imm = 0xBB8
	callq	_min
                                        ## kill: def $eax killed $eax def $rax
	leal	-301(%rax), %ecx
	cmpl	$898, %ecx                      ## imm = 0x382
	ja	LBB0_10
## %bb.9:
	movzwl	%ax, %eax
	imull	$43691, %eax, %ecx              ## imm = 0xAAAB
	shrl	$17, %ecx
	jmp	LBB0_11
LBB0_10:
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
LBB0_11:
	movq	_IGC_20K_ITR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %ecx
	jge	LBB0_16
## %bb.12:
	cmpq	$0, 24(%rbx)
	je	LBB0_14
## %bb.13:
	cmpl	$3, 4(%r14)
	jne	LBB0_16
LBB0_15:
	movl	%eax, %ecx
LBB0_16:
	cmpl	(%rbx), %ecx
	je	LBB0_18
## %bb.17:
	movl	%ecx, (%rbx)
	movl	$1, 4(%rbx)
LBB0_18:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%rbx)
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_14:
	cmpl	$3, 8(%r14)
	je	LBB0_15
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_IGC_4K_ITR,4,2                 ## @IGC_4K_ITR
	.comm	_u32,4,2                        ## @u32
	.comm	_IGC_20K_ITR,4,2                ## @IGC_20K_ITR
	.no_dead_strip	_igc_update_ring_itr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function igc_update_ring_itr
_igc_update_ring_itr:                   ; @igc_update_ring_itr
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x20, [x0, #32]
	ldr	w8, [x20]
	and	w8, w8, #0xfffffffe
	cmp	w8, #128
	b.ne	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _IGC_4K_ITR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IGC_4K_ITR@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	b	LBB0_10
LBB0_2:
	ldr	w8, [x19, #16]
	cbz	w8, LBB0_13
; %bb.3:
	ldr	w9, [x19, #20]
	udiv	w1, w9, w8
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_5
LBB0_4:
Lloh3:
	adrp	x9, _u32@GOTPAGE
Lloh4:
	ldr	x9, [x9, _u32@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x9]
	ldr	w9, [x19, #12]
	udiv	w2, w9, w8
	bl	_max_t
	mov	x1, x0
LBB0_5:
	cbz	w1, LBB0_12
; %bb.6:
	add	w0, w1, #24
	mov	w1, #3000
	bl	_min
	sub	w8, w0, #301
	cmp	w0, #0
	cinc	w9, w0, lt
	asr	w9, w9, #1
	and	w10, w0, #0xffff
	mov	w11, #43691
	mul	w10, w10, w11
	lsr	w10, w10, #17
	cmp	w8, #898
	csel	w8, w9, w10, hi
Lloh6:
	adrp	x9, _IGC_20K_ITR@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IGC_20K_ITR@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ge	LBB0_10
; %bb.7:
	ldr	x10, [x19, #24]
	cbz	x10, LBB0_14
; %bb.8:
	ldr	w10, [x20, #4]
	cmp	w10, #3
	b.ne	LBB0_10
LBB0_9:
	mov	x8, x9
LBB0_10:
	ldr	w9, [x19]
	cmp	w8, w9
	b.eq	LBB0_12
; %bb.11:
	mov	w9, #1
	stp	w8, w9, [x19]
LBB0_12:
	stp	xzr, xzr, [x19, #8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_13:
	mov	w1, #0
	ldr	w8, [x19, #8]
	cbnz	w8, LBB0_4
	b	LBB0_5
LBB0_14:
	ldr	w10, [x20, #8]
	cmp	w10, #3
	b.eq	LBB0_9
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_IGC_4K_ITR,4,2                 ; @IGC_4K_ITR
	.comm	_u32,4,2                        ; @u32
	.comm	_IGC_20K_ITR,4,2                ; @IGC_20K_ITR
	.no_dead_strip	_igc_update_ring_itr
.subsections_via_symbols
