	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function parse_bmp_structure
_parse_bmp_structure:                   ## @parse_bmp_structure
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	%rsi, %r15
	callq	_nouveau_drm
	movq	%rax, %rdi
	movq	(%r15), %r12
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movl	%ebx, %r13d
	movabsq	$1099511627776075, %rax         ## imm = 0x3E8000000004B
	movq	%rax, 8(%r15)
	movl	$128000, 16(%r15)               ## imm = 0x1F400
	movl	$90000, 40(%r15)                ## imm = 0x15F90
	movl	20(%r12,%r13,4), %ebx
	movl	24(%r12,%r13,4), %r14d
	leaq	L_.str(%rip), %rsi
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movl	%ebx, %edx
	movl	%r14d, %ecx
	callq	_NV_INFO
	cmpl	$4, %ebx
	jg	LBB0_2
## %bb.1:
	movq	(%r15), %rax
	movl	$0, 216(%rax)
LBB0_2:
	cmpl	$5, %ebx
	setl	%al
	cmpl	$1, %r14d
	setne	%cl
	cmpl	$5, %ebx
	jg	LBB0_4
## %bb.3:
	andb	%cl, %al
	jne	LBB0_4
## %bb.6:
	leal	-1(%rbx), %eax
	cmpl	$3, %eax
	jae	LBB0_8
## %bb.7:
	xorl	%r8d, %r8d
	xorl	%edi, %edi
LBB0_10:
	xorl	%esi, %esi
LBB0_11:
	xorl	%edx, %edx
LBB0_12:
	xorl	%ecx, %ecx
	xorl	%eax, %eax
LBB0_19:
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movl	%edi, -48(%rbp)                 ## 4-byte Spill
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	movl	%edx, -56(%rbp)                 ## 4-byte Spill
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	leaq	(%r12,%r13,4), %r12
	movq	%r12, %rdi
	movl	$8, %esi
	callq	_nv_cksum
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:
	leaq	L_.str.2(%rip), %rsi
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_NV_ERROR
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_NV_ERROR
	movq	_ENOSYS@GOTPCREL(%rip), %rax
LBB0_5:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_36:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	testl	%ebx, %ebx
	je	LBB0_36
## %bb.9:
	xorl	%edi, %edi
	movb	$1, %r8b
	cmpl	$4, %ebx
	je	LBB0_10
## %bb.13:
	movl	$0, %esi
	movl	$0, %edx
	movl	$0, %ecx
	movl	$0, %eax
	cmpl	$6, %r14d
	jl	LBB0_19
## %bb.14:
	cmpl	$16, %r14d
	jae	LBB0_16
## %bb.15:
	movb	$1, %r8b
	xorl	%esi, %esi
	movb	$1, %dil
	jmp	LBB0_11
LBB0_21:
	movl	36(%r12), %eax
	movl	%eax, 20(%r15)
	cmpl	$5, %ebx
	jl	LBB0_23
## %bb.22:
	cmpl	$15, %r14d
	jg	LBB0_24
LBB0_23:
	movl	$1, 24(%r15)
LBB0_24:
	xorl	%eax, %eax
	cmpl	$2, %ebx
	setge	%al
	leal	14(,%rax,4), %r14d
	movl	(%r12,%r14,4), %edi
	callq	_ROM16
	movl	%eax, 28(%r15)
	movl	8(%r12,%r14,4), %edi
	callq	_ROM16
	movl	%eax, 32(%r15)
	cmpl	$3, %ebx
	jl	LBB0_26
## %bb.25:
	movl	96(%r12), %edi
	callq	_ROM16
	movl	%eax, 64(%r15)
	movl	104(%r12), %edi
	callq	_ROM16
	movl	%eax, 68(%r15)
	movl	112(%r12), %edi
	callq	_ROM16
	movl	%eax, 72(%r15)
LBB0_26:
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	leal	54(%rbx), %eax
	cmpb	$0, -44(%rbp)                   ## 1-byte Folded Reload
	movl	$72, %ecx
	cmovnel	%eax, %ecx
	movq	(%r15), %rax
	movslq	%ecx, %rcx
	movl	(%rax,%rcx,4), %edx
	movl	%edx, 80(%r15)
	movl	4(%rax,%rcx,4), %edx
	movl	%edx, 84(%r15)
	movl	8(%rax,%rcx,4), %eax
	movl	%eax, 88(%r15)
	cmpb	$0, -48(%rbp)                   ## 1-byte Folded Reload
	jne	LBB0_27
## %bb.28:
	cmpb	$0, -52(%rbp)                   ## 1-byte Folded Reload
	jne	LBB0_29
LBB0_30:
	cmpb	$0, -56(%rbp)                   ## 1-byte Folded Reload
	jne	LBB0_31
LBB0_32:
	cmpb	$0, -60(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_34
LBB0_33:
	movl	468(%r12), %edi
	callq	_ROM16
	movl	%eax, 56(%r15)
	movl	476(%r12), %edi
	callq	_ROM16
	movl	%eax, 60(%r15)
LBB0_34:
	xorl	%ebx, %ebx
	cmpb	$0, -64(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_36
## %bb.35:
	movl	624(%r12), %edi
	callq	_ROM16
                                        ## kill: def $eax killed $eax def $rax
	addl	%eax, %eax
	leal	(%rax,%rax,4), %eax
	movl	%eax, 40(%r15)
	jmp	LBB0_36
LBB0_27:
	movl	268(%r12), %edi
	callq	_ROM32
	movl	%eax, 12(%r15)
	movl	284(%r12), %edi
	callq	_ROM32
	movl	%eax, 16(%r15)
	cmpb	$0, -52(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_30
LBB0_29:
	addl	$75, %ebx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_parse_script_table_pointers
	cmpb	$0, -56(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_32
LBB0_31:
	movl	356(%r12), %edi
	callq	_ROM16
	movl	%eax, 92(%r15)
	movl	364(%r12), %edi
	callq	_ROM16
	movl	%eax, 96(%r15)
	movl	380(%r12), %edi
	callq	_ROM16
	movl	%eax, 76(%r15)
	movl	420(%r12), %edi
	callq	_ROM16
	movl	%eax, 44(%r15)
	movl	428(%r12), %edi
	callq	_ROM16
	movl	%eax, 48(%r15)
	movl	$1, 52(%r15)
	cmpb	$0, -60(%rbp)                   ## 1-byte Folded Reload
	jne	LBB0_33
	jmp	LBB0_34
LBB0_16:
	jne	LBB0_18
## %bb.17:
	movb	$1, %r8b
	xorl	%edx, %edx
	movb	$1, %dil
	movb	$1, %sil
	jmp	LBB0_12
LBB0_18:
	cmpl	$20, %r14d
	setae	%cl
	cmpl	$39, %r14d
	setae	%al
	movb	$1, %r8b
	movb	$1, %dil
	movb	$1, %sil
	movb	$1, %dl
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"BMP version %d.%d\n"

L_.str.1:                               ## @.str.1
	.asciz	"You have an unsupported BMP version. Please send in your bios\n"

	.comm	_ENOSYS,4,2                     ## @ENOSYS
L_.str.2:                               ## @.str.2
	.asciz	"Bad BMP checksum\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_parse_bmp_structure
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function parse_bmp_structure
lCPI0_0:
	.long	75                              ; 0x4b
	.long	256000                          ; 0x3e800
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_parse_bmp_structure:                   ; @parse_bmp_structure
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x21, x2
	mov	x19, x1
	bl	_nouveau_drm
	mov	x23, x0
	ldr	x8, [x19]
	add	x20, x8, w21, uxtw #2
Lloh0:
	adrp	x8, lCPI0_0@PAGE
Lloh1:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x19, #8]
	mov	w8, #62464
	movk	w8, #1, lsl #16
	str	w8, [x19, #16]
	mov	w8, #24464
	movk	w8, #1, lsl #16
	str	w8, [x19, #40]
	ldp	w22, w24, [x20, #20]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x22
	mov	x3, x24
	bl	_NV_INFO
	cmp	w22, #4
	b.gt	LBB0_2
; %bb.1:
	ldr	x8, [x19]
	str	wzr, [x8, #216]
LBB0_2:
	cmp	w24, #1
	cset	w8, ne
	cmp	w22, #5
	cset	w9, lt
	and	w8, w9, w8
	ccmp	w8, #0, #0, le
	b.eq	LBB0_4
; %bb.3:
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x23
	bl	_NV_ERROR
Lloh6:
	adrp	x8, _ENOSYS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOSYS@GOTPAGEOFF]
	b	LBB0_10
LBB0_4:
	sub	w8, w22, #1
	cmp	w8, #3
	b.hs	LBB0_6
; %bb.5:
	mov	w26, #0
	mov	w25, #0
	mov	w28, #0
	mov	w27, #0
	str	xzr, [sp, #8]                   ; 8-byte Folded Spill
	b	LBB0_8
LBB0_6:
	cbz	w22, LBB0_11
; %bb.7:
	mov	w8, #1
	mov	w9, #1
	mov	w10, #1
	cmp	w24, #19
	cset	w11, hi
	cmp	w24, #38
	cset	w12, hi
	mov	w13, #1
	cmp	w24, #16
	csel	w10, w10, w13, eq
	csel	w13, wzr, w13, eq
	csel	w11, wzr, w11, eq
	csel	w12, wzr, w12, eq
	csel	w9, w9, w10, lo
	csel	w10, wzr, w10, lo
	csel	w13, wzr, w13, lo
	csel	w11, wzr, w11, lo
	csel	w12, wzr, w12, lo
	cmp	w22, #4
	ccmp	w24, #6, #8, ne
	csel	w26, w8, w9, lt
	csel	w25, wzr, w9, lt
	csel	w28, wzr, w10, lt
	csel	w27, wzr, w13, lt
	csel	w9, wzr, w11, lt
	csel	w8, wzr, w12, lt
	stp	w9, w8, [sp, #8]                ; 8-byte Folded Spill
LBB0_8:
	mov	x0, x20
	mov	w1, #8
	bl	_nv_cksum
	cbz	x0, LBB0_12
; %bb.9:
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x23
	bl	_NV_ERROR
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_11:
	mov	x0, x22
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_12:
	ldr	w8, [x20, #36]
	str	w8, [x19, #20]
	cmp	w22, #5
	ccmp	w24, #15, #4, ge
	b.gt	LBB0_14
; %bb.13:
	mov	w8, #1
	str	w8, [x19, #24]
LBB0_14:
	mov	w8, #18
	mov	w9, #14
	cmp	w22, #2
	csel	w23, w9, w8, lt
	ldr	w0, [x20, w23, uxtw #2]
	bl	_ROM16
	str	w0, [x19, #28]
	add	w8, w23, #2
	ldr	w0, [x20, w8, uxtw #2]
	bl	_ROM16
	str	w0, [x19, #32]
	cmp	w22, #3
	b.lt	LBB0_16
; %bb.15:
	ldr	w0, [x20, #96]
	bl	_ROM16
	str	w0, [x19, #64]
	ldr	w0, [x20, #104]
	bl	_ROM16
	str	w0, [x19, #68]
	ldr	w0, [x20, #112]
	bl	_ROM16
	str	w0, [x19, #72]
LBB0_16:
	add	w8, w21, #54
	mov	w9, #72
	cmp	w26, #0
	csel	w8, w8, w9, ne
	ldr	x9, [x19]
	add	x8, x9, w8, sxtw #2
	ldr	w9, [x8]
	str	w9, [x19, #80]
	ldr	w9, [x8, #4]
	str	w9, [x19, #84]
	ldr	w8, [x8, #8]
	str	w8, [x19, #88]
	cbnz	w25, LBB0_22
; %bb.17:
	cbnz	w28, LBB0_23
LBB0_18:
	cbnz	w27, LBB0_24
LBB0_19:
	ldr	w8, [sp, #8]                    ; 4-byte Folded Reload
	cbnz	w8, LBB0_25
LBB0_20:
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	cbz	w8, LBB0_26
LBB0_21:
	ldr	w0, [x20, #624]
	bl	_ROM16
	mov	w22, #0
	add	w8, w0, w0, lsl #2
	lsl	w8, w8, #1
	str	w8, [x19, #40]
	b	LBB0_11
LBB0_22:
	ldr	w0, [x20, #268]
	bl	_ROM32
	str	w0, [x19, #12]
	ldr	w0, [x20, #284]
	bl	_ROM32
	str	w0, [x19, #16]
	cbz	w28, LBB0_18
LBB0_23:
	add	w1, w21, #75
	mov	x0, x19
	bl	_parse_script_table_pointers
	cbz	w27, LBB0_19
LBB0_24:
	ldr	w0, [x20, #356]
	bl	_ROM16
	str	w0, [x19, #92]
	ldr	w0, [x20, #364]
	bl	_ROM16
	str	w0, [x19, #96]
	ldr	w0, [x20, #380]
	bl	_ROM16
	str	w0, [x19, #76]
	ldr	w0, [x20, #420]
	bl	_ROM16
	str	w0, [x19, #44]
	ldr	w0, [x20, #428]
	bl	_ROM16
	mov	w8, #1
	stp	w0, w8, [x19, #48]
	ldr	w8, [sp, #8]                    ; 4-byte Folded Reload
	cbz	w8, LBB0_20
LBB0_25:
	ldr	w0, [x20, #468]
	bl	_ROM16
	str	w0, [x19, #56]
	ldr	w0, [x20, #476]
	bl	_ROM16
	str	w0, [x19, #60]
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	cbnz	w8, LBB0_21
LBB0_26:
	mov	w22, #0
	b	LBB0_11
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdr	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"BMP version %d.%d\n"

l_.str.1:                               ; @.str.1
	.asciz	"You have an unsupported BMP version. Please send in your bios\n"

	.comm	_ENOSYS,4,2                     ; @ENOSYS
l_.str.2:                               ; @.str.2
	.asciz	"Bad BMP checksum\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_parse_bmp_structure
.subsections_via_symbols
