	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nouveau_rom_call
_nouveau_rom_call:                      ## @nouveau_rom_call
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r12d
	movl	%edx, %r15d
	movq	%rsi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_ACPI_ALLOCATE_BUFFER@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movq	%rax, -104(%rbp)
	movq	$0, -96(%rbp)
	movl	$0, -88(%rbp)
	movl	$2, -120(%rbp)
	leaq	-80(%rbp), %rax
	movq	%rax, -112(%rbp)
	movq	_ACPI_TYPE_INTEGER@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -80(%rbp)
	movl	%edx, -80(%rbp)
	movq	%rax, -64(%rbp)
	movl	%ecx, -64(%rbp)
	xorl	%r13d, %r13d
	leaq	-120(%rbp), %rdx
	leaq	-104(%rbp), %rcx
	xorl	%esi, %esi
	callq	_acpi_evaluate_object
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_ACPI_FAILURE
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	%ebx, %edi
	callq	_acpi_format_exception
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_info
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
	jmp	LBB0_3
LBB0_2:
	movq	-104(%rbp), %rbx
	movl	8(%rbx), %esi
	movl	%r12d, %edi
	callq	_min
	movl	%eax, %r13d
	movslq	%r15d, %rax
	leaq	(%r14,%rax,4), %rdi
	movl	(%rbx), %esi
	movl	%r13d, %edx
	callq	_memcpy
	movq	-104(%rbp), %rdi
	callq	_kfree
LBB0_3:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_5
## %bb.4:
	movl	%r13d, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ACPI_ALLOCATE_BUFFER,4,2       ## @ACPI_ALLOCATE_BUFFER
	.comm	_ACPI_TYPE_INTEGER,8,3          ## @ACPI_TYPE_INTEGER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to evaluate ROM got %s\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_nouveau_rom_call
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nouveau_rom_call
_nouveau_rom_call:                      ; @nouveau_rom_call
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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, x3
	mov	x19, x2
	mov	x20, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x8, _ACPI_ALLOCATE_BUFFER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ACPI_ALLOCATE_BUFFER@GOTPAGEOFF]
Lloh5:
	ldrsw	x8, [x8]
	stp	x8, xzr, [sp]
	mov	w8, #2
	str	w8, [sp, #24]
	add	x8, sp, #40
	str	x8, [sp, #32]
Lloh6:
	adrp	x8, _ACPI_TYPE_INTEGER@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ACPI_TYPE_INTEGER@GOTPAGEOFF]
	str	wzr, [sp, #16]
Lloh8:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	str	x8, [sp, #56]
	str	w2, [sp, #40]
	str	w3, [sp, #56]
	add	x2, sp, #24
	mov	x3, sp
	mov	x1, #0
	bl	_acpi_evaluate_object
	mov	x22, x0
	bl	_ACPI_FAILURE
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x22
	bl	_acpi_format_exception
	mov	x1, x0
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_info
Lloh11:
	adrp	x8, _ENODEV@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_3
LBB0_2:
	ldr	x22, [sp]
	ldr	w1, [x22, #8]
	mov	x0, x21
	bl	_min
	mov	x21, x0
	add	x0, x20, w19, sxtw #2
	ldr	w1, [x22]
	mov	x2, x21
	bl	_memcpy
	ldr	x0, [sp]
	bl	_kfree
LBB0_3:
	ldur	x8, [x29, #-40]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	mov	x0, x21
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_ACPI_ALLOCATE_BUFFER,4,2       ; @ACPI_ALLOCATE_BUFFER
	.comm	_ACPI_TYPE_INTEGER,8,3          ; @ACPI_TYPE_INTEGER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to evaluate ROM got %s\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_nouveau_rom_call
.subsections_via_symbols
