	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_calc_sq_wqe_size          ## -- Begin function mlx4_calc_sq_wqe_size
	.p2align	4, 0x90
_mlx4_calc_sq_wqe_size:                 ## @mlx4_calc_sq_wqe_size
	.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
	movq	%rdx, %r14
	movl	%esi, %r13d
	movq	%rdi, %r15
	movq	8(%rdi), %r12
	movq	%r12, %rdi
	callq	_num_inline_segs
	cltq
	leaq	(%r12,%rax,4), %rdi
	movl	$4, %ebx
	movl	$4, %esi
	callq	_align
	sarl	$2, %eax
	movl	(%r15), %ecx
	cmpl	%ecx, %eax
	cmovlel	%ecx, %eax
	shll	$2, %eax
	addl	$-128, %r13d
	cmpl	$3, %r13d
	ja	LBB0_4
## %bb.1:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%r13,4), %rdx
	addq	%rcx, %rdx
	jmpq	*%rdx
LBB0_3:
	addl	$4, %eax
	cmpl	$13, %eax
	movl	$12, %ecx
	cmovbl	%ecx, %eax
	jmp	LBB0_4
LBB0_2:
	addl	$4, %eax
LBB0_4:
	cmpl	$5, %eax
	cmovael	%eax, %ebx
	addl	$4, %ebx
	movl	$5, %ecx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	incl	%ecx
	movl	$1, %eax
	shll	%cl, %eax
	cmpl	%ebx, %eax
	jl	LBB0_5
## %bb.6:
	movl	%ecx, (%r14)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
LJTI0_0:
	.long	L0_0_set_3
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_3
	.end_data_region
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_calc_sq_wqe_size          ; -- Begin function mlx4_calc_sq_wqe_size
	.p2align	2
_mlx4_calc_sq_wqe_size:                 ; @mlx4_calc_sq_wqe_size
	.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	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x22, [x0, #8]
	mov	x0, x22
	bl	_num_inline_segs
	add	x0, x22, w0, sxtw #2
	mov	w22, #4
	mov	w1, #4
	bl	_align
	asr	w8, w0, #2
	ldr	w9, [x21]
	cmp	w8, w9
	csel	w8, w8, w9, gt
	lsl	w8, w8, #2
	sub	w9, w20, #128
	cmp	w9, #3
	b.hi	LBB0_4
; %bb.1:
Lloh0:
	adrp	x10, lJTI0_0@PAGE
Lloh1:
	add	x10, x10, lJTI0_0@PAGEOFF
	adr	x11, LBB0_2
	ldrb	w12, [x10, x9]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_2:
	add	w8, w8, #4
	mov	w9, #12
	cmp	w8, #12
	csel	w8, w8, w9, hi
	b	LBB0_4
LBB0_3:
	add	w8, w8, #4
LBB0_4:
	cmp	w8, #4
	csel	w8, w8, w22, hi
	add	w9, w8, #4
	mov	w8, #5
	mov	w10, #1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	w8, w8, #1
	lsl	w11, w10, w8
	cmp	w11, w9
	b.lt	LBB0_5
; %bb.6:
	str	w8, [x19]
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_3-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
                                        ; -- End function
.subsections_via_symbols
