	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function efifb_from_uga
_efifb_from_uga:                        ## @efifb_from_uga
	.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
	movq	%rsi, %r12
	movq	%rdi, %r15
	leaq	-44(%rbp), %rsi
	leaq	-48(%rbp), %rdx
	leaq	-80(%rbp), %rcx
	leaq	-76(%rbp), %r8
	movq	%r12, %rdi
	callq	*(%r12)
	movl	%eax, %edi
	callq	_EFI_ERROR
	movl	$1, %r14d
	testq	%rax, %rax
	je	LBB0_1
LBB0_37:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	-48(%rbp), %ecx
	movl	%ecx, (%r15)
	movl	-44(%rbp), %eax
	movl	%eax, 4(%r15)
	testl	%ecx, %ecx
	je	LBB0_37
## %bb.2:
	testl	%eax, %eax
	je	LBB0_37
## %bb.3:
	movq	_PixelBlueGreenRedReserved8BitPerColor@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_efifb_mask_from_pixfmt
	xorl	%eax, %eax
	callq	_efifb_uga_get_pciio
	leaq	8(%r15), %r13
	leaq	12(%r15), %rbx
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	movq	%r13, %rsi
	movq	%rbx, %rdx
	callq	_efifb_uga_locate_framebuffer
	movl	%eax, %edi
	callq	_EFI_ERROR
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movl	$0, (%r13)
	movl	$0, (%rbx)
LBB0_5:
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	leaq	L_.str(%rip), %rdi
	callq	_getenv
	testq	%rax, %rax
	je	LBB0_17
## %bb.6:
	leaq	L_.str.1(%rip), %rsi
	movq	%rax, %rdi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_7
LBB0_17:
	movl	4(%r15), %ebx
	leal	-1(%rbx), %eax
	andl	%ebx, %eax
	je	LBB0_20
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	decl	%eax
	orl	%ebx, %eax
	leal	1(%rax), %ebx
	andl	%ebx, %eax
	jne	LBB0_18
LBB0_20:
	movl	%ebx, 16(%r15)
	leaq	L_.str.7(%rip), %rdi
	callq	_getenv
	testq	%rax, %rax
	je	LBB0_21
## %bb.27:
	imull	(%r15), %ebx
	shll	$2, %ebx
	movl	%ebx, 12(%r15)
	leaq	-64(%rbp), %rsi
	xorl	%ebx, %ebx
	movq	%rax, %rdi
	xorl	%edx, %edx
	callq	_strtoul
	movl	%eax, 8(%r15)
	movq	-64(%rbp), %rax
	cmpb	$0, (%rax)
	jne	LBB0_37
	jmp	LBB0_28
LBB0_21:
	movl	(%r13), %ecx
	testl	%ecx, %ecx
	je	LBB0_22
## %bb.23:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %r8d
	sarl	$8, %r8d
	movq	%r12, %rdi
	xorl	%esi, %esi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	callq	_efifb_uga_find_pixel
	cmpl	$-1, %eax
	je	LBB0_24
## %bb.25:
	movl	%eax, %ebx
	testl	%eax, %eax
	jle	LBB0_28
## %bb.26:
	addl	%ebx, (%r13)
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	subl	%ebx, (%rax)
	jmp	LBB0_28
LBB0_7:
	leaq	L_.str.2(%rip), %rdi
	callq	_getenv
	testq	%rax, %rax
	je	LBB0_17
## %bb.8:
	movq	%rax, %rbx
	leaq	L_.str.3(%rip), %rsi
	movq	%rax, %rdi
	callq	_strcmp
	testl	%eax, %eax
	je	LBB0_9
## %bb.10:
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strcmp
	testl	%eax, %eax
	jne	LBB0_17
## %bb.11:
	movl	$2048, %eax                     ## imm = 0x800
	xorl	%ecx, %ecx
	movl	$800, %edx                      ## imm = 0x320
	movl	$1280, %esi                     ## imm = 0x500
	jmp	LBB0_12
LBB0_22:
	leaq	L_str.13(%rip), %rdi
	callq	_puts
	jmp	LBB0_37
LBB0_24:
	leaq	L_str.12(%rip), %rdi
	callq	_puts
	movl	$-1, %ebx
LBB0_28:
	leaq	L_.str.10(%rip), %rdi
	callq	_getenv
	testq	%rax, %rax
	je	LBB0_29
## %bb.34:
	leaq	-64(%rbp), %rsi
	movq	%rax, %rdi
	xorl	%edx, %edx
	callq	_strtoul
	movl	%eax, 16(%r15)
	movq	-64(%rbp), %rax
	cmpb	$0, (%rax)
	jne	LBB0_37
	jmp	LBB0_35
LBB0_29:
	cmpq	$0, -56(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_33
## %bb.30:
	cmpl	$-1, %ebx
	je	LBB0_33
## %bb.31:
	movl	(%r13), %ecx
	movl	-44(%rbp), %r8d
	shll	$3, %r8d
	movq	%r12, %rdi
	movl	$1, %esi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	callq	_efifb_uga_find_pixel
	cmpl	$-1, %eax
	je	LBB0_35
## %bb.32:
	sarl	$2, %eax
	movl	%eax, 16(%r15)
	jmp	LBB0_35
LBB0_33:
	leaq	L_str(%rip), %rdi
	callq	_puts
LBB0_35:
	movl	(%r15), %eax
	imull	16(%r15), %eax
	shll	$2, %eax
	movl	%eax, 12(%r15)
LBB0_36:
	xorl	%r14d, %r14d
	jmp	LBB0_37
LBB0_9:
	movl	$1728, %eax                     ## imm = 0x6C0
	movl	$65536, %ecx                    ## imm = 0x10000
	movl	$1050, %edx                     ## imm = 0x41A
	movl	$1680, %esi                     ## imm = 0x690
LBB0_12:
	movl	%esi, -44(%rbp)
	movl	%edx, -48(%rbp)
	cmpl	%esi, 4(%r15)
	jne	LBB0_16
## %bb.13:
	cmpl	%edx, (%r15)
	jne	LBB0_16
## %bb.14:
	cmpl	$-1073741824, (%r13)            ## imm = 0xC0000000
	jne	LBB0_16
## %bb.15:
	leal	-1073741824(%rcx), %edx
	movl	%edx, 8(%r15)
	subl	%ecx, 12(%r15)
	movl	%eax, 16(%r15)
	jmp	LBB0_36
LBB0_16:
	leaq	L_str.14(%rip), %rdi
	callq	_puts
	leaq	L_str.15(%rip), %rdi
	callq	_puts
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_PixelBlueGreenRedReserved8BitPerColor,4,2 ## @PixelBlueGreenRedReserved8BitPerColor
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"smbios.system.maker"

L_.str.1:                               ## @.str.1
	.asciz	"Apple Inc."

L_.str.2:                               ## @.str.2
	.asciz	"smbios.system.product"

L_.str.3:                               ## @.str.3
	.asciz	"iMac7,1"

L_.str.4:                               ## @.str.4
	.asciz	"MacBook3,1"

L_.str.7:                               ## @.str.7
	.asciz	"hw.efifb.address"

L_.str.10:                              ## @.str.10
	.asciz	"hw.efifb.stride"

L_str:                                  ## @str
	.asciz	"Unable to reliably detect the stride."

L_str.12:                               ## @str.12
	.asciz	"Unable to reliably detect frame buffer."

L_str.13:                               ## @str.13
	.asciz	"Please set hw.efifb.address and hw.efifb.stride."

L_str.14:                               ## @str.14
	.asciz	"Hardware make/model known, but graphics not as expected."

L_str.15:                               ## @str.15
	.asciz	"Console may not work!"

	.no_dead_strip	_efifb_from_uga
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function efifb_from_uga
_efifb_from_uga:                        ; @efifb_from_uga
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x1]
	add	x1, sp, #20
	add	x2, sp, #16
	add	x3, sp, #12
	add	x4, sp, #8
	mov	x0, x20
	blr	x8
	bl	_EFI_ERROR
	cbnz	x0, LBB0_23
; %bb.1:
	ldp	w8, w9, [sp, #16]
	stp	w8, w9, [x19]
	cmp	w8, #0
	ccmp	w9, #0, #4, ne
	b.eq	LBB0_23
; %bb.2:
Lloh0:
	adrp	x8, _PixelBlueGreenRedReserved8BitPerColor@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PixelBlueGreenRedReserved8BitPerColor@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, #0
	bl	_efifb_mask_from_pixfmt
	bl	_efifb_uga_get_pciio
	mov	x21, x0
	add	x22, x19, #8
	add	x23, x19, #12
	mov	x1, x22
	mov	x2, x23
	bl	_efifb_uga_locate_framebuffer
	bl	_EFI_ERROR
	cbz	x0, LBB0_4
; %bb.3:
	str	xzr, [x22]
LBB0_4:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_getenv
	cbz	x0, LBB0_6
; %bb.5:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_strcmp
	cbz	w0, LBB0_15
LBB0_6:
	ldr	w24, [x19, #4]
	sub	w8, w24, #1
	ands	w8, w8, w24
	b.eq	LBB0_8
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	sub	w8, w8, #1
	orr	w8, w8, w24
	add	w24, w8, #1
	ands	w8, w8, w24
	b.ne	LBB0_7
LBB0_8:
	str	w24, [x19, #16]
Lloh7:
	adrp	x0, l_.str.7@PAGE
Lloh8:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_getenv
	cbz	x0, LBB0_11
; %bb.9:
	ldr	w8, [x19]
	mul	w8, w24, w8
	lsl	w8, w8, #2
	str	w8, [x19, #12]
	add	x1, sp, #24
	mov	w2, #0
	bl	_strtoul
	str	w0, [x19, #8]
	ldr	x8, [sp, #24]
	ldrb	w8, [x8]
	cbnz	w8, LBB0_23
; %bb.10:
	mov	w24, #0
	b	LBB0_21
LBB0_11:
	ldr	w3, [x22]
	cbz	w3, LBB0_19
; %bb.12:
	ldr	w8, [x23]
	asr	w4, w8, #8
	mov	x0, x20
	mov	w1, #0
	mov	x2, x21
	bl	_efifb_uga_find_pixel
	mov	x24, x0
	cmn	w0, #1
	b.eq	LBB0_20
; %bb.13:
	cmp	w24, #1
	b.lt	LBB0_21
; %bb.14:
	ldr	w8, [x22]
	add	w8, w8, w24
	str	w8, [x22]
	ldr	w8, [x23]
	sub	w8, w8, w24
	str	w8, [x23]
	b	LBB0_21
LBB0_15:
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_getenv
	cbz	x0, LBB0_6
; %bb.16:
	mov	x24, x0
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_strcmp
	cbz	w0, LBB0_31
; %bb.17:
Lloh13:
	adrp	x1, l_.str.4@PAGE
Lloh14:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x24
	bl	_strcmp
	cbnz	w0, LBB0_6
; %bb.18:
	mov	w9, #0
	mov	w8, #2048
	mov	w10, #800
	mov	w11, #1280
	b	LBB0_32
LBB0_19:
Lloh15:
	adrp	x0, l_str.13@PAGE
Lloh16:
	add	x0, x0, l_str.13@PAGEOFF
	bl	_puts
	mov	w0, #1
	b	LBB0_24
LBB0_20:
Lloh17:
	adrp	x0, l_str.12@PAGE
Lloh18:
	add	x0, x0, l_str.12@PAGEOFF
	bl	_puts
LBB0_21:
Lloh19:
	adrp	x0, l_.str.10@PAGE
Lloh20:
	add	x0, x0, l_.str.10@PAGEOFF
	bl	_getenv
	cbz	x0, LBB0_25
; %bb.22:
	add	x1, sp, #24
	mov	w2, #0
	bl	_strtoul
	str	w0, [x19, #16]
	ldr	x8, [sp, #24]
	ldrb	w8, [x8]
	cbz	w8, LBB0_30
LBB0_23:
	mov	w0, #1
LBB0_24:
	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
	add	sp, sp, #96
	ret
LBB0_25:
	cbz	x21, LBB0_29
; %bb.26:
	cmn	w24, #1
	b.eq	LBB0_29
; %bb.27:
	ldr	w3, [x22]
	ldr	w8, [sp, #20]
	lsl	w4, w8, #3
	mov	x0, x20
	mov	w1, #1
	mov	x2, x21
	bl	_efifb_uga_find_pixel
	cmn	w0, #1
	b.eq	LBB0_30
; %bb.28:
	asr	w8, w0, #2
	str	w8, [x19, #16]
	b	LBB0_30
LBB0_29:
Lloh21:
	adrp	x0, l_str@PAGE
Lloh22:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
LBB0_30:
	mov	w0, #0
	ldr	w8, [x19]
	ldr	w9, [x19, #16]
	mul	w8, w8, w9
	lsl	w8, w8, #2
	str	w8, [x19, #12]
	b	LBB0_24
LBB0_31:
	mov	w8, #1728
	mov	w9, #65536
	mov	w10, #1050
	mov	w11, #1680
LBB0_32:
	stp	w10, w11, [sp, #16]
	ldr	w12, [x19, #4]
	cmp	w12, w11
	b.ne	LBB0_36
; %bb.33:
	ldr	w11, [x19]
	cmp	w11, w10
	b.ne	LBB0_36
; %bb.34:
	ldr	w10, [x22]
	mov	w11, #-1073741824
	cmp	w10, w11
	b.ne	LBB0_36
; %bb.35:
	mov	w0, #0
	orr	w10, w9, #0xc0000000
	ldr	w11, [x19, #12]
	sub	w9, w11, w9
	stp	w10, w9, [x19, #8]
	str	w8, [x19, #16]
	b	LBB0_24
LBB0_36:
Lloh23:
	adrp	x0, l_str.14@PAGE
Lloh24:
	add	x0, x0, l_str.14@PAGEOFF
	bl	_puts
Lloh25:
	adrp	x0, l_str.15@PAGE
Lloh26:
	add	x0, x0, l_str.15@PAGEOFF
	bl	_puts
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_PixelBlueGreenRedReserved8BitPerColor,4,2 ; @PixelBlueGreenRedReserved8BitPerColor
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"smbios.system.maker"

l_.str.1:                               ; @.str.1
	.asciz	"Apple Inc."

l_.str.2:                               ; @.str.2
	.asciz	"smbios.system.product"

l_.str.3:                               ; @.str.3
	.asciz	"iMac7,1"

l_.str.4:                               ; @.str.4
	.asciz	"MacBook3,1"

l_.str.7:                               ; @.str.7
	.asciz	"hw.efifb.address"

l_.str.10:                              ; @.str.10
	.asciz	"hw.efifb.stride"

l_str:                                  ; @str
	.asciz	"Unable to reliably detect the stride."

l_str.12:                               ; @str.12
	.asciz	"Unable to reliably detect frame buffer."

l_str.13:                               ; @str.13
	.asciz	"Please set hw.efifb.address and hw.efifb.stride."

l_str.14:                               ; @str.14
	.asciz	"Hardware make/model known, but graphics not as expected."

l_str.15:                               ; @str.15
	.asciz	"Console may not work!"

	.no_dead_strip	_efifb_from_uga
.subsections_via_symbols
