	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx4_en_set_channels
_mlx4_en_set_channels:                  ## @mlx4_en_set_channels
	.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	%rsi, %rbx
	movq	%rdi, %r12
	callq	_netdev_priv
	cmpq	$0, 24(%rbx)
	jne	LBB0_6
## %bb.1:
	cmpq	$0, 16(%rbx)
	jne	LBB0_6
## %bb.2:
	movq	%rax, %r15
	movl	(%rbx), %eax
	movq	_MLX4_EN_MAX_TX_RING_P_UP@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jg	LBB0_6
## %bb.3:
	movq	8(%rbx), %rcx
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.4:
	movq	_MAX_RX_RINGS@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jg	LBB0_6
## %bb.5:
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	movq	24(%r15), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	cmpq	$0, 16(%r15)
	je	LBB0_9
## %bb.8:
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_mlx4_en_stop_port
LBB0_9:
	movq	%r15, %rdi
	callq	_mlx4_en_free_resources
	movl	(%rbx), %eax
	movl	%eax, (%r15)
	movq	_MLX4_EN_NUM_UP@GOTPCREL(%rip), %r13
	imull	(%r13), %eax
	movl	%eax, 4(%r15)
	movq	8(%rbx), %rax
	movq	%rax, 8(%r15)
	movq	%r15, %rdi
	callq	_mlx4_en_alloc_resources
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_en_err
	jmp	LBB0_14
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_15:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movl	4(%r15), %esi
	movq	%r12, %rdi
	callq	_netif_set_real_num_tx_queues
	movq	8(%r15), %rsi
	movq	%r12, %rdi
	callq	_netif_set_real_num_rx_queues
	movl	(%r13), %esi
	movq	%r12, %rdi
	callq	_mlx4_en_setup_tc
	movslq	4(%r15), %rdx
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_en_warn
	movq	8(%r15), %rdx
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_en_warn
	movq	%r12, %rdi
	callq	_mlx4_en_start_port
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	callq	_en_err
LBB0_13:
	movq	%r15, %rdi
	callq	_mlx4_en_moderation_update
	movl	%eax, %ebx
LBB0_14:
	movq	%r14, %rdi
	callq	_mutex_unlock
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX4_EN_MAX_TX_RING_P_UP,4,2   ## @MLX4_EN_MAX_TX_RING_P_UP
	.comm	_MAX_RX_RINGS,8,3               ## @MAX_RX_RINGS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MLX4_EN_NUM_UP,4,2             ## @MLX4_EN_NUM_UP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed reallocating port resources\n"

L_.str.1:                               ## @.str.1
	.asciz	"Using %d TX rings\n"

L_.str.2:                               ## @.str.2
	.asciz	"Using %d RX rings\n"

L_.str.3:                               ## @.str.3
	.asciz	"Failed starting port\n"

	.no_dead_strip	_mlx4_en_set_channels
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx4_en_set_channels
_mlx4_en_set_channels:                  ; @mlx4_en_set_channels
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x22, x1
	mov	x21, x0
	bl	_netdev_priv
	ldr	x8, [x22, #24]
	cbnz	x8, LBB0_9
; %bb.1:
	ldr	x8, [x22, #16]
	cbnz	x8, LBB0_9
; %bb.2:
	ldr	w8, [x22]
Lloh0:
	adrp	x9, _MLX4_EN_MAX_TX_RING_P_UP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MLX4_EN_MAX_TX_RING_P_UP@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.gt	LBB0_9
; %bb.3:
	ldr	x9, [x22, #8]
	cbz	x9, LBB0_9
; %bb.4:
Lloh3:
	adrp	x10, _MAX_RX_RINGS@GOTPAGE
Lloh4:
	ldr	x10, [x10, _MAX_RX_RINGS@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x9, x10
	ccmp	w8, #0, #4, le
	b.eq	LBB0_9
; %bb.5:
	mov	x19, x0
	ldr	x20, [x0, #24]
	mov	x0, x20
	bl	_mutex_lock
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_7
; %bb.6:
	mov	x0, x21
	mov	w1, #1
	bl	_mlx4_en_stop_port
LBB0_7:
	mov	x0, x19
	bl	_mlx4_en_free_resources
	ldr	w8, [x22]
Lloh6:
	adrp	x23, _MLX4_EN_NUM_UP@GOTPAGE
Lloh7:
	ldr	x23, [x23, _MLX4_EN_NUM_UP@GOTPAGEOFF]
	str	w8, [x19]
	ldr	w9, [x23]
	mul	w8, w9, w8
	str	w8, [x19, #4]
	ldr	x8, [x22, #8]
	str	x8, [x19, #8]
	mov	x0, x19
	bl	_mlx4_en_alloc_resources
	cbz	w0, LBB0_11
; %bb.8:
	mov	x22, x0
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_en_err
	b	LBB0_14
LBB0_9:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_10:
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_11:
	ldr	w1, [x19, #4]
	mov	x0, x21
	bl	_netif_set_real_num_tx_queues
	ldr	x1, [x19, #8]
	mov	x0, x21
	bl	_netif_set_real_num_rx_queues
	ldr	w1, [x23]
	mov	x0, x21
	bl	_mlx4_en_setup_tc
	ldrsw	x2, [x19, #4]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_en_warn
	ldr	x2, [x19, #8]
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_en_warn
	mov	x0, x21
	bl	_mlx4_en_start_port
	cbz	w0, LBB0_13
; %bb.12:
Lloh17:
	adrp	x1, l_.str.3@PAGE
Lloh18:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_en_err
LBB0_13:
	mov	x0, x19
	bl	_mlx4_en_moderation_update
	mov	x22, x0
LBB0_14:
	mov	x0, x20
	bl	_mutex_unlock
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX4_EN_MAX_TX_RING_P_UP,4,2   ; @MLX4_EN_MAX_TX_RING_P_UP
	.comm	_MAX_RX_RINGS,8,3               ; @MAX_RX_RINGS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MLX4_EN_NUM_UP,4,2             ; @MLX4_EN_NUM_UP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed reallocating port resources\n"

l_.str.1:                               ; @.str.1
	.asciz	"Using %d TX rings\n"

l_.str.2:                               ; @.str.2
	.asciz	"Using %d RX rings\n"

l_.str.3:                               ; @.str.3
	.asciz	"Failed starting port\n"

	.no_dead_strip	_mlx4_en_set_channels
.subsections_via_symbols
