	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ves1820_setup_reg0
_ves1820_setup_reg0:                    ## @ves1820_setup_reg0
	.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
	movl	(%rdi), %ebx
	andl	$98, %ebx
	orl	%esi, %ebx
	movq	_INVERSION_ON@GOTPCREL(%rip), %rax
	cmpl	%edx, (%rax)
	jne	LBB0_3
## %bb.1:
	movq	8(%r14), %rax
	cmpl	$0, (%rax)
	je	LBB0_5
LBB0_6:
	andl	$-33, %ebx
	jmp	LBB0_7
LBB0_3:
	movq	_INVERSION_OFF@GOTPCREL(%rip), %rax
	cmpl	%edx, (%rax)
	jne	LBB0_7
## %bb.4:
	movq	8(%r14), %rax
	cmpl	$0, (%rax)
	je	LBB0_6
LBB0_5:
	orl	$32, %ebx
LBB0_7:
	movl	%ebx, %edx
	andl	$254, %edx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_ves1820_writereg
	movl	%ebx, %edx
	orl	$1, %edx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_ves1820_writereg
	movl	%ebx, (%r14)
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INVERSION_ON,4,2               ## @INVERSION_ON
	.comm	_INVERSION_OFF,4,2              ## @INVERSION_OFF
	.no_dead_strip	_ves1820_setup_reg0
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ves1820_setup_reg0
_ves1820_setup_reg0:                    ; @ves1820_setup_reg0
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w8, [x0]
	mov	w9, #98
	and	w8, w8, w9
	orr	w20, w8, w1
Lloh0:
	adrp	x8, _INVERSION_ON@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INVERSION_ON@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w2
	b.ne	LBB0_2
; %bb.1:
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	and	w9, w20, #0xffffffdf
	orr	w10, w20, #0x20
	b	LBB0_4
LBB0_2:
Lloh3:
	adrp	x8, _INVERSION_OFF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _INVERSION_OFF@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w2
	b.ne	LBB0_5
; %bb.3:
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	orr	w9, w20, #0x20
	and	w10, w20, #0xffffffdf
LBB0_4:
	cmp	w8, #0
	csel	w20, w9, w10, ne
LBB0_5:
	and	w2, w20, #0xfe
	mov	x0, x19
	mov	w1, #0
	bl	_ves1820_writereg
	orr	w2, w20, #0x1
	mov	x0, x19
	mov	w1, #0
	bl	_ves1820_writereg
	str	w20, [x19]
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_INVERSION_ON,4,2               ; @INVERSION_ON
	.comm	_INVERSION_OFF,4,2              ; @INVERSION_OFF
	.no_dead_strip	_ves1820_setup_reg0
.subsections_via_symbols
