	.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	%rax, %r13
	movl	(%rbx), %edi
	callq	_MLX4_EN_EFF_MTU
	movl	%eax, %ebx
	movq	40(%r13), %rax
	movq	_TX_XDP@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	$0, (%rax,%rcx,8)
	je	LBB0_2
## %bb.1:
	movq	8(%r13), %rax
	movl	%ebx, (%rax)
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 4(%rax)
	movq	_PCI_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r13)
	movq	_XDP_PACKET_HEADROOM@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	$1, %r15d
	jmp	LBB0_10
LBB0_2:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_MLX4_EN_MAX_RX_FRAGS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %edx
	shll	$11, %edx
	addl	%ecx, %edx
	addl	$-2048, %edx                    ## imm = 0xF800
	cmpl	%edx, %ebx
	movl	$2048, %edx                     ## imm = 0x800
	cmovgl	%ecx, %edx
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	xorl	%r15d, %r15d
	testl	%ebx, %ebx
	jle	LBB0_9
## %bb.3:
	xorl	%r12d, %r12d
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	subl	%r12d, %ebx
	decl	%eax
	cltq
	cmpq	%rax, %r15
	jge	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	%ebx, %edi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_min
	movl	%eax, %ebx
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%r13), %rax
	movl	%ebx, (%rax,%r15,8)
	movq	_SMP_CACHE_BYTES@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movl	%ebx, %edi
	callq	_ALIGN
	movl	%eax, %ecx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cltd
	idivl	%ecx
	movl	%eax, %esi
	movl	%edx, %eax
	cltd
	idivl	%esi
	xorl	%edx, %edx
	subl	(%r14), %edx
	andl	%eax, %edx
	addl	%ecx, %edx
	movq	8(%r13), %rax
	movl	%edx, 4(%rax,%r15,8)
	addl	%ebx, %r12d
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	cmpl	%r12d, %ebx
	jle	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_MLX4_EN_MAX_RX_FRAGS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	incq	%r15
	jmp	LBB0_4
LBB0_8:
	incl	%r15d
LBB0_9:
	movq	_PCI_DMA_FROMDEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r13)
	xorl	%eax, %eax
LBB0_10:
	movq	%rax, 24(%r13)
	movl	%r15d, (%r13)
	movl	%ebx, 4(%r13)
	shll	$2, %r15d
	movl	%r15d, %edi
	callq	_ROUNDUP_LOG2
	movl	%eax, 16(%r13)
	movq	_DRV@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movl	(%r13), %r8d
	leaq	L_.str(%rip), %rdx
	movq	%r13, %rsi
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_en_dbg
	cmpl	$0, (%r13)
	jle	LBB0_13
## %bb.11:
	leaq	L_.str.1(%rip), %r14
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	movq	8(%r13), %rax
	movl	(%rax,%rbx,8), %r8d
	movl	4(%rax,%rbx,8), %r9d
	movq	%r13, %rsi
	movq	%r14, %rdx
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_en_dbg
	incq	%rbx
	movslq	(%r13), %rax
	cmpq	%rax, %rbx
	jl	LBB0_12
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TX_XDP,8,3                     ## @TX_XDP
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_PCI_DMA_BIDIRECTIONAL,4,2      ## @PCI_DMA_BIDIRECTIONAL
	.comm	_XDP_PACKET_HEADROOM,8,3        ## @XDP_PACKET_HEADROOM
	.comm	_MLX4_EN_MAX_RX_FRAGS,4,2       ## @MLX4_EN_MAX_RX_FRAGS
	.comm	_SMP_CACHE_BYTES,4,2            ## @SMP_CACHE_BYTES
	.comm	_PCI_DMA_FROMDEVICE,4,2         ## @PCI_DMA_FROMDEVICE
	.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 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:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x0
	bl	_netdev_priv
	mov	x19, x0
	ldr	w0, [x20]
	bl	_MLX4_EN_EFF_MTU
	mov	x20, x0
	ldr	x8, [x19, #40]
Lloh0:
	adrp	x9, _TX_XDP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TX_XDP@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	ldr	x8, [x8, x9, lsl #3]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x19, #8]
	str	w20, [x8]
Lloh3:
	adrp	x9, _PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PAGE_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	str	w9, [x8, #4]
Lloh6:
	adrp	x8, _PCI_DMA_BIDIRECTIONAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PCI_DMA_BIDIRECTIONAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x19, #32]
Lloh9:
	adrp	x8, _XDP_PACKET_HEADROOM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _XDP_PACKET_HEADROOM@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x8]
	mov	w8, #1
	b	LBB0_11
LBB0_2:
Lloh12:
	adrp	x23, _PAGE_SIZE@GOTPAGE
Lloh13:
	ldr	x23, [x23, _PAGE_SIZE@GOTPAGEOFF]
	ldr	w9, [x23]
Lloh14:
	adrp	x24, _MLX4_EN_MAX_RX_FRAGS@GOTPAGE
Lloh15:
	ldr	x24, [x24, _MLX4_EN_MAX_RX_FRAGS@GOTPAGEOFF]
	ldr	w8, [x24]
	add	w10, w9, w8, lsl #11
	sub	w10, w10, #2048
	mov	w11, #2048
	cmp	w20, w10
	csel	w21, w9, w11, gt
	cmp	w20, #1
	b.lt	LBB0_9
; %bb.3:
	mov	x26, #0
	mov	x25, #0
	mov	w27, #0
Lloh16:
	adrp	x28, _SMP_CACHE_BYTES@GOTPAGE
Lloh17:
	ldr	x28, [x28, _SMP_CACHE_BYTES@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	sub	w22, w20, w27
	sub	w8, w8, #1
	cmp	x25, w8, sxtw
	b.ge	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x22
	mov	x1, x21
	bl	_min
	mov	x22, x0
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #8]
	str	w22, [x8, x26]
	ldr	w1, [x28]
	mov	x0, x22
	bl	_ALIGN
	ldr	w8, [x23]
	sdiv	w9, w8, w0
	msub	w8, w9, w0, w8
	sdiv	w8, w8, w9
	ldr	w9, [x28]
	neg	w9, w9
	and	w8, w8, w9
	add	w8, w8, w0
	ldr	x9, [x19, #8]
	add	x9, x9, x26
	str	w8, [x9, #4]
	add	w27, w22, w27
	cmp	w20, w27
	b.le	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x24]
	add	x26, x26, #8
	add	x25, x25, #1
	b	LBB0_4
LBB0_8:
	add	w8, w25, #1
	b	LBB0_10
LBB0_9:
	mov	w8, #0
LBB0_10:
	mov	x9, #0
Lloh18:
	adrp	x10, _PCI_DMA_FROMDEVICE@GOTPAGE
Lloh19:
	ldr	x10, [x10, _PCI_DMA_FROMDEVICE@GOTPAGEOFF]
Lloh20:
	ldr	w10, [x10]
	str	w10, [x19, #32]
LBB0_11:
	str	x9, [x19, #24]
	lsl	w0, w8, #2
	stp	w8, w20, [x19]
	bl	_ROUNDUP_LOG2
	str	w0, [x19, #16]
Lloh21:
	adrp	x22, _DRV@GOTPAGE
Lloh22:
	ldr	x22, [x22, _DRV@GOTPAGEOFF]
	ldr	w0, [x22]
	ldr	w4, [x19]
Lloh23:
	adrp	x2, l_.str@PAGE
Lloh24:
	add	x2, x2, l_.str@PAGEOFF
	mov	x1, x19
	mov	x3, x20
	bl	_en_dbg
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.12:
	mov	x23, #0
	mov	x20, #0
Lloh25:
	adrp	x21, l_.str.1@PAGE
Lloh26:
	add	x21, x21, l_.str.1@PAGEOFF
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x22]
	ldr	x8, [x19, #8]
	add	x8, x8, x23
	ldp	w4, w8, [x8]
	str	x8, [sp]
	mov	x1, x19
	mov	x2, x21
	mov	x3, x20
	bl	_en_dbg
	add	x20, x20, #1
	ldrsw	x8, [x19]
	add	x23, x23, #8
	cmp	x20, x8
	b.lt	LBB0_13
LBB0_14:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_TX_XDP,8,3                     ; @TX_XDP
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_PCI_DMA_BIDIRECTIONAL,4,2      ; @PCI_DMA_BIDIRECTIONAL
	.comm	_XDP_PACKET_HEADROOM,8,3        ; @XDP_PACKET_HEADROOM
	.comm	_MLX4_EN_MAX_RX_FRAGS,4,2       ; @MLX4_EN_MAX_RX_FRAGS
	.comm	_SMP_CACHE_BYTES,4,2            ; @SMP_CACHE_BYTES
	.comm	_PCI_DMA_FROMDEVICE,4,2         ; @PCI_DMA_FROMDEVICE
	.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 stride:%d\n"

.subsections_via_symbols
