	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipu_smfc_set_watermark         ## -- Begin function ipu_smfc_set_watermark
	.p2align	4, 0x90
_ipu_smfc_set_watermark:                ## @ipu_smfc_set_watermark
	.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
	movl	%edx, %ebx
	movl	%esi, %r15d
	movq	%rdi, %r12
	movq	8(%rdi), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movl	(%r12), %eax
	leal	(%rax,%rax,2), %ecx
	addl	%ecx, %ecx
	xorl	%edx, %edx
	cmpl	$2, %eax
	setge	%dl
	leal	(%rcx,%rdx,4), %r12d
	movq	_SMFC_WMC@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	addq	8(%r14), %rdi
	callq	_readl
	movl	$63, %edx
	movl	%r12d, %ecx
	shll	%cl, %edx
	notl	%edx
	andl	%eax, %edx
	shll	$3, %ebx
	orl	%r15d, %ebx
	shll	%cl, %ebx
	orl	%edx, %ebx
	movq	(%r13), %rsi
	addq	8(%r14), %rsi
	movl	%ebx, %edi
	callq	_writel
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SMFC_WMC,8,3                   ## @SMFC_WMC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipu_smfc_set_watermark         ; -- Begin function ipu_smfc_set_watermark
	.p2align	2
_ipu_smfc_set_watermark:                ; @ipu_smfc_set_watermark
	.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, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x22, [x0, #8]
	mov	x0, x22
	bl	_spin_lock_irqsave
	ldr	w8, [x21]
	cmp	w8, #1
	cset	w9, gt
	mov	w10, #6
	mul	w8, w8, w10
	add	w21, w8, w9, lsl #2
	ldr	x8, [x22, #8]
Lloh0:
	adrp	x23, _SMFC_WMC@GOTPAGE
Lloh1:
	ldr	x23, [x23, _SMFC_WMC@GOTPAGEOFF]
	ldr	x9, [x23]
	add	x0, x9, x8
	bl	_readl
	mov	w8, #63
	lsl	w8, w8, w21
	bic	w8, w0, w8
	orr	w9, w20, w19, lsl #3
	lsl	w9, w9, w21
	orr	w0, w8, w9
	ldr	x8, [x22, #8]
	ldr	x9, [x23]
	add	x1, x9, x8
	bl	_writel
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	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 AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_SMFC_WMC,8,3                   ; @SMFC_WMC
.subsections_via_symbols
