	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__glfwAddOutput                 ## -- Begin function _glfwAddOutput
	.p2align	4, 0x90
__glfwAddOutput:                        ## @_glfwAddOutput
	.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
	subq	$96, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movl	%edi, %r15d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	leaq	-128(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$80, %edx
	callq	_memset
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	movl	$79, %esi
	movl	%r15d, %ecx
	callq	_snprintf
	cmpl	$1, %ebx
	jg	LBB0_2
## %bb.1:
	movq	_GLFW_PLATFORM_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	__glfwInputError
	jmp	LBB0_7
LBB0_2:
	leaq	-128(%rbp), %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	__glfwAllocMonitor
	movq	%rax, %r14
	movq	__glfw@GOTPCREL(%rip), %r12
	movl	16(%r12), %edi
	movq	_wl_output_interface@GOTPCREL(%rip), %rdx
	movl	%r15d, %esi
	movl	$2, %ecx
	callq	_wl_registry_bind
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %rbx
	movl	$4, %edi
	movl	$4, %esi
	callq	_calloc
	movl	%eax, 16(%r14)
	movl	$4, (%r14)
	movq	%rbx, 8(%r14)
	movq	_output_listener@GOTPCREL(%rip), %rsi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_wl_output_add_listener
	movl	(%r12), %ecx
	movl	4(%r12), %esi
	leal	1(%rcx), %edx
	movq	8(%r12), %rax
	cmpl	%esi, %edx
	jl	LBB0_6
## %bb.5:
	leal	(%rsi,%rsi), %ebx
	shll	$4, %esi
	movq	%rax, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_realloc
	movq	%rax, 8(%r12)
	movl	%ebx, 4(%r12)
	movl	(%r12), %ecx
	leal	1(%rcx), %edx
LBB0_6:
	movl	%edx, (%r12)
	movslq	%ecx, %rcx
	movq	%r14, (%rax,%rcx,8)
	jmp	LBB0_7
LBB0_3:
	movq	%r14, %rdi
	callq	__glfwFreeMonitor
LBB0_7:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_9
## %bb.8:
	addq	$96, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wl_output@%u"

	.comm	_GLFW_PLATFORM_ERROR,4,2        ## @GLFW_PLATFORM_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"Wayland: Unsupported output interface version"

	.comm	__glfw,24,3                     ## @_glfw
	.comm	_wl_output_interface,4,2        ## @wl_output_interface
	.comm	_output_listener,4,2            ## @output_listener
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__glfwAddOutput                 ; -- Begin function _glfwAddOutput
	.p2align	2
__glfwAddOutput:                        ; @_glfwAddOutput
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #80
	bl	_memset
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	add	x0, sp, #8
	mov	w1, #79
	mov	x3, x20
	bl	_snprintf
	cmp	w19, #1
	b.gt	LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, _GLFW_PLATFORM_ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GLFW_PLATFORM_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	__glfwInputError
	b	LBB0_7
LBB0_2:
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #0
	bl	__glfwAllocMonitor
	mov	x19, x0
Lloh10:
	adrp	x21, __glfw@GOTPAGE
Lloh11:
	ldr	x21, [x21, __glfw@GOTPAGEOFF]
	ldr	w0, [x21, #16]
Lloh12:
	adrp	x2, _wl_output_interface@GOTPAGE
Lloh13:
	ldr	x2, [x2, _wl_output_interface@GOTPAGEOFF]
	mov	x1, x20
	mov	w3, #2
	bl	_wl_registry_bind
	cbz	x0, LBB0_6
; %bb.3:
	mov	x20, x0
	mov	w22, #4
	mov	w0, #4
	mov	w1, #4
	bl	_calloc
	str	w0, [x19, #16]
	str	w22, [x19]
	str	x20, [x19, #8]
Lloh14:
	adrp	x1, _output_listener@GOTPAGE
Lloh15:
	ldr	x1, [x1, _output_listener@GOTPAGEOFF]
	mov	x0, x20
	mov	x2, x19
	bl	_wl_output_add_listener
	ldp	w8, w10, [x21]
	add	w9, w8, #1
	ldr	x0, [x21, #8]
	cmp	w9, w10
	b.lt	LBB0_5
; %bb.4:
	lsl	w20, w10, #1
	lsl	w1, w10, #4
	bl	_realloc
	str	x0, [x21, #8]
	str	w20, [x21, #4]
	ldr	w8, [x21]
	add	w9, w8, #1
LBB0_5:
	str	w9, [x21]
	str	x19, [x0, w8, sxtw #3]
	b	LBB0_7
LBB0_6:
	mov	x0, x19
	bl	__glfwFreeMonitor
LBB0_7:
	ldur	x8, [x29, #-40]
Lloh16:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh17:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.8:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_9:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wl_output@%u"

	.comm	_GLFW_PLATFORM_ERROR,4,2        ; @GLFW_PLATFORM_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"Wayland: Unsupported output interface version"

	.comm	__glfw,24,3                     ; @_glfw
	.comm	_wl_output_interface,4,2        ; @wl_output_interface
	.comm	_output_listener,4,2            ; @output_listener
.subsections_via_symbols
