	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mcp_sa11x0_remove
_mcp_sa11x0_remove:                     ## @mcp_sa11x0_remove
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_platform_get_drvdata
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_priv
	movq	%rax, %r12
	movq	_MCCR0_MCE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_warn
LBB0_2:
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_platform_get_resource
	movq	%rax, %r15
	movl	(%r13), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_platform_get_resource
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_mcp_host_del
	movl	8(%r12), %edi
	callq	_iounmap
	movl	4(%r12), %edi
	callq	_iounmap
	movq	%r14, %rdi
	callq	_mcp_host_free
	movl	(%rbx), %r14d
	movq	%rbx, %rdi
	callq	_resource_size
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_release_mem_region
	movl	(%r15), %ebx
	movq	%r15, %rdi
	callq	_resource_size
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_release_mem_region
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MCCR0_MCE,4,2                  ## @MCCR0_MCE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"device left active (missing disable call?)\n"

	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.no_dead_strip	_mcp_sa11x0_remove
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mcp_sa11x0_remove
_mcp_sa11x0_remove:                     ; @mcp_sa11x0_remove
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x0
	bl	_platform_get_drvdata
	mov	x19, x0
	bl	_priv
	mov	x20, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _MCCR0_MCE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MCCR0_MCE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_warn
LBB0_2:
Lloh5:
	adrp	x23, _IORESOURCE_MEM@GOTPAGE
Lloh6:
	ldr	x23, [x23, _IORESOURCE_MEM@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x21
	mov	w2, #0
	bl	_platform_get_resource
	mov	x22, x0
	ldr	w1, [x23]
	mov	x0, x21
	mov	w2, #1
	bl	_platform_get_resource
	mov	x21, x0
	mov	x0, x19
	bl	_mcp_host_del
	ldr	w0, [x20, #8]
	bl	_iounmap
	ldr	w0, [x20, #4]
	bl	_iounmap
	mov	x0, x19
	bl	_mcp_host_free
	ldr	w19, [x21]
	mov	x0, x21
	bl	_resource_size
	mov	x1, x0
	mov	x0, x19
	bl	_release_mem_region
	ldr	w19, [x22]
	mov	x0, x22
	bl	_resource_size
	mov	x1, x0
	mov	x0, x19
	bl	_release_mem_region
	mov	w0, #0
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_MCCR0_MCE,4,2                  ; @MCCR0_MCE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"device left active (missing disable call?)\n"

	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.no_dead_strip	_mcp_sa11x0_remove
.subsections_via_symbols
