	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function createShmBuffer
_createShmBuffer:                       ## @createShmBuffer
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movl	(%rdi), %r14d
	shll	$2, %r14d
	movl	4(%rdi), %r15d
	imull	%r14d, %r15d
	movl	%r15d, %edi
	callq	_createAnonymousFile
	testl	%eax, %eax
	js	LBB0_6
## %bb.1:
	movl	%eax, %r13d
	movq	_PROT_READ@GOTPCREL(%rip), %rax
	movq	_PROT_WRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_MAP_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	xorl	%edi, %edi
	movl	%r15d, %esi
	movl	%r13d, %r8d
	xorl	%r9d, %r9d
	callq	_mmap
	movq	%rax, %rbx
	movq	_MAP_FAILED@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	je	LBB0_7
## %bb.2:
	movq	__glfw@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r13d, %esi
	movl	%r15d, %edx
	callq	_wl_shm_create_pool
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	%r13d, %edi
	callq	_close
	movl	(%r12), %edx
	movl	4(%r12), %ecx
	movl	%ecx, %eax
	imull	%edx, %eax
	testl	%eax, %eax
	jle	LBB0_5
## %bb.3:
	movq	8(%r12), %rax
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	3(%rax,%rsi,4), %ecx
	movzbl	2(%rax,%rsi,4), %edx
	imull	%ecx, %edx
	imull	$32897, %edx, %edx              ## imm = 0x8081
	shrl	$23, %edx
	movb	%dl, (%rbx,%rsi,4)
	movzbl	1(%rax,%rsi,4), %edx
	imull	%ecx, %edx
	imull	$32897, %edx, %edx              ## imm = 0x8081
	shrl	$23, %edx
	movb	%dl, 1(%rbx,%rsi,4)
	movzbl	(%rax,%rsi,4), %edx
	imull	%ecx, %edx
	imull	$32897, %edx, %edx              ## imm = 0x8081
	shrl	$23, %edx
	movb	%dl, 2(%rbx,%rsi,4)
	movb	%cl, 3(%rbx,%rsi,4)
	movl	(%r12), %edx
	movl	4(%r12), %ecx
	movl	%ecx, %edi
	imull	%edx, %edi
	incq	%rsi
	cmpl	%edi, %esi
	jl	LBB0_4
LBB0_5:
	movq	_WL_SHM_FORMAT_ARGB8888@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	%r14d, %r8d
	callq	_wl_shm_pool_create_buffer
	movq	%rax, %r14
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_munmap
	movq	%r12, %rdi
	callq	_wl_shm_pool_destroy
	movq	%r14, %rax
	jmp	LBB0_9
LBB0_6:
	movq	_GLFW_PLATFORM_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	__glfwInputError
	jmp	LBB0_8
LBB0_7:
	movq	_GLFW_PLATFORM_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	__glfwInputError
	movl	%r13d, %edi
	callq	_close
LBB0_8:
	xorl	%eax, %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GLFW_PLATFORM_ERROR,4,2        ## @GLFW_PLATFORM_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Wayland: Creating a buffer file for %d B failed: %m"

	.comm	_PROT_READ,4,2                  ## @PROT_READ
	.comm	_PROT_WRITE,4,2                 ## @PROT_WRITE
	.comm	_MAP_SHARED,4,2                 ## @MAP_SHARED
	.comm	_MAP_FAILED,8,3                 ## @MAP_FAILED
L_.str.1:                               ## @.str.1
	.asciz	"Wayland: mmap failed: %m"

	.comm	__glfw,4,2                      ## @_glfw
	.comm	_WL_SHM_FORMAT_ARGB8888,4,2     ## @WL_SHM_FORMAT_ARGB8888
	.no_dead_strip	_createShmBuffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function createShmBuffer
_createShmBuffer:                       ; @createShmBuffer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x21, x0
	ldp	w8, w9, [x0]
	lsl	w20, w8, #2
	mul	w19, w20, w9
	mov	x0, x19
	bl	_createAnonymousFile
	tbnz	w0, #31, LBB0_6
; %bb.1:
	mov	x24, x0
Lloh0:
	adrp	x8, _PROT_READ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PROT_READ@GOTPAGEOFF]
Lloh2:
	adrp	x9, _PROT_WRITE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _PROT_WRITE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	ldr	w9, [x9]
	orr	w2, w9, w8
Lloh6:
	adrp	x8, _MAP_SHARED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MAP_SHARED@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	x0, #0
	mov	x1, x19
	mov	x4, x24
	mov	w5, #0
	bl	_mmap
Lloh9:
	adrp	x8, _MAP_FAILED@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MAP_FAILED@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_7
; %bb.2:
	mov	x22, x0
Lloh12:
	adrp	x8, __glfw@GOTPAGE
Lloh13:
	ldr	x8, [x8, __glfw@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	mov	x1, x24
	mov	x2, x19
	bl	_wl_shm_create_pool
	mov	x23, x0
	mov	x0, x24
	bl	_close
	ldp	w2, w3, [x21]
	mul	w8, w3, w2
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.3:
	mov	w8, #0
	ldr	x9, [x21, #8]
	add	x9, x9, #3
	mov	w10, #32897
	mov	x11, x22
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w12, [x9]
	ldurb	w13, [x9, #-1]
	mul	w13, w13, w12
	mul	w13, w13, w10
	lsr	w13, w13, #23
	strb	w13, [x11]
	ldurb	w13, [x9, #-2]
	mul	w13, w13, w12
	mul	w13, w13, w10
	lsr	w13, w13, #23
	strb	w13, [x11, #1]
	ldurb	w13, [x9, #-3]
	mul	w13, w13, w12
	mul	w13, w13, w10
	lsr	w13, w13, #23
	strb	w13, [x11, #2]
	strb	w12, [x11, #3]
	add	w8, w8, #1
	ldp	w2, w3, [x21]
	mul	w12, w3, w2
	add	x9, x9, #4
	add	x11, x11, #4
	cmp	w8, w12
	b.lt	LBB0_4
LBB0_5:
Lloh15:
	adrp	x8, _WL_SHM_FORMAT_ARGB8888@GOTPAGE
Lloh16:
	ldr	x8, [x8, _WL_SHM_FORMAT_ARGB8888@GOTPAGEOFF]
Lloh17:
	ldr	w5, [x8]
	mov	x0, x23
	mov	w1, #0
	mov	x4, x20
	bl	_wl_shm_pool_create_buffer
	mov	x20, x0
	mov	x0, x22
	mov	x1, x19
	bl	_munmap
	mov	x0, x23
	bl	_wl_shm_pool_destroy
	mov	x0, x20
	b	LBB0_9
LBB0_6:
Lloh18:
	adrp	x8, _GLFW_PLATFORM_ERROR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _GLFW_PLATFORM_ERROR@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	str	x19, [sp]
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	bl	__glfwInputError
	b	LBB0_8
LBB0_7:
Lloh23:
	adrp	x8, _GLFW_PLATFORM_ERROR@GOTPAGE
Lloh24:
	ldr	x8, [x8, _GLFW_PLATFORM_ERROR@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
Lloh26:
	adrp	x1, l_.str.1@PAGE
Lloh27:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	__glfwInputError
	mov	x0, x24
	bl	_close
LBB0_8:
	mov	x0, #0
LBB0_9:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_GLFW_PLATFORM_ERROR,4,2        ; @GLFW_PLATFORM_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Wayland: Creating a buffer file for %d B failed: %m"

	.comm	_PROT_READ,4,2                  ; @PROT_READ
	.comm	_PROT_WRITE,4,2                 ; @PROT_WRITE
	.comm	_MAP_SHARED,4,2                 ; @MAP_SHARED
	.comm	_MAP_FAILED,8,3                 ; @MAP_FAILED
l_.str.1:                               ; @.str.1
	.asciz	"Wayland: mmap failed: %m"

	.comm	__glfw,4,2                      ; @_glfw
	.comm	_WL_SHM_FORMAT_ARGB8888,4,2     ; @WL_SHM_FORMAT_ARGB8888
	.no_dead_strip	_createShmBuffer
.subsections_via_symbols
