	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pmc_setup_dev
_pmc_setup_dev:                         ## @pmc_setup_dev
	.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	%rdi, %r15
	movq	(%rsi), %r14
	movq	(%r14), %r13
	movq	_ACPI_BASE_ADDR_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_acpi_base_addr@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdx
	callq	_pci_read_config_dword
	movq	_ACPI_BASE_ADDR_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%eax, (%rbx)
	je	LBB0_3
## %bb.1:
	movq	_pm_power_off@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_3
## %bb.2:
	movq	_pmc_power_off@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, (%rax)
LBB0_3:
	movq	_PMC_BASE_ADDR_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_pmc_device@GOTPCREL(%rip), %r12
	leaq	16(%r12), %rdx
	movq	%r15, %rdi
	callq	_pci_read_config_dword
	movq	_PMC_BASE_ADDR_MASK@GOTPCREL(%rip), %rax
	movl	16(%r12), %edi
	andl	(%rax), %edi
	movl	%edi, 16(%r12)
	movq	_PMC_MMIO_REG_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ioremap_nocache
	movl	%eax, 4(%r12)
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movq	%r13, 8(%r12)
	movq	%r12, %rdi
	callq	_pmc_hw_reg_setup
	movq	%r12, %rdi
	callq	_pmc_dbgfs_register
	movl	4(%r12), %esi
	movq	%r15, %rdi
	movq	%r14, %rdx
	callq	_pmc_setup_clks
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_dev_warn
LBB0_7:
	movl	$1, (%r12)
	jmp	LBB0_8
LBB0_4:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_pmc_device,24,3                ## @pmc_device
	.comm	_ACPI_BASE_ADDR_OFFSET,4,2      ## @ACPI_BASE_ADDR_OFFSET
	.comm	_acpi_base_addr,4,2             ## @acpi_base_addr
	.comm	_ACPI_BASE_ADDR_MASK,4,2        ## @ACPI_BASE_ADDR_MASK
	.comm	_pm_power_off,8,3               ## @pm_power_off
	.comm	_pmc_power_off,8,3              ## @pmc_power_off
	.comm	_PMC_BASE_ADDR_OFFSET,4,2       ## @PMC_BASE_ADDR_OFFSET
	.comm	_PMC_BASE_ADDR_MASK,4,2         ## @PMC_BASE_ADDR_MASK
	.comm	_PMC_MMIO_REG_LEN,4,2           ## @PMC_MMIO_REG_LEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"error: ioremap failed\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"platform clocks register failed: %d\n"

	.no_dead_strip	_pmc_setup_dev
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pmc_setup_dev
_pmc_setup_dev:                         ; @pmc_setup_dev
	.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
	mov	x19, x0
	ldr	x20, [x1]
	ldr	x22, [x20]
Lloh0:
	adrp	x8, _ACPI_BASE_ADDR_OFFSET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ACPI_BASE_ADDR_OFFSET@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x21, _acpi_base_addr@GOTPAGE
Lloh4:
	ldr	x21, [x21, _acpi_base_addr@GOTPAGEOFF]
	mov	x2, x21
	bl	_pci_read_config_dword
Lloh5:
	adrp	x8, _ACPI_BASE_ADDR_MASK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ACPI_BASE_ADDR_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	ldr	w9, [x21]
	and	w9, w9, w8
	str	w9, [x21]
Lloh8:
	adrp	x8, _pm_power_off@GOTPAGE
Lloh9:
	ldr	x8, [x8, _pm_power_off@GOTPAGEOFF]
	ldr	x10, [x8]
	cmp	w9, #0
	ccmp	x10, #0, #0, ne
	b.ne	LBB0_2
; %bb.1:
Lloh10:
	adrp	x9, _pmc_power_off@GOTPAGE
Lloh11:
	ldr	x9, [x9, _pmc_power_off@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	str	x9, [x8]
LBB0_2:
Lloh13:
	adrp	x8, _PMC_BASE_ADDR_OFFSET@GOTPAGE
Lloh14:
	ldr	x8, [x8, _PMC_BASE_ADDR_OFFSET@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x21, _pmc_device@GOTPAGE
Lloh17:
	ldr	x21, [x21, _pmc_device@GOTPAGEOFF]
	add	x2, x21, #16
	mov	x0, x19
	bl	_pci_read_config_dword
Lloh18:
	adrp	x8, _PMC_BASE_ADDR_MASK@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PMC_BASE_ADDR_MASK@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	ldr	w9, [x21, #16]
	and	w0, w9, w8
	str	w0, [x21, #16]
Lloh21:
	adrp	x8, _PMC_MMIO_REG_LEN@GOTPAGE
Lloh22:
	ldr	x8, [x8, _PMC_MMIO_REG_LEN@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	bl	_ioremap_nocache
	str	w0, [x21, #4]
	cbz	w0, LBB0_6
; %bb.3:
	str	x22, [x21, #8]
	mov	x0, x21
	bl	_pmc_hw_reg_setup
	mov	x0, x21
	bl	_pmc_dbgfs_register
	ldr	w1, [x21, #4]
	mov	x0, x19
	mov	x2, x20
	bl	_pmc_setup_clks
	mov	x20, x0
	cbz	w0, LBB0_5
; %bb.4:
Lloh24:
	adrp	x1, l_.str.1@PAGE
Lloh25:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_dev_warn
LBB0_5:
	mov	w8, #1
	str	w8, [x21]
	b	LBB0_7
LBB0_6:
Lloh26:
	adrp	x1, l_.str@PAGE
Lloh27:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh28:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_7:
	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
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_pmc_device,24,3                ; @pmc_device
	.comm	_ACPI_BASE_ADDR_OFFSET,4,2      ; @ACPI_BASE_ADDR_OFFSET
	.comm	_acpi_base_addr,4,2             ; @acpi_base_addr
	.comm	_ACPI_BASE_ADDR_MASK,4,2        ; @ACPI_BASE_ADDR_MASK
	.comm	_pm_power_off,8,3               ; @pm_power_off
	.comm	_pmc_power_off,8,3              ; @pmc_power_off
	.comm	_PMC_BASE_ADDR_OFFSET,4,2       ; @PMC_BASE_ADDR_OFFSET
	.comm	_PMC_BASE_ADDR_MASK,4,2         ; @PMC_BASE_ADDR_MASK
	.comm	_PMC_MMIO_REG_LEN,4,2           ; @PMC_MMIO_REG_LEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"error: ioremap failed\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"platform clocks register failed: %d\n"

	.no_dead_strip	_pmc_setup_dev
.subsections_via_symbols
