	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function peak_canfd_open
_peak_canfd_open:                       ## @peak_canfd_open
	.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
	movq	%rdi, %r15
	callq	_netdev_priv
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	_open_candev
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_netdev_err
	jmp	LBB0_16
LBB0_2:
	movq	%r14, %rdi
	callq	_pucan_set_reset_mode
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_3
LBB0_15:
	movq	%r15, %rdi
	callq	_close_candev
LBB0_16:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	(%r14), %eax
	movq	_CAN_CTRLMODE_FD@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_8
## %bb.4:
	movq	_CAN_CTRLMODE_FD_NON_ISO@GOTPCREL(%rip), %rcx
	movq	_PUCAN_OPTION_CANDFDISO@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	testl	%eax, (%rcx)
	je	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	callq	_pucan_clr_options
	jmp	LBB0_7
LBB0_6:
	movq	%r14, %rdi
	callq	_pucan_set_options
LBB0_7:
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_15
LBB0_8:
	movq	_PUCAN_OPTION_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_pucan_set_options
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_15
## %bb.9:
	movq	_PUCAN_FLTSTD_ROW_IDX_MAX@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	js	LBB0_12
## %bb.10:
	movl	$-1, %ebx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	incl	%ebx
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	$-1, %edx
	callq	_pucan_set_std_filter
	cmpl	(%r12), %ebx
	jl	LBB0_11
LBB0_12:
	movq	%r14, %rdi
	callq	_peak_canfd_start
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_15
## %bb.13:
	movq	%r14, %rdi
	callq	_pucan_setup_rx_barrier
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_15
## %bb.14:
	xorl	%ebx, %ebx
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"open_candev() failed, error %d\n"

	.comm	_CAN_CTRLMODE_FD,4,2            ## @CAN_CTRLMODE_FD
	.comm	_CAN_CTRLMODE_FD_NON_ISO,4,2    ## @CAN_CTRLMODE_FD_NON_ISO
	.comm	_PUCAN_OPTION_CANDFDISO,4,2     ## @PUCAN_OPTION_CANDFDISO
	.comm	_PUCAN_OPTION_ERROR,4,2         ## @PUCAN_OPTION_ERROR
	.comm	_PUCAN_FLTSTD_ROW_IDX_MAX,4,2   ## @PUCAN_FLTSTD_ROW_IDX_MAX
	.no_dead_strip	_peak_canfd_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function peak_canfd_open
_peak_canfd_open:                       ; @peak_canfd_open
	.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	x19, x0
	bl	_netdev_priv
	mov	x20, x0
	mov	x0, x19
	bl	_open_candev
	cbz	w0, LBB0_2
; %bb.1:
	mov	x21, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_netdev_err
	b	LBB0_4
LBB0_2:
	mov	x0, x20
	bl	_pucan_set_reset_mode
	mov	x21, x0
	cbz	w0, LBB0_5
LBB0_3:
	mov	x0, x19
	bl	_close_candev
LBB0_4:
	mov	x0, x21
	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
LBB0_5:
	ldr	w8, [x20]
Lloh2:
	adrp	x9, _CAN_CTRLMODE_FD@GOTPAGE
Lloh3:
	ldr	x9, [x9, _CAN_CTRLMODE_FD@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.6:
Lloh5:
	adrp	x9, _CAN_CTRLMODE_FD_NON_ISO@GOTPAGE
Lloh6:
	ldr	x9, [x9, _CAN_CTRLMODE_FD_NON_ISO@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
Lloh8:
	adrp	x10, _PUCAN_OPTION_CANDFDISO@GOTPAGE
Lloh9:
	ldr	x10, [x10, _PUCAN_OPTION_CANDFDISO@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x10]
	mov	x0, x20
	tst	w9, w8
	b.eq	LBB0_8
; %bb.7:
	bl	_pucan_clr_options
	mov	x21, x0
	cbnz	w0, LBB0_3
	b	LBB0_9
LBB0_8:
	bl	_pucan_set_options
	mov	x21, x0
	cbnz	w0, LBB0_3
LBB0_9:
Lloh11:
	adrp	x8, _PUCAN_OPTION_ERROR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PUCAN_OPTION_ERROR@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_pucan_set_options
	mov	x21, x0
	cbnz	w0, LBB0_3
; %bb.10:
Lloh14:
	adrp	x22, _PUCAN_FLTSTD_ROW_IDX_MAX@GOTPAGE
Lloh15:
	ldr	x22, [x22, _PUCAN_FLTSTD_ROW_IDX_MAX@GOTPAGEOFF]
	ldr	w8, [x22]
	tbnz	w8, #31, LBB0_13
; %bb.11:
	mov	w21, #-1
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	add	w21, w21, #1
	mov	x0, x20
	mov	x1, x21
	mov	w2, #-1
	bl	_pucan_set_std_filter
	ldr	w8, [x22]
	cmp	w21, w8
	b.lt	LBB0_12
LBB0_13:
	mov	x0, x20
	bl	_peak_canfd_start
	mov	x21, x0
	cbnz	w0, LBB0_3
; %bb.14:
	mov	x0, x20
	bl	_pucan_setup_rx_barrier
	mov	x21, x0
	cbnz	w0, LBB0_3
	b	LBB0_4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"open_candev() failed, error %d\n"

	.comm	_CAN_CTRLMODE_FD,4,2            ; @CAN_CTRLMODE_FD
	.comm	_CAN_CTRLMODE_FD_NON_ISO,4,2    ; @CAN_CTRLMODE_FD_NON_ISO
	.comm	_PUCAN_OPTION_CANDFDISO,4,2     ; @PUCAN_OPTION_CANDFDISO
	.comm	_PUCAN_OPTION_ERROR,4,2         ; @PUCAN_OPTION_ERROR
	.comm	_PUCAN_FLTSTD_ROW_IDX_MAX,4,2   ; @PUCAN_FLTSTD_ROW_IDX_MAX
	.no_dead_strip	_peak_canfd_open
.subsections_via_symbols
