	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function elektor_remove
_elektor_remove:                        ## @elektor_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_pcf_isa_ops@GOTPCREL(%rip), %rdi
	callq	_i2c_del_adapter
	movq	_irq@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	jle	LBB0_2
## %bb.1:
	callq	_disable_irq
	movq	(%rbx), %rdi
	xorl	%esi, %esi
	callq	_free_irq
LBB0_2:
	movq	_mmapped@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	movq	_base_iomem@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	je	LBB0_3
## %bb.4:
	callq	_iounmap
	movq	_base@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$2, %esi
	callq	_release_mem_region
	jmp	LBB0_5
LBB0_3:
	callq	_ioport_unmap
	movq	_base@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$2, %esi
	callq	_release_region
LBB0_5:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_pcf_isa_ops,4,2                ## @pcf_isa_ops
	.comm	_irq,8,3                        ## @irq
	.comm	_mmapped,4,2                    ## @mmapped
	.comm	_base_iomem,4,2                 ## @base_iomem
	.comm	_base,4,2                       ## @base
	.no_dead_strip	_elektor_remove
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function elektor_remove
_elektor_remove:                        ; @elektor_remove
	.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
Lloh0:
	adrp	x0, _pcf_isa_ops@GOTPAGE
Lloh1:
	ldr	x0, [x0, _pcf_isa_ops@GOTPAGEOFF]
	bl	_i2c_del_adapter
Lloh2:
	adrp	x19, _irq@GOTPAGE
Lloh3:
	ldr	x19, [x19, _irq@GOTPAGEOFF]
	ldr	x0, [x19]
	cmp	x0, #1
	b.lt	LBB0_2
; %bb.1:
	bl	_disable_irq
	ldr	x0, [x19]
	mov	x1, #0
	bl	_free_irq
LBB0_2:
Lloh4:
	adrp	x8, _mmapped@GOTPAGE
Lloh5:
	ldr	x8, [x8, _mmapped@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _base_iomem@GOTPAGE
Lloh8:
	ldr	x9, [x9, _base_iomem@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x9]
	cbz	w8, LBB0_4
; %bb.3:
	bl	_iounmap
Lloh10:
	adrp	x8, _base@GOTPAGE
Lloh11:
	ldr	x8, [x8, _base@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	mov	w1, #2
	bl	_release_mem_region
	b	LBB0_5
LBB0_4:
	bl	_ioport_unmap
Lloh13:
	adrp	x8, _base@GOTPAGE
Lloh14:
	ldr	x8, [x8, _base@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	mov	w1, #2
	bl	_release_region
LBB0_5:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_pcf_isa_ops,4,2                ; @pcf_isa_ops
	.comm	_irq,8,3                        ; @irq
	.comm	_mmapped,4,2                    ; @mmapped
	.comm	_base_iomem,4,2                 ; @base_iomem
	.comm	_base,4,2                       ; @base
	.no_dead_strip	_elektor_remove
.subsections_via_symbols
