	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pit_ioport_read
_pit_ioport_read:                       ## @pit_ioport_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movl	%edx, %r12d
	movl	%esi, %r15d
	callq	_dev_to_pit
	movq	%rax, %r13
	movq	(%rax), %rbx
	movl	%r15d, %edi
	callq	_pit_in_range
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	_KVM_PIT_CHANNEL_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r15d
	xorl	%ebx, %ebx
	cmpl	$3, %r15d
	je	LBB0_21
## %bb.3:
	movl	%r12d, -48(%rbp)                ## 4-byte Spill
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, %rax
	movslq	%r15d, %r14
	addq	$8, %r13
	movq	16(%rax), %r12
	movq	%r13, %rdi
	callq	_mutex_lock
	leaq	(%r14,%r14,2), %rax
	cmpq	$0, 16(%r12,%rax,8)
	je	LBB0_5
## %bb.4:
	leaq	(%r12,%rax,8), %rcx
	addq	$16, %rcx
	movq	$0, (%rcx)
	movl	(%r12,%rax,8), %eax
	movl	%eax, -44(%rbp)
	jmp	LBB0_19
LBB0_1:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_21
LBB0_5:
	movl	4(%r12,%rax,8), %edx
	testl	%edx, %edx
	je	LBB0_12
## %bb.6:
	leaq	(%r12,%rax,8), %rcx
	addq	$4, %rcx
	cmpl	$129, %edx
	je	LBB0_11
## %bb.7:
	cmpl	$130, %edx
	jne	LBB0_8
## %bb.10:
	movl	8(%r12,%rax,8), %eax
	sarl	$8, %eax
	jmp	LBB0_9
LBB0_12:
	leaq	(%r12,%rax,8), %rcx
	addq	$12, %rcx
	movl	12(%r12,%rax,8), %eax
	cmpl	$128, %eax
	je	LBB0_18
## %bb.13:
	cmpl	$129, %eax
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movl	-48(%rbp), %r12d                ## 4-byte Reload
	je	LBB0_17
## %bb.14:
	cmpl	$130, %eax
	jne	LBB0_15
## %bb.16:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	callq	_pit_get_count
	movzbl	%ah, %eax
	movl	%eax, -44(%rbp)
	jmp	LBB0_20
LBB0_11:
	movzbl	8(%r12,%rax,8), %eax
	movl	%eax, -44(%rbp)
	movl	$130, (%rcx)
	jmp	LBB0_19
LBB0_8:
	movzbl	8(%r12,%rax,8), %eax
LBB0_9:
	movl	%eax, -44(%rbp)
	movl	$0, (%rcx)
LBB0_19:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movl	-48(%rbp), %r12d                ## 4-byte Reload
LBB0_20:
	cmpl	$4, %r12d
	movl	$4, %edx
	cmovbl	%r12d, %edx
	leaq	-44(%rbp), %rsi
	movq	%r14, %rdi
	callq	_memcpy
	movq	%r13, %rdi
	callq	_mutex_unlock
LBB0_21:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	movq	%rcx, %r14
	callq	_pit_get_count
	movzbl	%ah, %eax
	movl	%eax, -44(%rbp)
	movl	$129, (%r14)
	jmp	LBB0_19
LBB0_17:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	movq	%rcx, %r15
	callq	_pit_get_count
	movzbl	%al, %eax
	movl	%eax, -44(%rbp)
	movl	$128, (%r15)
	jmp	LBB0_20
LBB0_15:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	callq	_pit_get_count
	movzbl	%al, %eax
	movl	%eax, -44(%rbp)
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_KVM_PIT_CHANNEL_MASK,4,2       ## @KVM_PIT_CHANNEL_MASK
	.no_dead_strip	_pit_ioport_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pit_ioport_read
_pit_ioport_read:                       ; @pit_ioport_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	bl	_dev_to_pit
	mov	x24, x0
	ldr	x22, [x0]
	mov	x0, x21
	bl	_pit_in_range
	cbz	w0, LBB0_5
; %bb.1:
Lloh0:
	adrp	x8, _KVM_PIT_CHANNEL_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _KVM_PIT_CHANNEL_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	and	w23, w8, w21
	cmp	w23, #3
	b.eq	LBB0_21
; %bb.2:
	add	x21, x24, #8
	ldr	x24, [x24, #16]
	sxtw	x25, w23
	mov	x0, x21
	bl	_mutex_lock
	mov	w8, #24
	smaddl	x8, w23, w8, x24
	ldr	x9, [x8, #16]!
	cbz	x9, LBB0_6
; %bb.3:
	str	xzr, [x8]
	mov	w8, #24
	mul	x8, x25, x8
	ldr	w8, [x24, x8]
LBB0_4:
	str	w8, [sp, #12]
	b	LBB0_20
LBB0_5:
Lloh3:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_22
LBB0_6:
	mov	w8, #24
	madd	x8, x25, x8, x24
	ldr	w9, [x8, #4]!
	cbz	w9, LBB0_10
; %bb.7:
	cmp	w9, #129
	b.eq	LBB0_14
; %bb.8:
	cmp	w9, #130
	b.ne	LBB0_15
; %bb.9:
	mov	w9, #24
	madd	x9, x25, x9, x24
	ldr	w9, [x9, #8]
	asr	w9, w9, #8
	b	LBB0_16
LBB0_10:
	mov	w8, #24
	madd	x24, x25, x8, x24
	ldr	w8, [x24, #12]!
	mov	x0, x22
	mov	x1, x23
	cmp	w8, #128
	b.eq	LBB0_17
; %bb.11:
	cmp	w8, #129
	b.eq	LBB0_18
; %bb.12:
	cmp	w8, #130
	b.ne	LBB0_23
; %bb.13:
	bl	_pit_get_count
	ubfx	w8, w0, #8, #8
	b	LBB0_4
LBB0_14:
	mov	w9, #24
	madd	x9, x25, x9, x24
	ldrb	w9, [x9, #8]
	str	w9, [sp, #12]
	mov	w9, #130
	str	w9, [x8]
	b	LBB0_20
LBB0_15:
	mov	w9, #24
	madd	x9, x25, x9, x24
	ldrb	w9, [x9, #8]
LBB0_16:
	str	w9, [sp, #12]
	str	wzr, [x8]
	b	LBB0_20
LBB0_17:
	bl	_pit_get_count
	ubfx	w8, w0, #8, #8
	str	w8, [sp, #12]
	mov	w8, #129
	b	LBB0_19
LBB0_18:
	bl	_pit_get_count
	and	w8, w0, #0xff
	str	w8, [sp, #12]
	mov	w8, #128
LBB0_19:
	str	w8, [x24]
LBB0_20:
	mov	w8, #4
	cmp	w20, #4
	csel	w2, w20, w8, lo
	add	x1, sp, #12
	mov	x0, x19
	bl	_memcpy
	mov	x0, x21
	bl	_mutex_unlock
LBB0_21:
	mov	w0, #0
LBB0_22:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_23:
	bl	_pit_get_count
	and	w8, w0, #0xff
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_KVM_PIT_CHANNEL_MASK,4,2       ; @KVM_PIT_CHANNEL_MASK
	.no_dead_strip	_pit_ioport_read
.subsections_via_symbols
