	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pcan_usb_pro_send_cmd
_pcan_usb_pro_send_cmd:                 ## @pcan_usb_pro_send_cmd
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_PCAN_USB_STATE_CONNECTED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%r14d, %r14d
	testl	%eax, (%rdi)
	je	LBB0_3
## %bb.1:
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movl	8(%rdi), %r12d
	movq	_PCAN_USBPRO_EP_CMDOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, %edi
	callq	_usb_sndbulkpipe
	movl	(%rbx), %ecx
	movl	4(%rbx), %edx
	movq	_PCAN_USBPRO_COMMAND_TIMEOUT@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r9d
	leaq	-36(%rbp), %r8
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_usb_bulk_msg
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	%eax, %ebx
	movl	4(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_netdev_err
	movl	%ebx, %r14d
LBB0_3:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	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_EP_CMDOUT,4,2      ## @PCAN_USBPRO_EP_CMDOUT
	.comm	_PCAN_USBPRO_COMMAND_TIMEOUT,4,2 ## @PCAN_USBPRO_COMMAND_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sending command failure: %d\n"

	.no_dead_strip	_pcan_usb_pro_send_cmd
.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_send_cmd
_pcan_usb_pro_send_cmd:                 ; @pcan_usb_pro_send_cmd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	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_3
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	ldr	w21, [x0, #8]
Lloh3:
	adrp	x8, _PCAN_USBPRO_EP_CMDOUT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PCAN_USBPRO_EP_CMDOUT@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_usb_sndbulkpipe
	mov	x1, x0
	ldp	w3, w2, [x20]
Lloh6:
	adrp	x8, _PCAN_USBPRO_COMMAND_TIMEOUT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PCAN_USBPRO_COMMAND_TIMEOUT@GOTPAGEOFF]
Lloh8:
	ldr	w5, [x8]
	add	x4, sp, #12
	mov	x0, x21
	bl	_usb_bulk_msg
	mov	x20, x0
	cbz	w0, LBB0_4
; %bb.2:
	ldr	w0, [x19, #4]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_netdev_err
	b	LBB0_4
LBB0_3:
	mov	w20, #0
LBB0_4:
	mov	x0, x20
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_PCAN_USB_STATE_CONNECTED,4,2   ; @PCAN_USB_STATE_CONNECTED
	.comm	_PCAN_USBPRO_EP_CMDOUT,4,2      ; @PCAN_USBPRO_EP_CMDOUT
	.comm	_PCAN_USBPRO_COMMAND_TIMEOUT,4,2 ; @PCAN_USBPRO_COMMAND_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sending command failure: %d\n"

	.no_dead_strip	_pcan_usb_pro_send_cmd
.subsections_via_symbols
