	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cmdq_probe
_cmdq_probe:                            ## @cmdq_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, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movl	$88, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_18
## %bb.1:
	movq	%rax, %r15
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_platform_get_resource
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_devm_ioremap_resource
	movq	%rax, 72(%r15)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	72(%r15), %rdi
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_4:
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_platform_get_irq
	movl	%eax, 80(%r15)
	testl	%eax, %eax
	je	LBB0_8
## %bb.5:
	movq	%r14, %rdi
	callq	_of_device_get_match_data
	movl	%eax, (%r15)
	leal	-1(%rax), %edi
	xorl	%esi, %esi
	callq	_GENMASK
	movl	%eax, 84(%r15)
	movl	80(%r15), %esi
	movq	_cmdq_irq_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_IRQF_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str.2(%rip), %r8
	movq	%r14, %rdi
	movq	%r15, %r9
	callq	_devm_request_irq
	testl	%eax, %eax
	js	LBB0_9
## %bb.6:
	movq	72(%r15), %rcx
	movl	80(%r15), %r8d
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdi
	movq	%r14, %rdx
	callq	_dev_dbg
	leaq	L_.str.5(%rip), %rsi
	movq	%r14, %rdi
	callq	_devm_clk_get
	movq	%rax, 8(%r15)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_11
## %bb.7:
	leaq	L_.str.6(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	8(%r15), %rdi
	jmp	LBB0_3
LBB0_8:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_9:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rsi
LBB0_10:
	movq	%r14, %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_20
LBB0_11:
	movq	%r14, 56(%r15)
	movl	(%r15), %esi
	movl	(%r12), %ecx
	movq	%r14, %rdi
	movl	$8, %edx
	callq	_devm_kcalloc
	movq	%rax, 32(%r15)
	testq	%rax, %rax
	je	LBB0_18
## %bb.12:
	movl	(%r15), %esi
	movl	%esi, 16(%r15)
	movq	_cmdq_mbox_chan_ops@GOTPCREL(%rip), %rax
	movq	%rax, 48(%r15)
	movq	_cmdq_xlate@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%r15)
	movq	$0, 20(%r15)
	movl	(%r12), %ecx
	movq	%r14, %rdi
	movl	$16, %edx
	callq	_devm_kcalloc
	movq	%rax, 64(%r15)
	testq	%rax, %rax
	je	LBB0_18
## %bb.13:
	movq	%rax, %rdi
	movq	%r15, %rax
	addq	$16, %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	cmpl	$0, (%r15)
	jle	LBB0_16
## %bb.14:
	xorl	%ebx, %ebx
	movq	_CMDQ_THR_SIZE@GOTPCREL(%rip), %r12
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	_CMDQ_THR_BASE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	72(%r15), %rax
	movslq	(%r12), %rcx
	movslq	%r13d, %rdx
	imulq	%rcx, %rdx
	addq	%rax, %rdx
	movq	%rdx, 8(%rdi,%rbx)
	addq	%rbx, %rdi
	callq	_INIT_LIST_HEAD
	movq	32(%r15), %rax
	movq	64(%r15), %rdi
	leaq	(%rdi,%rbx), %rcx
	movq	%rcx, (%rax,%r13,8)
	incq	%r13
	movslq	(%r15), %rax
	addq	$16, %rbx
	cmpq	%rax, %r13
	jl	LBB0_15
LBB0_16:
	movq	%r14, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_devm_mbox_controller_register
	testl	%eax, %eax
	js	LBB0_21
## %bb.17:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_platform_set_drvdata
	movq	8(%r15), %rdi
	callq	_clk_prepare
	shrq	$63, %rax
	movl	%eax, %edi
	callq	_WARN_ON
	movq	%r15, %rdi
	callq	_cmdq_init
	xorl	%ebx, %ebx
	jmp	LBB0_20
LBB0_18:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
LBB0_19:
	subl	(%rax), %ebx
LBB0_20:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	movl	%eax, %ebx
	leaq	L_.str.7(%rip), %rsi
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to ioremap gce\n"

L_.str.1:                               ## @.str.1
	.asciz	"failed to get irq\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_cmdq_irq_handler,4,2           ## @cmdq_irq_handler
	.comm	_IRQF_SHARED,4,2                ## @IRQF_SHARED
L_.str.2:                               ## @.str.2
	.asciz	"mtk_cmdq"

L_.str.3:                               ## @.str.3
	.asciz	"failed to register ISR (%d)\n"

L_.str.4:                               ## @.str.4
	.asciz	"cmdq device: addr:0x%p, va:0x%p, irq:%d\n"

L_.str.5:                               ## @.str.5
	.asciz	"gce"

L_.str.6:                               ## @.str.6
	.asciz	"failed to get gce clk\n"

	.comm	_cmdq_mbox_chan_ops,4,2         ## @cmdq_mbox_chan_ops
	.comm	_cmdq_xlate,4,2                 ## @cmdq_xlate
	.comm	_CMDQ_THR_BASE,8,3              ## @CMDQ_THR_BASE
	.comm	_CMDQ_THR_SIZE,4,2              ## @CMDQ_THR_SIZE
L_.str.7:                               ## @.str.7
	.asciz	"failed to register mailbox: %d\n"

	.no_dead_strip	_cmdq_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cmdq_probe
_cmdq_probe:                            ; @cmdq_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
Lloh0:
	adrp	x22, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	w1, #88
	bl	_devm_kzalloc
	cbz	x0, LBB0_17
; %bb.1:
	mov	x20, x0
Lloh2:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	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_4
; %bb.2:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	x0, [x20, #72]
LBB0_3:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_PTR_ERR
LBB0_4:
	mov	x0, x19
	mov	w1, #0
	bl	_platform_get_irq
	str	w0, [x20, #80]
	cbz	w0, LBB0_8
; %bb.5:
	mov	x0, x19
	bl	_of_device_get_match_data
	str	w0, [x20]
	sub	w0, w0, #1
	mov	w1, #0
	bl	_GENMASK
	str	w0, [x20, #84]
	ldr	w1, [x20, #80]
Lloh7:
	adrp	x8, _cmdq_irq_handler@GOTPAGE
Lloh8:
	ldr	x8, [x8, _cmdq_irq_handler@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
Lloh10:
	adrp	x8, _IRQF_SHARED@GOTPAGE
Lloh11:
	ldr	x8, [x8, _IRQF_SHARED@GOTPAGEOFF]
Lloh12:
	ldr	w3, [x8]
Lloh13:
	adrp	x4, l_.str.2@PAGE
Lloh14:
	add	x4, x4, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	x5, x20
	bl	_devm_request_irq
	tbnz	w0, #31, LBB0_9
; %bb.6:
	ldr	x3, [x20, #72]
	ldr	w4, [x20, #80]
Lloh15:
	adrp	x1, l_.str.4@PAGE
Lloh16:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	mov	x2, x19
	bl	_dev_dbg
Lloh17:
	adrp	x1, l_.str.5@PAGE
Lloh18:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_devm_clk_get
	str	x0, [x20, #8]
	bl	_IS_ERR
	cbz	x0, LBB0_10
; %bb.7:
Lloh19:
	adrp	x1, l_.str.6@PAGE
Lloh20:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	x0, [x20, #8]
	b	LBB0_3
LBB0_8:
Lloh21:
	adrp	x1, l_.str.1@PAGE
Lloh22:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh23:
	adrp	x8, _EINVAL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_18
LBB0_9:
	mov	x21, x0
	str	x21, [sp]
Lloh25:
	adrp	x1, l_.str.3@PAGE
Lloh26:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_19
LBB0_10:
	str	x19, [x20, #56]
	ldr	w1, [x20]
	ldr	w3, [x22]
	mov	x0, x19
	mov	w2, #8
	bl	_devm_kcalloc
	str	x0, [x20, #32]
	cbz	x0, LBB0_17
; %bb.11:
	ldr	w1, [x20]
Lloh27:
	adrp	x8, _cmdq_mbox_chan_ops@GOTPAGE
Lloh28:
	ldr	x8, [x8, _cmdq_mbox_chan_ops@GOTPAGEOFF]
	str	x8, [x20, #48]
Lloh29:
	adrp	x8, _cmdq_xlate@GOTPAGE
Lloh30:
	ldr	x8, [x8, _cmdq_xlate@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	str	w8, [x20, #40]
	stp	wzr, wzr, [x20, #20]
	str	w1, [x20, #16]
	ldr	w3, [x22]
	mov	x0, x19
	mov	w2, #16
	bl	_devm_kcalloc
	str	x0, [x20, #64]
	cbz	x0, LBB0_17
; %bb.12:
	add	x21, x20, #16
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.13:
	mov	x22, #0
	mov	x23, #0
Lloh32:
	adrp	x24, _CMDQ_THR_BASE@GOTPAGE
Lloh33:
	ldr	x24, [x24, _CMDQ_THR_BASE@GOTPAGEOFF]
Lloh34:
	adrp	x25, _CMDQ_THR_SIZE@GOTPAGE
Lloh35:
	ldr	x25, [x25, _CMDQ_THR_SIZE@GOTPAGEOFF]
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #72]
	ldr	x9, [x24]
	add	x8, x9, x8
	ldrsw	x9, [x25]
	sxtw	x10, w23
	madd	x8, x9, x10, x8
	add	x0, x0, x22
	str	x8, [x0, #8]
	bl	_INIT_LIST_HEAD
	ldr	x0, [x20, #64]
	add	x8, x0, x22
	ldr	x9, [x20, #32]
	str	x8, [x9, x23, lsl #3]
	add	x23, x23, #1
	ldrsw	x8, [x20]
	add	x22, x22, #16
	cmp	x23, x8
	b.lt	LBB0_14
LBB0_15:
	mov	x0, x19
	mov	x1, x21
	bl	_devm_mbox_controller_register
	tbnz	w0, #31, LBB0_20
; %bb.16:
	mov	x0, x19
	mov	x1, x20
	bl	_platform_set_drvdata
	ldr	x0, [x20, #8]
	bl	_clk_prepare
	lsr	x0, x0, #63
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_WARN_ON
	mov	x0, x20
	bl	_cmdq_init
	mov	w21, #0
	b	LBB0_19
LBB0_17:
Lloh36:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh37:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_18:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_19:
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_20:
	mov	x21, x0
	str	x21, [sp]
Lloh38:
	adrp	x1, l_.str.7@PAGE
Lloh39:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x19
	bl	_dev_err
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	b	LBB0_19
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to ioremap gce\n"

l_.str.1:                               ; @.str.1
	.asciz	"failed to get irq\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_cmdq_irq_handler,4,2           ; @cmdq_irq_handler
	.comm	_IRQF_SHARED,4,2                ; @IRQF_SHARED
l_.str.2:                               ; @.str.2
	.asciz	"mtk_cmdq"

l_.str.3:                               ; @.str.3
	.asciz	"failed to register ISR (%d)\n"

l_.str.4:                               ; @.str.4
	.asciz	"cmdq device: addr:0x%p, va:0x%p, irq:%d\n"

l_.str.5:                               ; @.str.5
	.asciz	"gce"

l_.str.6:                               ; @.str.6
	.asciz	"failed to get gce clk\n"

	.comm	_cmdq_mbox_chan_ops,4,2         ; @cmdq_mbox_chan_ops
	.comm	_cmdq_xlate,4,2                 ; @cmdq_xlate
	.comm	_CMDQ_THR_BASE,8,3              ; @CMDQ_THR_BASE
	.comm	_CMDQ_THR_SIZE,4,2              ; @CMDQ_THR_SIZE
l_.str.7:                               ; @.str.7
	.asciz	"failed to register mailbox: %d\n"

	.no_dead_strip	_cmdq_probe
.subsections_via_symbols
