	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gfx_ctx_wl_set_video_mode
_gfx_ctx_wl_set_video_mode:             ## @gfx_ctx_wl_set_video_mode
	.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
	movl	%r8d, %r14d
	movq	%rdi, %rbx
	testl	%edx, %edx
	jne	LBB0_2
## %bb.1:
	movq	_DEFAULT_WINDOWED_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
LBB0_2:
	movl	%edx, (%rbx)
	testl	%ecx, %ecx
	jne	LBB0_4
## %bb.3:
	movq	_DEFAULT_WINDOWED_HEIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_4:
	movl	%ecx, 4(%rbx)
	movl	108(%rbx), %edi
	callq	_wl_compositor_create_surface
	movl	%eax, 24(%rbx)
	movl	8(%rbx), %esi
	movl	%eax, %edi
	callq	_wl_surface_set_buffer_scale
	movl	24(%rbx), %edi
	movq	_wl_surface_listener@GOTPCREL(%rip), %rsi
	movq	%rbx, %rdx
	callq	_wl_surface_add_listener
	movq	96(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.5:
	movl	24(%rbx), %esi
	callq	_xdg_wm_base_get_xdg_surface
	movl	%eax, 104(%rbx)
	movq	_xdg_surface_listener@GOTPCREL(%rip), %rsi
	movl	%eax, %edi
	movq	%rbx, %rdx
	callq	_xdg_surface_add_listener
	movl	104(%rbx), %edi
	callq	_xdg_surface_get_toplevel
	movq	%rax, 48(%rbx)
	movq	_xdg_toplevel_listener@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	movq	%rbx, %rdx
	callq	_xdg_toplevel_add_listener
	movq	48(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_xdg_toplevel_set_app_id
	movq	48(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_xdg_toplevel_set_title
	movq	72(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.6:
	movq	48(%rbx), %rsi
	callq	_zxdg_decoration_manager_v1_get_toplevel_decoration
	movq	%rax, 80(%rbx)
LBB0_7:
	movl	24(%rbx), %edi
	callq	_wl_surface_commit
	movl	$1, 12(%rbx)
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	28(%rbx), %edi
	callq	_wl_display_dispatch
	cmpl	$0, 12(%rbx)
	jne	LBB0_8
## %bb.9:
	movl	28(%rbx), %edi
	callq	_wl_display_roundtrip
	movq	96(%rbx), %rdi
	movq	_xdg_shell_listener@GOTPCREL(%rip), %rsi
	xorl	%edx, %edx
	callq	_xdg_wm_base_add_listener
	jmp	LBB0_16
LBB0_10:
	movq	64(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_16
## %bb.11:
	movl	24(%rbx), %esi
	callq	_zxdg_shell_v6_get_xdg_surface
	movl	%eax, 88(%rbx)
	movq	_zxdg_surface_v6_listener@GOTPCREL(%rip), %rsi
	movl	%eax, %edi
	movq	%rbx, %rdx
	callq	_zxdg_surface_v6_add_listener
	movl	88(%rbx), %edi
	callq	_zxdg_surface_v6_get_toplevel
	movq	%rax, 40(%rbx)
	movq	_zxdg_toplevel_v6_listener@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	movq	%rbx, %rdx
	callq	_zxdg_toplevel_v6_add_listener
	movq	40(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_zxdg_toplevel_v6_set_app_id
	movq	40(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_zxdg_toplevel_v6_set_title
	movq	72(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_13
## %bb.12:
	movq	48(%rbx), %rsi
	callq	_zxdg_decoration_manager_v1_get_toplevel_decoration
	movq	%rax, 80(%rbx)
LBB0_13:
	movl	24(%rbx), %edi
	callq	_wl_surface_commit
	movl	$1, 12(%rbx)
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movl	28(%rbx), %edi
	callq	_wl_display_dispatch
	cmpl	$0, 12(%rbx)
	jne	LBB0_14
## %bb.15:
	movl	28(%rbx), %edi
	callq	_wl_display_roundtrip
	movq	64(%rbx), %rdi
	movq	_zxdg_shell_v6_listener@GOTPCREL(%rip), %rsi
	xorl	%edx, %edx
	callq	_zxdg_shell_v6_add_listener
LBB0_16:
	testl	%r14d, %r14d
	je	LBB0_21
## %bb.17:
	movq	48(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_19
## %bb.18:
	xorl	%esi, %esi
	callq	_xdg_toplevel_set_fullscreen
	jmp	LBB0_21
LBB0_19:
	movq	40(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_21
## %bb.20:
	xorl	%esi, %esi
	callq	_zxdg_toplevel_v6_set_fullscreen
LBB0_21:
	leaq	28(%rbx), %r15
	movq	%r15, %rdi
	callq	_flush_wayland_fd
	movq	_wl_api@GOTPCREL(%rip), %rax
	cmpl	$128, (%rax)
	jne	LBB0_23
## %bb.22:
	movl	(%r15), %edi
	callq	_wl_display_roundtrip
LBB0_23:
	testl	%r14d, %r14d
	je	LBB0_25
## %bb.24:
	movl	$0, 16(%rbx)
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_gfx_ctx_wl_show_mouse
	jmp	LBB0_26
LBB0_25:
	movl	$1, 16(%rbx)
LBB0_26:
	movl	$1, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DEFAULT_WINDOWED_WIDTH,4,2     ## @DEFAULT_WINDOWED_WIDTH
	.comm	_DEFAULT_WINDOWED_HEIGHT,4,2    ## @DEFAULT_WINDOWED_HEIGHT
	.comm	_wl_surface_listener,4,2        ## @wl_surface_listener
	.comm	_wl_api,4,2                     ## @wl_api
	.comm	_xdg_surface_listener,4,2       ## @xdg_surface_listener
	.comm	_xdg_toplevel_listener,4,2      ## @xdg_toplevel_listener
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"retroarch"

L_.str.1:                               ## @.str.1
	.asciz	"RetroArch"

	.comm	_xdg_shell_listener,4,2         ## @xdg_shell_listener
	.comm	_zxdg_surface_v6_listener,4,2   ## @zxdg_surface_v6_listener
	.comm	_zxdg_toplevel_v6_listener,4,2  ## @zxdg_toplevel_v6_listener
	.comm	_zxdg_shell_v6_listener,4,2     ## @zxdg_shell_v6_listener
	.comm	_VULKAN_WSI_WAYLAND,4,2         ## @VULKAN_WSI_WAYLAND
	.no_dead_strip	_gfx_ctx_wl_set_video_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gfx_ctx_wl_set_video_mode
_gfx_ctx_wl_set_video_mode:             ; @gfx_ctx_wl_set_video_mode
	.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	x20, x4
	mov	x19, x0
Lloh0:
	adrp	x8, _DEFAULT_WINDOWED_WIDTH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DEFAULT_WINDOWED_WIDTH@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w2, #0
	csel	w8, w8, w2, eq
Lloh3:
	adrp	x9, _DEFAULT_WINDOWED_HEIGHT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DEFAULT_WINDOWED_HEIGHT@GOTPAGEOFF]
	str	w8, [x0]
Lloh5:
	ldr	w8, [x9]
	cmp	w3, #0
	csel	w8, w8, w3, eq
	str	w8, [x0, #4]
	ldr	w0, [x0, #108]
	bl	_wl_compositor_create_surface
	str	w0, [x19, #24]
	ldr	w1, [x19, #8]
	bl	_wl_surface_set_buffer_scale
	ldr	w0, [x19, #24]
Lloh6:
	adrp	x1, _wl_surface_listener@GOTPAGE
Lloh7:
	ldr	x1, [x1, _wl_surface_listener@GOTPAGEOFF]
	mov	x2, x19
	bl	_wl_surface_add_listener
	ldr	x0, [x19, #96]
	cbz	x0, LBB0_6
; %bb.1:
	ldr	w1, [x19, #24]
	bl	_xdg_wm_base_get_xdg_surface
	str	w0, [x19, #104]
Lloh8:
	adrp	x1, _xdg_surface_listener@GOTPAGE
Lloh9:
	ldr	x1, [x1, _xdg_surface_listener@GOTPAGEOFF]
	mov	x2, x19
	bl	_xdg_surface_add_listener
	ldr	w0, [x19, #104]
	bl	_xdg_surface_get_toplevel
	str	x0, [x19, #48]
Lloh10:
	adrp	x1, _xdg_toplevel_listener@GOTPAGE
Lloh11:
	ldr	x1, [x1, _xdg_toplevel_listener@GOTPAGEOFF]
	mov	x2, x19
	bl	_xdg_toplevel_add_listener
	ldr	x0, [x19, #48]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_xdg_toplevel_set_app_id
	ldr	x0, [x19, #48]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_xdg_toplevel_set_title
	ldr	x0, [x19, #72]
	cbz	x0, LBB0_3
; %bb.2:
	ldr	x1, [x19, #48]
	bl	_zxdg_decoration_manager_v1_get_toplevel_decoration
	str	x0, [x19, #80]
LBB0_3:
	ldr	w0, [x19, #24]
	bl	_wl_surface_commit
	mov	w8, #1
	str	w8, [x19, #12]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19, #28]
	bl	_wl_display_dispatch
	ldr	w8, [x19, #12]
	cbnz	w8, LBB0_4
; %bb.5:
	ldr	w0, [x19, #28]
	bl	_wl_display_roundtrip
	ldr	x0, [x19, #96]
Lloh16:
	adrp	x1, _xdg_shell_listener@GOTPAGE
Lloh17:
	ldr	x1, [x1, _xdg_shell_listener@GOTPAGEOFF]
	mov	x2, #0
	bl	_xdg_wm_base_add_listener
	b	LBB0_12
LBB0_6:
	ldr	x0, [x19, #64]
	cbz	x0, LBB0_12
; %bb.7:
	ldr	w1, [x19, #24]
	bl	_zxdg_shell_v6_get_xdg_surface
	str	w0, [x19, #88]
Lloh18:
	adrp	x1, _zxdg_surface_v6_listener@GOTPAGE
Lloh19:
	ldr	x1, [x1, _zxdg_surface_v6_listener@GOTPAGEOFF]
	mov	x2, x19
	bl	_zxdg_surface_v6_add_listener
	ldr	w0, [x19, #88]
	bl	_zxdg_surface_v6_get_toplevel
	str	x0, [x19, #40]
Lloh20:
	adrp	x1, _zxdg_toplevel_v6_listener@GOTPAGE
Lloh21:
	ldr	x1, [x1, _zxdg_toplevel_v6_listener@GOTPAGEOFF]
	mov	x2, x19
	bl	_zxdg_toplevel_v6_add_listener
	ldr	x0, [x19, #40]
Lloh22:
	adrp	x1, l_.str@PAGE
Lloh23:
	add	x1, x1, l_.str@PAGEOFF
	bl	_zxdg_toplevel_v6_set_app_id
	ldr	x0, [x19, #40]
Lloh24:
	adrp	x1, l_.str.1@PAGE
Lloh25:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_zxdg_toplevel_v6_set_title
	ldr	x0, [x19, #72]
	cbz	x0, LBB0_9
; %bb.8:
	ldr	x1, [x19, #48]
	bl	_zxdg_decoration_manager_v1_get_toplevel_decoration
	str	x0, [x19, #80]
LBB0_9:
	ldr	w0, [x19, #24]
	bl	_wl_surface_commit
	mov	w8, #1
	str	w8, [x19, #12]
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19, #28]
	bl	_wl_display_dispatch
	ldr	w8, [x19, #12]
	cbnz	w8, LBB0_10
; %bb.11:
	ldr	w0, [x19, #28]
	bl	_wl_display_roundtrip
	ldr	x0, [x19, #64]
Lloh26:
	adrp	x1, _zxdg_shell_v6_listener@GOTPAGE
Lloh27:
	ldr	x1, [x1, _zxdg_shell_v6_listener@GOTPAGEOFF]
	mov	x2, #0
	bl	_zxdg_shell_v6_add_listener
LBB0_12:
	cbz	w20, LBB0_17
; %bb.13:
	ldr	x0, [x19, #48]
	cbz	x0, LBB0_15
; %bb.14:
	mov	x1, #0
	bl	_xdg_toplevel_set_fullscreen
	b	LBB0_17
LBB0_15:
	ldr	x0, [x19, #40]
	cbz	x0, LBB0_17
; %bb.16:
	mov	x1, #0
	bl	_zxdg_toplevel_v6_set_fullscreen
LBB0_17:
	add	x21, x19, #28
	mov	x0, x21
	bl	_flush_wayland_fd
Lloh28:
	adrp	x8, _wl_api@GOTPAGE
Lloh29:
	ldr	x8, [x8, _wl_api@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	cmp	w8, #128
	b.ne	LBB0_19
; %bb.18:
	ldr	w0, [x21]
	bl	_wl_display_roundtrip
LBB0_19:
	cbz	w20, LBB0_21
; %bb.20:
	str	wzr, [x19, #16]
	mov	x0, x19
	mov	w1, #0
	bl	_gfx_ctx_wl_show_mouse
	b	LBB0_22
LBB0_21:
	mov	w8, #1
	str	w8, [x19, #16]
LBB0_22:
	mov	w0, #1
	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 AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_DEFAULT_WINDOWED_WIDTH,4,2     ; @DEFAULT_WINDOWED_WIDTH
	.comm	_DEFAULT_WINDOWED_HEIGHT,4,2    ; @DEFAULT_WINDOWED_HEIGHT
	.comm	_wl_surface_listener,4,2        ; @wl_surface_listener
	.comm	_wl_api,4,2                     ; @wl_api
	.comm	_xdg_surface_listener,4,2       ; @xdg_surface_listener
	.comm	_xdg_toplevel_listener,4,2      ; @xdg_toplevel_listener
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"retroarch"

l_.str.1:                               ; @.str.1
	.asciz	"RetroArch"

	.comm	_xdg_shell_listener,4,2         ; @xdg_shell_listener
	.comm	_zxdg_surface_v6_listener,4,2   ; @zxdg_surface_v6_listener
	.comm	_zxdg_toplevel_v6_listener,4,2  ; @zxdg_toplevel_v6_listener
	.comm	_zxdg_shell_v6_listener,4,2     ; @zxdg_shell_v6_listener
	.comm	_VULKAN_WSI_WAYLAND,4,2         ; @VULKAN_WSI_WAYLAND
	.no_dead_strip	_gfx_ctx_wl_set_video_mode
.subsections_via_symbols
