	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sdio_claim_irq                 ## -- Begin function sdio_claim_irq
	.p2align	4, 0x90
_sdio_claim_irq:                        ## @sdio_claim_irq
	.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, %r14
	movq	%rdi, %rbx
	xorl	%edi, %edi
	testq	%rbx, %rbx
	sete	%dil
	callq	_BUG_ON
	xorl	%edi, %edi
	cmpl	$0, 16(%rbx)
	sete	%dil
	callq	_BUG_ON
	movq	%rbx, %rdi
	callq	_sdio_func_id
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_debug
	cmpq	$0, 8(%rbx)
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_sdio_func_id
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_debug
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_2:
	movl	16(%rbx), %edi
	movq	_SDIO_CCCR_IENx@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	leaq	-25(%rbp), %r9
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	callq	_mmc_io_rw_direct
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:
	movb	(%rbx), %cl
	movl	$1, %eax
	shll	%cl, %eax
	orb	-25(%rbp), %al
	orb	$1, %al
	movb	%al, -25(%rbp)
	movl	16(%rbx), %edi
	movl	(%r15), %ecx
	movzbl	%al, %r8d
	movl	$1, %esi
	xorl	%edx, %edx
	xorl	%r9d, %r9d
	callq	_mmc_io_rw_direct
	testl	%eax, %eax
	jne	LBB0_6
## %bb.4:
	movq	%r14, 8(%rbx)
	movl	16(%rbx), %edi
	callq	_sdio_card_irq_get
	movl	%eax, %ecx
	movl	$0, %eax
	testl	%ecx, %ecx
	je	LBB0_6
## %bb.5:
	movq	$0, 8(%rbx)
	movl	%ecx, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SDIO: Enabling IRQ for %s...\n"

L_.str.1:                               ## @.str.1
	.asciz	"SDIO: IRQ for %s already in use.\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_SDIO_CCCR_IENx,4,2             ## @SDIO_CCCR_IENx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sdio_claim_irq                 ; -- Begin function sdio_claim_irq
	.p2align	2
_sdio_claim_irq:                        ; @sdio_claim_irq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x1
	mov	x19, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_BUG_ON
	ldr	w8, [x19, #16]
	cmp	w8, #0
	cset	w0, eq
	bl	_BUG_ON
	mov	x0, x19
	bl	_sdio_func_id
	mov	x1, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_debug
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_sdio_func_id
	mov	x1, x0
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_debug
Lloh4:
	adrp	x8, _EBUSY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_2:
	ldr	w0, [x19, #16]
Lloh7:
	adrp	x21, _SDIO_CCCR_IENx@GOTPAGE
Lloh8:
	ldr	x21, [x21, _SDIO_CCCR_IENx@GOTPAGEOFF]
	ldr	w3, [x21]
	add	x5, sp, #15
	mov	w1, #0
	mov	w2, #0
	mov	w4, #0
	bl	_mmc_io_rw_direct
	cbnz	w0, LBB0_6
; %bb.3:
	ldr	w8, [x19]
	mov	w9, #1
	lsl	w8, w9, w8
	ldrb	w9, [sp, #15]
	orr	w8, w9, w8
	orr	w8, w8, #0x1
	strb	w8, [sp, #15]
	ldr	w0, [x19, #16]
	ldr	w3, [x21]
	and	w4, w8, #0xff
	mov	w1, #1
	mov	w2, #0
	mov	x5, #0
	bl	_mmc_io_rw_direct
	cbnz	w0, LBB0_6
; %bb.4:
	str	x20, [x19, #8]
	ldr	w0, [x19, #16]
	bl	_sdio_card_irq_get
	cbz	w0, LBB0_6
; %bb.5:
	str	xzr, [x19, #8]
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SDIO: Enabling IRQ for %s...\n"

l_.str.1:                               ; @.str.1
	.asciz	"SDIO: IRQ for %s already in use.\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_SDIO_CCCR_IENx,4,2             ; @SDIO_CCCR_IENx
.subsections_via_symbols
