	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function slimpro_i2c_blkwr
_slimpro_i2c_blkwr:                     ## @slimpro_i2c_blkwr
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r14d
	movl	%r8d, -64(%rbp)                 ## 4-byte Spill
	movl	%ecx, %r13d
	movl	%edx, -68(%rbp)                 ## 4-byte Spill
	movl	%esi, %r12d
	movq	%rdi, %rbx
	movq	16(%rbp), %rsi
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	16(%rdi), %edi
	movl	%r9d, %edx
	callq	_memcpy
	movl	(%rbx), %edi
	movl	16(%rbx), %esi
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r14d, %edx
	callq	_dma_map_single
	movq	%rax, %r15
	movl	(%rbx), %edi
	movq	%rax, %rsi
	callq	_dma_mapping_error
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	16(%rbx), %edx
	addq	$20, %rbx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_5
LBB0_2:
	movq	_SLIMPRO_IIC_BUS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SLIMPRO_IIC_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r12d, %esi
	movl	-64(%rbp), %ecx                 ## 4-byte Reload
	movl	%r13d, %r8d
	movl	%r14d, %r9d
	callq	_SLIMPRO_IIC_ENCODE_MSG
	movl	%eax, -60(%rbp)
	movq	_SLIMPRO_IIC_ENCODE_FLAG_BUFADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	%r15, %rdi
	callq	_SLIMPRO_IIC_ENCODE_UPPER_BUFADDR
	movl	%eax, %r12d
	movl	-68(%rbp), %edi                 ## 4-byte Reload
	callq	_SLIMPRO_IIC_ENCODE_ADDR
	orl	%r13d, %eax
	orl	%r12d, %eax
	movl	%eax, -56(%rbp)
	movl	%r15d, -52(%rbp)
	cmpq	$0, 8(%rbx)
	je	LBB0_4
## %bb.3:
	leaq	4(%rbx), %rdi
	callq	_reinit_completion
LBB0_4:
	leaq	-60(%rbp), %rdx
	movq	%rbx, %rdi
	movq	%rdx, %rsi
	callq	_slimpro_i2c_send_msg
	movl	%eax, %r12d
	movl	(%rbx), %edi
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rsi
	movl	%r14d, %edx
	callq	_dma_unmap_single
LBB0_5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_7
## %bb.6:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error in mapping dma buffer %p\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_SLIMPRO_IIC_BUS,4,2            ## @SLIMPRO_IIC_BUS
	.comm	_SLIMPRO_IIC_WRITE,4,2          ## @SLIMPRO_IIC_WRITE
	.comm	_SLIMPRO_IIC_ENCODE_FLAG_BUFADDR,4,2 ## @SLIMPRO_IIC_ENCODE_FLAG_BUFADDR
	.no_dead_strip	_slimpro_i2c_blkwr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function slimpro_i2c_blkwr
_slimpro_i2c_blkwr:                     ; @slimpro_i2c_blkwr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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, x5
	mov	x24, x4
	mov	x23, x3
	mov	x22, x2
	mov	x25, x1
	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, #24]
	ldr	w0, [x0, #16]
	mov	x1, x6
	mov	x2, x5
	bl	_memcpy
	ldr	w0, [x20]
	ldr	w1, [x20, #16]
Lloh3:
	adrp	x26, _DMA_TO_DEVICE@GOTPAGE
Lloh4:
	ldr	x26, [x26, _DMA_TO_DEVICE@GOTPAGEOFF]
	ldr	w3, [x26]
	mov	x2, x19
	bl	_dma_map_single
	mov	x21, x0
	ldr	w0, [x20]
	mov	x1, x21
	bl	_dma_mapping_error
	cbz	x0, LBB0_2
; %bb.1:
	add	x0, x20, #20
	ldr	w2, [x20, #16]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_5
LBB0_2:
Lloh10:
	adrp	x8, _SLIMPRO_IIC_BUS@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SLIMPRO_IIC_BUS@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
Lloh13:
	adrp	x8, _SLIMPRO_IIC_WRITE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SLIMPRO_IIC_WRITE@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
	mov	x1, x25
	mov	x3, x24
	mov	x4, x23
	mov	x5, x19
	bl	_SLIMPRO_IIC_ENCODE_MSG
	str	w0, [sp, #12]
Lloh16:
	adrp	x8, _SLIMPRO_IIC_ENCODE_FLAG_BUFADDR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SLIMPRO_IIC_ENCODE_FLAG_BUFADDR@GOTPAGEOFF]
Lloh18:
	ldr	w23, [x8]
	mov	x0, x21
	bl	_SLIMPRO_IIC_ENCODE_UPPER_BUFADDR
	orr	w23, w0, w23
	mov	x0, x22
	bl	_SLIMPRO_IIC_ENCODE_ADDR
	orr	w8, w23, w0
	stp	w8, w21, [sp, #16]
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_4
; %bb.3:
	add	x0, x20, #4
	bl	_reinit_completion
LBB0_4:
	add	x1, sp, #12
	add	x2, sp, #12
	mov	x0, x20
	bl	_slimpro_i2c_send_msg
	mov	x22, x0
	ldr	w0, [x20]
	ldr	w3, [x26]
	mov	x1, x21
	mov	x2, x19
	bl	_dma_unmap_single
LBB0_5:
	ldr	x8, [sp, #24]
Lloh19:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh20:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	mov	x0, x22
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error in mapping dma buffer %p\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_SLIMPRO_IIC_BUS,4,2            ; @SLIMPRO_IIC_BUS
	.comm	_SLIMPRO_IIC_WRITE,4,2          ; @SLIMPRO_IIC_WRITE
	.comm	_SLIMPRO_IIC_ENCODE_FLAG_BUFADDR,4,2 ; @SLIMPRO_IIC_ENCODE_FLAG_BUFADDR
	.no_dead_strip	_slimpro_i2c_blkwr
.subsections_via_symbols
