	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hi3110_set_normal_mode
_hi3110_set_normal_mode:                ## @hi3110_set_normal_mode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	callq	_spi_get_drvdata
	movq	%rax, %r14
	movq	_HI3110_WRITE_INTE@GOTPCREL(%rip), %rax
	movq	_HI3110_INT_BUSERR@GOTPCREL(%rip), %rcx
	movq	_HI3110_INT_RXFIFO@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movl	(%rax), %esi
	movq	_HI3110_INT_TXCPLT@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_hi3110_write
	movq	_HI3110_WRITE_CTRL1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HI3110_CTRL1_TXEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_hi3110_write
	movl	(%r14), %ecx
	movq	_CAN_CTRLMODE_LOOPBACK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%ecx, %eax
	movq	_CAN_CTRLMODE_LISTENONLY@GOTPCREL(%rip), %rdx
	andl	(%rdx), %ecx
	jne	LBB0_1
## %bb.2:
	movq	_HI3110_CTRL0_NORMAL_MODE@GOTPCREL(%rip), %rcx
	testl	%eax, %eax
	jne	LBB0_4
	jmp	LBB0_5
LBB0_1:
	movq	_HI3110_CTRL0_MONITOR_MODE@GOTPCREL(%rip), %rcx
	testl	%eax, %eax
	je	LBB0_5
LBB0_4:
	movq	_HI3110_CTRL0_LOOPBACK_MODE@GOTPCREL(%rip), %rcx
LBB0_5:
	movl	(%rcx), %edx
	movq	_HI3110_WRITE_CTRL0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_hi3110_write
	movq	_HI3110_OST_DELAY_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_mdelay
	movq	_HI3110_READ_CTRL0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_hi3110_read
	movq	_HI3110_CTRL0_MODE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	testl	%ecx, %eax
	jne	LBB0_6
## %bb.7:
	movq	_CAN_STATE_ERROR_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r14)
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_6:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HI3110_WRITE_INTE,4,2          ## @HI3110_WRITE_INTE
	.comm	_HI3110_INT_BUSERR,4,2          ## @HI3110_INT_BUSERR
	.comm	_HI3110_INT_RXFIFO,4,2          ## @HI3110_INT_RXFIFO
	.comm	_HI3110_INT_TXCPLT,4,2          ## @HI3110_INT_TXCPLT
	.comm	_HI3110_WRITE_CTRL1,4,2         ## @HI3110_WRITE_CTRL1
	.comm	_HI3110_CTRL1_TXEN,4,2          ## @HI3110_CTRL1_TXEN
	.comm	_CAN_CTRLMODE_LOOPBACK,4,2      ## @CAN_CTRLMODE_LOOPBACK
	.comm	_HI3110_CTRL0_LOOPBACK_MODE,4,2 ## @HI3110_CTRL0_LOOPBACK_MODE
	.comm	_CAN_CTRLMODE_LISTENONLY,4,2    ## @CAN_CTRLMODE_LISTENONLY
	.comm	_HI3110_CTRL0_MONITOR_MODE,4,2  ## @HI3110_CTRL0_MONITOR_MODE
	.comm	_HI3110_CTRL0_NORMAL_MODE,4,2   ## @HI3110_CTRL0_NORMAL_MODE
	.comm	_HI3110_WRITE_CTRL0,4,2         ## @HI3110_WRITE_CTRL0
	.comm	_HI3110_OST_DELAY_MS,4,2        ## @HI3110_OST_DELAY_MS
	.comm	_HI3110_READ_CTRL0,4,2          ## @HI3110_READ_CTRL0
	.comm	_HI3110_CTRL0_MODE_MASK,4,2     ## @HI3110_CTRL0_MODE_MASK
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_CAN_STATE_ERROR_ACTIVE,4,2     ## @CAN_STATE_ERROR_ACTIVE
	.no_dead_strip	_hi3110_set_normal_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hi3110_set_normal_mode
_hi3110_set_normal_mode:                ; @hi3110_set_normal_mode
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
	bl	_spi_get_drvdata
	mov	x19, x0
Lloh0:
	adrp	x8, _HI3110_WRITE_INTE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HI3110_WRITE_INTE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _HI3110_INT_BUSERR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HI3110_INT_BUSERR@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _HI3110_INT_RXFIFO@GOTPAGE
Lloh7:
	ldr	x9, [x9, _HI3110_INT_RXFIFO@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh9:
	adrp	x9, _HI3110_INT_TXCPLT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _HI3110_INT_TXCPLT@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w2, w8, w9
	mov	x0, x20
	bl	_hi3110_write
Lloh12:
	adrp	x8, _HI3110_WRITE_CTRL1@GOTPAGE
Lloh13:
	ldr	x8, [x8, _HI3110_WRITE_CTRL1@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x8, _HI3110_CTRL1_TXEN@GOTPAGE
Lloh16:
	ldr	x8, [x8, _HI3110_CTRL1_TXEN@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_hi3110_write
	ldr	w8, [x19]
Lloh18:
	adrp	x9, _CAN_CTRLMODE_LOOPBACK@GOTPAGE
Lloh19:
	ldr	x9, [x9, _CAN_CTRLMODE_LOOPBACK@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
Lloh21:
	adrp	x10, _CAN_CTRLMODE_LISTENONLY@GOTPAGE
Lloh22:
	ldr	x10, [x10, _CAN_CTRLMODE_LISTENONLY@GOTPAGEOFF]
Lloh23:
	ldr	w10, [x10]
Lloh24:
	adrp	x11, _HI3110_CTRL0_NORMAL_MODE@GOTPAGE
Lloh25:
	ldr	x11, [x11, _HI3110_CTRL0_NORMAL_MODE@GOTPAGEOFF]
Lloh26:
	adrp	x12, _HI3110_CTRL0_MONITOR_MODE@GOTPAGE
Lloh27:
	ldr	x12, [x12, _HI3110_CTRL0_MONITOR_MODE@GOTPAGEOFF]
	tst	w10, w8
	csel	x10, x11, x12, eq
Lloh28:
	adrp	x11, _HI3110_CTRL0_LOOPBACK_MODE@GOTPAGE
Lloh29:
	ldr	x11, [x11, _HI3110_CTRL0_LOOPBACK_MODE@GOTPAGEOFF]
	tst	w9, w8
	csel	x8, x10, x11, eq
	ldr	w2, [x8]
Lloh30:
	adrp	x8, _HI3110_WRITE_CTRL0@GOTPAGE
Lloh31:
	ldr	x8, [x8, _HI3110_WRITE_CTRL0@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_hi3110_write
Lloh33:
	adrp	x8, _HI3110_OST_DELAY_MS@GOTPAGE
Lloh34:
	ldr	x8, [x8, _HI3110_OST_DELAY_MS@GOTPAGEOFF]
Lloh35:
	ldr	w0, [x8]
	bl	_mdelay
Lloh36:
	adrp	x8, _HI3110_READ_CTRL0@GOTPAGE
Lloh37:
	ldr	x8, [x8, _HI3110_READ_CTRL0@GOTPAGEOFF]
Lloh38:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_hi3110_read
Lloh39:
	adrp	x8, _HI3110_CTRL0_MODE_MASK@GOTPAGE
Lloh40:
	ldr	x8, [x8, _HI3110_CTRL0_MODE_MASK@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
	bics	wzr, w0, w8
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #0
Lloh42:
	adrp	x8, _CAN_STATE_ERROR_ACTIVE@GOTPAGE
Lloh43:
	ldr	x8, [x8, _CAN_STATE_ERROR_ACTIVE@GOTPAGEOFF]
Lloh44:
	ldr	w8, [x8]
	str	w8, [x19, #4]
	b	LBB0_3
LBB0_2:
Lloh45:
	adrp	x8, _EBUSY@GOTPAGE
Lloh46:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh47:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.cfi_endproc
                                        ; -- End function
	.comm	_HI3110_WRITE_INTE,4,2          ; @HI3110_WRITE_INTE
	.comm	_HI3110_INT_BUSERR,4,2          ; @HI3110_INT_BUSERR
	.comm	_HI3110_INT_RXFIFO,4,2          ; @HI3110_INT_RXFIFO
	.comm	_HI3110_INT_TXCPLT,4,2          ; @HI3110_INT_TXCPLT
	.comm	_HI3110_WRITE_CTRL1,4,2         ; @HI3110_WRITE_CTRL1
	.comm	_HI3110_CTRL1_TXEN,4,2          ; @HI3110_CTRL1_TXEN
	.comm	_CAN_CTRLMODE_LOOPBACK,4,2      ; @CAN_CTRLMODE_LOOPBACK
	.comm	_HI3110_CTRL0_LOOPBACK_MODE,4,2 ; @HI3110_CTRL0_LOOPBACK_MODE
	.comm	_CAN_CTRLMODE_LISTENONLY,4,2    ; @CAN_CTRLMODE_LISTENONLY
	.comm	_HI3110_CTRL0_MONITOR_MODE,4,2  ; @HI3110_CTRL0_MONITOR_MODE
	.comm	_HI3110_CTRL0_NORMAL_MODE,4,2   ; @HI3110_CTRL0_NORMAL_MODE
	.comm	_HI3110_WRITE_CTRL0,4,2         ; @HI3110_WRITE_CTRL0
	.comm	_HI3110_OST_DELAY_MS,4,2        ; @HI3110_OST_DELAY_MS
	.comm	_HI3110_READ_CTRL0,4,2          ; @HI3110_READ_CTRL0
	.comm	_HI3110_CTRL0_MODE_MASK,4,2     ; @HI3110_CTRL0_MODE_MASK
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_CAN_STATE_ERROR_ACTIVE,4,2     ; @CAN_STATE_ERROR_ACTIVE
	.no_dead_strip	_hi3110_set_normal_mode
.subsections_via_symbols
