	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function orm_identify
_orm_identify:                          ## @orm_identify
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_IOMEM_START@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	leaq	L_.str(%rip), %rdi
	xorl	%esi, %esi
	callq	_resource_disabled
	testq	%rax, %rax
	jne	LBB0_20
## %bb.1:
	movq	_ISA_ORDER_SENSITIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movl	%ebx, -84(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edi
	movl	$-1, %ecx
	callq	_BUS_ADD_CHILD
	movl	%eax, %r12d
	movl	%eax, %edi
	movq	%r14, %rsi
	callq	_device_set_driver
	movq	_ORM_ID@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	%r12d, %edi
	callq	_isa_set_logicalid
	movl	(%rbx), %esi
	movl	%r12d, %edi
	callq	_isa_set_vendorid
	movl	%r12d, %edi
	callq	_device_get_softc
	movq	%rax, %rbx
	movl	$0, (%rax)
	movq	_MAX_ROMS@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_16
## %bb.2:
	movq	_IOMEM_END@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	jge	LBB0_16
## %bb.3:
	xorl	%edx, %edx
	movq	_SYS_RES_MEMORY@GOTPCREL(%rip), %r15
	movl	%r12d, -68(%rbp)                ## 4-byte Spill
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %esi
	movq	_IOMEM_STEP@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	movl	%r12d, %edi
	movq	%r13, %rcx
	callq	_bus_set_resource
	movl	(%rbx), %eax
	movl	%eax, -64(%rbp)
	movl	(%r15), %esi
	movq	_RF_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r12d, %edi
	leaq	-64(%rbp), %rdx
	callq	_bus_alloc_resource_any
	movq	%rbx, %rdi
	testq	%rax, %rax
	je	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_rman_get_bustag
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_rman_get_bushandle
	movl	%r14d, %edi
	movl	%eax, %esi
	xorl	%edx, %edx
	leaq	-60(%rbp), %rcx
	movl	$12, %r8d
	callq	_bus_space_read_region_1
	movl	(%r15), %esi
	movl	-64(%rbp), %edx
	movl	%r12d, %edi
	movq	%rbx, %rcx
	callq	_bus_release_resource
	movl	(%r15), %esi
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edx
	movl	%r12d, %edi
	callq	_bus_delete_resource
	cmpl	$85, -60(%rbp)
	jne	LBB0_6
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$170, -56(%rbp)
	jne	LBB0_6
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	-52(%rbp), %eax
	testb	$3, %al
	jne	LBB0_6
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	shll	$9, %eax
	movslq	%eax, %r14
	movl	(%r15), %esi
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %edx
	movl	-68(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %edi
	movq	%r13, %rcx
	movq	%r14, %r8
	callq	_bus_set_resource
	movl	(%rbx), %eax
	movl	%eax, -64(%rbp)
	movl	(%r15), %esi
	movl	%r12d, %edi
	leaq	-64(%rbp), %rdx
	xorl	%ecx, %ecx
	callq	_bus_alloc_resource_any
	movq	%rbx, %rdi
	testq	%rax, %rax
	je	LBB0_5
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	-64(%rbp), %ecx
	movq	8(%rdi), %rdx
	movslq	(%rdi), %rsi
	movl	%ecx, (%rdx,%rsi,4)
	movq	16(%rdi), %rcx
	movslq	(%rdi), %rdx
	movq	%rax, (%rcx,%rdx,8)
	incl	%edx
	movl	%edx, (%rdi)
	movq	%rdi, %rbx
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	(%r15), %esi
	movl	(%rdi), %edx
	movl	%r12d, %edi
	callq	_bus_delete_resource
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	_IOMEM_STEP@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %edx
	movl	-68(%rbp), %r12d                ## 4-byte Reload
LBB0_12:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	_MAX_ROMS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jge	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_4 Depth=1
	addq	%r14, %r13
	movq	_IOMEM_END@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	jl	LBB0_4
LBB0_14:
	cmpl	$1, %edx
	je	LBB0_17
## %bb.15:
	testl	%edx, %edx
	jne	LBB0_18
LBB0_16:
	movl	-84(%rbp), %edi                 ## 4-byte Reload
	movl	%r12d, %esi
	callq	_device_delete_child
	jmp	LBB0_20
LBB0_17:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_19
LBB0_18:
	leaq	L_.str.2(%rip), %rsi
LBB0_19:
	movl	%r12d, %edi
	callq	_device_set_desc
LBB0_20:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_22
## %bb.21:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_IOMEM_START,8,3                ## @IOMEM_START
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"orm"

	.comm	_ISA_ORDER_SENSITIVE,4,2        ## @ISA_ORDER_SENSITIVE
	.comm	_ORM_ID,4,2                     ## @ORM_ID
	.comm	_MAX_ROMS,4,2                   ## @MAX_ROMS
	.comm	_IOMEM_END,8,3                  ## @IOMEM_END
	.comm	_SYS_RES_MEMORY,4,2             ## @SYS_RES_MEMORY
	.comm	_IOMEM_STEP,8,3                 ## @IOMEM_STEP
	.comm	_RF_ACTIVE,4,2                  ## @RF_ACTIVE
L_.str.1:                               ## @.str.1
	.asciz	"ISA Option ROM"

L_.str.2:                               ## @.str.2
	.asciz	"ISA Option ROMs"

	.no_dead_strip	_orm_identify
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function orm_identify
_orm_identify:                          ; @orm_identify
	.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
	mov	x23, x1
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
Lloh3:
	adrp	x8, _IOMEM_START@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IOMEM_START@GOTPAGEOFF]
Lloh5:
	ldr	x20, [x8]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	w1, #0
	bl	_resource_disabled
	cbnz	x0, LBB0_19
; %bb.1:
Lloh8:
	adrp	x8, _ISA_ORDER_SENSITIVE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ISA_ORDER_SENSITIVE@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x2, l_.str@PAGE
Lloh12:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x23
	mov	w3, #-1
	bl	_BUS_ADD_CHILD
	mov	x21, x0
	mov	x1, x22
	bl	_device_set_driver
Lloh13:
	adrp	x19, _ORM_ID@GOTPAGE
Lloh14:
	ldr	x19, [x19, _ORM_ID@GOTPAGEOFF]
	ldr	w1, [x19]
	mov	x0, x21
	bl	_isa_set_logicalid
	ldr	w1, [x19]
	mov	x0, x21
	bl	_isa_set_vendorid
	mov	x0, x21
	bl	_device_get_softc
	str	wzr, [x0]
Lloh15:
	adrp	x25, _MAX_ROMS@GOTPAGE
Lloh16:
	ldr	x25, [x25, _MAX_ROMS@GOTPAGEOFF]
	ldr	w8, [x25]
Lloh17:
	adrp	x26, _IOMEM_END@GOTPAGE
Lloh18:
	ldr	x26, [x26, _IOMEM_END@GOTPAGEOFF]
	ldr	x9, [x26]
	cmp	w8, #1
	ccmp	x20, x9, #0, ge
	b.ge	LBB0_15
; %bb.2:
	mov	x22, x0
	str	w23, [sp, #4]                   ; 4-byte Folded Spill
	mov	w2, #0
Lloh19:
	adrp	x27, _SYS_RES_MEMORY@GOTPAGE
Lloh20:
	ldr	x27, [x27, _SYS_RES_MEMORY@GOTPAGEOFF]
Lloh21:
	adrp	x28, _IOMEM_STEP@GOTPAGE
Lloh22:
	ldr	x28, [x28, _IOMEM_STEP@GOTPAGEOFF]
Lloh23:
	adrp	x19, _RF_ACTIVE@GOTPAGE
Lloh24:
	ldr	x19, [x19, _RF_ACTIVE@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x27]
	ldr	x4, [x28]
	mov	x0, x21
	mov	x3, x20
	bl	_bus_set_resource
	ldr	w8, [x22]
	str	w8, [sp, #8]
	ldr	w1, [x27]
	ldr	w3, [x19]
	add	x2, sp, #8
	mov	x0, x21
	bl	_bus_alloc_resource_any
	cbz	x0, LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x23, x0
	bl	_rman_get_bustag
	mov	x24, x0
	mov	x0, x23
	bl	_rman_get_bushandle
	mov	x1, x0
	add	x3, sp, #12
	mov	x0, x24
	mov	w2, #0
	mov	w4, #12
	bl	_bus_space_read_region_1
	ldr	w1, [x27]
	ldr	w2, [sp, #8]
	mov	x0, x21
	mov	x3, x23
	bl	_bus_release_resource
	ldr	w1, [x27]
	ldr	w2, [x22]
	mov	x0, x21
	bl	_bus_delete_resource
	ldr	w8, [sp, #12]
	cmp	w8, #85
	b.ne	LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [sp, #16]
	cmp	w8, #170
	b.ne	LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [sp, #20]
	tst	w8, #0x3
	b.ne	LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	lsl	w8, w8, #9
	sxtw	x23, w8
	ldr	w1, [x27]
	ldr	w2, [x22]
	mov	x0, x21
	mov	x3, x20
	mov	x4, x23
	bl	_bus_set_resource
	ldr	w8, [x22]
	str	w8, [sp, #8]
	ldr	w1, [x27]
	add	x2, sp, #8
	mov	x0, x21
	mov	w3, #0
	bl	_bus_alloc_resource_any
	cbz	x0, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [sp, #8]
	ldr	x9, [x22, #8]
	ldrsw	x10, [x22]
	str	w8, [x9, x10, lsl #2]
	ldr	x8, [x22, #16]
	ldrsw	x9, [x22]
	str	x0, [x8, x9, lsl #3]
	add	w2, w9, #1
	str	w2, [x22]
	b	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x27]
	ldr	w2, [x22]
	mov	x0, x21
	bl	_bus_delete_resource
LBB0_10:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x23, [x28]
	ldr	w2, [x22]
LBB0_11:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x25]
	cmp	w2, w8
	b.ge	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x26]
	add	x20, x23, x20
	cmp	x20, x8
	b.lt	LBB0_3
LBB0_13:
	cmp	w2, #1
	b.eq	LBB0_16
; %bb.14:
	ldr	w23, [sp, #4]                   ; 4-byte Folded Reload
	cbnz	w2, LBB0_17
LBB0_15:
	mov	x0, x23
	mov	x1, x21
	bl	_device_delete_child
	b	LBB0_19
LBB0_16:
Lloh25:
	adrp	x1, l_.str.1@PAGE
Lloh26:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_18
LBB0_17:
Lloh27:
	adrp	x1, l_.str.2@PAGE
Lloh28:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_18:
	mov	x0, x21
	bl	_device_set_desc
LBB0_19:
	ldr	x8, [sp, #24]
Lloh29:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh30:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_21
; %bb.20:
	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
LBB0_21:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_IOMEM_START,8,3                ; @IOMEM_START
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"orm"

	.comm	_ISA_ORDER_SENSITIVE,4,2        ; @ISA_ORDER_SENSITIVE
	.comm	_ORM_ID,4,2                     ; @ORM_ID
	.comm	_MAX_ROMS,4,2                   ; @MAX_ROMS
	.comm	_IOMEM_END,8,3                  ; @IOMEM_END
	.comm	_SYS_RES_MEMORY,4,2             ; @SYS_RES_MEMORY
	.comm	_IOMEM_STEP,8,3                 ; @IOMEM_STEP
	.comm	_RF_ACTIVE,4,2                  ; @RF_ACTIVE
l_.str.1:                               ; @.str.1
	.asciz	"ISA Option ROM"

l_.str.2:                               ; @.str.2
	.asciz	"ISA Option ROMs"

	.no_dead_strip	_orm_identify
.subsections_via_symbols
