	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function elektor_probe
_elektor_probe:                         ## @elektor_probe
	.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	%rdi, %r14
	movq	_pcf_wait@GOTPCREL(%rip), %rdi
	callq	_init_waitqueue_head
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_pcf_isa_init
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_10:
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_2:
	movq	_pcf_isa_ops@GOTPCREL(%rip), %rdi
	movq	%r14, (%rdi)
	callq	_i2c_pcf_add_bus
	testq	%rax, %rax
	js	LBB0_4
## %bb.3:
	movq	_base@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_info
	xorl	%ebx, %ebx
LBB0_11:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	movq	_irq@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	jle	LBB0_6
## %bb.5:
	callq	_disable_irq
	movq	(%rbx), %rdi
	xorl	%esi, %esi
	callq	_free_irq
LBB0_6:
	movq	_mmapped@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	movq	_base_iomem@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	je	LBB0_7
## %bb.8:
	callq	_iounmap
	movq	_base@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$2, %esi
	callq	_release_mem_region
	jmp	LBB0_9
LBB0_7:
	callq	_ioport_unmap
	movq	_base@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$2, %esi
	callq	_release_region
LBB0_9:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_pcf_wait,4,2                   ## @pcf_wait
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_pcf_isa_ops,8,3                ## @pcf_isa_ops
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"found device at %#x\n"

	.comm	_base,4,2                       ## @base
	.comm	_irq,8,3                        ## @irq
	.comm	_mmapped,4,2                    ## @mmapped
	.comm	_base_iomem,4,2                 ## @base_iomem
	.no_dead_strip	_elektor_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function elektor_probe
_elektor_probe:                         ; @elektor_probe
	.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
	mov	x19, x0
Lloh0:
	adrp	x0, _pcf_wait@GOTPAGE
Lloh1:
	ldr	x0, [x0, _pcf_wait@GOTPAGEOFF]
	bl	_init_waitqueue_head
	bl	_pcf_isa_init
	cbz	x0, LBB0_2
LBB0_1:
Lloh2:
	adrp	x8, _ENODEV@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_4
LBB0_2:
Lloh5:
	adrp	x0, _pcf_isa_ops@GOTPAGE
Lloh6:
	ldr	x0, [x0, _pcf_isa_ops@GOTPAGEOFF]
	str	x19, [x0]
	bl	_i2c_pcf_add_bus
	tbnz	x0, #63, LBB0_5
; %bb.3:
Lloh7:
	adrp	x8, _base@GOTPAGE
Lloh8:
	ldr	x8, [x8, _base@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_info
	mov	w0, #0
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_5:
Lloh12:
	adrp	x19, _irq@GOTPAGE
Lloh13:
	ldr	x19, [x19, _irq@GOTPAGEOFF]
	ldr	x0, [x19]
	cmp	x0, #1
	b.lt	LBB0_7
; %bb.6:
	bl	_disable_irq
	ldr	x0, [x19]
	mov	x1, #0
	bl	_free_irq
LBB0_7:
Lloh14:
	adrp	x8, _mmapped@GOTPAGE
Lloh15:
	ldr	x8, [x8, _mmapped@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x9, _base_iomem@GOTPAGE
Lloh18:
	ldr	x9, [x9, _base_iomem@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x9]
	cbz	w8, LBB0_9
; %bb.8:
	bl	_iounmap
Lloh20:
	adrp	x8, _base@GOTPAGE
Lloh21:
	ldr	x8, [x8, _base@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	mov	w1, #2
	bl	_release_mem_region
	b	LBB0_1
LBB0_9:
	bl	_ioport_unmap
Lloh23:
	adrp	x8, _base@GOTPAGE
Lloh24:
	ldr	x8, [x8, _base@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	mov	w1, #2
	bl	_release_region
	b	LBB0_1
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_pcf_wait,4,2                   ; @pcf_wait
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_pcf_isa_ops,8,3                ; @pcf_isa_ops
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"found device at %#x\n"

	.comm	_base,4,2                       ; @base
	.comm	_irq,8,3                        ; @irq
	.comm	_mmapped,4,2                    ; @mmapped
	.comm	_base_iomem,4,2                 ; @base_iomem
	.no_dead_strip	_elektor_probe
.subsections_via_symbols
