	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sa1100_irda_start
_sa1100_irda_start:                     ## @sa1100_irda_start
	.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, %r12
	callq	_netdev_priv
	movq	%rax, %r14
	movl	$9600, (%rax)                   ## imm = 0x2580
	movq	_sa1100_irda_irq@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %edi
	movl	4(%r12), %ecx
	xorl	%edx, %edx
	movq	%r12, %r8
	callq	_request_irq
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.1:
	movq	_DMA_Ser2HSSPRd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	8(%r14), %r15
	leaq	L_.str(%rip), %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movq	%r15, %r8
	callq	_sa1100_request_dma
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.2:
	movq	_DMA_Ser2HSSPWr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_sa1100_irda_txdma_irq@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	leaq	12(%r14), %r13
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rcx
	movq	%r13, %r8
	callq	_sa1100_request_dma
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.3:
	movl	(%r12), %edi
	callq	_disable_irq
	movq	%r14, %rdi
	callq	_sa1100_irda_startup
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_4
LBB0_7:
	movl	(%r13), %edi
	callq	_sa1100_free_dma
LBB0_8:
	movl	(%r15), %edi
	callq	_sa1100_free_dma
LBB0_9:
	movl	(%r12), %edi
	movq	%r12, %rsi
	callq	_free_irq
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%r14, %rsi
	addq	$20, %rsi
	leaq	L_.str.2(%rip), %rdx
	movq	%r12, %rdi
	callq	_irlap_open
	movl	%eax, 16(%r14)
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	$1, 4(%r14)
	movq	_power_level@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_sa1100_set_power
	movl	(%r12), %edi
	callq	_enable_irq
	movq	%r12, %rdi
	callq	_netif_start_queue
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movl	$0, 4(%r14)
	movq	%r14, %rdi
	callq	_sa1100_irda_shutdown
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_sa1100_irda_irq,4,2            ## @sa1100_irda_irq
	.comm	_DMA_Ser2HSSPRd,4,2             ## @DMA_Ser2HSSPRd
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"IrDA receive"

	.comm	_DMA_Ser2HSSPWr,4,2             ## @DMA_Ser2HSSPWr
L_.str.1:                               ## @.str.1
	.asciz	"IrDA transmit"

	.comm	_sa1100_irda_txdma_irq,8,3      ## @sa1100_irda_txdma_irq
L_.str.2:                               ## @.str.2
	.asciz	"sa1100"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_power_level,4,2                ## @power_level
	.no_dead_strip	_sa1100_irda_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sa1100_irda_start
_sa1100_irda_start:                     ; @sa1100_irda_start
	.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	x19, x0
	bl	_netdev_priv
	mov	x20, x0
	mov	w8, #9600
	str	w8, [x0]
Lloh0:
	adrp	x8, _sa1100_irda_irq@GOTPAGE
Lloh1:
	ldr	x8, [x8, _sa1100_irda_irq@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldp	w0, w3, [x19]
	mov	w2, #0
	mov	x4, x19
	bl	_request_irq
	mov	x23, x0
	cbnz	w0, LBB0_7
; %bb.1:
Lloh3:
	adrp	x8, _DMA_Ser2HSSPRd@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DMA_Ser2HSSPRd@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	add	x21, x20, #8
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, #0
	mov	x3, #0
	mov	x4, x21
	bl	_sa1100_request_dma
	mov	x23, x0
	cbnz	w0, LBB0_6
; %bb.2:
Lloh8:
	adrp	x8, _DMA_Ser2HSSPWr@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DMA_Ser2HSSPWr@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x8, _sa1100_irda_txdma_irq@GOTPAGE
Lloh12:
	ldr	x8, [x8, _sa1100_irda_txdma_irq@GOTPAGEOFF]
Lloh13:
	ldr	x2, [x8]
	add	x22, x20, #12
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x3, x19
	mov	x4, x22
	bl	_sa1100_request_dma
	mov	x23, x0
	cbnz	w0, LBB0_5
; %bb.3:
	ldr	w0, [x19]
	bl	_disable_irq
	mov	x0, x20
	bl	_sa1100_irda_startup
	mov	x23, x0
	cbz	w0, LBB0_8
LBB0_4:
	ldr	w0, [x22]
	bl	_sa1100_free_dma
LBB0_5:
	ldr	w0, [x21]
	bl	_sa1100_free_dma
LBB0_6:
	ldr	w0, [x19]
	mov	x1, x19
	bl	_free_irq
LBB0_7:
	mov	x0, x23
	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_8:
	add	x1, x20, #20
Lloh16:
	adrp	x2, l_.str.2@PAGE
Lloh17:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_irlap_open
	str	w0, [x20, #16]
	cbz	w0, LBB0_10
; %bb.9:
	mov	w8, #1
	str	w8, [x20, #4]
Lloh18:
	adrp	x8, _power_level@GOTPAGE
Lloh19:
	ldr	x8, [x8, _power_level@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_sa1100_set_power
	ldr	w0, [x19]
	bl	_enable_irq
	mov	x0, x19
	bl	_netif_start_queue
	mov	w23, #0
	b	LBB0_7
LBB0_10:
Lloh21:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w23, w8
	str	wzr, [x20, #4]
	mov	x0, x20
	bl	_sa1100_irda_shutdown
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_sa1100_irda_irq,4,2            ; @sa1100_irda_irq
	.comm	_DMA_Ser2HSSPRd,4,2             ; @DMA_Ser2HSSPRd
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"IrDA receive"

	.comm	_DMA_Ser2HSSPWr,4,2             ; @DMA_Ser2HSSPWr
l_.str.1:                               ; @.str.1
	.asciz	"IrDA transmit"

	.comm	_sa1100_irda_txdma_irq,8,3      ; @sa1100_irda_txdma_irq
l_.str.2:                               ; @.str.2
	.asciz	"sa1100"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_power_level,4,2                ; @power_level
	.no_dead_strip	_sa1100_irda_start
.subsections_via_symbols
