	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sa1100_irda_probe
_sa1100_irda_probe:                     ## @sa1100_irda_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
	cmpq	$0, (%rdi)
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r13
	movq	_Ser2UTCR0@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	___PREG
	leaq	L_.str(%rip), %rdx
	movl	%eax, %edi
	movl	$36, %esi
	callq	_request_mem_region
	movq	_EBUSY@GOTPCREL(%rip), %r15
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	subl	(%r15), %ebx
	testq	%rax, %rax
	cmovnel	%r12d, %ebx
	testl	%ebx, %ebx
	jne	LBB0_27
## %bb.3:
	movq	_Ser2HSCR0@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	___PREG
	leaq	L_.str(%rip), %rdx
	movl	%eax, %edi
	movl	$28, %esi
	callq	_request_mem_region
	xorl	%ebx, %ebx
	subl	(%r15), %ebx
	testq	%rax, %rax
	cmovnel	%r12d, %ebx
	testl	%ebx, %ebx
	jne	LBB0_26
## %bb.4:
	movq	_Ser2HSCR2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	___PREG
	leaq	L_.str(%rip), %rdx
	movl	%eax, %edi
	movl	$4, %esi
	callq	_request_mem_region
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	subl	(%r15), %ebx
	testq	%rax, %rax
	cmovnel	%r12d, %ebx
	testl	%ebx, %ebx
	movq	%r14, %r15
	jne	LBB0_25
## %bb.5:
	movl	$40, %edi
	callq	_alloc_irdadev
	testq	%rax, %rax
	movq	_Ser2HSCR2@GOTPCREL(%rip), %rcx
	je	LBB0_24
## %bb.6:
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_netdev_priv
	movq	%rax, %rbx
	movq	%r13, 32(%rax)
	movq	(%r13), %rax
	movq	%rax, 24(%rbx)
	movq	%rbx, %rdi
	movl	$14384, %esi                    ## imm = 0x3830
	callq	_sa1100_irda_init_iobuf
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_23
## %bb.7:
	leaq	4(%rbx), %rdi
	movl	$4000, %esi                     ## imm = 0xFA0
	callq	_sa1100_irda_init_iobuf
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_23
## %bb.8:
	movq	_sa1100_irda_netdev_ops@GOTPCREL(%rip), %rax
	movq	%rax, 8(%r14)
	movq	_IRQ_Ser2ICP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movl	%eax, (%r14)
	movq	%rbx, %r12
	addq	$12, %r12
	movq	%r12, %rdi
	callq	_irda_init_max_qos_capabilies
	movq	_IR_9600@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_max_rate@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	$57599, %ecx                    ## imm = 0xE0FF
	jle	LBB0_9
## %bb.11:
	cmpl	$57600, %ecx                    ## imm = 0xE100
	je	LBB0_16
## %bb.12:
	cmpl	$115200, %ecx                   ## imm = 0x1C200
	je	LBB0_15
## %bb.13:
	cmpl	$4000000, %ecx                  ## imm = 0x3D0900
	jne	LBB0_19
## %bb.14:
	movq	_IR_4000000@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	shll	$8, %ecx
	orl	%ecx, %eax
LBB0_15:
	movq	_IR_115200@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
LBB0_16:
	movq	_IR_57600@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	jmp	LBB0_17
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_27
LBB0_9:
	cmpl	$19200, %ecx                    ## imm = 0x4B00
	je	LBB0_18
## %bb.10:
	cmpl	$38400, %ecx                    ## imm = 0x9600
	jne	LBB0_19
LBB0_17:
	movq	_IR_38400@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
LBB0_18:
	movq	_IR_19200@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
LBB0_19:
	andl	%eax, 16(%rbx)
	movl	$7, 12(%rbx)
	movq	%r12, %rdi
	callq	_irda_qos_bits_to_value
	movq	_UTCR4_HPSIR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movq	_tx_lpm@GOTPCREL(%rip), %rcx
	cmpq	$0, (%rcx)
	je	LBB0_21
## %bb.20:
	movq	_UTCR4_Z1_6us@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, 8(%rbx)
LBB0_21:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	_Ser2UTCR3@GOTPCREL(%rip), %rcx
	movq	$0, (%rcx)
	movq	_Ser2UTCR4@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_HSCR0_UART@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	movq	%r14, %rdi
	callq	_register_netdev
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_22
LBB0_23:
	movl	4(%rbx), %edi
	callq	_kfree
	movl	(%rbx), %edi
	callq	_kfree
	movq	%r14, %rdi
	callq	_free_netdev
	movq	_Ser2HSCR2@GOTPCREL(%rip), %rcx
LBB0_24:
	movl	(%rcx), %edi
	callq	___PREG
	movl	%eax, %edi
	movl	$4, %esi
	callq	_release_mem_region
	movl	%r12d, %ebx
LBB0_25:
	movl	(%r15), %edi
	callq	___PREG
	movl	%eax, %edi
	movl	$28, %esi
	callq	_release_mem_region
LBB0_26:
	movq	_Ser2UTCR0@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	___PREG
	movl	%eax, %edi
	movl	$36, %esi
	callq	_release_mem_region
LBB0_27:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_platform_set_drvdata
	xorl	%ebx, %ebx
	jmp	LBB0_27
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_Ser2UTCR0,4,2                  ## @Ser2UTCR0
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"IrDA"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_Ser2HSCR0,4,2                  ## @Ser2HSCR0
	.comm	_Ser2HSCR2,4,2                  ## @Ser2HSCR2
	.comm	_sa1100_irda_netdev_ops,4,2     ## @sa1100_irda_netdev_ops
	.comm	_IRQ_Ser2ICP,4,2                ## @IRQ_Ser2ICP
	.comm	_IR_9600,4,2                    ## @IR_9600
	.comm	_max_rate,4,2                   ## @max_rate
	.comm	_IR_4000000,4,2                 ## @IR_4000000
	.comm	_IR_115200,4,2                  ## @IR_115200
	.comm	_IR_57600,4,2                   ## @IR_57600
	.comm	_IR_38400,4,2                   ## @IR_38400
	.comm	_IR_19200,4,2                   ## @IR_19200
	.comm	_UTCR4_HPSIR,4,2                ## @UTCR4_HPSIR
	.comm	_tx_lpm,8,3                     ## @tx_lpm
	.comm	_UTCR4_Z1_6us,4,2               ## @UTCR4_Z1_6us
	.comm	_Ser2UTCR3,8,3                  ## @Ser2UTCR3
	.comm	_Ser2UTCR4,4,2                  ## @Ser2UTCR4
	.comm	_HSCR0_UART,4,2                 ## @HSCR0_UART
	.no_dead_strip	_sa1100_irda_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sa1100_irda_probe
_sa1100_irda_probe:                     ; @sa1100_irda_probe
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	ldr	x8, [x0]
	cbz	x8, LBB0_14
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x23, _Ser2UTCR0@GOTPAGE
Lloh1:
	ldr	x23, [x23, _Ser2UTCR0@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	___PREG
Lloh2:
	adrp	x2, l_.str@PAGE
Lloh3:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #36
	bl	_request_mem_region
Lloh4:
	adrp	x20, _EBUSY@GOTPAGE
Lloh5:
	ldr	x20, [x20, _EBUSY@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	x0, #0
	csneg	w22, wzr, w8, ne
	cbnz	w22, LBB0_27
; %bb.2:
Lloh6:
	adrp	x24, _Ser2HSCR0@GOTPAGE
Lloh7:
	ldr	x24, [x24, _Ser2HSCR0@GOTPAGEOFF]
	ldr	w0, [x24]
	bl	___PREG
Lloh8:
	adrp	x2, l_.str@PAGE
Lloh9:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #28
	bl	_request_mem_region
	ldr	w8, [x20]
	cmp	x0, #0
	csneg	w22, wzr, w8, ne
	cbnz	w22, LBB0_26
; %bb.3:
Lloh10:
	adrp	x25, _Ser2HSCR2@GOTPAGE
Lloh11:
	ldr	x25, [x25, _Ser2HSCR2@GOTPAGEOFF]
	ldr	w0, [x25]
	bl	___PREG
Lloh12:
	adrp	x2, l_.str@PAGE
Lloh13:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #4
	bl	_request_mem_region
	ldr	w8, [x20]
	cmp	x0, #0
	csneg	w22, wzr, w8, ne
	cbnz	w22, LBB0_25
; %bb.4:
	mov	w0, #40
	bl	_alloc_irdadev
	cbz	x0, LBB0_15
; %bb.5:
	mov	x20, x0
	bl	_netdev_priv
	mov	x21, x0
	ldr	x8, [x19]
	stp	x8, x19, [x0, #24]
	mov	w1, #14384
	bl	_sa1100_irda_init_iobuf
	mov	x22, x0
	cbnz	w0, LBB0_23
; %bb.6:
	add	x0, x21, #4
	mov	w1, #4000
	bl	_sa1100_irda_init_iobuf
	mov	x22, x0
	cbnz	w0, LBB0_23
; %bb.7:
Lloh14:
	adrp	x8, _sa1100_irda_netdev_ops@GOTPAGE
Lloh15:
	ldr	x8, [x8, _sa1100_irda_netdev_ops@GOTPAGEOFF]
	str	x8, [x20, #8]
Lloh16:
	adrp	x8, _IRQ_Ser2ICP@GOTPAGE
Lloh17:
	ldr	x8, [x8, _IRQ_Ser2ICP@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	str	w8, [x20]
	add	x22, x21, #12
	mov	x0, x22
	bl	_irda_init_max_qos_capabilies
Lloh19:
	adrp	x8, _IR_9600@GOTPAGE
Lloh20:
	ldr	x8, [x8, _IR_9600@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
Lloh22:
	adrp	x9, _max_rate@GOTPAGE
Lloh23:
	ldr	x9, [x9, _max_rate@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	mov	w10, #57599
	cmp	w9, w10
	b.le	LBB0_16
; %bb.8:
	mov	w10, #57600
	cmp	w9, w10
	b.eq	LBB0_13
; %bb.9:
	mov	w10, #49664
	movk	w10, #1, lsl #16
	cmp	w9, w10
	b.eq	LBB0_12
; %bb.10:
	mov	w10, #2304
	movk	w10, #61, lsl #16
	cmp	w9, w10
	b.ne	LBB0_20
; %bb.11:
Lloh25:
	adrp	x9, _IR_4000000@GOTPAGE
Lloh26:
	ldr	x9, [x9, _IR_4000000@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	orr	w8, w8, w9, lsl #8
LBB0_12:
Lloh28:
	adrp	x9, _IR_115200@GOTPAGE
Lloh29:
	ldr	x9, [x9, _IR_115200@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	orr	w8, w9, w8
LBB0_13:
Lloh31:
	adrp	x9, _IR_57600@GOTPAGE
Lloh32:
	ldr	x9, [x9, _IR_57600@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	orr	w8, w9, w8
	b	LBB0_18
LBB0_14:
Lloh34:
	adrp	x8, _EINVAL@GOTPAGE
Lloh35:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_27
LBB0_15:
	mov	w22, #0
	b	LBB0_24
LBB0_16:
	mov	w10, #19200
	cmp	w9, w10
	b.eq	LBB0_19
; %bb.17:
	mov	w10, #38400
	cmp	w9, w10
	b.ne	LBB0_20
LBB0_18:
Lloh37:
	adrp	x9, _IR_38400@GOTPAGE
Lloh38:
	ldr	x9, [x9, _IR_38400@GOTPAGEOFF]
Lloh39:
	ldr	w9, [x9]
	orr	w8, w9, w8
LBB0_19:
Lloh40:
	adrp	x9, _IR_19200@GOTPAGE
Lloh41:
	ldr	x9, [x9, _IR_19200@GOTPAGEOFF]
Lloh42:
	ldr	w9, [x9]
	orr	w8, w9, w8
LBB0_20:
	ldr	w9, [x21, #16]
	and	w8, w9, w8
	mov	w9, #7
	stp	w9, w8, [x21, #12]
	mov	x0, x22
	bl	_irda_qos_bits_to_value
Lloh43:
	adrp	x8, _UTCR4_HPSIR@GOTPAGE
Lloh44:
	ldr	x8, [x8, _UTCR4_HPSIR@GOTPAGEOFF]
Lloh45:
	ldr	w8, [x8]
	str	w8, [x21, #8]
Lloh46:
	adrp	x9, _tx_lpm@GOTPAGE
Lloh47:
	ldr	x9, [x9, _tx_lpm@GOTPAGEOFF]
Lloh48:
	ldr	x9, [x9]
	cbz	x9, LBB0_22
; %bb.21:
Lloh49:
	adrp	x9, _UTCR4_Z1_6us@GOTPAGE
Lloh50:
	ldr	x9, [x9, _UTCR4_Z1_6us@GOTPAGEOFF]
Lloh51:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x21, #8]
LBB0_22:
Lloh52:
	adrp	x9, _Ser2UTCR3@GOTPAGE
Lloh53:
	ldr	x9, [x9, _Ser2UTCR3@GOTPAGEOFF]
Lloh54:
	adrp	x10, _Ser2UTCR4@GOTPAGE
Lloh55:
	ldr	x10, [x10, _Ser2UTCR4@GOTPAGEOFF]
Lloh56:
	str	xzr, [x9]
Lloh57:
	str	w8, [x10]
Lloh58:
	adrp	x8, _HSCR0_UART@GOTPAGE
Lloh59:
	ldr	x8, [x8, _HSCR0_UART@GOTPAGEOFF]
Lloh60:
	ldr	w8, [x8]
	str	w8, [x24]
	mov	x0, x20
	bl	_register_netdev
	mov	x22, x0
	cbz	w0, LBB0_28
LBB0_23:
	ldr	w0, [x21, #4]
	bl	_kfree
	ldr	w0, [x21]
	bl	_kfree
	mov	x0, x20
	bl	_free_netdev
LBB0_24:
	ldr	w0, [x25]
	bl	___PREG
	mov	w1, #4
	bl	_release_mem_region
LBB0_25:
	ldr	w0, [x24]
	bl	___PREG
	mov	w1, #28
	bl	_release_mem_region
LBB0_26:
	ldr	w0, [x23]
	bl	___PREG
	mov	w1, #36
	bl	_release_mem_region
LBB0_27:
	mov	x0, x22
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_28:
	mov	x0, x19
	mov	x1, x20
	bl	_platform_set_drvdata
	b	LBB0_27
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.loh AdrpLdrGotStr	Lloh54, Lloh55, Lloh57
	.loh AdrpLdrGotStr	Lloh52, Lloh53, Lloh56
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_Ser2UTCR0,4,2                  ; @Ser2UTCR0
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"IrDA"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_Ser2HSCR0,4,2                  ; @Ser2HSCR0
	.comm	_Ser2HSCR2,4,2                  ; @Ser2HSCR2
	.comm	_sa1100_irda_netdev_ops,4,2     ; @sa1100_irda_netdev_ops
	.comm	_IRQ_Ser2ICP,4,2                ; @IRQ_Ser2ICP
	.comm	_IR_9600,4,2                    ; @IR_9600
	.comm	_max_rate,4,2                   ; @max_rate
	.comm	_IR_4000000,4,2                 ; @IR_4000000
	.comm	_IR_115200,4,2                  ; @IR_115200
	.comm	_IR_57600,4,2                   ; @IR_57600
	.comm	_IR_38400,4,2                   ; @IR_38400
	.comm	_IR_19200,4,2                   ; @IR_19200
	.comm	_UTCR4_HPSIR,4,2                ; @UTCR4_HPSIR
	.comm	_tx_lpm,8,3                     ; @tx_lpm
	.comm	_UTCR4_Z1_6us,4,2               ; @UTCR4_Z1_6us
	.comm	_Ser2UTCR3,8,3                  ; @Ser2UTCR3
	.comm	_Ser2UTCR4,4,2                  ; @Ser2UTCR4
	.comm	_HSCR0_UART,4,2                 ; @HSCR0_UART
	.no_dead_strip	_sa1100_irda_probe
.subsections_via_symbols
