	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmal_sdl_create_surface
_mmal_sdl_create_surface:               ## @mmal_sdl_create_surface
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_SDL_ANYFORMAT@GOTPCREL(%rip), %rax
	movq	_SDL_HWPALETTE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	(%rax), %ebx
	movq	%rdi, %r14
	movq	_SDL_HWSURFACE@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	4(%rdi), %r15d
	movq	_SDL_DOUBLEBUF@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	8(%rdi), %r12d
	movq	_SDL_RESIZABLE@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	%r15d, %edi
	movl	%r12d, %esi
	movl	$16, %edx
	movl	%ebx, %ecx
	callq	_SDL_VideoModeOK
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	%r15d, %edi
	movl	%r12d, %esi
	movl	%eax, %edx
	movl	%ebx, %ecx
	callq	_SDL_SetVideoMode
	movl	%eax, (%r14)
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rbx
	jmp	LBB0_6
LBB0_1:
	movq	_MMAL_ENOSYS@GOTPCREL(%rip), %rbx
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_5
LBB0_4:
	movq	_MMAL_ENOMEM@GOTPCREL(%rip), %rbx
	leaq	L_.str.1(%rip), %rdi
LBB0_5:
	callq	_LOG_ERROR
LBB0_6:
	movl	(%rbx), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SDL_ANYFORMAT,4,2              ## @SDL_ANYFORMAT
	.comm	_SDL_HWPALETTE,4,2              ## @SDL_HWPALETTE
	.comm	_SDL_HWSURFACE,4,2              ## @SDL_HWSURFACE
	.comm	_SDL_DOUBLEBUF,4,2              ## @SDL_DOUBLEBUF
	.comm	_SDL_RESIZABLE,4,2              ## @SDL_RESIZABLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no SDL video mode available"

	.comm	_MMAL_ENOSYS,4,2                ## @MMAL_ENOSYS
L_.str.1:                               ## @.str.1
	.asciz	"cannot create SDL surface"

	.comm	_MMAL_ENOMEM,4,2                ## @MMAL_ENOMEM
	.comm	_MMAL_SUCCESS,4,2               ## @MMAL_SUCCESS
	.no_dead_strip	_mmal_sdl_create_surface
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmal_sdl_create_surface
_mmal_sdl_create_surface:               ; @mmal_sdl_create_surface
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x19, x0
Lloh0:
	adrp	x8, _SDL_ANYFORMAT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SDL_ANYFORMAT@GOTPAGEOFF]
	ldp	w21, w20, [x0, #4]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _SDL_HWPALETTE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SDL_HWPALETTE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh6:
	adrp	x9, _SDL_HWSURFACE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SDL_HWSURFACE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh9:
	adrp	x9, _SDL_DOUBLEBUF@GOTPAGE
Lloh10:
	ldr	x9, [x9, _SDL_DOUBLEBUF@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh12:
	adrp	x9, _SDL_RESIZABLE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _SDL_RESIZABLE@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w22, w8, w9
	mov	x0, x21
	mov	x1, x20
	mov	w2, #16
	mov	x3, x22
	bl	_SDL_VideoModeOK
	cbz	w0, LBB0_3
; %bb.1:
	mov	x2, x0
	mov	x0, x21
	mov	x1, x20
	mov	x3, x22
	bl	_SDL_SetVideoMode
	str	w0, [x19]
	cbz	w0, LBB0_4
; %bb.2:
Lloh15:
	adrp	x19, _MMAL_SUCCESS@GOTPAGE
Lloh16:
	ldr	x19, [x19, _MMAL_SUCCESS@GOTPAGEOFF]
	b	LBB0_6
LBB0_3:
Lloh17:
	adrp	x19, _MMAL_ENOSYS@GOTPAGE
Lloh18:
	ldr	x19, [x19, _MMAL_ENOSYS@GOTPAGEOFF]
Lloh19:
	adrp	x0, l_.str@PAGE
Lloh20:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_5
LBB0_4:
Lloh21:
	adrp	x19, _MMAL_ENOMEM@GOTPAGE
Lloh22:
	ldr	x19, [x19, _MMAL_ENOMEM@GOTPAGEOFF]
Lloh23:
	adrp	x0, l_.str.1@PAGE
Lloh24:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_5:
	bl	_LOG_ERROR
LBB0_6:
	ldr	w0, [x19]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_SDL_ANYFORMAT,4,2              ; @SDL_ANYFORMAT
	.comm	_SDL_HWPALETTE,4,2              ; @SDL_HWPALETTE
	.comm	_SDL_HWSURFACE,4,2              ; @SDL_HWSURFACE
	.comm	_SDL_DOUBLEBUF,4,2              ; @SDL_DOUBLEBUF
	.comm	_SDL_RESIZABLE,4,2              ; @SDL_RESIZABLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no SDL video mode available"

	.comm	_MMAL_ENOSYS,4,2                ; @MMAL_ENOSYS
l_.str.1:                               ; @.str.1
	.asciz	"cannot create SDL surface"

	.comm	_MMAL_ENOMEM,4,2                ; @MMAL_ENOMEM
	.comm	_MMAL_SUCCESS,4,2               ; @MMAL_SUCCESS
	.no_dead_strip	_mmal_sdl_create_surface
.subsections_via_symbols
