	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function synquacer_i2c_doxfer
_synquacer_i2c_doxfer:                  ## @synquacer_i2c_doxfer
	.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
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	%rdi, %rbx
	callq	_synquacer_i2c_hw_init
	movq	_SYNQUACER_I2C_REG_BSR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	48(%rbx), %rdi
	callq	_readb
	movq	_SYNQUACER_I2C_BSR_BB@GOTPCREL(%rip), %rcx
	testb	%al, (%rcx)
	je	LBB0_2
## %bb.1:
	movl	12(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	jmp	LBB0_10
LBB0_2:
	leaq	20(%rbx), %r12
	movq	%r12, %rdi
	callq	_reinit_completion
	movq	%r15, 24(%rbx)
	movl	%r14d, (%rbx)
	movq	$0, 40(%rbx)
	movl	$0, 4(%rbx)
	movq	_STATE_START@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_synquacer_i2c_master_start
	testl	%eax, %eax
	js	LBB0_6
## %bb.3:
	movl	16(%rbx), %edi
	callq	_msecs_to_jiffies
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_wait_for_completion_timeout
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:
	movl	4(%rbx), %edx
	cmpl	%r14d, %edx
	jne	LBB0_8
## %bb.5:
	movl	8(%rbx), %esi
	movl	$2000, %edi                     ## imm = 0x7D0
	callq	_DIV_ROUND_UP
	movl	%eax, %edi
	callq	_udelay
	jmp	LBB0_11
LBB0_6:
	movl	%eax, %r15d
	movl	12(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	%r15d, %r14d
	jmp	LBB0_11
LBB0_7:
	movl	12(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_dev_dbg
	jmp	LBB0_9
LBB0_8:
	movl	12(%rbx), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_dev_dbg
LBB0_9:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
LBB0_10:
	subl	(%rax), %r14d
LBB0_11:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SYNQUACER_I2C_REG_BSR,8,3      ## @SYNQUACER_I2C_REG_BSR
	.comm	_SYNQUACER_I2C_BSR_BB,1,0       ## @SYNQUACER_I2C_BSR_BB
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot get bus (bus busy)\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_STATE_START,4,2                ## @STATE_START
L_.str.1:                               ## @.str.1
	.asciz	"Address failed: (%d)\n"

L_.str.2:                               ## @.str.2
	.asciz	"timeout\n"

	.comm	_EAGAIN,4,2                     ## @EAGAIN
L_.str.3:                               ## @.str.3
	.asciz	"incomplete xfer (%d)\n"

	.no_dead_strip	_synquacer_i2c_doxfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function synquacer_i2c_doxfer
_synquacer_i2c_doxfer:                  ; @synquacer_i2c_doxfer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	bl	_synquacer_i2c_hw_init
	ldr	x8, [x20, #48]
Lloh0:
	adrp	x9, _SYNQUACER_I2C_REG_BSR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SYNQUACER_I2C_REG_BSR@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readb
Lloh3:
	adrp	x8, _SYNQUACER_I2C_BSR_BB@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SYNQUACER_I2C_BSR_BB@GOTPAGEOFF]
	ldrb	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.1:
	ldr	w0, [x20, #12]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh7:
	adrp	x8, _EBUSY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_10
LBB0_2:
	add	x22, x20, #20
	mov	x0, x22
	bl	_reinit_completion
	str	x21, [x20, #24]
	str	xzr, [x20, #40]
	stp	w19, wzr, [x20]
Lloh9:
	adrp	x8, _STATE_START@GOTPAGE
Lloh10:
	ldr	x8, [x8, _STATE_START@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [x20, #32]
	mov	x0, x20
	mov	x1, x21
	bl	_synquacer_i2c_master_start
	tbnz	w0, #31, LBB0_6
; %bb.3:
	ldr	w0, [x20, #16]
	bl	_msecs_to_jiffies
	mov	x1, x0
	mov	x0, x22
	bl	_wait_for_completion_timeout
	cbz	x0, LBB0_7
; %bb.4:
	ldr	w8, [x20, #4]
	cmp	w8, w19
	b.ne	LBB0_8
; %bb.5:
	ldr	w1, [x20, #8]
	mov	w0, #2000
	bl	_DIV_ROUND_UP
	bl	_udelay
	b	LBB0_11
LBB0_6:
	mov	x21, x0
	ldr	w0, [x20, #12]
	str	x21, [sp]
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
	mov	x19, x21
	b	LBB0_11
LBB0_7:
	ldr	w0, [x20, #12]
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_9
LBB0_8:
	ldr	w0, [x20, #12]
	str	x8, [sp]
Lloh16:
	adrp	x1, l_.str.3@PAGE
Lloh17:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_9:
	bl	_dev_dbg
Lloh18:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_11:
	mov	x0, x19
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_SYNQUACER_I2C_REG_BSR,8,3      ; @SYNQUACER_I2C_REG_BSR
	.comm	_SYNQUACER_I2C_BSR_BB,1,0       ; @SYNQUACER_I2C_BSR_BB
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot get bus (bus busy)\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_STATE_START,4,2                ; @STATE_START
l_.str.1:                               ; @.str.1
	.asciz	"Address failed: (%d)\n"

l_.str.2:                               ; @.str.2
	.asciz	"timeout\n"

	.comm	_EAGAIN,4,2                     ; @EAGAIN
l_.str.3:                               ; @.str.3
	.asciz	"incomplete xfer (%d)\n"

	.no_dead_strip	_synquacer_i2c_doxfer
.subsections_via_symbols
