	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pcan_usb_pro_wait_rsp
_pcan_usb_pro_wait_rsp:                 ## @pcan_usb_pro_wait_rsp
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_PCAN_USB_STATE_CONNECTED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	testl	%eax, (%rdi)
	je	LBB0_24
## %bb.1:
	movq	%rsi, %r15
	movq	(%rsi), %rax
	movq	8(%rsi), %rcx
	movslq	16(%rax), %rdx
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movl	20(%rax), %r13d
	movq	$0, (%rcx)
	movq	_PCAN_USBPRO_RSP_SUBMIT_MAX@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movl	$0, %r14d
	movl	$0, %ebx
	testl	%edx, %edx
	jle	LBB0_16
## %bb.2:
	xorl	%r14d, %r14d
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_12 Depth 2
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %ebx
	movq	_PCAN_USBPRO_EP_CMDIN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_usb_rcvbulkpipe
	movq	(%r15), %rdx
	movl	16(%r15), %ecx
	movq	_PCAN_USBPRO_COMMAND_TIMEOUT@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r9d
	movl	%ebx, %edi
	movl	%eax, %esi
	leaq	-60(%rbp), %r8
	callq	_usb_bulk_msg
	testl	%eax, %eax
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	-60(%rbp), %edx
	xorl	%ebx, %ebx
	testl	%edx, %edx
	je	LBB0_14
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_EBADMSG@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	movq	_PCAN_USBPRO_MSG_HEADER_LEN@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jl	LBB0_7
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movq	(%r15), %rsi
	leaq	-104(%rbp), %rdi
	callq	_pcan_msg_init
	movq	%rax, %r14
	movq	-96(%rbp), %rax
	movq	(%rax), %rdi
	callq	_le32_to_cpu
	testq	%rax, %rax
	jle	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %r15
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_12 Depth=2
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	movq	%rcx, %rdx
	xorl	%eax, %eax
	callq	_netdev_err
LBB0_22:                                ##   in Loop: Header=BB0_12 Depth=2
	leaq	(%r14,%r12,4), %r14
	decq	%r15
	je	LBB0_23
LBB0_12:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	_pcan_usb_pro_sizeof_rec@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r14), %rcx
	movslq	(%rax,%rcx,4), %r12
	testq	%r12, %r12
	je	LBB0_13
## %bb.17:                              ##   in Loop: Header=BB0_12 Depth=2
	cmpq	-80(%rbp), %rcx                 ## 8-byte Folded Reload
	jne	LBB0_18
## %bb.19:                              ##   in Loop: Header=BB0_12 Depth=2
	cmpl	$255, %r13d
	je	LBB0_24
## %bb.20:                              ##   in Loop: Header=BB0_12 Depth=2
	movl	%r13d, %eax
	cmpl	%ecx, %r13d
	je	LBB0_24
## %bb.21:                              ##   in Loop: Header=BB0_12 Depth=2
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %edi
	leaq	L_.str.5(%rip), %rsi
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
                                        ## kill: def $ecx killed $ecx killed $rcx
	xorl	%eax, %eax
	callq	_netdev_err
	jmp	LBB0_22
LBB0_13:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_netdev_err
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movq	(%r15), %rsi
	movl	-60(%rbp), %edx
	leaq	L_.str.3(%rip), %rdi
	callq	_pcan_dump_mem
	movq	_PCAN_USBPRO_RSP_SUBMIT_MAX@GOTPCREL(%rip), %r12
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	jmp	LBB0_14
LBB0_23:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	_PCAN_USBPRO_RSP_SUBMIT_MAX@GOTPCREL(%rip), %r12
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	movq	-72(%rbp), %r15                 ## 8-byte Reload
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	incl	%r14d
	movl	(%r12), %edx
	testl	%ebx, %ebx
	jne	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_3 Depth=1
	cmpl	%edx, %r14d
	jl	LBB0_3
	jmp	LBB0_16
LBB0_24:
	xorl	%eax, %eax
	jmp	LBB0_25
LBB0_4:
	movl	%eax, %ebx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	jmp	LBB0_8
LBB0_7:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
LBB0_8:
	xorl	%eax, %eax
	callq	_netdev_err
	movl	(%r12), %edx
LBB0_16:
	movq	_ERANGE@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	cmpl	%edx, %r14d
	cmovll	%ebx, %eax
LBB0_25:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCAN_USB_STATE_CONNECTED,4,2   ## @PCAN_USB_STATE_CONNECTED
	.comm	_PCAN_USBPRO_RSP_SUBMIT_MAX,4,2 ## @PCAN_USBPRO_RSP_SUBMIT_MAX
	.comm	_PCAN_USBPRO_EP_CMDIN,4,2       ## @PCAN_USBPRO_EP_CMDIN
	.comm	_PCAN_USBPRO_COMMAND_TIMEOUT,4,2 ## @PCAN_USBPRO_COMMAND_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"waiting rsp error %d\n"

	.comm	_EBADMSG,4,2                    ## @EBADMSG
	.comm	_PCAN_USBPRO_MSG_HEADER_LEN,4,2 ## @PCAN_USBPRO_MSG_HEADER_LEN
L_.str.1:                               ## @.str.1
	.asciz	"got abnormal too small rsp (len=%d)\n"

	.comm	_pcan_usb_pro_sizeof_rec,8,3    ## @pcan_usb_pro_sizeof_rec
L_.str.2:                               ## @.str.2
	.asciz	"got unprocessed record in msg\n"

L_.str.3:                               ## @.str.3
	.asciz	"rcvd rsp msg"

L_.str.4:                               ## @.str.4
	.asciz	"got unwanted rsp %xh: ignored\n"

L_.str.5:                               ## @.str.5
	.asciz	"got rsp %xh but on chan%u: ignored\n"

	.comm	_ERANGE,4,2                     ## @ERANGE
	.no_dead_strip	_pcan_usb_pro_wait_rsp
.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_wait_rsp
_pcan_usb_pro_wait_rsp:                 ; @pcan_usb_pro_wait_rsp
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _PCAN_USB_STATE_CONNECTED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PCAN_USB_STATE_CONNECTED@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_21
; %bb.1:
	mov	x20, x1
	ldp	x8, x9, [x1]
	ldp	w23, w22, [x8, #16]
                                        ; kill: def $w23 killed $w23 def $x23
	sxtw	x23, w23
	str	xzr, [x9]
Lloh3:
	adrp	x25, _PCAN_USBPRO_RSP_SUBMIT_MAX@GOTPAGE
Lloh4:
	ldr	x25, [x25, _PCAN_USBPRO_RSP_SUBMIT_MAX@GOTPAGEOFF]
	ldr	w8, [x25]
	cmp	w8, #1
	b.lt	LBB0_22
; %bb.2:
	mov	x19, x0
	mov	w28, #0
Lloh5:
	adrp	x26, _PCAN_USBPRO_EP_CMDIN@GOTPAGE
Lloh6:
	ldr	x26, [x26, _PCAN_USBPRO_EP_CMDIN@GOTPAGEOFF]
Lloh7:
	adrp	x27, _PCAN_USBPRO_COMMAND_TIMEOUT@GOTPAGE
Lloh8:
	ldr	x27, [x27, _PCAN_USBPRO_COMMAND_TIMEOUT@GOTPAGEOFF]
Lloh9:
	adrp	x24, _pcan_usb_pro_sizeof_rec@GOTPAGE
Lloh10:
	ldr	x24, [x24, _pcan_usb_pro_sizeof_rec@GOTPAGEOFF]
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
	ldr	w21, [x19, #8]
	ldr	w1, [x26]
	mov	x0, x21
	bl	_usb_rcvbulkpipe
	mov	x1, x0
	ldr	x2, [x20]
	ldr	w3, [x20, #16]
	ldr	w5, [x27]
	add	x4, sp, #44
	mov	x0, x21
	bl	_usb_bulk_msg
	cbnz	w0, LBB0_23
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w2, [sp, #44]
	cbz	w2, LBB0_15
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh11:
	adrp	x8, _EBADMSG@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EBADMSG@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w21, w8
Lloh14:
	adrp	x8, _PCAN_USBPRO_MSG_HEADER_LEN@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PCAN_USBPRO_MSG_HEADER_LEN@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	cmp	w2, w8
	b.lt	LBB0_24
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x1, [x20]
	add	x0, sp, #16
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_pcan_msg_init
	mov	x26, x0
	ldr	x8, [sp, #24]
	ldr	x0, [x8]
	bl	_le32_to_cpu
	cmp	x0, #1
	b.lt	LBB0_18
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x27, x0
	b	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=2
	ldr	w0, [x19, #4]
	str	x8, [sp]
Lloh17:
	adrp	x1, l_.str.4@PAGE
Lloh18:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=2
	bl	_netdev_err
	add	x26, x26, x25, lsl #2
	subs	x27, x27, #1
	b.eq	LBB0_17
LBB0_10:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x9, [x24]
	ldr	x8, [x26]
	ldrsw	x25, [x9, x8, lsl #2]
	cbz	w25, LBB0_16
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=2
	cmp	x8, x23
	b.ne	LBB0_8
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=2
	cmp	w22, #255
	b.eq	LBB0_21
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=2
	cmp	w22, w8
	b.eq	LBB0_21
; %bb.14:                               ;   in Loop: Header=BB0_10 Depth=2
	ldr	w0, [x19, #4]
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	stp	x23, x8, [sp]
Lloh19:
	adrp	x1, l_.str.5@PAGE
Lloh20:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_9
LBB0_15:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w21, #0
	b	LBB0_19
LBB0_16:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x19, #4]
Lloh21:
	adrp	x1, l_.str.2@PAGE
Lloh22:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_netdev_err
	ldr	x1, [x20]
	ldr	w2, [sp, #44]
Lloh23:
	adrp	x0, l_.str.3@PAGE
Lloh24:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pcan_dump_mem
LBB0_17:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh25:
	adrp	x25, _PCAN_USBPRO_RSP_SUBMIT_MAX@GOTPAGE
Lloh26:
	ldr	x25, [x25, _PCAN_USBPRO_RSP_SUBMIT_MAX@GOTPAGEOFF]
LBB0_18:                                ;   in Loop: Header=BB0_3 Depth=1
Lloh27:
	adrp	x26, _PCAN_USBPRO_EP_CMDIN@GOTPAGE
Lloh28:
	ldr	x26, [x26, _PCAN_USBPRO_EP_CMDIN@GOTPAGEOFF]
Lloh29:
	adrp	x27, _PCAN_USBPRO_COMMAND_TIMEOUT@GOTPAGE
Lloh30:
	ldr	x27, [x27, _PCAN_USBPRO_COMMAND_TIMEOUT@GOTPAGEOFF]
LBB0_19:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w28, w28, #1
	ldr	w8, [x25]
	cbnz	w21, LBB0_26
; %bb.20:                               ;   in Loop: Header=BB0_3 Depth=1
	cmp	w28, w8
	b.lt	LBB0_3
	b	LBB0_26
LBB0_21:
	mov	w0, #0
	b	LBB0_27
LBB0_22:
	mov	w28, #0
	mov	w21, #0
	b	LBB0_26
LBB0_23:
	mov	x21, x0
	ldr	w0, [x19, #4]
	str	x21, [sp]
Lloh31:
	adrp	x1, l_.str@PAGE
Lloh32:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_25
LBB0_24:
	ldr	w0, [x19, #4]
	str	x2, [sp]
Lloh33:
	adrp	x1, l_.str.1@PAGE
Lloh34:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_25:
	bl	_netdev_err
	ldr	w8, [x25]
LBB0_26:
Lloh35:
	adrp	x9, _ERANGE@GOTPAGE
Lloh36:
	ldr	x9, [x9, _ERANGE@GOTPAGEOFF]
Lloh37:
	ldr	w9, [x9]
	cmp	w28, w8
	csneg	w0, w21, w9, lt
LBB0_27:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_PCAN_USB_STATE_CONNECTED,4,2   ; @PCAN_USB_STATE_CONNECTED
	.comm	_PCAN_USBPRO_RSP_SUBMIT_MAX,4,2 ; @PCAN_USBPRO_RSP_SUBMIT_MAX
	.comm	_PCAN_USBPRO_EP_CMDIN,4,2       ; @PCAN_USBPRO_EP_CMDIN
	.comm	_PCAN_USBPRO_COMMAND_TIMEOUT,4,2 ; @PCAN_USBPRO_COMMAND_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"waiting rsp error %d\n"

	.comm	_EBADMSG,4,2                    ; @EBADMSG
	.comm	_PCAN_USBPRO_MSG_HEADER_LEN,4,2 ; @PCAN_USBPRO_MSG_HEADER_LEN
l_.str.1:                               ; @.str.1
	.asciz	"got abnormal too small rsp (len=%d)\n"

	.comm	_pcan_usb_pro_sizeof_rec,8,3    ; @pcan_usb_pro_sizeof_rec
l_.str.2:                               ; @.str.2
	.asciz	"got unprocessed record in msg\n"

l_.str.3:                               ; @.str.3
	.asciz	"rcvd rsp msg"

l_.str.4:                               ; @.str.4
	.asciz	"got unwanted rsp %xh: ignored\n"

l_.str.5:                               ; @.str.5
	.asciz	"got rsp %xh but on chan%u: ignored\n"

	.comm	_ERANGE,4,2                     ; @ERANGE
	.no_dead_strip	_pcan_usb_pro_wait_rsp
.subsections_via_symbols
