	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function au1k_init
_au1k_init:                             ## @au1k_init
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_netdev_priv
	movq	%rax, %r15
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%rax)
	movq	$0, 24(%rax)
	movq	_NUM_IR_DESC@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_3
## %bb.1:
	movq	(%r15), %rcx
	xorl	%edx, %edx
	movq	_AU_OWN@GOTPCREL(%rip), %rsi
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rsi), %edi
	movq	(%rcx,%rdx,8), %rbx
	movl	%edi, (%rbx)
	incq	%rdx
	movslq	(%rax), %rdi
	cmpq	%rdi, %rdx
	jl	LBB0_2
LBB0_3:
	movq	_IR_INTERFACE_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$15, %edi
	callq	_writel
	movl	$10, %edi
	callq	_au_sync_delay
	movq	_IR_ENABLE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_read_ir_reg
	andl	$-32769, %eax                   ## imm = 0xFFFF7FFF
	movl	(%rbx), %esi
	movl	%eax, %edi
	callq	_writel
	movl	$1, %edi
	callq	_au_sync_delay
	movq	_MAX_BUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_IR_MAX_PKT_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_writel
	movq	(%r15), %rax
	movq	(%rax), %rdi
	callq	_virt_to_phys
	movq	%rax, %rbx
	movl	%ebx, %edi
	sarl	$26, %edi
	movq	_IR_RING_BASE_ADDR_H@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_writel
	shrl	$10, %ebx
	movzwl	%bx, %edi
	movq	_IR_RING_BASE_ADDR_L@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_writel
	movq	_RING_SIZE_64@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, %eax
	shll	$8, %eax
	shll	$12, %edi
	orl	%eax, %edi
	movq	_IR_RING_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_writel
	movq	_IR_ONE_PIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	orl	$4, %edi
	movq	_IR_CONFIG_2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_writel
	movq	_IR_RING_ADDR_CMPR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edi, %edi
	callq	_writel
	movq	%r14, %rdi
	movl	$9600, %esi                     ## imm = 0x2580
	callq	_au1k_irda_set_speed
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NUM_IR_DESC,4,2                ## @NUM_IR_DESC
	.comm	_AU_OWN,4,2                     ## @AU_OWN
	.comm	_IR_INTERFACE_CONFIG,4,2        ## @IR_INTERFACE_CONFIG
	.comm	_IR_ENABLE,4,2                  ## @IR_ENABLE
	.comm	_MAX_BUF_SIZE,4,2               ## @MAX_BUF_SIZE
	.comm	_IR_MAX_PKT_LEN,4,2             ## @IR_MAX_PKT_LEN
	.comm	_IR_RING_BASE_ADDR_H,4,2        ## @IR_RING_BASE_ADDR_H
	.comm	_IR_RING_BASE_ADDR_L,4,2        ## @IR_RING_BASE_ADDR_L
	.comm	_RING_SIZE_64,4,2               ## @RING_SIZE_64
	.comm	_IR_RING_SIZE,4,2               ## @IR_RING_SIZE
	.comm	_IR_ONE_PIN,4,2                 ## @IR_ONE_PIN
	.comm	_IR_CONFIG_2,4,2                ## @IR_CONFIG_2
	.comm	_IR_RING_ADDR_CMPR,4,2          ## @IR_RING_ADDR_CMPR
	.no_dead_strip	_au1k_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function au1k_init
_au1k_init:                             ; @au1k_init
	.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	x19, x0
	bl	_netdev_priv
	mov	x20, x0
	stp	xzr, xzr, [x0, #16]
	str	xzr, [x0, #8]
Lloh0:
	adrp	x8, _NUM_IR_DESC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NUM_IR_DESC@GOTPAGEOFF]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x9, #0
	ldr	x10, [x20]
Lloh2:
	adrp	x11, _AU_OWN@GOTPAGE
Lloh3:
	ldr	x11, [x11, _AU_OWN@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x11]
	ldr	x13, [x10, x9, lsl #3]
	str	w12, [x13]
	add	x9, x9, #1
	ldrsw	x12, [x8]
	cmp	x9, x12
	b.lt	LBB0_2
LBB0_3:
Lloh4:
	adrp	x8, _IR_INTERFACE_CONFIG@GOTPAGE
Lloh5:
	ldr	x8, [x8, _IR_INTERFACE_CONFIG@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	w0, #15
	bl	_writel
	mov	w0, #10
	bl	_au_sync_delay
Lloh7:
	adrp	x21, _IR_ENABLE@GOTPAGE
Lloh8:
	ldr	x21, [x21, _IR_ENABLE@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_read_ir_reg
	and	w0, w0, #0xffff7fff
	ldr	w1, [x21]
	bl	_writel
	mov	w0, #1
	bl	_au_sync_delay
Lloh9:
	adrp	x8, _MAX_BUF_SIZE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MAX_BUF_SIZE@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
Lloh12:
	adrp	x8, _IR_MAX_PKT_LEN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IR_MAX_PKT_LEN@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	bl	_writel
	ldr	x8, [x20]
	ldr	x0, [x8]
	bl	_virt_to_phys
	mov	x20, x0
	asr	w0, w20, #26
Lloh15:
	adrp	x8, _IR_RING_BASE_ADDR_H@GOTPAGE
Lloh16:
	ldr	x8, [x8, _IR_RING_BASE_ADDR_H@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	bl	_writel
	ubfx	w0, w20, #10, #16
Lloh18:
	adrp	x8, _IR_RING_BASE_ADDR_L@GOTPAGE
Lloh19:
	ldr	x8, [x8, _IR_RING_BASE_ADDR_L@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	bl	_writel
Lloh21:
	adrp	x8, _RING_SIZE_64@GOTPAGE
Lloh22:
	ldr	x8, [x8, _RING_SIZE_64@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	lsl	w9, w8, #8
	orr	w0, w9, w8, lsl #12
Lloh24:
	adrp	x8, _IR_RING_SIZE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _IR_RING_SIZE@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	bl	_writel
Lloh27:
	adrp	x8, _IR_ONE_PIN@GOTPAGE
Lloh28:
	ldr	x8, [x8, _IR_ONE_PIN@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	orr	w0, w8, #0x4
Lloh30:
	adrp	x8, _IR_CONFIG_2@GOTPAGE
Lloh31:
	ldr	x8, [x8, _IR_CONFIG_2@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	bl	_writel
Lloh33:
	adrp	x8, _IR_RING_ADDR_CMPR@GOTPAGE
Lloh34:
	ldr	x8, [x8, _IR_RING_ADDR_CMPR@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	mov	w0, #0
	bl	_writel
	mov	x0, x19
	mov	w1, #9600
	bl	_au1k_irda_set_speed
	mov	w0, #0
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_NUM_IR_DESC,4,2                ; @NUM_IR_DESC
	.comm	_AU_OWN,4,2                     ; @AU_OWN
	.comm	_IR_INTERFACE_CONFIG,4,2        ; @IR_INTERFACE_CONFIG
	.comm	_IR_ENABLE,4,2                  ; @IR_ENABLE
	.comm	_MAX_BUF_SIZE,4,2               ; @MAX_BUF_SIZE
	.comm	_IR_MAX_PKT_LEN,4,2             ; @IR_MAX_PKT_LEN
	.comm	_IR_RING_BASE_ADDR_H,4,2        ; @IR_RING_BASE_ADDR_H
	.comm	_IR_RING_BASE_ADDR_L,4,2        ; @IR_RING_BASE_ADDR_L
	.comm	_RING_SIZE_64,4,2               ; @RING_SIZE_64
	.comm	_IR_RING_SIZE,4,2               ; @IR_RING_SIZE
	.comm	_IR_ONE_PIN,4,2                 ; @IR_ONE_PIN
	.comm	_IR_CONFIG_2,4,2                ; @IR_CONFIG_2
	.comm	_IR_RING_ADDR_CMPR,4,2          ; @IR_RING_ADDR_CMPR
	.no_dead_strip	_au1k_init
.subsections_via_symbols
