	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i40iw_get_sqdepth              ## -- Begin function i40iw_get_sqdepth
	.p2align	4, 0x90
_i40iw_get_sqdepth:                     ## @i40iw_get_sqdepth
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %r14
	movl	%esi, %ebx
	movl	%ebx, %ecx
	shll	%cl, %edi
	movslq	%edi, %rdi
	movq	_I40IW_SQ_RSVD@GOTPCREL(%rip), %rax
	addq	(%rax), %rdi
	callq	_roundup_pow_of_two
	movl	%eax, (%r14)
	movq	_I40IW_QP_SW_MIN_WQSIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%ebx, %ecx
	shll	%cl, %edx
	cmpl	%edx, %eax
	jge	LBB0_2
## %bb.1:
	movl	%edx, (%r14)
	xorl	%ecx, %ecx
	jmp	LBB0_4
LBB0_2:
	movq	_I40IW_QP_SW_MAX_SQ_QUANTAS@GOTPCREL(%rip), %rdx
	xorl	%ecx, %ecx
	cmpl	(%rdx), %eax
	jle	LBB0_4
## %bb.3:
	movq	_I40IW_ERR_INVALID_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_4:
	movl	%ecx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I40IW_SQ_RSVD,8,3              ## @I40IW_SQ_RSVD
	.comm	_I40IW_QP_SW_MIN_WQSIZE,4,2     ## @I40IW_QP_SW_MIN_WQSIZE
	.comm	_I40IW_QP_SW_MAX_SQ_QUANTAS,4,2 ## @I40IW_QP_SW_MAX_SQ_QUANTAS
	.comm	_I40IW_ERR_INVALID_SIZE,4,2     ## @I40IW_ERR_INVALID_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i40iw_get_sqdepth              ; -- Begin function i40iw_get_sqdepth
	.p2align	2
_i40iw_get_sqdepth:                     ; @i40iw_get_sqdepth
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x2
	mov	x20, x1
	lsl	w8, w0, w1
Lloh0:
	adrp	x9, _I40IW_SQ_RSVD@GOTPAGE
Lloh1:
	ldr	x9, [x9, _I40IW_SQ_RSVD@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x0, x9, w8, sxtw
	bl	_roundup_pow_of_two
	str	w0, [x19]
Lloh3:
	adrp	x8, _I40IW_QP_SW_MIN_WQSIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _I40IW_QP_SW_MIN_WQSIZE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	w8, w8, w20
	cmp	w0, w8
	b.ge	LBB0_2
; %bb.1:
	mov	w0, #0
	str	w8, [x19]
	b	LBB0_3
LBB0_2:
Lloh6:
	adrp	x8, _I40IW_QP_SW_MAX_SQ_QUANTAS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _I40IW_QP_SW_MAX_SQ_QUANTAS@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _I40IW_ERR_INVALID_SIZE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _I40IW_ERR_INVALID_SIZE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	w0, w8
	csel	w0, w9, wzr, gt
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_I40IW_SQ_RSVD,8,3              ; @I40IW_SQ_RSVD
	.comm	_I40IW_QP_SW_MIN_WQSIZE,4,2     ; @I40IW_QP_SW_MIN_WQSIZE
	.comm	_I40IW_QP_SW_MAX_SQ_QUANTAS,4,2 ; @I40IW_QP_SW_MAX_SQ_QUANTAS
	.comm	_I40IW_ERR_INVALID_SIZE,4,2     ; @I40IW_ERR_INVALID_SIZE
.subsections_via_symbols
