	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sample_load_twice
_sample_load_twice:                     ## @sample_load_twice
	.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, %r14
	callq	_nouveau_dev
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_nouveau_timer
	movq	%rax, %r12
	movq	_NV_PRMCIO_INP0__COLOR@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	xorl	%ebx, %ebx
	movq	%rax, %rdi
	movl	$10000000, %esi                 ## imm = 0x989680
	movl	$1, %ecx
	xorl	%r8d, %r8d
	callq	_nouveau_timer_wait_eq
	testl	%eax, %eax
	je	LBB0_16
## %bb.1:
	movl	(%r15), %edx
	movq	%r12, %rdi
	movl	$10000000, %esi                 ## imm = 0x989680
	movl	$1, %ecx
	movl	$1, %r8d
	callq	_nouveau_timer_wait_eq
	testl	%eax, %eax
	je	LBB0_15
## %bb.2:
	movl	(%r15), %edx
	xorl	%r15d, %r15d
	movq	%r12, %rdi
	movl	$10000000, %esi                 ## imm = 0x989680
	movl	$1, %ecx
	xorl	%r8d, %r8d
	callq	_nouveau_timer_wait_eq
	testl	%eax, %eax
	je	LBB0_15
## %bb.3:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movl	$100, %edi
	callq	_udelay
	movq	_NV_PRMCIO_INP0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_nv_rd08
	movl	%eax, %ebx
	andl	$16, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	$100, %edi
	callq	_udelay
	movq	_NV_PRMCIO_INP0@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r13, %rdi
	callq	_nv_rd08
	movl	%eax, %r14d
	andl	$16, %r14d
	cmpl	%r14d, %ebx
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	(%r12), %esi
	movq	%r13, %rdi
	callq	_nv_rd08
	andl	$16, %eax
	movl	%r14d, %ecx
	shrl	$4, %ecx
	xorl	$1, %ecx
	cmpl	%eax, %r14d
	cmovel	%r14d, %ebx
	cmovnel	%r14d, %ecx
	cmpl	%ecx, %ebx
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	incl	%r15d
	movq	_MAX_HBLANK_OSC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %r15d
	jl	LBB0_4
	jmp	LBB0_8
LBB0_7:
	movq	_MAX_HBLANK_OSC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_8:
	xorl	%ecx, %ecx
	cmpl	%eax, %r15d
	cmovel	%ecx, %ebx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	%ebx, (%rax)
	movq	_NV_PRMCIO_INP0__COLOR@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movl	$10000000, %esi                 ## imm = 0x989680
	movl	$1, %ecx
	xorl	%r8d, %r8d
	callq	_nouveau_timer_wait_eq
	testl	%eax, %eax
	movl	$0, %ebx
	je	LBB0_16
## %bb.9:
	movl	(%r15), %edx
	movq	%r14, %rdi
	movl	$10000000, %esi                 ## imm = 0x989680
	movl	$1, %ecx
	movl	$1, %r8d
	callq	_nouveau_timer_wait_eq
	testl	%eax, %eax
	je	LBB0_15
## %bb.10:
	movl	(%r15), %edx
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	movl	$10000000, %esi                 ## imm = 0x989680
	movl	$1, %ecx
	xorl	%r8d, %r8d
	callq	_nouveau_timer_wait_eq
	testl	%eax, %eax
	je	LBB0_15
## %bb.11:
	movl	$100, %edi
	callq	_udelay
	movq	_NV_PRMCIO_INP0@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r13, %rdi
	callq	_nv_rd08
	movl	%eax, %r14d
	andl	$16, %r14d
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movl	$100, %edi
	callq	_udelay
	movl	(%r12), %esi
	movq	%r13, %rdi
	callq	_nv_rd08
	movl	%eax, %ebx
	andl	$16, %ebx
	cmpl	%ebx, %r14d
	je	LBB0_19
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	(%r12), %esi
	movq	%r13, %rdi
	callq	_nv_rd08
	andl	$16, %eax
	movl	%ebx, %ecx
	shrl	$4, %ecx
	xorl	$1, %ecx
	cmpl	%eax, %ebx
	cmovel	%ebx, %r14d
	cmovnel	%ebx, %ecx
	cmpl	%ecx, %r14d
	je	LBB0_19
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=1
	incl	%r15d
	movq	_MAX_HBLANK_OSC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %r15d
	jl	LBB0_12
	jmp	LBB0_20
LBB0_15:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	jmp	LBB0_17
LBB0_16:
	movq	_EBUSY@GOTPCREL(%rip), %rax
LBB0_17:
	subl	(%rax), %ebx
LBB0_18:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	movq	_MAX_HBLANK_OSC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_20:
	xorl	%ebx, %ebx
	cmpl	%eax, %r15d
	cmovel	%ebx, %r14d
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	%r14d, 4(%rax)
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_NV_PRMCIO_INP0__COLOR,4,2      ## @NV_PRMCIO_INP0__COLOR
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_NV_PRMCIO_INP0,4,2             ## @NV_PRMCIO_INP0
	.comm	_MAX_HBLANK_OSC,4,2             ## @MAX_HBLANK_OSC
	.no_dead_strip	_sample_load_twice
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sample_load_twice
_sample_load_twice:                     ; @sample_load_twice
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	bl	_nouveau_dev
	mov	x20, x0
	bl	_nouveau_timer
	mov	x21, x0
Lloh0:
	adrp	x24, _NV_PRMCIO_INP0__COLOR@GOTPAGE
Lloh1:
	ldr	x24, [x24, _NV_PRMCIO_INP0__COLOR@GOTPAGEOFF]
	ldr	w2, [x24]
	mov	w1, #38528
	movk	w1, #152, lsl #16
	mov	w3, #1
	mov	w4, #0
	bl	_nouveau_timer_wait_eq
	cbz	w0, LBB0_15
; %bb.1:
	ldr	w2, [x24]
	mov	x0, x21
	mov	w1, #38528
	movk	w1, #152, lsl #16
	mov	w3, #1
	mov	w4, #1
	bl	_nouveau_timer_wait_eq
	cbz	w0, LBB0_15
; %bb.2:
	ldr	w2, [x24]
	mov	x0, x21
	mov	w1, #38528
	movk	w1, #152, lsl #16
	mov	w3, #1
	mov	w4, #0
	bl	_nouveau_timer_wait_eq
	cbz	w0, LBB0_15
; %bb.3:
	mov	w0, #100
	bl	_udelay
Lloh2:
	adrp	x22, _NV_PRMCIO_INP0@GOTPAGE
Lloh3:
	ldr	x22, [x22, _NV_PRMCIO_INP0@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_nv_rd08
	mov	w26, #0
	and	w25, w0, #0x10
Lloh4:
	adrp	x23, _MAX_HBLANK_OSC@GOTPAGE
Lloh5:
	ldr	x23, [x23, _MAX_HBLANK_OSC@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #100
	bl	_udelay
	ldr	w1, [x22]
	mov	x0, x20
	bl	_nv_rd08
	and	w27, w0, #0x10
	cmp	w25, w27
	b.eq	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w1, [x22]
	mov	x0, x20
	bl	_nv_rd08
	and	w8, w0, #0x10
	lsr	w9, w27, #4
	eor	w9, w9, #0x1
	cmp	w27, w8
	csel	w25, w27, w25, eq
	csel	w8, w9, w27, eq
	cmp	w25, w8
	b.eq	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	add	w26, w26, #1
	ldr	w8, [x23]
	cmp	w26, w8
	b.lt	LBB0_4
	b	LBB0_8
LBB0_7:
	ldr	w8, [x23]
LBB0_8:
	cmp	w26, w8
	csel	w8, wzr, w25, eq
	str	w8, [x19]
	ldr	w2, [x24]
	mov	x0, x21
	mov	w1, #38528
	movk	w1, #152, lsl #16
	mov	w3, #1
	mov	w4, #0
	bl	_nouveau_timer_wait_eq
	cbz	w0, LBB0_15
; %bb.9:
	ldr	w2, [x24]
	mov	x0, x21
	mov	w1, #38528
	movk	w1, #152, lsl #16
	mov	w3, #1
	mov	w4, #1
	bl	_nouveau_timer_wait_eq
	cbz	w0, LBB0_15
; %bb.10:
	ldr	w2, [x24]
	mov	x0, x21
	mov	w1, #38528
	movk	w1, #152, lsl #16
	mov	w3, #1
	mov	w4, #0
	bl	_nouveau_timer_wait_eq
	cbz	w0, LBB0_15
; %bb.11:
	mov	w0, #100
	bl	_udelay
	ldr	w1, [x22]
	mov	x0, x20
	bl	_nv_rd08
	mov	w24, #0
	and	w21, w0, #0x10
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	mov	w0, #100
	bl	_udelay
	ldr	w1, [x22]
	mov	x0, x20
	bl	_nv_rd08
	and	w25, w0, #0x10
	cmp	w21, w25
	b.eq	LBB0_17
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w1, [x22]
	mov	x0, x20
	bl	_nv_rd08
	and	w8, w0, #0x10
	lsr	w9, w25, #4
	eor	w9, w9, #0x1
	cmp	w25, w8
	csel	w21, w25, w21, eq
	csel	w8, w9, w25, eq
	cmp	w21, w8
	b.eq	LBB0_17
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	add	w24, w24, #1
	ldr	w8, [x23]
	cmp	w24, w8
	b.lt	LBB0_12
	b	LBB0_18
LBB0_15:
Lloh6:
	adrp	x8, _EBUSY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_16:
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_17:
	ldr	w8, [x23]
LBB0_18:
	mov	w0, #0
	cmp	w24, w8
	csel	w8, wzr, w21, eq
	str	w8, [x19, #4]
	b	LBB0_16
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_NV_PRMCIO_INP0__COLOR,4,2      ; @NV_PRMCIO_INP0__COLOR
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_NV_PRMCIO_INP0,4,2             ; @NV_PRMCIO_INP0
	.comm	_MAX_HBLANK_OSC,4,2             ; @MAX_HBLANK_OSC
	.no_dead_strip	_sample_load_twice
.subsections_via_symbols
