	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drxbsp_i2c_write_read          ## -- Begin function drxbsp_i2c_write_read
	.p2align	4, 0x90
_drxbsp_i2c_write_read:                 ## @drxbsp_i2c_write_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	%rbx
	subq	$72, %rsp
	.cfi_offset %rbx, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -16(%rbp)
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movl	(%rdi), %ebx
	sarl	%ebx
	movq	8(%rdi), %rax
	movl	%ebx, -80(%rbp)
	movq	$0, -56(%rbp)
	movq	%rdx, -64(%rbp)
	movq	%rsi, -72(%rbp)
	testq	%rcx, %rcx
	je	LBB0_3
## %bb.4:
	movl	(%rcx), %ecx
	sarl	%ecx
	movl	%ecx, -48(%rbp)
	movl	$2, %ebx
	movl	$1, %ecx
	jmp	LBB0_5
LBB0_1:
	movq	8(%rcx), %rax
	movl	(%rcx), %ecx
	sarl	%ecx
	movl	%ecx, -80(%rbp)
	movl	$1, %ebx
	xorl	%ecx, %ecx
LBB0_5:
	movq	_I2C_M_RD@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	shlq	$5, %rcx
	movq	%rdx, -56(%rbp,%rcx)
	movq	%r9, -64(%rbp,%rcx)
	movq	%r8, -72(%rbp,%rcx)
	jmp	LBB0_6
LBB0_3:
	movl	$1, %ebx
LBB0_6:
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.8:
	leaq	-80(%rbp), %rsi
	movl	%ebx, %edx
	callq	_i2c_transfer
	movl	%eax, %ecx
	xorl	%eax, %eax
	cmpl	%ebx, %ecx
	je	LBB0_10
## %bb.9:
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_warn
	movq	_EREMOTEIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_10
LBB0_7:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	xorl	%eax, %eax
LBB0_10:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-16(%rbp), %rcx
	jne	LBB0_12
## %bb.11:
	addq	$72, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_M_RD,8,3                   ## @I2C_M_RD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"i2c was zero, aborting\n"

L_.str.1:                               ## @.str.1
	.asciz	"drx3933: I2C write/read failed\n"

	.comm	_EREMOTEIO,4,2                  ## @EREMOTEIO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drxbsp_i2c_write_read          ; -- Begin function drxbsp_i2c_write_read
	.p2align	2
_drxbsp_i2c_write_read:                 ; @drxbsp_i2c_write_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
	cbz	x0, LBB0_3
; %bb.1:
	ldr	x8, [x0, #8]
	ldr	w9, [x0]
	asr	w9, w9, #1
	str	w9, [sp, #8]
	stp	x2, xzr, [sp, #24]
	str	x1, [sp, #16]
	cbz	x3, LBB0_7
; %bb.2:
	ldr	w9, [x3]
	asr	w9, w9, #1
	str	w9, [sp, #40]
	mov	w19, #2
	mov	w9, #1
	b	LBB0_4
LBB0_3:
	mov	x9, #0
	ldr	x8, [x3, #8]
	ldr	w10, [x3]
	asr	w10, w10, #1
	str	w10, [sp, #8]
	mov	w19, #1
LBB0_4:
Lloh3:
	adrp	x10, _I2C_M_RD@GOTPAGE
Lloh4:
	ldr	x10, [x10, _I2C_M_RD@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	add	x11, sp, #8
	add	x9, x11, x9, lsl #5
	stp	x5, x10, [x9, #16]
	str	x4, [x9, #8]
	ldr	x0, [x8]
	cbz	x0, LBB0_8
LBB0_5:
	add	x1, sp, #8
	mov	x2, x19
	bl	_i2c_transfer
	cmp	w0, w19
	b.eq	LBB0_9
; %bb.6:
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_warn
Lloh8:
	adrp	x8, _EREMOTEIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EREMOTEIO@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_7:
	mov	w19, #1
	ldr	x0, [x8]
	cbnz	x0, LBB0_5
LBB0_8:
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
LBB0_9:
	mov	w0, #0
LBB0_10:
	ldur	x8, [x29, #-24]
Lloh13:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_M_RD,8,3                   ; @I2C_M_RD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"i2c was zero, aborting\n"

l_.str.1:                               ; @.str.1
	.asciz	"drx3933: I2C write/read failed\n"

	.comm	_EREMOTEIO,4,2                  ; @EREMOTEIO
.subsections_via_symbols
