	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aspeed_create_fan
_aspeed_create_fan:                     ## @aspeed_create_fan
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r15
	leaq	L_.str(%rip), %rsi
	leaq	-40(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_of_property_read_u32
	testl	%eax, %eax
	je	LBB0_1
LBB0_10:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	-40(%rbp), %esi
	movq	%r14, %rdi
	callq	_aspeed_create_pwm_port
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_of_property_count_u8_elems
	testl	%eax, %eax
	jle	LBB0_3
## %bb.2:
	movq	-40(%rbp), %rcx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	movl	%eax, %r8d
	callq	_aspeed_create_pwm_cooling
	testl	%eax, %eax
	jne	LBB0_10
LBB0_3:
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	callq	_of_property_count_u8_elems
	testl	%eax, %eax
	jle	LBB0_4
## %bb.6:
	movl	%eax, %r12d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	$4, %edx
	callq	_devm_kcalloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, %r15
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	movq	%rax, %rdx
	movl	%r12d, %ecx
	callq	_of_property_read_u8_array
	testl	%eax, %eax
	jne	LBB0_10
## %bb.9:
	movq	-40(%rbp), %rcx
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	%r12d, %edx
	callq	_aspeed_create_fan_tach_channel
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
LBB0_5:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"reg"

L_.str.1:                               ## @.str.1
	.asciz	"cooling-levels"

L_.str.2:                               ## @.str.2
	.asciz	"aspeed,fan-tach-ch"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_aspeed_create_fan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aspeed_create_fan
_aspeed_create_fan:                     ; @aspeed_create_fan
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #8
	mov	x0, x20
	bl	_of_property_read_u32
	cbz	w0, LBB0_2
LBB0_1:
	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
	add	sp, sp, #64
	ret
LBB0_2:
	ldr	w1, [sp, #8]
	mov	x0, x19
	bl	_aspeed_create_pwm_port
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_of_property_count_u8_elems
	cmp	w0, #1
	b.lt	LBB0_4
; %bb.3:
	mov	x4, x0
	ldr	x3, [sp, #8]
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_aspeed_create_pwm_cooling
	cbnz	w0, LBB0_1
LBB0_4:
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_of_property_count_u8_elems
	cmp	w0, #0
	b.le	LBB0_8
; %bb.5:
	mov	x22, x0
Lloh6:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	x0, x21
	mov	x1, x22
	mov	w2, #4
	bl	_devm_kcalloc
	cbz	x0, LBB0_9
; %bb.6:
	mov	x21, x0
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	mov	x3, x22
	bl	_of_property_read_u8_array
	cbnz	w0, LBB0_1
; %bb.7:
	ldr	x3, [sp, #8]
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_aspeed_create_fan_tach_channel
	mov	w0, #0
	b	LBB0_1
LBB0_8:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_1
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"reg"

l_.str.1:                               ; @.str.1
	.asciz	"cooling-levels"

l_.str.2:                               ; @.str.2
	.asciz	"aspeed,fan-tach-ch"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_aspeed_create_fan
.subsections_via_symbols
