	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_devinfo_init                   ## -- Begin function devinfo_init
	.p2align	4, 0x90
_devinfo_init:                          ## @devinfo_init
	.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
	movq	_devinfo_initted@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jne	LBB0_2
## %bb.1:
	movq	_devinfo_dev@GOTPCREL(%rip), %rdi
	callq	_TAILQ_INIT
	movq	_devinfo_rman@GOTPCREL(%rip), %rdi
	callq	_TAILQ_INIT
	movq	_devinfo_res@GOTPCREL(%rip), %rdi
	callq	_TAILQ_INIT
LBB0_2:
	leaq	-64(%rbp), %r13
	movq	_devinfo_generation@GOTPCREL(%rip), %r12
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_debug
	movq	$16, -64(%rbp)
	leaq	L_.str.1(%rip), %rdi
	leaq	-56(%rbp), %rsi
	movq	%r13, %rdx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_sysctlbyname
	testq	%rax, %rax
	jne	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	$16, -64(%rbp)
	movq	-56(%rbp), %rsi
	movq	_BUS_USER_VERSION@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	%rdx, %rsi
	jne	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	-48(%rbp), %esi
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_debug
	movslq	-48(%rbp), %rax
	cmpq	%rax, (%r12)
	je	LBB0_16
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	xorl	%eax, %eax
	callq	_devinfo_free
	movq	_devinfo_initted@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	movq	$0, (%r12)
	movslq	-48(%rbp), %rdi
	callq	_devinfo_init_devices
	testl	%eax, %eax
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	movslq	-48(%rbp), %rdi
	callq	_devinfo_init_resources
	testl	%eax, %eax
	je	LBB0_17
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %r14d
	xorl	%eax, %eax
	callq	_devinfo_free
	movq	_EINVAL@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jne	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=1
	incl	%ebx
	cmpl	$10, %ebx
	jne	LBB0_3
## %bb.14:
	movl	$10, %ebx
LBB0_15:
	leaq	L_.str.5(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_debug
	movq	_errno@GOTPCREL(%rip), %rax
	movl	%r14d, (%rax)
	movl	$1, %r15d
	jmp	LBB0_16
LBB0_4:
	leaq	L_.str.2(%rip), %rdi
	callq	_warn
	jmp	LBB0_5
LBB0_8:
	leaq	L_.str.3(%rip), %rdi
	callq	_warnx
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_16:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movq	_devinfo_initted@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	movslq	-48(%rbp), %rax
	movq	%rax, (%r12)
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_devinfo_initted,4,2            ## @devinfo_initted
	.comm	_devinfo_dev,4,2                ## @devinfo_dev
	.comm	_devinfo_rman,4,2               ## @devinfo_rman
	.comm	_devinfo_res,4,2                ## @devinfo_res
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"get interface version"

L_.str.1:                               ## @.str.1
	.asciz	"hw.bus.info"

L_.str.2:                               ## @.str.2
	.asciz	"sysctlbyname(\"hw.bus.info\", ...) failed"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_BUS_USER_VERSION,8,3           ## @BUS_USER_VERSION
L_.str.3:                               ## @.str.3
	.asciz	"kernel bus interface version mismatch: kernel %d expected %d"

L_.str.4:                               ## @.str.4
	.asciz	"generation count is %d"

	.comm	_devinfo_generation,8,3         ## @devinfo_generation
L_.str.5:                               ## @.str.5
	.asciz	"scan failed after %d retries"

	.comm	_errno,4,2                      ## @errno
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_devinfo_init                   ; -- Begin function devinfo_init
	.p2align	2
_devinfo_init:                          ; @devinfo_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
Lloh0:
	adrp	x23, _devinfo_initted@GOTPAGE
Lloh1:
	ldr	x23, [x23, _devinfo_initted@GOTPAGEOFF]
	ldr	w8, [x23]
	cbnz	w8, LBB0_2
; %bb.1:
Lloh2:
	adrp	x0, _devinfo_dev@GOTPAGE
Lloh3:
	ldr	x0, [x0, _devinfo_dev@GOTPAGEOFF]
	bl	_TAILQ_INIT
Lloh4:
	adrp	x0, _devinfo_rman@GOTPAGE
Lloh5:
	ldr	x0, [x0, _devinfo_rman@GOTPAGEOFF]
	bl	_TAILQ_INIT
Lloh6:
	adrp	x0, _devinfo_res@GOTPAGE
Lloh7:
	ldr	x0, [x0, _devinfo_res@GOTPAGEOFF]
	bl	_TAILQ_INIT
LBB0_2:
	mov	w24, #0
Lloh8:
	adrp	x19, l_.str@PAGE
Lloh9:
	add	x19, x19, l_.str@PAGEOFF
	mov	w26, #16
Lloh10:
	adrp	x20, l_.str.1@PAGE
Lloh11:
	add	x20, x20, l_.str.1@PAGEOFF
Lloh12:
	adrp	x28, _BUS_USER_VERSION@GOTPAGE
Lloh13:
	ldr	x28, [x28, _BUS_USER_VERSION@GOTPAGEOFF]
Lloh14:
	adrp	x27, _devinfo_generation@GOTPAGE
Lloh15:
	ldr	x27, [x27, _devinfo_generation@GOTPAGEOFF]
Lloh16:
	adrp	x25, _EINVAL@GOTPAGE
Lloh17:
	ldr	x25, [x25, _EINVAL@GOTPAGEOFF]
Lloh18:
	adrp	x21, l_.str.4@PAGE
Lloh19:
	add	x21, x21, l_.str.4@PAGEOFF
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_debug
	str	x26, [sp, #8]
	add	x1, sp, #16
	add	x2, sp, #8
	mov	x0, x20
	mov	x3, #0
	mov	w4, #0
	bl	_sysctlbyname
	cbnz	x0, LBB0_12
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldp	x8, x1, [sp, #8]
	ldr	x2, [x28]
	cmp	x8, #16
	ccmp	x1, x2, #0, eq
	b.ne	LBB0_13
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [sp, #24]
	str	x8, [sp]
	mov	x0, x21
	bl	_debug
	ldrsw	x8, [sp, #24]
	ldr	x9, [x27]
	cmp	x9, x8
	b.eq	LBB0_14
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	bl	_devinfo_free
	str	wzr, [x23]
	str	xzr, [x27]
	ldrsw	x0, [sp, #24]
	bl	_devinfo_init_devices
	cbnz	w0, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	ldrsw	x0, [sp, #24]
	bl	_devinfo_init_resources
	cbz	w0, LBB0_15
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x22, x0
	bl	_devinfo_free
	ldr	w8, [x25]
	cmp	w22, w8
	b.ne	LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w24, w24, #1
	cmp	w24, #10
	b.ne	LBB0_3
; %bb.10:
	mov	w24, #10
LBB0_11:
	str	x24, [sp]
Lloh20:
	adrp	x0, l_.str.5@PAGE
Lloh21:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_debug
Lloh22:
	adrp	x8, _errno@GOTPAGE
Lloh23:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh24:
	str	w22, [x8]
	mov	w0, #1
	b	LBB0_16
LBB0_12:
Lloh25:
	adrp	x0, l_.str.2@PAGE
Lloh26:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_warn
	ldr	w0, [x25]
	b	LBB0_16
LBB0_13:
Lloh27:
	adrp	x0, l_.str.3@PAGE
Lloh28:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_warnx
	ldr	w0, [x25]
	b	LBB0_16
LBB0_14:
	mov	w0, #0
	b	LBB0_16
LBB0_15:
	mov	w8, #1
	str	w8, [x23]
	ldrsw	x8, [sp, #24]
	str	x8, [x27]
LBB0_16:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotStr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_devinfo_initted,4,2            ; @devinfo_initted
	.comm	_devinfo_dev,4,2                ; @devinfo_dev
	.comm	_devinfo_rman,4,2               ; @devinfo_rman
	.comm	_devinfo_res,4,2                ; @devinfo_res
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"get interface version"

l_.str.1:                               ; @.str.1
	.asciz	"hw.bus.info"

l_.str.2:                               ; @.str.2
	.asciz	"sysctlbyname(\"hw.bus.info\", ...) failed"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_BUS_USER_VERSION,8,3           ; @BUS_USER_VERSION
l_.str.3:                               ; @.str.3
	.asciz	"kernel bus interface version mismatch: kernel %d expected %d"

l_.str.4:                               ; @.str.4
	.asciz	"generation count is %d"

	.comm	_devinfo_generation,8,3         ; @devinfo_generation
l_.str.5:                               ; @.str.5
	.asciz	"scan failed after %d retries"

	.comm	_errno,4,2                      ; @errno
.subsections_via_symbols
