	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sony_pf_add
_sony_pf_add:                           ## @sony_pf_add
	.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	_sony_pf_users@GOTPCREL(%rip), %rsi
	movl	$1, %edi
	callq	_atomic_add_return
	xorl	%ebx, %ebx
	cmpl	$1, %eax
	jg	LBB0_8
## %bb.1:
	movq	_sony_pf_driver@GOTPCREL(%rip), %rdi
	callq	_platform_driver_register
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_7
## %bb.2:
	leaq	L_.str(%rip), %rdi
	movl	$-1, %esi
	callq	_platform_device_alloc
	movq	_sony_pf_device@GOTPCREL(%rip), %r15
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %rdi
	callq	_platform_device_add
	testl	%eax, %eax
	je	LBB0_8
## %bb.5:
	movl	%eax, %r14d
	movq	(%r15), %rdi
	callq	_platform_device_put
	movq	$0, (%r15)
	jmp	LBB0_6
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_6:
	movq	_sony_pf_driver@GOTPCREL(%rip), %rdi
	callq	_platform_driver_unregister
LBB0_7:
	movq	_sony_pf_users@GOTPCREL(%rip), %rdi
	callq	_atomic_dec
	movl	%r14d, %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_sony_pf_users,4,2              ## @sony_pf_users
	.comm	_sony_pf_driver,4,2             ## @sony_pf_driver
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sony-laptop"

	.comm	_sony_pf_device,8,3             ## @sony_pf_device
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_sony_pf_add
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sony_pf_add
_sony_pf_add:                           ; @sony_pf_add
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x1, _sony_pf_users@GOTPAGE
Lloh1:
	ldr	x1, [x1, _sony_pf_users@GOTPAGEOFF]
	mov	w0, #1
	bl	_atomic_add_return
	cmp	w0, #1
	b.le	LBB0_2
; %bb.1:
	mov	w19, #0
	b	LBB0_9
LBB0_2:
Lloh2:
	adrp	x0, _sony_pf_driver@GOTPAGE
Lloh3:
	ldr	x0, [x0, _sony_pf_driver@GOTPAGEOFF]
	bl	_platform_driver_register
	mov	x19, x0
	cbnz	w0, LBB0_8
; %bb.3:
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	mov	w1, #-1
	bl	_platform_device_alloc
Lloh6:
	adrp	x20, _sony_pf_device@GOTPAGE
Lloh7:
	ldr	x20, [x20, _sony_pf_device@GOTPAGEOFF]
	str	x0, [x20]
	cbz	x0, LBB0_6
; %bb.4:
	bl	_platform_device_add
	mov	x19, x0
	cbz	w0, LBB0_9
; %bb.5:
	ldr	x0, [x20]
	bl	_platform_device_put
	str	xzr, [x20]
	b	LBB0_7
LBB0_6:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_7:
Lloh11:
	adrp	x0, _sony_pf_driver@GOTPAGE
Lloh12:
	ldr	x0, [x0, _sony_pf_driver@GOTPAGEOFF]
	bl	_platform_driver_unregister
LBB0_8:
Lloh13:
	adrp	x0, _sony_pf_users@GOTPAGE
Lloh14:
	ldr	x0, [x0, _sony_pf_users@GOTPAGEOFF]
	bl	_atomic_dec
LBB0_9:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_sony_pf_users,4,2              ; @sony_pf_users
	.comm	_sony_pf_driver,4,2             ; @sony_pf_driver
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sony-laptop"

	.comm	_sony_pf_device,8,3             ; @sony_pf_device
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_sony_pf_add
.subsections_via_symbols
