	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vatpic_elc_handler             ## -- Begin function vatpic_elc_handler
	.p2align	4, 0x90
_vatpic_elc_handler:                    ## @vatpic_elc_handler
	.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	%r9, %r14
	movl	%r8d, %ebx
	movl	%ecx, %r15d
	movl	%edx, %r12d
	callq	_vm_atpic
	movq	%rax, %r13
	movl	$-1, %eax
	cmpl	$1, %ebx
	jne	LBB0_9
## %bb.1:
	movq	_IO_ELCR1@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r13, %rdi
	callq	_VATPIC_LOCK
	testl	%r12d, %r12d
	je	LBB0_5
## %bb.2:
	movq	(%r13), %rax
	cmpl	%r15d, %ebx
	jne	LBB0_4
## %bb.3:
	movl	(%rax), %eax
	movl	%eax, (%r14)
	jmp	LBB0_8
LBB0_5:
	movl	(%r14), %eax
	cmpl	%r15d, %ebx
	jne	LBB0_7
## %bb.6:
	andl	$248, %eax
	movq	(%r13), %rcx
	movl	%eax, (%rcx)
	jmp	LBB0_8
LBB0_4:
	movl	4(%rax), %eax
	movl	%eax, (%r14)
	jmp	LBB0_8
LBB0_7:
	andl	$222, %eax
	movq	(%r13), %rcx
	movl	%eax, 4(%rcx)
LBB0_8:
	movq	%r13, %rdi
	callq	_VATPIC_UNLOCK
	xorl	%eax, %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IO_ELCR1,4,2                   ## @IO_ELCR1
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vatpic_elc_handler             ; -- Begin function vatpic_elc_handler
	.p2align	2
_vatpic_elc_handler:                    ; @vatpic_elc_handler
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x5
	mov	x23, x4
	mov	x21, x3
	mov	x22, x2
	bl	_vm_atpic
	cmp	w23, #1
	b.ne	LBB0_4
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _IO_ELCR1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IO_ELCR1@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
	bl	_VATPIC_LOCK
	cbz	w22, LBB0_5
; %bb.2:
	ldr	x8, [x19]
	cmp	w23, w21
	b.ne	LBB0_7
; %bb.3:
	ldr	w8, [x8]
	str	w8, [x20]
	b	LBB0_9
LBB0_4:
	mov	w0, #-1
	b	LBB0_10
LBB0_5:
	ldr	w8, [x20]
	cmp	w23, w21
	b.ne	LBB0_8
; %bb.6:
	and	w8, w8, #0xf8
	ldr	x9, [x19]
	str	w8, [x9]
	b	LBB0_9
LBB0_7:
	ldr	w8, [x8, #4]
	str	w8, [x20]
	b	LBB0_9
LBB0_8:
	mov	w9, #222
	and	w8, w8, w9
	ldr	x9, [x19]
	str	w8, [x9, #4]
LBB0_9:
	mov	x0, x19
	bl	_VATPIC_UNLOCK
	mov	w0, #0
LBB0_10:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_IO_ELCR1,4,2                   ; @IO_ELCR1
.subsections_via_symbols
