	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rsb_transfer
_rsb_transfer:                          ## @rsb_transfer
	.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
	movl	%edx, %ebx
	movq	%rsi, %r14
	movl	%edi, %r15d
	callq	_device_get_softc
	cmpl	$2, %ebx
	jne	LBB0_5
## %bb.1:
	movq	%rax, %r13
	movl	(%r14), %eax
	movq	_IIC_M_RD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%eax
	testl	%eax, %ecx
	je	LBB0_5
## %bb.2:
	movl	20(%r14), %eax
	xorl	4(%r14), %eax
	cmpl	$1, %eax
	ja	LBB0_5
## %bb.3:
	cmpl	$1, 8(%r14)
	jne	LBB0_5
## %bb.4:
	movl	24(%r14), %eax
	movq	_RSB_MAXLEN@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %eax
	jle	LBB0_6
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_30:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	(%r13), %rdx
	movq	_A23_RSB@GOTPCREL(%rip), %rsi
                                        ## implicit-def: $edi
                                        ## kill: killed $edi
	cmpq	(%rsi), %rdx
	jne	LBB0_13
## %bb.7:
	testl	%ecx, 16(%r14)
	je	LBB0_33
## %bb.8:
	cmpl	$4, %eax
	je	LBB0_32
## %bb.9:
	cmpl	$2, %eax
	je	LBB0_31
## %bb.10:
	cmpl	$1, %eax
	jne	LBB0_5
## %bb.11:
	movq	_CMD_RD8@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_33:
	cmpl	$4, %eax
	je	LBB0_38
## %bb.34:
	cmpl	$2, %eax
	je	LBB0_37
## %bb.35:
	cmpl	$1, %eax
	jne	LBB0_5
## %bb.36:
	movq	_CMD_WR8@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_32:
	movq	_CMD_RD32@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_31:
	movq	_CMD_RD16@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_38:
	movq	_CMD_WR32@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_37:
	movq	_CMD_WR16@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
LBB0_13:
	movq	%r13, %rdi
	callq	_RSB_LOCK
	cmpl	$0, 8(%r13)
	je	LBB0_16
## %bb.14:
	movq	%r13, %rbx
	addq	$32, %rbx
	leaq	L_.str(%rip), %r12
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	movq	%r12, %rcx
	xorl	%r8d, %r8d
	callq	_mtx_sleep
	cmpl	$0, 8(%r13)
	jne	LBB0_15
LBB0_16:
	movl	$1, 8(%r13)
	movq	$0, 24(%r13)
	movq	(%r13), %rax
	movq	_A23_RSB@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_20
## %bb.17:
	movl	4(%r14), %r12d
	sarl	%r12d
	cmpl	%r12d, 12(%r13)
	je	LBB0_20
## %bb.18:
	movl	%r15d, %edi
	movl	%r12d, %esi
	callq	_rsb_set_rta
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_29
## %bb.19:
	movl	%r12d, 12(%r13)
	movq	$0, 24(%r13)
LBB0_20:
	movq	_RSB_INTS@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_RSB_READ
	movq	%r13, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_RSB_WRITE
	movl	8(%r14), %esi
	movl	12(%r14), %edi
	xorl	%edx, %edx
	callq	_rsb_encode
	movq	_RSB_DADDR0@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%r13, %rdi
	movl	%eax, %edx
	callq	_RSB_WRITE
	movq	_IIC_M_RD@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	testl	%eax, 16(%r14)
	jne	LBB0_22
## %bb.21:
	movl	24(%r14), %esi
	movl	28(%r14), %edi
	xorl	%edx, %edx
	callq	_rsb_encode
	movq	_RSB_DATA0@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%r13, %rdi
	movl	%eax, %edx
	callq	_RSB_WRITE
LBB0_22:
	movq	(%r13), %rax
	movq	_A23_RSB@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	jne	LBB0_24
## %bb.23:
	movq	_RSB_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_RSB_WRITE
LBB0_24:
	movl	8(%r14), %eax
	movl	16(%r14), %ecx
	decl	%eax
	notl	%ecx
	xorl	%edx, %edx
	andl	(%rbx), %ecx
	jne	LBB0_26
## %bb.25:
	movq	_DLEN_READ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
LBB0_26:
	orl	%eax, %edx
	movq	_RSB_DLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_RSB_WRITE
	movl	%r15d, %edi
	callq	_rsb_start
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_29
## %bb.27:
	movl	16(%r14), %eax
	notl	%eax
	xorl	%ebx, %ebx
	movq	_IIC_M_RD@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_29
## %bb.28:
	movq	_RSB_DATA0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_RSB_READ
	movl	24(%r14), %edx
	movl	28(%r14), %esi
	xorl	%ebx, %ebx
	movl	%eax, %edi
	xorl	%ecx, %ecx
	callq	_rsb_decode
LBB0_29:
	movq	$0, 16(%r13)
	movl	$0, 8(%r13)
	movq	%r13, %rdi
	callq	_wakeup
	movq	%r13, %rdi
	callq	_RSB_UNLOCK
	jmp	LBB0_30
	.cfi_endproc
                                        ## -- End function
	.comm	_IIC_M_RD,4,2                   ## @IIC_M_RD
	.comm	_RSB_MAXLEN,4,2                 ## @RSB_MAXLEN
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_A23_RSB,8,3                    ## @A23_RSB
	.comm	_CMD_RD8,4,2                    ## @CMD_RD8
	.comm	_CMD_RD16,4,2                   ## @CMD_RD16
	.comm	_CMD_RD32,4,2                   ## @CMD_RD32
	.comm	_CMD_WR8,4,2                    ## @CMD_WR8
	.comm	_CMD_WR16,4,2                   ## @CMD_WR16
	.comm	_CMD_WR32,4,2                   ## @CMD_WR32
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"i2cbuswait"

	.comm	_RSB_INTS,4,2                   ## @RSB_INTS
	.comm	_RSB_DADDR0,4,2                 ## @RSB_DADDR0
	.comm	_RSB_DATA0,4,2                  ## @RSB_DATA0
	.comm	_RSB_CMD,4,2                    ## @RSB_CMD
	.comm	_DLEN_READ,4,2                  ## @DLEN_READ
	.comm	_RSB_DLEN,4,2                   ## @RSB_DLEN
	.no_dead_strip	_rsb_transfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rsb_transfer
_rsb_transfer:                          ; @rsb_transfer
	.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
	mov	x22, x2
	mov	x20, x1
	mov	x21, x0
	bl	_device_get_softc
	cmp	w22, #2
	b.ne	LBB0_5
; %bb.1:
	ldr	w8, [x20]
Lloh0:
	adrp	x25, _IIC_M_RD@GOTPAGE
Lloh1:
	ldr	x25, [x25, _IIC_M_RD@GOTPAGEOFF]
	ldr	w9, [x25]
	bics	wzr, w9, w8
	b.eq	LBB0_5
; %bb.2:
	ldr	w8, [x20, #4]
	ldr	w10, [x20, #20]
	eor	w8, w10, w8
	cmp	w8, #1
	b.hi	LBB0_5
; %bb.3:
	ldr	w8, [x20, #8]
	cmp	w8, #1
	b.ne	LBB0_5
; %bb.4:
	ldr	w8, [x20, #24]
Lloh2:
	adrp	x10, _RSB_MAXLEN@GOTPAGE
Lloh3:
	ldr	x10, [x10, _RSB_MAXLEN@GOTPAGEOFF]
Lloh4:
	ldr	w10, [x10]
	cmp	w8, w10
	b.le	LBB0_7
LBB0_5:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w23, [x8]
LBB0_6:
	mov	x0, x23
	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
LBB0_7:
	mov	x19, x0
	ldr	x10, [x0]
Lloh8:
	adrp	x26, _A23_RSB@GOTPAGE
Lloh9:
	ldr	x26, [x26, _A23_RSB@GOTPAGEOFF]
	ldr	x11, [x26]
                                        ; implicit-def: $w22
	cmp	x10, x11
	b.ne	LBB0_22
; %bb.8:
	ldr	w10, [x20, #16]
	tst	w10, w9
	b.eq	LBB0_13
; %bb.9:
	cmp	w8, #4
	b.eq	LBB0_17
; %bb.10:
	cmp	w8, #2
	b.eq	LBB0_18
; %bb.11:
	cmp	w8, #1
	b.ne	LBB0_5
; %bb.12:
Lloh10:
	adrp	x8, _CMD_RD8@GOTPAGE
Lloh11:
	ldr	x8, [x8, _CMD_RD8@GOTPAGEOFF]
	b	LBB0_21
LBB0_13:
	cmp	w8, #4
	b.eq	LBB0_19
; %bb.14:
	cmp	w8, #2
	b.eq	LBB0_20
; %bb.15:
	cmp	w8, #1
	b.ne	LBB0_5
; %bb.16:
Lloh12:
	adrp	x8, _CMD_WR8@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CMD_WR8@GOTPAGEOFF]
	b	LBB0_21
LBB0_17:
Lloh14:
	adrp	x8, _CMD_RD32@GOTPAGE
Lloh15:
	ldr	x8, [x8, _CMD_RD32@GOTPAGEOFF]
	b	LBB0_21
LBB0_18:
Lloh16:
	adrp	x8, _CMD_RD16@GOTPAGE
Lloh17:
	ldr	x8, [x8, _CMD_RD16@GOTPAGEOFF]
	b	LBB0_21
LBB0_19:
Lloh18:
	adrp	x8, _CMD_WR32@GOTPAGE
Lloh19:
	ldr	x8, [x8, _CMD_WR32@GOTPAGEOFF]
	b	LBB0_21
LBB0_20:
Lloh20:
	adrp	x8, _CMD_WR16@GOTPAGE
Lloh21:
	ldr	x8, [x8, _CMD_WR16@GOTPAGEOFF]
LBB0_21:
	ldr	w22, [x8]
LBB0_22:
	mov	x0, x19
	bl	_RSB_LOCK
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_25
; %bb.23:
	add	x23, x19, #32
Lloh22:
	adrp	x24, l_.str@PAGE
Lloh23:
	add	x24, x24, l_.str@PAGEOFF
LBB0_24:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x23
	mov	w2, #0
	mov	x3, x24
	mov	w4, #0
	bl	_mtx_sleep
	ldr	w8, [x19, #8]
	cbnz	w8, LBB0_24
LBB0_25:
	mov	w8, #1
	str	w8, [x19, #8]
	str	xzr, [x19, #24]
	ldr	x8, [x19]
	ldr	x9, [x26]
	cmp	x8, x9
	b.ne	LBB0_29
; %bb.26:
	ldr	w8, [x20, #4]
	asr	w24, w8, #1
	ldr	w8, [x19, #12]
	cmp	w8, w24
	b.eq	LBB0_29
; %bb.27:
	mov	x0, x21
	mov	x1, x24
	bl	_rsb_set_rta
	mov	x23, x0
	cbnz	w0, LBB0_37
; %bb.28:
	str	w24, [x19, #12]
	str	xzr, [x19, #24]
LBB0_29:
Lloh24:
	adrp	x8, _RSB_INTS@GOTPAGE
Lloh25:
	ldr	x8, [x8, _RSB_INTS@GOTPAGEOFF]
Lloh26:
	ldr	w23, [x8]
	mov	x0, x19
	mov	x1, x23
	bl	_RSB_READ
	mov	x2, x0
	mov	x0, x19
	mov	x1, x23
	bl	_RSB_WRITE
	ldp	w1, w0, [x20, #8]
	mov	w2, #0
	bl	_rsb_encode
	mov	x2, x0
Lloh27:
	adrp	x8, _RSB_DADDR0@GOTPAGE
Lloh28:
	ldr	x8, [x8, _RSB_DADDR0@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_RSB_WRITE
	ldr	w8, [x20, #16]
	ldr	w9, [x25]
	tst	w9, w8
	b.ne	LBB0_31
; %bb.30:
	ldp	w1, w0, [x20, #24]
	mov	w2, #0
	bl	_rsb_encode
	mov	x2, x0
Lloh30:
	adrp	x8, _RSB_DATA0@GOTPAGE
Lloh31:
	ldr	x8, [x8, _RSB_DATA0@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_RSB_WRITE
LBB0_31:
	ldr	x8, [x19]
	ldr	x9, [x26]
	cmp	x8, x9
	b.ne	LBB0_33
; %bb.32:
Lloh33:
	adrp	x8, _RSB_CMD@GOTPAGE
Lloh34:
	ldr	x8, [x8, _RSB_CMD@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x22
	bl	_RSB_WRITE
LBB0_33:
	ldr	w8, [x20, #8]
	sub	w8, w8, #1
	ldr	w9, [x20, #16]
	ldr	w10, [x25]
Lloh36:
	adrp	x11, _DLEN_READ@GOTPAGE
Lloh37:
	ldr	x11, [x11, _DLEN_READ@GOTPAGEOFF]
Lloh38:
	ldr	w11, [x11]
	bics	wzr, w10, w9
	csel	w9, w11, wzr, eq
	orr	w2, w9, w8
Lloh39:
	adrp	x8, _RSB_DLEN@GOTPAGE
Lloh40:
	ldr	x8, [x8, _RSB_DLEN@GOTPAGEOFF]
Lloh41:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_RSB_WRITE
	mov	x0, x21
	bl	_rsb_start
	mov	x23, x0
	cbnz	w0, LBB0_37
; %bb.34:
	ldr	w8, [x20, #16]
	ldr	w9, [x25]
	bics	wzr, w9, w8
	b.ne	LBB0_36
; %bb.35:
Lloh42:
	adrp	x8, _RSB_DATA0@GOTPAGE
Lloh43:
	ldr	x8, [x8, _RSB_DATA0@GOTPAGEOFF]
Lloh44:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_RSB_READ
	ldp	w2, w1, [x20, #24]
	mov	w3, #0
	bl	_rsb_decode
LBB0_36:
	mov	w23, #0
LBB0_37:
	str	xzr, [x19, #16]
	str	wzr, [x19, #8]
	mov	x0, x19
	bl	_wakeup
	mov	x0, x19
	bl	_RSB_UNLOCK
	b	LBB0_6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.comm	_IIC_M_RD,4,2                   ; @IIC_M_RD
	.comm	_RSB_MAXLEN,4,2                 ; @RSB_MAXLEN
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_A23_RSB,8,3                    ; @A23_RSB
	.comm	_CMD_RD8,4,2                    ; @CMD_RD8
	.comm	_CMD_RD16,4,2                   ; @CMD_RD16
	.comm	_CMD_RD32,4,2                   ; @CMD_RD32
	.comm	_CMD_WR8,4,2                    ; @CMD_WR8
	.comm	_CMD_WR16,4,2                   ; @CMD_WR16
	.comm	_CMD_WR32,4,2                   ; @CMD_WR32
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"i2cbuswait"

	.comm	_RSB_INTS,4,2                   ; @RSB_INTS
	.comm	_RSB_DADDR0,4,2                 ; @RSB_DADDR0
	.comm	_RSB_DATA0,4,2                  ; @RSB_DATA0
	.comm	_RSB_CMD,4,2                    ; @RSB_CMD
	.comm	_DLEN_READ,4,2                  ; @DLEN_READ
	.comm	_RSB_DLEN,4,2                   ; @RSB_DLEN
	.no_dead_strip	_rsb_transfer
.subsections_via_symbols
