	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kvaser_usb_hydra_init_card
_kvaser_usb_hydra_init_card:            ## @kvaser_usb_hydra_init_card
	.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	%rdi, %r14
	movq	_KVASER_USB_HYDRA_MIN_TRANSID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%rdi)
	addq	$36, %rdi
	callq	_spin_lock_init
	movl	32(%r14), %edi
	movq	_KVASER_USB_HYDRA_MAX_CMD_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_memset
	movq	$0, 24(%r14)
	leaq	20(%r14), %rdi
	callq	_spin_lock_init
	movl	16(%r14), %edi
	movq	_KVASER_USB_HYDRA_HE_ADDRESS_ILLEGAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4, %edx
	callq	_memset
	movq	$0, 8(%r14)
	movq	_KVASER_USB_MAX_NET_DEVICES@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	je	LBB0_5
## %bb.1:
	leaq	L_.str(%rip), %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_KVASER_USB_HYDRA_TRANSID_CANHE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	%ebx, %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	movq	%r12, %rcx
	callq	_kvaser_usb_hydra_map_channel
	testl	%eax, %eax
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	incl	%ebx
	cmpl	(%r13), %ebx
	jb	LBB0_2
LBB0_5:
	movq	_KVASER_USB_HYDRA_TRANSID_SYSDBG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rcx
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_kvaser_usb_hydra_map_channel
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %ebx
	movq	(%r14), %rdi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	movl	%ebx, %r15d
	jmp	LBB0_7
LBB0_3:
	movl	%eax, %r15d
	movq	(%r14), %rdi
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_7:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KVASER_USB_HYDRA_MIN_TRANSID,4,2 ## @KVASER_USB_HYDRA_MIN_TRANSID
	.comm	_KVASER_USB_HYDRA_MAX_CMD_LEN,4,2 ## @KVASER_USB_HYDRA_MAX_CMD_LEN
	.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
	.comm	_KVASER_USB_HYDRA_TRANSID_CANHE,4,2 ## @KVASER_USB_HYDRA_TRANSID_CANHE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CAN"

L_.str.1:                               ## @.str.1
	.asciz	"CMD_MAP_CHANNEL_REQ failed for CAN%u\n"

	.comm	_KVASER_USB_HYDRA_TRANSID_SYSDBG,4,2 ## @KVASER_USB_HYDRA_TRANSID_SYSDBG
L_.str.2:                               ## @.str.2
	.asciz	"SYSDBG"

L_.str.3:                               ## @.str.3
	.asciz	"CMD_MAP_CHANNEL_REQ failed for SYSDBG\n"

	.no_dead_strip	_kvaser_usb_hydra_init_card
.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_init_card
_kvaser_usb_hydra_init_card:            ; @kvaser_usb_hydra_init_card
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _KVASER_USB_HYDRA_MIN_TRANSID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _KVASER_USB_HYDRA_MIN_TRANSID@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x0, #40]
	add	x0, x0, #36
	bl	_spin_lock_init
	ldr	w0, [x19, #32]
Lloh3:
	adrp	x8, _KVASER_USB_HYDRA_MAX_CMD_LEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _KVASER_USB_HYDRA_MAX_CMD_LEN@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_memset
	str	xzr, [x19, #24]
	add	x0, x19, #20
	bl	_spin_lock_init
	ldr	w0, [x19, #16]
Lloh6:
	adrp	x8, _KVASER_USB_HYDRA_HE_ADDRESS_ILLEGAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _KVASER_USB_HYDRA_HE_ADDRESS_ILLEGAL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	w2, #4
	bl	_memset
	str	xzr, [x19, #8]
Lloh9:
	adrp	x23, _KVASER_USB_MAX_NET_DEVICES@GOTPAGE
Lloh10:
	ldr	x23, [x23, _KVASER_USB_MAX_NET_DEVICES@GOTPAGEOFF]
	ldr	w8, [x23]
	cbz	w8, LBB0_4
; %bb.1:
	mov	w20, #0
Lloh11:
	adrp	x24, _KVASER_USB_HYDRA_TRANSID_CANHE@GOTPAGE
Lloh12:
	ldr	x24, [x24, _KVASER_USB_HYDRA_TRANSID_CANHE@GOTPAGEOFF]
Lloh13:
	adrp	x22, l_.str@PAGE
Lloh14:
	add	x22, x22, l_.str@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x24]
	orr	w1, w8, w20
	mov	x0, x19
	mov	x2, x20
	mov	x3, x22
	bl	_kvaser_usb_hydra_map_channel
	cbnz	w0, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w20, w20, #1
	ldr	w8, [x23]
	cmp	w20, w8
	b.lo	LBB0_2
LBB0_4:
Lloh15:
	adrp	x8, _KVASER_USB_HYDRA_TRANSID_SYSDBG@GOTPAGE
Lloh16:
	ldr	x8, [x8, _KVASER_USB_HYDRA_TRANSID_SYSDBG@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x3, l_.str.2@PAGE
Lloh19:
	add	x3, x3, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	w2, #0
	bl	_kvaser_usb_hydra_map_channel
	mov	x21, x0
	cbz	w0, LBB0_8
; %bb.5:
	ldr	x0, [x19]
Lloh20:
	adrp	x1, l_.str.3@PAGE
Lloh21:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_7
LBB0_6:
	mov	x21, x0
	ldr	x0, [x19]
	str	x20, [sp]
Lloh22:
	adrp	x1, l_.str.1@PAGE
Lloh23:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_7:
	bl	_dev_err
LBB0_8:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_KVASER_USB_HYDRA_MIN_TRANSID,4,2 ; @KVASER_USB_HYDRA_MIN_TRANSID
	.comm	_KVASER_USB_HYDRA_MAX_CMD_LEN,4,2 ; @KVASER_USB_HYDRA_MAX_CMD_LEN
	.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
	.comm	_KVASER_USB_HYDRA_TRANSID_CANHE,4,2 ; @KVASER_USB_HYDRA_TRANSID_CANHE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CAN"

l_.str.1:                               ; @.str.1
	.asciz	"CMD_MAP_CHANNEL_REQ failed for CAN%u\n"

	.comm	_KVASER_USB_HYDRA_TRANSID_SYSDBG,4,2 ; @KVASER_USB_HYDRA_TRANSID_SYSDBG
l_.str.2:                               ; @.str.2
	.asciz	"SYSDBG"

l_.str.3:                               ; @.str.3
	.asciz	"CMD_MAP_CHANNEL_REQ failed for SYSDBG\n"

	.no_dead_strip	_kvaser_usb_hydra_init_card
.subsections_via_symbols
