	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pcc_get_offset
_pcc_get_offset:                        ## @pcc_get_offset
	.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	%edi, %r14d
	movq	_ACPI_ALLOCATE_BUFFER@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movq	%rax, -64(%rbp)
	movq	$0, -56(%rbp)
	movl	$0, -48(%rbp)
	movq	_processors@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r14d, %esi
	callq	_per_cpu
	movq	%rax, %rbx
	movq	_pcc_cpu_info@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r14d, %esi
	callq	_per_cpu_ptr
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	leaq	-64(%rbp), %rcx
	xorl	%edx, %edx
	callq	_acpi_evaluate_object
	movl	%eax, %edi
	callq	_ACPI_FAILURE
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_12
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_12
LBB0_4:
	movq	-64(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:
	movq	(%rdi), %rax
	movq	_ACPI_TYPE_PACKAGE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.7:
	testq	%rax, %rax
	je	LBB0_6
## %bb.8:
	movq	(%rax), %rax
	movq	_ACPI_TYPE_INTEGER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.9:
	movq	%rax, 8(%r15)
	movq	(%rdi), %rcx
	cmpq	%rax, 8(%rcx)
	jne	LBB0_6
## %bb.10:
	movq	%rax, (%r15)
	movq	_pcch_virt_addr@GOTPCREL(%rip), %r12
	addq	(%r12), %rax
	movq	_BUF_SZ@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	xorl	%ebx, %ebx
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_memset_io
	movq	(%r15), %rdi
	addq	(%r12), %rdi
	movl	(%r13), %edx
	xorl	%esi, %esi
	callq	_memset_io
	movq	(%r15), %rcx
	movq	8(%r15), %rdx
	leaq	L_.str.1(%rip), %rdi
	movl	%r14d, %esi
	callq	_dprintk
	movq	-64(%rbp), %rdi
	jmp	LBB0_11
LBB0_6:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_11:
	callq	_kfree
LBB0_12:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ACPI_ALLOCATE_BUFFER,4,2       ## @ACPI_ALLOCATE_BUFFER
	.comm	_processors,4,2                 ## @processors
	.comm	_pcc_cpu_info,4,2               ## @pcc_cpu_info
	.comm	_ENODEV,4,2                     ## @ENODEV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PCCP"

	.comm	_ACPI_TYPE_PACKAGE,8,3          ## @ACPI_TYPE_PACKAGE
	.comm	_ACPI_TYPE_INTEGER,8,3          ## @ACPI_TYPE_INTEGER
	.comm	_pcch_virt_addr,8,3             ## @pcch_virt_addr
	.comm	_BUF_SZ,4,2                     ## @BUF_SZ
L_.str.1:                               ## @.str.1
	.asciz	"pcc_get_offset: for CPU %d: pcc_cpu_data input_offset: 0x%x, pcc_cpu_data output_offset: 0x%x\n"

	.no_dead_strip	_pcc_get_offset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pcc_get_offset
_pcc_get_offset:                        ; @pcc_get_offset
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x0
Lloh0:
	adrp	x8, _ACPI_ALLOCATE_BUFFER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ACPI_ALLOCATE_BUFFER@GOTPAGEOFF]
Lloh2:
	ldrsw	x8, [x8]
	stp	x8, xzr, [sp, #8]
	str	wzr, [sp, #24]
Lloh3:
	adrp	x8, _processors@GOTPAGE
Lloh4:
	ldr	x8, [x8, _processors@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_per_cpu
	mov	x21, x0
Lloh6:
	adrp	x8, _pcc_cpu_info@GOTPAGE
Lloh7:
	ldr	x8, [x8, _pcc_cpu_info@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_per_cpu_ptr
	cbz	x21, LBB0_2
; %bb.1:
	mov	x20, x0
	ldr	w0, [x21]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	add	x3, sp, #8
	mov	x2, #0
	bl	_acpi_evaluate_object
	bl	_ACPI_FAILURE
	cbz	x0, LBB0_3
LBB0_2:
Lloh11:
	adrp	x8, _ENODEV@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_11
LBB0_3:
	ldr	x0, [sp, #8]
	cbz	x0, LBB0_9
; %bb.4:
	ldr	x8, [x0]
Lloh14:
	adrp	x9, _ACPI_TYPE_PACKAGE@GOTPAGE
Lloh15:
	ldr	x9, [x9, _ACPI_TYPE_PACKAGE@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.5:
	cbz	x8, LBB0_9
; %bb.6:
	ldr	x8, [x8]
Lloh17:
	adrp	x9, _ACPI_TYPE_INTEGER@GOTPAGE
Lloh18:
	ldr	x9, [x9, _ACPI_TYPE_INTEGER@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.7:
	str	x8, [x20, #8]
	ldr	x9, [x0]
	ldr	x9, [x9, #8]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.8:
Lloh20:
	adrp	x21, _pcch_virt_addr@GOTPAGE
Lloh21:
	ldr	x21, [x21, _pcch_virt_addr@GOTPAGEOFF]
	str	x8, [x20]
	ldr	x9, [x21]
	add	x0, x9, x8
Lloh22:
	adrp	x22, _BUF_SZ@GOTPAGE
Lloh23:
	ldr	x22, [x22, _BUF_SZ@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	w1, #0
	bl	_memset_io
	ldr	x8, [x21]
	ldr	x9, [x20]
	add	x0, x9, x8
	ldr	w2, [x22]
	mov	w1, #0
	bl	_memset_io
	ldp	x3, x2, [x20]
Lloh24:
	adrp	x0, l_.str.1@PAGE
Lloh25:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_dprintk
	mov	w19, #0
	ldr	x0, [sp, #8]
	b	LBB0_10
LBB0_9:
Lloh26:
	adrp	x8, _ENODEV@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_10:
	bl	_kfree
LBB0_11:
	mov	x0, x19
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_ACPI_ALLOCATE_BUFFER,4,2       ; @ACPI_ALLOCATE_BUFFER
	.comm	_processors,4,2                 ; @processors
	.comm	_pcc_cpu_info,4,2               ; @pcc_cpu_info
	.comm	_ENODEV,4,2                     ; @ENODEV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PCCP"

	.comm	_ACPI_TYPE_PACKAGE,8,3          ; @ACPI_TYPE_PACKAGE
	.comm	_ACPI_TYPE_INTEGER,8,3          ; @ACPI_TYPE_INTEGER
	.comm	_pcch_virt_addr,8,3             ; @pcch_virt_addr
	.comm	_BUF_SZ,4,2                     ; @BUF_SZ
l_.str.1:                               ; @.str.1
	.asciz	"pcc_get_offset: for CPU %d: pcc_cpu_data input_offset: 0x%x, pcc_cpu_data output_offset: 0x%x\n"

	.no_dead_strip	_pcc_get_offset
.subsections_via_symbols
