	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mantis_gpio_set_bits           ## -- Begin function mantis_gpio_set_bits
	.p2align	4, 0x90
_mantis_gpio_set_bits:                  ## @mantis_gpio_set_bits
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	_MANTIS_DEBUG@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	leaq	L_.str(%rip), %rdx
	movl	$1, %esi
	movl	%ebx, %ecx
	movq	%r15, %r8
	xorl	%eax, %eax
	callq	_dprintk
	movq	_MANTIS_GPIF_ADDR@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	_mmread
	movl	%eax, %ecx
	btrl	%ebx, %ecx
	btsl	%ebx, %eax
	testq	%r15, %r15
	cmovnel	%eax, %ecx
	movl	%ecx, (%r14)
	movl	(%r12), %edi
	leaq	L_.str.1(%rip), %rdx
	movl	$1, %esi
	xorl	%eax, %eax
	callq	_dprintk
	movl	(%r14), %edi
	movl	(%r13), %esi
	callq	_mmwrite
	movq	_MANTIS_GPIF_DOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edi, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mmwrite                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MANTIS_DEBUG,4,2               ## @MANTIS_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Set Bit <%d> to <%d>"

	.comm	_MANTIS_GPIF_ADDR,4,2           ## @MANTIS_GPIF_ADDR
L_.str.1:                               ## @.str.1
	.asciz	"GPIO Value <%02x>"

	.comm	_MANTIS_GPIF_DOUT,4,2           ## @MANTIS_GPIF_DOUT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mantis_gpio_set_bits           ; -- Begin function mantis_gpio_set_bits
	.p2align	2
_mantis_gpio_set_bits:                  ; @mantis_gpio_set_bits
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x22, _MANTIS_DEBUG@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MANTIS_DEBUG@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh2:
	adrp	x2, l_.str@PAGE
Lloh3:
	add	x2, x2, l_.str@PAGEOFF
	str	x19, [sp]
	mov	w23, #1
	mov	w1, #1
	mov	x3, x20
	bl	_dprintk
Lloh4:
	adrp	x24, _MANTIS_GPIF_ADDR@GOTPAGE
Lloh5:
	ldr	x24, [x24, _MANTIS_GPIF_ADDR@GOTPAGEOFF]
	ldr	w0, [x24]
	bl	_mmread
	lsl	w8, w23, w20
	bic	w9, w0, w8
	orr	w8, w0, w8
	cmp	x19, #0
	csel	w3, w9, w8, eq
	str	w3, [x21]
	ldr	w0, [x22]
Lloh6:
	adrp	x2, l_.str.1@PAGE
Lloh7:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	w1, #1
	bl	_dprintk
	ldr	w0, [x21]
	ldr	w1, [x24]
	bl	_mmwrite
Lloh8:
	adrp	x8, _MANTIS_GPIF_DOUT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MANTIS_GPIF_DOUT@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	w0, #0
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_mmwrite
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_MANTIS_DEBUG,4,2               ; @MANTIS_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Set Bit <%d> to <%d>"

	.comm	_MANTIS_GPIF_ADDR,4,2           ; @MANTIS_GPIF_ADDR
l_.str.1:                               ; @.str.1
	.asciz	"GPIO Value <%02x>"

	.comm	_MANTIS_GPIF_DOUT,4,2           ; @MANTIS_GPIF_DOUT
.subsections_via_symbols
