	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cpm_i2c_shutdown
_cpm_i2c_shutdown:                      ## @cpm_i2c_shutdown
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	16(%rdi), %rdi
	addq	$8, %rdi
	movq	_I2MOD_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_clrbits8
	movq	16(%r15), %rdi
	addq	$4, %rdi
	xorl	%esi, %esi
	callq	_out_8
	movq	16(%r15), %rdi
	movl	$255, %esi
	callq	_out_8
	movl	76(%r15), %edi
	leaq	72(%r15), %rsi
	callq	_free_irq
	movq	_CPM_MAXBD@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_3
## %bb.1:
	xorl	%ebx, %ebx
	movq	_CPM_MAX_READ@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rsi
	incq	%rsi
	movq	64(%r15), %rax
	movl	(%rax,%rbx,4), %edx
	movq	48(%r15), %rdi
	movq	56(%r15), %rax
	movl	(%rax,%rbx,4), %ecx
	callq	_dma_free_coherent
	movq	48(%r15), %rdi
	movq	(%r12), %rsi
	incq	%rsi
	movq	32(%r15), %rax
	movq	40(%r15), %rcx
	movl	(%rcx,%rbx,4), %edx
	movl	(%rax,%rbx,4), %ecx
	callq	_dma_free_coherent
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_2
LBB0_3:
	movl	24(%r15), %edi
	callq	_cpm_muram_free
	movq	16(%r15), %rdi
	callq	_iounmap
	movl	(%r15), %eax
	cmpl	$1, %eax
	jne	LBB0_6
## %bb.4:
	cmpl	$0, 4(%r15)
	jne	LBB0_7
## %bb.5:
	movq	8(%r15), %rdi
	callq	_iounmap
	movl	(%r15), %eax
LBB0_6:
	cmpl	$2, %eax
	jne	LBB0_7
## %bb.8:
	movl	4(%r15), %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_cpm_muram_free                 ## TAILCALL
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I2MOD_EN,4,2                   ## @I2MOD_EN
	.comm	_CPM_MAXBD,4,2                  ## @CPM_MAXBD
	.comm	_CPM_MAX_READ,8,3               ## @CPM_MAX_READ
	.no_dead_strip	_cpm_i2c_shutdown
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cpm_i2c_shutdown
_cpm_i2c_shutdown:                      ; @cpm_i2c_shutdown
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x8, [x0, #16]
	add	x0, x8, #8
Lloh0:
	adrp	x8, _I2MOD_EN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I2MOD_EN@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_clrbits8
	ldr	x8, [x19, #16]
	add	x0, x8, #4
	mov	w1, #0
	bl	_out_8
	ldr	x0, [x19, #16]
	mov	w1, #255
	bl	_out_8
	ldr	w0, [x19, #76]
	add	x1, x19, #72
	bl	_free_irq
Lloh3:
	adrp	x20, _CPM_MAXBD@GOTPAGE
Lloh4:
	ldr	x20, [x20, _CPM_MAXBD@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x21, #0
Lloh5:
	adrp	x22, _CPM_MAX_READ@GOTPAGE
Lloh6:
	ldr	x22, [x22, _CPM_MAX_READ@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22]
	add	x1, x8, #1
	ldr	x8, [x19, #64]
	lsl	x23, x21, #2
	ldr	w2, [x8, x23]
	ldp	x0, x8, [x19, #48]
	ldr	w3, [x8, x23]
	bl	_dma_free_coherent
	ldr	x8, [x22]
	add	x1, x8, #1
	ldp	x8, x0, [x19, #40]
	ldr	x9, [x19, #32]
	ldr	w2, [x8, x23]
	ldr	w3, [x9, x23]
	bl	_dma_free_coherent
	add	x21, x21, #1
	ldrsw	x8, [x20]
	cmp	x21, x8
	b.lt	LBB0_2
LBB0_3:
	ldr	w0, [x19, #24]
	bl	_cpm_muram_free
	ldr	x0, [x19, #16]
	bl	_iounmap
	ldr	w8, [x19]
	cmp	w8, #1
	b.ne	LBB0_6
; %bb.4:
	ldr	w8, [x19, #4]
	cbnz	w8, LBB0_8
; %bb.5:
	ldr	x0, [x19, #8]
	bl	_iounmap
	ldr	w8, [x19]
LBB0_6:
	cmp	w8, #2
	b.ne	LBB0_8
; %bb.7:
	ldr	w0, [x19, #4]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_cpm_muram_free
LBB0_8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_I2MOD_EN,4,2                   ; @I2MOD_EN
	.comm	_CPM_MAXBD,4,2                  ; @CPM_MAXBD
	.comm	_CPM_MAX_READ,8,3               ; @CPM_MAX_READ
	.no_dead_strip	_cpm_i2c_shutdown
.subsections_via_symbols
