	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdma_event_remap
_sdma_event_remap:                      ## @sdma_event_remap
	.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
	subq	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %rax
	movq	(%rax), %rbx
	leaq	L_.str(%rip), %rsi
	xorl	%r12d, %r12d
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_of_parse_phandle
	movq	%rax, %r14
	movaps	L___const.sdma_event_remap.propname(%rip), %xmm0
	movaps	%xmm0, -80(%rbp)
	movabsq	$31632319872904564, %rax        ## imm = 0x70616D65722D74
	movq	%rax, -67(%rbp)
	movq	%rbx, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_18
## %bb.1:
	movq	%r14, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_18
## %bb.2:
	xorl	%r12d, %r12d
	leaq	-80(%rbp), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_of_find_property
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	(%rax), %r13d
	cmpl	$3, %r13d
	ja	LBB0_5
LBB0_4:
	movq	(%r15), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_dbg
	jmp	LBB0_18
LBB0_5:
	movl	%r13d, %r12d
	sarl	$2, %r12d
	movq	_EVENT_REMAP_CELLS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r12d, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	je	LBB0_7
## %bb.6:
	movq	(%r15), %rdi
	leaq	L_.str.2(%rip), %rsi
	xorl	%r12d, %r12d
	leaq	-80(%rbp), %rdx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	jmp	LBB0_18
LBB0_7:
	movq	%r14, %rdi
	callq	_syscon_node_to_regmap
	movq	%rax, -120(%rbp)                ## 8-byte Spill
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_8
## %bb.22:
	movq	(%r15), %rdi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	movq	-120(%rbp), %rdi                ## 8-byte Reload
	callq	_PTR_ERR
	movl	%eax, %r12d
	jmp	LBB0_18
LBB0_8:
	movl	%r12d, -100(%rbp)               ## 4-byte Spill
	xorl	%r12d, %r12d
	cmpl	$4, %r13d
	jl	LBB0_18
## %bb.9:
	xorl	%eax, %eax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	leaq	-80(%rbp), %r13
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	leaq	-108(%rbp), %rcx
	callq	_of_property_read_u32_index
	testl	%eax, %eax
	jne	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	leal	1(%rax), %edx
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movl	%edx, -96(%rbp)                 ## 4-byte Spill
	leaq	-92(%rbp), %rcx
	callq	_of_property_read_u32_index
	testl	%eax, %eax
	jne	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	addl	$2, %eax
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movl	%eax, %r13d
	movl	%eax, %edx
	leaq	-104(%rbp), %rcx
	callq	_of_property_read_u32_index
	testl	%eax, %eax
	jne	LBB0_15
## %bb.17:                              ##   in Loop: Header=BB0_10 Depth=1
	movl	-108(%rbp), %r12d
	movl	-92(%rbp), %edi
	callq	_BIT
	movl	-104(%rbp), %r8d
	movzbl	-92(%rbp), %ecx
	shll	%cl, %r8d
	movq	-120(%rbp), %rdi                ## 8-byte Reload
	movl	%r12d, %esi
	movl	%eax, %edx
	movl	%r8d, %ecx
	callq	_regmap_update_bits
	movq	_EVENT_REMAP_CELLS@GOTPCREL(%rip), %rax
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	addl	(%rax), %ecx
	xorl	%r12d, %r12d
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	cmpl	-100(%rbp), %ecx                ## 4-byte Folded Reload
	leaq	-80(%rbp), %r13
	jl	LBB0_10
	jmp	LBB0_18
LBB0_11:
	movl	%eax, %r12d
	movq	(%r15), %rdi
	leaq	L_.str.4(%rip), %rsi
	leaq	-80(%rbp), %rdx
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
                                        ## kill: def $ecx killed $ecx killed $rcx
	jmp	LBB0_16
LBB0_13:
	movl	%eax, %r12d
	movq	(%r15), %rdi
	leaq	L_.str.4(%rip), %rsi
	leaq	-80(%rbp), %rdx
	movl	-96(%rbp), %ecx                 ## 4-byte Reload
	jmp	LBB0_16
LBB0_15:
	movl	%eax, %r12d
	movq	(%r15), %rdi
	leaq	L_.str.4(%rip), %rsi
	leaq	-80(%rbp), %rdx
	movl	%r13d, %ecx
LBB0_16:
	xorl	%eax, %eax
	callq	_dev_err
LBB0_18:
	movq	%r14, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_20
## %bb.19:
	movq	%r14, %rdi
	callq	_of_node_put
LBB0_20:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_23
## %bb.21:
	movl	%r12d, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_23:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"gpr"

	.p2align	4                               ## @__const.sdma_event_remap.propname
L___const.sdma_event_remap.propname:
	.asciz	"fsl,sdma-event-remap"

L_.str.1:                               ## @.str.1
	.asciz	"no event needs to be remapped\n"

	.comm	_EVENT_REMAP_CELLS,4,2          ## @EVENT_REMAP_CELLS
L_.str.2:                               ## @.str.2
	.asciz	"the property %s must modulo %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.3:                               ## @.str.3
	.asciz	"failed to get gpr regmap\n"

L_.str.4:                               ## @.str.4
	.asciz	"failed to read property %s index %d\n"

	.no_dead_strip	_sdma_event_remap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdma_event_remap
_sdma_event_remap:                      ; @sdma_event_remap
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #56]
	ldr	x8, [x0]
	ldr	x21, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	w2, #0
	bl	_of_parse_phandle
	mov	x19, x0
Lloh5:
	adrp	x8, l___const.sdma_event_remap.propname@PAGE
Lloh6:
	add	x8, x8, l___const.sdma_event_remap.propname@PAGEOFF
	ldr	q0, [x8]
	str	q0, [sp, #32]
	ldur	x8, [x8, #13]
	stur	x8, [sp, #45]
	mov	x0, x21
	bl	_IS_ERR
	mov	w22, #0
	cbnz	x0, LBB0_10
; %bb.1:
	mov	x0, x19
	bl	_IS_ERR
	cbz	x0, LBB0_3
LBB0_2:
	mov	w22, #0
	b	LBB0_10
LBB0_3:
	add	x1, sp, #32
	mov	x0, x21
	mov	x2, #0
	bl	_of_find_property
	cbz	x0, LBB0_5
; %bb.4:
	ldr	w22, [x0]
	cmp	w22, #3
	b.hi	LBB0_6
LBB0_5:
	ldr	x0, [x20]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
	mov	w22, #0
	b	LBB0_10
LBB0_6:
	asr	w26, w22, #2
Lloh9:
	adrp	x27, _EVENT_REMAP_CELLS@GOTPAGE
Lloh10:
	ldr	x27, [x27, _EVENT_REMAP_CELLS@GOTPAGEOFF]
	ldr	w8, [x27]
	sdiv	w9, w26, w8
	msub	w9, w9, w8, w26
	cbz	w9, LBB0_8
; %bb.7:
	ldr	x0, [x20]
	add	x9, sp, #32
	stp	x9, x8, [sp]
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_10
LBB0_8:
	mov	x0, x19
	bl	_syscon_node_to_regmap
	mov	x23, x0
	bl	_IS_ERR
	cbz	x0, LBB0_14
; %bb.9:
	ldr	x0, [x20]
Lloh16:
	adrp	x1, l_.str.3@PAGE
Lloh17:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
	mov	x0, x23
	bl	_PTR_ERR
	mov	x22, x0
LBB0_10:
	mov	x0, x19
	bl	_IS_ERR
	cbnz	x0, LBB0_12
; %bb.11:
	mov	x0, x19
	bl	_of_node_put
LBB0_12:
	ldr	x8, [sp, #56]
Lloh18:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh19:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_23
; %bb.13:
	mov	x0, x22
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_14:
	cmp	w22, #4
	b.lt	LBB0_2
; %bb.15:
	mov	w24, #0
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #32
	add	x3, sp, #28
	mov	x0, x21
	mov	x2, x24
	bl	_of_property_read_u32_index
	cbnz	w0, LBB0_21
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	add	w25, w24, #1
	add	x1, sp, #32
	add	x3, sp, #20
	mov	x0, x21
	mov	x2, x25
	bl	_of_property_read_u32_index
	cbnz	w0, LBB0_20
; %bb.18:                               ;   in Loop: Header=BB0_16 Depth=1
	add	w25, w24, #2
	add	x1, sp, #32
	add	x3, sp, #24
	mov	x0, x21
	mov	x2, x25
	bl	_of_property_read_u32_index
	cbnz	w0, LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_16 Depth=1
	ldr	w22, [sp, #28]
	ldr	w0, [sp, #20]
	bl	_BIT
	mov	x2, x0
	ldp	w9, w8, [sp, #20]
	lsl	w3, w8, w9
	mov	x0, x23
	mov	x1, x22
	bl	_regmap_update_bits
	mov	w22, #0
	ldr	w8, [x27]
	add	w24, w8, w24
	cmp	w24, w26
	b.lt	LBB0_16
	b	LBB0_10
LBB0_20:
	mov	x22, x0
	ldr	x0, [x20]
	add	x8, sp, #32
	str	x25, [sp, #8]
	b	LBB0_22
LBB0_21:
	mov	x22, x0
	ldr	x0, [x20]
	add	x8, sp, #32
	str	x24, [sp, #8]
LBB0_22:
	str	x8, [sp]
Lloh21:
	adrp	x1, l_.str.4@PAGE
Lloh22:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_err
	b	LBB0_10
LBB0_23:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"gpr"

l___const.sdma_event_remap.propname:    ; @__const.sdma_event_remap.propname
	.asciz	"fsl,sdma-event-remap"

l_.str.1:                               ; @.str.1
	.asciz	"no event needs to be remapped\n"

	.comm	_EVENT_REMAP_CELLS,4,2          ; @EVENT_REMAP_CELLS
l_.str.2:                               ; @.str.2
	.asciz	"the property %s must modulo %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.3:                               ; @.str.3
	.asciz	"failed to get gpr regmap\n"

l_.str.4:                               ; @.str.4
	.asciz	"failed to read property %s index %d\n"

	.no_dead_strip	_sdma_event_remap
.subsections_via_symbols
