	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_en_alloc_tx_queue_per_tc  ## -- Begin function mlx4_en_alloc_tx_queue_per_tc
	.p2align	4, 0x90
_mlx4_en_alloc_tx_queue_per_tc:         ## @mlx4_en_alloc_tx_queue_per_tc
	.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
	movq	%rsi, %r15
	movq	%rdi, %r12
	callq	_netdev_priv
	movq	%rax, %r14
	movq	16(%rax), %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_mutex_lock
	movl	8(%r14), %esi
	leaq	-80(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$24, %edx
	callq	_memcpy
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	testq	%r15, %r15
	jne	LBB0_3
## %bb.4:
	movq	_MLX4_EN_NUM_UP_LOW@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_12
LBB0_3:
	movq	_MLX4_EN_NUM_UP_HIGH@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	movl	%eax, -80(%rbp)
	imull	-64(%rbp), %eax
	movq	-72(%rbp), %rcx
	movq	_TX@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	%eax, (%rcx,%rdx,4)
	movq	%r14, %rdi
	movq	%r13, %rsi
	movq	%rbx, %rdx
	movl	$1, %ecx
	callq	_mlx4_en_try_alloc_resources
	movl	%eax, %r15d
	testl	%eax, %eax
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_11
## %bb.6:
	cmpq	$0, (%r14)
	je	LBB0_9
## %bb.7:
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_mlx4_en_stop_port
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_mlx4_en_safe_replace_resources
	movq	%r12, %rdi
	callq	_mlx4_en_start_port
	testl	%eax, %eax
	je	LBB0_10
## %bb.8:
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_en_err
	jmp	LBB0_11
LBB0_9:
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_mlx4_en_safe_replace_resources
LBB0_10:
	movq	%r12, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_mlx4_en_setup_tc
	movl	%eax, %r15d
LBB0_11:
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movq	%r13, %rdi
	callq	_kfree
LBB0_12:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MLX4_EN_NUM_UP_LOW,4,2         ## @MLX4_EN_NUM_UP_LOW
	.comm	_MLX4_EN_NUM_UP_HIGH,4,2        ## @MLX4_EN_NUM_UP_HIGH
	.comm	_TX,8,3                         ## @TX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed starting port for setup TC\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_en_alloc_tx_queue_per_tc  ; -- Begin function mlx4_en_alloc_tx_queue_per_tc
	.p2align	2
_mlx4_en_alloc_tx_queue_per_tc:         ; @mlx4_en_alloc_tx_queue_per_tc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x21, x1
	mov	x22, x0
	bl	_netdev_priv
	mov	x23, x0
	ldr	x19, [x0, #16]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kzalloc
	cbz	x0, LBB0_5
; %bb.1:
	mov	x20, x0
	mov	x0, x19
	bl	_mutex_lock
	ldr	w1, [x23, #8]
	add	x0, sp, #8
	mov	w2, #24
	bl	_memcpy
Lloh3:
	adrp	x8, _MLX4_EN_NUM_UP_LOW@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MLX4_EN_NUM_UP_LOW@GOTPAGEOFF]
Lloh5:
	adrp	x9, _MLX4_EN_NUM_UP_HIGH@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MLX4_EN_NUM_UP_HIGH@GOTPAGEOFF]
	cmp	x21, #0
	csel	x8, x8, x9, eq
	ldr	w8, [x8]
	str	w8, [sp, #8]
	ldr	w9, [sp, #24]
	mul	w8, w9, w8
	ldr	x9, [sp, #16]
Lloh7:
	adrp	x10, _TX@GOTPAGE
Lloh8:
	ldr	x10, [x10, _TX@GOTPAGEOFF]
Lloh9:
	ldr	x10, [x10]
	str	w8, [x9, x10, lsl #2]
	add	x2, sp, #8
	mov	x0, x23
	mov	x1, x20
	mov	w3, #1
	bl	_mlx4_en_try_alloc_resources
	mov	x24, x0
	cbnz	w0, LBB0_8
; %bb.2:
	ldr	x8, [x23]
	cbz	x8, LBB0_6
; %bb.3:
	mov	x0, x22
	mov	w1, #1
	bl	_mlx4_en_stop_port
	mov	x0, x23
	mov	x1, x20
	bl	_mlx4_en_safe_replace_resources
	mov	x0, x22
	bl	_mlx4_en_start_port
	cbz	w0, LBB0_7
; %bb.4:
	mov	x24, x0
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	bl	_en_err
	b	LBB0_8
LBB0_5:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_9
LBB0_6:
	mov	x0, x23
	mov	x1, x20
	bl	_mlx4_en_safe_replace_resources
LBB0_7:
	mov	x0, x22
	mov	x1, x21
	bl	_mlx4_en_setup_tc
	mov	x24, x0
LBB0_8:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	bl	_kfree
LBB0_9:
	mov	x0, x24
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MLX4_EN_NUM_UP_LOW,4,2         ; @MLX4_EN_NUM_UP_LOW
	.comm	_MLX4_EN_NUM_UP_HIGH,4,2        ; @MLX4_EN_NUM_UP_HIGH
	.comm	_TX,8,3                         ; @TX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed starting port for setup TC\n"

.subsections_via_symbols
