	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.3:
	movq	%rsi, %r14
	movq	%rdi, %r15
	callq	_sdio_func_id
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_debug
	cmpq	$0, 8(%r15)
	je	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	callq	_sdio_func_id
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_debug
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	4(%r15), %edi
	movq	_SDIO_CCCR_IENx@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	leaq	-33(%rbp), %r9
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	callq	_mmc_io_rw_direct
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.6:
	movb	(%r15), %cl
	movl	$1, %eax
	shll	%cl, %eax
	orb	-33(%rbp), %al
	orb	$1, %al
	movb	%al, -33(%rbp)
	movl	4(%r15), %edi
	movl	(%r12), %ecx
	movzbl	%al, %r8d
	movl	$1, %esi
	xorl	%edx, %edx
	xorl	%r9d, %r9d
	callq	_mmc_io_rw_direct
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.7:
	movq	%r14, 8(%r15)
	movl	4(%r15), %edi
	callq	_sdio_card_irq_get
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movq	$0, 8(%r15)
LBB0_9:
	movl	4(%r15), %edi
	callq	_sdio_single_irq_set
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.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
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	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_6
; %bb.2:
	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]
	b	LBB0_4
LBB0_3:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_5:
	mov	x0, x21
	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
LBB0_6:
	ldr	w0, [x19, #4]
Lloh8:
	adrp	x22, _SDIO_CCCR_IENx@GOTPAGE
Lloh9:
	ldr	x22, [x22, _SDIO_CCCR_IENx@GOTPAGEOFF]
	ldr	w3, [x22]
	add	x5, sp, #15
	mov	w1, #0
	mov	w2, #0
	mov	w4, #0
	bl	_mmc_io_rw_direct
	mov	x21, x0
	cbnz	w0, LBB0_5
; %bb.7:
	mov	w8, #1
	ldp	w9, w0, [x19]
	lsl	w8, w8, w9
	ldrb	w9, [sp, #15]
	orr	w8, w9, w8
	orr	w8, w8, #0x1
	strb	w8, [sp, #15]
	ldr	w3, [x22]
	and	w4, w8, #0xff
	mov	w1, #1
	mov	w2, #0
	mov	x5, #0
	bl	_mmc_io_rw_direct
	mov	x21, x0
	cbnz	w0, LBB0_5
; %bb.8:
	str	x20, [x19, #8]
	ldr	w0, [x19, #4]
	bl	_sdio_card_irq_get
	mov	x21, x0
	cbz	w0, LBB0_10
; %bb.9:
	str	xzr, [x19, #8]
LBB0_10:
	ldr	w0, [x19, #4]
	bl	_sdio_single_irq_set
	b	LBB0_5
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.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
