	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ehea_probe_adapter
_ehea_probe_adapter:                    ## @ehea_probe_adapter
	.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, %r15
	xorl	%eax, %eax
	callq	_ehea_register_memory_hooks
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_28
## %bb.1:
	testq	%r15, %r15
	je	LBB0_3
## %bb.2:
	cmpl	$0, (%r15)
	je	LBB0_3
## %bb.4:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	$48, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %r14
	movq	_adapter_list@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	callq	_list_add
	movq	%r15, 40(%r14)
	movl	(%r15), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%edx, %edx
	callq	_of_get_property
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movl	(%rax), %eax
	movl	%eax, 32(%r14)
	testl	%eax, %eax
	je	LBB0_10
LBB0_11:
	movq	_EHEA_PD_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%r14)
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_platform_set_drvdata
	movq	%r14, %rdi
	callq	_ehea_sense_adapter_attr
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	movl	%eax, %ebx
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_26
LBB0_3:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_28
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_27
LBB0_7:
	movl	32(%r14), %eax
	testl	%eax, %eax
	jne	LBB0_11
LBB0_10:
	movl	(%r15), %edx
	leaq	L_.str.3(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_26
LBB0_13:
	movq	_EHEA_NEQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_EHEA_MAX_ENTRIES_EQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$1, %ecx
	callq	_ehea_create_eq
	movq	%rax, 8(%r14)
	testq	%rax, %rax
	je	LBB0_14
## %bb.15:
	movq	%r14, %r13
	addq	$24, %r13
	movq	_ehea_neq_tasklet@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	movq	%r14, %rdx
	callq	_tasklet_init
	movq	%r15, %rdi
	callq	_ehea_create_device_sysfs
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_25
## %bb.16:
	movq	%r14, %rdi
	callq	_ehea_setup_ports
	testl	%eax, %eax
	je	LBB0_18
## %bb.17:
	movl	%eax, %r12d
	leaq	L_.str.6(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_24:
	movq	%r15, %rdi
	callq	_ehea_remove_device_sysfs
LBB0_25:
	movq	8(%r14), %rdi
	callq	_ehea_destroy_eq
	movl	%r12d, %ebx
	jmp	LBB0_26
LBB0_14:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	leaq	L_.str.5(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_26:
	movq	%r14, %rdi
	callq	_list_del
LBB0_27:
	xorl	%eax, %eax
	callq	_ehea_update_firmware_handles
LBB0_28:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	movq	8(%r14), %rax
	movl	(%rax), %edi
	movq	_ehea_interrupt_neq@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.7(%rip), %rcx
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	movq	%r14, %r8
	callq	_ibmebus_request_irq
	testl	%eax, %eax
	je	LBB0_29
## %bb.19:
	movl	%eax, %r12d
	leaq	L_.str.8(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EHEA_MAX_PORTS@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	testl	%eax, %eax
	jle	LBB0_24
## %bb.20:
	xorl	%ebx, %ebx
	jmp	LBB0_21
LBB0_23:                                ##   in Loop: Header=BB0_21 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_24
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r14), %rcx
	movq	(%rcx,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=1
	callq	_ehea_shutdown_single_port
	movq	16(%r14), %rax
	movq	$0, (%rax,%rbx,8)
	movl	(%r13), %eax
	jmp	LBB0_23
LBB0_29:
	movq	%r13, %rdi
	callq	_tasklet_hi_schedule
	jmp	LBB0_27
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid ibmebus device probed\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"no mem for ehea_adapter\n"

	.comm	_adapter_list,4,2               ## @adapter_list
L_.str.2:                               ## @.str.2
	.asciz	"ibm,hea-handle"

L_.str.3:                               ## @.str.3
	.asciz	"failed getting handle for adapter '%pOF'\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_EHEA_PD_ID,4,2                 ## @EHEA_PD_ID
L_.str.4:                               ## @.str.4
	.asciz	"sense_adapter_attr failed: %d\n"

	.comm	_EHEA_NEQ,4,2                   ## @EHEA_NEQ
	.comm	_EHEA_MAX_ENTRIES_EQ,4,2        ## @EHEA_MAX_ENTRIES_EQ
	.comm	_EIO,4,2                        ## @EIO
L_.str.5:                               ## @.str.5
	.asciz	"NEQ creation failed\n"

	.comm	_ehea_neq_tasklet,4,2           ## @ehea_neq_tasklet
L_.str.6:                               ## @.str.6
	.asciz	"setup_ports failed\n"

	.comm	_ehea_interrupt_neq,4,2         ## @ehea_interrupt_neq
L_.str.7:                               ## @.str.7
	.asciz	"ehea_neq"

L_.str.8:                               ## @.str.8
	.asciz	"requesting NEQ IRQ failed\n"

	.comm	_EHEA_MAX_PORTS,4,2             ## @EHEA_MAX_PORTS
	.no_dead_strip	_ehea_probe_adapter
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ehea_probe_adapter
_ehea_probe_adapter:                    ; @ehea_probe_adapter
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x0
	bl	_ehea_register_memory_hooks
	mov	x21, x0
	cbnz	w0, LBB0_21
; %bb.1:
	cbz	x20, LBB0_9
; %bb.2:
	ldr	w8, [x20]
	cbz	w8, LBB0_9
; %bb.3:
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #48
	bl	_devm_kzalloc
	cbz	x0, LBB0_10
; %bb.4:
	mov	x19, x0
Lloh3:
	adrp	x1, _adapter_list@GOTPAGE
Lloh4:
	ldr	x1, [x1, _adapter_list@GOTPAGEOFF]
	bl	_list_add
	str	x20, [x19, #40]
	ldr	w0, [x20]
Lloh5:
	adrp	x1, l_.str.2@PAGE
Lloh6:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, #0
	bl	_of_get_property
	cbz	x0, LBB0_11
; %bb.5:
	ldr	w8, [x0]
	str	w8, [x19, #32]
	cbz	w8, LBB0_12
LBB0_6:
Lloh7:
	adrp	x8, _EHEA_PD_ID@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EHEA_PD_ID@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	str	w8, [x19, #28]
	mov	x0, x20
	mov	x1, x19
	bl	_platform_set_drvdata
	mov	x0, x19
	bl	_ehea_sense_adapter_attr
	cbz	w0, LBB0_13
; %bb.7:
	mov	x21, x0
	str	x21, [sp]
Lloh10:
	adrp	x1, l_.str.4@PAGE
Lloh11:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_8:
	mov	x0, x20
	bl	_dev_err
	b	LBB0_19
LBB0_9:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_21
LBB0_10:
Lloh17:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w21, w8
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	b	LBB0_20
LBB0_11:
	ldr	w8, [x19, #32]
	cbnz	w8, LBB0_6
LBB0_12:
	ldr	w8, [x20]
	str	x8, [sp]
Lloh22:
	adrp	x1, l_.str.3@PAGE
Lloh23:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh24:
	adrp	x8, _ENODEV@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_19
LBB0_13:
Lloh27:
	adrp	x8, _EHEA_NEQ@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EHEA_NEQ@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
Lloh30:
	adrp	x8, _EHEA_MAX_ENTRIES_EQ@GOTPAGE
Lloh31:
	ldr	x8, [x8, _EHEA_MAX_ENTRIES_EQ@GOTPAGEOFF]
Lloh32:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #1
	bl	_ehea_create_eq
	str	x0, [x19, #8]
	cbz	x0, LBB0_22
; %bb.14:
	add	x22, x19, #24
Lloh33:
	adrp	x8, _ehea_neq_tasklet@GOTPAGE
Lloh34:
	ldr	x8, [x8, _ehea_neq_tasklet@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	mov	x0, x22
	mov	x2, x19
	bl	_tasklet_init
	mov	x0, x20
	bl	_ehea_create_device_sysfs
	mov	x21, x0
	cbnz	w0, LBB0_18
; %bb.15:
	mov	x0, x19
	bl	_ehea_setup_ports
	cbz	w0, LBB0_23
; %bb.16:
	mov	x21, x0
Lloh36:
	adrp	x1, l_.str.6@PAGE
Lloh37:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x20
	bl	_dev_err
LBB0_17:
	mov	x0, x20
	bl	_ehea_remove_device_sysfs
LBB0_18:
	ldr	x0, [x19, #8]
	bl	_ehea_destroy_eq
LBB0_19:
	mov	x0, x19
	bl	_list_del
LBB0_20:
	bl	_ehea_update_firmware_handles
LBB0_21:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_22:
Lloh38:
	adrp	x8, _EIO@GOTPAGE
Lloh39:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	neg	w21, w8
Lloh41:
	adrp	x1, l_.str.5@PAGE
Lloh42:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_8
LBB0_23:
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
Lloh43:
	adrp	x8, _ehea_interrupt_neq@GOTPAGE
Lloh44:
	ldr	x8, [x8, _ehea_interrupt_neq@GOTPAGEOFF]
Lloh45:
	ldr	w1, [x8]
Lloh46:
	adrp	x3, l_.str.7@PAGE
Lloh47:
	add	x3, x3, l_.str.7@PAGEOFF
	mov	w2, #0
	mov	x4, x19
	bl	_ibmebus_request_irq
	mov	x21, x0
	cbz	w0, LBB0_29
; %bb.24:
Lloh48:
	adrp	x1, l_.str.8@PAGE
Lloh49:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh50:
	adrp	x22, _EHEA_MAX_PORTS@GOTPAGE
Lloh51:
	ldr	x22, [x22, _EHEA_MAX_PORTS@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.25:
	mov	x23, #0
	b	LBB0_27
LBB0_26:                                ;   in Loop: Header=BB0_27 Depth=1
	add	x23, x23, #1
	cmp	x23, w8, sxtw
	b.ge	LBB0_17
LBB0_27:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #16]
	ldr	x0, [x9, x23, lsl #3]
	cbz	x0, LBB0_26
; %bb.28:                               ;   in Loop: Header=BB0_27 Depth=1
	bl	_ehea_shutdown_single_port
	ldr	x8, [x19, #16]
	str	xzr, [x8, x23, lsl #3]
	ldr	w8, [x22]
	b	LBB0_26
LBB0_29:
	mov	x0, x22
	bl	_tasklet_hi_schedule
	b	LBB0_20
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh50, Lloh51
	.loh AdrpAdd	Lloh48, Lloh49
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid ibmebus device probed\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"no mem for ehea_adapter\n"

	.comm	_adapter_list,4,2               ; @adapter_list
l_.str.2:                               ; @.str.2
	.asciz	"ibm,hea-handle"

l_.str.3:                               ; @.str.3
	.asciz	"failed getting handle for adapter '%pOF'\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_EHEA_PD_ID,4,2                 ; @EHEA_PD_ID
l_.str.4:                               ; @.str.4
	.asciz	"sense_adapter_attr failed: %d\n"

	.comm	_EHEA_NEQ,4,2                   ; @EHEA_NEQ
	.comm	_EHEA_MAX_ENTRIES_EQ,4,2        ; @EHEA_MAX_ENTRIES_EQ
	.comm	_EIO,4,2                        ; @EIO
l_.str.5:                               ; @.str.5
	.asciz	"NEQ creation failed\n"

	.comm	_ehea_neq_tasklet,4,2           ; @ehea_neq_tasklet
l_.str.6:                               ; @.str.6
	.asciz	"setup_ports failed\n"

	.comm	_ehea_interrupt_neq,4,2         ; @ehea_interrupt_neq
l_.str.7:                               ; @.str.7
	.asciz	"ehea_neq"

l_.str.8:                               ; @.str.8
	.asciz	"requesting NEQ IRQ failed\n"

	.comm	_EHEA_MAX_PORTS,4,2             ; @EHEA_MAX_PORTS
	.no_dead_strip	_ehea_probe_adapter
.subsections_via_symbols
