	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_en_create_tx_ring         ## -- Begin function mlx4_en_create_tx_ring
	.p2align	4, 0x90
_mlx4_en_create_tx_ring:                ## @mlx4_en_create_tx_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r13d
	movl	%edx, %r15d
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	8(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	%ecx, (%rsi)
	leal	-1(%r13), %eax
	movl	%eax, 4(%rsi)
	movl	%r8d, 8(%rsi)
	movq	_inline_thold@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	_MAX_INLINE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_min
	movl	%eax, (%rbx)
	leal	(,%r13,4), %ebx
	movl	%ebx, %edi
	callq	_vmalloc
	movq	%rax, 24(%r12)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movq	_DRV@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leaq	L_.str.1(%rip), %rdx
	xorl	%r15d, %r15d
	movq	%r14, %rsi
	movq	%rax, %rcx
	movl	%ebx, %r8d
	xorl	%eax, %eax
	callq	_en_dbg
	movq	_MAX_DESC_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmalloc
	movq	%rax, 32(%r12)
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	imull	8(%r12), %r13d
	movq	_MLX4_EN_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r13d, %edi
	callq	_ALIGN
	movl	%eax, 40(%r12)
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %edi
	leaq	48(%r12), %r13
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%ecx, %ecx
	movq	%r13, %rsi
	movl	%eax, %edx
	callq	_mlx4_alloc_hwq_res
	testl	%eax, %eax
	je	LBB0_8
## %bb.5:
	movl	%eax, %r15d
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_en_err
	jmp	LBB0_6
LBB0_1:
	leaq	L_.str(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_en_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_17
LBB0_3:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_en_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_7
LBB0_8:
	movq	%r13, %rdi
	callq	_mlx4_en_map_buffer
	testl	%eax, %eax
	je	LBB0_11
## %bb.9:
	movl	%eax, %r15d
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_en_err
	jmp	LBB0_10
LBB0_11:
	movl	56(%r12), %r8d
	movl	%r8d, 84(%r12)
	movq	_DRV@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r12), %r9d
	movl	40(%r12), %ebx
	leaq	L_.str.5(%rip), %rdx
	movq	%r14, %rsi
	movq	%r12, %rcx
	xorl	%eax, %eax
	pushq	48(%r12)
	pushq	%rbx
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	callq	_en_dbg
	addq	$16, %rsp
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%esi, 12(%r12)
	movl	(%rbx), %edi
	leaq	80(%r12), %rdx
	callq	_mlx4_qp_alloc
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	movl	%eax, %r15d
	movl	12(%r12), %edx
	leaq	L_.str.6(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_en_err
	movq	%r13, %rdi
	callq	_mlx4_en_unmap_buffer
LBB0_10:
	movl	(%rbx), %edi
	movl	40(%r12), %edx
	movq	%r13, %rsi
	callq	_mlx4_free_hwq_res
LBB0_6:
	movq	32(%r12), %rdi
	callq	_kfree
	movq	$0, 32(%r12)
LBB0_7:
	movq	24(%r12), %rdi
	callq	_vfree
	movq	$0, 24(%r12)
LBB0_17:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	_mlx4_en_sqp_event@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 80(%r12)
	movl	(%rbx), %edi
	leaq	72(%r12), %r13
	movq	%r13, %rsi
	callq	_mlx4_bf_alloc
	testl	%eax, %eax
	je	LBB0_14
## %bb.15:
	movq	_DRV@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leaq	L_.str.7(%rip), %rdx
	xorl	%r15d, %r15d
	movq	%r14, %rsi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_en_dbg
	leaq	8(%rbx), %rax
	movq	%rax, (%r13)
	movl	4(%rbx), %eax
	movl	%eax, 8(%rbx)
	jmp	LBB0_16
LBB0_14:
	movl	$1, %r15d
LBB0_16:
	movl	%r15d, 16(%r12)
	movl	(%r14), %eax
	movl	%eax, 64(%r12)
	xorl	%r15d, %r15d
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_inline_thold,4,2               ## @inline_thold
	.comm	_MAX_INLINE,4,2                 ## @MAX_INLINE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed allocating tx_info ring\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_DRV,4,2                        ## @DRV
L_.str.1:                               ## @.str.1
	.asciz	"Allocated tx_info ring at addr:%p size:%d\n"

	.comm	_MAX_DESC_SIZE,4,2              ## @MAX_DESC_SIZE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.2:                               ## @.str.2
	.asciz	"Failed allocating bounce buffer\n"

	.comm	_MLX4_EN_PAGE_SIZE,4,2          ## @MLX4_EN_PAGE_SIZE
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
L_.str.3:                               ## @.str.3
	.asciz	"Failed allocating hwq resources\n"

L_.str.4:                               ## @.str.4
	.asciz	"Failed to map TX buffer\n"

L_.str.5:                               ## @.str.5
	.asciz	"Allocated TX ring (addr:%p) - buf:%p size:%d buf_size:%d dma:%llx\n"

L_.str.6:                               ## @.str.6
	.asciz	"Failed allocating qp %d\n"

	.comm	_mlx4_en_sqp_event,4,2          ## @mlx4_en_sqp_event
L_.str.7:                               ## @.str.7
	.asciz	"working without blueflame (%d)"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_en_create_tx_ring         ; -- Begin function mlx4_en_create_tx_ring
	.p2align	2
_mlx4_en_create_tx_ring:                ; @mlx4_en_create_tx_ring
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x22, x3
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x24, [x0, #8]
	sub	w8, w3, #1
	stp	w3, w8, [x1]
	str	w4, [x1, #8]
Lloh0:
	adrp	x23, _inline_thold@GOTPAGE
Lloh1:
	ldr	x23, [x23, _inline_thold@GOTPAGEOFF]
	ldr	w0, [x23]
Lloh2:
	adrp	x8, _MAX_INLINE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MAX_INLINE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_min
	str	w0, [x23]
	lsl	w23, w22, #2
	mov	x0, x23
	bl	_vmalloc
	str	x0, [x19, #24]
	cbz	x0, LBB0_4
; %bb.1:
Lloh5:
	adrp	x25, _DRV@GOTPAGE
Lloh6:
	ldr	x25, [x25, _DRV@GOTPAGEOFF]
	ldr	w8, [x25]
	stp	x0, x23, [sp]
Lloh7:
	adrp	x2, l_.str.1@PAGE
Lloh8:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x8
	mov	x1, x20
	bl	_en_dbg
Lloh9:
	adrp	x8, _MAX_DESC_SIZE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MAX_DESC_SIZE@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
Lloh12:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	bl	_kmalloc
	str	x0, [x19, #32]
	cbz	x0, LBB0_5
; %bb.2:
	ldr	w8, [x19, #8]
	mul	w0, w8, w22
Lloh15:
	adrp	x8, _MLX4_EN_PAGE_SIZE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MLX4_EN_PAGE_SIZE@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	bl	_ALIGN
	mov	x2, x0
	str	w0, [x19, #40]
	ldr	w0, [x24]
	add	x23, x19, #48
Lloh18:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	lsl	w3, w8, #1
	mov	x1, x23
	bl	_mlx4_alloc_hwq_res
	cbz	w0, LBB0_6
; %bb.3:
	mov	x22, x0
Lloh21:
	adrp	x1, l_.str.3@PAGE
Lloh22:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_en_err
	b	LBB0_11
LBB0_4:
Lloh23:
	adrp	x1, l_.str@PAGE
Lloh24:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_en_err
Lloh25:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_13
LBB0_5:
Lloh28:
	adrp	x1, l_.str.2@PAGE
Lloh29:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_en_err
Lloh30:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh31:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_12
LBB0_6:
	mov	x0, x23
	bl	_mlx4_en_map_buffer
	cbz	w0, LBB0_8
; %bb.7:
	mov	x22, x0
Lloh33:
	adrp	x1, l_.str.4@PAGE
Lloh34:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_en_err
	b	LBB0_10
LBB0_8:
	ldr	w8, [x19, #56]
	str	w8, [x19, #84]
	ldr	w0, [x25]
	ldr	x9, [x19, #48]
	ldr	w10, [x19]
	ldr	w11, [x19, #40]
	stp	x11, x9, [sp, #24]
	stp	x8, x10, [sp, #8]
	str	x19, [sp]
Lloh35:
	adrp	x2, l_.str.5@PAGE
Lloh36:
	add	x2, x2, l_.str.5@PAGEOFF
	mov	x1, x20
	bl	_en_dbg
	str	w21, [x19, #12]
	ldr	w0, [x24]
	add	x2, x19, #80
	mov	x1, x21
	bl	_mlx4_qp_alloc
	cbz	w0, LBB0_14
; %bb.9:
	mov	x22, x0
	ldr	w8, [x19, #12]
	str	x8, [sp]
Lloh37:
	adrp	x1, l_.str.6@PAGE
Lloh38:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x20
	bl	_en_err
	mov	x0, x23
	bl	_mlx4_en_unmap_buffer
LBB0_10:
	ldr	w0, [x24]
	ldr	w2, [x19, #40]
	mov	x1, x23
	bl	_mlx4_free_hwq_res
LBB0_11:
	ldr	x0, [x19, #32]
	bl	_kfree
	str	xzr, [x19, #32]
LBB0_12:
	ldr	x0, [x19, #24]
	bl	_vfree
	str	xzr, [x19, #24]
LBB0_13:
	mov	x0, x22
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_14:
Lloh39:
	adrp	x8, _mlx4_en_sqp_event@GOTPAGE
Lloh40:
	ldr	x8, [x8, _mlx4_en_sqp_event@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
	str	w8, [x19, #80]
	ldr	w0, [x24]
	add	x21, x19, #72
	mov	x1, x21
	bl	_mlx4_bf_alloc
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_16
; %bb.15:
	ldr	w8, [x25]
	str	x0, [sp]
Lloh42:
	adrp	x2, l_.str.7@PAGE
Lloh43:
	add	x2, x2, l_.str.7@PAGEOFF
	mov	x0, x8
	mov	x1, x20
	bl	_en_dbg
	mov	w8, #0
	ldr	w9, [x24, #4]
	str	w9, [x24, #8]!
	str	x24, [x21]
	b	LBB0_17
LBB0_16:
	mov	w8, #1
LBB0_17:
	mov	w22, #0
	str	w8, [x19, #16]
	ldr	w8, [x20]
	str	w8, [x19, #64]
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.comm	_inline_thold,4,2               ; @inline_thold
	.comm	_MAX_INLINE,4,2                 ; @MAX_INLINE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed allocating tx_info ring\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_DRV,4,2                        ; @DRV
l_.str.1:                               ; @.str.1
	.asciz	"Allocated tx_info ring at addr:%p size:%d\n"

	.comm	_MAX_DESC_SIZE,4,2              ; @MAX_DESC_SIZE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.2:                               ; @.str.2
	.asciz	"Failed allocating bounce buffer\n"

	.comm	_MLX4_EN_PAGE_SIZE,4,2          ; @MLX4_EN_PAGE_SIZE
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
l_.str.3:                               ; @.str.3
	.asciz	"Failed allocating hwq resources\n"

l_.str.4:                               ; @.str.4
	.asciz	"Failed to map TX buffer\n"

l_.str.5:                               ; @.str.5
	.asciz	"Allocated TX ring (addr:%p) - buf:%p size:%d buf_size:%d dma:%llx\n"

l_.str.6:                               ; @.str.6
	.asciz	"Failed allocating qp %d\n"

	.comm	_mlx4_en_sqp_event,4,2          ; @mlx4_en_sqp_event
l_.str.7:                               ; @.str.7
	.asciz	"working without blueflame (%d)"

.subsections_via_symbols
