	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stw481x_get_pctl_reg
_stw481x_get_pctl_reg:                  ## @stw481x_get_pctl_reg
	.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
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movl	%esi, %edx
	shrl	$3, %edx
	andl	$3, %edx
	movl	(%rdi), %edi
	movq	_STW_PCTL_REG_HI@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_regmap_write
	testl	%eax, %eax
	jne	LBB0_7
## %bb.1:
	movl	%r14d, %eax
	shll	$5, %eax
	movzbl	%al, %edx
	movl	(%rbx), %edi
	movq	_STW_PCTL_REG_LO@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_regmap_write
	testl	%eax, %eax
	jne	LBB0_7
## %bb.2:
	movl	(%rbx), %edi
	movl	(%r15), %esi
	leaq	-36(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	jne	LBB0_7
## %bb.3:
	movl	-36(%rbp), %r15d
	movl	(%rbx), %edi
	movl	(%r12), %esi
	leaq	-36(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	jne	LBB0_7
## %bb.4:
	andl	$3, %r15d
	movl	-36(%rbp), %eax
	movl	%eax, %ecx
	shrl	$5, %ecx
	andl	$7, %ecx
	leal	(%rcx,%r15,8), %ecx
	cmpl	%r14d, %ecx
	jne	LBB0_5
## %bb.6:
	shrl	%eax
	andl	$15, %eax
	jmp	LBB0_7
LBB0_5:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STW_PCTL_REG_HI,4,2            ## @STW_PCTL_REG_HI
	.comm	_STW_PCTL_REG_LO,4,2            ## @STW_PCTL_REG_LO
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_stw481x_get_pctl_reg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stw481x_get_pctl_reg
_stw481x_get_pctl_reg:                  ; @stw481x_get_pctl_reg
	.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, x1
	mov	x20, x0
	ubfx	w2, w1, #3, #2
	ldr	w0, [x0]
Lloh0:
	adrp	x21, _STW_PCTL_REG_HI@GOTPAGE
Lloh1:
	ldr	x21, [x21, _STW_PCTL_REG_HI@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_regmap_write
	cbnz	w0, LBB0_7
; %bb.1:
	ubfiz	w2, w19, #5, #3
	ldr	w0, [x20]
Lloh2:
	adrp	x22, _STW_PCTL_REG_LO@GOTPAGE
Lloh3:
	ldr	x22, [x22, _STW_PCTL_REG_LO@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_regmap_write
	cbnz	w0, LBB0_7
; %bb.2:
	ldr	w0, [x20]
	ldr	w1, [x21]
	add	x2, sp, #12
	bl	_regmap_read
	cbnz	w0, LBB0_7
; %bb.3:
	ldr	w21, [sp, #12]
	ldr	w0, [x20]
	ldr	w1, [x22]
	add	x2, sp, #12
	bl	_regmap_read
	cbnz	w0, LBB0_7
; %bb.4:
	ubfiz	w9, w21, #3, #2
	ldr	w8, [sp, #12]
	bfxil	w9, w8, #5, #3
	cmp	w9, w19
	b.ne	LBB0_6
; %bb.5:
	ubfx	w0, w8, #1, #4
	b	LBB0_7
LBB0_6:
Lloh4:
	adrp	x8, _EIO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_STW_PCTL_REG_HI,4,2            ; @STW_PCTL_REG_HI
	.comm	_STW_PCTL_REG_LO,4,2            ; @STW_PCTL_REG_LO
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_stw481x_get_pctl_reg
.subsections_via_symbols
