	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function opaldev_probe
_opaldev_probe:                         ## @opaldev_probe
	.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
	movl	%edi, %r13d
	leaq	L_.str(%rip), %rsi
	callq	_ofw_bus_is_compatible
	movq	_ENXIO@GOTPCREL(%rip), %rbx
	testl	%eax, %eax
	je	LBB0_7
## %bb.1:
	xorl	%eax, %eax
	callq	_opal_check
	testq	%rax, %rax
	jne	LBB0_7
## %bb.2:
	leaq	L_.str.1(%rip), %rsi
	movl	%r13d, %edi
	callq	_device_set_desc
	movl	%r13d, %edi
	callq	_ofw_bus_get_node
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edi
	callq	_OF_hasprop
	movq	_BUS_PROBE_SPECIFIC@GOTPCREL(%rip), %rbx
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	leaq	L_.str.3(%rip), %rdi
	callq	_OF_finddevice
	movl	%eax, %edi
	callq	_OF_xref_from_node
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%r13d, %edi
	callq	_ofw_bus_get_node
	leaq	L_.str.2(%rip), %r12
	movl	%eax, %edi
	movq	%r12, %rsi
	callq	_OF_getproplen
	movl	%eax, %r15d
	movl	%eax, %ebx
	andl	$-4, %ebx
	movq	_M_DEVBUF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_M_WAITOK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %edi
	callq	_malloc
	movq	%rax, %r14
	movl	%r13d, %edi
	callq	_ofw_bus_get_node
	movl	%eax, %edi
	movq	%r12, %rsi
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdx
	movl	%ebx, %ecx
	callq	_OF_getencprop
	cmpl	$4, %r15d
	jl	LBB0_6
## %bb.4:
	shrl	$2, %r15d
	xorl	%ebx, %ebx
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	_SYS_RES_IRQ@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	%r13d, %edi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	$1, %edx
	movq	%r12, %rcx
	callq	_ofw_bus_map_intr
	movl	%r13d, %edi
	movl	%r14d, %esi
	movl	%ebx, %edx
	movl	%eax, %ecx
	movl	$1, %r8d
	callq	_bus_set_resource
	incq	%rbx
	addq	$4, %r12
	cmpq	%rbx, %r15
	jne	LBB0_5
LBB0_6:
	movq	_M_DEVBUF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_free
	movq	_BUS_PROBE_SPECIFIC@GOTPCREL(%rip), %rbx
LBB0_7:
	movl	(%rbx), %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	"ibm,opal-v3"

	.comm	_ENXIO,4,2                      ## @ENXIO
L_.str.1:                               ## @.str.1
	.asciz	"OPAL Abstraction Firmware"

L_.str.2:                               ## @.str.2
	.asciz	"opal-interrupts"

L_.str.3:                               ## @.str.3
	.asciz	"/interrupt-controller@0"

	.comm	_M_DEVBUF,4,2                   ## @M_DEVBUF
	.comm	_M_WAITOK,4,2                   ## @M_WAITOK
	.comm	_SYS_RES_IRQ,4,2                ## @SYS_RES_IRQ
	.comm	_BUS_PROBE_SPECIFIC,4,2         ## @BUS_PROBE_SPECIFIC
	.no_dead_strip	_opaldev_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function opaldev_probe
_opaldev_probe:                         ; @opaldev_probe
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_ofw_bus_is_compatible
	cbz	w0, LBB0_2
; %bb.1:
	bl	_opal_check
	cbz	x0, LBB0_3
LBB0_2:
Lloh2:
	adrp	x8, _ENXIO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
	b	LBB0_9
LBB0_3:
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_device_set_desc
	mov	x0, x19
	bl	_ofw_bus_get_node
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_OF_hasprop
	cbz	x0, LBB0_8
; %bb.4:
Lloh8:
	adrp	x0, l_.str.3@PAGE
Lloh9:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_OF_finddevice
	bl	_OF_xref_from_node
	mov	x20, x0
	mov	x0, x19
	bl	_ofw_bus_get_node
Lloh10:
	adrp	x22, l_.str.2@PAGE
Lloh11:
	add	x22, x22, l_.str.2@PAGEOFF
	mov	x1, x22
	bl	_OF_getproplen
	mov	x23, x0
	and	w24, w0, #0xfffffffc
Lloh12:
	adrp	x25, _M_DEVBUF@GOTPAGE
Lloh13:
	ldr	x25, [x25, _M_DEVBUF@GOTPAGEOFF]
	ldr	w1, [x25]
Lloh14:
	adrp	x8, _M_WAITOK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _M_WAITOK@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	x0, x24
	bl	_malloc
	mov	x21, x0
	mov	x0, x19
	bl	_ofw_bus_get_node
	mov	x1, x22
	mov	x2, x21
	mov	x3, x24
	bl	_OF_getencprop
	cmp	w23, #4
	b.lt	LBB0_7
; %bb.5:
	mov	x22, #0
	lsr	w26, w23, #2
Lloh17:
	adrp	x27, _SYS_RES_IRQ@GOTPAGE
Lloh18:
	ldr	x27, [x27, _SYS_RES_IRQ@GOTPAGEOFF]
	mov	x23, x21
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w24, [x27]
	mov	x0, x19
	mov	x1, x20
	mov	w2, #1
	mov	x3, x23
	bl	_ofw_bus_map_intr
	mov	x3, x0
	mov	x0, x19
	mov	x1, x24
	mov	x2, x22
	mov	w4, #1
	bl	_bus_set_resource
	add	x22, x22, #1
	add	x23, x23, #4
	cmp	x26, x22
	b.ne	LBB0_6
LBB0_7:
	ldr	w1, [x25]
	mov	x0, x21
	bl	_free
LBB0_8:
Lloh19:
	adrp	x8, _BUS_PROBE_SPECIFIC@GOTPAGE
Lloh20:
	ldr	x8, [x8, _BUS_PROBE_SPECIFIC@GOTPAGEOFF]
LBB0_9:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ibm,opal-v3"

	.comm	_ENXIO,4,2                      ; @ENXIO
l_.str.1:                               ; @.str.1
	.asciz	"OPAL Abstraction Firmware"

l_.str.2:                               ; @.str.2
	.asciz	"opal-interrupts"

l_.str.3:                               ; @.str.3
	.asciz	"/interrupt-controller@0"

	.comm	_M_DEVBUF,4,2                   ; @M_DEVBUF
	.comm	_M_WAITOK,4,2                   ; @M_WAITOK
	.comm	_SYS_RES_IRQ,4,2                ; @SYS_RES_IRQ
	.comm	_BUS_PROBE_SPECIFIC,4,2         ; @BUS_PROBE_SPECIFIC
	.no_dead_strip	_opaldev_probe
.subsections_via_symbols
