	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_en_create_rx_ring         ## -- Begin function mlx4_en_create_rx_ring
	.p2align	4, 0x90
_mlx4_en_create_rx_ring:                ## @mlx4_en_create_rx_ring
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -56(%rbp)                 ## 4-byte Spill
	movl	%ecx, %r13d
	movl	%edx, %r14d
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	movq	8(%rdi), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$72, %edi
	movl	%r8d, -60(%rbp)                 ## 4-byte Spill
	movl	%r8d, %edx
	callq	_kzalloc_node
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	xorps	%xmm0, %xmm0
	movups	%xmm0, 56(%rax)
	movl	%r14d, (%rax)
	leal	-1(%r14), %eax
	movl	%eax, 4(%rbx)
	movl	%r13d, 8(%rbx)
	movl	%r13d, %edi
	callq	_ffs
	decq	%rax
	movq	%rax, 48(%rbx)
	movslq	(%rbx), %rax
	movslq	8(%rbx), %rcx
	imulq	%rax, %rcx
	movq	_TXBB_SIZE@GOTPCREL(%rip), %rax
	addq	(%rax), %rcx
	movq	%rcx, 40(%rbx)
	leaq	12(%rbx), %r13
	movl	4(%r15), %esi
	movq	%r13, %rdi
	movl	-56(%rbp), %edx                 ## 4-byte Reload
	callq	_xdp_rxq_info_reg
	testq	%rax, %rax
	js	LBB0_3
## %bb.4:
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	_MLX4_EN_MAX_RX_FRAGS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	shll	$2, %edi
	callq	_roundup_pow_of_two
	movl	%eax, %r12d
	imull	%r14d, %r12d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, %edi
	movl	-60(%rbp), %r13d                ## 4-byte Reload
	movl	%r13d, %edx
	callq	_kvzalloc_node
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	_DRV@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leaq	L_.str.1(%rip), %rdx
	movq	%r15, %rsi
	movq	%rax, %rcx
	movl	%r12d, %r8d
	callq	_en_dbg
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	(%r14), %rax
	movq	8(%rax), %rax
	movq	(%rax), %rdi
	movl	%r13d, %esi
	callq	_set_dev_node
	movq	(%r14), %rdi
	movq	%rbx, %rsi
	addq	$28, %rsi
	movq	40(%rbx), %rdx
	callq	_mlx4_alloc_hwq_res
	movl	%eax, %r12d
	movq	(%r14), %rax
	movq	8(%rax), %rcx
	movq	(%rcx), %rdi
	movl	(%rax), %esi
	callq	_set_dev_node
	testl	%r12d, %r12d
	je	LBB0_7
## %bb.8:
	movq	16(%rbx), %rdi
	callq	_kvfree
	movq	$0, 16(%rbx)
	jmp	LBB0_9
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_en_err
	xorl	%r12d, %r12d
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	jmp	LBB0_11
LBB0_3:
	negl	%r12d
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_10
LBB0_5:
	xorl	%r12d, %r12d
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
LBB0_9:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_xdp_rxq_info_unreg
LBB0_10:
	movq	%rbx, %rdi
	callq	_kfree
	movq	$0, (%r14)
LBB0_11:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	28(%rbx), %eax
	movl	%eax, 32(%rbx)
	movl	(%r15), %eax
	movl	%eax, 24(%rbx)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rbx, (%rax)
	xorl	%r12d, %r12d
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to allocate RX ring structure\n"

	.comm	_TXBB_SIZE,8,3                  ## @TXBB_SIZE
	.comm	_MLX4_EN_MAX_RX_FRAGS,4,2       ## @MLX4_EN_MAX_RX_FRAGS
	.comm	_DRV,4,2                        ## @DRV
L_.str.1:                               ## @.str.1
	.asciz	"Allocated rx_info ring at addr:%p size:%d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_en_create_rx_ring         ; -- Begin function mlx4_en_create_rx_ring
	.p2align	2
_mlx4_en_create_rx_ring:                ; @mlx4_en_create_rx_ring
	.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	x25, x5
	mov	x23, x4
	mov	x22, x3
	mov	x24, x2
	str	x1, [sp, #8]                    ; 8-byte Folded Spill
	mov	x21, x0
	ldr	x26, [x0, #8]
Lloh0:
	adrp	x27, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x27, [x27, _ENOMEM@GOTPAGEOFF]
	ldr	w19, [x27]
Lloh2:
	adrp	x28, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x28, [x28, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x28]
	mov	w0, #72
	mov	x2, x4
	bl	_kzalloc_node
	cbz	x0, LBB0_5
; %bb.1:
	mov	x20, x0
	stp	xzr, xzr, [x0, #56]
	sub	w8, w24, #1
	stp	w24, w8, [x0]
	str	w22, [x0, #8]
	mov	x0, x22
	bl	_ffs
	sub	x8, x0, #1
	ldrsw	x9, [x20]
	ldrsw	x10, [x20, #8]
Lloh4:
	adrp	x11, _TXBB_SIZE@GOTPAGE
Lloh5:
	ldr	x11, [x11, _TXBB_SIZE@GOTPAGEOFF]
Lloh6:
	ldr	x11, [x11]
	madd	x9, x10, x9, x11
	stp	x9, x8, [x20, #40]
	add	x22, x20, #12
	ldr	w1, [x21, #4]
	mov	x0, x22
	mov	x2, x25
	bl	_xdp_rxq_info_reg
	tbnz	x0, #63, LBB0_6
; %bb.2:
Lloh7:
	adrp	x8, _MLX4_EN_MAX_RX_FRAGS@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MLX4_EN_MAX_RX_FRAGS@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	lsl	w0, w8, #2
	bl	_roundup_pow_of_two
	mul	w24, w0, w24
	ldr	w1, [x28]
	mov	x0, x24
	mov	x2, x23
	bl	_kvzalloc_node
	str	x0, [x20, #16]
	cbz	x0, LBB0_7
; %bb.3:
	mov	x3, x0
Lloh10:
	adrp	x8, _DRV@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DRV@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
Lloh13:
	adrp	x2, l_.str.1@PAGE
Lloh14:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x1, x21
	mov	x4, x24
	bl	_en_dbg
	ldr	x8, [x26]
	ldr	x8, [x8, #8]
	ldr	x0, [x8]
	mov	x1, x23
	bl	_set_dev_node
	ldr	x0, [x26]
	add	x1, x20, #28
	ldr	x2, [x20, #40]
	bl	_mlx4_alloc_hwq_res
	mov	x23, x0
	ldr	x8, [x26]
	ldr	x9, [x8, #8]
	ldr	x0, [x9]
	ldr	w1, [x8]
	bl	_set_dev_node
	cbz	w23, LBB0_11
; %bb.4:
	ldr	x0, [x20, #16]
	bl	_kvfree
	str	xzr, [x20, #16]
	b	LBB0_8
LBB0_5:
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_en_err
	ldr	w8, [x27]
	neg	w23, w8
	b	LBB0_10
LBB0_6:
	neg	w23, w19
	ldr	x19, [sp, #8]                   ; 8-byte Folded Reload
	b	LBB0_9
LBB0_7:
	ldr	w8, [x27]
	neg	w23, w8
LBB0_8:
	ldr	x19, [sp, #8]                   ; 8-byte Folded Reload
	mov	x0, x22
	bl	_xdp_rxq_info_unreg
LBB0_9:
	mov	x0, x20
	bl	_kfree
	str	xzr, [x19]
LBB0_10:
	mov	x0, x23
	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
LBB0_11:
	ldr	w8, [x20, #28]
	str	w8, [x20, #32]
	ldr	w8, [x21]
	str	w8, [x20, #24]
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	str	x20, [x8]
	b	LBB0_10
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to allocate RX ring structure\n"

	.comm	_TXBB_SIZE,8,3                  ; @TXBB_SIZE
	.comm	_MLX4_EN_MAX_RX_FRAGS,4,2       ; @MLX4_EN_MAX_RX_FRAGS
	.comm	_DRV,4,2                        ; @DRV
l_.str.1:                               ; @.str.1
	.asciz	"Allocated rx_info ring at addr:%p size:%d\n"

.subsections_via_symbols
