	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxsw_hwmon_gearbox_init
_mlxsw_hwmon_gearbox_init:              ## @mlxsw_hwmon_gearbox_init
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MLXSW_REG_MGPIR_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	_MLXSW_REG_MTMP_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	%r15, %rdi
	callq	_mlxsw_reg_mgpir_pack
	movl	16(%r12), %ebx
	movq	_mgpir@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_MLXSW_REG
	movl	%ebx, %edi
	movl	%eax, %esi
	movq	%r15, %rdx
	callq	_mlxsw_reg_query
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_1
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_11
## %bb.9:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	xorl	%ebx, %ebx
	leaq	-56(%rbp), %rsi
	movq	%r15, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_mlxsw_reg_mgpir_unpack
	movl	-56(%rbp), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	testl	%eax, %eax
	je	LBB0_8
## %bb.2:
	jle	LBB0_8
## %bb.3:
	movl	(%r12), %ecx
	addl	%ecx, -52(%rbp)                 ## 4-byte Folded Spill
	movl	%ecx, %r13d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r13d, %eax
	cltd
	idivl	%ecx
	movl	%edx, %ebx
	movq	_MLXSW_REG_MTMP_GBOX_INDEX_MIN@GOTPCREL(%rip), %rax
	addl	(%rax), %ebx
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	$1, %edx
	movl	$1, %ecx
	callq	_mlxsw_reg_mtmp_pack
	movl	16(%r12), %r15d
	movq	_mtmp@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_MLXSW_REG
	movl	%r15d, %edi
	movl	%eax, %esi
	movq	%r14, %rdx
	callq	_mlxsw_reg_write
	testl	%eax, %eax
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_MLXSW_HWMON_ATTR_TYPE_TEMP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	%r13d, %edx
	movl	%r13d, %ecx
	callq	_mlxsw_hwmon_attr_add
	movq	_MLXSW_HWMON_ATTR_TYPE_TEMP_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	%r13d, %edx
	movl	%r13d, %ecx
	callq	_mlxsw_hwmon_attr_add
	movq	_MLXSW_HWMON_ATTR_TYPE_TEMP_RST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	%r13d, %edx
	movl	%r13d, %ecx
	callq	_mlxsw_hwmon_attr_add
	movq	_MLXSW_HWMON_ATTR_TYPE_TEMP_GBOX_LABEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	%r13d, %edx
	movl	%r13d, %ecx
	callq	_mlxsw_hwmon_attr_add
	incl	%r13d
	cmpl	-52(%rbp), %r13d                ## 4-byte Folded Reload
	jge	LBB0_7
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	(%r12), %ecx
	jmp	LBB0_4
LBB0_5:
	movl	%eax, %r15d
	movq	8(%r12), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_dev_err
	movl	%r15d, %ebx
	jmp	LBB0_8
LBB0_7:
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MLXSW_REG_MGPIR_LEN,4,2        ## @MLXSW_REG_MGPIR_LEN
	.comm	_MLXSW_REG_MTMP_LEN,4,2         ## @MLXSW_REG_MTMP_LEN
	.comm	_mgpir,4,2                      ## @mgpir
	.comm	_MLXSW_REG_MTMP_GBOX_INDEX_MIN,4,2 ## @MLXSW_REG_MTMP_GBOX_INDEX_MIN
	.comm	_mtmp,4,2                       ## @mtmp
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to setup temp sensor number %d\n"

	.comm	_MLXSW_HWMON_ATTR_TYPE_TEMP,4,2 ## @MLXSW_HWMON_ATTR_TYPE_TEMP
	.comm	_MLXSW_HWMON_ATTR_TYPE_TEMP_MAX,4,2 ## @MLXSW_HWMON_ATTR_TYPE_TEMP_MAX
	.comm	_MLXSW_HWMON_ATTR_TYPE_TEMP_RST,4,2 ## @MLXSW_HWMON_ATTR_TYPE_TEMP_RST
	.comm	_MLXSW_HWMON_ATTR_TYPE_TEMP_GBOX_LABEL,4,2 ## @MLXSW_HWMON_ATTR_TYPE_TEMP_GBOX_LABEL
	.no_dead_strip	_mlxsw_hwmon_gearbox_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlxsw_hwmon_gearbox_init
_mlxsw_hwmon_gearbox_init:              ; @mlxsw_hwmon_gearbox_init
	.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
	sub	sp, sp, #16
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _MLXSW_REG_MGPIR_LEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MLXSW_REG_MGPIR_LEN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x21, x9, x8
	mov	sp, x21
Lloh8:
	adrp	x8, _MLXSW_REG_MTMP_LEN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MLXSW_REG_MTMP_LEN@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	mov	x9, x8
Lloh11:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh12:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x20, x9, x8
	mov	sp, x20
	mov	x0, x21
	bl	_mlxsw_reg_mgpir_pack
	ldr	w22, [x19, #16]
Lloh13:
	adrp	x8, _mgpir@GOTPAGE
Lloh14:
	ldr	x8, [x8, _mgpir@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	bl	_MLXSW_REG
	mov	x1, x0
	mov	x0, x22
	mov	x2, x21
	bl	_mlxsw_reg_query
	mov	x22, x0
	cbnz	w0, LBB0_8
; %bb.1:
	sub	x1, x29, #92
	mov	x0, x21
	mov	x2, #0
	mov	x3, #0
	bl	_mlxsw_reg_mgpir_unpack
	ldur	w9, [x29, #-92]
	cbz	w9, LBB0_7
; %bb.2:
	cmp	w9, #1
	b.lt	LBB0_7
; %bb.3:
	ldr	w8, [x19]
Lloh16:
	adrp	x25, _mtmp@GOTPAGE
Lloh17:
	ldr	x25, [x25, _mtmp@GOTPAGEOFF]
Lloh18:
	adrp	x27, _MLXSW_HWMON_ATTR_TYPE_TEMP_MAX@GOTPAGE
Lloh19:
	ldr	x27, [x27, _MLXSW_HWMON_ATTR_TYPE_TEMP_MAX@GOTPAGEOFF]
	add	w28, w8, w9
Lloh20:
	adrp	x26, _MLXSW_HWMON_ATTR_TYPE_TEMP_RST@GOTPAGE
Lloh21:
	ldr	x26, [x26, _MLXSW_HWMON_ATTR_TYPE_TEMP_RST@GOTPAGEOFF]
Lloh22:
	adrp	x24, _MLXSW_HWMON_ATTR_TYPE_TEMP_GBOX_LABEL@GOTPAGE
Lloh23:
	ldr	x24, [x24, _MLXSW_HWMON_ATTR_TYPE_TEMP_GBOX_LABEL@GOTPAGEOFF]
	mov	x21, x8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	sdiv	w9, w21, w8
	msub	w8, w9, w8, w21
Lloh24:
	adrp	x9, _MLXSW_REG_MTMP_GBOX_INDEX_MIN@GOTPAGE
Lloh25:
	ldr	x9, [x9, _MLXSW_REG_MTMP_GBOX_INDEX_MIN@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	add	w23, w9, w8
	mov	x0, x20
	mov	x1, x23
	mov	w2, #1
	mov	w3, #1
	bl	_mlxsw_reg_mtmp_pack
	ldr	w22, [x19, #16]
	ldr	w0, [x25]
	bl	_MLXSW_REG
	mov	x1, x0
	mov	x0, x22
	mov	x2, x20
	bl	_mlxsw_reg_write
	cbnz	w0, LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh27:
	adrp	x8, _MLXSW_HWMON_ATTR_TYPE_TEMP@GOTPAGE
Lloh28:
	ldr	x8, [x8, _MLXSW_HWMON_ATTR_TYPE_TEMP@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	mov	x3, x21
	bl	_mlxsw_hwmon_attr_add
	ldr	w1, [x27]
	mov	x0, x19
	mov	x2, x21
	mov	x3, x21
	bl	_mlxsw_hwmon_attr_add
	ldr	w1, [x26]
	mov	x0, x19
	mov	x2, x21
	mov	x3, x21
	bl	_mlxsw_hwmon_attr_add
	ldr	w1, [x24]
	mov	x0, x19
	mov	x2, x21
	mov	x3, x21
	bl	_mlxsw_hwmon_attr_add
	add	w21, w21, #1
	cmp	w21, w28
	b.ge	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x19]
	b	LBB0_4
LBB0_7:
	mov	w22, #0
LBB0_8:
	ldur	x8, [x29, #-88]
Lloh30:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh31:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.9:
	mov	x0, x22
	sub	sp, x29, #80
	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
LBB0_10:
	mov	x22, x0
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
Lloh33:
	adrp	x1, l_.str@PAGE
Lloh34:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x23
	bl	_dev_err
	b	LBB0_8
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_MLXSW_REG_MGPIR_LEN,4,2        ; @MLXSW_REG_MGPIR_LEN
	.comm	_MLXSW_REG_MTMP_LEN,4,2         ; @MLXSW_REG_MTMP_LEN
	.comm	_mgpir,4,2                      ; @mgpir
	.comm	_MLXSW_REG_MTMP_GBOX_INDEX_MIN,4,2 ; @MLXSW_REG_MTMP_GBOX_INDEX_MIN
	.comm	_mtmp,4,2                       ; @mtmp
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to setup temp sensor number %d\n"

	.comm	_MLXSW_HWMON_ATTR_TYPE_TEMP,4,2 ; @MLXSW_HWMON_ATTR_TYPE_TEMP
	.comm	_MLXSW_HWMON_ATTR_TYPE_TEMP_MAX,4,2 ; @MLXSW_HWMON_ATTR_TYPE_TEMP_MAX
	.comm	_MLXSW_HWMON_ATTR_TYPE_TEMP_RST,4,2 ; @MLXSW_HWMON_ATTR_TYPE_TEMP_RST
	.comm	_MLXSW_HWMON_ATTR_TYPE_TEMP_GBOX_LABEL,4,2 ; @MLXSW_HWMON_ATTR_TYPE_TEMP_GBOX_LABEL
	.no_dead_strip	_mlxsw_hwmon_gearbox_init
.subsections_via_symbols
