	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function r592_update_card_detect
_r592_update_card_detect:               ## @r592_update_card_detect
	.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
	movq	%rdi, %r14
	movq	_R592_REG_MSC@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_r592_read_reg
	movl	%eax, %r12d
	movq	_R592_REG_MSC_PRSNT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	andl	%r12d, %ebx
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rsi
	cmoveq	%rax, %rsi
	leaq	L_.str(%rip), %rdi
	callq	_dbg
	testl	%ebx, %ebx
	movq	_R592_REG_MSC_IRQ_REMOVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_R592_REG_MSC_IRQ_INSERT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%eax, %edx
	cmovel	%ecx, %edx
	orl	%eax, %ecx
	shll	$16, %ecx
	notl	%ecx
	andl	%r12d, %ecx
	shll	$16, %edx
	orl	%ecx, %edx
	movl	(%r15), %esi
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_r592_write_reg                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_R592_REG_MSC,4,2               ## @R592_REG_MSC
	.comm	_R592_REG_MSC_PRSNT,4,2         ## @R592_REG_MSC_PRSNT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"update card detect. card state: %s"

L_.str.1:                               ## @.str.1
	.asciz	"present"

L_.str.2:                               ## @.str.2
	.asciz	"absent"

	.comm	_R592_REG_MSC_IRQ_REMOVE,4,2    ## @R592_REG_MSC_IRQ_REMOVE
	.comm	_R592_REG_MSC_IRQ_INSERT,4,2    ## @R592_REG_MSC_IRQ_INSERT
	.no_dead_strip	_r592_update_card_detect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function r592_update_card_detect
_r592_update_card_detect:               ; @r592_update_card_detect
	.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, _R592_REG_MSC@GOTPAGE
Lloh1:
	ldr	x21, [x21, _R592_REG_MSC@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_r592_read_reg
	mov	x20, x0
Lloh2:
	adrp	x8, _R592_REG_MSC_PRSNT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _R592_REG_MSC_PRSNT@GOTPAGEOFF]
Lloh4:
	ldr	w22, [x8]
Lloh5:
	adrp	x8, l_.str.1@PAGE
Lloh6:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh7:
	adrp	x9, l_.str.2@PAGE
Lloh8:
	add	x9, x9, l_.str.2@PAGEOFF
	tst	w22, w0
	csel	x1, x9, x8, eq
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dbg
	tst	w22, w20
Lloh11:
	adrp	x8, _R592_REG_MSC_IRQ_REMOVE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _R592_REG_MSC_IRQ_REMOVE@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _R592_REG_MSC_IRQ_INSERT@GOTPAGE
Lloh15:
	ldr	x9, [x9, _R592_REG_MSC_IRQ_INSERT@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	csel	w10, w9, w8, eq
	orr	w8, w9, w8
	bic	w8, w20, w8, lsl #16
	orr	w2, w8, w10, lsl #16
	ldr	w1, [x21]
	mov	x0, x19
	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
	b	_r592_write_reg
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_R592_REG_MSC,4,2               ; @R592_REG_MSC
	.comm	_R592_REG_MSC_PRSNT,4,2         ; @R592_REG_MSC_PRSNT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"update card detect. card state: %s"

l_.str.1:                               ; @.str.1
	.asciz	"present"

l_.str.2:                               ; @.str.2
	.asciz	"absent"

	.comm	_R592_REG_MSC_IRQ_REMOVE,4,2    ; @R592_REG_MSC_IRQ_REMOVE
	.comm	_R592_REG_MSC_IRQ_INSERT,4,2    ; @R592_REG_MSC_IRQ_INSERT
	.no_dead_strip	_r592_update_card_detect
.subsections_via_symbols
