	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pcan_usb_pro_decode_buf
_pcan_usb_pro_decode_buf:               ## @pcan_usb_pro_decode_buf
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %rbx
	callq	_pcan_usb_pro_dev_if
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %r14
	movq	8(%r12), %rsi
	movl	(%r12), %edx
	leaq	-64(%rbp), %rdi
	callq	_pcan_msg_init
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movslq	(%r12), %r15
	shlq	$2, %r15
	addq	8(%r12), %r15
	movq	-64(%rbp), %rax
	movl	(%rax), %edi
	callq	_le16_to_cpu
	testq	%rax, %rax
	jle	LBB0_20
## %bb.3:
	movq	%rax, %r14
	incq	%r14
	xorl	%r13d, %r13d
	jmp	LBB0_4
LBB0_17:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str.3(%rip), %rsi
	movq	%rcx, %rdx
	xorl	%eax, %eax
	callq	_netdev_err
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_4 Depth=1
	decq	%r14
	cmpq	$1, %r14
	jle	LBB0_19
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	_pcan_usb_pro_sizeof_rec@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rbx), %rcx
	movq	(%rax,%rcx,8), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %rsi
	leaq	(%rbx,%rax,4), %rbx
	cmpq	%r15, %rbx
	ja	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	leaq	-130(%rcx), %rax
	cmpq	$4, %rax
	jae	LBB0_10
## %bb.13:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_pcan_usb_pro_handle_canmsg
LBB0_14:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	%eax, %r13d
	testl	%eax, %eax
	jns	LBB0_18
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$128, %rcx
	je	LBB0_16
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$129, %rcx
	jne	LBB0_17
## %bb.12:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_pcan_usb_pro_handle_error
	jmp	LBB0_14
LBB0_16:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_pcan_usb_pro_handle_ts
	jmp	LBB0_18
LBB0_1:
	movl	(%r12), %edx
	leaq	L_.str(%rip), %rsi
	xorl	%r13d, %r13d
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_netdev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
	jmp	LBB0_21
LBB0_5:
	movq	_ENOTSUPP@GOTPCREL(%rip), %rbx
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_6
LBB0_8:
	leaq	L_.str.2(%rip), %rsi
	movq	_EBADMSG@GOTPCREL(%rip), %rbx
LBB0_6:
	xorl	%r13d, %r13d
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_netdev_err
	subl	(%rbx), %r13d
LBB0_19:
	testl	%r13d, %r13d
	je	LBB0_20
LBB0_15:
	movq	8(%r12), %rsi
	movl	(%r12), %edx
	leaq	L_.str.4(%rip), %rdi
	callq	_pcan_dump_mem
	jmp	LBB0_21
LBB0_20:
	xorl	%r13d, %r13d
LBB0_21:
	movl	%r13d, %eax
	addq	$24, %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	"bad msg hdr len %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_pcan_usb_pro_sizeof_rec,8,3    ## @pcan_usb_pro_sizeof_rec
L_.str.1:                               ## @.str.1
	.asciz	"got unsupported rec in usb msg:\n"

	.comm	_ENOTSUPP,4,2                   ## @ENOTSUPP
L_.str.2:                               ## @.str.2
	.asciz	"got frag rec: should inc usb rx buf size\n"

	.comm	_EBADMSG,4,2                    ## @EBADMSG
L_.str.3:                               ## @.str.3
	.asciz	"unhandled rec type 0x%02x (%d): ignored\n"

L_.str.4:                               ## @.str.4
	.asciz	"received msg"

	.no_dead_strip	_pcan_usb_pro_decode_buf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pcan_usb_pro_decode_buf
_pcan_usb_pro_decode_buf:               ; @pcan_usb_pro_decode_buf
	.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	x19, x1
	mov	x20, x0
	bl	_pcan_usb_pro_dev_if
	mov	x21, x0
	ldr	x20, [x20]
	ldr	x1, [x19, #8]
	ldr	w2, [x19]
	add	x0, sp, #24
	bl	_pcan_msg_init
	cbz	x0, LBB0_14
; %bb.1:
	mov	x25, x0
	ldr	x23, [x19, #8]
	ldrsw	x24, [x19]
	ldr	x8, [sp, #24]
	ldr	w0, [x8]
	bl	_le16_to_cpu
	cmp	x0, #1
	b.lt	LBB0_15
; %bb.2:
	mov	w22, #0
	add	x27, x23, x24, lsl #2
	add	x28, x0, #1
Lloh0:
	adrp	x24, _pcan_usb_pro_sizeof_rec@GOTPAGE
Lloh1:
	ldr	x24, [x24, _pcan_usb_pro_sizeof_rec@GOTPAGEOFF]
Lloh2:
	adrp	x23, l_.str.1@PAGE
Lloh3:
	add	x23, x23, l_.str.1@PAGEOFF
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	stp	x8, x8, [sp]
	mov	x0, x20
Lloh4:
	adrp	x1, l_.str.3@PAGE
Lloh5:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_netdev_err
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	sub	x28, x28, #1
	mov	x25, x26
	cmp	x28, #1
	b.le	LBB0_19
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x24]
	ldr	x8, [x25]
	ldr	x9, [x9, x8, lsl #3]
	cbz	x9, LBB0_16
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x26, x25, x9, lsl #2
	cmp	x26, x27
	b.hi	LBB0_17
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	sub	x9, x8, #130
	cmp	x9, #4
	b.hs	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x21
	mov	x1, x25
	bl	_pcan_usb_pro_handle_canmsg
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x22, x0
	tbz	w0, #31, LBB0_4
	b	LBB0_20
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	x8, #128
	b.eq	LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	cmp	x8, #129
	b.ne	LBB0_3
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x21
	mov	x1, x25
	bl	_pcan_usb_pro_handle_error
	b	LBB0_9
LBB0_13:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x21
	mov	x1, x25
	bl	_pcan_usb_pro_handle_ts
	b	LBB0_4
LBB0_14:
	ldr	w8, [x19]
	str	x8, [sp]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_netdev_err
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_21
LBB0_15:
	mov	w22, #0
	b	LBB0_21
LBB0_16:
Lloh11:
	adrp	x21, _ENOTSUPP@GOTPAGE
Lloh12:
	ldr	x21, [x21, _ENOTSUPP@GOTPAGEOFF]
	b	LBB0_18
LBB0_17:
Lloh13:
	adrp	x23, l_.str.2@PAGE
Lloh14:
	add	x23, x23, l_.str.2@PAGEOFF
Lloh15:
	adrp	x21, _EBADMSG@GOTPAGE
Lloh16:
	ldr	x21, [x21, _EBADMSG@GOTPAGEOFF]
LBB0_18:
	mov	x0, x20
	mov	x1, x23
	bl	_netdev_err
	ldr	w8, [x21]
	neg	w22, w8
LBB0_19:
	cbz	w22, LBB0_21
LBB0_20:
	ldr	x1, [x19, #8]
	ldr	w2, [x19]
Lloh17:
	adrp	x0, l_.str.4@PAGE
Lloh18:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_pcan_dump_mem
LBB0_21:
	mov	x0, x22
	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 AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bad msg hdr len %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_pcan_usb_pro_sizeof_rec,8,3    ; @pcan_usb_pro_sizeof_rec
l_.str.1:                               ; @.str.1
	.asciz	"got unsupported rec in usb msg:\n"

	.comm	_ENOTSUPP,4,2                   ; @ENOTSUPP
l_.str.2:                               ; @.str.2
	.asciz	"got frag rec: should inc usb rx buf size\n"

	.comm	_EBADMSG,4,2                    ; @EBADMSG
l_.str.3:                               ; @.str.3
	.asciz	"unhandled rec type 0x%02x (%d): ignored\n"

l_.str.4:                               ; @.str.4
	.asciz	"received msg"

	.no_dead_strip	_pcan_usb_pro_decode_buf
.subsections_via_symbols
