	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __rc5t583_set_ext_pwrreq2_control
___rc5t583_set_ext_pwrreq2_control:     ## @__rc5t583_set_ext_pwrreq2_control
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	_RC5T583_DS_DC0@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jne	LBB0_1
## %bb.2:
	movq	_RICOH_ONOFFSEL_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	$2, %edi
	callq	_BIT
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_rc5t583_set_bits
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_4
LBB0_1:
	movl	%esi, %edx
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_4:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RC5T583_DS_DC0,4,2             ## @RC5T583_DS_DC0
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PWRREQ2 is invalid control for rail %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_RICOH_ONOFFSEL_REG,4,2         ## @RICOH_ONOFFSEL_REG
L_.str.1:                               ## @.str.1
	.asciz	"Error in updating the ONOFFSEL 0x10 register\n"

	.no_dead_strip	___rc5t583_set_ext_pwrreq2_control
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __rc5t583_set_ext_pwrreq2_control
___rc5t583_set_ext_pwrreq2_control:     ; @__rc5t583_set_ext_pwrreq2_control
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
                                        ; kill: def $w1 killed $w1 def $x1
	mov	x19, x0
Lloh0:
	adrp	x8, _RC5T583_DS_DC0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RC5T583_DS_DC0@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.ne	LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _RICOH_ONOFFSEL_REG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RICOH_ONOFFSEL_REG@GOTPAGEOFF]
Lloh5:
	ldr	w20, [x8]
	mov	w0, #2
	bl	_BIT
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_rc5t583_set_bits
	mov	x20, x0
	tbz	w0, #31, LBB0_4
; %bb.2:
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_4
LBB0_3:
	str	x1, [sp]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_4:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_RC5T583_DS_DC0,4,2             ; @RC5T583_DS_DC0
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PWRREQ2 is invalid control for rail %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_RICOH_ONOFFSEL_REG,4,2         ; @RICOH_ONOFFSEL_REG
l_.str.1:                               ; @.str.1
	.asciz	"Error in updating the ONOFFSEL 0x10 register\n"

	.no_dead_strip	___rc5t583_set_ext_pwrreq2_control
.subsections_via_symbols
