	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxsw_get_cooling_device_idx
_mlxsw_get_cooling_device_idx:          ## @mlxsw_get_cooling_device_idx
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	_MLXSW_MFCR_PWMS_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_4
## %bb.1:
	movq	(%rdi), %rcx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%r14, (%rcx,%r12,8)
	je	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%r12
	cmpq	%r12, %rax
	jne	LBB0_2
LBB0_4:
	movq	_mlxsw_thermal_external_allowed_cdev@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_8
## %bb.5:
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %edi
	movq	(%r15), %rax
	movl	(%rax,%rbx,4), %esi
	movl	$4, %edx
	callq	_strnstr
	testq	%rax, %rax
	jne	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_7 Depth=1
	incq	%rbx
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_7
LBB0_8:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_9:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLXSW_MFCR_PWMS_MAX,4,2        ## @MLXSW_MFCR_PWMS_MAX
	.comm	_mlxsw_thermal_external_allowed_cdev,8,3 ## @mlxsw_thermal_external_allowed_cdev
	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_mlxsw_get_cooling_device_idx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlxsw_get_cooling_device_idx
_mlxsw_get_cooling_device_idx:          ; @mlxsw_get_cooling_device_idx
	.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, x1
Lloh0:
	adrp	x9, _MLXSW_MFCR_PWMS_MAX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MLXSW_MFCR_PWMS_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w9, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x8, x0
	mov	x0, #0
	ldr	x8, [x8]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x8, x0, lsl #3]
	cmp	x10, x19
	b.eq	LBB0_10
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x0, x0, #1
	cmp	x9, x0
	b.ne	LBB0_2
LBB0_4:
Lloh3:
	adrp	x20, _mlxsw_thermal_external_allowed_cdev@GOTPAGE
Lloh4:
	ldr	x20, [x20, _mlxsw_thermal_external_allowed_cdev@GOTPAGEOFF]
	ldr	x0, [x20]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_8
; %bb.5:
	mov	x21, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19]
	ldr	x8, [x20]
	ldr	w1, [x8, x21, lsl #2]
	mov	w2, #4
	bl	_strnstr
	cbnz	x0, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x21, x21, #1
	ldr	x0, [x20]
	bl	_ARRAY_SIZE
	cmp	x21, w0, sxtw
	b.lt	LBB0_6
LBB0_8:
Lloh5:
	adrp	x8, _ENODEV@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_9:
	mov	w0, #0
LBB0_10:
                                        ; kill: def $w0 killed $w0 killed $x0
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_MLXSW_MFCR_PWMS_MAX,4,2        ; @MLXSW_MFCR_PWMS_MAX
	.comm	_mlxsw_thermal_external_allowed_cdev,8,3 ; @mlxsw_thermal_external_allowed_cdev
	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_mlxsw_get_cooling_device_idx
.subsections_via_symbols
