	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function store_fan16
_store_fan16:                           ## @store_fan16
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdx, %rbx
	callq	_SETUP_STORE_DATA_PARAM
	leaq	-40(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$10, %esi
	callq	_kstrtol
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subq	(%rax), %r14
	jmp	LBB0_9
LBB0_2:
	movq	-40(%rbp), %rcx
	testq	%rcx, %rcx
	jle	LBB0_3
## %bb.4:
	cmpq	$5400000, %rcx                  ## imm = 0x5265C0
	ja	LBB0_5
## %bb.6:
	movl	$5400000, %eax                  ## imm = 0x5265C0
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %edi
	jmp	LBB0_7
LBB0_3:
	movl	$65535, %eax                    ## imm = 0xFFFF
	jmp	LBB0_8
LBB0_5:
	xorl	%edi, %edi
LBB0_7:
                                        ## kill: def $edi killed $edi killed $rdi
	xorl	%esi, %esi
	movl	$65534, %edx                    ## imm = 0xFFFE
	callq	_clamp_val
	cltq
LBB0_8:
	movq	%rax, -40(%rbp)
	movq	_data@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	addq	$8, %rdi
	callq	_mutex_lock
	movzbl	-39(%rbp), %eax
	movq	(%r12), %rcx
	movq	(%rcx), %rcx
	movq	_param@GOTPCREL(%rip), %r15
	movq	(%r15), %rdx
	movq	(%rdx), %rsi
	movq	(%rsi), %rdi
	movq	%rax, (%rcx,%rdi,8)
	movzbl	-40(%rbp), %eax
	movq	8(%rdx), %rdx
	movq	(%rdx), %rdx
	movq	%rax, (%rcx,%rdx,8)
	movq	_client@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	(%rsi), %rsi
	movq	(%rcx,%rsi,8), %rdx
	callq	_write_byte
	movl	(%rbx), %edi
	movq	(%r15), %rax
	movq	8(%rax), %rax
	movq	(%rax), %rsi
	movq	(%r12), %rax
	movq	(%rax), %rax
	movq	(%rax,%rsi,8), %rdx
	callq	_write_byte
	movq	(%r12), %rdi
	addq	$8, %rdi
	callq	_mutex_unlock
LBB0_9:
	movq	%r14, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,8,3                     ## @EINVAL
	.comm	_data,8,3                       ## @data
	.comm	_param,8,3                      ## @param
	.comm	_client,4,2                     ## @client
	.no_dead_strip	_store_fan16
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function store_fan16
_store_fan16:                           ; @store_fan16
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x3
	mov	x20, x2
	bl	_SETUP_STORE_DATA_PARAM
	add	x2, sp, #8
	mov	x0, x20
	mov	w1, #10
	bl	_kstrtol
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	neg	x19, x8
	b	LBB0_6
LBB0_2:
	ldr	x8, [sp, #8]
	cmp	x8, #1
	b.lt	LBB0_4
; %bb.3:
	mov	w9, #26048
	movk	w9, #82, lsl #16
	udiv	x0, x9, x8
                                        ; kill: def $w0 killed $w0 killed $x0
	mov	w1, #0
	mov	w2, #65534
	bl	_clamp_val
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	b	LBB0_5
LBB0_4:
	mov	w8, #65535
LBB0_5:
	str	x8, [sp, #8]
Lloh3:
	adrp	x20, _data@GOTPAGE
Lloh4:
	ldr	x20, [x20, _data@GOTPAGEOFF]
	ldr	x8, [x20]
	add	x0, x8, #8
	bl	_mutex_lock
	ldrb	w8, [sp, #9]
	ldr	x9, [x20]
	ldr	x9, [x9]
Lloh5:
	adrp	x21, _param@GOTPAGE
Lloh6:
	ldr	x21, [x21, _param@GOTPAGEOFF]
	ldr	x10, [x21]
	ldp	x11, x10, [x10]
	ldr	x12, [x11]
	str	x8, [x9, x12, lsl #3]
	ldrb	w8, [sp, #8]
	ldr	x10, [x10]
	str	x8, [x9, x10, lsl #3]
Lloh7:
	adrp	x22, _client@GOTPAGE
Lloh8:
	ldr	x22, [x22, _client@GOTPAGEOFF]
	ldr	w0, [x22]
	ldr	x1, [x11]
	ldr	x2, [x9, x1, lsl #3]
	bl	_write_byte
	ldr	w0, [x22]
	ldr	x8, [x21]
	ldr	x8, [x8, #8]
	ldr	x1, [x8]
	ldr	x8, [x20]
	ldr	x8, [x8]
	ldr	x2, [x8, x1, lsl #3]
	bl	_write_byte
	ldr	x8, [x20]
	add	x0, x8, #8
	bl	_mutex_unlock
LBB0_6:
	mov	x0, x19
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,8,3                     ; @EINVAL
	.comm	_data,8,3                       ; @data
	.comm	_param,8,3                      ; @param
	.comm	_client,4,2                     ; @client
	.no_dead_strip	_store_fan16
.subsections_via_symbols
