	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aspeed_create_pwm_cooling
_aspeed_create_pwm_cooling:             ## @aspeed_create_pwm_cooling
	.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
	movl	%r8d, %r14d
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r13
	movq	%rdi, %r12
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movl	$40, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movl	(%rbx), %edx
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_devm_kzalloc
	movq	%rax, 24(%r15)
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	leal	-1(%r14), %ecx
	movl	%ecx, 32(%r15)
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	movq	%rax, %rdx
	movl	%r14d, %ecx
	callq	_of_property_read_u8_array
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_err
	jmp	LBB0_7
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	20(%r15), %edi
	movq	_MAX_CDEV_NAME_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%r13, %rcx
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %r8d
	callq	_snprintf
	movl	20(%r15), %edx
	movq	_aspeed_pwm_cool_ops@GOTPCREL(%rip), %r8
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	%r15, %rcx
	callq	_devm_thermal_of_cooling_device_register
	movl	%eax, 16(%r15)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_6
## %bb.8:
	movl	16(%r15), %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_6:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 8(%r15)
	movl	%ebx, (%r15)
	movq	(%rax), %rax
	movslq	%ebx, %rcx
	movq	%r15, (%rax,%rcx,8)
	xorl	%ebx, %ebx
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cooling-levels"

L_.str.1:                               ## @.str.1
	.asciz	"Property 'cooling-levels' cannot be read.\n"

	.comm	_MAX_CDEV_NAME_LEN,4,2          ## @MAX_CDEV_NAME_LEN
L_.str.2:                               ## @.str.2
	.asciz	"%pOFn%d"

	.comm	_aspeed_pwm_cool_ops,4,2        ## @aspeed_pwm_cool_ops
	.no_dead_strip	_aspeed_create_pwm_cooling
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aspeed_create_pwm_cooling
_aspeed_create_pwm_cooling:             ; @aspeed_create_pwm_cooling
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x24, x4
	mov	x19, x3
	mov	x20, x2
	mov	x23, x1
	mov	x22, x0
Lloh0:
	adrp	x25, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x25, [x25, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x25]
	mov	w1, #40
	bl	_devm_kzalloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x21, x0
	ldr	w2, [x25]
	mov	x0, x22
	mov	x1, x24
	bl	_devm_kzalloc
	str	x0, [x21, #24]
	cbz	x0, LBB0_4
; %bb.2:
	mov	x2, x0
	sub	w8, w24, #1
	str	w8, [x21, #32]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	mov	x3, x24
	bl	_of_property_read_u8_array
	cbz	w0, LBB0_6
; %bb.3:
	mov	x24, x0
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x22
	bl	_dev_err
	b	LBB0_5
LBB0_4:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w24, w8
LBB0_5:
	mov	x0, x24
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_6:
	ldr	w0, [x21, #20]
Lloh9:
	adrp	x8, _MAX_CDEV_NAME_LEN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MAX_CDEV_NAME_LEN@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x2, l_.str.2@PAGE
Lloh13:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x3, x23
	mov	x4, x19
	bl	_snprintf
	ldr	w2, [x21, #20]
Lloh14:
	adrp	x4, _aspeed_pwm_cool_ops@GOTPAGE
Lloh15:
	ldr	x4, [x4, _aspeed_pwm_cool_ops@GOTPAGEOFF]
	mov	x0, x22
	mov	x1, x23
	mov	x3, x21
	bl	_devm_thermal_of_cooling_device_register
	str	w0, [x21, #16]
	bl	_IS_ERR
	cbz	x0, LBB0_8
; %bb.7:
	ldr	w0, [x21, #16]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_PTR_ERR
LBB0_8:
	mov	w24, #0
	str	x20, [x21, #8]
	str	w19, [x21]
	ldr	x8, [x20]
	str	x21, [x8, w19, sxtw #3]
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cooling-levels"

l_.str.1:                               ; @.str.1
	.asciz	"Property 'cooling-levels' cannot be read.\n"

	.comm	_MAX_CDEV_NAME_LEN,4,2          ; @MAX_CDEV_NAME_LEN
l_.str.2:                               ; @.str.2
	.asciz	"%pOFn%d"

	.comm	_aspeed_pwm_cool_ops,4,2        ; @aspeed_pwm_cool_ops
	.no_dead_strip	_aspeed_create_pwm_cooling
.subsections_via_symbols
