	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hwspin_lock_register           ## -- Begin function hwspin_lock_register
	.p2align	4, 0x90
_hwspin_lock_register:                  ## @hwspin_lock_register
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $ecx killed $ecx def $rcx
	testq	%rsi, %rsi
	je	LBB0_6
## %bb.1:
	movq	%rdi, %r15
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.2:
	testq	%rdx, %rdx
	je	LBB0_6
## %bb.3:
	testl	%r8d, %r8d
	je	LBB0_6
## %bb.4:
	cmpl	$0, 4(%rdx)
	je	LBB0_6
## %bb.5:
	cmpl	$0, (%rdx)
	je	LBB0_6
## %bb.7:
	movq	%rsi, 24(%r15)
	movq	%rdx, 16(%r15)
	movl	%ecx, (%r15)
	movl	%r8d, 4(%r15)
	testl	%r8d, %r8d
	jle	LBB0_14
## %bb.8:
	movl	%r8d, %eax
	shlq	$4, %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	$-1, %ebx
	xorl	%r14d, %r14d
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movl	%ecx, %r13d
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %r12
	movq	8(%r15), %r15
	leaq	(%r15,%r14), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	leaq	(%r15,%r14), %rdi
	addq	$8, %rdi
	callq	_spin_lock_init
	movq	%r12, (%r15,%r14)
	movq	%r12, %r15
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%r13d, %esi
	callq	_hwspin_lock_register_single
	testl	%eax, %eax
	jne	LBB0_10
## %bb.13:                              ##   in Loop: Header=BB0_9 Depth=1
	decl	%ebx
	incl	%r13d
	addq	$16, %r14
	cmpq	%r14, -56(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_9
LBB0_14:
	xorl	%r12d, %r12d
	jmp	LBB0_15
LBB0_6:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_15:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movl	%eax, %r12d
	cmpl	$-1, %ebx
	je	LBB0_15
## %bb.11:
	negl	%ebx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	leal	(%r14,%rbx), %edi
	addl	$-2, %edi
	callq	_hwspin_lock_unregister_single
	decl	%ebx
	cmpl	$1, %ebx
	jg	LBB0_12
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid parameters\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hwspin_lock_register           ; -- Begin function hwspin_lock_register
	.p2align	2
_hwspin_lock_register:                  ; @hwspin_lock_register
	.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
	cbz	x1, LBB0_11
; %bb.1:
	mov	x20, x0
	cbz	x0, LBB0_11
; %bb.2:
	cbz	x2, LBB0_11
; %bb.3:
	cbz	w4, LBB0_11
; %bb.4:
	ldr	w8, [x2, #4]
	cbz	w8, LBB0_11
; %bb.5:
	ldr	w8, [x2]
	cbz	w8, LBB0_11
; %bb.6:
	mov	x19, x3
	stp	x2, x1, [x20, #16]
	stp	w3, w4, [x20]
	cmp	w4, #1
	b.lt	LBB0_10
; %bb.7:
	mov	x23, #0
	mov	w22, #0
	mov	w8, w4
	lsl	x24, x8, #4
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	add	x21, x8, x23
	add	x0, x21, #8
	bl	_spin_lock_init
	str	x20, [x21]
	add	w1, w19, w22
	mov	x0, x21
	bl	_hwspin_lock_register_single
	cbnz	w0, LBB0_13
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	add	w22, w22, #1
	add	x23, x23, #16
	cmp	x24, x23
	b.ne	LBB0_8
LBB0_10:
	mov	w21, #0
	b	LBB0_12
LBB0_11:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_12:
	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_13:
	mov	x21, x0
	cbz	w22, LBB0_12
; %bb.14:
	add	w20, w22, #1
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	add	w8, w19, w20
	sub	w0, w8, #2
	bl	_hwspin_lock_unregister_single
	sub	w20, w20, #1
	cmp	w20, #1
	b.gt	LBB0_15
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid parameters\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
