	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sh_mobile_i2c_cleanup_dma
_sh_mobile_i2c_cleanup_dma:             ## @sh_mobile_i2c_cleanup_dma
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	(%rdi), %rax
	movq	_DMA_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.7:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_1:
	movq	%rdi, %rbx
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	leaq	12(%rbx), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.4:
	leaq	8(%rbx), %rax
LBB0_5:
	movl	(%rax), %edi
	callq	_dmaengine_terminate_all
LBB0_6:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_sh_mobile_i2c_dma_unmap        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_NONE,8,3                   ## @DMA_NONE
	.comm	_DMA_FROM_DEVICE,8,3            ## @DMA_FROM_DEVICE
	.comm	_DMA_TO_DEVICE,8,3              ## @DMA_TO_DEVICE
	.no_dead_strip	_sh_mobile_i2c_cleanup_dma
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sh_mobile_i2c_cleanup_dma
_sh_mobile_i2c_cleanup_dma:             ; @sh_mobile_i2c_cleanup_dma
	.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
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _DMA_NONE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DMA_NONE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	x19, x0
Lloh3:
	adrp	x9, _DMA_FROM_DEVICE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	add	x8, x19, #12
	b	LBB0_6
LBB0_4:
Lloh6:
	adrp	x9, _DMA_TO_DEVICE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.5:
	add	x8, x19, #8
LBB0_6:
	ldr	w0, [x8]
	bl	_dmaengine_terminate_all
LBB0_7:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_sh_mobile_i2c_dma_unmap
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_NONE,8,3                   ; @DMA_NONE
	.comm	_DMA_FROM_DEVICE,8,3            ; @DMA_FROM_DEVICE
	.comm	_DMA_TO_DEVICE,8,3              ; @DMA_TO_DEVICE
	.no_dead_strip	_sh_mobile_i2c_cleanup_dma
.subsections_via_symbols
