	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atmci_set_timeout
_atmci_set_timeout:                     ## @atmci_set_timeout
	.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
	movq	%rdx, %rbx
	movq	%rsi, %r14
	movq	%rdi, %r15
	movl	4(%rdx), %esi
	callq	_atmci_ns_to_clocks
                                        ## kill: def $eax killed $eax def $rax
	movl	(%rbx), %edx
	leal	(%rax,%rdx), %r12d
	xorl	%ecx, %ecx
	cmpl	$15, %r12d
	jb	LBB0_14
## %bb.1:
	addl	%edx, %eax
	decl	%eax
	leal	16(%rax), %r12d
	cmpl	$240, %r12d
	jae	LBB0_3
## %bb.2:
	shrl	$4, %r12d
	movl	$1, %ecx
	jmp	LBB0_14
LBB0_3:
	leal	128(%rax), %r12d
	cmpl	$1920, %r12d                    ## imm = 0x780
	jae	LBB0_5
## %bb.4:
	shrl	$7, %r12d
	movl	$2, %ecx
	jmp	LBB0_14
LBB0_5:
	leal	256(%rax), %r12d
	cmpl	$3840, %r12d                    ## imm = 0xF00
	jae	LBB0_7
## %bb.6:
	shrl	$8, %r12d
	movl	$3, %ecx
	jmp	LBB0_14
LBB0_7:
	leal	1024(%rax), %r12d
	cmpl	$15360, %r12d                   ## imm = 0x3C00
	jae	LBB0_9
## %bb.8:
	shrl	$10, %r12d
	movl	$4, %ecx
	jmp	LBB0_14
LBB0_9:
	leal	4096(%rax), %r12d
	cmpl	$61440, %r12d                   ## imm = 0xF000
	jae	LBB0_11
## %bb.10:
	shrl	$12, %r12d
	movl	$5, %ecx
	jmp	LBB0_14
LBB0_11:
	leal	65536(%rax), %r12d
	cmpl	$983040, %r12d                  ## imm = 0xF0000
	jae	LBB0_13
## %bb.12:
	shrl	$16, %r12d
	movl	$6, %ecx
	jmp	LBB0_14
LBB0_13:
	addl	$1048576, %eax                  ## imm = 0x100000
	movl	%eax, %ecx
	shrl	$20, %ecx
	cmpl	$15728640, %eax                 ## imm = 0xF00000
	movl	$15, %r12d
	cmovbl	%ecx, %r12d
	movl	$8, %ecx
	sbbl	$0, %ecx
LBB0_14:
	cmpl	$7, %ecx
	movl	$7, %ebx
	cmovbl	%ecx, %ebx
	movq	(%r14), %rdi
	leaq	_atmci_set_timeout.dtomul_to_shift(%rip), %rax
	movb	(%rax,%rbx,4), %cl
	movl	%r12d, %edx
	shll	%cl, %edx
	leaq	L_.str(%rip), %rsi
	callq	_dev_vdbg
	movq	_ATMCI_DTOR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	%ebx, %edi
	callq	_ATMCI_DTOMUL
	movl	%eax, %ebx
	movl	%r12d, %edi
	callq	_ATMCI_DTOCYC
	orl	%eax, %ebx
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_atmci_writel                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @atmci_set_timeout.dtomul_to_shift
_atmci_set_timeout.dtomul_to_shift:
	.long	0                               ## 0x0
	.long	4                               ## 0x4
	.long	7                               ## 0x7
	.long	8                               ## 0x8
	.long	10                              ## 0xa
	.long	12                              ## 0xc
	.long	16                              ## 0x10
	.long	20                              ## 0x14

	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"setting timeout to %u cycles\n"

	.comm	_ATMCI_DTOR,4,2                 ## @ATMCI_DTOR
	.no_dead_strip	_atmci_set_timeout
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atmci_set_timeout
_atmci_set_timeout:                     ; @atmci_set_timeout
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	w1, [x2, #4]
	bl	_atmci_ns_to_clocks
	ldr	w8, [x21]
	add	w21, w0, w8
	cmp	w21, #15
	b.hs	LBB0_2
; %bb.1:
	mov	w8, #0
	b	LBB0_15
LBB0_2:
	sub	w8, w21, #1
	add	w9, w8, #16
	cmp	w9, #240
	b.hs	LBB0_4
; %bb.3:
	lsr	w21, w9, #4
	mov	w8, #1
	b	LBB0_15
LBB0_4:
	add	w9, w8, #128
	cmp	w9, #1920
	b.hs	LBB0_6
; %bb.5:
	lsr	w21, w9, #7
	mov	w8, #2
	b	LBB0_15
LBB0_6:
	add	w9, w8, #256
	cmp	w9, #3840
	b.hs	LBB0_8
; %bb.7:
	lsr	w21, w9, #8
	mov	w8, #3
	b	LBB0_15
LBB0_8:
	add	w9, w8, #1024
	lsr	w21, w9, #10
	cmp	w21, #15
	b.hs	LBB0_10
; %bb.9:
	mov	w8, #4
	b	LBB0_15
LBB0_10:
	add	w9, w8, #1, lsl #12             ; =4096
	cmp	w9, #15, lsl #12                ; =61440
	b.hs	LBB0_12
; %bb.11:
	lsr	w21, w9, #12
	mov	w8, #5
	b	LBB0_15
LBB0_12:
	add	w9, w8, #16, lsl #12            ; =65536
	cmp	w9, #240, lsl #12               ; =983040
	b.hs	LBB0_14
; %bb.13:
	lsr	w21, w9, #16
	mov	w8, #6
	b	LBB0_15
LBB0_14:
	add	w8, w8, #256, lsl #12           ; =1048576
	lsr	w9, w8, #20
	mov	w10, #15
	cmp	w8, #3840, lsl #12              ; =15728640
	csel	w21, w9, w10, lo
	mov	w8, #7
	cinc	w8, w8, hs
LBB0_15:
	mov	w9, #7
	cmp	w8, #7
	csel	w22, w8, w9, lo
	ldr	x0, [x20]
Lloh0:
	adrp	x8, _atmci_set_timeout.dtomul_to_shift@PAGE
Lloh1:
	add	x8, x8, _atmci_set_timeout.dtomul_to_shift@PAGEOFF
	ldr	w8, [x8, w22, uxtw #2]
	lsl	w2, w21, w8
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_vdbg
Lloh4:
	adrp	x8, _ATMCI_DTOR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ATMCI_DTOR@GOTPAGEOFF]
Lloh6:
	ldr	w20, [x8]
	mov	x0, x22
	bl	_ATMCI_DTOMUL
	mov	x22, x0
	mov	x0, x21
	bl	_ATMCI_DTOCYC
	orr	w2, w0, w22
	mov	x0, x19
	mov	x1, x20
	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
	b	_atmci_writel
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @atmci_set_timeout.dtomul_to_shift
_atmci_set_timeout.dtomul_to_shift:
	.long	0                               ; 0x0
	.long	4                               ; 0x4
	.long	7                               ; 0x7
	.long	8                               ; 0x8
	.long	10                              ; 0xa
	.long	12                              ; 0xc
	.long	16                              ; 0x10
	.long	20                              ; 0x14

	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"setting timeout to %u cycles\n"

	.comm	_ATMCI_DTOR,4,2                 ; @ATMCI_DTOR
	.no_dead_strip	_atmci_set_timeout
.subsections_via_symbols
