	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function usb_xfer
_usb_xfer:                              ## @usb_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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movq	%rsi, %rbx
	movq	%rdi, %r13
	movzbl	%r12b, %edx
	leaq	L_.str(%rip), %rsi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_20
## %bb.1:
	movq	%rax, %r15
	testl	%r12d, %r12d
	jle	LBB0_18
## %bb.2:
	movl	%r12d, %r14d
	decl	%r12d
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	$0, %r14d
	testq	%r12, %r12
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_CMD_I2C_IO_BEGIN@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	_CMD_I2C_IO@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	movl	$0, %eax
	cmpq	%r12, -64(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_CMD_I2C_IO_END@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	orl	%eax, %r14d
	movl	(%rbx), %r8d
	movl	4(%rbx), %r9d
	movq	_I2C_M_RD@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	andl	%r8d, %eax
	leaq	L_.str.2(%rip), %rcx
	leaq	L_.str.3(%rip), %rax
	cmoveq	%rax, %rcx
	movl	16(%rbx), %eax
	movl	%eax, (%rsp)
	movzbl	%r12b, %edx
	movq	%r13, %rdi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	(%rbx), %edx
	movl	4(%rbx), %r9d
	movl	16(%rbx), %ecx
	movq	8(%rbx), %r8
	testl	%edx, (%r15)
	je	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	_usb_read
	cmpl	4(%rbx), %eax
	je	LBB0_13
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	_usb_write
	cmpl	4(%rbx), %eax
	jne	LBB0_12
LBB0_13:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	_CMD_GET_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %r8
	movl	$1, %r9d
	callq	_usb_read
	cmpl	$1, %eax
	jne	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_3 Depth=1
	movzbl	(%r15), %edx
	movq	%r13, %rdi
	leaq	L_.str.7(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
	movzbl	(%r15), %eax
	movq	_STATUS_ADDRESS_NAK@GOTPCREL(%rip), %rcx
	cmpb	(%rcx), %al
	je	LBB0_16
## %bb.17:                              ##   in Loop: Header=BB0_3 Depth=1
	incq	%r12
	addq	$24, %rbx
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	cmpq	%r12, %r14
	jne	LBB0_3
	jmp	LBB0_18
LBB0_20:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_19
LBB0_14:
	leaq	L_.str.6(%rip), %rsi
	movq	%r13, %rdi
	callq	_dev_err
LBB0_16:
	movq	_EREMOTEIO@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_18
LBB0_9:
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_10
LBB0_12:
	leaq	L_.str.5(%rip), %rsi
LBB0_10:
	movq	%r13, %rdi
	callq	_dev_err
	movq	_EREMOTEIO@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	movq	-48(%rbp), %r15                 ## 8-byte Reload
LBB0_18:
	movq	%r15, %rdi
	callq	_kfree
LBB0_19:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"master xfer %d messages:\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_CMD_I2C_IO,4,2                 ## @CMD_I2C_IO
	.comm	_CMD_I2C_IO_BEGIN,4,2           ## @CMD_I2C_IO_BEGIN
	.comm	_CMD_I2C_IO_END,4,2             ## @CMD_I2C_IO_END
L_.str.1:                               ## @.str.1
	.asciz	"  %d: %s (flags %d) %d bytes to 0x%02x\n"

	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
L_.str.2:                               ## @.str.2
	.asciz	"read"

L_.str.3:                               ## @.str.3
	.asciz	"write"

L_.str.4:                               ## @.str.4
	.asciz	"failure reading data\n"

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

	.comm	_CMD_GET_STATUS,4,2             ## @CMD_GET_STATUS
L_.str.6:                               ## @.str.6
	.asciz	"failure reading status\n"

L_.str.7:                               ## @.str.7
	.asciz	"  status = %d\n"

	.comm	_STATUS_ADDRESS_NAK,1,0         ## @STATUS_ADDRESS_NAK
	.no_dead_strip	_usb_xfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function usb_xfer
_usb_xfer:                              ; @usb_xfer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x20, x2
	mov	x22, x1
	mov	x21, x0
	and	w2, w2, #0xff
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w0, #1
	bl	_kmalloc
	cbz	x0, LBB0_9
; %bb.1:
	mov	x19, x0
	subs	w25, w20, #1
	b.lt	LBB0_10
; %bb.2:
	mov	x26, #0
	mov	w27, w20
	add	x28, x22, #8
Lloh5:
	adrp	x23, _I2C_M_RD@GOTPAGE
Lloh6:
	ldr	x23, [x23, _I2C_M_RD@GOTPAGEOFF]
Lloh7:
	adrp	x22, l_.str.1@PAGE
Lloh8:
	add	x22, x22, l_.str.1@PAGEOFF
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
Lloh9:
	adrp	x8, _CMD_I2C_IO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CMD_I2C_IO@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _CMD_I2C_IO_BEGIN@GOTPAGE
Lloh13:
	ldr	x9, [x9, _CMD_I2C_IO_BEGIN@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	cmp	x26, #0
	csel	w9, w9, wzr, eq
	orr	w8, w9, w8
Lloh15:
	adrp	x9, _CMD_I2C_IO_END@GOTPAGE
Lloh16:
	ldr	x9, [x9, _CMD_I2C_IO_END@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	cmp	x25, x26
	csel	w9, w9, wzr, eq
	orr	w24, w8, w9
	ldr	w8, [x23]
	ldp	w9, w10, [x28, #-8]
	tst	w8, w9
Lloh18:
	adrp	x8, l_.str.2@PAGE
Lloh19:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh20:
	adrp	x11, l_.str.3@PAGE
Lloh21:
	add	x11, x11, l_.str.3@PAGEOFF
	csel	x8, x11, x8, eq
	ldr	w11, [x28, #8]
	stp	x10, x11, [sp, #16]
	stp	x8, x9, [sp]
	and	w2, w26, #0xff
	mov	x0, x21
	mov	x1, x22
	bl	_dev_dbg
	ldr	w8, [x23]
	ldr	w3, [x28, #8]
	ldr	x4, [x28]
	ldp	w2, w5, [x28, #-8]
	mov	x0, x21
	mov	x1, x24
	tst	w8, w2
	b.eq	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	bl	_usb_read
	ldur	w8, [x28, #-4]
	cmp	w0, w8
	b.eq	LBB0_6
	b	LBB0_12
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	bl	_usb_write
	ldur	w8, [x28, #-4]
	cmp	w0, w8
	b.ne	LBB0_13
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
Lloh22:
	adrp	x8, _CMD_GET_STATUS@GOTPAGE
Lloh23:
	ldr	x8, [x8, _CMD_GET_STATUS@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x21
	mov	w2, #0
	mov	w3, #0
	mov	x4, x19
	mov	w5, #1
	bl	_usb_read
	cmp	w0, #1
	b.ne	LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	ldrb	w2, [x19]
	mov	x0, x21
Lloh25:
	adrp	x1, l_.str.7@PAGE
Lloh26:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_dev_dbg
	ldrb	w8, [x19]
Lloh27:
	adrp	x9, _STATUS_ADDRESS_NAK@GOTPAGE
Lloh28:
	ldr	x9, [x9, _STATUS_ADDRESS_NAK@GOTPAGEOFF]
	ldrb	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_15
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x26, x26, #1
	add	x28, x28, #24
	cmp	x27, x26
	b.ne	LBB0_3
	b	LBB0_16
LBB0_9:
Lloh29:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_17
LBB0_10:
	mov	w20, #0
	b	LBB0_16
LBB0_11:
Lloh32:
	adrp	x1, l_.str.6@PAGE
Lloh33:
	add	x1, x1, l_.str.6@PAGEOFF
	b	LBB0_14
LBB0_12:
Lloh34:
	adrp	x1, l_.str.4@PAGE
Lloh35:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_14
LBB0_13:
Lloh36:
	adrp	x1, l_.str.5@PAGE
Lloh37:
	add	x1, x1, l_.str.5@PAGEOFF
LBB0_14:
	mov	x0, x21
	bl	_dev_err
LBB0_15:
Lloh38:
	adrp	x8, _EREMOTEIO@GOTPAGE
Lloh39:
	ldr	x8, [x8, _EREMOTEIO@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_16:
	mov	x0, x19
	bl	_kfree
LBB0_17:
	mov	x0, x20
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"master xfer %d messages:\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_CMD_I2C_IO,4,2                 ; @CMD_I2C_IO
	.comm	_CMD_I2C_IO_BEGIN,4,2           ; @CMD_I2C_IO_BEGIN
	.comm	_CMD_I2C_IO_END,4,2             ; @CMD_I2C_IO_END
l_.str.1:                               ; @.str.1
	.asciz	"  %d: %s (flags %d) %d bytes to 0x%02x\n"

	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
l_.str.2:                               ; @.str.2
	.asciz	"read"

l_.str.3:                               ; @.str.3
	.asciz	"write"

l_.str.4:                               ; @.str.4
	.asciz	"failure reading data\n"

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

	.comm	_CMD_GET_STATUS,4,2             ; @CMD_GET_STATUS
l_.str.6:                               ; @.str.6
	.asciz	"failure reading status\n"

l_.str.7:                               ; @.str.7
	.asciz	"  status = %d\n"

	.comm	_STATUS_ADDRESS_NAK,1,0         ; @STATUS_ADDRESS_NAK
	.no_dead_strip	_usb_xfer
.subsections_via_symbols
