	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxsw_sp_nexthop_group_normalize
_mlxsw_sp_nexthop_group_normalize:      ## @mlxsw_sp_nexthop_group_normalize
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	(%rdi), %eax
	testl	%eax, %eax
	jle	LBB0_13
## %bb.1:
	xorl	%r15d, %r15d
	movl	$8, %ebx
	xorl	%esi, %esi
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_4 Depth=1
	callq	_gcd
	movl	%eax, %esi
	movl	(%r14), %eax
LBB0_3:                                 ##   in Loop: Header=BB0_4 Depth=1
	incq	%r15
	movslq	%eax, %rcx
	addq	$12, %rbx
	cmpq	%rcx, %r15
	jge	LBB0_7
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rcx
	cmpl	$0, (%rcx,%rbx)
	je	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	-8(%rcx,%rbx), %edi
	testl	%esi, %esi
	jg	LBB0_2
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	%edi, %esi
	jmp	LBB0_3
LBB0_7:
	testl	%eax, %eax
	jle	LBB0_13
## %bb.8:
	movq	8(%r14), %rcx
	movl	%eax, %eax
	shlq	$2, %rax
	leaq	(%rax,%rax,2), %r8
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_10 Depth=1
	addq	$12, %rbx
	cmpq	%rbx, %r8
	je	LBB0_14
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	cmpl	$0, 8(%rcx,%rbx)
	je	LBB0_9
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	(%rcx,%rbx), %eax
	cltd
	idivl	%esi
	movl	%eax, 4(%rcx,%rbx)
	addl	%eax, %edi
	jmp	LBB0_9
LBB0_13:
	xorl	%edi, %edi
LBB0_14:
	movl	%edi, 4(%r14)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_mlxsw_sp_nexthop_group_normalize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlxsw_sp_nexthop_group_normalize
_mlxsw_sp_nexthop_group_normalize:      ; @mlxsw_sp_nexthop_group_normalize
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.1:
	mov	x20, #0
	mov	x21, #0
	mov	w1, #0
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	bl	_gcd
	mov	x1, x0
	ldr	w8, [x19]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x21, x21, #1
	add	x20, x20, #12
	cmp	x21, w8, sxtw
	b.ge	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #8]
	add	x10, x9, x20
	ldr	w10, [x10, #8]
	cbz	w10, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x9, x20]
	cmp	w1, #1
	b.ge	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x1, x0
	b	LBB0_3
LBB0_7:
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.8:
	mov	w9, #0
	ldr	x10, [x19, #8]
	mov	w8, w8
	add	x10, x10, #8
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	x10, x10, #12
	subs	x8, x8, #1
	b.eq	LBB0_13
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10]
	cbz	w11, LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldur	w11, [x10, #-8]
	sdiv	w11, w11, w1
	stur	w11, [x10, #-4]
	add	w9, w11, w9
	b	LBB0_9
LBB0_12:
	mov	w9, #0
LBB0_13:
	str	w9, [x19, #4]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_mlxsw_sp_nexthop_group_normalize
.subsections_via_symbols
