	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function m_can_open
_m_can_open:                            ## @m_can_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_netdev_priv
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_m_can_clk_start
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_16
## %bb.1:
	movq	%r15, %rdi
	callq	_open_candev
	testl	%eax, %eax
	je	LBB0_4
## %bb.2:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_netdev_err
	jmp	LBB0_3
LBB0_4:
	cmpq	$0, 8(%r14)
	je	LBB0_9
## %bb.5:
	movq	$0, 24(%r14)
	movq	_WQ_FREEZABLE@GOTPCREL(%rip), %rax
	movq	_WQ_MEM_RECLAIM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	callq	_alloc_workqueue
	movl	%eax, (%r14)
	testl	%eax, %eax
	je	LBB0_6
## %bb.8:
	leaq	20(%r14), %rdi
	movq	_m_can_tx_work_queue@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_WORK
	movl	(%r15), %r8d
	movl	4(%r15), %edi
	movq	_m_can_isr@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_IRQF_ONESHOT@GOTPCREL(%rip), %rax
	movq	_IRQF_TRIGGER_FALLING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	xorl	%esi, %esi
	movq	%r15, %r9
	callq	_request_threaded_irq
	jmp	LBB0_10
LBB0_9:
	movl	(%r15), %ecx
	movl	4(%r15), %edi
	movq	_m_can_isr@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IRQF_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %r8
	callq	_request_irq
LBB0_10:
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_11
## %bb.13:
	movq	%r15, %rdi
	callq	_m_can_start
	movq	_CAN_LED_EVENT_OPEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_can_led_event
	cmpq	$0, 8(%r14)
	jne	LBB0_15
## %bb.14:
	addq	$16, %r14
	movq	%r14, %rdi
	callq	_napi_enable
LBB0_15:
	movq	%r15, %rdi
	callq	_netif_start_queue
	xorl	%ebx, %ebx
	jmp	LBB0_16
LBB0_11:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_netdev_err
	cmpq	$0, 8(%r14)
	je	LBB0_7
## %bb.12:
	movl	(%r14), %edi
	callq	_destroy_workqueue
	jmp	LBB0_7
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_7:
	movq	%r15, %rdi
	callq	_close_candev
LBB0_3:
	movq	%r14, %rdi
	callq	_m_can_clk_stop
LBB0_16:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to open can device\n"

L_.str.1:                               ## @.str.1
	.asciz	"mcan_wq"

	.comm	_WQ_FREEZABLE,4,2               ## @WQ_FREEZABLE
	.comm	_WQ_MEM_RECLAIM,4,2             ## @WQ_MEM_RECLAIM
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_m_can_tx_work_queue,4,2        ## @m_can_tx_work_queue
	.comm	_m_can_isr,4,2                  ## @m_can_isr
	.comm	_IRQF_ONESHOT,4,2               ## @IRQF_ONESHOT
	.comm	_IRQF_TRIGGER_FALLING,4,2       ## @IRQF_TRIGGER_FALLING
	.comm	_IRQF_SHARED,4,2                ## @IRQF_SHARED
L_.str.2:                               ## @.str.2
	.asciz	"failed to request interrupt\n"

	.comm	_CAN_LED_EVENT_OPEN,4,2         ## @CAN_LED_EVENT_OPEN
	.no_dead_strip	_m_can_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function m_can_open
_m_can_open:                            ; @m_can_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	x20, x0
	bl	_netdev_priv
	mov	x19, x0
	bl	_m_can_clk_start
	mov	x21, x0
	cbnz	w0, LBB0_15
; %bb.1:
	mov	x0, x20
	bl	_open_candev
	cbz	w0, LBB0_3
; %bb.2:
	mov	x21, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_netdev_err
	b	LBB0_14
LBB0_3:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_9
; %bb.4:
Lloh2:
	adrp	x8, _WQ_FREEZABLE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _WQ_FREEZABLE@GOTPAGEOFF]
	str	xzr, [x19, #24]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _WQ_MEM_RECLAIM@GOTPAGE
Lloh6:
	ldr	x9, [x9, _WQ_MEM_RECLAIM@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w1, w9, w8
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	w2, #0
	bl	_alloc_workqueue
	str	w0, [x19]
	cbz	w0, LBB0_12
; %bb.5:
	add	x0, x19, #20
Lloh10:
	adrp	x8, _m_can_tx_work_queue@GOTPAGE
Lloh11:
	ldr	x8, [x8, _m_can_tx_work_queue@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	bl	_INIT_WORK
Lloh13:
	adrp	x8, _m_can_isr@GOTPAGE
Lloh14:
	ldr	x8, [x8, _m_can_isr@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
Lloh16:
	adrp	x8, _IRQF_ONESHOT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _IRQF_ONESHOT@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
Lloh19:
	adrp	x9, _IRQF_TRIGGER_FALLING@GOTPAGE
Lloh20:
	ldr	x9, [x9, _IRQF_TRIGGER_FALLING@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	orr	w3, w9, w8
	ldp	w4, w0, [x20]
	mov	x1, #0
	mov	x5, x20
	bl	_request_threaded_irq
	mov	x21, x0
	tbnz	w0, #31, LBB0_10
LBB0_6:
	mov	x0, x20
	bl	_m_can_start
Lloh22:
	adrp	x8, _CAN_LED_EVENT_OPEN@GOTPAGE
Lloh23:
	ldr	x8, [x8, _CAN_LED_EVENT_OPEN@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_can_led_event
	ldr	x8, [x19, #8]
	cbnz	x8, LBB0_8
; %bb.7:
	add	x0, x19, #16
	bl	_napi_enable
LBB0_8:
	mov	x0, x20
	bl	_netif_start_queue
	mov	w21, #0
	b	LBB0_15
LBB0_9:
Lloh25:
	adrp	x8, _m_can_isr@GOTPAGE
Lloh26:
	ldr	x8, [x8, _m_can_isr@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
Lloh28:
	adrp	x8, _IRQF_SHARED@GOTPAGE
Lloh29:
	ldr	x8, [x8, _IRQF_SHARED@GOTPAGEOFF]
Lloh30:
	ldr	w2, [x8]
	ldp	w3, w0, [x20]
	mov	x4, x20
	bl	_request_irq
	mov	x21, x0
	tbz	w0, #31, LBB0_6
LBB0_10:
Lloh31:
	adrp	x1, l_.str.2@PAGE
Lloh32:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_netdev_err
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_13
; %bb.11:
	ldr	w0, [x19]
	bl	_destroy_workqueue
	b	LBB0_13
LBB0_12:
Lloh33:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh34:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_13:
	mov	x0, x20
	bl	_close_candev
LBB0_14:
	mov	x0, x19
	bl	_m_can_clk_stop
LBB0_15:
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to open can device\n"

l_.str.1:                               ; @.str.1
	.asciz	"mcan_wq"

	.comm	_WQ_FREEZABLE,4,2               ; @WQ_FREEZABLE
	.comm	_WQ_MEM_RECLAIM,4,2             ; @WQ_MEM_RECLAIM
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_m_can_tx_work_queue,4,2        ; @m_can_tx_work_queue
	.comm	_m_can_isr,4,2                  ; @m_can_isr
	.comm	_IRQF_ONESHOT,4,2               ; @IRQF_ONESHOT
	.comm	_IRQF_TRIGGER_FALLING,4,2       ; @IRQF_TRIGGER_FALLING
	.comm	_IRQF_SHARED,4,2                ; @IRQF_SHARED
l_.str.2:                               ; @.str.2
	.asciz	"failed to request interrupt\n"

	.comm	_CAN_LED_EVENT_OPEN,4,2         ; @CAN_LED_EVENT_OPEN
	.no_dead_strip	_m_can_open
.subsections_via_symbols
