	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx4_reset_roce_port_gids
_mlx4_reset_roce_port_gids:             ## @mlx4_reset_roce_port_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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movl	%edx, %r15d
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	_mlx4_priv
	movq	%rax, %r13
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	callq	_mlx4_get_slave_num_gids
	movl	%eax, %r12d
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	callq	_mlx4_get_base_gid_ix
	movl	%eax, %ebx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rdi
	movq	_MLX4_MAILBOX_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_memset
	movl	%r15d, -52(%rbp)                ## 4-byte Spill
	movslq	%r15d, %r15
	shlq	$4, %r15
	movq	(%r13), %rdi
	addq	%r15, %rdi
	callq	_mutex_lock
	testl	%r12d, %r12d
	jle	LBB0_3
## %bb.1:
	movslq	%ebx, %r14
	movq	_MLX4_ROCE_GID_ENTRY_SIZE@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	movq	8(%rax,%r15), %rax
	movl	(%rax,%r14,4), %edi
	movq	_zgid_entry@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rbx), %edx
	callq	_memcpy
	incq	%r14
	decl	%r12d
	jne	LBB0_2
LBB0_3:
	movq	_MLX4_ROCE_MAX_GIDS@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	jle	LBB0_6
## %bb.4:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %r14
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14,%rbx,4), %edi
	movq	(%r13), %rax
	movq	8(%rax,%r15), %rax
	movl	(%rax,%rbx,4), %esi
	movq	_MLX4_ROCE_GID_ENTRY_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_memcpy
	incq	%rbx
	movslq	(%r12), %rax
	cmpq	%rax, %rbx
	jl	LBB0_5
LBB0_6:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	movq	_MLX4_SET_PORT_GID_TABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	shll	$8, %edx
	orl	-52(%rbp), %edx                 ## 4-byte Folded Reload
	movq	_MLX4_SET_PORT_ETH_OPCODE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_MLX4_CMD_SET_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_MLX4_CMD_TIME_CLASS_B@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_MLX4_CMD_NATIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_mlx4_cmd
	movl	%eax, %r14d
	addq	(%r13), %r15
	movq	%r15, %rdi
	callq	_mutex_unlock
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX4_MAILBOX_SIZE,4,2          ## @MLX4_MAILBOX_SIZE
	.comm	_zgid_entry,4,2                 ## @zgid_entry
	.comm	_MLX4_ROCE_GID_ENTRY_SIZE,4,2   ## @MLX4_ROCE_GID_ENTRY_SIZE
	.comm	_MLX4_ROCE_MAX_GIDS,4,2         ## @MLX4_ROCE_MAX_GIDS
	.comm	_MLX4_SET_PORT_GID_TABLE,4,2    ## @MLX4_SET_PORT_GID_TABLE
	.comm	_MLX4_SET_PORT_ETH_OPCODE,4,2   ## @MLX4_SET_PORT_ETH_OPCODE
	.comm	_MLX4_CMD_SET_PORT,4,2          ## @MLX4_CMD_SET_PORT
	.comm	_MLX4_CMD_TIME_CLASS_B,4,2      ## @MLX4_CMD_TIME_CLASS_B
	.comm	_MLX4_CMD_NATIVE,4,2            ## @MLX4_CMD_NATIVE
	.no_dead_strip	_mlx4_reset_roce_port_gids
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx4_reset_roce_port_gids
_mlx4_reset_roce_port_gids:             ; @mlx4_reset_roce_port_gids
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x3
	mov	x21, x2
	mov	x24, x1
	mov	x20, x0
	bl	_mlx4_priv
	mov	x19, x0
	mov	x0, x20
	mov	x1, x24
	mov	x2, x21
	bl	_mlx4_get_slave_num_gids
	mov	x23, x0
	mov	x0, x20
	mov	x1, x24
	mov	x2, x21
	bl	_mlx4_get_base_gid_ix
	mov	x24, x0
	ldr	x0, [x22, #8]
Lloh0:
	adrp	x8, _MLX4_MAILBOX_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MLX4_MAILBOX_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_memset
	ldr	x8, [x19]
	sxtw	x25, w21
	add	x0, x8, w21, sxtw #4
	bl	_mutex_lock
Lloh3:
	adrp	x26, _MLX4_ROCE_GID_ENTRY_SIZE@GOTPAGE
Lloh4:
	ldr	x26, [x26, _MLX4_ROCE_GID_ENTRY_SIZE@GOTPAGEOFF]
	cmp	w23, #1
	b.lt	LBB0_3
; %bb.1:
	sbfiz	x24, x24, #2, #32
Lloh5:
	adrp	x27, _zgid_entry@GOTPAGE
Lloh6:
	ldr	x27, [x27, _zgid_entry@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	add	x8, x8, x25, lsl #4
	ldr	x8, [x8, #8]
	ldr	w0, [x8, x24]
	ldr	w1, [x27]
	ldr	w2, [x26]
	bl	_memcpy
	add	x24, x24, #4
	subs	w23, w23, #1
	b.ne	LBB0_2
LBB0_3:
Lloh7:
	adrp	x23, _MLX4_ROCE_MAX_GIDS@GOTPAGE
Lloh8:
	ldr	x23, [x23, _MLX4_ROCE_MAX_GIDS@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.4:
	mov	x24, #0
	ldr	x27, [x22, #8]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x8, x24, #2
	ldr	w0, [x27, x8]
	ldr	x9, [x19]
	add	x9, x9, x25, lsl #4
	ldr	x9, [x9, #8]
	ldr	w1, [x9, x8]
	ldr	w2, [x26]
	bl	_memcpy
	add	x24, x24, #1
	ldrsw	x8, [x23]
	cmp	x24, x8
	b.lt	LBB0_5
LBB0_6:
	ldr	w1, [x22]
Lloh9:
	adrp	x8, _MLX4_SET_PORT_GID_TABLE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MLX4_SET_PORT_GID_TABLE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	orr	w2, w21, w8, lsl #8
Lloh12:
	adrp	x8, _MLX4_SET_PORT_ETH_OPCODE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MLX4_SET_PORT_ETH_OPCODE@GOTPAGEOFF]
Lloh14:
	ldr	w3, [x8]
Lloh15:
	adrp	x8, _MLX4_CMD_SET_PORT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MLX4_CMD_SET_PORT@GOTPAGEOFF]
Lloh17:
	ldr	w4, [x8]
Lloh18:
	adrp	x8, _MLX4_CMD_TIME_CLASS_B@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MLX4_CMD_TIME_CLASS_B@GOTPAGEOFF]
Lloh20:
	ldr	w5, [x8]
Lloh21:
	adrp	x8, _MLX4_CMD_NATIVE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MLX4_CMD_NATIVE@GOTPAGEOFF]
Lloh23:
	ldr	w6, [x8]
	mov	x0, x20
	bl	_mlx4_cmd
	mov	x20, x0
	ldr	x8, [x19]
	add	x0, x8, x25, lsl #4
	bl	_mutex_unlock
	mov	x0, x20
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX4_MAILBOX_SIZE,4,2          ; @MLX4_MAILBOX_SIZE
	.comm	_zgid_entry,4,2                 ; @zgid_entry
	.comm	_MLX4_ROCE_GID_ENTRY_SIZE,4,2   ; @MLX4_ROCE_GID_ENTRY_SIZE
	.comm	_MLX4_ROCE_MAX_GIDS,4,2         ; @MLX4_ROCE_MAX_GIDS
	.comm	_MLX4_SET_PORT_GID_TABLE,4,2    ; @MLX4_SET_PORT_GID_TABLE
	.comm	_MLX4_SET_PORT_ETH_OPCODE,4,2   ; @MLX4_SET_PORT_ETH_OPCODE
	.comm	_MLX4_CMD_SET_PORT,4,2          ; @MLX4_CMD_SET_PORT
	.comm	_MLX4_CMD_TIME_CLASS_B,4,2      ; @MLX4_CMD_TIME_CLASS_B
	.comm	_MLX4_CMD_NATIVE,4,2            ; @MLX4_CMD_NATIVE
	.no_dead_strip	_mlx4_reset_roce_port_gids
.subsections_via_symbols
