	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmc_gpio_get_cd                ## -- Begin function mmc_gpio_get_cd
	.p2align	4, 0x90
_mmc_gpio_get_cd:                       ## @mmc_gpio_get_cd
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	8(%rdi), %rbx
	testq	%rbx, %rbx
	je	LBB0_2
## %bb.1:
	movq	%rdi, %r14
	movl	(%rbx), %edi
	testl	%edi, %edi
	je	LBB0_2
## %bb.3:
	callq	_gpiod_cansleep
	cmpq	$0, 8(%rbx)
	movl	(%rbx), %edi
	je	LBB0_9
## %bb.4:
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	callq	_gpiod_get_raw_value_cansleep
	jmp	LBB0_7
LBB0_2:
	movq	_ENOSYS@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_8
LBB0_9:
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_gpiod_get_value_cansleep       ## TAILCALL
LBB0_6:
	callq	_gpiod_get_raw_value
LBB0_7:
	testl	%eax, %eax
	sete	%al
	movq	_MMC_CAP2_CD_ACTIVE_HIGH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%r14)
	setne	%cl
	xorb	%al, %cl
	movzbl	%cl, %eax
LBB0_8:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_10:
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_gpiod_get_value                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOSYS,4,2                     ## @ENOSYS
	.comm	_MMC_CAP2_CD_ACTIVE_HIGH,4,2    ## @MMC_CAP2_CD_ACTIVE_HIGH
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmc_gpio_get_cd                ; -- Begin function mmc_gpio_get_cd
	.p2align	2
_mmc_gpio_get_cd:                       ; @mmc_gpio_get_cd
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x20, [x0, #8]
	cbz	x20, LBB0_5
; %bb.1:
	mov	x19, x0
	ldr	w0, [x20]
	cbz	w0, LBB0_5
; %bb.2:
	bl	_gpiod_cansleep
	mov	x8, x0
	ldr	x9, [x20, #8]
	ldr	w0, [x20]
	cbz	x9, LBB0_6
; %bb.3:
	cbz	w8, LBB0_8
; %bb.4:
	bl	_gpiod_get_raw_value_cansleep
	b	LBB0_9
LBB0_5:
Lloh0:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_6:
	cbz	w8, LBB0_11
; %bb.7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_gpiod_get_value_cansleep
LBB0_8:
	bl	_gpiod_get_raw_value
LBB0_9:
	cmp	w0, #0
	cset	w8, eq
	ldr	w9, [x19]
Lloh3:
	adrp	x10, _MMC_CAP2_CD_ACTIVE_HIGH@GOTPAGE
Lloh4:
	ldr	x10, [x10, _MMC_CAP2_CD_ACTIVE_HIGH@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	tst	w10, w9
	cset	w9, ne
	eor	w0, w8, w9
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_11:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_gpiod_get_value
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOSYS,4,2                     ; @ENOSYS
	.comm	_MMC_CAP2_CD_ACTIVE_HIGH,4,2    ; @MMC_CAP2_CD_ACTIVE_HIGH
.subsections_via_symbols
