	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xlib_threadf
_xlib_threadf:                          ## @xlib_threadf
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	xorl	%eax, %eax
	callq	_XInitThreads
	xorl	%edi, %edi
	callq	_XOpenDisplay
	movq	%rax, %r15
	movq	_xlib_display@GOTPCREL(%rip), %rax
	movq	%r15, (%rax)
	testq	%r15, %r15
	je	LBB0_1
## %bb.2:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_DefaultVisual
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	_TrueColor@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.5:
	movq	%r15, %rdi
	callq	_ServerVendor
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_VendorRelease
	movl	%eax, %r13d
	movq	%r15, %rdi
	callq	_DisplayString
	movq	%rax, %r12
	movq	%r15, %rdi
	callq	_ProtocolVersion
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movl	%eax, %r14d
	movq	%r15, %rdi
	callq	_ProtocolRevision
	leaq	L_.str.2(%rip), %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	%r13d, %edx
	movq	%r12, %rcx
	movl	%r14d, %r8d
	movl	%eax, %r9d
	callq	_printf
	movq	%r15, %rdi
	callq	_DefaultScreen
	movl	%eax, %r13d
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_ximage_realloc
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_sem_post
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_DisplayWidth
	movl	%eax, %ebx
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_DisplayHeight
	movl	%eax, %r12d
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_RootWindow
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movl	%ebx, %ecx
	shrl	%ecx
	movq	_scr_w@GOTPCREL(%rip), %r14
	movl	(%r14), %ebx
	movl	%ebx, %eax
	shrl	$31, %eax
	addl	%ebx, %eax
	sarl	%eax
	subl	%eax, %ecx
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%r12d, %ecx
	shrl	%ecx
	movq	_scr_h@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	%r12d, %eax
	shrl	$31, %eax
	addl	%r12d, %eax
	sarl	%eax
	subl	%eax, %ecx
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
	addl	$2, %ebx
	addl	$2, %r12d
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_BlackPixel
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_BlackPixel
                                        ## kill: def $eax killed $eax def $rax
	subq	$8, %rsp
	movq	%r15, %rdi
	movl	-56(%rbp), %esi                 ## 4-byte Reload
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movl	-60(%rbp), %ecx                 ## 4-byte Reload
	movl	%ebx, %r8d
	movl	%r12d, %r9d
	pushq	%rax
	pushq	-88(%rbp)                       ## 8-byte Folded Reload
	pushq	$1
	callq	_XCreateSimpleWindow
	addq	$32, %rsp
	movl	%eax, %ebx
	movq	_xlib_window@GOTPCREL(%rip), %rax
	movl	%ebx, (%rax)
	movq	_verstring@GOTPCREL(%rip), %rdi
	leaq	-92(%rbp), %r12
	movl	$1, %esi
	movq	%r12, %rdx
	callq	_XStringListToTextProperty
	movq	%r15, %rdi
	movl	%ebx, %esi
	movq	%r12, %rdx
	callq	_XSetWMName
	movq	_ExposureMask@GOTPCREL(%rip), %rax
	movq	_KeyPressMask@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_KeyReleaseMask@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_StructureNotifyMask@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_XSelectInput
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_XMapWindow
	leaq	-80(%rbp), %rbx
	leaq	LJTI0_0(%rip), %r12
	movq	_scr_changed@GOTPCREL(%rip), %r13
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	-76(%rbp), %edi
	callq	_key_press_event
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_XNextEvent
	movl	-80(%rbp), %eax
	addl	$-128, %eax
	cmpl	$3, %eax
	ja	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movslq	(%r12,%rax,4), %rax
	addq	%r12, %rax
	jmpq	*%rax
LBB0_15:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	-76(%rbp), %edi
	callq	_key_release_event
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r15, %rdi
	movl	$130, %esi
	movq	%rbx, %rdx
	callq	_XCheckTypedEvent
	testl	%eax, %eax
	jne	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	xorl	%eax, %eax
	callq	_xlib_update
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	-72(%rbp), %eax
	movl	-68(%rbp), %ecx
	addl	$-2, %eax
	cmpl	%eax, (%r14)
	jne	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_6 Depth=1
	addl	$-2, %ecx
	movq	_scr_h@GOTPCREL(%rip), %rdx
	cmpl	%ecx, (%rdx)
	je	LBB0_6
	jmp	LBB0_13
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=1
	addl	$-2, %ecx
LBB0_13:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	%eax, (%r14)
	movq	_scr_h@GOTPCREL(%rip), %rax
	movl	%ecx, (%rax)
	movl	$1, (%r13)
	jmp	LBB0_6
LBB0_1:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%edi, %edi
	callq	_XDisplayName
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_4
LBB0_3:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movq	%r15, %rdi
	callq	_XCloseDisplay
LBB0_4:
	movq	%r14, %rdi
	callq	_sem_post
	xorl	%eax, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
LJTI0_0:
	.long	L0_0_set_15
	.long	L0_0_set_14
	.long	L0_0_set_8
	.long	L0_0_set_10
	.end_data_region
                                        ## -- End function
	.comm	_xlib_display,8,3               ## @xlib_display
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot connect to X server %s\n"

	.comm	_TrueColor,8,3                  ## @TrueColor
L_.str.1:                               ## @.str.1
	.asciz	"cannot handle non true color visual\n"

L_.str.2:                               ## @.str.2
	.asciz	"X vendor: %s, rel: %d, display: %s, protocol ver: %d.%d\n"

	.comm	_scr_w,4,2                      ## @scr_w
	.comm	_scr_h,4,2                      ## @scr_h
	.comm	_xlib_window,4,2                ## @xlib_window
	.comm	_verstring,4,2                  ## @verstring
	.comm	_ExposureMask,4,2               ## @ExposureMask
	.comm	_KeyPressMask,4,2               ## @KeyPressMask
	.comm	_KeyReleaseMask,4,2             ## @KeyReleaseMask
	.comm	_StructureNotifyMask,4,2        ## @StructureNotifyMask
	.comm	_scr_changed,4,2                ## @scr_changed
	.no_dead_strip	_xlib_threadf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xlib_threadf
_xlib_threadf:                          ; @xlib_threadf
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x0
	bl	_XInitThreads
	mov	x0, #0
	bl	_XOpenDisplay
Lloh0:
	adrp	x8, _xlib_display@GOTPAGE
Lloh1:
	ldr	x8, [x8, _xlib_display@GOTPAGEOFF]
Lloh2:
	str	x0, [x8]
	cbz	x0, LBB0_13
; %bb.1:
	mov	x19, x0
	mov	w1, #0
	bl	_DefaultVisual
	ldr	x8, [x0]
Lloh3:
	adrp	x9, _TrueColor@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TrueColor@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.2:
	mov	x21, x0
	mov	x0, x19
	bl	_ServerVendor
	mov	x22, x0
	mov	x0, x19
	bl	_VendorRelease
	mov	x23, x0
	mov	x0, x19
	bl	_DisplayString
	mov	x24, x0
	mov	x0, x19
	bl	_ProtocolVersion
	mov	x25, x0
	mov	x0, x19
	bl	_ProtocolRevision
	mov	x5, x0
Lloh6:
	adrp	x0, l_.str.2@PAGE
Lloh7:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x22
	mov	x2, x23
	mov	x3, x24
	mov	x4, x25
	bl	_printf
	mov	x0, x19
	bl	_DefaultScreen
	mov	x22, x0
	mov	x0, x19
	mov	x1, x21
	bl	_ximage_realloc
	mov	x0, x20
	bl	_sem_post
	mov	x0, x19
	mov	x1, x22
	bl	_DisplayWidth
	mov	x20, x0
	mov	x0, x19
	mov	x1, x22
	bl	_DisplayHeight
	mov	x21, x0
	mov	x0, x19
	mov	x1, x22
	bl	_RootWindow
	mov	x23, x0
	lsr	w8, w20, #1
Lloh8:
	adrp	x27, _scr_w@GOTPAGE
Lloh9:
	ldr	x27, [x27, _scr_w@GOTPAGEOFF]
	ldr	w9, [x27]
	cmp	w9, #0
	cinc	w10, w9, lt
	sub	w20, w8, w10, asr #1
	lsr	w8, w21, #1
Lloh10:
	adrp	x28, _scr_h@GOTPAGE
Lloh11:
	ldr	x28, [x28, _scr_h@GOTPAGEOFF]
	ldr	w10, [x28]
	cmp	w10, #0
	cinc	w11, w10, lt
	sub	w21, w8, w11, asr #1
	add	w24, w9, #2
	add	w25, w10, #2
	mov	x0, x19
	mov	x1, x22
	bl	_BlackPixel
	mov	x26, x0
	mov	x0, x19
	mov	x1, x22
	bl	_BlackPixel
	str	w0, [sp]
	mov	w22, #1
	mov	x0, x19
	mov	x1, x23
	mov	x2, x20
	mov	x3, x21
	mov	x4, x24
	mov	x5, x25
	mov	w6, #1
	mov	x7, x26
	bl	_XCreateSimpleWindow
	mov	x20, x0
Lloh12:
	adrp	x8, _xlib_window@GOTPAGE
Lloh13:
	ldr	x8, [x8, _xlib_window@GOTPAGEOFF]
Lloh14:
	str	w0, [x8]
Lloh15:
	adrp	x0, _verstring@GOTPAGE
Lloh16:
	ldr	x0, [x0, _verstring@GOTPAGEOFF]
	add	x2, sp, #28
	mov	w1, #1
	bl	_XStringListToTextProperty
	add	x2, sp, #28
	mov	x0, x19
	mov	x1, x20
	bl	_XSetWMName
Lloh17:
	adrp	x8, _ExposureMask@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ExposureMask@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _KeyPressMask@GOTPAGE
Lloh21:
	ldr	x9, [x9, _KeyPressMask@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh23:
	adrp	x9, _KeyReleaseMask@GOTPAGE
Lloh24:
	ldr	x9, [x9, _KeyReleaseMask@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh26:
	adrp	x9, _StructureNotifyMask@GOTPAGE
Lloh27:
	ldr	x9, [x9, _StructureNotifyMask@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	orr	w2, w8, w9
	mov	x0, x19
	mov	x1, x20
	bl	_XSelectInput
	mov	x0, x19
	mov	x1, x20
	bl	_XMapWindow
Lloh29:
	adrp	x20, lJTI0_0@PAGE
Lloh30:
	add	x20, x20, lJTI0_0@PAGEOFF
Lloh31:
	adrp	x21, _scr_changed@GOTPAGE
Lloh32:
	ldr	x21, [x21, _scr_changed@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [sp, #12]
	bl	_key_press_event
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	add	x1, sp, #8
	mov	x0, x19
	bl	_XNextEvent
	ldr	w8, [sp, #8]
	sub	w8, w8, #128
	cmp	w8, #3
	b.hi	LBB0_4
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	adr	x9, LBB0_3
	ldrb	w10, [x20, x8]
	add	x9, x9, x10, lsl #2
	br	x9
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [sp, #12]
	bl	_key_release_event
	b	LBB0_4
LBB0_7:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x2, sp, #8
	mov	x0, x19
	mov	w1, #130
	bl	_XCheckTypedEvent
	cbnz	w0, LBB0_7
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	bl	_xlib_update
	b	LBB0_4
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldp	w8, w9, [sp, #16]
	ldr	w10, [x27]
	sub	w8, w8, #2
	cmp	w10, w8
	b.ne	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	w10, [x28]
	sub	w9, w9, #2
	cmp	w10, w9
	b.eq	LBB0_4
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
	sub	w9, w9, #2
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	str	w8, [x27]
	str	w9, [x28]
	str	w22, [x21]
	b	LBB0_4
LBB0_13:
Lloh33:
	adrp	x8, _stderr@GOTPAGE
Lloh34:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh35:
	ldr	w19, [x8]
	bl	_XDisplayName
	str	x0, [sp]
Lloh36:
	adrp	x1, l_.str@PAGE
Lloh37:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_fprintf
	b	LBB0_15
LBB0_14:
Lloh38:
	adrp	x8, _stderr@GOTPAGE
Lloh39:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh40:
	ldr	w0, [x8]
Lloh41:
	adrp	x1, l_.str.1@PAGE
Lloh42:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
	mov	x0, x19
	bl	_XCloseDisplay
LBB0_15:
	mov	x0, x20
	bl	_sem_post
	mov	x0, #0
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotStr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_6-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_7-LBB0_3)>>2
	.byte	(LBB0_9-LBB0_3)>>2
                                        ; -- End function
	.comm	_xlib_display,8,3               ; @xlib_display
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot connect to X server %s\n"

	.comm	_TrueColor,8,3                  ; @TrueColor
l_.str.1:                               ; @.str.1
	.asciz	"cannot handle non true color visual\n"

l_.str.2:                               ; @.str.2
	.asciz	"X vendor: %s, rel: %d, display: %s, protocol ver: %d.%d\n"

	.comm	_scr_w,4,2                      ; @scr_w
	.comm	_scr_h,4,2                      ; @scr_h
	.comm	_xlib_window,4,2                ; @xlib_window
	.comm	_verstring,4,2                  ; @verstring
	.comm	_ExposureMask,4,2               ; @ExposureMask
	.comm	_KeyPressMask,4,2               ; @KeyPressMask
	.comm	_KeyReleaseMask,4,2             ; @KeyReleaseMask
	.comm	_StructureNotifyMask,4,2        ; @StructureNotifyMask
	.comm	_scr_changed,4,2                ; @scr_changed
	.no_dead_strip	_xlib_threadf
.subsections_via_symbols
