	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vatpic_read
_vatpic_read:                           ## @vatpic_read
	.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
	movq	%r9, %r14
	movl	%ecx, %ebx
	movq	%rsi, %r12
	movq	%rdi, %r15
	callq	_VATPIC_LOCK
	cmpq	$0, 24(%r12)
	je	LBB0_4
## %bb.1:
	movq	$0, 24(%r12)
	movq	%r12, %rdi
	callq	_vatpic_get_highest_irrpin
	testl	%eax, %eax
	js	LBB0_2
## %bb.3:
	movl	%eax, %ebx
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_vatpic_pin_accepted
	orl	$128, %ebx
	jmp	LBB0_9
LBB0_4:
	movq	_ICU_IMR_OFFSET@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_6
## %bb.5:
	movl	(%r12), %ebx
	jmp	LBB0_9
LBB0_2:
	xorl	%ebx, %ebx
	jmp	LBB0_9
LBB0_6:
	movq	8(%r12), %rax
	movq	_OCW3_RIS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.7:
	movl	16(%r12), %ebx
	jmp	LBB0_9
LBB0_8:
	movl	20(%r12), %ebx
LBB0_9:
	movl	%ebx, (%r14)
	movq	%r15, %rdi
	callq	_VATPIC_UNLOCK
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ICU_IMR_OFFSET,4,2             ## @ICU_IMR_OFFSET
	.comm	_OCW3_RIS,8,3                   ## @OCW3_RIS
	.no_dead_strip	_vatpic_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vatpic_read
_vatpic_read:                           ; @vatpic_read
	.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	x19, x5
	mov	x22, x3
	mov	x21, x1
	mov	x20, x0
	bl	_VATPIC_LOCK
	ldr	x8, [x21, #24]
	cbz	x8, LBB0_3
; %bb.1:
	str	xzr, [x21, #24]
	mov	x0, x21
	bl	_vatpic_get_highest_irrpin
	tbnz	w0, #31, LBB0_5
; %bb.2:
	mov	x22, x0
	mov	x0, x21
	mov	x1, x22
	bl	_vatpic_pin_accepted
	orr	w8, w22, #0x80
	b	LBB0_9
LBB0_3:
Lloh0:
	adrp	x8, _ICU_IMR_OFFSET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ICU_IMR_OFFSET@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_6
; %bb.4:
	ldr	w8, [x21]
	b	LBB0_9
LBB0_5:
	mov	w8, #0
	b	LBB0_9
LBB0_6:
	ldr	x8, [x21, #8]
Lloh3:
	adrp	x9, _OCW3_RIS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _OCW3_RIS@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.7:
	ldr	w8, [x21, #16]
	b	LBB0_9
LBB0_8:
	ldr	w8, [x21, #20]
LBB0_9:
	str	w8, [x19]
	mov	x0, x20
	bl	_VATPIC_UNLOCK
	mov	w0, #0
	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	_ICU_IMR_OFFSET,4,2             ; @ICU_IMR_OFFSET
	.comm	_OCW3_RIS,8,3                   ; @OCW3_RIS
	.no_dead_strip	_vatpic_read
.subsections_via_symbols
