	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sun4ican_open
_sun4ican_open:                         ## @sun4ican_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, %r14
	callq	_netdev_priv
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	_open_candev
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.1:
	movq	_sun4i_can_interrupt@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edi
	movl	4(%r14), %ecx
	xorl	%edx, %edx
	movq	%r14, %r8
	callq	_request_irq
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_netdev_err
	jmp	LBB0_8
LBB0_3:
	movl	(%r15), %edi
	callq	_clk_prepare_enable
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_netdev_err
	jmp	LBB0_7
LBB0_5:
	movq	%r14, %rdi
	callq	_sun4i_can_start
	testl	%eax, %eax
	je	LBB0_10
## %bb.6:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_netdev_err
	movl	(%r15), %edi
	callq	_clk_disable_unprepare
LBB0_7:
	movl	(%r14), %edi
	movq	%r14, %rsi
	callq	_free_irq
LBB0_8:
	movq	%r14, %rdi
	callq	_close_candev
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_CAN_LED_EVENT_OPEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_can_led_event
	movq	%r14, %rdi
	callq	_netif_start_queue
	xorl	%ebx, %ebx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_sun4i_can_interrupt,4,2        ## @sun4i_can_interrupt
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"request_irq err: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"could not enable CAN peripheral clock\n"

L_.str.2:                               ## @.str.2
	.asciz	"could not start CAN peripheral\n"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sun4ican_open
_sun4ican_open:                         ; @sun4ican_open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x0
	mov	x0, x19
	bl	_open_candev
	mov	x20, x0
	cbnz	w0, LBB0_9
; %bb.1:
Lloh0:
	adrp	x8, _sun4i_can_interrupt@GOTPAGE
Lloh1:
	ldr	x8, [x8, _sun4i_can_interrupt@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldp	w0, w3, [x19]
	mov	w2, #0
	mov	x4, x19
	bl	_request_irq
	cbz	w0, LBB0_3
; %bb.2:
	mov	x20, x0
	str	x20, [sp]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_netdev_err
	b	LBB0_8
LBB0_3:
	ldr	w0, [x21]
	bl	_clk_prepare_enable
	cbz	w0, LBB0_5
; %bb.4:
	mov	x20, x0
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_netdev_err
	b	LBB0_7
LBB0_5:
	mov	x0, x19
	bl	_sun4i_can_start
	mov	x20, x0
	cbz	w0, LBB0_10
; %bb.6:
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_netdev_err
	ldr	w0, [x21]
	bl	_clk_disable_unprepare
LBB0_7:
	ldr	w0, [x19]
	mov	x1, x19
	bl	_free_irq
LBB0_8:
	mov	x0, x19
	bl	_close_candev
LBB0_9:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_10:
Lloh9:
	adrp	x8, _CAN_LED_EVENT_OPEN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CAN_LED_EVENT_OPEN@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_can_led_event
	mov	x0, x19
	bl	_netif_start_queue
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_sun4i_can_interrupt,4,2        ; @sun4i_can_interrupt
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"request_irq err: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"could not enable CAN peripheral clock\n"

l_.str.2:                               ; @.str.2
	.asciz	"could not start CAN peripheral\n"

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