	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sa1100_irda_set_speed
_sa1100_irda_set_speed:                 ## @sa1100_irda_set_speed
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r12d
	movq	%rdi, %r14
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	cmpl	$57599, %esi                    ## imm = 0xE0FF
	jg	LBB0_4
## %bb.1:
	cmpl	$9600, %r12d                    ## imm = 0x2580
	je	LBB0_7
## %bb.2:
	cmpl	$19200, %r12d                   ## imm = 0x4B00
	je	LBB0_7
## %bb.3:
	cmpl	$38400, %r12d                   ## imm = 0x9600
	je	LBB0_7
	jmp	LBB0_16
LBB0_4:
	cmpl	$57600, %r12d                   ## imm = 0xE100
	je	LBB0_7
## %bb.5:
	cmpl	$4000000, %r12d                 ## imm = 0x3D0900
	je	LBB0_12
## %bb.6:
	cmpl	$115200, %r12d                  ## imm = 0x1C200
	jne	LBB0_16
LBB0_7:
	movl	%r12d, %ecx
	shll	$4, %ecx
	movl	$3686400, %eax                  ## imm = 0x384000
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %ebx
	decl	%ebx
	movq	%r14, %rdi
	callq	_IS_FIR
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	24(%r14), %edi
	callq	_sa1100_stop_dma
LBB0_9:
	callq	_local_irq_save
	movq	_HSCR0_UART@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_Ser2HSCR0@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	%ebx, %eax
	shrl	$8, %eax
	movq	_Ser2UTCR1@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_UTSR0_REB@GOTPCREL(%rip), %rax
	movq	_UTSR0_RBB@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_UTSR0_RID@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_Ser2UTCR2@GOTPCREL(%rip), %rax
	movl	%ebx, (%rax)
	movq	_Ser2UTSR0@GOTPCREL(%rip), %rax
	movl	%ecx, (%rax)
	movq	_UTCR3_RIE@GOTPCREL(%rip), %rax
	movq	_UTCR3_RXE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_UTCR3_TXE@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_Ser2UTCR3@GOTPCREL(%rip), %rax
	movl	%ecx, (%rax)
	movq	16(%r14), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movl	8(%r14), %edi
	movl	%r12d, %esi
	callq	*%rax
LBB0_11:
	movl	%r12d, (%r14)
	xorl	%r15d, %r15d
LBB0_15:
	callq	_local_irq_restore
LBB0_16:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	_local_irq_save
	movl	$0, 4(%r14)
	movq	_Ser2HSSR0@GOTPCREL(%rip), %rax
	movl	$255, (%rax)
	movq	_HSCR0_HSSP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_Ser2HSCR0@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_Ser2UTCR3@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	movl	$4000000, (%r14)                ## imm = 0x3D0900
	movq	16(%r14), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movl	8(%r14), %edi
	movl	$4000000, %esi                  ## imm = 0x3D0900
	callq	*%rax
LBB0_14:
	movq	%r14, %rdi
	callq	_sa1100_irda_rx_alloc
	movq	%r14, %rdi
	callq	_sa1100_irda_rx_dma_start
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_Ser2UTCR3,4,2                  ## @Ser2UTCR3
	.comm	_HSCR0_UART,4,2                 ## @HSCR0_UART
	.comm	_Ser2HSCR0,4,2                  ## @Ser2HSCR0
	.comm	_Ser2UTCR1,4,2                  ## @Ser2UTCR1
	.comm	_Ser2UTCR2,4,2                  ## @Ser2UTCR2
	.comm	_UTSR0_REB,4,2                  ## @UTSR0_REB
	.comm	_UTSR0_RBB,4,2                  ## @UTSR0_RBB
	.comm	_UTSR0_RID,4,2                  ## @UTSR0_RID
	.comm	_Ser2UTSR0,4,2                  ## @Ser2UTSR0
	.comm	_UTCR3_RIE,4,2                  ## @UTCR3_RIE
	.comm	_UTCR3_RXE,4,2                  ## @UTCR3_RXE
	.comm	_UTCR3_TXE,4,2                  ## @UTCR3_TXE
	.comm	_Ser2HSSR0,4,2                  ## @Ser2HSSR0
	.comm	_HSCR0_HSSP,4,2                 ## @HSCR0_HSSP
	.no_dead_strip	_sa1100_irda_set_speed
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function sa1100_irda_set_speed
lCPI0_0:
	.long	4000000                         ; 0x3d0900
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_sa1100_irda_set_speed:                 ; @sa1100_irda_set_speed
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w21, w8
	mov	w8, #57599
	cmp	w1, w8
	b.gt	LBB0_4
; %bb.1:
	mov	w8, #9600
	cmp	w20, w8
	b.eq	LBB0_7
; %bb.2:
	mov	w8, #19200
	cmp	w20, w8
	b.eq	LBB0_7
; %bb.3:
	mov	w8, #38400
	cmp	w20, w8
	b.eq	LBB0_7
	b	LBB0_13
LBB0_4:
	mov	w8, #57600
	cmp	w20, w8
	b.eq	LBB0_7
; %bb.5:
	mov	w8, #2304
	movk	w8, #61, lsl #16
	cmp	w20, w8
	b.eq	LBB0_14
; %bb.6:
	mov	w8, #49664
	movk	w8, #1, lsl #16
	cmp	w20, w8
	b.ne	LBB0_13
LBB0_7:
	lsl	w8, w20, #4
	mov	w9, #16384
	movk	w9, #56, lsl #16
	udiv	w8, w9, w8
	sub	w21, w8, #1
	mov	x0, x19
	bl	_IS_FIR
	cbz	w0, LBB0_9
; %bb.8:
	ldr	w0, [x19, #24]
	bl	_sa1100_stop_dma
LBB0_9:
	bl	_local_irq_save
Lloh3:
	adrp	x8, _HSCR0_UART@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HSCR0_UART@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _Ser2HSCR0@GOTPAGE
Lloh7:
	ldr	x9, [x9, _Ser2HSCR0@GOTPAGEOFF]
Lloh8:
	str	w8, [x9]
	lsr	w8, w21, #8
Lloh9:
	adrp	x9, _Ser2UTCR1@GOTPAGE
Lloh10:
	ldr	x9, [x9, _Ser2UTCR1@GOTPAGEOFF]
Lloh11:
	str	w8, [x9]
Lloh12:
	adrp	x8, _Ser2UTCR2@GOTPAGE
Lloh13:
	ldr	x8, [x8, _Ser2UTCR2@GOTPAGEOFF]
Lloh14:
	str	w21, [x8]
Lloh15:
	adrp	x8, _UTSR0_REB@GOTPAGE
Lloh16:
	ldr	x8, [x8, _UTSR0_REB@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _UTSR0_RBB@GOTPAGE
Lloh19:
	ldr	x9, [x9, _UTSR0_RBB@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh21:
	adrp	x9, _UTSR0_RID@GOTPAGE
Lloh22:
	ldr	x9, [x9, _UTSR0_RID@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
Lloh24:
	adrp	x10, _Ser2UTSR0@GOTPAGE
Lloh25:
	ldr	x10, [x10, _Ser2UTSR0@GOTPAGEOFF]
	orr	w8, w8, w9
Lloh26:
	str	w8, [x10]
Lloh27:
	adrp	x8, _UTCR3_RIE@GOTPAGE
Lloh28:
	ldr	x8, [x8, _UTCR3_RIE@GOTPAGEOFF]
Lloh29:
	adrp	x9, _UTCR3_RXE@GOTPAGE
Lloh30:
	ldr	x9, [x9, _UTCR3_RXE@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
Lloh32:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh33:
	adrp	x9, _UTCR3_TXE@GOTPAGE
Lloh34:
	ldr	x9, [x9, _UTCR3_TXE@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh36:
	adrp	x9, _Ser2UTCR3@GOTPAGE
Lloh37:
	ldr	x9, [x9, _Ser2UTCR3@GOTPAGEOFF]
Lloh38:
	str	w8, [x9]
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	cbz	x8, LBB0_11
; %bb.10:
	ldr	w0, [x19, #8]
	mov	x1, x20
	blr	x8
LBB0_11:
	mov	w21, #0
	str	w20, [x19]
LBB0_12:
	bl	_local_irq_restore
LBB0_13:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_14:
	bl	_local_irq_save
Lloh39:
	adrp	x8, _Ser2HSSR0@GOTPAGE
Lloh40:
	ldr	x8, [x8, _Ser2HSSR0@GOTPAGEOFF]
	mov	w9, #255
Lloh41:
	str	w9, [x8]
Lloh42:
	adrp	x8, _HSCR0_HSSP@GOTPAGE
Lloh43:
	ldr	x8, [x8, _HSCR0_HSSP@GOTPAGEOFF]
Lloh44:
	ldr	w8, [x8]
Lloh45:
	adrp	x9, _Ser2HSCR0@GOTPAGE
Lloh46:
	ldr	x9, [x9, _Ser2HSCR0@GOTPAGEOFF]
Lloh47:
	str	w8, [x9]
Lloh48:
	adrp	x8, _Ser2UTCR3@GOTPAGE
Lloh49:
	ldr	x8, [x8, _Ser2UTCR3@GOTPAGEOFF]
Lloh50:
	str	wzr, [x8]
Lloh51:
	adrp	x8, lCPI0_0@PAGE
Lloh52:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x19]
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	cbz	x8, LBB0_16
; %bb.15:
	ldr	w0, [x19, #8]
	mov	w1, #2304
	movk	w1, #61, lsl #16
	blr	x8
LBB0_16:
	mov	x0, x19
	bl	_sa1100_irda_rx_alloc
	mov	x0, x19
	bl	_sa1100_irda_rx_dma_start
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotStr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh31
	.loh AdrpLdrGotStr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotStr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotStr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotStr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdr	Lloh51, Lloh52
	.loh AdrpLdrGotStr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotStr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotStr	Lloh39, Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_Ser2UTCR3,4,2                  ; @Ser2UTCR3
	.comm	_HSCR0_UART,4,2                 ; @HSCR0_UART
	.comm	_Ser2HSCR0,4,2                  ; @Ser2HSCR0
	.comm	_Ser2UTCR1,4,2                  ; @Ser2UTCR1
	.comm	_Ser2UTCR2,4,2                  ; @Ser2UTCR2
	.comm	_UTSR0_REB,4,2                  ; @UTSR0_REB
	.comm	_UTSR0_RBB,4,2                  ; @UTSR0_RBB
	.comm	_UTSR0_RID,4,2                  ; @UTSR0_RID
	.comm	_Ser2UTSR0,4,2                  ; @Ser2UTSR0
	.comm	_UTCR3_RIE,4,2                  ; @UTCR3_RIE
	.comm	_UTCR3_RXE,4,2                  ; @UTCR3_RXE
	.comm	_UTCR3_TXE,4,2                  ; @UTCR3_TXE
	.comm	_Ser2HSSR0,4,2                  ; @Ser2HSSR0
	.comm	_HSCR0_HSSP,4,2                 ; @HSCR0_HSSP
	.no_dead_strip	_sa1100_irda_set_speed
.subsections_via_symbols
