	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ks_read_config
_ks_read_config:                        ## @ks_read_config
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_KS_CCR@GOTPCREL(%rip), %r14
	movq	(%r14), %rsi
	callq	_ks_rdreg8
	movzbl	%al, %r15d
	movq	(%r14), %rsi
	incq	%rsi
	movq	%rbx, %rdi
	callq	_ks_rdreg8
	shll	$8, %eax
	orl	%r15d, %eax
	movq	_CCR_SHARED@GOTPCREL(%rip), %rcx
	movl	%eax, %edx
	notl	%edx
	xorl	%esi, %esi
	andl	(%rcx), %edx
	sete	%sil
	movl	%esi, (%rbx)
	movq	_CCR_8BIT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
## %bb.1:
	movl	$1, %ecx
	movq	_ENUM_BUS_8BIT@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_2:
	movq	_CCR_16BIT@GOTPCREL(%rip), %rdx
	xorl	%ecx, %ecx
	testl	%eax, (%rdx)
	sete	%dl
	jne	LBB0_3
## %bb.4:
	movq	_ENUM_BUS_32BIT@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_ENUM_BUS_16BIT@GOTPCREL(%rip), %rax
LBB0_5:
	movb	%dl, %cl
	addl	%ecx, %ecx
	addl	$2, %ecx
LBB0_6:
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movl	%ecx, 4(%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KS_CCR,8,3                     ## @KS_CCR
	.comm	_CCR_SHARED,4,2                 ## @CCR_SHARED
	.comm	_CCR_8BIT,4,2                   ## @CCR_8BIT
	.comm	_ENUM_BUS_8BIT,4,2              ## @ENUM_BUS_8BIT
	.comm	_CCR_16BIT,4,2                  ## @CCR_16BIT
	.comm	_ENUM_BUS_16BIT,4,2             ## @ENUM_BUS_16BIT
	.comm	_ENUM_BUS_32BIT,4,2             ## @ENUM_BUS_32BIT
	.no_dead_strip	_ks_read_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ks_read_config
_ks_read_config:                        ; @ks_read_config
	.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, x0
Lloh0:
	adrp	x21, _KS_CCR@GOTPAGE
Lloh1:
	ldr	x21, [x21, _KS_CCR@GOTPAGEOFF]
	ldr	x1, [x21]
	bl	_ks_rdreg8
	mov	x20, x0
	ldr	x8, [x21]
	add	x1, x8, #1
	mov	x0, x19
	bl	_ks_rdreg8
	bfi	w20, w0, #8, #24
Lloh2:
	adrp	x8, _CCR_SHARED@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CCR_SHARED@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	bics	wzr, w8, w20
	cset	w8, eq
	str	w8, [x19]
Lloh5:
	adrp	x8, _CCR_8BIT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CCR_8BIT@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_2
; %bb.1:
	mov	w9, #1
Lloh8:
	adrp	x8, _ENUM_BUS_8BIT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENUM_BUS_8BIT@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:
Lloh10:
	adrp	x8, _CCR_16BIT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _CCR_16BIT@GOTPAGEOFF]
Lloh12:
	adrp	x9, _ENUM_BUS_16BIT@GOTPAGE
Lloh13:
	ldr	x9, [x9, _ENUM_BUS_16BIT@GOTPAGEOFF]
Lloh14:
	adrp	x10, _ENUM_BUS_32BIT@GOTPAGE
Lloh15:
	ldr	x10, [x10, _ENUM_BUS_32BIT@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	tst	w8, w20
	csel	x8, x10, x9, eq
	mov	w9, #2
	mov	w10, #4
	csel	w9, w10, w9, eq
LBB0_3:
	ldr	w8, [x8]
	stp	w9, w8, [x19, #4]
	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	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_KS_CCR,8,3                     ; @KS_CCR
	.comm	_CCR_SHARED,4,2                 ; @CCR_SHARED
	.comm	_CCR_8BIT,4,2                   ; @CCR_8BIT
	.comm	_ENUM_BUS_8BIT,4,2              ; @ENUM_BUS_8BIT
	.comm	_CCR_16BIT,4,2                  ; @CCR_16BIT
	.comm	_ENUM_BUS_16BIT,4,2             ; @ENUM_BUS_16BIT
	.comm	_ENUM_BUS_32BIT,4,2             ; @ENUM_BUS_32BIT
	.no_dead_strip	_ks_read_config
.subsections_via_symbols
