	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function osif_xfer
_osif_xfer:                             ## @osif_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
	jle	LBB0_1
## %bb.2:
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	8(%rdi), %r12
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %eax
	shlq	$3, %rax
	leaq	(%rax,%rax,2), %r13
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx,%r14), %edx
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	je	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_OSIFI2C_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	20(%rbx,%r14), %ecx
	movq	8(%rbx,%r14), %r8
	movl	16(%rbx,%r14), %r9d
	movq	%r15, %rdi
	callq	_osif_usb_read
	cmpl	16(%rbx,%r14), %eax
	je	LBB0_10
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	_OSIFI2C_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	20(%rbx,%r14), %ecx
	movq	8(%rbx,%r14), %r8
	movl	16(%rbx,%r14), %r9d
	movq	%r15, %rdi
	callq	_osif_usb_write
	cmpl	16(%rbx,%r14), %eax
	jne	LBB0_9
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	_OSIFI2C_STOP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_osif_usb_read
	testl	%eax, %eax
	jne	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	_OSIFI2C_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movq	%r12, %r8
	movl	$1, %r9d
	callq	_osif_usb_read
	cmpl	$1, %eax
	jne	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r12), %rdx
	movq	_STATUS_ADDRESS_ACK@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jne	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_3 Depth=1
	addq	$24, %r14
	cmpq	%r14, %r13
	jne	LBB0_3
## %bb.17:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	jmp	LBB0_18
LBB0_1:
	xorl	%eax, %eax
	jmp	LBB0_18
LBB0_11:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_6
LBB0_13:
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_6
LBB0_15:
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_dbg
	jmp	LBB0_7
LBB0_5:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_6
LBB0_9:
	leaq	L_.str.1(%rip), %rsi
LBB0_6:
	movq	%r15, %rdi
	callq	_dev_err
LBB0_7:
	movq	_EREMOTEIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_18:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.comm	_OSIFI2C_READ,4,2               ## @OSIFI2C_READ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failure reading data\n"

	.comm	_EREMOTEIO,4,2                  ## @EREMOTEIO
	.comm	_OSIFI2C_WRITE,4,2              ## @OSIFI2C_WRITE
L_.str.1:                               ## @.str.1
	.asciz	"failure writing data\n"

	.comm	_OSIFI2C_STOP,4,2               ## @OSIFI2C_STOP
L_.str.2:                               ## @.str.2
	.asciz	"failure sending STOP\n"

	.comm	_OSIFI2C_STATUS,4,2             ## @OSIFI2C_STATUS
L_.str.3:                               ## @.str.3
	.asciz	"failure reading status\n"

	.comm	_STATUS_ADDRESS_ACK,8,3         ## @STATUS_ADDRESS_ACK
L_.str.4:                               ## @.str.4
	.asciz	"status = %d\n"

	.no_dead_strip	_osif_xfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function osif_xfer
_osif_xfer:                             ; @osif_xfer
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	cmp	w2, #1
	b.lt	LBB0_9
; %bb.1:
	mov	x19, x2
	mov	x20, x0
	ldr	x21, [x0, #8]
	mov	w22, w2
	add	x23, x1, #16
Lloh0:
	adrp	x24, _I2C_M_RD@GOTPAGE
Lloh1:
	ldr	x24, [x24, _I2C_M_RD@GOTPAGEOFF]
Lloh2:
	adrp	x26, _OSIFI2C_STOP@GOTPAGE
Lloh3:
	ldr	x26, [x26, _OSIFI2C_STOP@GOTPAGEOFF]
Lloh4:
	adrp	x27, _OSIFI2C_STATUS@GOTPAGE
Lloh5:
	ldr	x27, [x27, _OSIFI2C_STATUS@GOTPAGEOFF]
Lloh6:
	adrp	x28, _STATUS_ADDRESS_ACK@GOTPAGE
Lloh7:
	ldr	x28, [x28, _STATUS_ADDRESS_ACK@GOTPAGEOFF]
Lloh8:
	adrp	x25, _OSIFI2C_READ@GOTPAGE
Lloh9:
	ldr	x25, [x25, _OSIFI2C_READ@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w2, [x23, #-16]
	ldr	w8, [x24]
	tst	w8, w2
	b.eq	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [x25]
	ldur	x4, [x23, #-8]
	ldp	w5, w3, [x23]
	mov	x0, x20
	bl	_osif_usb_read
	ldr	w8, [x23]
	cmp	w0, w8
	b.eq	LBB0_5
	b	LBB0_13
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
Lloh10:
	adrp	x8, _OSIFI2C_WRITE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _OSIFI2C_WRITE@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	ldur	x4, [x23, #-8]
	ldp	w5, w3, [x23]
	mov	x0, x20
	bl	_osif_usb_write
	ldr	w8, [x23]
	cmp	w0, w8
	b.ne	LBB0_14
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [x26]
	mov	x0, x20
	mov	w2, #0
	mov	w3, #0
	mov	x4, #0
	mov	w5, #0
	bl	_osif_usb_read
	cbnz	w0, LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w1, [x27]
	mov	x0, x20
	mov	w2, #0
	mov	w3, #0
	mov	x4, x21
	mov	w5, #1
	bl	_osif_usb_read
	cmp	w0, #1
	b.ne	LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x2, [x21]
	ldr	x8, [x28]
	cmp	x2, x8
	b.ne	LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x23, x23, #24
	subs	x22, x22, #1
	b.ne	LBB0_2
	b	LBB0_17
LBB0_9:
	mov	w19, #0
	b	LBB0_17
LBB0_10:
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_15
LBB0_11:
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_15
LBB0_12:
Lloh17:
	adrp	x1, l_.str.4@PAGE
Lloh18:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
	b	LBB0_16
LBB0_13:
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_15
LBB0_14:
Lloh21:
	adrp	x1, l_.str.1@PAGE
Lloh22:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_15:
	mov	x0, x20
	bl	_dev_err
LBB0_16:
Lloh23:
	adrp	x8, _EREMOTEIO@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EREMOTEIO@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_17:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.comm	_OSIFI2C_READ,4,2               ; @OSIFI2C_READ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failure reading data\n"

	.comm	_EREMOTEIO,4,2                  ; @EREMOTEIO
	.comm	_OSIFI2C_WRITE,4,2              ; @OSIFI2C_WRITE
l_.str.1:                               ; @.str.1
	.asciz	"failure writing data\n"

	.comm	_OSIFI2C_STOP,4,2               ; @OSIFI2C_STOP
l_.str.2:                               ; @.str.2
	.asciz	"failure sending STOP\n"

	.comm	_OSIFI2C_STATUS,4,2             ; @OSIFI2C_STATUS
l_.str.3:                               ; @.str.3
	.asciz	"failure reading status\n"

	.comm	_STATUS_ADDRESS_ACK,8,3         ; @STATUS_ADDRESS_ACK
l_.str.4:                               ; @.str.4
	.asciz	"status = %d\n"

	.no_dead_strip	_osif_xfer
.subsections_via_symbols
