	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kvaser_usb_hydra_get_card_info
_kvaser_usb_hydra_get_card_info:        ## @kvaser_usb_hydra_get_card_info
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_CMD_GET_CARD_INFO_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$-1, %edx
	callq	_kvaser_usb_hydra_send_simple_cmd
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	leaq	-24(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	_CMD_GET_CARD_INFO_RESP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_kvaser_usb_hydra_wait_cmd
	testl	%eax, %eax
	jne	LBB0_4
## %bb.2:
	movl	-24(%rbp), %ecx
	movl	%ecx, (%rbx)
	movq	_KVASER_USB_MAX_NET_DEVICES@GOTPCREL(%rip), %rdx
	movl	$0, %eax
	cmpl	(%rdx), %ecx
	jle	LBB0_4
## %bb.3:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_4:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CMD_GET_CARD_INFO_REQ,4,2      ## @CMD_GET_CARD_INFO_REQ
	.comm	_CMD_GET_CARD_INFO_RESP,4,2     ## @CMD_GET_CARD_INFO_RESP
	.comm	_KVASER_USB_MAX_NET_DEVICES,4,2 ## @KVASER_USB_MAX_NET_DEVICES
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_kvaser_usb_hydra_get_card_info
.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_get_card_info
_kvaser_usb_hydra_get_card_info:        ; @kvaser_usb_hydra_get_card_info
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _CMD_GET_CARD_INFO_REQ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CMD_GET_CARD_INFO_REQ@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w2, #-1
	bl	_kvaser_usb_hydra_send_simple_cmd
	cbnz	w0, LBB0_5
; %bb.1:
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #4
	bl	_memset
Lloh3:
	adrp	x8, _CMD_GET_CARD_INFO_RESP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CMD_GET_CARD_INFO_RESP@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x19
	bl	_kvaser_usb_hydra_wait_cmd
	cbnz	w0, LBB0_5
; %bb.2:
	ldr	w8, [sp, #8]
	str	w8, [x19]
Lloh6:
	adrp	x9, _KVASER_USB_MAX_NET_DEVICES@GOTPAGE
Lloh7:
	ldr	x9, [x9, _KVASER_USB_MAX_NET_DEVICES@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w8, w9
	b.le	LBB0_4
; %bb.3:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_4:
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_CMD_GET_CARD_INFO_REQ,4,2      ; @CMD_GET_CARD_INFO_REQ
	.comm	_CMD_GET_CARD_INFO_RESP,4,2     ; @CMD_GET_CARD_INFO_RESP
	.comm	_KVASER_USB_MAX_NET_DEVICES,4,2 ; @KVASER_USB_MAX_NET_DEVICES
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_kvaser_usb_hydra_get_card_info
.subsections_via_symbols
