	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dib8000_i2c_read16
_dib8000_i2c_read16:                    ## @dib8000_i2c_read16
	.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	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movl	(%rdi), %eax
	sarl	%eax
	movl	%eax, -80(%rbp)
	movl	$2, -76(%rbp)
	movl	$0, -64(%rbp)
	movl	%eax, -56(%rbp)
	movl	$2, -52(%rbp)
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	movl	24(%rdi), %edi
	callq	_mutex_lock_interruptible
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	movq	8(%r15), %rax
	movq	%rax, -72(%rbp)
	movl	%r14d, %ecx
	sarl	$8, %ecx
	movl	%ecx, (%rax)
	movzbl	%r14b, %ecx
	movl	%ecx, 4(%rax)
	movq	16(%r15), %rax
	movq	%rax, -48(%rbp)
	movl	28(%r15), %edi
	leaq	-80(%rbp), %rsi
	movl	$2, %edx
	callq	_i2c_transfer
	cmpl	$2, %eax
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	_dprintk
LBB0_4:
	movq	-48(%rbp), %rax
	movl	(%rax), %ebx
	shll	$8, %ebx
	orl	4(%rax), %ebx
	movl	24(%r15), %edi
	callq	_mutex_unlock
	jmp	LBB0_5
LBB0_1:
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dprintk
LBB0_5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_7
## %bb.6:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not acquire lock\n"

L_.str.1:                               ## @.str.1
	.asciz	"i2c read error on %d\n"

	.no_dead_strip	_dib8000_i2c_read16
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dib8000_i2c_read16
_dib8000_i2c_read16:                    ; @dib8000_i2c_read16
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
	ldr	w8, [x0]
	asr	w8, w8, #1
	mov	w9, #2
	stp	w8, w9, [sp, #8]
	str	wzr, [sp, #24]
	str	w8, [sp, #32]
Lloh3:
	adrp	x8, _I2C_M_RD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _I2C_M_RD@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w9, [sp, #36]
	str	w8, [sp, #48]
	ldr	w0, [x0, #24]
	bl	_mutex_lock_interruptible
	tbnz	x0, #63, LBB0_4
; %bb.1:
	ldr	x8, [x19, #8]
	str	x8, [sp, #16]
	asr	w9, w20, #8
	and	w10, w20, #0xff
	stp	w9, w10, [x8]
	ldr	x8, [x19, #16]
	str	x8, [sp, #40]
	ldr	w0, [x19, #28]
	add	x1, sp, #8
	mov	w2, #2
	bl	_i2c_transfer
	cmp	w0, #2
	b.eq	LBB0_3
; %bb.2:
	str	x20, [sp]
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_dprintk
LBB0_3:
	ldr	x8, [sp, #40]
	ldp	w9, w8, [x8]
	orr	w20, w8, w9, lsl #8
	ldr	w0, [x19, #24]
	bl	_mutex_unlock
	b	LBB0_5
LBB0_4:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dprintk
	mov	w20, #0
LBB0_5:
	ldur	x8, [x29, #-24]
Lloh10:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh11:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not acquire lock\n"

l_.str.1:                               ; @.str.1
	.asciz	"i2c read error on %d\n"

	.no_dead_strip	_dib8000_i2c_read16
.subsections_via_symbols
