	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hi6220_mbox_probe
_hi6220_mbox_probe:                     ## @hi6220_mbox_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	%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, %r13
	movq	(%rdi), %r12
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movl	$120, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %r15
	movq	%rax, %r14
	movq	%r13, 112(%r15)
	movq	_MBOX_CHAN_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%esi, (%r15)
	movl	(%rbx), %ecx
	movq	%r13, %rdi
	movl	$16, %edx
	callq	_devm_kcalloc
	movq	%rax, 80(%r15)
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	movl	(%r14), %esi
	movl	(%rbx), %ecx
	movq	%r13, %rdi
	movl	$8, %edx
	callq	_devm_kcalloc
	movq	%rax, 96(%r14)
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_platform_get_irq
	movq	%rax, 8(%r14)
	testq	%rax, %rax
	js	LBB0_9
## %bb.4:
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_platform_get_resource
	movq	%r13, %rdi
	movq	%rax, %rsi
	callq	_devm_ioremap_resource
	movq	%rax, 72(%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_10
## %bb.5:
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	72(%r14), %rdi
	jmp	LBB0_12
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
LBB0_7:
	subl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%rax, %rbx
	jmp	LBB0_8
LBB0_10:
	movl	(%rbx), %esi
	movq	%r13, %rdi
	movl	$1, %edx
	callq	_platform_get_resource
	movq	%r13, %rdi
	movq	%rax, %rsi
	callq	_devm_ioremap_resource
	movq	%rax, 104(%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_13
## %bb.11:
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	104(%r14), %rdi
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_13:
	movl	8(%r14), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_hi6220_mbox_interrupt@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r13, %rdi
	callq	_dev_name
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	xorl	%ecx, %ecx
	movl	%eax, %r8d
	movq	%r14, %r9
	callq	_devm_request_irq
	testl	%eax, %eax
	je	LBB0_15
## %bb.14:
	leaq	L_.str.2(%rip), %rsi
	movq	%r13, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_15:
	movq	%r13, 64(%r14)
	movq	96(%r14), %rcx
	movq	%rcx, 56(%r14)
	movl	(%r14), %eax
	movl	%eax, 24(%r14)
	movq	_hi6220_mbox_ops@GOTPCREL(%rip), %rdx
	movq	%rdx, 48(%r14)
	movq	_hi6220_mbox_xlate@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, 40(%r14)
	testl	%eax, %eax
	jle	LBB0_19
## %bb.16:
	movq	80(%r14), %rdx
	movq	%rdx, (%rcx)
	movq	88(%r14), %rcx
	movq	$0, (%rcx)
	movq	80(%r14), %rcx
	movq	%r14, 8(%rcx)
	movl	$0, (%rcx)
	cmpl	$1, %eax
	je	LBB0_19
## %bb.17:
	movl	$1, %edx
	movl	$16, %esi
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	96(%r14), %rdi
	addq	%rsi, %rcx
	movq	%rcx, (%rdi,%rdx,8)
	movq	88(%r14), %rcx
	movq	$0, (%rcx,%rdx,8)
	movq	80(%r14), %rcx
	movq	%r14, 8(%rcx,%rsi)
	movl	%edx, (%rcx,%rsi)
	incq	%rdx
	addq	$16, %rsi
	cmpq	%rdx, %rax
	jne	LBB0_18
LBB0_19:
	addq	$24, %r15
	movq	72(%r14), %rdi
	callq	_ACK_INT_MSK_REG
	xorl	%edi, %edi
	movl	%eax, %esi
	callq	_writel
	movq	72(%r14), %rdi
	callq	_ACK_INT_CLR_REG
	movl	$-1, %edi
	movl	%eax, %esi
	callq	_writel
	leaq	L_.str.3(%rip), %rsi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_of_find_property
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:
	movl	$0, 16(%r14)
	movabsq	$21474836481, %rax              ## imm = 0x500000001
	movq	%rax, 32(%r14)
	jmp	LBB0_22
LBB0_21:
	movl	$1, 16(%r14)
	movl	$1, 28(%r14)
LBB0_22:
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_devm_mbox_controller_register
	testl	%eax, %eax
	je	LBB0_24
## %bb.23:
	movl	%eax, %ebx
	leaq	L_.str.4(%rip), %rsi
	movq	%r13, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_8
LBB0_24:
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_platform_set_drvdata
	leaq	L_.str.5(%rip), %rsi
	movq	%r13, %rdi
	callq	_dev_info
	xorl	%ebx, %ebx
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MBOX_CHAN_MAX,4,2              ## @MBOX_CHAN_MAX
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ioremap ipc failed\n"

L_.str.1:                               ## @.str.1
	.asciz	"ioremap buffer failed\n"

	.comm	_hi6220_mbox_interrupt,4,2      ## @hi6220_mbox_interrupt
L_.str.2:                               ## @.str.2
	.asciz	"Failed to register a mailbox IRQ handler: %d\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_hi6220_mbox_ops,4,2            ## @hi6220_mbox_ops
	.comm	_hi6220_mbox_xlate,4,2          ## @hi6220_mbox_xlate
L_.str.3:                               ## @.str.3
	.asciz	"hi6220,mbox-tx-noirq"

L_.str.4:                               ## @.str.4
	.asciz	"Failed to register mailbox %d\n"

L_.str.5:                               ## @.str.5
	.asciz	"Mailbox enabled\n"

	.no_dead_strip	_hi6220_mbox_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function hi6220_mbox_probe
lCPI0_0:
	.long	1                               ; 0x1
	.long	5                               ; 0x5
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_hi6220_mbox_probe:                     ; @hi6220_mbox_probe
	.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	x19, x0
	ldr	x21, [x0]
Lloh0:
	adrp	x22, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	w1, #120
	bl	_devm_kzalloc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x20, x0
	str	x19, [x0, #112]
Lloh2:
	adrp	x8, _MBOX_CHAN_MAX@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MBOX_CHAN_MAX@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	str	w1, [x0]
	ldr	w3, [x22]
	mov	x0, x19
	mov	w2, #16
	bl	_devm_kcalloc
	str	x0, [x20, #80]
	cbz	x0, LBB0_6
; %bb.2:
	ldr	w1, [x20]
	ldr	w3, [x22]
	mov	x0, x19
	mov	w2, #8
	bl	_devm_kcalloc
	str	x0, [x20, #96]
	cbz	x0, LBB0_6
; %bb.3:
	mov	x0, x19
	mov	w1, #0
	bl	_platform_get_irq
	str	x0, [x20, #8]
	tbnz	x0, #63, LBB0_8
; %bb.4:
Lloh5:
	adrp	x22, _IORESOURCE_MEM@GOTPAGE
Lloh6:
	ldr	x22, [x22, _IORESOURCE_MEM@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #0
	bl	_platform_get_resource
	mov	x1, x0
	mov	x0, x19
	bl	_devm_ioremap_resource
	str	x0, [x20, #72]
	bl	_IS_ERR
	cbz	x0, LBB0_9
; %bb.5:
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	x0, [x20, #72]
	b	LBB0_11
LBB0_6:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
                                        ; kill: def $w0 killed $w0 killed $x0
	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_9:
	ldr	w1, [x22]
	mov	x0, x19
	mov	w2, #1
	bl	_platform_get_resource
	mov	x1, x0
	mov	x0, x19
	bl	_devm_ioremap_resource
	str	x0, [x20, #104]
	bl	_IS_ERR
	cbz	x0, LBB0_12
; %bb.10:
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	x0, [x20, #104]
LBB0_11:
	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
	b	_PTR_ERR
LBB0_12:
	ldr	w22, [x20, #8]
Lloh13:
	adrp	x8, _hi6220_mbox_interrupt@GOTPAGE
Lloh14:
	ldr	x8, [x8, _hi6220_mbox_interrupt@GOTPAGEOFF]
Lloh15:
	ldr	w23, [x8]
	mov	x0, x19
	bl	_dev_name
	mov	x4, x0
	mov	x0, x19
	mov	x1, x22
	mov	x2, x23
	mov	w3, #0
	mov	x5, x20
	bl	_devm_request_irq
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_14
; %bb.13:
	str	x0, [sp]
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh18:
	adrp	x8, _ENODEV@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_7
LBB0_14:
	ldr	w8, [x20]
	mov	x22, x20
	str	w8, [x22, #24]!
	str	x19, [x22, #40]
	ldr	x9, [x22, #72]
Lloh20:
	adrp	x10, _hi6220_mbox_ops@GOTPAGE
Lloh21:
	ldr	x10, [x10, _hi6220_mbox_ops@GOTPAGEOFF]
	stp	x10, x9, [x22, #24]
Lloh22:
	adrp	x10, _hi6220_mbox_xlate@GOTPAGE
Lloh23:
	ldr	x10, [x10, _hi6220_mbox_xlate@GOTPAGEOFF]
Lloh24:
	ldr	w10, [x10]
	str	w10, [x22, #16]
	cmp	w8, #1
	b.lt	LBB0_18
; %bb.15:
	ldp	x10, x11, [x20, #80]
	str	x10, [x9]
	str	xzr, [x11]
	ldr	x9, [x20, #80]
	str	x20, [x9, #8]
	str	wzr, [x9]
	cmp	w8, #1
	b.eq	LBB0_18
; %bb.16:
	mov	x10, #0
	mov	w11, #1
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	add	x9, x9, x10
	add	x9, x9, #16
	lsl	x12, x11, #3
	ldp	x14, x13, [x20, #88]
	str	x9, [x13, x12]
	str	xzr, [x14, x12]
	ldr	x9, [x20, #80]
	add	x12, x9, x10
	str	x20, [x12, #24]
	str	w11, [x12, #16]
	add	x11, x11, #1
	add	x10, x10, #16
	cmp	x8, x11
	b.ne	LBB0_17
LBB0_18:
	ldr	x0, [x20, #72]
	bl	_ACK_INT_MSK_REG
	mov	x1, x0
	mov	w0, #0
	bl	_writel
	ldr	x0, [x20, #72]
	bl	_ACK_INT_CLR_REG
	mov	x1, x0
	mov	w0, #-1
	bl	_writel
Lloh25:
	adrp	x1, l_.str.3@PAGE
Lloh26:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x21
	mov	x2, #0
	bl	_of_find_property
	cbz	x0, LBB0_20
; %bb.19:
	str	wzr, [x20, #16]
Lloh27:
	adrp	x8, lCPI0_0@PAGE
Lloh28:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x20, #32]
	b	LBB0_21
LBB0_20:
	mov	w8, #1
	str	w8, [x20, #16]
	str	w8, [x20, #28]
LBB0_21:
	mov	x0, x19
	mov	x1, x22
	bl	_devm_mbox_controller_register
	cbz	w0, LBB0_23
; %bb.22:
	mov	x21, x0
	str	x21, [sp]
Lloh29:
	adrp	x1, l_.str.4@PAGE
Lloh30:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	mov	x0, x21
	b	LBB0_8
LBB0_23:
	mov	x0, x19
	mov	x1, x20
	bl	_platform_set_drvdata
Lloh31:
	adrp	x1, l_.str.5@PAGE
Lloh32:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_dev_info
	mov	w0, #0
	b	LBB0_8
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdr	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MBOX_CHAN_MAX,4,2              ; @MBOX_CHAN_MAX
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ioremap ipc failed\n"

l_.str.1:                               ; @.str.1
	.asciz	"ioremap buffer failed\n"

	.comm	_hi6220_mbox_interrupt,4,2      ; @hi6220_mbox_interrupt
l_.str.2:                               ; @.str.2
	.asciz	"Failed to register a mailbox IRQ handler: %d\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_hi6220_mbox_ops,4,2            ; @hi6220_mbox_ops
	.comm	_hi6220_mbox_xlate,4,2          ; @hi6220_mbox_xlate
l_.str.3:                               ; @.str.3
	.asciz	"hi6220,mbox-tx-noirq"

l_.str.4:                               ; @.str.4
	.asciz	"Failed to register mailbox %d\n"

l_.str.5:                               ; @.str.5
	.asciz	"Mailbox enabled\n"

	.no_dead_strip	_hi6220_mbox_probe
.subsections_via_symbols
