	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_firmware_get_version      ## -- Begin function nvkm_firmware_get_version
	.p2align	4, 0x90
_nvkm_firmware_get_version:             ## @nvkm_firmware_get_version
	.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	$120, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -160(%rbp)                 ## 8-byte Spill
	movl	%ecx, %r15d
	movl	%edx, -132(%rbp)                ## 4-byte Spill
	movq	%rsi, -144(%rbp)                ## 8-byte Spill
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %rax
	movq	%rax, -152(%rbp)                ## 8-byte Spill
	movq	8(%rax), %rax
	movl	(%rax), %esi
	leaq	-128(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$16, %edx
	callq	_strncpy
	movb	$0, -113(%rbp)
	movq	%rbx, %rdi
	callq	_strlen
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movl	%eax, %r12d
	cltq
	negl	%r12d
	addq	%rax, %rbx
	decq	%rbx
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movsbl	(%rbx,%r13), %edi
	callq	_tolower
	movb	%al, (%rbx,%r13)
	decq	%r13
	cmpl	%r13d, %r12d
	jne	LBB0_2
LBB0_3:
	cmpl	-132(%rbp), %r15d               ## 4-byte Folded Reload
	movq	-144(%rbp), %r13                ## 8-byte Reload
	jl	LBB0_11
## %bb.4:
	leaq	-112(%rbp), %r12
	movl	%r15d, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	$64, %esi
	subl	$1, %ebx
	jae	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	leaq	L_.str.1(%rip), %rdx
	leaq	-128(%rbp), %rcx
	movq	%r13, %r8
	xorl	%eax, %eax
	callq	_snprintf
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_5 Depth=1
	leaq	L_.str(%rip), %rdx
	leaq	-128(%rbp), %rcx
	movq	%r13, %r8
	movl	%r15d, %r9d
	xorl	%eax, %eax
	callq	_snprintf
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	-152(%rbp), %rax                ## 8-byte Reload
	movl	(%rax), %edx
	movq	-160(%rbp), %rdi                ## 8-byte Reload
	movq	%r12, %rsi
	callq	_firmware_request_nowarn
	testl	%eax, %eax
	je	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%r14, %rdi
	leaq	L_.str.3(%rip), %rsi
	movq	%r12, %rdx
	callq	_nvkm_debug
	leal	1(%rbx), %eax
	movl	%ebx, %r15d
	cmpl	-132(%rbp), %eax                ## 4-byte Folded Reload
	jg	LBB0_5
LBB0_11:
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdi
	movq	%r13, %rdx
	callq	_nvkm_error
	movq	_ENOENT@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_12
LBB0_9:
	leaq	L_.str.2(%rip), %rsi
	leaq	-112(%rbp), %rdx
	movq	%r14, %rdi
	callq	_nvkm_debug
LBB0_12:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_14
## %bb.13:
	movl	%r15d, %eax
	addq	$120, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"nvidia/%s/%s-%d.bin"

L_.str.1:                               ## @.str.1
	.asciz	"nvidia/%s/%s.bin"

L_.str.2:                               ## @.str.2
	.asciz	"firmware \"%s\" loaded\n"

L_.str.3:                               ## @.str.3
	.asciz	"firmware \"%s\" unavailable\n"

L_.str.4:                               ## @.str.4
	.asciz	"failed to load firmware \"%s\""

	.comm	_ENOENT,4,2                     ## @ENOENT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_firmware_get_version      ; -- Begin function nvkm_firmware_get_version
	.p2align	2
_nvkm_firmware_get_version:             ; @nvkm_firmware_get_version
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #192
	.cfi_def_cfa_offset 192
	stp	x28, x27, [sp, #96]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #112]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #128]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #144]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #160]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #176]            ; 16-byte Folded Spill
	add	x29, sp, #176
	.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	x22, x4
	mov	x19, x3
	mov	x23, x2
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #88]
	ldr	x27, [x0]
	ldr	x8, [x27, #8]
	ldr	w1, [x8]
	add	x25, sp, #8
	add	x0, sp, #8
	mov	w2, #16
	bl	_strncpy
	strb	wzr, [sp, #23]
	add	x0, sp, #8
	bl	_strlen
	cbz	w0, LBB0_3
; %bb.1:
	mov	x24, x0
	add	x8, x25, w0, sxtw
	sub	x25, x8, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldrsb	w0, [x25]
	bl	_tolower
	strb	w0, [x25], #-1
	subs	w24, w24, #1
	b.ne	LBB0_2
LBB0_3:
	cmp	w19, w23
	b.lt	LBB0_10
; %bb.4:
Lloh3:
	adrp	x24, l_.str.1@PAGE
Lloh4:
	add	x24, x24, l_.str.1@PAGEOFF
Lloh5:
	adrp	x25, l_.str.3@PAGE
Lloh6:
	add	x25, x25, l_.str.3@PAGEOFF
Lloh7:
	adrp	x26, l_.str@PAGE
Lloh8:
	add	x26, x26, l_.str@PAGEOFF
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	cbz	w19, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	str	x19, [sp]
	add	x0, sp, #24
	add	x3, sp, #8
	mov	w1, #64
	mov	x2, x26
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x0, sp, #24
	add	x3, sp, #8
	mov	w1, #64
	mov	x2, x24
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x4, x21
	bl	_snprintf
	ldr	w2, [x27]
	add	x1, sp, #24
	mov	x0, x22
	bl	_firmware_request_nowarn
	cbz	w0, LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x2, sp, #24
	mov	x0, x20
	mov	x1, x25
	bl	_nvkm_debug
	sub	w8, w19, #1
	cmp	w19, w23
	mov	x19, x8
	b.gt	LBB0_5
LBB0_10:
Lloh9:
	adrp	x1, l_.str.4@PAGE
Lloh10:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_nvkm_error
Lloh11:
	adrp	x8, _ENOENT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_12
LBB0_11:
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
	add	x2, sp, #24
	mov	x0, x20
	bl	_nvkm_debug
LBB0_12:
	ldr	x8, [sp, #88]
Lloh16:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh17:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.13:
	mov	x0, x19
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #128]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #112]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #192
	ret
LBB0_14:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"nvidia/%s/%s-%d.bin"

l_.str.1:                               ; @.str.1
	.asciz	"nvidia/%s/%s.bin"

l_.str.2:                               ; @.str.2
	.asciz	"firmware \"%s\" loaded\n"

l_.str.3:                               ; @.str.3
	.asciz	"firmware \"%s\" unavailable\n"

l_.str.4:                               ; @.str.4
	.asciz	"failed to load firmware \"%s\""

	.comm	_ENOENT,4,2                     ; @ENOENT
.subsections_via_symbols
