	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hi3110_open
_hi3110_open:                           ## @hi3110_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	%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
	callq	_netdev_priv
	movq	%rax, %r12
	movq	48(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_IRQF_ONESHOT@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movq	_IRQF_TRIGGER_HIGH@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movq	%r14, %rdi
	callq	_open_candev
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_13
## %bb.1:
	orq	%r15, %r13
	movq	%r12, %rdi
	callq	_mutex_lock
	movl	4(%r12), %edi
	movl	$1, %esi
	callq	_hi3110_power_enable
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%r12)
	movq	$0, 40(%r12)
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movl	(%r15), %edi
	movq	_hi3110_can_ist@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_DEVICE_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	xorl	%esi, %esi
	movq	%r13, %rcx
	movq	%r12, %r9
	callq	_request_threaded_irq
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	%eax, %ebx
	movl	(%r15), %edx
	addq	$4, %r15
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	jmp	LBB0_11
LBB0_3:
	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, 8(%r12)
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	leaq	16(%r12), %rdi
	movq	_hi3110_tx_work_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_WORK
	movq	%r12, %rdi
	addq	$12, %rdi
	movq	_hi3110_restart_work_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_WORK
	movq	%r15, %rdi
	callq	_hi3110_hw_reset
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.6:
	movq	%r14, %rdi
	callq	_hi3110_setup
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.7:
	movq	%r15, %rdi
	callq	_hi3110_set_normal_mode
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_8
LBB0_9:
	movl	8(%r12), %edi
	callq	_destroy_workqueue
	jmp	LBB0_10
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_10:
	movl	(%r15), %edi
	movq	%r12, %rsi
	callq	_free_irq
	movq	%r15, %rdi
	callq	_hi3110_hw_sleep
LBB0_11:
	movl	4(%r12), %edi
	xorl	%esi, %esi
	callq	_hi3110_power_enable
	movq	%r14, %rdi
	callq	_close_candev
LBB0_12:
	movq	%r12, %rdi
	callq	_mutex_unlock
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_CAN_LED_EVENT_OPEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_can_led_event
	movq	%r14, %rdi
	callq	_netif_wake_queue
	xorl	%ebx, %ebx
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_IRQF_ONESHOT,8,3               ## @IRQF_ONESHOT
	.comm	_IRQF_TRIGGER_HIGH,8,3          ## @IRQF_TRIGGER_HIGH
	.comm	_hi3110_can_ist,4,2             ## @hi3110_can_ist
	.comm	_DEVICE_NAME,4,2                ## @DEVICE_NAME
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to acquire irq %d\n"

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

	.comm	_WQ_FREEZABLE,4,2               ## @WQ_FREEZABLE
	.comm	_WQ_MEM_RECLAIM,4,2             ## @WQ_MEM_RECLAIM
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_hi3110_tx_work_handler,4,2     ## @hi3110_tx_work_handler
	.comm	_hi3110_restart_work_handler,4,2 ## @hi3110_restart_work_handler
	.comm	_CAN_LED_EVENT_OPEN,4,2         ## @CAN_LED_EVENT_OPEN
	.no_dead_strip	_hi3110_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hi3110_open
_hi3110_open:                           ; @hi3110_open
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x0
	bl	_netdev_priv
	mov	x19, x0
	ldr	x21, [x0, #48]
Lloh0:
	adrp	x8, _IRQF_ONESHOT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IRQF_ONESHOT@GOTPAGEOFF]
Lloh2:
	ldr	x23, [x8]
Lloh3:
	adrp	x8, _IRQF_TRIGGER_HIGH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IRQF_TRIGGER_HIGH@GOTPAGEOFF]
Lloh5:
	ldr	x24, [x8]
	mov	x0, x20
	bl	_open_candev
	mov	x22, x0
	cbnz	w0, LBB0_12
; %bb.1:
	orr	x22, x24, x23
	mov	x0, x19
	bl	_mutex_lock
	ldr	w0, [x19, #4]
	mov	w1, #1
	bl	_hi3110_power_enable
	stp	xzr, xzr, [x19, #32]
	str	xzr, [x19, #24]
	ldr	w0, [x21]
Lloh6:
	adrp	x8, _hi3110_can_ist@GOTPAGE
Lloh7:
	ldr	x8, [x8, _hi3110_can_ist@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
Lloh9:
	adrp	x8, _DEVICE_NAME@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DEVICE_NAME@GOTPAGEOFF]
Lloh11:
	ldr	w4, [x8]
	mov	x1, #0
	mov	x3, x22
	mov	x5, x19
	bl	_request_threaded_irq
	cbz	w0, LBB0_3
; %bb.2:
	mov	x22, x0
	ldr	w2, [x21], #4
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_err
	b	LBB0_10
LBB0_3:
Lloh14:
	adrp	x8, _WQ_FREEZABLE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _WQ_FREEZABLE@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x9, _WQ_MEM_RECLAIM@GOTPAGE
Lloh18:
	ldr	x9, [x9, _WQ_MEM_RECLAIM@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w1, w9, w8
Lloh20:
	adrp	x0, l_.str.1@PAGE
Lloh21:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	w2, #0
	bl	_alloc_workqueue
	str	w0, [x19, #8]
	cbz	w0, LBB0_8
; %bb.4:
	add	x0, x19, #16
Lloh22:
	adrp	x8, _hi3110_tx_work_handler@GOTPAGE
Lloh23:
	ldr	x8, [x8, _hi3110_tx_work_handler@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	bl	_INIT_WORK
	add	x0, x19, #12
Lloh25:
	adrp	x8, _hi3110_restart_work_handler@GOTPAGE
Lloh26:
	ldr	x8, [x8, _hi3110_restart_work_handler@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	bl	_INIT_WORK
	mov	x0, x21
	bl	_hi3110_hw_reset
	mov	x22, x0
	cbnz	w0, LBB0_7
; %bb.5:
	mov	x0, x20
	bl	_hi3110_setup
	mov	x22, x0
	cbnz	w0, LBB0_7
; %bb.6:
	mov	x0, x21
	bl	_hi3110_set_normal_mode
	mov	x22, x0
	cbz	w0, LBB0_13
LBB0_7:
	ldr	w0, [x19, #8]
	bl	_destroy_workqueue
	b	LBB0_9
LBB0_8:
Lloh28:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_9:
	ldr	w0, [x21]
	mov	x1, x19
	bl	_free_irq
	mov	x0, x21
	bl	_hi3110_hw_sleep
LBB0_10:
	ldr	w0, [x19, #4]
	mov	w1, #0
	bl	_hi3110_power_enable
	mov	x0, x20
	bl	_close_candev
LBB0_11:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_12:
	mov	x0, x22
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_13:
Lloh31:
	adrp	x8, _CAN_LED_EVENT_OPEN@GOTPAGE
Lloh32:
	ldr	x8, [x8, _CAN_LED_EVENT_OPEN@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_can_led_event
	mov	x0, x20
	bl	_netif_wake_queue
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_IRQF_ONESHOT,8,3               ; @IRQF_ONESHOT
	.comm	_IRQF_TRIGGER_HIGH,8,3          ; @IRQF_TRIGGER_HIGH
	.comm	_hi3110_can_ist,4,2             ; @hi3110_can_ist
	.comm	_DEVICE_NAME,4,2                ; @DEVICE_NAME
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to acquire irq %d\n"

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

	.comm	_WQ_FREEZABLE,4,2               ; @WQ_FREEZABLE
	.comm	_WQ_MEM_RECLAIM,4,2             ; @WQ_MEM_RECLAIM
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_hi3110_tx_work_handler,4,2     ; @hi3110_tx_work_handler
	.comm	_hi3110_restart_work_handler,4,2 ; @hi3110_restart_work_handler
	.comm	_CAN_LED_EVENT_OPEN,4,2         ; @CAN_LED_EVENT_OPEN
	.no_dead_strip	_hi3110_open
.subsections_via_symbols
