	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kvaser_usb_hydra_send_simple_cmd
_kvaser_usb_hydra_send_simple_cmd:      ## @kvaser_usb_hydra_send_simple_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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$1, %edi
	movl	$4, %esi
	callq	_kcalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movl	%ebx, (%rax)
	testl	%r15d, %r15d
	js	LBB0_3
## %bb.4:
	movq	_KVASER_USB_MAX_NET_DEVICES@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jle	LBB0_5
## %bb.6:
	movl	%r15d, %eax
	shlq	$2, %rax
	addq	(%r14), %rax
	jmp	LBB0_7
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_3:
	movq	_KVASER_USB_HYDRA_HE_ADDRESS_ILLEGAL@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_kvaser_usb_hydra_set_cmd_dest_he
	movq	%r14, %rdi
	callq	_kvaser_usb_hydra_get_next_transid
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_kvaser_usb_hydra_set_cmd_transid
	movq	%r12, %rdi
	callq	_kvaser_usb_hydra_cmd_size
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	callq	_kvaser_usb_send_cmd
	movl	%eax, %ebx
	jmp	LBB0_8
LBB0_5:
	movq	8(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_8:
	movq	%r12, %rdi
	callq	_kfree
LBB0_9:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_KVASER_USB_HYDRA_HE_ADDRESS_ILLEGAL,4,2 ## @KVASER_USB_HYDRA_HE_ADDRESS_ILLEGAL
	.comm	_KVASER_USB_MAX_NET_DEVICES,4,2 ## @KVASER_USB_MAX_NET_DEVICES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"channel (%d) out of range.\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_kvaser_usb_hydra_send_simple_cmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kvaser_usb_hydra_send_simple_cmd
_kvaser_usb_hydra_send_simple_cmd:      ; @kvaser_usb_hydra_send_simple_cmd
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x2
	mov	x22, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w0, #1
	mov	w1, #4
	bl	_kcalloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
	str	w22, [x0]
	tbnz	w21, #31, LBB0_5
; %bb.2:
Lloh3:
	adrp	x8, _KVASER_USB_MAX_NET_DEVICES@GOTPAGE
Lloh4:
	ldr	x8, [x8, _KVASER_USB_MAX_NET_DEVICES@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w21
	b.le	LBB0_7
; %bb.3:
	ldr	x8, [x20]
	add	x8, x8, w21, uxtw #2
	b	LBB0_6
LBB0_4:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_9
LBB0_5:
Lloh9:
	adrp	x8, _KVASER_USB_HYDRA_HE_ADDRESS_ILLEGAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _KVASER_USB_HYDRA_HE_ADDRESS_ILLEGAL@GOTPAGEOFF]
LBB0_6:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_kvaser_usb_hydra_set_cmd_dest_he
	mov	x0, x20
	bl	_kvaser_usb_hydra_get_next_transid
	mov	x1, x0
	mov	x0, x19
	bl	_kvaser_usb_hydra_set_cmd_transid
	mov	x0, x19
	bl	_kvaser_usb_hydra_cmd_size
	mov	x2, x0
	mov	x0, x20
	mov	x1, x19
	bl	_kvaser_usb_send_cmd
	mov	x20, x0
	b	LBB0_8
LBB0_7:
	ldr	x0, [x20, #8]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_dev_err
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_8:
	mov	x0, x19
	bl	_kfree
LBB0_9:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_KVASER_USB_HYDRA_HE_ADDRESS_ILLEGAL,4,2 ; @KVASER_USB_HYDRA_HE_ADDRESS_ILLEGAL
	.comm	_KVASER_USB_MAX_NET_DEVICES,4,2 ; @KVASER_USB_MAX_NET_DEVICES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"channel (%d) out of range.\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_kvaser_usb_hydra_send_simple_cmd
.subsections_via_symbols
