	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _vexpress_register_restart_handler
__vexpress_register_restart_handler:    ## @_vexpress_register_restart_handler
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	_vexpress_restart_device@GOTPCREL(%rip), %rax
	movq	%rdi, (%rax)
	movq	_vexpress_restart_nb_refcnt@GOTPCREL(%rip), %rdi
	callq	_atomic_inc_return
	cmpl	$1, %eax
	jne	LBB0_3
## %bb.1:
	movq	_vexpress_restart_nb@GOTPCREL(%rip), %rdi
	callq	_register_restart_handler
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_dev_err
	movq	_vexpress_restart_nb_refcnt@GOTPCREL(%rip), %rdi
	callq	_atomic_dec
	jmp	LBB0_4
LBB0_3:
	movq	_dev_attr_active@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	callq	_device_create_file
	xorl	%ebx, %ebx
LBB0_4:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_vexpress_restart_device,8,3    ## @vexpress_restart_device
	.comm	_vexpress_restart_nb_refcnt,4,2 ## @vexpress_restart_nb_refcnt
	.comm	_vexpress_restart_nb,4,2        ## @vexpress_restart_nb
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot register restart handler (err=%d)\n"

	.comm	_dev_attr_active,4,2            ## @dev_attr_active
	.no_dead_strip	__vexpress_register_restart_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _vexpress_register_restart_handler
__vexpress_register_restart_handler:    ; @_vexpress_register_restart_handler
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _vexpress_restart_device@GOTPAGE
Lloh1:
	ldr	x8, [x8, _vexpress_restart_device@GOTPAGEOFF]
Lloh2:
	str	x0, [x8]
Lloh3:
	adrp	x0, _vexpress_restart_nb_refcnt@GOTPAGE
Lloh4:
	ldr	x0, [x0, _vexpress_restart_nb_refcnt@GOTPAGEOFF]
	bl	_atomic_inc_return
	cmp	w0, #1
	b.ne	LBB0_3
; %bb.1:
Lloh5:
	adrp	x0, _vexpress_restart_nb@GOTPAGE
Lloh6:
	ldr	x0, [x0, _vexpress_restart_nb@GOTPAGEOFF]
	bl	_register_restart_handler
	cbz	w0, LBB0_3
; %bb.2:
	mov	x20, x0
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_dev_err
Lloh9:
	adrp	x0, _vexpress_restart_nb_refcnt@GOTPAGE
Lloh10:
	ldr	x0, [x0, _vexpress_restart_nb_refcnt@GOTPAGEOFF]
	bl	_atomic_dec
	b	LBB0_4
LBB0_3:
Lloh11:
	adrp	x1, _dev_attr_active@GOTPAGE
Lloh12:
	ldr	x1, [x1, _dev_attr_active@GOTPAGEOFF]
	mov	x0, x19
	bl	_device_create_file
	mov	w20, #0
LBB0_4:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_vexpress_restart_device,8,3    ; @vexpress_restart_device
	.comm	_vexpress_restart_nb_refcnt,4,2 ; @vexpress_restart_nb_refcnt
	.comm	_vexpress_restart_nb,4,2        ; @vexpress_restart_nb
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot register restart handler (err=%d)\n"

	.comm	_dev_attr_active,4,2            ; @dev_attr_active
	.no_dead_strip	__vexpress_register_restart_handler
.subsections_via_symbols
