	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function esd_usb2_start
_esd_usb2_start:                        ## @esd_usb2_start
	.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
	movq	%rdi, %r15
	movq	8(%rdi), %r14
	movq	16(%rdi), %r12
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kmalloc
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	_CMD_IDADD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	_ESD_MAX_ID_SEGMENT@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	leal	2(%rax), %ecx
	movl	%ecx, 16(%rbx)
	movl	4(%r15), %ecx
	movl	%ecx, 12(%rbx)
	movq	_ESD_ID_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 8(%rbx)
	testl	%eax, %eax
	jle	LBB0_5
## %bb.3:
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	$-1, %edi
	callq	_cpu_to_le32
	movq	(%rbx), %rcx
	movq	%rax, (%rcx,%r14,8)
	incq	%r14
	movslq	(%r13), %rax
	cmpq	%rax, %r14
	jl	LBB0_4
LBB0_5:
	movl	$1, %edi
	callq	_cpu_to_le32
	movq	(%rbx), %rcx
	movslq	(%r13), %rdx
	movq	%rax, (%rcx,%rdx,8)
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_esd_usb2_send_msg
	movl	%eax, %r13d
	testl	%eax, %eax
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jne	LBB0_8
## %bb.6:
	movq	%r12, %rdi
	callq	_esd_usb2_setup_rx_urbs
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:
	movq	_CAN_STATE_ERROR_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	xorl	%r13d, %r13d
	jmp	LBB0_8
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_8:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%r13d, %eax
	jne	LBB0_10
## %bb.9:
	movq	%r14, %rdi
	callq	_netif_device_detach
LBB0_10:
	testl	%r13d, %r13d
	je	LBB0_12
## %bb.11:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%r13d, %edx
	callq	_netdev_err
LBB0_12:
	movq	%rbx, %rdi
	callq	_kfree
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_CMD_IDADD,4,2                  ## @CMD_IDADD
	.comm	_ESD_MAX_ID_SEGMENT,4,2         ## @ESD_MAX_ID_SEGMENT
	.comm	_ESD_ID_ENABLE,4,2              ## @ESD_ID_ENABLE
	.comm	_CAN_STATE_ERROR_ACTIVE,4,2     ## @CAN_STATE_ERROR_ACTIVE
	.comm	_ENODEV,4,2                     ## @ENODEV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"couldn't start device: %d\n"

	.no_dead_strip	_esd_usb2_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function esd_usb2_start
_esd_usb2_start:                        ; @esd_usb2_start
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x0
	ldp	x19, x22, [x0, #8]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kmalloc
	mov	x20, x0
	cbz	x0, LBB0_7
; %bb.1:
Lloh3:
	adrp	x8, _CMD_IDADD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CMD_IDADD@GOTPAGEOFF]
Lloh5:
	adrp	x23, _ESD_MAX_ID_SEGMENT@GOTPAGE
Lloh6:
	ldr	x23, [x23, _ESD_MAX_ID_SEGMENT@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	ldr	w9, [x23]
	add	w10, w9, #2
	stp	w10, w8, [x20, #16]
	ldr	w8, [x21, #4]
Lloh8:
	adrp	x10, _ESD_ID_ENABLE@GOTPAGE
Lloh9:
	ldr	x10, [x10, _ESD_ID_ENABLE@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	stp	w10, w8, [x20, #8]
	cmp	w9, #1
	b.lt	LBB0_4
; %bb.2:
	mov	x24, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #-1
	bl	_cpu_to_le32
	ldr	x8, [x20]
	str	x0, [x8, x24, lsl #3]
	add	x24, x24, #1
	ldrsw	x8, [x23]
	cmp	x24, x8
	b.lt	LBB0_3
LBB0_4:
	mov	w0, #1
	bl	_cpu_to_le32
	ldr	x8, [x20]
	ldrsw	x9, [x23]
	str	x0, [x8, x9, lsl #3]
	mov	x0, x22
	mov	x1, x20
	bl	_esd_usb2_send_msg
	mov	x23, x0
	cbnz	w0, LBB0_8
; %bb.5:
	mov	x0, x22
	bl	_esd_usb2_setup_rx_urbs
	mov	x23, x0
	cbnz	w0, LBB0_8
; %bb.6:
Lloh11:
	adrp	x8, _CAN_STATE_ERROR_ACTIVE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CAN_STATE_ERROR_ACTIVE@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	str	w8, [x21]
	b	LBB0_8
LBB0_7:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_8:
Lloh17:
	adrp	x8, _ENODEV@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	cmn	w23, w8
	b.ne	LBB0_10
; %bb.9:
	mov	x0, x19
	bl	_netif_device_detach
LBB0_10:
	cbz	w23, LBB0_12
; %bb.11:
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x23
	bl	_netdev_err
LBB0_12:
	mov	x0, x20
	bl	_kfree
	mov	x0, x23
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_CMD_IDADD,4,2                  ; @CMD_IDADD
	.comm	_ESD_MAX_ID_SEGMENT,4,2         ; @ESD_MAX_ID_SEGMENT
	.comm	_ESD_ID_ENABLE,4,2              ; @ESD_ID_ENABLE
	.comm	_CAN_STATE_ERROR_ACTIVE,4,2     ; @CAN_STATE_ERROR_ACTIVE
	.comm	_ENODEV,4,2                     ; @ENODEV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"couldn't start device: %d\n"

	.no_dead_strip	_esd_usb2_start
.subsections_via_symbols
