	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxsw_thermal_bind
_mlxsw_thermal_bind:                    ## @mlxsw_thermal_bind
	.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
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	(%rdi), %r13
	movq	8(%r13), %rax
	movq	(%rax), %rbx
	movq	%r13, %rdi
	callq	_mlxsw_get_cooling_device_idx
	xorl	%r14d, %r14d
	testq	%rax, %rax
	js	LBB0_7
## %bb.1:
	movq	_MLXSW_THERMAL_NUM_TRIPS@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_7
## %bb.2:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	movl	(%rax,%rbx,8), %r8d
	movl	4(%rax,%rbx,8), %ecx
	movq	_THERMAL_WEIGHT_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	%r12, %rdi
	movl	%ebx, %esi
	movq	%r15, %rdx
	callq	_thermal_zone_bind_cooling_device
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	movq	_MLXSW_THERMAL_NUM_TRIPS@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %rbx
	jl	LBB0_3
## %bb.6:
	xorl	%r14d, %r14d
	jmp	LBB0_7
LBB0_4:
	movl	%eax, %r14d
	leaq	L_.str(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %edx
	callq	_dev_err
LBB0_7:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLXSW_THERMAL_NUM_TRIPS,4,2    ## @MLXSW_THERMAL_NUM_TRIPS
	.comm	_THERMAL_WEIGHT_DEFAULT,4,2     ## @THERMAL_WEIGHT_DEFAULT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to bind cooling device to trip %d\n"

	.no_dead_strip	_mlxsw_thermal_bind
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlxsw_thermal_bind
_mlxsw_thermal_bind:                    ; @mlxsw_thermal_bind
	.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	x20, x1
	mov	x21, x0
	ldr	x22, [x0]
	ldr	x8, [x22, #8]
	ldr	x19, [x8]
	mov	x0, x22
	bl	_mlxsw_get_cooling_device_idx
	mov	w24, #0
	tbnz	x0, #63, LBB0_7
; %bb.1:
Lloh0:
	adrp	x25, _MLXSW_THERMAL_NUM_TRIPS@GOTPAGE
Lloh1:
	ldr	x25, [x25, _MLXSW_THERMAL_NUM_TRIPS@GOTPAGEOFF]
	ldr	w8, [x25]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.2:
	mov	x26, #0
	mov	x23, #0
Lloh2:
	adrp	x27, _THERMAL_WEIGHT_DEFAULT@GOTPAGE
Lloh3:
	ldr	x27, [x27, _THERMAL_WEIGHT_DEFAULT@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22]
	add	x8, x8, x26
	ldp	w4, w3, [x8]
	ldr	w5, [x27]
	mov	x0, x21
	mov	x1, x23
	mov	x2, x20
	bl	_thermal_zone_bind_cooling_device
	tbnz	w0, #31, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x23, x23, #1
	ldrsw	x8, [x25]
	add	x26, x26, #8
	cmp	x23, x8
	b.lt	LBB0_3
; %bb.5:
	mov	w24, #0
	b	LBB0_7
LBB0_6:
	mov	x24, x0
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x23
	bl	_dev_err
LBB0_7:
	mov	x0, x24
	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	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MLXSW_THERMAL_NUM_TRIPS,4,2    ; @MLXSW_THERMAL_NUM_TRIPS
	.comm	_THERMAL_WEIGHT_DEFAULT,4,2     ; @THERMAL_WEIGHT_DEFAULT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to bind cooling device to trip %d\n"

	.no_dead_strip	_mlxsw_thermal_bind
.subsections_via_symbols
