	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sprd_hwspinlock_probe
_sprd_hwspinlock_probe:                 ## @sprd_hwspinlock_probe
	.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
	cmpl	$0, (%rdi)
	je	LBB0_1
## %bb.3:
	movq	%rdi, %rbx
	movq	_SPRD_HWLOCKS_NUM@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	leal	24(,%rax,8), %esi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r15
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_platform_get_resource
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_devm_ioremap_resource
	movq	%rax, 16(%r15)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	movq	16(%r15), %rdi
	jmp	LBB0_7
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_15:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_devm_clk_get
	movq	%rax, (%r15)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_err
	movq	(%r15), %rdi
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_10:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	(%r15), %rdi
	callq	_clk_prepare_enable
	movq	_HWSPINLOCK_USER_BITS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_HWSPINLOCK_RECCTRL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%r15), %rsi
	callq	_writel
	cmpl	$0, (%r12)
	jle	LBB0_13
## %bb.11:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %r13
	movq	%r12, %r14
	movq	16(%r15), %r12
	movl	%ebx, %edi
	callq	_HWSPINLOCK_TOKEN
	addq	%r12, %rax
	movq	%r14, %r12
	movq	%rax, (%r13,%rbx,8)
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_12
LBB0_13:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_platform_set_drvdata
	movq	%r14, %rdi
	callq	_pm_runtime_enable
	movq	%r15, %rdi
	addq	$8, %rdi
	movl	(%r12), %r8d
	movq	_sprd_hwspinlock_ops@GOTPCREL(%rip), %rdx
	xorl	%ebx, %ebx
	movq	%r14, %rsi
	xorl	%ecx, %ecx
	callq	_hwspin_lock_register
	testl	%eax, %eax
	je	LBB0_15
## %bb.14:
	movl	%eax, %r12d
	movq	%r14, %rdi
	callq	_pm_runtime_disable
	movq	(%r15), %rdi
	callq	_clk_disable_unprepare
	movl	%r12d, %ebx
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_SPRD_HWLOCKS_NUM,4,2           ## @SPRD_HWLOCKS_NUM
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"enable"

L_.str.1:                               ## @.str.1
	.asciz	"get hwspinlock clock failed!\n"

	.comm	_HWSPINLOCK_USER_BITS,4,2       ## @HWSPINLOCK_USER_BITS
	.comm	_HWSPINLOCK_RECCTRL,8,3         ## @HWSPINLOCK_RECCTRL
	.comm	_sprd_hwspinlock_ops,4,2        ## @sprd_hwspinlock_ops
	.no_dead_strip	_sprd_hwspinlock_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sprd_hwspinlock_probe
_sprd_hwspinlock_probe:                 ; @sprd_hwspinlock_probe
	.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
	ldr	w8, [x0]
	cbz	w8, LBB0_4
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x22, _SPRD_HWLOCKS_NUM@GOTPAGE
Lloh1:
	ldr	x22, [x22, _SPRD_HWLOCKS_NUM@GOTPAGEOFF]
	ldr	w8, [x22]
	lsl	w8, w8, #3
	add	w1, w8, #24
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	bl	_devm_kzalloc
	cbz	x0, LBB0_5
; %bb.2:
	mov	x20, x0
Lloh5:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_platform_get_resource
	mov	x1, x0
	mov	x0, x19
	bl	_devm_ioremap_resource
	str	x0, [x20, #16]
	bl	_IS_ERR
	cbz	x0, LBB0_8
; %bb.3:
	ldr	x0, [x20, #16]
	b	LBB0_10
LBB0_4:
Lloh8:
	adrp	x8, _ENODEV@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_7:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_8:
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_devm_clk_get
	str	x0, [x20]
	bl	_IS_ERR
	cbz	x0, LBB0_11
; %bb.9:
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	x0, [x20]
LBB0_10:
	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
	b	_PTR_ERR
LBB0_11:
	ldr	x0, [x20]
	bl	_clk_prepare_enable
Lloh16:
	adrp	x8, _HWSPINLOCK_USER_BITS@GOTPAGE
Lloh17:
	ldr	x8, [x8, _HWSPINLOCK_USER_BITS@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	ldr	x8, [x20, #16]
Lloh19:
	adrp	x9, _HWSPINLOCK_RECCTRL@GOTPAGE
Lloh20:
	ldr	x9, [x9, _HWSPINLOCK_RECCTRL@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.12:
	mov	x21, #0
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldp	x23, x24, [x20, #8]
	mov	x0, x21
	bl	_HWSPINLOCK_TOKEN
	add	x8, x0, x24
	str	x8, [x23, x21, lsl #3]
	add	x21, x21, #1
	ldrsw	x8, [x22]
	cmp	x21, x8
	b.lt	LBB0_13
LBB0_14:
	mov	x0, x19
	mov	x1, x20
	bl	_platform_set_drvdata
	mov	x0, x19
	bl	_pm_runtime_enable
	add	x0, x20, #8
	ldr	w4, [x22]
Lloh22:
	adrp	x2, _sprd_hwspinlock_ops@GOTPAGE
Lloh23:
	ldr	x2, [x2, _sprd_hwspinlock_ops@GOTPAGEOFF]
	mov	x1, x19
	mov	w3, #0
	bl	_hwspin_lock_register
	mov	x21, x0
	cbz	w0, LBB0_7
; %bb.15:
	mov	x0, x19
	bl	_pm_runtime_disable
	ldr	x0, [x20]
	bl	_clk_disable_unprepare
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_SPRD_HWLOCKS_NUM,4,2           ; @SPRD_HWLOCKS_NUM
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"enable"

l_.str.1:                               ; @.str.1
	.asciz	"get hwspinlock clock failed!\n"

	.comm	_HWSPINLOCK_USER_BITS,4,2       ; @HWSPINLOCK_USER_BITS
	.comm	_HWSPINLOCK_RECCTRL,8,3         ; @HWSPINLOCK_RECCTRL
	.comm	_sprd_hwspinlock_ops,4,2        ; @sprd_hwspinlock_ops
	.no_dead_strip	_sprd_hwspinlock_probe
.subsections_via_symbols
