	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sh_cmt_setup
_sh_cmt_setup:                          ## @sh_cmt_setup
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r13
	movq	(%rsi), %r15
	movq	_ENXIO@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	xorl	%esi, %esi
	movl	$64, %edx
	callq	_memset
	movq	%rbx, 56(%r13)
	testq	%r15, %r15
	je	LBB0_1
## %bb.2:
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_platform_set_drvdata
	movq	56(%r13), %rdi
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_platform_get_resource
	movq	56(%r13), %rdi
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r12
	xorl	%esi, %esi
	callq	_platform_get_irq
	testl	%eax, %eax
	js	LBB0_5
## %bb.6:
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	(%r12), %ebx
	movq	%r12, %rdi
	callq	_resource_size
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ioremap_nocache
	movq	%rax, 16(%r13)
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movl	12(%r15), %eax
	leaq	24(%r13), %rsi
	movl	%eax, 44(%r13)
	movq	_sh_cmt_interrupt@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%r13)
	movq	%r13, 32(%r13)
	movq	_IRQF_DISABLED@GOTPCREL(%rip), %rax
	movq	_IRQF_TIMER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_IRQF_IRQPOLL@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, 24(%r13)
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edi
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	callq	_setup_irq
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	%eax, %r14d
	leaq	L_.str.4(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_pr_err
	jmp	LBB0_12
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_err
	jmp	LBB0_13
LBB0_3:
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_13
LBB0_5:
	movq	56(%r13), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_13
LBB0_7:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_err
	jmp	LBB0_13
LBB0_10:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	56(%r13), %rdi
	movl	(%r15), %esi
	callq	_clk_get
	movl	%eax, 48(%r13)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_14
## %bb.11:
	movl	(%r15), %esi
	leaq	L_.str.5(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_err
	movl	48(%r13), %edi
	callq	_PTR_ERR
	movl	%eax, %r14d
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	%rbx, %rsi
	callq	_remove_irq
LBB0_12:
	movq	16(%r13), %rdi
	callq	_iounmap
LBB0_13:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	%r12, %rdi
	callq	_resource_size
	xorl	%ecx, %ecx
	cmpl	$6, %eax
	setne	%cl
	movl	$128, %eax
	movl	$32768, %edx                    ## imm = 0x8000
	cmovel	%eax, %edx
	movl	$-129, %eax
	movl	$-49153, %esi                   ## imm = 0xFFFF3FFF
	cmovel	%eax, %esi
	shll	$4, %ecx
	addl	$16, %ecx
	movl	%ecx, (%r13)
	movl	%edx, 4(%r13)
	movl	%esi, 8(%r13)
	movl	12(%r15), %esi
	movl	4(%r15), %ecx
	movl	8(%r15), %edx
	movq	%r13, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sh_cmt_register                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ENXIO,4,2                      ## @ENXIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"missing platform data\n"

	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
L_.str.1:                               ## @.str.1
	.asciz	"failed to get I/O memory\n"

L_.str.2:                               ## @.str.2
	.asciz	"failed to get irq\n"

L_.str.3:                               ## @.str.3
	.asciz	"sh_cmt: failed to remap I/O memory\n"

	.comm	_sh_cmt_interrupt,4,2           ## @sh_cmt_interrupt
	.comm	_IRQF_DISABLED,4,2              ## @IRQF_DISABLED
	.comm	_IRQF_TIMER,4,2                 ## @IRQF_TIMER
	.comm	_IRQF_IRQPOLL,4,2               ## @IRQF_IRQPOLL
L_.str.4:                               ## @.str.4
	.asciz	"sh_cmt: failed to request irq %d\n"

L_.str.5:                               ## @.str.5
	.asciz	"sh_cmt: cannot get clock \"%s\"\n"

	.no_dead_strip	_sh_cmt_setup
.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 sh_cmt_setup
lCPI0_0:
	.long	32                              ; 0x20
	.long	32768                           ; 0x8000
lCPI0_1:
	.long	16                              ; 0x10
	.long	128                             ; 0x80
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_sh_cmt_setup:                          ; @sh_cmt_setup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x21, x1
	mov	x19, x0
	ldr	x24, [x1]
Lloh0:
	adrp	x8, _ENXIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w20, w8
	mov	w1, #0
	mov	w2, #64
	bl	_memset
	str	x21, [x19, #56]
	cbz	x24, LBB0_6
; %bb.1:
	mov	x0, x21
	mov	x1, x19
	bl	_platform_set_drvdata
	ldr	x0, [x19, #56]
Lloh3:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_platform_get_resource
	mov	x22, x0
	ldr	x0, [x19, #56]
	cbz	x22, LBB0_7
; %bb.2:
	mov	w1, #0
	bl	_platform_get_irq
	tbnz	w0, #31, LBB0_8
; %bb.3:
	mov	x21, x0
	ldr	w23, [x22]
	mov	x0, x22
	bl	_resource_size
	mov	x1, x0
	mov	x0, x23
	bl	_ioremap_nocache
	str	x0, [x19, #16]
	cbz	x0, LBB0_9
; %bb.4:
Lloh6:
	adrp	x8, _IRQF_DISABLED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IRQF_DISABLED@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _IRQF_TIMER@GOTPAGE
Lloh10:
	ldr	x9, [x9, _IRQF_TIMER@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh12:
	adrp	x9, _IRQF_IRQPOLL@GOTPAGE
Lloh13:
	ldr	x9, [x9, _IRQF_IRQPOLL@GOTPAGEOFF]
	ldr	w10, [x24, #12]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w8, w9
	mov	x23, x19
	str	w8, [x23, #24]!
Lloh15:
	adrp	x8, _sh_cmt_interrupt@GOTPAGE
Lloh16:
	ldr	x8, [x8, _sh_cmt_interrupt@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	stp	w8, w10, [x19, #40]
	str	x19, [x19, #32]
	mov	x0, x21
	mov	x1, x23
	bl	_setup_irq
	cbz	w0, LBB0_10
; %bb.5:
	mov	x20, x0
	str	x21, [sp]
Lloh18:
	adrp	x0, l_.str.4@PAGE
Lloh19:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_pr_err
	b	LBB0_12
LBB0_6:
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_err
	b	LBB0_13
LBB0_7:
Lloh22:
	adrp	x1, l_.str.1@PAGE
Lloh23:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	b	LBB0_13
LBB0_8:
	ldr	x0, [x19, #56]
Lloh24:
	adrp	x1, l_.str.2@PAGE
Lloh25:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
	b	LBB0_13
LBB0_9:
Lloh26:
	adrp	x0, l_.str.3@PAGE
Lloh27:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_err
	b	LBB0_13
LBB0_10:
	ldr	x0, [x19, #56]
	ldr	w1, [x24]
	bl	_clk_get
	str	w0, [x19, #48]
	bl	_IS_ERR
	cbz	x0, LBB0_14
; %bb.11:
	ldr	w8, [x24]
	str	x8, [sp]
Lloh28:
	adrp	x0, l_.str.5@PAGE
Lloh29:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_pr_err
	ldr	w0, [x19, #48]
	bl	_PTR_ERR
	mov	x20, x0
	mov	x0, x21
	mov	x1, x23
	bl	_remove_irq
LBB0_12:
	ldr	x0, [x19, #16]
	bl	_iounmap
LBB0_13:
	mov	x0, x20
	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
	add	sp, sp, #80
	ret
LBB0_14:
	mov	x0, x22
	bl	_resource_size
	mov	w8, #-49153
	mov	w9, #-129
	cmp	w0, #6
	csel	w8, w9, w8, eq
	cset	w9, eq
	dup.2s	v0, w9
	shl.2s	v0, v0, #31
	cmlt.2s	v0, v0, #0
Lloh30:
	adrp	x9, lCPI0_0@PAGE
Lloh31:
	ldr	d1, [x9, lCPI0_0@PAGEOFF]
Lloh32:
	adrp	x9, lCPI0_1@PAGE
Lloh33:
	ldr	d2, [x9, lCPI0_1@PAGEOFF]
	bsl.8b	v0, v2, v1
	str	d0, [x19]
	str	w8, [x19, #8]
	ldp	w2, w1, [x24, #8]
	ldr	w3, [x24, #4]
	mov	x0, x19
	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
	add	sp, sp, #80
	b	_sh_cmt_register
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdr	Lloh32, Lloh33
	.loh AdrpAdrp	Lloh30, Lloh32
	.loh AdrpLdr	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_ENXIO,4,2                      ; @ENXIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"missing platform data\n"

	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
l_.str.1:                               ; @.str.1
	.asciz	"failed to get I/O memory\n"

l_.str.2:                               ; @.str.2
	.asciz	"failed to get irq\n"

l_.str.3:                               ; @.str.3
	.asciz	"sh_cmt: failed to remap I/O memory\n"

	.comm	_sh_cmt_interrupt,4,2           ; @sh_cmt_interrupt
	.comm	_IRQF_DISABLED,4,2              ; @IRQF_DISABLED
	.comm	_IRQF_TIMER,4,2                 ; @IRQF_TIMER
	.comm	_IRQF_IRQPOLL,4,2               ; @IRQF_IRQPOLL
l_.str.4:                               ; @.str.4
	.asciz	"sh_cmt: failed to request irq %d\n"

l_.str.5:                               ; @.str.5
	.asciz	"sh_cmt: cannot get clock \"%s\"\n"

	.no_dead_strip	_sh_cmt_setup
.subsections_via_symbols
