	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mcs_net_open
_mcs_net_open:                          ## @mcs_net_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	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	callq	_netdev_priv
	movq	%rax, %r15
	movq	24(%rax), %rbx
	movl	52(%rax), %esi
	movq	%rbx, %rdi
	callq	_usb_sndbulkpipe
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_usb_clear_halt
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.1:
	movq	24(%r15), %rbx
	movl	48(%r15), %esi
	movq	%rbx, %rdi
	callq	_usb_rcvbulkpipe
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_usb_clear_halt
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.2:
	movq	%r15, %rdi
	callq	_mcs_setup_transceiver
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	$0, 40(%r15)
	movq	_IRDA_SKB_MAX_MTU@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, 12(%r15)
	callq	_dev_alloc_skb
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_11
## %bb.4:
	movq	%rax, %rdi
	movl	$1, %esi
	callq	_skb_reserve
	movq	(%r15), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r15)
	leaq	32(%r15), %rdi
	callq	_do_gettimeofday
	movq	24(%r15), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	leaq	-64(%rbp), %r12
	movq	%r12, %rdi
	callq	_sprintf
	movq	%r15, %rsi
	addq	$20, %rsi
	movq	%r14, %rdi
	movq	%r12, %rdx
	callq	_irlap_open
	movl	%eax, 16(%r15)
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movq	%r15, %rdi
	callq	_mcs_setup_urbs
	testl	%eax, %eax
	je	LBB0_9
## %bb.7:
	movq	%r15, %rdi
	callq	_mcs_receive_start
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_8
LBB0_9:
	movl	16(%r15), %edi
	callq	_irlap_close
	jmp	LBB0_10
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
	callq	_IRDA_ERROR
LBB0_10:
	movq	(%r15), %rdi
	callq	_kfree_skb
LBB0_11:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_13
## %bb.12:
	movl	%ebx, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%r14, %rdi
	callq	_netif_start_queue
	xorl	%ebx, %ebx
	jmp	LBB0_11
LBB0_13:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_IRDA_SKB_MAX_MTU,4,2           ## @IRDA_SKB_MAX_MTU
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"usb#%d"

L_.str.1:                               ## @.str.1
	.asciz	"mcs7780: irlap_open failed\n"

	.no_dead_strip	_mcs_net_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mcs_net_open
_mcs_net_open:                          ; @mcs_net_open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	bl	_netdev_priv
	mov	x19, x0
	ldr	x21, [x0, #24]
	ldr	w1, [x0, #52]
	mov	x0, x21
	bl	_usb_sndbulkpipe
	mov	x1, x0
	mov	x0, x21
	bl	_usb_clear_halt
	mov	x21, x0
	cbnz	w0, LBB0_10
; %bb.1:
	ldr	x21, [x19, #24]
	ldr	w1, [x19, #48]
	mov	x0, x21
	bl	_usb_rcvbulkpipe
	mov	x1, x0
	mov	x0, x21
	bl	_usb_clear_halt
	mov	x21, x0
	cbnz	w0, LBB0_10
; %bb.2:
	mov	x0, x19
	bl	_mcs_setup_transceiver
	mov	x21, x0
	cbnz	w0, LBB0_10
; %bb.3:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w21, w8
	str	xzr, [x19, #40]
Lloh6:
	adrp	x8, _IRDA_SKB_MAX_MTU@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IRDA_SKB_MAX_MTU@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	str	w0, [x19, #12]
	bl	_dev_alloc_skb
	str	x0, [x19]
	cbz	x0, LBB0_10
; %bb.4:
	mov	w1, #1
	bl	_skb_reserve
	ldr	x8, [x19]
	ldr	w8, [x8]
	str	w8, [x19, #8]
	add	x0, x19, #32
	bl	_do_gettimeofday
	ldr	x8, [x19, #24]
	ldr	w2, [x8]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	add	x0, sp, #8
	bl	_sprintf
	add	x1, x19, #20
	add	x2, sp, #8
	mov	x0, x20
	bl	_irlap_open
	str	w0, [x19, #16]
	cbz	w0, LBB0_8
; %bb.5:
	mov	x0, x19
	bl	_mcs_setup_urbs
	cbz	w0, LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_mcs_receive_start
	mov	x21, x0
	cbz	w0, LBB0_12
LBB0_7:
	ldr	w0, [x19, #16]
	bl	_irlap_close
	b	LBB0_9
LBB0_8:
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_IRDA_ERROR
LBB0_9:
	ldr	x0, [x19]
	bl	_kfree_skb
LBB0_10:
	ldr	x8, [sp, #24]
Lloh13:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_13
; %bb.11:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_12:
	mov	x0, x20
	bl	_netif_start_queue
	b	LBB0_10
LBB0_13:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_IRDA_SKB_MAX_MTU,4,2           ; @IRDA_SKB_MAX_MTU
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"usb#%d"

l_.str.1:                               ; @.str.1
	.asciz	"mcs7780: irlap_open failed\n"

	.no_dead_strip	_mcs_net_open
.subsections_via_symbols
