	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function io_detect_cm4000
_io_detect_cm4000:                      ## @io_detect_cm4000
	.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	%rsi, %r15
	movl	%edi, %r14d
	callq	_REG_FLAGS0
	movl	%eax, %edi
	callq	_inb
	testb	$8, %al
	jne	LBB0_1
## %bb.2:
	movl	(%r15), %ebx
	orl	$64, %ebx
	movl	%r14d, %edi
	callq	_REG_FLAGS1
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_xoutb
	movl	%r14d, %edi
	callq	_REG_FLAGS0
	movl	%eax, %edi
	callq	_inb
	testb	$8, %al
	jne	LBB0_3
LBB0_1:
	movq	_IS_ATR_VALID@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$4, %r15
	movq	%r15, %rsi
	callq	_clear_bit
	movq	_IS_CMM_ABSENT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_set_bit
	xorl	%eax, %eax
	jmp	LBB0_4
LBB0_3:
	movl	(%r15), %ebx
	movl	%r14d, %edi
	callq	_REG_FLAGS1
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_xoutb
	movl	$1, %eax
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IS_ATR_VALID,4,2               ## @IS_ATR_VALID
	.comm	_IS_CMM_ABSENT,4,2              ## @IS_CMM_ABSENT
	.no_dead_strip	_io_detect_cm4000
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function io_detect_cm4000
_io_detect_cm4000:                      ; @io_detect_cm4000
	.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, x1
	mov	x20, x0
	bl	_REG_FLAGS0
	bl	_inb
	tbnz	w0, #3, LBB0_2
; %bb.1:
	ldr	w8, [x19]
	orr	w21, w8, #0x40
	mov	x0, x20
	bl	_REG_FLAGS1
	mov	x1, x0
	mov	x0, x21
	bl	_xoutb
	mov	x0, x20
	bl	_REG_FLAGS0
	bl	_inb
	tbnz	w0, #3, LBB0_3
LBB0_2:
Lloh0:
	adrp	x8, _IS_ATR_VALID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IS_ATR_VALID@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x19, x19, #4
	mov	x1, x19
	bl	_clear_bit
Lloh3:
	adrp	x8, _IS_CMM_ABSENT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IS_CMM_ABSENT@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_set_bit
	mov	w0, #0
	b	LBB0_4
LBB0_3:
	ldr	w19, [x19]
	mov	x0, x20
	bl	_REG_FLAGS1
	mov	x1, x0
	mov	x0, x19
	bl	_xoutb
	mov	w0, #1
LBB0_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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_IS_ATR_VALID,4,2               ; @IS_ATR_VALID
	.comm	_IS_CMM_ABSENT,4,2              ; @IS_CMM_ABSENT
	.no_dead_strip	_io_detect_cm4000
.subsections_via_symbols
