	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ice_init_sq
_ice_init_sq:                           ## @ice_init_sq
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpq	$0, 8(%rsi)
	jle	LBB0_2
## %bb.1:
	movq	_ICE_ERR_NOT_READY@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_2:
	movq	%rsi, %rbx
	cmpq	$0, (%rsi)
	je	LBB0_8
## %bb.3:
	cmpl	$0, 32(%rbx)
	je	LBB0_8
## %bb.4:
	movq	%rdi, %r14
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rbx)
	movq	%rbx, %rsi
	callq	_ice_alloc_ctrlq_sq_ring
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_10
## %bb.5:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_ice_alloc_sq_bufs
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_ice_cfg_sq_regs
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_11
LBB0_7:
	addq	$8, %rbx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_ice_free_cq_ring
	jmp	LBB0_10
LBB0_8:
	movq	_ICE_ERR_CFG@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %r15d
LBB0_10:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	(%rbx), %rax
	movq	%rax, 8(%rbx)
	xorl	%r15d, %r15d
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_ICE_ERR_NOT_READY,4,2          ## @ICE_ERR_NOT_READY
	.comm	_ICE_ERR_CFG,4,2                ## @ICE_ERR_CFG
	.no_dead_strip	_ice_init_sq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ice_init_sq
_ice_init_sq:                           ; @ice_init_sq
	.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	x20, x1
	ldr	x8, [x20, #8]!
	cmp	x8, #1
	b.lt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _ICE_ERR_NOT_READY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ICE_ERR_NOT_READY@GOTPAGEOFF]
	b	LBB0_9
LBB0_2:
	mov	x21, x1
	ldr	x8, [x1]
	cbz	x8, LBB0_8
; %bb.3:
	ldr	w8, [x21, #32]
	cbz	w8, LBB0_8
; %bb.4:
	mov	x19, x0
	stp	xzr, xzr, [x21, #16]
	mov	x1, x21
	bl	_ice_alloc_ctrlq_sq_ring
	mov	x22, x0
	cbnz	w0, LBB0_10
; %bb.5:
	mov	x0, x19
	mov	x1, x21
	bl	_ice_alloc_sq_bufs
	mov	x22, x0
	cbnz	w0, LBB0_7
; %bb.6:
	mov	x0, x19
	mov	x1, x21
	bl	_ice_cfg_sq_regs
	mov	x22, x0
	cbz	w0, LBB0_11
LBB0_7:
	mov	x0, x19
	mov	x1, x20
	bl	_ice_free_cq_ring
	b	LBB0_10
LBB0_8:
Lloh2:
	adrp	x8, _ICE_ERR_CFG@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ICE_ERR_CFG@GOTPAGEOFF]
LBB0_9:
	ldr	w22, [x8]
LBB0_10:
	mov	x0, x22
	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_11:
	ldr	x8, [x21]
	str	x8, [x21, #8]
	b	LBB0_10
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_ICE_ERR_NOT_READY,4,2          ; @ICE_ERR_NOT_READY
	.comm	_ICE_ERR_CFG,4,2                ; @ICE_ERR_CFG
	.no_dead_strip	_ice_init_sq
.subsections_via_symbols
