	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pnv_php_register_one
_pnv_php_register_one:                  ## @pnv_php_register_one
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rsi
	leaq	-40(%rbp), %rdx
	callq	_of_property_read_u32
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	cmpq	$0, -40(%rbp)
	je	LBB0_2
## %bb.4:
	leaq	L_.str.1(%rip), %rsi
	leaq	-40(%rbp), %rdx
	movq	%r14, %rdi
	callq	_of_property_read_u32
	testl	%eax, %eax
	jne	LBB0_2
## %bb.5:
	cmpq	$0, -40(%rbp)
	je	LBB0_2
## %bb.6:
	movq	%r14, %rdi
	callq	_pnv_php_alloc_slot
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_pnv_php_register_slot
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.9:
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_pnv_php_enable
	testl	%eax, %eax
	je	LBB0_10
## %bb.13:
	movl	%eax, %r12d
	movl	(%r15), %edi
	callq	_pnv_php_unregister_one
	movl	%r12d, %ebx
LBB0_14:
	movq	%r15, %rdi
	callq	_pnv_php_put_slot
	jmp	LBB0_15
LBB0_2:
	movq	_ENXIO@GOTPCREL(%rip), %rax
LBB0_3:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_15:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_10:
	leaq	L_.str.2(%rip), %rsi
	leaq	-40(%rbp), %rdx
	movq	%r14, %rdi
	callq	_of_property_read_u32
	testl	%eax, %eax
	jne	LBB0_15
## %bb.11:
	cmpq	$0, -40(%rbp)
	je	LBB0_15
## %bb.12:
	movq	%r15, %rdi
	callq	_pnv_php_enable_irq
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ibm,slot-pluggable"

	.comm	_ENXIO,4,2                      ## @ENXIO
L_.str.1:                               ## @.str.1
	.asciz	"ibm,reset-by-firmware"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.2:                               ## @.str.2
	.asciz	"ibm,slot-surprise-pluggable"

	.no_dead_strip	_pnv_php_register_one
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pnv_php_register_one
_pnv_php_register_one:                  ; @pnv_php_register_one
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #8
	bl	_of_property_read_u32
	ldr	x8, [sp, #8]
	cmp	w0, #0
	ccmp	x8, #0, #4, eq
	b.eq	LBB0_8
; %bb.1:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x2, sp, #8
	mov	x0, x19
	bl	_of_property_read_u32
	cbnz	w0, LBB0_8
; %bb.2:
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_8
; %bb.3:
	mov	x0, x19
	bl	_pnv_php_alloc_slot
	cbz	x0, LBB0_11
; %bb.4:
	mov	x20, x0
	bl	_pnv_php_register_slot
	mov	x21, x0
	cbnz	w0, LBB0_7
; %bb.5:
	mov	x0, x20
	mov	w1, #0
	bl	_pnv_php_enable
	mov	x21, x0
	cbz	w0, LBB0_12
; %bb.6:
	ldr	w0, [x20]
	bl	_pnv_php_unregister_one
LBB0_7:
	mov	x0, x20
	bl	_pnv_php_put_slot
	b	LBB0_10
LBB0_8:
Lloh4:
	adrp	x8, _ENXIO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_10:
	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
	add	sp, sp, #64
	ret
LBB0_11:
Lloh6:
	adrp	x8, _ENODEV@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_9
LBB0_12:
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	add	x2, sp, #8
	mov	x0, x19
	bl	_of_property_read_u32
	cbnz	w0, LBB0_10
; %bb.13:
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_10
; %bb.14:
	mov	x0, x20
	bl	_pnv_php_enable_irq
	mov	w21, #0
	b	LBB0_10
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ibm,slot-pluggable"

	.comm	_ENXIO,4,2                      ; @ENXIO
l_.str.1:                               ; @.str.1
	.asciz	"ibm,reset-by-firmware"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.2:                               ; @.str.2
	.asciz	"ibm,slot-surprise-pluggable"

	.no_dead_strip	_pnv_php_register_one
.subsections_via_symbols
