	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_en_calc_rx_buf            ## -- Begin function mlx4_en_calc_rx_buf
	.p2align	4, 0x90
_mlx4_en_calc_rx_buf:                   ## @mlx4_en_calc_rx_buf
	.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	%rdi, %rbx
	callq	_netdev_priv
	movq	_ETH_HLEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	addl	(%rbx), %r14d
	movq	_VLAN_HLEN@GOTPCREL(%rip), %rcx
	addl	(%rcx), %r14d
	movq	%rax, %r15
	movq	_ETH_LLC_SNAP_SIZE@GOTPCREL(%rip), %rax
	addl	(%rax), %r14d
	jle	LBB0_1
## %bb.2:
	movq	_frag_sizes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %ecx
	cmpl	%ecx, %r14d
	cmovll	%r14d, %ecx
	movq	8(%r15), %rdx
	movl	%ecx, (%rdx)
	movl	$0, 4(%rdx)
	movq	_NET_IP_ALIGN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	%edi, 8(%rdx)
	addl	(%rax), %edi
	movq	_SMP_CACHE_BYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ALIGN
	movq	8(%r15), %rcx
	movq	%rax, 16(%rcx)
	movl	(%rcx), %r12d
	movl	$1, %ebx
	cmpl	%r12d, %r14d
	jle	LBB0_5
## %bb.3:
	movl	$1, %ebx
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	_frag_sizes@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%rbx,4), %edx
	leal	(%rdx,%r12), %esi
	movl	%r14d, %edi
	subl	%r12d, %edi
	cmpl	%esi, %r14d
	cmovgl	%edx, %edi
	movl	%edi, 24(%rcx,%r13)
	movl	%r12d, 28(%rcx,%r13)
	movl	$0, 32(%rcx,%r13)
	movl	(%rax,%rbx,4), %edi
	movq	_SMP_CACHE_BYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ALIGN
	movq	8(%r15), %rcx
	movq	%rax, 40(%rcx,%r13)
	addl	24(%rcx,%r13), %r12d
	incq	%rbx
	addq	$24, %r13
	cmpl	%r12d, %r14d
	jg	LBB0_4
	jmp	LBB0_5
LBB0_1:
	xorl	%ebx, %ebx
LBB0_5:
	movl	%ebx, (%r15)
	movl	%r14d, 4(%r15)
	shll	$2, %ebx
	movl	%ebx, %edi
	callq	_ROUNDUP_LOG2
	movl	%eax, 16(%r15)
	movq	_DRV@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r15), %r8d
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rsi
	movl	%r14d, %ecx
	callq	_en_dbg
	cmpl	$0, (%r15)
	jle	LBB0_8
## %bb.6:
	movl	$16, %ebx
	xorl	%r12d, %r12d
	leaq	L_.str.1(%rip), %r14
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rax
	movl	-16(%rax,%rbx), %ecx
	movl	-12(%rax,%rbx), %r8d
	movl	-8(%rax,%rbx), %r9d
	movq	(%rax,%rbx), %rax
	movq	%rax, (%rsp)
	movq	%r15, %rdi
	movq	%r14, %rsi
	movl	%r12d, %edx
	callq	_en_err
	incq	%r12
	movslq	(%r15), %rax
	addq	$24, %rbx
	cmpq	%rax, %r12
	jl	LBB0_7
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ETH_HLEN,4,2                   ## @ETH_HLEN
	.comm	_VLAN_HLEN,4,2                  ## @VLAN_HLEN
	.comm	_ETH_LLC_SNAP_SIZE,4,2          ## @ETH_LLC_SNAP_SIZE
	.comm	_frag_sizes,8,3                 ## @frag_sizes
	.comm	_NET_IP_ALIGN,4,2               ## @NET_IP_ALIGN
	.comm	_SMP_CACHE_BYTES,4,2            ## @SMP_CACHE_BYTES
	.comm	_DRV,4,2                        ## @DRV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Rx buffer scatter-list (effective-mtu:%d num_frags:%d):\n"

L_.str.1:                               ## @.str.1
	.asciz	"  frag:%d - size:%d prefix:%d align:%d stride:%d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_en_calc_rx_buf            ; -- Begin function mlx4_en_calc_rx_buf
	.p2align	2
_mlx4_en_calc_rx_buf:                   ; @mlx4_en_calc_rx_buf
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x0
	bl	_netdev_priv
	mov	x19, x0
Lloh0:
	adrp	x8, _ETH_HLEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ETH_HLEN@GOTPAGEOFF]
	ldr	w9, [x20]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x10, _VLAN_HLEN@GOTPAGE
Lloh4:
	ldr	x10, [x10, _VLAN_HLEN@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	add	w8, w8, w9
	add	w8, w8, w10
Lloh6:
	adrp	x9, _ETH_LLC_SNAP_SIZE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ETH_LLC_SNAP_SIZE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	add	w20, w8, w9
	cmp	w20, #1
	b.lt	LBB0_4
; %bb.1:
Lloh9:
	adrp	x21, _frag_sizes@GOTPAGE
Lloh10:
	ldr	x21, [x21, _frag_sizes@GOTPAGEOFF]
	ldr	x8, [x21]
	ldr	w9, [x8]
	cmp	w20, w9
	csel	w9, w20, w9, lt
	ldr	x10, [x19, #8]
	stp	w9, wzr, [x10]
Lloh11:
	adrp	x9, _NET_IP_ALIGN@GOTPAGE
Lloh12:
	ldr	x9, [x9, _NET_IP_ALIGN@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	str	w9, [x10, #8]
	ldr	w8, [x8]
	add	w0, w9, w8
Lloh14:
	adrp	x22, _SMP_CACHE_BYTES@GOTPAGE
Lloh15:
	ldr	x22, [x22, _SMP_CACHE_BYTES@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_ALIGN
	ldr	x8, [x19, #8]
	str	x0, [x8, #16]
	ldr	w24, [x8]
	cmp	w20, w24
	b.le	LBB0_5
; %bb.2:
	mov	x25, #0
	mov	w23, #1
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x21]
	lsl	x10, x23, #2
	ldr	w11, [x9, x10]
	sub	w12, w20, w24
	add	w13, w11, w24
	cmp	w20, w13
	csel	w11, w11, w12, gt
	add	x8, x8, x25
	stp	w11, w24, [x8, #24]
	str	wzr, [x8, #32]
	ldr	w0, [x9, x10]
	ldr	w1, [x22]
	bl	_ALIGN
	ldr	x8, [x19, #8]
	add	x9, x8, x25
	str	x0, [x9, #40]
	ldr	w9, [x9, #24]
	add	x23, x23, #1
	add	x25, x25, #24
	add	w24, w9, w24
	cmp	w20, w24
	b.gt	LBB0_3
	b	LBB0_6
LBB0_4:
	mov	w23, #0
	b	LBB0_6
LBB0_5:
	mov	w23, #1
LBB0_6:
	stp	w23, w20, [x19]
	lsl	w0, w23, #2
	bl	_ROUNDUP_LOG2
	str	w0, [x19, #16]
Lloh16:
	adrp	x8, _DRV@GOTPAGE
Lloh17:
	ldr	x8, [x8, _DRV@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	ldr	w4, [x19]
Lloh19:
	adrp	x2, l_.str@PAGE
Lloh20:
	add	x2, x2, l_.str@PAGEOFF
	mov	x1, x19
	mov	x3, x20
	bl	_en_dbg
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.7:
	mov	x22, #0
	mov	x20, #0
Lloh21:
	adrp	x21, l_.str.1@PAGE
Lloh22:
	add	x21, x21, l_.str.1@PAGEOFF
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	add	x8, x8, x22
	ldp	w3, w4, [x8]
	ldr	w5, [x8, #8]
	ldr	x6, [x8, #16]
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_en_err
	add	x20, x20, #1
	ldrsw	x8, [x19]
	add	x22, x22, #24
	cmp	x20, x8
	b.lt	LBB0_8
LBB0_9:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_ETH_HLEN,4,2                   ; @ETH_HLEN
	.comm	_VLAN_HLEN,4,2                  ; @VLAN_HLEN
	.comm	_ETH_LLC_SNAP_SIZE,4,2          ; @ETH_LLC_SNAP_SIZE
	.comm	_frag_sizes,8,3                 ; @frag_sizes
	.comm	_NET_IP_ALIGN,4,2               ; @NET_IP_ALIGN
	.comm	_SMP_CACHE_BYTES,4,2            ; @SMP_CACHE_BYTES
	.comm	_DRV,4,2                        ; @DRV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Rx buffer scatter-list (effective-mtu:%d num_frags:%d):\n"

l_.str.1:                               ; @.str.1
	.asciz	"  frag:%d - size:%d prefix:%d align:%d stride:%d\n"

.subsections_via_symbols
