	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ofw_finddevice                 ## -- Begin function ofw_finddevice
	.p2align	4, 0x90
_ofw_finddevice:                        ## @ofw_finddevice
	.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
	subq	$48, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movl	%edi, %ebx
	movq	$0, -48(%rbp)
	movq	%rsi, %rdi
	callq	_strlen
	movl	%eax, -24(%rbp)
	movq	%r14, -56(%rbp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, -40(%rbp)
	movq	_OFIOCFINDDEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-56(%rbp), %rdx
	movl	%ebx, %edi
	callq	_ioctl
	cmpl	$-1, %eax
	jne	LBB0_4
## %bb.1:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	movq	_EX_UNAVAILABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_err
	jmp	LBB0_4
LBB0_3:
	movq	_EX_IOERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_err
LBB0_4:
	movq	-48(%rbp), %rax
	addq	$48, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OFIOCFINDDEVICE,4,2            ## @OFIOCFINDDEVICE
	.comm	_errno,8,3                      ## @errno
	.comm	_ENOENT,8,3                     ## @ENOENT
	.comm	_EX_UNAVAILABLE,4,2             ## @EX_UNAVAILABLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Node '%s' not found"

	.comm	_EX_IOERR,4,2                   ## @EX_IOERR
L_.str.1:                               ## @.str.1
	.asciz	"ioctl(..., OFIOCFINDDEVICE, ...) failed"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ofw_finddevice                 ; -- Begin function ofw_finddevice
	.p2align	2
_ofw_finddevice:                        ; @ofw_finddevice
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	mov	x20, x0
	str	xzr, [sp, #16]
	mov	x0, x1
	bl	_strlen
	str	w0, [sp, #40]
	stp	xzr, xzr, [sp, #24]
	str	x19, [sp, #8]
Lloh0:
	adrp	x8, _OFIOCFINDDEVICE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OFIOCFINDDEVICE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x20
	bl	_ioctl
	cmn	w0, #1
	b.ne	LBB0_5
; %bb.1:
Lloh3:
	adrp	x8, _errno@GOTPAGE
Lloh4:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _ENOENT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ENOENT@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
Lloh9:
	adrp	x8, _EX_UNAVAILABLE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EX_UNAVAILABLE@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	str	x19, [sp]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_4
LBB0_3:
Lloh14:
	adrp	x8, _EX_IOERR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EX_IOERR@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_4:
	bl	_err
LBB0_5:
	ldr	x0, [sp, #16]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_OFIOCFINDDEVICE,4,2            ; @OFIOCFINDDEVICE
	.comm	_errno,8,3                      ; @errno
	.comm	_ENOENT,8,3                     ; @ENOENT
	.comm	_EX_UNAVAILABLE,4,2             ; @EX_UNAVAILABLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Node '%s' not found"

	.comm	_EX_IOERR,4,2                   ; @EX_IOERR
l_.str.1:                               ; @.str.1
	.asciz	"ioctl(..., OFIOCFINDDEVICE, ...) failed"

.subsections_via_symbols
