	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_twl4030_i2c_read               ## -- Begin function twl4030_i2c_read
	.p2align	4, 0x90
_twl4030_i2c_read:                      ## @twl4030_i2c_read
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	movq	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	_TWL4030_MODULE_LAST@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpq	%rbx, (%rax)
	setb	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_DRIVER_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %edx
	jmp	LBB0_2
LBB0_3:
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movq	_twl4030_map@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	shlq	$4, %rbx
	movslq	(%rax,%rbx), %r13
	movq	_twl4030_modules@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movq	_inuse@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpl	$0, (%rax)
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_DRIVER_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdi
	movl	%r13d, %edx
LBB0_2:
	callq	_pr_err
	movq	_EPERM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	shlq	$5, %r13
	leaq	(%r14,%r13), %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	movq	8(%r14,%r13), %rsi
	movl	24(%r14,%r13), %eax
	movl	%eax, 24(%rsi)
	movl	$1, (%rsi)
	movq	$0, 16(%rsi)
	movq	_twl4030_map@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	addq	8(%rcx,%rbx), %r12
	movq	%r12, -64(%rbp)
	leaq	-64(%rbp), %rcx
	movq	%rcx, 8(%rsi)
	movl	%eax, 56(%rsi)
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 48(%rsi)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 32(%rsi)
	movq	%r15, 40(%rsi)
	movq	16(%r14,%r13), %rax
	movl	(%rax), %edi
	movl	$2, %edx
	callq	_i2c_transfer
	movl	%eax, %ebx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	movl	%ebx, %eax
	sarl	$31, %eax
	andl	%ebx, %eax
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_TWL4030_MODULE_LAST,8,3        ## @TWL4030_MODULE_LAST
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: invalid module number %d\n"

	.comm	_DRIVER_NAME,4,2                ## @DRIVER_NAME
	.comm	_EPERM,4,2                      ## @EPERM
	.comm	_twl4030_map,8,3                ## @twl4030_map
	.comm	_twl4030_modules,8,3            ## @twl4030_modules
	.comm	_inuse,4,2                      ## @inuse
L_.str.1:                               ## @.str.1
	.asciz	"%s: client %d is not initialized\n"

	.comm	_I2C_M_RD,8,3                   ## @I2C_M_RD
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_twl4030_i2c_read               ; -- Begin function twl4030_i2c_read
	.p2align	2
_twl4030_i2c_read:                      ; @twl4030_i2c_read
	.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	x20, x3
	mov	x22, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _TWL4030_MODULE_LAST@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TWL4030_MODULE_LAST@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x0
	cset	w0, lo
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _DRIVER_NAME@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DRIVER_NAME@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x19
	b	LBB0_4
LBB0_2:
Lloh8:
	adrp	x24, _twl4030_map@GOTPAGE
Lloh9:
	ldr	x24, [x24, _twl4030_map@GOTPAGEOFF]
	ldr	x8, [x24]
	lsl	x9, x19, #4
	ldrsw	x23, [x8, x9]
Lloh10:
	adrp	x8, _twl4030_modules@GOTPAGE
Lloh11:
	ldr	x8, [x8, _twl4030_modules@GOTPAGEOFF]
Lloh12:
	ldr	x25, [x8]
Lloh13:
	adrp	x8, _inuse@GOTPAGE
Lloh14:
	ldr	x8, [x8, _inuse@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	cmp	w8, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_6
; %bb.3:
Lloh16:
	adrp	x8, _DRIVER_NAME@GOTPAGE
Lloh17:
	ldr	x8, [x8, _DRIVER_NAME@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
Lloh19:
	adrp	x0, l_.str.1@PAGE
Lloh20:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x2, x23
LBB0_4:
	bl	_pr_err
Lloh21:
	adrp	x8, _EPERM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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_6:
	add	x23, x25, x23, lsl #5
	mov	x0, x23
	bl	_mutex_lock
	mov	w8, #1
	ldp	x1, x9, [x23, #8]
	str	w8, [x1]
	ldr	w8, [x23, #24]
	str	w8, [x1, #24]
	ldr	x10, [x24]
	add	x10, x10, x19, lsl #4
	ldr	x10, [x10, #8]
	add	x10, x10, x22
	str	x10, [sp, #8]
	add	x10, sp, #8
	stp	x10, xzr, [x1, #8]
Lloh24:
	adrp	x10, _I2C_M_RD@GOTPAGE
Lloh25:
	ldr	x10, [x10, _I2C_M_RD@GOTPAGEOFF]
	str	w8, [x1, #56]
Lloh26:
	ldr	x8, [x10]
	str	w20, [x1, #32]
	stp	x21, x8, [x1, #40]
	ldr	w0, [x9]
	mov	w2, #2
	bl	_i2c_transfer
	mov	x19, x0
	mov	x0, x23
	bl	_mutex_unlock
	cmp	w19, #0
	csel	w0, w19, wzr, lt
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_TWL4030_MODULE_LAST,8,3        ; @TWL4030_MODULE_LAST
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: invalid module number %d\n"

	.comm	_DRIVER_NAME,4,2                ; @DRIVER_NAME
	.comm	_EPERM,4,2                      ; @EPERM
	.comm	_twl4030_map,8,3                ; @twl4030_map
	.comm	_twl4030_modules,8,3            ; @twl4030_modules
	.comm	_inuse,4,2                      ; @inuse
l_.str.1:                               ; @.str.1
	.asciz	"%s: client %d is not initialized\n"

	.comm	_I2C_M_RD,8,3                   ; @I2C_M_RD
.subsections_via_symbols
