	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function carl9170_debugfs_erp_write
_carl9170_debugfs_erp_write:            ## @carl9170_debugfs_erp_write
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	testq	%rdx, %rdx
	je	LBB0_1
## %bb.2:
	movq	%rdx, %rbx
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rax
	leaq	-20(%rbp), %rdx
	movq	%rsi, %rdi
	movq	%rax, %rsi
	callq	_sscanf
	cmpl	$1, %eax
	jne	LBB0_1
## %bb.3:
	movl	-20(%rbp), %eax
	movq	_CARL9170_ERP_INVALID@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jle	LBB0_1
## %bb.4:
	movq	___CARL9170_ERP_NUM@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jge	LBB0_1
## %bb.5:
	movl	%eax, (%r14)
	jmp	LBB0_6
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subq	(%rax), %rbx
LBB0_6:
	movq	%rbx, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,8,3                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d"

	.comm	_CARL9170_ERP_INVALID,4,2       ## @CARL9170_ERP_INVALID
	.comm	___CARL9170_ERP_NUM,4,2         ## @__CARL9170_ERP_NUM
	.no_dead_strip	_carl9170_debugfs_erp_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function carl9170_debugfs_erp_write
_carl9170_debugfs_erp_write:            ; @carl9170_debugfs_erp_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cbz	x2, LBB0_3
; %bb.1:
	mov	x19, x2
	mov	x20, x0
Lloh0:
	adrp	x8, l_.str@PAGE
Lloh1:
	add	x8, x8, l_.str@PAGEOFF
	add	x2, sp, #12
	mov	x0, x1
	mov	x1, x8
	bl	_sscanf
	cmp	w0, #1
	b.ne	LBB0_3
; %bb.2:
	ldr	w8, [sp, #12]
Lloh2:
	adrp	x9, _CARL9170_ERP_INVALID@GOTPAGE
Lloh3:
	ldr	x9, [x9, _CARL9170_ERP_INVALID@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
Lloh5:
	adrp	x10, ___CARL9170_ERP_NUM@GOTPAGE
Lloh6:
	ldr	x10, [x10, ___CARL9170_ERP_NUM@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	cmp	w8, w9
	ccmp	w8, w10, #0, gt
	b.lt	LBB0_5
LBB0_3:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	neg	x19, x8
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_5:
	str	w8, [x20]
	b	LBB0_4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,8,3                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d"

	.comm	_CARL9170_ERP_INVALID,4,2       ; @CARL9170_ERP_INVALID
	.comm	___CARL9170_ERP_NUM,4,2         ; @__CARL9170_ERP_NUM
	.no_dead_strip	_carl9170_debugfs_erp_write
.subsections_via_symbols
