	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxsw_thermal_modules_init
_mlxsw_thermal_modules_init:            ## @mlxsw_thermal_modules_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r12
	movq	%rdi, %r13
	movq	%rsi, %rdi
	callq	_mlxsw_core_max_ports
	movl	%eax, %r14d
	movq	%r12, %rdi
	callq	_mlxsw_core_res_query_enabled
	xorl	%r15d, %r15d
	testl	%eax, %eax
	je	LBB0_19
## %bb.1:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r14d, %edi
	movl	$4, %esi
	callq	_kcalloc
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_10
## %bb.2:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	cmpl	$2, %r14d
	jb	LBB0_12
## %bb.3:
	movq	%r13, %rbx
	movl	$1, %r13d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	%r13d, %ecx
	callq	_mlxsw_thermal_module_init
	testl	%eax, %eax
	jne	LBB0_5
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=1
	incl	%r13d
	cmpl	%r13d, %r14d
	jne	LBB0_4
LBB0_12:
	decl	%r14d
	je	LBB0_19
## %bb.13:
	movl	%r14d, %r12d
	shlq	$2, %r12
	xorl	%ebx, %ebx
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_14 Depth=1
	addq	$4, %rbx
	cmpq	%rbx, %r12
	je	LBB0_18
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rdi
	cmpl	$0, (%rdi,%rbx)
	je	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	addq	%rbx, %rdi
	callq	_mlxsw_thermal_module_tz_init
	testl	%eax, %eax
	je	LBB0_17
## %bb.16:
	movl	%eax, %r15d
	testl	%r14d, %r14d
	jns	LBB0_7
	jmp	LBB0_9
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_19
LBB0_18:
	xorl	%r15d, %r15d
	jmp	LBB0_19
LBB0_5:
	decl	%r14d
	movl	%eax, %r15d
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	testl	%r14d, %r14d
	js	LBB0_9
LBB0_7:
	movl	%r14d, %ebx
	incl	%r14d
	shlq	$2, %rbx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rdi
	addq	%rbx, %rdi
	callq	_mlxsw_thermal_module_fini
	decl	%r14d
	addq	$-4, %rbx
	testl	%r14d, %r14d
	jg	LBB0_8
LBB0_9:
	movq	(%r13), %rdi
	callq	_kfree
LBB0_19:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_mlxsw_thermal_modules_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlxsw_thermal_modules_init
_mlxsw_thermal_modules_init:            ; @mlxsw_thermal_modules_init
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x2
	mov	x21, x1
	mov	x22, x0
	mov	x0, x1
	bl	_mlxsw_core_max_ports
	mov	x23, x0
	mov	x0, x21
	bl	_mlxsw_core_res_query_enabled
	cbz	w0, LBB0_12
; %bb.1:
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x23
	mov	w1, #4
	bl	_kcalloc
	str	x0, [x19]
	cbz	x0, LBB0_13
; %bb.2:
	cmp	w23, #2
	b.lo	LBB0_6
; %bb.3:
	mov	w24, #1
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	x1, x21
	mov	x2, x19
	mov	x3, x24
	bl	_mlxsw_thermal_module_init
	cbnz	w0, LBB0_14
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	w24, w24, #1
	cmp	w23, w24
	b.ne	LBB0_4
LBB0_6:
	subs	w21, w23, #1
	b.eq	LBB0_12
; %bb.7:
	mov	x22, #0
	lsl	x23, x21, #2
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x22, x22, #4
	cmp	x23, x22
	b.eq	LBB0_12
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	add	x0, x8, x22
	ldr	w8, [x0]
	cbz	w8, LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	bl	_mlxsw_thermal_module_tz_init
	cbz	w0, LBB0_8
; %bb.11:
	mov	x20, x0
	tbz	w21, #31, LBB0_15
	b	LBB0_17
LBB0_12:
	mov	w20, #0
	b	LBB0_18
LBB0_13:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_18
LBB0_14:
	mov	x20, x0
	sub	w21, w23, #1
	tbnz	w21, #31, LBB0_17
LBB0_15:
	add	w22, w21, #1
	mov	w8, w21
	lsl	x21, x8, #2
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	add	x0, x8, x21
	bl	_mlxsw_thermal_module_fini
	sub	w22, w22, #1
	sub	x21, x21, #4
	cmp	w22, #0
	b.gt	LBB0_16
LBB0_17:
	ldr	x0, [x19]
	bl	_kfree
LBB0_18:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_mlxsw_thermal_modules_init
.subsections_via_symbols
