	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_reset_roce_gids           ## -- Begin function mlx4_reset_roce_gids
	.p2align	4, 0x90
_mlx4_reset_roce_gids:                  ## @mlx4_reset_roce_gids
	.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
	testl	%esi, %esi
	js	LBB0_19
## %bb.1:
	movl	%esi, %r14d
	movq	%rdi, %r12
	movq	16(%rdi), %rax
	cmpl	%esi, (%rax)
	jl	LBB0_19
## %bb.2:
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_mlx4_get_active_ports
	cmpl	$0, (%r12)
	jle	LBB0_19
## %bb.3:
	movl	%eax, %r15d
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%r12), %rax
	movq	8(%rax,%rbx,8), %rax
	incq	%rbx
	xorl	%ecx, %ecx
	movq	_MLX4_PORT_TYPE_ETH@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	sete	%cl
	addl	%ecx, %r13d
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movslq	(%r12), %rax
	cmpq	%rax, %rbx
	jge	LBB0_8
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	movl	%r15d, %esi
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	incq	%rbx
	jmp	LBB0_7
LBB0_8:
	testl	%r13d, %r13d
	je	LBB0_19
## %bb.9:
	movq	%r12, %rdi
	callq	_mlx4_alloc_cmd_mailbox
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_10
LBB0_19:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	cmpl	$0, (%r12)
	jle	LBB0_18
## %bb.11:
	xorl	%r13d, %r13d
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_12 Depth=1
	incq	%r13
LBB0_17:                                ##   in Loop: Header=BB0_12 Depth=1
	movslq	(%r12), %rax
	cmpq	%rax, %r13
	jge	LBB0_18
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movl	%r13d, %edi
	movl	%r15d, %esi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	8(%r12), %rax
	movq	8(%rax,%r13,8), %rax
	incq	%r13
	movq	_MLX4_PORT_TYPE_ETH@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%r13d, %edx
	movq	%rbx, %rcx
	callq	_mlx4_reset_roce_port_gids
	testl	%eax, %eax
	je	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	%r12, %rdi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	movl	%r13d, %ecx
	movl	%eax, %r8d
	callq	_mlx4_warn
	jmp	LBB0_17
LBB0_18:
	movq	%r12, %rdi
	movq	%rbx, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mlx4_free_cmd_mailbox          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX4_PORT_TYPE_ETH,8,3         ## @MLX4_PORT_TYPE_ETH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not reset ETH port GID table for slave %d, port %d (%d)\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_reset_roce_gids           ; -- Begin function mlx4_reset_roce_gids
	.p2align	2
_mlx4_reset_roce_gids:                  ; @mlx4_reset_roce_gids
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	tbnz	w1, #31, LBB0_10
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0, #16]
	ldr	w8, [x8]
	cmp	w8, w1
	b.lt	LBB0_10
; %bb.2:
	mov	x0, x19
	mov	x1, x20
	bl	_mlx4_get_active_ports
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.3:
	mov	x21, x0
	mov	x22, #0
	mov	w23, #0
Lloh0:
	adrp	x25, _MLX4_PORT_TYPE_ETH@GOTPAGE
Lloh1:
	ldr	x25, [x25, _MLX4_PORT_TYPE_ETH@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x19, #8]
	add	x22, x22, #1
	ldr	x8, [x8, x22, lsl #3]
	ldr	x9, [x25]
	cmp	x8, x9
	cinc	w23, w23, eq
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldrsw	x8, [x19]
	cmp	x22, x8
	b.ge	LBB0_8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	x1, x21
	bl	_test_bit
	cbnz	x0, LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x22, x22, #1
	b	LBB0_5
LBB0_8:
	cbz	w23, LBB0_10
; %bb.9:
	mov	x0, x19
	bl	_mlx4_alloc_cmd_mailbox
	mov	x22, x0
	bl	_IS_ERR
	cbz	x0, LBB0_11
LBB0_10:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_11:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_19
; %bb.12:
	mov	x23, #0
Lloh2:
	adrp	x24, l_.str@PAGE
Lloh3:
	add	x24, x24, l_.str@PAGEOFF
	b	LBB0_15
LBB0_13:                                ;   in Loop: Header=BB0_15 Depth=1
	add	x23, x23, #1
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=1
	ldrsw	x8, [x19]
	cmp	x23, x8
	b.ge	LBB0_19
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	mov	x1, x21
	bl	_test_bit
	cbz	x0, LBB0_13
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	x8, [x19, #8]
	add	x23, x23, #1
	ldr	x8, [x8, x23, lsl #3]
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.17:                               ;   in Loop: Header=BB0_15 Depth=1
	mov	x0, x19
	mov	x1, x20
	mov	x2, x23
	mov	x3, x22
	bl	_mlx4_reset_roce_port_gids
	cbz	w0, LBB0_14
; %bb.18:                               ;   in Loop: Header=BB0_15 Depth=1
	mov	x4, x0
	mov	x0, x19
	mov	x1, x24
	mov	x2, x20
	mov	x3, x23
	bl	_mlx4_warn
	b	LBB0_14
LBB0_19:
	mov	x0, x19
	mov	x1, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_mlx4_free_cmd_mailbox
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX4_PORT_TYPE_ETH,8,3         ; @MLX4_PORT_TYPE_ETH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not reset ETH port GID table for slave %d, port %d (%d)\n"

.subsections_via_symbols
