	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function unin_chip_alloc_resource
_unin_chip_alloc_resource:              ## @unin_chip_alloc_resource
	.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
	movq	%r9, %rbx
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movl	%edx, %r12d
	movl	%esi, %r13d
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	callq	_device_get_softc
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	%r13d, %edi
	callq	_device_get_ivars
	movq	%rax, %r14
	movq	_RF_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %r15d
	notl	%r15d
	andl	24(%rbp), %r15d
	cmpl	$130, %r12d
	je	LBB0_3
## %bb.1:
	cmpl	$129, %r12d
	je	LBB0_5
## %bb.2:
	cmpl	$128, %r12d
	jne	LBB0_12
LBB0_3:
	movl	%eax, -76(%rbp)                 ## 4-byte Spill
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	addq	$4, %r14
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %edx
	movq	%r14, %rdi
	movl	$128, %esi
	callq	_resource_list_find
	testq	%rax, %rax
	je	LBB0_4
## %bb.15:
	movq	(%rax), %rbx
	movq	8(%rax), %rcx
	decq	%rbx
	movq	%rbx, (%rax)
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, %rbx
	movl	%r13d, %r9d
	movq	%rax, %r13
	cmovbq	%rbx, %r13
	cmpq	%rax, %rcx
	cmovaq	%rcx, %r13
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, %rbx
	cmovaeq	%rax, %rbx
	cmpq	%rax, %rcx
	cmovaq	%rcx, %rbx
	movq	%rbx, %r14
	subq	%r13, %r14
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	movq	%rbx, %rdx
	movq	%r14, %rcx
	movl	%r15d, %r8d
	movl	%r9d, -56(%rbp)                 ## 4-byte Spill
	callq	_rman_reserve_resource
	testq	%rax, %rax
	je	LBB0_14
## %bb.16:
	movq	%rax, %r15
	movl	-56(%rbp), %r14d                ## 4-byte Reload
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %esi
	movq	%rax, %rdi
	callq	_rman_set_rid
	movl	-76(%rbp), %eax                 ## 4-byte Reload
	testl	%eax, 24(%rbp)
	je	LBB0_19
## %bb.17:
	movl	(%rbx), %edx
	movl	%r14d, %ebx
	movl	%r14d, %edi
	movl	%r12d, %esi
	movq	%r15, %rcx
	callq	_bus_activate_resource
	testq	%rax, %rax
	je	LBB0_19
## %bb.18:
	movl	%ebx, %edi
	callq	_device_get_nameunit
	movslq	%eax, %rdx
	leaq	L_.str.4(%rip), %rsi
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_device_printf
	movq	%r15, %rdi
	callq	_rman_release_resource
	xorl	%r15d, %r15d
	jmp	LBB0_19
LBB0_5:
	movl	%r13d, %edi
	callq	_device_get_parent
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	cmpl	%edi, %eax
	jne	LBB0_6
## %bb.7:
	movl	%r13d, -56(%rbp)                ## 4-byte Spill
	leaq	4(%r14), %r13
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movl	(%r12), %edx
	movq	%r13, %rdi
	movl	$129, %esi
	callq	_resource_list_find
	testq	%rax, %rax
	jne	LBB0_11
## %bb.8:
	movl	(%r14), %edx
	cmpl	$6, %edx
	jl	LBB0_10
## %bb.9:
	movl	-56(%rbp), %edi                 ## 4-byte Reload
	callq	_device_get_nameunit
	movslq	%eax, %rdx
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_13
LBB0_12:
	movl	%r13d, %edi
	callq	_device_get_nameunit
	movslq	%eax, %rdx
	leaq	L_.str.2(%rip), %rsi
LBB0_13:
	xorl	%r15d, %r15d
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_device_printf
	jmp	LBB0_19
LBB0_4:
	movl	%r13d, %edi
	callq	_device_get_nameunit
	movslq	%eax, %rdx
	movl	(%rbx), %ecx
	leaq	L_.str(%rip), %rsi
	xorl	%r15d, %r15d
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	xorl	%eax, %eax
	callq	_device_printf
	jmp	LBB0_19
LBB0_6:
	callq	_device_get_parent
	movl	%eax, %edi
	movl	%r13d, %esi
	movl	$129, %edx
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	-72(%rbp), %r8                  ## 8-byte Reload
	movq	%rbx, %r9
	pushq	%r15
	pushq	16(%rbp)
	callq	_BUS_ALLOC_RESOURCE
	addq	$72, %rsp
	jmp	LBB0_20
LBB0_14:
	movl	-56(%rbp), %edi                 ## 4-byte Reload
	callq	_device_get_nameunit
	leaq	L_.str.3(%rip), %rsi
	xorl	%r15d, %r15d
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	%r13, %rdx
	movq	%rbx, %rcx
	movq	%r14, %r8
	movl	%eax, %r9d
	xorl	%eax, %eax
	callq	_device_printf
LBB0_19:
	movq	%r15, %rax
	addq	$56, %rsp
LBB0_20:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	%r13, %rdi
	movl	$129, %esi
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rcx
	movq	%r12, %r8
	movl	$1, %r9d
	callq	_resource_list_add
	movq	8(%r14), %rax
	movslq	(%r14), %rcx
	movq	%r12, (%rax,%rcx,8)
	leal	1(%rcx), %eax
	movl	%eax, (%r14)
	movq	-64(%rbp), %r12                 ## 8-byte Reload
LBB0_11:
	subq	$8, %rsp
	movq	%r13, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	-56(%rbp), %edx                 ## 4-byte Reload
	movl	$129, %ecx
	movq	%r12, %r8
	movq	-72(%rbp), %r9                  ## 8-byte Reload
	pushq	%r15
	pushq	16(%rbp)
	pushq	%rbx
	callq	_resource_list_alloc
	addq	$88, %rsp
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_RF_ACTIVE,4,2                  ## @RF_ACTIVE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no rle for %s memory %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"%s has more than 6 interrupts\n"

L_.str.2:                               ## @.str.2
	.asciz	"unknown resource request from %s\n"

L_.str.3:                               ## @.str.3
	.asciz	"failed to reserve resource %#lx - %#lx (%#lx) for %s\n"

L_.str.4:                               ## @.str.4
	.asciz	"failed to activate resource for %s\n"

	.no_dead_strip	_unin_chip_alloc_resource
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function unin_chip_alloc_resource
_unin_chip_alloc_resource:              ; @unin_chip_alloc_resource
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x27, x7
	str	x6, [sp, #32]                   ; 8-byte Folded Spill
	mov	x22, x5
	mov	x23, x4
	mov	x24, x3
	mov	x26, x2
	mov	x20, x1
	str	w0, [sp, #44]                   ; 4-byte Folded Spill
	bl	_device_get_softc
	mov	x25, x0
	mov	x0, x20
	bl	_device_get_ivars
	mov	x28, x0
Lloh0:
	adrp	x8, _RF_ACTIVE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RF_ACTIVE@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	bic	w19, w27, w21
	cmp	w26, #130
	b.eq	LBB0_3
; %bb.1:
	cmp	w26, #129
	b.eq	LBB0_8
; %bb.2:
	cmp	w26, #128
	b.ne	LBB0_12
LBB0_3:
	add	x0, x28, #4
	ldr	w2, [x24]
	mov	w1, #128
	bl	_resource_list_find
	cbz	x0, LBB0_13
; %bb.4:
	str	x24, [sp, #32]                  ; 8-byte Folded Spill
	ldp	x8, x9, [x0]
	sub	x8, x8, #1
	str	x8, [x0]
	cmp	x8, x23
	csel	x10, x8, x23, lo
	cmp	x9, x23
	csel	x23, x9, x10, hi
	cmp	x8, x22
	csel	x8, x8, x22, lo
	cmp	x9, x22
	csel	x28, x9, x8, hi
	sub	x24, x28, x23
	mov	x0, x25
	mov	x1, x23
	mov	x2, x28
	mov	x3, x24
	mov	x4, x19
	mov	x5, x20
	bl	_rman_reserve_resource
	mov	x22, x0
	cbz	x0, LBB0_20
; %bb.5:
	and	w21, w21, w27
	ldr	x23, [sp, #32]                  ; 8-byte Folded Reload
	ldr	w1, [x23]
	mov	x0, x22
	bl	_rman_set_rid
	cbz	w21, LBB0_17
; %bb.6:
	ldr	w2, [x23]
	mov	x0, x20
	mov	x1, x26
	mov	x3, x22
	bl	_bus_activate_resource
	cbz	x0, LBB0_17
; %bb.7:
	mov	x0, x20
	bl	_device_get_nameunit
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x2, w0
Lloh3:
	adrp	x1, l_.str.4@PAGE
Lloh4:
	add	x1, x1, l_.str.4@PAGEOFF
	ldr	w0, [sp, #44]                   ; 4-byte Folded Reload
	bl	_device_printf
	mov	x0, x22
	bl	_rman_release_resource
	b	LBB0_16
LBB0_8:
	mov	x21, x19
	mov	x0, x20
	bl	_device_get_parent
	ldr	w19, [sp, #44]                  ; 4-byte Folded Reload
	cmp	w0, w19
	b.ne	LBB0_19
; %bb.9:
	add	x25, x28, #4
	ldr	w2, [x24]
	mov	x0, x25
	mov	w1, #129
	bl	_resource_list_find
	cbnz	x0, LBB0_22
; %bb.10:
	ldr	w2, [x28]
	cmp	w2, #6
	b.lt	LBB0_21
; %bb.11:
	mov	x0, x20
	bl	_device_get_nameunit
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x2, w0
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	b	LBB0_15
LBB0_12:
	mov	x0, x20
	bl	_device_get_nameunit
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x2, w0
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_14
LBB0_13:
	mov	x0, x20
	bl	_device_get_nameunit
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x2, w0
	ldr	w8, [x24]
	str	x8, [sp]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
LBB0_14:
	ldr	w0, [sp, #44]                   ; 4-byte Folded Reload
LBB0_15:
	bl	_device_printf
LBB0_16:
	mov	x22, #0
LBB0_17:
	mov	x0, x22
LBB0_18:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_19:
	mov	x0, x19
	bl	_device_get_parent
	mov	x1, x20
	mov	w2, #129
	mov	x3, x24
	mov	x4, x23
	mov	x5, x22
	ldr	x6, [sp, #32]                   ; 8-byte Folded Reload
	mov	x7, x21
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	b	_BUS_ALLOC_RESOURCE
LBB0_20:
	mov	x0, x20
	bl	_device_get_nameunit
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x24, x0, [sp, #8]
	str	x28, [sp]
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	ldr	w0, [sp, #44]                   ; 4-byte Folded Reload
	mov	x2, x23
	bl	_device_printf
	b	LBB0_17
LBB0_21:
	mov	x0, x25
	mov	w1, #129
	mov	x3, x23
	mov	x4, x23
	mov	w5, #1
	bl	_resource_list_add
	ldr	x8, [x28, #8]
	ldrsw	x9, [x28]
	str	x23, [x8, x9, lsl #3]
	add	w8, w9, #1
	str	w8, [x28]
LBB0_22:
	str	w21, [sp]
	mov	x0, x25
	mov	x1, x19
	mov	x2, x20
	mov	w3, #129
	mov	x4, x24
	mov	x5, x23
	mov	x6, x22
	ldr	x7, [sp, #32]                   ; 8-byte Folded Reload
	bl	_resource_list_alloc
	b	LBB0_18
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_RF_ACTIVE,4,2                  ; @RF_ACTIVE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no rle for %s memory %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"%s has more than 6 interrupts\n"

l_.str.2:                               ; @.str.2
	.asciz	"unknown resource request from %s\n"

l_.str.3:                               ; @.str.3
	.asciz	"failed to reserve resource %#lx - %#lx (%#lx) for %s\n"

l_.str.4:                               ; @.str.4
	.asciz	"failed to activate resource for %s\n"

	.no_dead_strip	_unin_chip_alloc_resource
.subsections_via_symbols
