	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function regmap_ipc_byte_reg_read
_regmap_ipc_byte_reg_read:              ## @regmap_ipc_byte_reg_read
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movq	%rdx, %r14
	movq	%rdi, %r15
	movq	_REG_ADDR_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	andl	%esi, %edx
	movq	_REG_ADDR_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%edx, %eax
	shrl	%cl, %eax
	testl	%edx, %edx
	jne	LBB0_4
## %bb.3:
	movq	_BXTWC_DEVICE1_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_4:
	movq	_REG_OFFSET_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %esi
	movl	%esi, -40(%rbp)
	movl	%eax, -36(%rbp)
	movq	_PMC_IPC_PMIC_ACCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_PMC_IPC_PMIC_ACCESS_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-40(%rbp), %rdx
	leaq	-64(%rbp), %r8
	movl	$8, %ecx
	movl	$1, %r9d
	callq	_intel_pmc_ipc_command
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %ebx
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_7
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_7
LBB0_6:
	movl	-64(%rbp), %eax
	movl	%eax, (%r14)
	xorl	%ebx, %ebx
LBB0_7:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_9
## %bb.8:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_REG_ADDR_MASK,4,2              ## @REG_ADDR_MASK
	.comm	_REG_ADDR_SHIFT,4,2             ## @REG_ADDR_SHIFT
	.comm	_BXTWC_DEVICE1_ADDR,4,2         ## @BXTWC_DEVICE1_ADDR
	.comm	_REG_OFFSET_MASK,4,2            ## @REG_OFFSET_MASK
	.comm	_PMC_IPC_PMIC_ACCESS,4,2        ## @PMC_IPC_PMIC_ACCESS
	.comm	_PMC_IPC_PMIC_ACCESS_READ,4,2   ## @PMC_IPC_PMIC_ACCESS_READ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to read from PMIC\n"

	.no_dead_strip	_regmap_ipc_byte_reg_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function regmap_ipc_byte_reg_read
_regmap_ipc_byte_reg_read:              ; @regmap_ipc_byte_reg_read
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x2
	mov	x20, x0
Lloh3:
	adrp	x8, _REG_ADDR_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _REG_ADDR_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _REG_ADDR_SHIFT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _REG_ADDR_SHIFT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	ands	w8, w8, w1
	lsr	w8, w8, w9
Lloh9:
	adrp	x9, _BXTWC_DEVICE1_ADDR@GOTPAGE
Lloh10:
	ldr	x9, [x9, _BXTWC_DEVICE1_ADDR@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	csel	w8, w9, w8, eq
Lloh12:
	adrp	x9, _REG_OFFSET_MASK@GOTPAGE
Lloh13:
	ldr	x9, [x9, _REG_OFFSET_MASK@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	and	w9, w9, w1
	stp	w9, w8, [sp, #16]
Lloh15:
	adrp	x8, _PMC_IPC_PMIC_ACCESS@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PMC_IPC_PMIC_ACCESS@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
Lloh18:
	adrp	x8, _PMC_IPC_PMIC_ACCESS_READ@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PMC_IPC_PMIC_ACCESS_READ@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	add	x2, sp, #16
	mov	x4, sp
	mov	w3, #8
	mov	w5, #1
	bl	_intel_pmc_ipc_command
	mov	x21, x0
	cbz	w0, LBB0_4
; %bb.2:
	ldr	w0, [x20]
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_5
LBB0_3:
Lloh23:
	adrp	x8, _EINVAL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_5
LBB0_4:
	ldr	w8, [sp]
	str	w8, [x19]
LBB0_5:
	ldr	x8, [sp, #24]
Lloh26:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh27:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	mov	x0, x21
	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
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_REG_ADDR_MASK,4,2              ; @REG_ADDR_MASK
	.comm	_REG_ADDR_SHIFT,4,2             ; @REG_ADDR_SHIFT
	.comm	_BXTWC_DEVICE1_ADDR,4,2         ; @BXTWC_DEVICE1_ADDR
	.comm	_REG_OFFSET_MASK,4,2            ; @REG_OFFSET_MASK
	.comm	_PMC_IPC_PMIC_ACCESS,4,2        ; @PMC_IPC_PMIC_ACCESS
	.comm	_PMC_IPC_PMIC_ACCESS_READ,4,2   ; @PMC_IPC_PMIC_ACCESS_READ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to read from PMIC\n"

	.no_dead_strip	_regmap_ipc_byte_reg_read
.subsections_via_symbols
