	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pvr2_hdw_gpio_chg_out          ## -- Begin function pvr2_hdw_gpio_chg_out
	.p2align	4, 0x90
_pvr2_hdw_gpio_chg_out:                 ## @pvr2_hdw_gpio_chg_out
	.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	%edx, %r15d
	movq	%rdi, %r14
	cmpl	$-1, %esi
	je	LBB0_3
## %bb.1:
	movl	%esi, %ebx
	movq	_PVR2_GPIO_OUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-36(%rbp), %rdx
	movq	%r14, %rdi
	callq	_pvr2_read_register
	testl	%eax, %eax
	jne	LBB0_5
## %bb.2:
	movl	%ebx, %eax
	notl	%eax
	movl	-36(%rbp), %r8d
	andl	%r8d, %eax
	movl	%r15d, %r12d
	andl	%ebx, %r12d
	orl	%eax, %r12d
	movq	_PVR2_TRACE_GPIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	movl	%r15d, %ecx
	movl	%r12d, %r9d
	xorl	%eax, %eax
	callq	_pvr2_trace
	movl	%r12d, %r15d
	jmp	LBB0_4
LBB0_3:
	movq	_PVR2_TRACE_GPIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_pvr2_trace
LBB0_4:
	movq	_PVR2_GPIO_OUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_pvr2_write_register
LBB0_5:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PVR2_GPIO_OUT,4,2              ## @PVR2_GPIO_OUT
	.comm	_PVR2_TRACE_GPIO,4,2            ## @PVR2_TRACE_GPIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"GPIO output changing 0x%x:0x%x from 0x%x to 0x%x"

L_.str.1:                               ## @.str.1
	.asciz	"GPIO output changing to 0x%x"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pvr2_hdw_gpio_chg_out          ; -- Begin function pvr2_hdw_gpio_chg_out
	.p2align	2
_pvr2_hdw_gpio_chg_out:                 ; @pvr2_hdw_gpio_chg_out
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x2
	mov	x19, x0
Lloh0:
	adrp	x22, _PVR2_GPIO_OUT@GOTPAGE
Lloh1:
	ldr	x22, [x22, _PVR2_GPIO_OUT@GOTPAGEOFF]
	cmn	w1, #1
	b.eq	LBB0_3
; %bb.1:
	mov	x21, x1
	ldr	w1, [x22]
	add	x2, sp, #28
	mov	x0, x19
	bl	_pvr2_read_register
	cbnz	w0, LBB0_5
; %bb.2:
	mvn	w8, w21
	ldr	w9, [sp, #28]
	and	w8, w9, w8
	and	w10, w20, w21
	orr	w23, w8, w10
Lloh2:
	adrp	x8, _PVR2_TRACE_GPIO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PVR2_TRACE_GPIO@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	stp	x20, x9, [sp]
	str	x23, [sp, #16]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_pvr2_trace
	mov	x20, x23
	b	LBB0_4
LBB0_3:
Lloh7:
	adrp	x8, _PVR2_TRACE_GPIO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PVR2_TRACE_GPIO@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	bl	_pvr2_trace
LBB0_4:
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x20
	bl	_pvr2_write_register
LBB0_5:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_PVR2_GPIO_OUT,4,2              ; @PVR2_GPIO_OUT
	.comm	_PVR2_TRACE_GPIO,4,2            ; @PVR2_TRACE_GPIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"GPIO output changing 0x%x:0x%x from 0x%x to 0x%x"

l_.str.1:                               ; @.str.1
	.asciz	"GPIO output changing to 0x%x"

.subsections_via_symbols
