	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kvm_create_pit                 ## -- Begin function kvm_create_pit
	.p2align	4, 0x90
_kvm_create_pit:                        ## @kvm_create_pit
	.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
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$88, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_10
## %bb.1:
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_kvm_request_irq_source_id
	movq	%rax, (%rbx)
	testq	%rax, %rax
	js	LBB0_9
## %bb.2:
	leaq	24(%rbx), %r12
	movq	%r12, %rdi
	callq	_mutex_init
	movq	%r12, %rdi
	callq	_mutex_lock
	leaq	64(%rbx), %rdi
	callq	_spin_lock_init
	leaq	L_.str(%rip), %rdi
	callq	_create_singlethread_workqueue
	movl	%eax, 84(%rbx)
	testl	%eax, %eax
	je	LBB0_9
## %bb.3:
	leaq	80(%rbx), %rdi
	movq	_pit_do_work@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_WORK
	movq	%rbx, (%r14)
	movq	%r14, 72(%rbx)
	movq	%rbx, 56(%rbx)
	leaq	32(%rbx), %rdi
	movq	_CLOCK_MONOTONIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HRTIMER_MODE_ABS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_hrtimer_init
	leaq	40(%rbx), %rsi
	movq	$0, 48(%rbx)
	movq	_kvm_pit_ack_irq@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%rbx)
	movq	%r14, %rdi
	callq	_kvm_register_irq_ack_notifier
	movl	$1, 28(%rbx)
	movq	%r12, %rdi
	callq	_mutex_unlock
	movq	%rbx, %rdi
	callq	_kvm_pit_reset
	movq	_pit_mask_notifer@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leaq	16(%rbx), %rdx
	movl	%eax, 16(%rbx)
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_kvm_register_irq_mask_notifier
	leaq	8(%rbx), %r12
	movq	_pit_dev_ops@GOTPCREL(%rip), %rsi
	movq	%r12, %rdi
	callq	_kvm_iodevice_init
	movq	_KVM_PIO_BUS@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r14, %rdi
	movq	%r12, %rdx
	callq	_kvm_io_bus_register_dev
	testl	%eax, %eax
	js	LBB0_7
## %bb.4:
	movq	_KVM_PIT_SPEAKER_DUMMY@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_11
## %bb.5:
	movq	%rbx, %r15
	addq	$12, %r15
	movq	_speaker_dev_ops@GOTPCREL(%rip), %rsi
	movq	%r15, %rdi
	callq	_kvm_iodevice_init
	movl	(%r13), %esi
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_kvm_io_bus_register_dev
	testl	%eax, %eax
	jns	LBB0_11
## %bb.6:
	movl	(%r13), %esi
	movq	%r14, %rdi
	movq	%r12, %rdx
	callq	_kvm_io_bus_unregister_dev
LBB0_7:
	movq	(%rbx), %rsi
	testq	%rsi, %rsi
	js	LBB0_9
## %bb.8:
	movq	%r14, %rdi
	callq	_kvm_free_irq_source_id
LBB0_9:
	movq	%rbx, %rdi
	callq	_kfree
LBB0_10:
	xorl	%ebx, %ebx
LBB0_11:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"kvm-pit-wq"

	.comm	_pit_do_work,4,2                ## @pit_do_work
	.comm	_CLOCK_MONOTONIC,4,2            ## @CLOCK_MONOTONIC
	.comm	_HRTIMER_MODE_ABS,4,2           ## @HRTIMER_MODE_ABS
	.comm	_kvm_pit_ack_irq,4,2            ## @kvm_pit_ack_irq
	.comm	_pit_mask_notifer,4,2           ## @pit_mask_notifer
	.comm	_pit_dev_ops,4,2                ## @pit_dev_ops
	.comm	_KVM_PIO_BUS,4,2                ## @KVM_PIO_BUS
	.comm	_KVM_PIT_SPEAKER_DUMMY,4,2      ## @KVM_PIT_SPEAKER_DUMMY
	.comm	_speaker_dev_ops,4,2            ## @speaker_dev_ops
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kvm_create_pit                 ; -- Begin function kvm_create_pit
	.p2align	2
_kvm_create_pit:                        ; @kvm_create_pit
	.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	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #88
	bl	_kzalloc
	mov	x19, x0
	cbz	x0, LBB0_10
; %bb.1:
	mov	x0, x20
	bl	_kvm_request_irq_source_id
	str	x0, [x19]
	tbnz	x0, #63, LBB0_9
; %bb.2:
	add	x22, x19, #24
	mov	x0, x22
	bl	_mutex_init
	mov	x0, x22
	bl	_mutex_lock
	add	x0, x19, #64
	bl	_spin_lock_init
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_create_singlethread_workqueue
	str	w0, [x19, #84]
	cbz	w0, LBB0_9
; %bb.3:
	add	x0, x19, #80
Lloh5:
	adrp	x8, _pit_do_work@GOTPAGE
Lloh6:
	ldr	x8, [x8, _pit_do_work@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_INIT_WORK
	str	x19, [x20]
	str	x20, [x19, #72]
	str	x19, [x19, #56]
	add	x0, x19, #32
Lloh8:
	adrp	x8, _CLOCK_MONOTONIC@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CLOCK_MONOTONIC@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _HRTIMER_MODE_ABS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _HRTIMER_MODE_ABS@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	bl	_hrtimer_init
	str	xzr, [x19, #48]
Lloh14:
	adrp	x8, _kvm_pit_ack_irq@GOTPAGE
Lloh15:
	ldr	x8, [x8, _kvm_pit_ack_irq@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	mov	x1, x19
	str	w8, [x1, #40]!
	mov	x0, x20
	bl	_kvm_register_irq_ack_notifier
	mov	w8, #1
	str	w8, [x19, #28]
	mov	x0, x22
	bl	_mutex_unlock
	mov	x0, x19
	bl	_kvm_pit_reset
Lloh17:
	adrp	x8, _pit_mask_notifer@GOTPAGE
Lloh18:
	ldr	x8, [x8, _pit_mask_notifer@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	mov	x22, x19
	str	w8, [x22, #16]!
	mov	x0, x20
	mov	w1, #0
	mov	x2, x22
	bl	_kvm_register_irq_mask_notifier
	sub	x22, x22, #8
Lloh20:
	adrp	x1, _pit_dev_ops@GOTPAGE
Lloh21:
	ldr	x1, [x1, _pit_dev_ops@GOTPAGEOFF]
	mov	x0, x22
	bl	_kvm_iodevice_init
Lloh22:
	adrp	x23, _KVM_PIO_BUS@GOTPAGE
Lloh23:
	ldr	x23, [x23, _KVM_PIO_BUS@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x20
	mov	x2, x22
	bl	_kvm_io_bus_register_dev
	tbnz	w0, #31, LBB0_7
; %bb.4:
Lloh24:
	adrp	x8, _KVM_PIT_SPEAKER_DUMMY@GOTPAGE
Lloh25:
	ldr	x8, [x8, _KVM_PIT_SPEAKER_DUMMY@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_10
; %bb.5:
	add	x21, x19, #12
Lloh27:
	adrp	x1, _speaker_dev_ops@GOTPAGE
Lloh28:
	ldr	x1, [x1, _speaker_dev_ops@GOTPAGEOFF]
	mov	x0, x21
	bl	_kvm_iodevice_init
	ldr	w1, [x23]
	mov	x0, x20
	mov	x2, x21
	bl	_kvm_io_bus_register_dev
	tbz	w0, #31, LBB0_10
; %bb.6:
	ldr	w1, [x23]
	mov	x0, x20
	mov	x2, x22
	bl	_kvm_io_bus_unregister_dev
LBB0_7:
	ldr	x1, [x19]
	tbnz	x1, #63, LBB0_9
; %bb.8:
	mov	x0, x20
	bl	_kvm_free_irq_source_id
LBB0_9:
	mov	x0, x19
	bl	_kfree
	mov	x19, #0
LBB0_10:
	mov	x0, x19
	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
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"kvm-pit-wq"

	.comm	_pit_do_work,4,2                ; @pit_do_work
	.comm	_CLOCK_MONOTONIC,4,2            ; @CLOCK_MONOTONIC
	.comm	_HRTIMER_MODE_ABS,4,2           ; @HRTIMER_MODE_ABS
	.comm	_kvm_pit_ack_irq,4,2            ; @kvm_pit_ack_irq
	.comm	_pit_mask_notifer,4,2           ; @pit_mask_notifer
	.comm	_pit_dev_ops,4,2                ; @pit_dev_ops
	.comm	_KVM_PIO_BUS,4,2                ; @KVM_PIO_BUS
	.comm	_KVM_PIT_SPEAKER_DUMMY,4,2      ; @KVM_PIT_SPEAKER_DUMMY
	.comm	_speaker_dev_ops,4,2            ; @speaker_dev_ops
.subsections_via_symbols
