	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcm_fb_init
_bcm_fb_init:                           ## @bcm_fb_init
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	%rsi, %rdi
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_memset
	movq	%rbx, %rdi
	callq	_bcm2835_mbox_fb_get_w_h
	testq	%rax, %rax
	jne	LBB0_8
## %bb.1:
	movq	%rbx, %rdi
	callq	_bcm2835_mbox_fb_get_bpp
	testq	%rax, %rax
	jne	LBB0_8
## %bb.2:
	movq	(%rbx), %rdx
	movq	_FB_DEPTH@GOTPCREL(%rip), %r15
	movq	(%r15), %rcx
	movl	(%r14), %edi
	cmpq	%rcx, %rdx
	jge	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	callq	_device_printf
	movq	(%r15), %rax
	movq	%rax, (%rbx)
	jmp	LBB0_5
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	callq	_device_printf
LBB0_5:
	movl	24(%rbx), %eax
	movl	32(%rbx), %ecx
	movl	%ecx, 36(%rbx)
	movl	%eax, 28(%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%rbx)
	movq	%rbx, %rdi
	callq	_bcm2835_mbox_fb_init
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	movl	(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_device_printf
LBB0_8:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	xorl	%eax, %eax
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_FB_DEPTH,8,3                   ## @FB_DEPTH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"changing fb bpp from %d to %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"keeping existing fb bpp of %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"bcm2835_mbox_fb_init failed, err=%d\n"

	.no_dead_strip	_bcm_fb_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcm_fb_init
_bcm_fb_init:                           ; @bcm_fb_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x1
	mov	x19, x0
	mov	x0, x1
	mov	w1, #0
	mov	w2, #40
	bl	_memset
	mov	x0, x20
	bl	_bcm2835_mbox_fb_get_w_h
	cbnz	x0, LBB0_7
; %bb.1:
	mov	x0, x20
	bl	_bcm2835_mbox_fb_get_bpp
	cbnz	x0, LBB0_7
; %bb.2:
	ldr	x2, [x20]
Lloh0:
	adrp	x21, _FB_DEPTH@GOTPAGE
Lloh1:
	ldr	x21, [x21, _FB_DEPTH@GOTPAGEOFF]
	ldr	x8, [x21]
	ldr	w0, [x19]
	cmp	x2, x8
	b.ge	LBB0_4
; %bb.3:
	str	x8, [sp]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_device_printf
	ldr	x8, [x21]
	str	x8, [x20]
	b	LBB0_5
LBB0_4:
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_device_printf
LBB0_5:
	ldr	w8, [x20, #32]
	str	w8, [x20, #36]
	ldr	w8, [x20, #24]
	str	w8, [x20, #28]
	stp	xzr, xzr, [x20, #8]
	mov	x0, x20
	bl	_bcm2835_mbox_fb_init
	cbz	w0, LBB0_8
; %bb.6:
	mov	x2, x0
	ldr	w0, [x19]
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_device_printf
LBB0_7:
Lloh8:
	adrp	x8, _ENXIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
LBB0_8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_FB_DEPTH,8,3                   ; @FB_DEPTH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"changing fb bpp from %d to %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"keeping existing fb bpp of %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"bcm2835_mbox_fb_init failed, err=%d\n"

	.no_dead_strip	_bcm_fb_init
.subsections_via_symbols
