	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qca_uart_probe
_qca_uart_probe:                        ## @qca_uart_probe
	.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, %r15
	movl	$32, %edi
	callq	_alloc_etherdev
	movl	$115200, -44(%rbp)              ## imm = 0x1C200
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_qcauart_netdev_setup
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_SET_NETDEV_DEV
	movq	%r14, %rdi
	callq	_netdev_priv
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r12
	movq	%r14, 8(%rax)
	movq	%r15, 24(%rax)
	leaq	20(%rax), %rdi
	callq	_qcafrm_fsm_init_uart
	movq	%r12, %rdi
	addq	$16, %rdi
	callq	_spin_lock_init
	movq	_qcauart_transmit@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_INIT_WORK
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	leaq	-44(%rbp), %rdx
	callq	_of_property_read_u32
	movl	(%r15), %edi
	callq	_of_get_mac_address
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movq	8(%r12), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_ether_addr_copy
LBB0_6:
	movq	8(%r12), %rax
	movl	(%rax), %edi
	callq	_is_valid_ether_addr
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:
	movq	8(%r12), %rdi
	callq	_eth_hw_addr_random
	movq	8(%r12), %rax
	movl	(%rax), %edx
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_info
LBB0_8:
	movq	8(%r12), %rdi
	callq	_netif_carrier_on
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_serdev_device_set_drvdata
	movq	_qca_serdev_ops@GOTPCREL(%rip), %rsi
	movq	%r15, %rdi
	callq	_serdev_device_set_client_ops
	movq	%r15, %rdi
	callq	_serdev_device_open
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	%eax, %ebx
	movl	4(%r14), %edx
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	jmp	LBB0_12
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_3:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_12
LBB0_10:
	movl	-44(%rbp), %esi
	movq	%r15, %rdi
	callq	_serdev_device_set_baudrate
	movl	%eax, -44(%rbp)
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_dev_info
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_serdev_device_set_flow_control
	movq	%r14, %rdi
	callq	_register_netdev
	testl	%eax, %eax
	je	LBB0_13
## %bb.11:
	movl	%eax, %r13d
	movl	4(%r14), %edx
	leaq	L_.str.5(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	movq	%r15, %rdi
	callq	_serdev_device_close
	movq	%r12, %rdi
	callq	_cancel_work_sync
	movl	%r13d, %ebx
LBB0_12:
	movq	%r14, %rdi
	callq	_free_netdev
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"qca_uart: Fail to retrieve private structure\n"

	.comm	_qcauart_transmit,4,2           ## @qcauart_transmit
L_.str.1:                               ## @.str.1
	.asciz	"current-speed"

L_.str.2:                               ## @.str.2
	.asciz	"Using random MAC address: %pM\n"

	.comm	_qca_serdev_ops,4,2             ## @qca_serdev_ops
L_.str.3:                               ## @.str.3
	.asciz	"Unable to open device %s\n"

L_.str.4:                               ## @.str.4
	.asciz	"Using baudrate: %u\n"

L_.str.5:                               ## @.str.5
	.asciz	"Unable to register net device %s\n"

	.no_dead_strip	_qca_uart_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qca_uart_probe
_qca_uart_probe:                        ; @qca_uart_probe
	.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	x20, x0
	mov	w0, #32
	bl	_alloc_etherdev
	mov	w8, #49664
	movk	w8, #1, lsl #16
	str	w8, [sp, #12]
	cbz	x0, LBB0_8
; %bb.1:
	mov	x19, x0
	bl	_qcauart_netdev_setup
	mov	x0, x19
	mov	x1, x20
	bl	_SET_NETDEV_DEV
	mov	x0, x19
	bl	_netdev_priv
	cbz	x0, LBB0_9
; %bb.2:
	mov	x21, x0
	str	x19, [x0, #8]
	str	x20, [x0, #24]
	add	x0, x0, #20
	bl	_qcafrm_fsm_init_uart
	add	x0, x21, #16
	bl	_spin_lock_init
Lloh0:
	adrp	x8, _qcauart_transmit@GOTPAGE
Lloh1:
	ldr	x8, [x8, _qcauart_transmit@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_INIT_WORK
	ldr	w0, [x20]
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x2, sp, #12
	bl	_of_property_read_u32
	ldr	w0, [x20]
	bl	_of_get_mac_address
	mov	x22, x0
	bl	_IS_ERR
	cbnz	w0, LBB0_4
; %bb.3:
	ldr	x8, [x21, #8]
	ldr	w0, [x8]
	mov	x1, x22
	bl	_ether_addr_copy
LBB0_4:
	ldr	x8, [x21, #8]
	ldr	w0, [x8]
	bl	_is_valid_ether_addr
	cbnz	w0, LBB0_6
; %bb.5:
	ldr	x0, [x21, #8]
	bl	_eth_hw_addr_random
	ldr	x8, [x21, #8]
	ldr	w2, [x8]
Lloh5:
	adrp	x1, l_.str.2@PAGE
Lloh6:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_info
LBB0_6:
	ldr	x0, [x21, #8]
	bl	_netif_carrier_on
	mov	x0, x20
	mov	x1, x21
	bl	_serdev_device_set_drvdata
Lloh7:
	adrp	x1, _qca_serdev_ops@GOTPAGE
Lloh8:
	ldr	x1, [x1, _qca_serdev_ops@GOTPAGEOFF]
	mov	x0, x20
	bl	_serdev_device_set_client_ops
	mov	x0, x20
	bl	_serdev_device_open
	cbz	w0, LBB0_10
; %bb.7:
	mov	x22, x0
	ldr	w2, [x19, #4]
Lloh9:
	adrp	x1, l_.str.3@PAGE
Lloh10:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	b	LBB0_12
LBB0_8:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_13
LBB0_9:
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_12
LBB0_10:
	ldr	w1, [sp, #12]
	mov	x0, x20
	bl	_serdev_device_set_baudrate
	mov	x2, x0
	str	w0, [sp, #12]
Lloh19:
	adrp	x1, l_.str.4@PAGE
Lloh20:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_dev_info
	mov	x0, x20
	mov	w1, #0
	bl	_serdev_device_set_flow_control
	mov	x0, x19
	bl	_register_netdev
	mov	x22, x0
	cbz	w0, LBB0_13
; %bb.11:
	ldr	w2, [x19, #4]
Lloh21:
	adrp	x1, l_.str.5@PAGE
Lloh22:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	mov	x0, x20
	bl	_serdev_device_close
	mov	x0, x21
	bl	_cancel_work_sync
LBB0_12:
	mov	x0, x19
	bl	_free_netdev
LBB0_13:
	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
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"qca_uart: Fail to retrieve private structure\n"

	.comm	_qcauart_transmit,4,2           ; @qcauart_transmit
l_.str.1:                               ; @.str.1
	.asciz	"current-speed"

l_.str.2:                               ; @.str.2
	.asciz	"Using random MAC address: %pM\n"

	.comm	_qca_serdev_ops,4,2             ; @qca_serdev_ops
l_.str.3:                               ; @.str.3
	.asciz	"Unable to open device %s\n"

l_.str.4:                               ; @.str.4
	.asciz	"Using baudrate: %u\n"

l_.str.5:                               ; @.str.5
	.asciz	"Unable to register net device %s\n"

	.no_dead_strip	_qca_uart_probe
.subsections_via_symbols
