	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s6i2c_master_xfer
_s6i2c_master_xfer:                     ## @s6i2c_master_xfer
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testl	%edx, %edx
	je	LBB0_1
## %bb.2:
	movl	%edx, %r15d
	movq	%rsi, %rbx
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %r12
	movq	_S6_I2C_STATUS@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r12, %rdi
	callq	_i2c_rd16
	movq	_S6_I2C_STATUS_ACTIVITY@GOTPCREL(%rip), %r14
	movl	(%r14), %ecx
	btl	%ecx, %eax
	jae	LBB0_4
## %bb.3:
	xorl	%eax, %eax
	callq	_yield
LBB0_4:
	movq	_S6_I2C_INTRMASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_i2c_wr16
	movq	_S6_I2C_CLRINTR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_i2c_rd16
	testl	%r15d, %r15d
	jle	LBB0_5
## %bb.13:
	movq	_I2C_M_TEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%r15d, %ecx
	shlq	$3, %rcx
	leaq	(%rcx,%rcx,2), %rcx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	testl	%eax, (%rbx,%rsi)
	jne	LBB0_16
## %bb.18:                              ##   in Loop: Header=BB0_15 Depth=1
	cmpq	$0, 8(%rbx,%rsi)
	je	LBB0_19
## %bb.20:                              ##   in Loop: Header=BB0_15 Depth=1
	movq	16(%rbx,%rsi), %rdx
	cmpq	16(%rbx), %rdx
	jne	LBB0_21
## %bb.14:                              ##   in Loop: Header=BB0_15 Depth=1
	addq	$24, %rsi
	cmpq	%rsi, %rcx
	jne	LBB0_15
	jmp	LBB0_6
LBB0_1:
	xorl	%eax, %eax
	jmp	LBB0_12
LBB0_5:
	movq	16(%rbx), %rdx
LBB0_6:
	movq	%rbx, 56(%r12)
	movl	%r15d, (%r12)
	movabsq	$42949672960, %rax              ## imm = 0xA00000000
	movq	%rax, 4(%r12)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 32(%r12)
	movq	$0, 48(%r12)
	movq	_S6_I2C_TAR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_i2c_wr16
	movq	_S6_I2C_ENABLE@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movl	$1, %ebx
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_i2c_wr16
	movq	_S6_I2C_INTRMASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_S6_I2C_INTR_TXEMPTY@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	movq	_S6_I2C_INTR_TXABRT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %ebx
	btsl	%eax, %ebx
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_i2c_wr16
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	_POLL_TIMEOUT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	addq	(%rax), %rcx
	leaq	16(%r12), %rbx
	movq	%rcx, 16(%r12)
	movq	%rbx, %rdi
	callq	_add_timer
	leaq	24(%r12), %rdi
	callq	_wait_for_completion
	movq	%rbx, %rdi
	callq	_del_timer_sync
	movq	_S6_I2C_TXFLR@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_i2c_rd32
	testq	%rax, %rax
	jle	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	xorl	%eax, %eax
	callq	_schedule
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_10 Depth=1
	xorl	%eax, %eax
	callq	_schedule
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %esi
	movq	%r12, %rdi
	callq	_i2c_rd16
	movl	(%r14), %ecx
	btl	%ecx, %eax
	jb	LBB0_9
## %bb.11:
	movq	_S6_I2C_INTRMASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_i2c_wr16
	movl	(%r15), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_i2c_wr16
	movl	4(%r12), %eax
	jmp	LBB0_12
LBB0_16:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_17
LBB0_19:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_17
LBB0_21:
	leaq	L_.str.2(%rip), %rsi
LBB0_17:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_S6_I2C_STATUS,4,2              ## @S6_I2C_STATUS
	.comm	_S6_I2C_STATUS_ACTIVITY,4,2     ## @S6_I2C_STATUS_ACTIVITY
	.comm	_S6_I2C_INTRMASK,4,2            ## @S6_I2C_INTRMASK
	.comm	_S6_I2C_CLRINTR,4,2             ## @S6_I2C_CLRINTR
	.comm	_I2C_M_TEN,4,2                  ## @I2C_M_TEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"s6i2c: 10 bits addr not supported\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"s6i2c: zero length message not supported\n"

L_.str.2:                               ## @.str.2
	.asciz	"s6i2c: multiple xfer cannot change target\n"

	.comm	_S6_I2C_TAR,4,2                 ## @S6_I2C_TAR
	.comm	_S6_I2C_ENABLE,4,2              ## @S6_I2C_ENABLE
	.comm	_S6_I2C_INTR_TXEMPTY,4,2        ## @S6_I2C_INTR_TXEMPTY
	.comm	_S6_I2C_INTR_TXABRT,4,2         ## @S6_I2C_INTR_TXABRT
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_POLL_TIMEOUT,8,3               ## @POLL_TIMEOUT
	.comm	_S6_I2C_TXFLR,4,2               ## @S6_I2C_TXFLR
	.no_dead_strip	_s6i2c_master_xfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function s6i2c_master_xfer
lCPI0_0:
	.long	0                               ; 0x0
	.long	10                              ; 0xa
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_s6i2c_master_xfer:                     ; @s6i2c_master_xfer
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	cbz	w2, LBB0_9
; %bb.1:
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	ldr	x19, [x0, #8]
Lloh0:
	adrp	x23, _S6_I2C_STATUS@GOTPAGE
Lloh1:
	ldr	x23, [x23, _S6_I2C_STATUS@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x19
	bl	_i2c_rd16
Lloh2:
	adrp	x24, _S6_I2C_STATUS_ACTIVITY@GOTPAGE
Lloh3:
	ldr	x24, [x24, _S6_I2C_STATUS_ACTIVITY@GOTPAGEOFF]
	ldr	w8, [x24]
	lsr	w8, w0, w8
	tbz	w8, #0, LBB0_3
; %bb.2:
	bl	_yield
LBB0_3:
Lloh4:
	adrp	x25, _S6_I2C_INTRMASK@GOTPAGE
Lloh5:
	ldr	x25, [x25, _S6_I2C_INTRMASK@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	x0, x19
	mov	w2, #0
	bl	_i2c_wr16
Lloh6:
	adrp	x8, _S6_I2C_CLRINTR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _S6_I2C_CLRINTR@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_i2c_rd16
	cmp	w20, #0
	b.le	LBB0_10
; %bb.4:
Lloh9:
	adrp	x8, _I2C_M_TEN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _I2C_M_TEN@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	mov	w9, w20
	add	x10, x21, #8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w11, [x10, #-8]
	tst	w8, w11
	b.ne	LBB0_16
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x11, [x10]
	cbz	x11, LBB0_17
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x2, [x10, #8]
	ldr	x11, [x21, #16]
	cmp	x2, x11
	b.ne	LBB0_18
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x10, x10, #24
	subs	x9, x9, #1
	b.ne	LBB0_5
	b	LBB0_11
LBB0_9:
	mov	w0, #0
	b	LBB0_20
LBB0_10:
	ldr	x2, [x21, #16]
LBB0_11:
	str	w20, [x19]
	stp	xzr, x21, [x19, #48]
	stp	xzr, xzr, [x19, #32]
Lloh12:
	adrp	x8, lCPI0_0@PAGE
Lloh13:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	stur	d0, [x19, #4]
Lloh14:
	adrp	x8, _S6_I2C_TAR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _S6_I2C_TAR@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_i2c_wr16
Lloh17:
	adrp	x21, _S6_I2C_ENABLE@GOTPAGE
Lloh18:
	ldr	x21, [x21, _S6_I2C_ENABLE@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	w20, #1
	mov	x0, x19
	mov	w2, #1
	bl	_i2c_wr16
	ldr	w1, [x25]
Lloh19:
	adrp	x8, _S6_I2C_INTR_TXEMPTY@GOTPAGE
Lloh20:
	ldr	x8, [x8, _S6_I2C_INTR_TXEMPTY@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	lsl	w8, w20, w8
Lloh22:
	adrp	x9, _S6_I2C_INTR_TXABRT@GOTPAGE
Lloh23:
	ldr	x9, [x9, _S6_I2C_INTR_TXABRT@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	lsl	w9, w20, w9
	orr	w2, w9, w8
	mov	x0, x19
	bl	_i2c_wr16
Lloh25:
	adrp	x8, _jiffies@GOTPAGE
Lloh26:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh27:
	adrp	x9, _POLL_TIMEOUT@GOTPAGE
Lloh28:
	ldr	x9, [x9, _POLL_TIMEOUT@GOTPAGEOFF]
Lloh29:
	ldr	x8, [x8]
Lloh30:
	ldr	x9, [x9]
	add	x8, x9, x8
	mov	x20, x19
	str	x8, [x20, #16]!
	mov	x0, x20
	bl	_add_timer
	add	x0, x19, #24
	bl	_wait_for_completion
	mov	x0, x20
	bl	_del_timer_sync
Lloh31:
	adrp	x20, _S6_I2C_TXFLR@GOTPAGE
Lloh32:
	ldr	x20, [x20, _S6_I2C_TXFLR@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_i2c_rd32
	cmp	x0, #1
	b.lt	LBB0_14
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	bl	_schedule
	ldr	w1, [x20]
	mov	x0, x19
	bl	_i2c_rd32
	cmp	x0, #0
	b.gt	LBB0_12
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_14 Depth=1
	bl	_schedule
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x23]
	mov	x0, x19
	bl	_i2c_rd16
	ldr	w8, [x24]
	lsr	w8, w0, w8
	tbnz	w8, #0, LBB0_13
; %bb.15:
	ldr	w1, [x25]
	mov	x0, x19
	mov	w2, #0
	bl	_i2c_wr16
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #0
	bl	_i2c_wr16
	ldr	w0, [x19, #4]
	b	LBB0_20
LBB0_16:
Lloh33:
	adrp	x1, l_.str@PAGE
Lloh34:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_19
LBB0_17:
Lloh35:
	adrp	x1, l_.str.1@PAGE
Lloh36:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_19
LBB0_18:
Lloh37:
	adrp	x1, l_.str.2@PAGE
Lloh38:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_19:
	mov	x0, x22
	bl	_dev_err
Lloh39:
	adrp	x8, _EINVAL@GOTPAGE
Lloh40:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_20:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh29
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdrp	Lloh12, Lloh14
	.loh AdrpLdr	Lloh12, Lloh13
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_S6_I2C_STATUS,4,2              ; @S6_I2C_STATUS
	.comm	_S6_I2C_STATUS_ACTIVITY,4,2     ; @S6_I2C_STATUS_ACTIVITY
	.comm	_S6_I2C_INTRMASK,4,2            ; @S6_I2C_INTRMASK
	.comm	_S6_I2C_CLRINTR,4,2             ; @S6_I2C_CLRINTR
	.comm	_I2C_M_TEN,4,2                  ; @I2C_M_TEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"s6i2c: 10 bits addr not supported\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"s6i2c: zero length message not supported\n"

l_.str.2:                               ; @.str.2
	.asciz	"s6i2c: multiple xfer cannot change target\n"

	.comm	_S6_I2C_TAR,4,2                 ; @S6_I2C_TAR
	.comm	_S6_I2C_ENABLE,4,2              ; @S6_I2C_ENABLE
	.comm	_S6_I2C_INTR_TXEMPTY,4,2        ; @S6_I2C_INTR_TXEMPTY
	.comm	_S6_I2C_INTR_TXABRT,4,2         ; @S6_I2C_INTR_TXABRT
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_POLL_TIMEOUT,8,3               ; @POLL_TIMEOUT
	.comm	_S6_I2C_TXFLR,4,2               ; @S6_I2C_TXFLR
	.no_dead_strip	_s6i2c_master_xfer
.subsections_via_symbols
