	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function add_client_resource
_add_client_resource:                   ## @add_client_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	%rsi, %r15
	movq	%rdi, %r12
	movl	%edx, %edi
	callq	_gfpflags_allow_blocking
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%ebx, %edi
	callq	_idr_preload
LBB0_2:
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	cmpq	$0, 8(%r12)
	je	LBB0_4
## %bb.3:
	movq	_ECANCELED@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	testl	%ebx, %ebx
	js	LBB0_7
LBB0_6:
	movl	%ebx, (%r15)
	movq	%r12, %rdi
	callq	_client_get
	movq	%r15, %rdi
	callq	_schedule_if_iso_resource
LBB0_7:
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	testl	%r14d, %r14d
	je	LBB0_9
## %bb.8:
	xorl	%eax, %eax
	callq	_idr_preload_end
LBB0_9:
	movl	%ebx, %eax
	sarl	$31, %eax
	andl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	leaq	4(%r12), %rdi
	movq	_GFP_NOWAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r15, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_idr_alloc
	movl	%eax, %ebx
	testl	%ebx, %ebx
	jns	LBB0_6
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_ECANCELED,4,2                  ## @ECANCELED
	.comm	_GFP_NOWAIT,4,2                 ## @GFP_NOWAIT
	.no_dead_strip	_add_client_resource
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function add_client_resource
_add_client_resource:                   ; @add_client_resource
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x22, x2
	mov	x21, x1
	mov	x19, x0
	mov	x0, x2
	bl	_gfpflags_allow_blocking
	mov	x20, x0
	cbz	w0, LBB0_2
; %bb.1:
	mov	x0, x22
	bl	_idr_preload
LBB0_2:
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_8
; %bb.3:
Lloh0:
	adrp	x8, _ECANCELED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ECANCELED@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w22, w8
	tbnz	w22, #31, LBB0_5
LBB0_4:
	str	w22, [x21]
	mov	x0, x19
	bl	_client_get
	mov	x0, x21
	bl	_schedule_if_iso_resource
LBB0_5:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	cbz	w20, LBB0_7
; %bb.6:
	bl	_idr_preload_end
LBB0_7:
	cmp	w22, #0
	csel	w0, w22, wzr, lt
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_8:
	add	x0, x19, #4
Lloh3:
	adrp	x8, _GFP_NOWAIT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_NOWAIT@GOTPAGEOFF]
Lloh5:
	ldr	w4, [x8]
	mov	x1, x21
	mov	w2, #0
	mov	w3, #0
	bl	_idr_alloc
	mov	x22, x0
	tbz	w22, #31, LBB0_4
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ECANCELED,4,2                  ; @ECANCELED
	.comm	_GFP_NOWAIT,4,2                 ; @GFP_NOWAIT
	.no_dead_strip	_add_client_resource
.subsections_via_symbols
