	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cb710_register_slot
_cb710_register_slot:                   ## @cb710_register_slot
	.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
	movq	%rcx, %r13
	movl	%edx, %r12d
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %rbx
	movslq	(%rdi), %r15
	movq	32(%rdi), %r14
	callq	_cb710_chip_dev
	movl	24(%rbx), %ecx
	movl	%r12d, (%rsp)
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	movq	%r13, %rdx
	movl	%r15d, %r8d
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	callq	_dev_dbg
	incl	(%rbx)
	xorl	%eax, %eax
	callq	_smp_wmb
	addl	4(%rbx), %r12d
	leaq	(%r15,%r15,4), %rax
	movl	%r12d, (%r14,%rax,8)
	leaq	(%r14,%rax,8), %r12
	addq	$8, %r12
	movq	%r13, 8(%r14,%rax,8)
	movl	24(%rbx), %ecx
	movl	%ecx, 32(%r14,%rax,8)
	movq	16(%rbx), %rcx
	movq	%rcx, 24(%r14,%rax,8)
	movq	_cb710_release_slot@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 16(%r14,%rax,8)
	movq	%r12, %rdi
	callq	_platform_device_register
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	callq	_platform_device_put
	decl	(%rbx)
	jmp	LBB0_3
LBB0_2:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	orl	%eax, 8(%rbx)
LBB0_3:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"register: %s.%d; slot %d; mask %d; IO offset: 0x%02X\n"

	.comm	_cb710_release_slot,4,2         ## @cb710_release_slot
	.no_dead_strip	_cb710_register_slot
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cb710_register_slot
_cb710_register_slot:                   ; @cb710_register_slot
	.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
	mov	x21, x3
	mov	x22, x2
	mov	x20, x1
	mov	x19, x0
	ldrsw	x23, [x0]
	ldr	x24, [x0, #32]
	bl	_cb710_chip_dev
	ldr	w3, [x19, #24]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	mov	x4, x23
	mov	x5, x20
	mov	x6, x22
	bl	_dev_dbg
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	bl	_smp_wmb
	ldr	w8, [x19, #4]
	add	w8, w8, w22
	mov	w9, #40
	madd	x22, x23, x9, x24
	str	w8, [x22]
	ldr	w8, [x19, #24]
	str	w8, [x22, #32]
	ldr	x8, [x19, #16]
Lloh2:
	adrp	x9, _cb710_release_slot@GOTPAGE
Lloh3:
	ldr	x9, [x9, _cb710_release_slot@GOTPAGEOFF]
	str	x8, [x22, #24]
Lloh4:
	ldr	w8, [x9]
	str	w8, [x22, #16]
	str	x21, [x22, #8]!
	mov	x0, x22
	bl	_platform_device_register
	mov	x21, x0
	cbz	w0, LBB0_2
; %bb.1:
	mov	x0, x22
	bl	_platform_device_put
	ldr	w8, [x19]
	sub	w8, w8, #1
	str	w8, [x19]
	b	LBB0_3
LBB0_2:
	ldr	w8, [x19, #8]
	orr	w8, w8, w20
	str	w8, [x19, #8]
LBB0_3:
	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
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"register: %s.%d; slot %d; mask %d; IO offset: 0x%02X\n"

	.comm	_cb710_release_slot,4,2         ; @cb710_release_slot
	.no_dead_strip	_cb710_register_slot
.subsections_via_symbols
