	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_menlow_memory_add
_intel_menlow_memory_add:               ## @intel_menlow_memory_add
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%ebx, %ebx
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r14
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	movl	16(%rdi), %edi
	movq	_MEMORY_GET_BANDWIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_acpi_has_method
	testl	%eax, %eax
	je	LBB0_10
## %bb.3:
	movl	16(%r14), %edi
	movq	_MEMORY_SET_BANDWIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_acpi_has_method
	testl	%eax, %eax
	je	LBB0_10
## %bb.4:
	leaq	L_.str(%rip), %rdi
	movq	_memory_cooling_ops@GOTPCREL(%rip), %rdx
	movq	%r14, %rsi
	callq	_thermal_cooling_device_register
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.11:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%r15, 8(%r14)
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_sysfs_create_link
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.6:
	leaq	L_.str.2(%rip), %rdx
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_sysfs_create_link
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_sysfs_remove_link
LBB0_9:
	movq	%r15, %rdi
	callq	_thermal_cooling_device_unregister
	jmp	LBB0_10
LBB0_7:
	xorl	%ebx, %ebx
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MEMORY_GET_BANDWIDTH,4,2       ## @MEMORY_GET_BANDWIDTH
	.comm	_MEMORY_SET_BANDWIDTH,4,2       ## @MEMORY_SET_BANDWIDTH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Memory controller"

	.comm	_memory_cooling_ops,4,2         ## @memory_cooling_ops
L_.str.1:                               ## @.str.1
	.asciz	"thermal_cooling"

L_.str.2:                               ## @.str.2
	.asciz	"device"

	.no_dead_strip	_intel_menlow_memory_add
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_menlow_memory_add
_intel_menlow_memory_add:               ; @intel_menlow_memory_add
	.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
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _ENODEV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w20, w8
	ldr	w0, [x0, #16]
Lloh3:
	adrp	x8, _MEMORY_GET_BANDWIDTH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MEMORY_GET_BANDWIDTH@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_acpi_has_method
	cbz	w0, LBB0_6
; %bb.2:
	ldr	w0, [x19, #16]
Lloh6:
	adrp	x8, _MEMORY_SET_BANDWIDTH@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MEMORY_SET_BANDWIDTH@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_acpi_has_method
	cbz	w0, LBB0_6
; %bb.3:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
Lloh11:
	adrp	x2, _memory_cooling_ops@GOTPAGE
Lloh12:
	ldr	x2, [x2, _memory_cooling_ops@GOTPAGEOFF]
	mov	x1, x19
	bl	_thermal_cooling_device_register
	mov	x21, x0
	bl	_IS_ERR
	cbz	x0, LBB0_7
; %bb.4:
	mov	x0, x21
	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
	b	_PTR_ERR
LBB0_5:
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_6:
	mov	x0, x20
	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
LBB0_7:
	str	x21, [x19, #8]
Lloh16:
	adrp	x2, l_.str.1@PAGE
Lloh17:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x1, x21
	bl	_sysfs_create_link
	mov	x20, x0
	cbnz	w0, LBB0_10
; %bb.8:
Lloh18:
	adrp	x2, l_.str.2@PAGE
Lloh19:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x21
	mov	x1, x19
	bl	_sysfs_create_link
	mov	x20, x0
	cbz	w0, LBB0_6
; %bb.9:
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_sysfs_remove_link
LBB0_10:
	mov	x0, x21
	bl	_thermal_cooling_device_unregister
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MEMORY_GET_BANDWIDTH,4,2       ; @MEMORY_GET_BANDWIDTH
	.comm	_MEMORY_SET_BANDWIDTH,4,2       ; @MEMORY_SET_BANDWIDTH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Memory controller"

	.comm	_memory_cooling_ops,4,2         ; @memory_cooling_ops
l_.str.1:                               ; @.str.1
	.asciz	"thermal_cooling"

l_.str.2:                               ; @.str.2
	.asciz	"device"

	.no_dead_strip	_intel_menlow_memory_add
.subsections_via_symbols
