	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nexus_alloc_resource
_nexus_alloc_resource:                  ## @nexus_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %eax
	andl	$-2, %eax
	cmpl	$128, %eax
	jne	LBB0_5
## %bb.1:
	movq	%rcx, %r12
	movl	%edx, %r14d
	movl	%esi, %r15d
	movl	16(%rbp), %ecx
	movq	_RF_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	%r13d, %eax
	notl	%eax
	andl	24(%rbp), %eax
	movq	_mem_rman@GOTPCREL(%rip), %rdi
	movl	%r8d, %esi
	movl	%r9d, %edx
	movl	%eax, %r8d
	movl	%r15d, %r9d
	callq	_rman_reserve_resource
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movq	%rax, %rbx
	movl	(%r12), %esi
	movq	%rax, %rdi
	callq	_rman_set_rid
	testl	%r13d, 24(%rbp)
	je	LBB0_6
## %bb.3:
	movl	(%r12), %edx
	movl	%r15d, %edi
	movl	%r14d, %esi
	movq	%rbx, %rcx
	callq	_bus_activate_resource
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	%rbx, %rdi
	callq	_rman_release_resource
LBB0_5:
	xorl	%ebx, %ebx
LBB0_6:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RF_ACTIVE,4,2                  ## @RF_ACTIVE
	.comm	_mem_rman,4,2                   ## @mem_rman
	.no_dead_strip	_nexus_alloc_resource
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nexus_alloc_resource
_nexus_alloc_resource:                  ; @nexus_alloc_resource
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	and	w8, w2, #0xfffffffe
	cmp	w8, #128
	b.ne	LBB0_5
; %bb.1:
	mov	x23, x7
	mov	x22, x3
	mov	x20, x2
	mov	x21, x1
Lloh0:
	adrp	x8, _RF_ACTIVE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RF_ACTIVE@GOTPAGEOFF]
Lloh2:
	ldr	w24, [x8]
	bic	w8, w7, w24
Lloh3:
	adrp	x0, _mem_rman@GOTPAGE
Lloh4:
	ldr	x0, [x0, _mem_rman@GOTPAGEOFF]
	mov	x1, x4
	mov	x2, x5
	mov	x3, x6
	mov	x4, x8
	mov	x5, x21
	bl	_rman_reserve_resource
	mov	x19, x0
	cbz	x0, LBB0_6
; %bb.2:
	and	w23, w24, w23
	ldr	w1, [x22]
	mov	x0, x19
	bl	_rman_set_rid
	cbz	w23, LBB0_6
; %bb.3:
	ldr	w2, [x22]
	mov	x0, x21
	mov	x1, x20
	mov	x3, x19
	bl	_bus_activate_resource
	cbz	x0, LBB0_6
; %bb.4:
	mov	x0, x19
	bl	_rman_release_resource
LBB0_5:
	mov	x19, #0
LBB0_6:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_RF_ACTIVE,4,2                  ; @RF_ACTIVE
	.comm	_mem_rman,4,2                   ; @mem_rman
	.no_dead_strip	_nexus_alloc_resource
.subsections_via_symbols
