	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aw_ir_attach
_aw_ir_attach:                          ## @aw_ir_attach
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %ebx
	movq	$0, -56(%rbp)
	movq	$0, -48(%rbp)
	movq	$0, -64(%rbp)
	callq	_device_get_softc
	movq	%rax, %r14
	movl	%ebx, 24(%rax)
	movq	_aw_ir_spec@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	8(%rax), %rdx
	movl	%ebx, %edi
	callq	_bus_alloc_resources
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %rsi
LBB0_2:
	movl	%ebx, %edi
	xorl	%eax, %eax
	callq	_device_printf
	jmp	LBB0_33
LBB0_3:
	movq	_compat_data@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_ofw_bus_search_compatible
	movl	(%rax), %eax
	cmpl	$129, %eax
	je	LBB0_4
## %bb.5:
	cmpl	$128, %eax
	jne	LBB0_8
## %bb.6:
	movl	$64, %eax
	jmp	LBB0_7
LBB0_4:
	movl	$16, %eax
LBB0_7:
	movl	%eax, (%r14)
LBB0_8:
	leaq	-64(%rbp), %rcx
	movl	%ebx, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_hwreset_get_by_ofw_idx
	testq	%rax, %rax
	je	LBB0_9
LBB0_12:
	movq	%r14, %rdi
	callq	_aw_ir_buf_reset
	leaq	L_.str.2(%rip), %rdx
	leaq	-56(%rbp), %rcx
	movl	%ebx, %edi
	xorl	%esi, %esi
	callq	_clk_get_by_ofw_name
	testl	%eax, %eax
	je	LBB0_14
## %bb.13:
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_11
LBB0_9:
	movq	-64(%rbp), %rdi
	callq	_hwreset_deassert
	testl	%eax, %eax
	je	LBB0_12
## %bb.10:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_11
LBB0_14:
	leaq	L_.str.4(%rip), %rdx
	leaq	-48(%rbp), %rcx
	movl	%ebx, %edi
	xorl	%esi, %esi
	callq	_clk_get_by_ofw_name
	testl	%eax, %eax
	je	LBB0_16
## %bb.15:
	leaq	L_.str.5(%rip), %rsi
	jmp	LBB0_11
LBB0_16:
	movq	-48(%rbp), %rdi
	movq	_AW_IR_BASE_CLK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_clk_set_freq
	testl	%eax, %eax
	je	LBB0_18
## %bb.17:
	leaq	L_.str.6(%rip), %rsi
	jmp	LBB0_11
LBB0_18:
	movq	-56(%rbp), %rdi
	callq	_clk_enable
	testl	%eax, %eax
	je	LBB0_20
## %bb.19:
	leaq	L_.str.7(%rip), %rsi
	jmp	LBB0_11
LBB0_20:
	movq	-48(%rbp), %rdi
	callq	_clk_enable
	testl	%eax, %eax
	je	LBB0_22
## %bb.21:
	leaq	L_.str.8(%rip), %rsi
LBB0_11:
	movl	%ebx, %edi
	xorl	%eax, %eax
	callq	_device_printf
LBB0_26:
	movq	-56(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_28
## %bb.27:
	callq	_clk_release
LBB0_28:
	movq	-48(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_30
## %bb.29:
	callq	_clk_release
LBB0_30:
	movq	-64(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_32
## %bb.31:
	callq	_hwreset_release
LBB0_32:
	movq	16(%r14), %rdi
	callq	_evdev_free
	movq	$0, 16(%r14)
	movl	(%r13), %esi
	movq	8(%r14), %rdx
	movl	%ebx, %edi
	callq	_bus_release_resources
LBB0_33:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_34:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	movq	8(%r14), %rax
	movq	_INTR_TYPE_MISC@GOTPCREL(%rip), %rcx
	movq	_INTR_MPSAFE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movl	4(%rax), %esi
	movq	_aw_ir_intr@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r14, %rax
	addq	$28, %rax
	movq	%rax, (%rsp)
	xorl	%r15d, %r15d
	movl	%ebx, %edi
	xorl	%ecx, %ecx
	movq	%r14, %r9
	callq	_bus_setup_intr
	testq	%rax, %rax
	je	LBB0_24
## %bb.23:
	movl	(%r13), %esi
	movq	8(%r14), %rdx
	movl	%ebx, %edi
	callq	_bus_release_resources
	leaq	L_.str.9(%rip), %rsi
	jmp	LBB0_2
LBB0_24:
	movq	_AW_IR_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AW_IR_CTL_MD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_WRITE
	movq	_AW_IR_SAMPLE_128@GOTPCREL(%rip), %rax
	movq	_AW_IR_RXFILT_VAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_AW_IR_RXIDLE_VAL@GOTPCREL(%rip), %rcx
	movq	_AW_IR_ACTIVE_T@GOTPCREL(%rip), %rsi
	movq	_AW_IR_ACTIVE_T_C@GOTPCREL(%rip), %rdi
	orl	(%rax), %edx
	orl	(%rcx), %edx
	orl	(%rsi), %edx
	orl	(%rdi), %edx
	movq	_AW_IR_CIR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_WRITE
	movq	_AW_IR_RXCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AW_IR_RXCTL_RPPI@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_WRITE
	movq	_AW_IR_RXSTA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AW_IR_RXSTA_CLEARALL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_WRITE
	movq	_AW_IR_RXINT_ROI_EN@GOTPCREL(%rip), %rax
	movq	_AW_IR_RXINT_RPEI_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
	orl	(%rax), %r12d
	movq	_AW_IR_RXINT@GOTPCREL(%rip), %rax
	movq	_AW_IR_RXINT_RAI_EN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %r12d
	movl	(%rax), %eax
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	movl	(%r14), %edi
	sarl	%edi
	decl	%edi
	callq	_AW_IR_RXINT_RAL
	orl	%eax, %r12d
	movq	%r14, %rdi
	movl	-68(%rbp), %esi                 ## 4-byte Reload
	movl	%r12d, %edx
	callq	_WRITE
	movq	_AW_IR_CTL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_READ
	movq	_AW_IR_CTL_GEN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r12), %esi
	movq	_AW_IR_CTL_RXEN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_WRITE
	xorl	%eax, %eax
	callq	_evdev_alloc
	movq	%rax, %r12
	movq	%rax, 16(%r14)
	movl	24(%r14), %edi
	callq	_device_get_desc
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_evdev_set_name
	movq	16(%r14), %r12
	movl	24(%r14), %edi
	callq	_device_get_nameunit
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_evdev_set_phys
	movq	16(%r14), %rdi
	movq	_BUS_HOST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_evdev_set_id
	movq	16(%r14), %rdi
	movq	_EV_SYN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_evdev_support_event
	movq	16(%r14), %rdi
	movq	_EV_MSC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_evdev_support_event
	movq	16(%r14), %rdi
	movq	_MSC_SCAN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_evdev_support_msc
	movq	16(%r14), %rdi
	callq	_evdev_register
	testl	%eax, %eax
	je	LBB0_34
## %bb.25:
	leaq	L_.str.10(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_device_printf
	jmp	LBB0_26
	.cfi_endproc
                                        ## -- End function
	.comm	_aw_ir_spec,4,2                 ## @aw_ir_spec
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not allocate memory resource\n"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_compat_data,4,2                ## @compat_data
L_.str.1:                               ## @.str.1
	.asciz	"cannot de-assert reset\n"

L_.str.2:                               ## @.str.2
	.asciz	"apb"

L_.str.3:                               ## @.str.3
	.asciz	"Cannot get gate clock\n"

L_.str.4:                               ## @.str.4
	.asciz	"ir"

L_.str.5:                               ## @.str.5
	.asciz	"Cannot get IR clock\n"

	.comm	_AW_IR_BASE_CLK,4,2             ## @AW_IR_BASE_CLK
L_.str.6:                               ## @.str.6
	.asciz	"cannot set IR clock rate\n"

L_.str.7:                               ## @.str.7
	.asciz	"Cannot enable clk gate\n"

L_.str.8:                               ## @.str.8
	.asciz	"Cannot enable IR clock\n"

	.comm	_INTR_TYPE_MISC,4,2             ## @INTR_TYPE_MISC
	.comm	_INTR_MPSAFE,4,2                ## @INTR_MPSAFE
	.comm	_aw_ir_intr,4,2                 ## @aw_ir_intr
L_.str.9:                               ## @.str.9
	.asciz	"cannot setup interrupt handler\n"

	.comm	_AW_IR_CTL,4,2                  ## @AW_IR_CTL
	.comm	_AW_IR_CTL_MD,4,2               ## @AW_IR_CTL_MD
	.comm	_AW_IR_SAMPLE_128,4,2           ## @AW_IR_SAMPLE_128
	.comm	_AW_IR_RXFILT_VAL,4,2           ## @AW_IR_RXFILT_VAL
	.comm	_AW_IR_RXIDLE_VAL,4,2           ## @AW_IR_RXIDLE_VAL
	.comm	_AW_IR_ACTIVE_T,4,2             ## @AW_IR_ACTIVE_T
	.comm	_AW_IR_ACTIVE_T_C,4,2           ## @AW_IR_ACTIVE_T_C
	.comm	_AW_IR_CIR,4,2                  ## @AW_IR_CIR
	.comm	_AW_IR_RXCTL,4,2                ## @AW_IR_RXCTL
	.comm	_AW_IR_RXCTL_RPPI,4,2           ## @AW_IR_RXCTL_RPPI
	.comm	_AW_IR_RXSTA,4,2                ## @AW_IR_RXSTA
	.comm	_AW_IR_RXSTA_CLEARALL,4,2       ## @AW_IR_RXSTA_CLEARALL
	.comm	_AW_IR_RXINT,4,2                ## @AW_IR_RXINT
	.comm	_AW_IR_RXINT_ROI_EN,4,2         ## @AW_IR_RXINT_ROI_EN
	.comm	_AW_IR_RXINT_RPEI_EN,4,2        ## @AW_IR_RXINT_RPEI_EN
	.comm	_AW_IR_RXINT_RAI_EN,4,2         ## @AW_IR_RXINT_RAI_EN
	.comm	_AW_IR_CTL_GEN,4,2              ## @AW_IR_CTL_GEN
	.comm	_AW_IR_CTL_RXEN,4,2             ## @AW_IR_CTL_RXEN
	.comm	_BUS_HOST,4,2                   ## @BUS_HOST
	.comm	_EV_SYN,4,2                     ## @EV_SYN
	.comm	_EV_MSC,4,2                     ## @EV_MSC
	.comm	_MSC_SCAN,4,2                   ## @MSC_SCAN
L_.str.10:                              ## @.str.10
	.asciz	"failed to register evdev: error=%d\n"

	.no_dead_strip	_aw_ir_attach
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aw_ir_attach
_aw_ir_attach:                          ; @aw_ir_attach
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	stp	xzr, xzr, [sp, #8]
	str	xzr, [sp, #24]
	bl	_device_get_softc
	mov	x20, x0
	str	w19, [x0, #24]
Lloh0:
	adrp	x22, _aw_ir_spec@GOTPAGE
Lloh1:
	ldr	x22, [x22, _aw_ir_spec@GOTPAGEOFF]
	ldr	w1, [x22]
	ldr	x2, [x0, #8]
	mov	x0, x19
	bl	_bus_alloc_resources
	cbz	x0, LBB0_3
; %bb.1:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
LBB0_2:
	mov	x0, x19
	bl	_device_printf
	b	LBB0_28
LBB0_3:
Lloh4:
	adrp	x8, _compat_data@GOTPAGE
Lloh5:
	ldr	x8, [x8, _compat_data@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ofw_bus_search_compatible
	ldr	w8, [x0]
	cmp	w8, #129
	b.eq	LBB0_6
; %bb.4:
	cmp	w8, #128
	b.ne	LBB0_8
; %bb.5:
	mov	w8, #64
	b	LBB0_7
LBB0_6:
	mov	w8, #16
LBB0_7:
	str	w8, [x20]
LBB0_8:
	add	x3, sp, #24
	mov	x0, x19
	mov	w1, #0
	mov	w2, #0
	bl	_hwreset_get_by_ofw_idx
	cbz	x0, LBB0_11
LBB0_9:
	mov	x0, x20
	bl	_aw_ir_buf_reset
Lloh7:
	adrp	x2, l_.str.2@PAGE
Lloh8:
	add	x2, x2, l_.str.2@PAGEOFF
	add	x3, sp, #8
	mov	x0, x19
	mov	w1, #0
	bl	_clk_get_by_ofw_name
	cbz	w0, LBB0_13
; %bb.10:
Lloh9:
	adrp	x1, l_.str.3@PAGE
Lloh10:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_21
LBB0_11:
	ldr	x0, [sp, #24]
	bl	_hwreset_deassert
	cbz	w0, LBB0_9
; %bb.12:
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_21
LBB0_13:
Lloh13:
	adrp	x2, l_.str.4@PAGE
Lloh14:
	add	x2, x2, l_.str.4@PAGEOFF
	add	x3, sp, #16
	mov	x0, x19
	mov	w1, #0
	bl	_clk_get_by_ofw_name
	cbz	w0, LBB0_15
; %bb.14:
Lloh15:
	adrp	x1, l_.str.5@PAGE
Lloh16:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_21
LBB0_15:
	ldr	x0, [sp, #16]
Lloh17:
	adrp	x8, _AW_IR_BASE_CLK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _AW_IR_BASE_CLK@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_clk_set_freq
	cbz	w0, LBB0_17
; %bb.16:
Lloh20:
	adrp	x1, l_.str.6@PAGE
Lloh21:
	add	x1, x1, l_.str.6@PAGEOFF
	b	LBB0_21
LBB0_17:
	ldr	x0, [sp, #8]
	bl	_clk_enable
	cbz	w0, LBB0_19
; %bb.18:
Lloh22:
	adrp	x1, l_.str.7@PAGE
Lloh23:
	add	x1, x1, l_.str.7@PAGEOFF
	b	LBB0_21
LBB0_19:
	ldr	x0, [sp, #16]
	bl	_clk_enable
	cbz	w0, LBB0_30
; %bb.20:
Lloh24:
	adrp	x1, l_.str.8@PAGE
Lloh25:
	add	x1, x1, l_.str.8@PAGEOFF
LBB0_21:
	mov	x0, x19
	bl	_device_printf
	ldr	x0, [sp, #8]
	cbz	x0, LBB0_23
; %bb.22:
	bl	_clk_release
LBB0_23:
	ldr	x0, [sp, #16]
	cbz	x0, LBB0_25
; %bb.24:
	bl	_clk_release
LBB0_25:
	ldr	x0, [sp, #24]
	cbz	x0, LBB0_27
; %bb.26:
	bl	_hwreset_release
LBB0_27:
	ldr	x0, [x20, #16]
	bl	_evdev_free
	str	xzr, [x20, #16]
	ldr	w1, [x22]
	ldr	x2, [x20, #8]
	mov	x0, x19
	bl	_bus_release_resources
LBB0_28:
Lloh26:
	adrp	x8, _ENXIO@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
LBB0_29:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_30:
	ldr	x8, [x20, #8]
	ldr	w1, [x8, #4]
Lloh29:
	adrp	x8, _INTR_TYPE_MISC@GOTPAGE
Lloh30:
	ldr	x8, [x8, _INTR_TYPE_MISC@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
Lloh32:
	adrp	x9, _INTR_MPSAFE@GOTPAGE
Lloh33:
	ldr	x9, [x9, _INTR_MPSAFE@GOTPAGEOFF]
Lloh34:
	ldr	w9, [x9]
	orr	w2, w9, w8
Lloh35:
	adrp	x8, _aw_ir_intr@GOTPAGE
Lloh36:
	ldr	x8, [x8, _aw_ir_intr@GOTPAGEOFF]
Lloh37:
	ldr	w4, [x8]
	add	x6, x20, #28
	mov	x0, x19
	mov	x3, #0
	mov	x5, x20
	bl	_bus_setup_intr
	cbz	x0, LBB0_32
; %bb.31:
	ldr	w1, [x22]
	ldr	x2, [x20, #8]
	mov	x0, x19
	bl	_bus_release_resources
Lloh38:
	adrp	x1, l_.str.9@PAGE
Lloh39:
	add	x1, x1, l_.str.9@PAGEOFF
	b	LBB0_2
LBB0_32:
Lloh40:
	adrp	x23, _AW_IR_CTL@GOTPAGE
Lloh41:
	ldr	x23, [x23, _AW_IR_CTL@GOTPAGEOFF]
	ldr	w1, [x23]
Lloh42:
	adrp	x8, _AW_IR_CTL_MD@GOTPAGE
Lloh43:
	ldr	x8, [x8, _AW_IR_CTL_MD@GOTPAGEOFF]
Lloh44:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_WRITE
Lloh45:
	adrp	x8, _AW_IR_SAMPLE_128@GOTPAGE
Lloh46:
	ldr	x8, [x8, _AW_IR_SAMPLE_128@GOTPAGEOFF]
Lloh47:
	adrp	x9, _AW_IR_RXFILT_VAL@GOTPAGE
Lloh48:
	ldr	x9, [x9, _AW_IR_RXFILT_VAL@GOTPAGEOFF]
Lloh49:
	ldr	w8, [x8]
Lloh50:
	ldr	w9, [x9]
Lloh51:
	adrp	x10, _AW_IR_RXIDLE_VAL@GOTPAGE
Lloh52:
	ldr	x10, [x10, _AW_IR_RXIDLE_VAL@GOTPAGEOFF]
Lloh53:
	adrp	x11, _AW_IR_ACTIVE_T@GOTPAGE
Lloh54:
	ldr	x11, [x11, _AW_IR_ACTIVE_T@GOTPAGEOFF]
Lloh55:
	ldr	w10, [x10]
Lloh56:
	ldr	w11, [x11]
Lloh57:
	adrp	x12, _AW_IR_ACTIVE_T_C@GOTPAGE
Lloh58:
	ldr	x12, [x12, _AW_IR_ACTIVE_T_C@GOTPAGEOFF]
Lloh59:
	ldr	w12, [x12]
	orr	w8, w9, w8
	orr	w8, w8, w10
	orr	w8, w8, w11
	orr	w2, w8, w12
Lloh60:
	adrp	x8, _AW_IR_CIR@GOTPAGE
Lloh61:
	ldr	x8, [x8, _AW_IR_CIR@GOTPAGEOFF]
Lloh62:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_WRITE
Lloh63:
	adrp	x8, _AW_IR_RXCTL@GOTPAGE
Lloh64:
	ldr	x8, [x8, _AW_IR_RXCTL@GOTPAGEOFF]
Lloh65:
	ldr	w1, [x8]
Lloh66:
	adrp	x8, _AW_IR_RXCTL_RPPI@GOTPAGE
Lloh67:
	ldr	x8, [x8, _AW_IR_RXCTL_RPPI@GOTPAGEOFF]
Lloh68:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_WRITE
Lloh69:
	adrp	x8, _AW_IR_RXSTA@GOTPAGE
Lloh70:
	ldr	x8, [x8, _AW_IR_RXSTA@GOTPAGEOFF]
Lloh71:
	ldr	w1, [x8]
Lloh72:
	adrp	x8, _AW_IR_RXSTA_CLEARALL@GOTPAGE
Lloh73:
	ldr	x8, [x8, _AW_IR_RXSTA_CLEARALL@GOTPAGEOFF]
Lloh74:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_WRITE
Lloh75:
	adrp	x8, _AW_IR_RXINT@GOTPAGE
Lloh76:
	ldr	x8, [x8, _AW_IR_RXINT@GOTPAGEOFF]
Lloh77:
	ldr	w21, [x8]
Lloh78:
	adrp	x8, _AW_IR_RXINT_ROI_EN@GOTPAGE
Lloh79:
	ldr	x8, [x8, _AW_IR_RXINT_ROI_EN@GOTPAGEOFF]
Lloh80:
	ldr	w8, [x8]
Lloh81:
	adrp	x9, _AW_IR_RXINT_RPEI_EN@GOTPAGE
Lloh82:
	ldr	x9, [x9, _AW_IR_RXINT_RPEI_EN@GOTPAGEOFF]
Lloh83:
	ldr	w9, [x9]
Lloh84:
	adrp	x10, _AW_IR_RXINT_RAI_EN@GOTPAGE
Lloh85:
	ldr	x10, [x10, _AW_IR_RXINT_RAI_EN@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh86:
	ldr	w9, [x10]
	orr	w24, w8, w9
	ldr	w8, [x20]
	asr	w8, w8, #1
	sub	w0, w8, #1
	bl	_AW_IR_RXINT_RAL
	orr	w2, w24, w0
	mov	x0, x20
	mov	x1, x21
	bl	_WRITE
	ldr	w1, [x23]
	mov	x0, x20
	bl	_READ
	ldr	w1, [x23]
Lloh87:
	adrp	x8, _AW_IR_CTL_GEN@GOTPAGE
Lloh88:
	ldr	x8, [x8, _AW_IR_CTL_GEN@GOTPAGEOFF]
Lloh89:
	ldr	w8, [x8]
	orr	w8, w8, w0
Lloh90:
	adrp	x9, _AW_IR_CTL_RXEN@GOTPAGE
Lloh91:
	ldr	x9, [x9, _AW_IR_CTL_RXEN@GOTPAGEOFF]
Lloh92:
	ldr	w9, [x9]
	orr	w2, w8, w9
	mov	x0, x20
	bl	_WRITE
	bl	_evdev_alloc
	mov	x21, x0
	str	x0, [x20, #16]
	ldr	w0, [x20, #24]
	bl	_device_get_desc
	mov	x1, x0
	mov	x0, x21
	bl	_evdev_set_name
	ldr	x21, [x20, #16]
	ldr	w0, [x20, #24]
	bl	_device_get_nameunit
	mov	x1, x0
	mov	x0, x21
	bl	_evdev_set_phys
	ldr	x0, [x20, #16]
Lloh93:
	adrp	x8, _BUS_HOST@GOTPAGE
Lloh94:
	ldr	x8, [x8, _BUS_HOST@GOTPAGEOFF]
Lloh95:
	ldr	w1, [x8]
	mov	w2, #0
	mov	w3, #0
	mov	w4, #0
	bl	_evdev_set_id
	ldr	x0, [x20, #16]
Lloh96:
	adrp	x8, _EV_SYN@GOTPAGE
Lloh97:
	ldr	x8, [x8, _EV_SYN@GOTPAGEOFF]
Lloh98:
	ldr	w1, [x8]
	bl	_evdev_support_event
	ldr	x0, [x20, #16]
Lloh99:
	adrp	x8, _EV_MSC@GOTPAGE
Lloh100:
	ldr	x8, [x8, _EV_MSC@GOTPAGEOFF]
Lloh101:
	ldr	w1, [x8]
	bl	_evdev_support_event
	ldr	x0, [x20, #16]
Lloh102:
	adrp	x8, _MSC_SCAN@GOTPAGE
Lloh103:
	ldr	x8, [x8, _MSC_SCAN@GOTPAGEOFF]
Lloh104:
	ldr	w1, [x8]
	bl	_evdev_support_msc
	ldr	x0, [x20, #16]
	bl	_evdev_register
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_29
; %bb.33:
	str	x0, [sp]
Lloh105:
	adrp	x1, l_.str.10@PAGE
Lloh106:
	add	x1, x1, l_.str.10@PAGEOFF
	b	LBB0_21
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh102, Lloh103, Lloh104
	.loh AdrpLdrGotLdr	Lloh99, Lloh100, Lloh101
	.loh AdrpLdrGotLdr	Lloh96, Lloh97, Lloh98
	.loh AdrpLdrGotLdr	Lloh93, Lloh94, Lloh95
	.loh AdrpLdrGotLdr	Lloh90, Lloh91, Lloh92
	.loh AdrpLdrGotLdr	Lloh87, Lloh88, Lloh89
	.loh AdrpLdrGotLdr	Lloh84, Lloh85, Lloh86
	.loh AdrpLdrGotLdr	Lloh81, Lloh82, Lloh83
	.loh AdrpLdrGotLdr	Lloh78, Lloh79, Lloh80
	.loh AdrpLdrGotLdr	Lloh75, Lloh76, Lloh77
	.loh AdrpLdrGotLdr	Lloh72, Lloh73, Lloh74
	.loh AdrpLdrGotLdr	Lloh69, Lloh70, Lloh71
	.loh AdrpLdrGotLdr	Lloh66, Lloh67, Lloh68
	.loh AdrpLdrGotLdr	Lloh63, Lloh64, Lloh65
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh56
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh55
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh50
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh49
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpAdd	Lloh105, Lloh106
	.cfi_endproc
                                        ; -- End function
	.comm	_aw_ir_spec,4,2                 ; @aw_ir_spec
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not allocate memory resource\n"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_compat_data,4,2                ; @compat_data
l_.str.1:                               ; @.str.1
	.asciz	"cannot de-assert reset\n"

l_.str.2:                               ; @.str.2
	.asciz	"apb"

l_.str.3:                               ; @.str.3
	.asciz	"Cannot get gate clock\n"

l_.str.4:                               ; @.str.4
	.asciz	"ir"

l_.str.5:                               ; @.str.5
	.asciz	"Cannot get IR clock\n"

	.comm	_AW_IR_BASE_CLK,4,2             ; @AW_IR_BASE_CLK
l_.str.6:                               ; @.str.6
	.asciz	"cannot set IR clock rate\n"

l_.str.7:                               ; @.str.7
	.asciz	"Cannot enable clk gate\n"

l_.str.8:                               ; @.str.8
	.asciz	"Cannot enable IR clock\n"

	.comm	_INTR_TYPE_MISC,4,2             ; @INTR_TYPE_MISC
	.comm	_INTR_MPSAFE,4,2                ; @INTR_MPSAFE
	.comm	_aw_ir_intr,4,2                 ; @aw_ir_intr
l_.str.9:                               ; @.str.9
	.asciz	"cannot setup interrupt handler\n"

	.comm	_AW_IR_CTL,4,2                  ; @AW_IR_CTL
	.comm	_AW_IR_CTL_MD,4,2               ; @AW_IR_CTL_MD
	.comm	_AW_IR_SAMPLE_128,4,2           ; @AW_IR_SAMPLE_128
	.comm	_AW_IR_RXFILT_VAL,4,2           ; @AW_IR_RXFILT_VAL
	.comm	_AW_IR_RXIDLE_VAL,4,2           ; @AW_IR_RXIDLE_VAL
	.comm	_AW_IR_ACTIVE_T,4,2             ; @AW_IR_ACTIVE_T
	.comm	_AW_IR_ACTIVE_T_C,4,2           ; @AW_IR_ACTIVE_T_C
	.comm	_AW_IR_CIR,4,2                  ; @AW_IR_CIR
	.comm	_AW_IR_RXCTL,4,2                ; @AW_IR_RXCTL
	.comm	_AW_IR_RXCTL_RPPI,4,2           ; @AW_IR_RXCTL_RPPI
	.comm	_AW_IR_RXSTA,4,2                ; @AW_IR_RXSTA
	.comm	_AW_IR_RXSTA_CLEARALL,4,2       ; @AW_IR_RXSTA_CLEARALL
	.comm	_AW_IR_RXINT,4,2                ; @AW_IR_RXINT
	.comm	_AW_IR_RXINT_ROI_EN,4,2         ; @AW_IR_RXINT_ROI_EN
	.comm	_AW_IR_RXINT_RPEI_EN,4,2        ; @AW_IR_RXINT_RPEI_EN
	.comm	_AW_IR_RXINT_RAI_EN,4,2         ; @AW_IR_RXINT_RAI_EN
	.comm	_AW_IR_CTL_GEN,4,2              ; @AW_IR_CTL_GEN
	.comm	_AW_IR_CTL_RXEN,4,2             ; @AW_IR_CTL_RXEN
	.comm	_BUS_HOST,4,2                   ; @BUS_HOST
	.comm	_EV_SYN,4,2                     ; @EV_SYN
	.comm	_EV_MSC,4,2                     ; @EV_MSC
	.comm	_MSC_SCAN,4,2                   ; @MSC_SCAN
l_.str.10:                              ; @.str.10
	.asciz	"failed to register evdev: error=%d\n"

	.no_dead_strip	_aw_ir_attach
.subsections_via_symbols
