	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxio_hal_init_resource         ## -- Begin function cxio_hal_init_resource
	.p2align	4, 0x90
_cxio_hal_init_resource:                ## @cxio_hal_init_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	%r9d, %r14d
	movl	%esi, %ebx
	movq	%rdi, %r12
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$28, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	%rax, (%r12)
	leaq	24(%rax), %rsi
	xorl	%r13d, %r13d
	movq	%rax, %rdi
	movl	%ebx, %edx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	callq	_cxio_init_resource_fifo_random
	testl	%eax, %eax
	jne	LBB0_9
## %bb.3:
	movq	%r12, %rdi
	callq	_cxio_init_qpid_fifo
	testl	%eax, %eax
	jne	LBB0_8
## %bb.4:
	leaq	8(%r15), %r12
	leaq	20(%r15), %rsi
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	movl	%r14d, %edx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	callq	_cxio_init_resource_fifo
	testl	%eax, %eax
	jne	LBB0_7
## %bb.5:
	movl	16(%rbp), %edx
	leaq	16(%r15), %rdi
	leaq	12(%r15), %rsi
	movl	$1, %ecx
	xorl	%r8d, %r8d
	callq	_cxio_init_resource_fifo
	testl	%eax, %eax
	je	LBB0_10
## %bb.6:
	movq	%r12, %rdi
	callq	_kfifo_free
LBB0_7:
	movq	%r15, %rdi
	addq	$4, %rdi
	callq	_kfifo_free
LBB0_8:
	movq	%r15, %rdi
	callq	_kfifo_free
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
	movl	%r13d, %ebx
	jmp	LBB0_10
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cxio_hal_init_resource         ; -- Begin function cxio_hal_init_resource
	.p2align	2
_cxio_hal_init_resource:                ; @cxio_hal_init_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
	mov	x20, x6
	mov	x21, x5
	mov	x23, x1
	mov	x22, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #28
	bl	_kmalloc
	cbz	x0, LBB0_8
; %bb.1:
	mov	x19, x0
	str	x0, [x22]
	add	x1, x0, #24
	mov	x2, x23
	mov	w3, #1
	mov	w4, #0
	bl	_cxio_init_resource_fifo_random
	cbnz	w0, LBB0_8
; %bb.2:
	mov	x0, x22
	bl	_cxio_init_qpid_fifo
	cbnz	w0, LBB0_7
; %bb.3:
	add	x22, x19, #8
	add	x1, x19, #20
	mov	x0, x22
	mov	x2, x21
	mov	w3, #1
	mov	w4, #0
	bl	_cxio_init_resource_fifo
	cbnz	w0, LBB0_6
; %bb.4:
	add	x0, x19, #16
	add	x1, x19, #12
	mov	x2, x20
	mov	w3, #1
	mov	w4, #0
	bl	_cxio_init_resource_fifo
	cbz	w0, LBB0_9
; %bb.5:
	mov	x0, x22
	bl	_kfifo_free
LBB0_6:
	add	x0, x19, #4
	bl	_kfifo_free
LBB0_7:
	mov	x0, x19
	bl	_kfifo_free
LBB0_8:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
