	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vatpic_ocw2
_vatpic_ocw2:                           ## @vatpic_ocw2
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%edx, %ebx
	movq	%rsi, %r14
	leaq	L_.str(%rip), %rsi
	callq	_VATPIC_CTR1
	movq	_OCW2_R@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%eax, %eax
	testl	%ebx, %ecx
	setne	%al
	movl	%eax, (%r14)
	movq	_OCW2_EOI@GOTPCREL(%rip), %rsi
	movq	_OCW2_SL@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%ebx, (%rsi)
	je	LBB0_6
## %bb.1:
	testl	%ebx, %edx
	je	LBB0_3
## %bb.2:
	andl	$7, %ebx
	jmp	LBB0_5
LBB0_6:
	testl	%ebx, %edx
	je	LBB0_10
## %bb.7:
	andl	%ebx, %ecx
	je	LBB0_10
## %bb.8:
	andl	$7, %ebx
	jmp	LBB0_9
LBB0_3:
	movq	%r14, %rdi
	callq	_vatpic_get_highest_isrpin
	cmpl	$-1, %eax
	je	LBB0_10
## %bb.4:
	movl	%eax, %ebx
	movl	(%r14), %eax
LBB0_5:
	movl	$-2, %edx
	movl	%ebx, %ecx
	roll	%cl, %edx
	andl	%edx, 4(%r14)
	testl	%eax, %eax
	je	LBB0_10
LBB0_9:
	movl	%ebx, 8(%r14)
LBB0_10:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"atpic ocw2 0x%x"

	.comm	_OCW2_R,4,2                     ## @OCW2_R
	.comm	_OCW2_EOI,4,2                   ## @OCW2_EOI
	.comm	_OCW2_SL,4,2                    ## @OCW2_SL
	.no_dead_strip	_vatpic_ocw2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vatpic_ocw2
_vatpic_ocw2:                           ; @vatpic_ocw2
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x2
	mov	x19, x1
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_VATPIC_CTR1
Lloh2:
	adrp	x8, _OCW2_R@GOTPAGE
Lloh3:
	ldr	x8, [x8, _OCW2_R@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ands	w9, w8, w20
	cset	w8, ne
	str	w8, [x19]
Lloh5:
	adrp	x10, _OCW2_EOI@GOTPAGE
Lloh6:
	ldr	x10, [x10, _OCW2_EOI@GOTPAGEOFF]
Lloh7:
	ldr	w11, [x10]
Lloh8:
	adrp	x10, _OCW2_SL@GOTPAGE
Lloh9:
	ldr	x10, [x10, _OCW2_SL@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	and	w10, w10, w20
	tst	w11, w20
	b.eq	LBB0_3
; %bb.1:
	cbz	w10, LBB0_5
; %bb.2:
	and	w0, w20, #0x7
	b	LBB0_7
LBB0_3:
	cmp	w10, #0
	ccmp	w9, #0, #4, ne
	b.eq	LBB0_9
; %bb.4:
	and	w0, w20, #0x7
	b	LBB0_8
LBB0_5:
	mov	x0, x19
	bl	_vatpic_get_highest_isrpin
	cmn	w0, #1
	b.eq	LBB0_9
; %bb.6:
	ldr	w8, [x19]
LBB0_7:
	mov	w9, #1
	lsl	w9, w9, w0
	ldr	w10, [x19, #4]
	bic	w9, w10, w9
	str	w9, [x19, #4]
	cbz	w8, LBB0_9
LBB0_8:
	str	w0, [x19, #8]
LBB0_9:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"atpic ocw2 0x%x"

	.comm	_OCW2_R,4,2                     ; @OCW2_R
	.comm	_OCW2_EOI,4,2                   ; @OCW2_EOI
	.comm	_OCW2_SL,4,2                    ; @OCW2_SL
	.no_dead_strip	_vatpic_ocw2
.subsections_via_symbols
