	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pciefd_pre_cmd
_pciefd_pre_cmd:                        ## @pciefd_pre_cmd
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	addq	$8, %rdi
	callq	_pucan_cmd_get_opcode
	movl	%eax, %ecx
	andl	$-2, %ecx
	xorl	%eax, %eax
	cmpl	$128, %ecx
	jne	LBB0_4
## %bb.1:
	movl	(%rbx), %ecx
	movq	_CAN_STATE_BUS_OFF@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	je	LBB0_4
## %bb.2:
	movq	(%rbx), %rax
	movl	(%rax), %edi
	movq	_pciefd_irq_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IRQF_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_PCIEFD_DRV_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %r8
	callq	_request_irq
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_pciefd_can_setup_rx_dma
	movq	_CANFD_CTL_IRQ_TL_DEF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	shll	$8, %esi
	movq	_CANFD_CTL_IRQ_CL_DEF@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_PCIEFD_REG_CAN_RX_CTL_WRT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_pciefd_can_writereg
	movq	_CANFD_CTL_RST_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PCIEFD_REG_CAN_RX_CTL_CLR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_pciefd_can_writereg
	movq	_CANFD_MISC_TS_RST@GOTPCREL(%rip), %rax
	xorl	%esi, %esi
	cmpl	$0, (%rax)
	sete	%sil
	movq	_PCIEFD_REG_CAN_MISC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_pciefd_can_writereg
	movq	%rbx, %rdi
	callq	_pciefd_can_ack_rx_dma
	movq	_CANFD_CTL_IEN_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PCIEFD_REG_CAN_RX_CTL_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_pciefd_can_writereg
	xorl	%eax, %eax
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CAN_STATE_BUS_OFF,4,2          ## @CAN_STATE_BUS_OFF
	.comm	_pciefd_irq_handler,4,2         ## @pciefd_irq_handler
	.comm	_IRQF_SHARED,4,2                ## @IRQF_SHARED
	.comm	_PCIEFD_DRV_NAME,4,2            ## @PCIEFD_DRV_NAME
	.comm	_CANFD_CTL_IRQ_TL_DEF,4,2       ## @CANFD_CTL_IRQ_TL_DEF
	.comm	_CANFD_CTL_IRQ_CL_DEF,4,2       ## @CANFD_CTL_IRQ_CL_DEF
	.comm	_PCIEFD_REG_CAN_RX_CTL_WRT,4,2  ## @PCIEFD_REG_CAN_RX_CTL_WRT
	.comm	_CANFD_CTL_RST_BIT,4,2          ## @CANFD_CTL_RST_BIT
	.comm	_PCIEFD_REG_CAN_RX_CTL_CLR,4,2  ## @PCIEFD_REG_CAN_RX_CTL_CLR
	.comm	_CANFD_MISC_TS_RST,4,2          ## @CANFD_MISC_TS_RST
	.comm	_PCIEFD_REG_CAN_MISC,4,2        ## @PCIEFD_REG_CAN_MISC
	.comm	_CANFD_CTL_IEN_BIT,4,2          ## @CANFD_CTL_IEN_BIT
	.comm	_PCIEFD_REG_CAN_RX_CTL_SET,4,2  ## @PCIEFD_REG_CAN_RX_CTL_SET
	.no_dead_strip	_pciefd_pre_cmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pciefd_pre_cmd
_pciefd_pre_cmd:                        ; @pciefd_pre_cmd
	.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	x19, x0
	add	x0, x0, #8
	bl	_pucan_cmd_get_opcode
	and	w8, w0, #0xfffffffe
	cmp	w8, #128
	b.ne	LBB0_4
; %bb.1:
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _CAN_STATE_BUS_OFF@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CAN_STATE_BUS_OFF@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_4
; %bb.2:
	ldr	x8, [x19]
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _pciefd_irq_handler@GOTPAGE
Lloh4:
	ldr	x8, [x8, _pciefd_irq_handler@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _IRQF_SHARED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IRQF_SHARED@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
Lloh9:
	adrp	x8, _PCIEFD_DRV_NAME@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PCIEFD_DRV_NAME@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
	mov	x4, x19
	bl	_request_irq
	cbnz	w0, LBB0_5
; %bb.3:
	mov	x0, x19
	bl	_pciefd_can_setup_rx_dma
Lloh12:
	adrp	x8, _CANFD_CTL_IRQ_TL_DEF@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CANFD_CTL_IRQ_TL_DEF@GOTPAGEOFF]
Lloh14:
	adrp	x9, _CANFD_CTL_IRQ_CL_DEF@GOTPAGE
Lloh15:
	ldr	x9, [x9, _CANFD_CTL_IRQ_CL_DEF@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	ldr	w9, [x9]
	orr	w1, w9, w8, lsl #8
Lloh18:
	adrp	x8, _PCIEFD_REG_CAN_RX_CTL_WRT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PCIEFD_REG_CAN_RX_CTL_WRT@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_pciefd_can_writereg
Lloh21:
	adrp	x8, _CANFD_CTL_RST_BIT@GOTPAGE
Lloh22:
	ldr	x8, [x8, _CANFD_CTL_RST_BIT@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
Lloh24:
	adrp	x8, _PCIEFD_REG_CAN_RX_CTL_CLR@GOTPAGE
Lloh25:
	ldr	x8, [x8, _PCIEFD_REG_CAN_RX_CTL_CLR@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_pciefd_can_writereg
Lloh27:
	adrp	x8, _CANFD_MISC_TS_RST@GOTPAGE
Lloh28:
	ldr	x8, [x8, _CANFD_MISC_TS_RST@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	cmp	w8, #0
	cset	w1, eq
Lloh30:
	adrp	x8, _PCIEFD_REG_CAN_MISC@GOTPAGE
Lloh31:
	ldr	x8, [x8, _PCIEFD_REG_CAN_MISC@GOTPAGEOFF]
Lloh32:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_pciefd_can_writereg
	mov	x0, x19
	bl	_pciefd_can_ack_rx_dma
Lloh33:
	adrp	x8, _CANFD_CTL_IEN_BIT@GOTPAGE
Lloh34:
	ldr	x8, [x8, _CANFD_CTL_IEN_BIT@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
Lloh36:
	adrp	x8, _PCIEFD_REG_CAN_RX_CTL_SET@GOTPAGE
Lloh37:
	ldr	x8, [x8, _PCIEFD_REG_CAN_RX_CTL_SET@GOTPAGEOFF]
Lloh38:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_pciefd_can_writereg
LBB0_4:
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_CAN_STATE_BUS_OFF,4,2          ; @CAN_STATE_BUS_OFF
	.comm	_pciefd_irq_handler,4,2         ; @pciefd_irq_handler
	.comm	_IRQF_SHARED,4,2                ; @IRQF_SHARED
	.comm	_PCIEFD_DRV_NAME,4,2            ; @PCIEFD_DRV_NAME
	.comm	_CANFD_CTL_IRQ_TL_DEF,4,2       ; @CANFD_CTL_IRQ_TL_DEF
	.comm	_CANFD_CTL_IRQ_CL_DEF,4,2       ; @CANFD_CTL_IRQ_CL_DEF
	.comm	_PCIEFD_REG_CAN_RX_CTL_WRT,4,2  ; @PCIEFD_REG_CAN_RX_CTL_WRT
	.comm	_CANFD_CTL_RST_BIT,4,2          ; @CANFD_CTL_RST_BIT
	.comm	_PCIEFD_REG_CAN_RX_CTL_CLR,4,2  ; @PCIEFD_REG_CAN_RX_CTL_CLR
	.comm	_CANFD_MISC_TS_RST,4,2          ; @CANFD_MISC_TS_RST
	.comm	_PCIEFD_REG_CAN_MISC,4,2        ; @PCIEFD_REG_CAN_MISC
	.comm	_CANFD_CTL_IEN_BIT,4,2          ; @CANFD_CTL_IEN_BIT
	.comm	_PCIEFD_REG_CAN_RX_CTL_SET,4,2  ; @PCIEFD_REG_CAN_RX_CTL_SET
	.no_dead_strip	_pciefd_pre_cmd
.subsections_via_symbols
