	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vatpic_set_irqstate
_vatpic_set_irqstate:                   ## @vatpic_set_irqstate
	.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
	cmpl	$16, %esi
	jb	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_11
LBB0_2:
	movl	%edx, %r12d
	movl	%esi, %ebx
	callq	_vm_atpic
	movq	%rax, %r15
	movq	(%rax), %rax
	movl	%ebx, %ecx
	shrl	$3, %ecx
	xorl	%r14d, %r14d
	cmpl	$0, (%rax,%rcx,4)
	je	LBB0_11
## %bb.3:
	movq	%r15, %rdi
	callq	_VATPIC_LOCK
	cmpl	$128, %r12d
	je	LBB0_7
## %bb.4:
	cmpl	$129, %r12d
	je	LBB0_8
## %bb.5:
	cmpl	$130, %r12d
	jne	LBB0_9
## %bb.6:
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	$1, %edx
	callq	_vatpic_set_pinstate
	jmp	LBB0_10
LBB0_7:
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	$1, %edx
	callq	_vatpic_set_pinstate
LBB0_8:
	movq	%r15, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_vatpic_set_pinstate
	jmp	LBB0_10
LBB0_9:
	leaq	L_.str(%rip), %rdi
	movl	%r12d, %esi
	callq	_panic
LBB0_10:
	movq	%r15, %rdi
	callq	_VATPIC_UNLOCK
LBB0_11:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vatpic_set_irqstate: invalid irqstate %d"

	.no_dead_strip	_vatpic_set_irqstate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vatpic_set_irqstate
_vatpic_set_irqstate:                   ; @vatpic_set_irqstate
	.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
	cmp	w1, #16
	b.lo	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	b	LBB0_12
LBB0_2:
	mov	x21, x2
	mov	x20, x1
	bl	_vm_atpic
	ldr	x8, [x0]
	lsr	w9, w20, #3
	ldr	w8, [x8, w9, uxtw #2]
	cbz	w8, LBB0_11
; %bb.3:
	mov	x19, x0
	bl	_VATPIC_LOCK
	cmp	w21, #128
	b.eq	LBB0_7
; %bb.4:
	cmp	w21, #129
	b.eq	LBB0_8
; %bb.5:
	cmp	w21, #130
	b.ne	LBB0_9
; %bb.6:
	mov	x0, x19
	mov	x1, x20
	mov	w2, #1
	bl	_vatpic_set_pinstate
	b	LBB0_10
LBB0_7:
	mov	x0, x19
	mov	x1, x20
	mov	w2, #1
	bl	_vatpic_set_pinstate
LBB0_8:
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	bl	_vatpic_set_pinstate
	b	LBB0_10
LBB0_9:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_panic
LBB0_10:
	mov	x0, x19
	bl	_VATPIC_UNLOCK
LBB0_11:
	mov	w0, #0
LBB0_12:
	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 AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vatpic_set_irqstate: invalid irqstate %d"

	.no_dead_strip	_vatpic_set_irqstate
.subsections_via_symbols
