	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mace_write
_mace_write:                            ## @mace_write
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r12d
	movl	%edx, %ebx
	movl	%esi, %r15d
	movl	%edx, %eax
	sarl	$4, %eax
	cmpl	$1, %eax
	je	LBB0_3
## %bb.1:
	testl	%eax, %eax
	jne	LBB0_4
## %bb.2:
	movzbl	%r12b, %edi
	movq	_AM2150_MACE_BASE@GOTPCREL(%rip), %rax
	addl	%r15d, %ebx
	addl	(%rax), %ebx
	movl	%ebx, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_outb                           ## TAILCALL
LBB0_3:
	movq	%rdi, %r14
	callq	_spin_lock_irqsave
	movl	$1, %edi
	callq	_MACEBANK
	movzbl	%r12b, %edi
	movq	_AM2150_MACE_BASE@GOTPCREL(%rip), %rax
	andl	$15, %ebx
	addl	%r15d, %ebx
	addl	(%rax), %ebx
	movl	%ebx, %esi
	callq	_outb
	xorl	%edi, %edi
	callq	_MACEBANK
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
LBB0_4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AM2150_MACE_BASE,4,2           ## @AM2150_MACE_BASE
	.no_dead_strip	_mace_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mace_write
_mace_write:                            ; @mace_write
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x22, x3
	mov	x21, x2
	mov	x20, x1
	asr	w8, w2, #4
	cmp	w8, #1
	b.eq	LBB0_3
; %bb.1:
	cbnz	w8, LBB0_4
; %bb.2:
Lloh0:
	adrp	x8, _AM2150_MACE_BASE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AM2150_MACE_BASE@GOTPAGEOFF]
	and	w0, w22, #0xff
Lloh2:
	ldr	w8, [x8]
	add	w9, w21, w20
	add	w1, w9, w8
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_outb
LBB0_3:
	mov	x19, x0
	bl	_spin_lock_irqsave
	mov	w0, #1
	bl	_MACEBANK
	and	w0, w22, #0xff
Lloh3:
	adrp	x8, _AM2150_MACE_BASE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AM2150_MACE_BASE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	and	w9, w21, #0xf
	add	w9, w9, w20
	add	w1, w9, w8
	bl	_outb
	mov	w0, #0
	bl	_MACEBANK
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_spin_unlock_irqrestore
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_AM2150_MACE_BASE,4,2           ; @AM2150_MACE_BASE
	.no_dead_strip	_mace_write
.subsections_via_symbols
