	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_falcon_ctor               ## -- Begin function nvkm_falcon_ctor
	.p2align	4, 0x90
_nvkm_falcon_ctor:                      ## @nvkm_falcon_ctor
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%r8, %rbx
	movq	%rsi, %r14
	movq	%rdi, 64(%r8)
	movq	%rsi, 56(%r8)
	movq	%rdx, (%r8)
	movl	%ecx, 8(%r8)
	leaq	48(%r8), %rdi
	callq	_mutex_init
	leaq	44(%rbx), %rdi
	callq	_mutex_init
	movq	%rbx, %rdi
	movl	$300, %esi                      ## imm = 0x12C
	callq	_nvkm_falcon_rd32
	movl	%eax, %ecx
	andl	$15, %ecx
	movl	%ecx, 12(%rbx)
	movl	%eax, %ecx
	shrl	$4, %ecx
	andl	$3, %ecx
	movl	%ecx, 16(%rbx)
	movl	%eax, %ecx
	shrl	$8, %ecx
	andl	$15, %ecx
	movl	%ecx, 36(%rbx)
	shrl	$12, %eax
	andl	$15, %eax
	movl	%eax, 28(%rbx)
	movq	%rbx, %rdi
	movl	$264, %esi                      ## imm = 0x108
	callq	_nvkm_falcon_rd32
	movl	%eax, %ecx
	shll	$8, %ecx
	andl	$130816, %ecx                   ## imm = 0x1FF00
	movl	%ecx, 40(%rbx)
	shrl	%eax
	andl	$130816, %eax                   ## imm = 0x1FF00
	movl	%eax, 32(%rbx)
	movslq	(%r14), %rax
	leal	-128(%rax), %ecx
	cmpl	$4, %ecx
	ja	LBB0_3
## %bb.1:
	movl	$3080, %esi                     ## imm = 0xC08
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rcx,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_2:
	movl	$1, 20(%rbx)
	movl	$1032, %esi                     ## imm = 0x408
	jmp	LBB0_5
LBB0_3:
	movq	_nvkm_subdev_name@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx,%rax,4), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_nvkm_warn                      ## TAILCALL
LBB0_4:
	movl	$3328, %esi                     ## imm = 0xD00
LBB0_5:
	movq	%rbx, %rdi
	callq	_nvkm_falcon_rd32
	shrl	$20, %eax
	andl	$1, %eax
	movl	%eax, 24(%rbx)
LBB0_6:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
LJTI0_0:
	.long	L0_0_set_5
	.long	L0_0_set_6
	.long	L0_0_set_2
	.long	L0_0_set_4
	.long	L0_0_set_6
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unsupported falcon %s!\n"

	.comm	_nvkm_subdev_name,8,3           ## @nvkm_subdev_name
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_falcon_ctor               ; -- Begin function nvkm_falcon_ctor
	.p2align	2
_nvkm_falcon_ctor:                      ; @nvkm_falcon_ctor
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x4
	mov	x20, x1
	stp	x1, x0, [x4, #56]
	str	x2, [x4]
	str	w3, [x4, #8]
	add	x0, x4, #48
	bl	_mutex_init
	add	x0, x19, #44
	bl	_mutex_init
	mov	x0, x19
	mov	w1, #300
	bl	_nvkm_falcon_rd32
	and	w8, w0, #0xf
	ubfx	w9, w0, #4, #2
	stp	w8, w9, [x19, #12]
	ubfx	w8, w0, #8, #4
	str	w8, [x19, #36]
	ubfx	w8, w0, #12, #4
	str	w8, [x19, #28]
	mov	x0, x19
	mov	w1, #264
	bl	_nvkm_falcon_rd32
	ubfiz	w8, w0, #8, #9
	str	w8, [x19, #40]
	lsr	w8, w0, #1
	and	w8, w8, #0x1ff00
	str	w8, [x19, #32]
	ldrsw	x8, [x20]
	sub	w9, w8, #128
	cmp	w9, #4
	b.hi	LBB0_3
; %bb.1:
	mov	w1, #3080
Lloh0:
	adrp	x8, lJTI0_0@PAGE
Lloh1:
	add	x8, x8, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x8, x9]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	mov	w8, #1
	str	w8, [x19, #20]
	mov	w1, #1032
	b	LBB0_5
LBB0_3:
Lloh2:
	adrp	x9, _nvkm_subdev_name@GOTPAGE
Lloh3:
	ldr	x9, [x9, _nvkm_subdev_name@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	ldr	w2, [x9, x8, lsl #2]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_nvkm_warn
LBB0_4:
	mov	w1, #3328
LBB0_5:
	mov	x0, x19
	bl	_nvkm_falcon_rd32
	ubfx	w8, w0, #20, #1
	str	w8, [x19, #24]
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unsupported falcon %s!\n"

	.comm	_nvkm_subdev_name,8,3           ; @nvkm_subdev_name
.subsections_via_symbols
