	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cros_ec_spi_devm_high_pri_alloc
_cros_ec_spi_devm_high_pri_alloc:       ## @cros_ec_spi_devm_high_pri_alloc
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	_MAX_RT_PRIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	movl	%ecx, -32(%rbp)
	leaq	L_.str(%rip), %rsi
	xorl	%edi, %edi
	callq	_kthread_create_worker
	movq	%rax, (%r15)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	(%r15), %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
LBB0_2:
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_5
LBB0_4:
	movq	_cros_ec_spi_high_pri_release@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%r15), %rdx
	movq	%r14, %rdi
	callq	_devm_add_action_or_reset
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_6
LBB0_5:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	(%r15), %rax
	movl	(%rax), %edi
	movq	_SCHED_FIFO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-32(%rbp), %rdx
	callq	_sched_setscheduler_nocheck
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_2
LBB0_8:
	xorl	%ebx, %ebx
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_RT_PRIO,4,2                ## @MAX_RT_PRIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cros_ec_spi_high_pri"

L_.str.1:                               ## @.str.1
	.asciz	"Can't create cros_ec high pri worker: %d\n"

	.comm	_cros_ec_spi_high_pri_release,4,2 ## @cros_ec_spi_high_pri_release
	.comm	_SCHED_FIFO,4,2                 ## @SCHED_FIFO
L_.str.2:                               ## @.str.2
	.asciz	"Can't set cros_ec high pri priority: %d\n"

	.no_dead_strip	_cros_ec_spi_devm_high_pri_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cros_ec_spi_devm_high_pri_alloc
_cros_ec_spi_devm_high_pri_alloc:       ; @cros_ec_spi_devm_high_pri_alloc
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _MAX_RT_PRIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_RT_PRIO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w8, w8, #1
	str	w8, [sp, #8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #0
	bl	_kthread_create_worker
	str	x0, [x20]
	bl	_IS_ERR
	cbz	x0, LBB0_3
; %bb.1:
	ldr	x0, [x20]
	bl	_PTR_ERR
	mov	x21, x0
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_2:
	mov	x0, x19
	mov	x2, x21
	bl	_dev_err
	b	LBB0_4
LBB0_3:
Lloh7:
	adrp	x8, _cros_ec_spi_high_pri_release@GOTPAGE
Lloh8:
	ldr	x8, [x8, _cros_ec_spi_high_pri_release@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	ldr	x2, [x20]
	mov	x0, x19
	bl	_devm_add_action_or_reset
	mov	x21, x0
	cbz	w0, LBB0_5
LBB0_4:
	mov	x0, x21
	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
LBB0_5:
	ldr	x8, [x20]
	ldr	w0, [x8]
Lloh10:
	adrp	x8, _SCHED_FIFO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SCHED_FIFO@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_sched_setscheduler_nocheck
	mov	x21, x0
	cbz	w0, LBB0_4
; %bb.6:
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_RT_PRIO,4,2                ; @MAX_RT_PRIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cros_ec_spi_high_pri"

l_.str.1:                               ; @.str.1
	.asciz	"Can't create cros_ec high pri worker: %d\n"

	.comm	_cros_ec_spi_high_pri_release,4,2 ; @cros_ec_spi_high_pri_release
	.comm	_SCHED_FIFO,4,2                 ; @SCHED_FIFO
l_.str.2:                               ; @.str.2
	.asciz	"Can't set cros_ec high pri priority: %d\n"

	.no_dead_strip	_cros_ec_spi_devm_high_pri_alloc
.subsections_via_symbols
