	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pcan_usb_send_cmd
_pcan_usb_send_cmd:                     ## @pcan_usb_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	%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	_PCAN_USB_STATE_CONNECTED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%r12d, %r12d
	testl	%eax, (%rdi)
	je	LBB0_5
## %bb.1:
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	8(%rdi), %rax
	movq	_PCAN_USB_CMD_FUNC@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	%rsi, (%rax,%rdx,8)
	movq	8(%rdi), %rax
	movq	_PCAN_USB_CMD_NUM@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	%r14, (%rax,%rdx,8)
	testq	%rcx, %rcx
	je	LBB0_3
## %bb.2:
	movq	_PCAN_USB_CMD_ARGS@GOTPCREL(%rip), %rax
	movslq	(%rax), %rdi
	shlq	$3, %rdi
	addq	8(%rbx), %rdi
	movq	_PCAN_USB_CMD_ARGS_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rcx, %rsi
	callq	_memcpy
LBB0_3:
	movl	16(%rbx), %r13d
	movq	_PCAN_USB_EP_CMDOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r13d, %edi
	callq	_usb_sndbulkpipe
	movq	8(%rbx), %rdx
	movq	_PCAN_USB_CMD_LEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_PCAN_USB_COMMAND_TIMEOUT@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r9d
	leaq	-44(%rbp), %r8
	movl	%r13d, %edi
	movl	%eax, %esi
	callq	_usb_bulk_msg
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %r13d
	movl	4(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdx
	movq	%r14, %rcx
	movl	%eax, %r8d
	callq	_netdev_err
	movl	%r13d, %r12d
LBB0_5:
	movl	%r12d, %eax
	addq	$8, %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_USB_CMD_FUNC,8,3          ## @PCAN_USB_CMD_FUNC
	.comm	_PCAN_USB_CMD_NUM,8,3           ## @PCAN_USB_CMD_NUM
	.comm	_PCAN_USB_CMD_ARGS,4,2          ## @PCAN_USB_CMD_ARGS
	.comm	_PCAN_USB_CMD_ARGS_LEN,4,2      ## @PCAN_USB_CMD_ARGS_LEN
	.comm	_PCAN_USB_EP_CMDOUT,4,2         ## @PCAN_USB_EP_CMDOUT
	.comm	_PCAN_USB_CMD_LEN,4,2           ## @PCAN_USB_CMD_LEN
	.comm	_PCAN_USB_COMMAND_TIMEOUT,4,2   ## @PCAN_USB_COMMAND_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sending cmd f=0x%x n=0x%x failure: %d\n"

	.no_dead_strip	_pcan_usb_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_send_cmd
_pcan_usb_send_cmd:                     ; @pcan_usb_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_5
; %bb.1:
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x8, [x0, #8]
Lloh3:
	adrp	x9, _PCAN_USB_CMD_FUNC@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PCAN_USB_CMD_FUNC@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	str	x1, [x8, x9, lsl #3]
	ldr	x8, [x0, #8]
Lloh6:
	adrp	x9, _PCAN_USB_CMD_NUM@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PCAN_USB_CMD_NUM@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	str	x2, [x8, x9, lsl #3]
	cbz	x3, LBB0_3
; %bb.2:
Lloh9:
	adrp	x8, _PCAN_USB_CMD_ARGS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PCAN_USB_CMD_ARGS@GOTPAGEOFF]
	ldr	x9, [x21, #8]
Lloh11:
	ldrsw	x8, [x8]
	add	x0, x9, x8, lsl #3
Lloh12:
	adrp	x8, _PCAN_USB_CMD_ARGS_LEN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PCAN_USB_CMD_ARGS_LEN@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x1, x3
	bl	_memcpy
LBB0_3:
	ldr	w22, [x21, #16]
Lloh15:
	adrp	x8, _PCAN_USB_EP_CMDOUT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PCAN_USB_EP_CMDOUT@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_usb_sndbulkpipe
	mov	x1, x0
	ldr	x2, [x21, #8]
Lloh18:
	adrp	x8, _PCAN_USB_CMD_LEN@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PCAN_USB_CMD_LEN@GOTPAGEOFF]
Lloh20:
	ldr	w3, [x8]
Lloh21:
	adrp	x8, _PCAN_USB_COMMAND_TIMEOUT@GOTPAGE
Lloh22:
	ldr	x8, [x8, _PCAN_USB_COMMAND_TIMEOUT@GOTPAGEOFF]
Lloh23:
	ldr	w5, [x8]
	add	x4, sp, #12
	mov	x0, x22
	bl	_usb_bulk_msg
	mov	x22, x0
	cbz	w0, LBB0_6
; %bb.4:
	ldr	w0, [x21, #4]
Lloh24:
	adrp	x1, l_.str@PAGE
Lloh25:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	mov	x3, x19
	mov	x4, x22
	bl	_netdev_err
	b	LBB0_6
LBB0_5:
	mov	w22, #0
LBB0_6:
	mov	x0, x22
	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 AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_PCAN_USB_STATE_CONNECTED,4,2   ; @PCAN_USB_STATE_CONNECTED
	.comm	_PCAN_USB_CMD_FUNC,8,3          ; @PCAN_USB_CMD_FUNC
	.comm	_PCAN_USB_CMD_NUM,8,3           ; @PCAN_USB_CMD_NUM
	.comm	_PCAN_USB_CMD_ARGS,4,2          ; @PCAN_USB_CMD_ARGS
	.comm	_PCAN_USB_CMD_ARGS_LEN,4,2      ; @PCAN_USB_CMD_ARGS_LEN
	.comm	_PCAN_USB_EP_CMDOUT,4,2         ; @PCAN_USB_EP_CMDOUT
	.comm	_PCAN_USB_CMD_LEN,4,2           ; @PCAN_USB_CMD_LEN
	.comm	_PCAN_USB_COMMAND_TIMEOUT,4,2   ; @PCAN_USB_COMMAND_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sending cmd f=0x%x n=0x%x failure: %d\n"

	.no_dead_strip	_pcan_usb_send_cmd
.subsections_via_symbols
