	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handle_output
_handle_output:                         ## @handle_output
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdx, %r13
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	%rsi, %rdi
	callq	_get_output_by_id
	movq	%rax, %rbx
	movq	%rax, %r14
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movl	$1, %edi
	movl	$80, %esi
	callq	_scalloc
	movq	%rax, %r14
	leaq	64(%rax), %rdi
	callq	_SLIST_INIT
LBB0_2:
	movq	%r15, 72(%r14)
	movq	_primary@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	testq	%rcx, %rcx
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_3
## %bb.4:
	xorl	%eax, %eax
	cmpq	%r15, (%rcx)
	sete	%al
	jmp	LBB0_5
LBB0_3:
	xorl	%eax, %eax
LBB0_5:
	movl	%eax, (%r14)
	leaq	64(%r14), %r12
	movq	%r12, %rdi
	callq	_SLIST_EMPTY
	testl	%eax, %eax
	jne	LBB0_8
## %bb.6:
	movq	_names@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_SLIST_FIRST
	movq	(%rax), %rdi
	callq	_FREE
	movq	%r12, %rdi
	callq	_SLIST_FIRST
	movq	%rax, %rbx
	movl	(%r15), %esi
	movq	%r12, %rdi
	callq	_SLIST_REMOVE_HEAD
	movq	%rbx, %rdi
	callq	_FREE
	movq	%r12, %rdi
	callq	_SLIST_EMPTY
	testl	%eax, %eax
	je	LBB0_7
LBB0_8:
	movl	$1, %edi
	movl	$8, %esi
	callq	_scalloc
	movq	%rax, %rbx
	movq	%r13, %rdi
	callq	_xcb_randr_get_output_info_name_length
	movl	%eax, %r15d
	movq	%r13, %rdi
	callq	_xcb_randr_get_output_info_name
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r15d, %edx
	movl	%eax, %ecx
	callq	_sasprintf
	movq	_names@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_SLIST_INSERT_HEAD
	movq	%r14, %rdi
	callq	_output_primary_name
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DLOG
	movq	(%r13), %rsi
	movq	_XCB_NONE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jne	LBB0_14
## %bb.9:
	cmpq	$0, -72(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_10
## %bb.12:
	cmpl	$0, 4(%r14)
	je	LBB0_24
## %bb.13:
	movl	$1, 8(%r14)
	jmp	LBB0_24
LBB0_14:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_xcb_randr_get_crtc_info
	movq	%rbx, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_xcb_randr_get_crtc_info_reply
	testq	%rax, %rax
	je	LBB0_25
## %bb.15:
	movq	%rax, %r12
	leaq	16(%r14), %r15
	movl	60(%rax), %esi
	movq	%r15, %rdi
	callq	_update_if_necessary
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	leaq	24(%r14), %rdi
	movl	56(%r12), %esi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_update_if_necessary
	movl	%eax, %ebx
	leaq	32(%r14), %rdi
	movl	52(%r12), %esi
	callq	_update_if_necessary
	movl	%eax, %r13d
	leaq	40(%r14), %rdi
	movl	48(%r12), %esi
	callq	_update_if_necessary
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movq	%r12, %rdi
	callq	_free
	movq	32(%r14), %rsi
	testq	%rsi, %rsi
	je	LBB0_21
## %bb.16:
	movq	40(%r14), %rdx
	xorl	%eax, %eax
	testq	%rdx, %rdx
	setne	%al
	movl	%eax, 4(%r14)
	je	LBB0_22
## %bb.17:
	orl	-44(%rbp), %ebx                 ## 4-byte Folded Reload
	orl	-60(%rbp), %r13d                ## 4-byte Folded Reload
	orl	%ebx, %r13d
	movq	(%r15), %rcx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %r8
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_DLOG
	testl	%r13d, %r13d
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	je	LBB0_19
## %bb.18:
	testq	%rax, %rax
	je	LBB0_19
## %bb.23:
	movl	$1, 12(%r14)
	jmp	LBB0_24
LBB0_25:
	movq	%r14, %rdi
	callq	_output_primary_name
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	xorl	%eax, %eax
	callq	_DLOG
	movq	%r14, %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_free                           ## TAILCALL
LBB0_21:
	movl	$0, 4(%r14)
LBB0_22:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DLOG                           ## TAILCALL
LBB0_19:
	testq	%rax, %rax
	je	LBB0_10
LBB0_24:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	cmpl	$0, (%r14)
	movq	_outputs@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_outputs@GOTPCREL(%rip), %rdi
	movq	%r14, %rsi
	je	LBB0_11
## %bb.20:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_TAILQ_INSERT_HEAD              ## TAILCALL
LBB0_11:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_TAILQ_INSERT_TAIL              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_primary,8,3                    ## @primary
	.comm	_names,4,2                      ## @names
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%.*s"

L_.str.1:                               ## @.str.1
	.asciz	"found output with name %s\n"

	.comm	_XCB_NONE,8,3                   ## @XCB_NONE
	.comm	_outputs,4,2                    ## @outputs
L_.str.2:                               ## @.str.2
	.asciz	"Skipping output %s: could not get CRTC (%p)\n"

L_.str.3:                               ## @.str.3
	.asciz	"width/height 0/0, disabling output\n"

L_.str.4:                               ## @.str.4
	.asciz	"mode: %dx%d+%d+%d\n"

	.no_dead_strip	_handle_output
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function handle_output
_handle_output:                         ; @handle_output
	.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	x22, x3
	mov	x23, x2
	mov	x24, x1
	mov	x21, x0
	mov	x0, x1
	bl	_get_output_by_id
	mov	x20, x0
	mov	x19, x0
	cbnz	x0, LBB0_2
; %bb.1:
	mov	w0, #1
	mov	w1, #80
	bl	_scalloc
	mov	x19, x0
	add	x0, x0, #64
	bl	_SLIST_INIT
LBB0_2:
	str	x24, [x19, #72]
Lloh0:
	adrp	x8, _primary@GOTPAGE
Lloh1:
	ldr	x8, [x8, _primary@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.3:
	ldr	x8, [x8]
	cmp	x8, x24
	cset	w8, eq
LBB0_4:
	mov	x24, x19
	str	w8, [x24], #64
	mov	x0, x24
	bl	_SLIST_EMPTY
Lloh3:
	adrp	x27, _names@GOTPAGE
Lloh4:
	ldr	x27, [x27, _names@GOTPAGEOFF]
	cbnz	w0, LBB0_6
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x24
	bl	_SLIST_FIRST
	ldr	x0, [x0]
	bl	_FREE
	mov	x0, x24
	bl	_SLIST_FIRST
	mov	x25, x0
	ldr	w1, [x27]
	mov	x0, x24
	bl	_SLIST_REMOVE_HEAD
	mov	x0, x25
	bl	_FREE
	mov	x0, x24
	bl	_SLIST_EMPTY
	cbz	w0, LBB0_5
LBB0_6:
	mov	w0, #1
	mov	w1, #8
	bl	_scalloc
	mov	x25, x0
	mov	x0, x23
	bl	_xcb_randr_get_output_info_name_length
	mov	x26, x0
	mov	x0, x23
	bl	_xcb_randr_get_output_info_name
	mov	x3, x0
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x25
	mov	x2, x26
	bl	_sasprintf
	ldr	w2, [x27]
	mov	x0, x24
	mov	x1, x25
	bl	_SLIST_INSERT_HEAD
	mov	x0, x19
	bl	_output_primary_name
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DLOG
	ldr	x1, [x23]
Lloh9:
	adrp	x8, _XCB_NONE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _XCB_NONE@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x1, x8
	b.ne	LBB0_10
; %bb.7:
	cbz	x20, LBB0_21
; %bb.8:
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_20
; %bb.9:
	mov	w8, #1
	str	w8, [x19, #8]
	b	LBB0_20
LBB0_10:
	mov	x0, x21
	mov	x2, x22
	bl	_xcb_randr_get_crtc_info
	mov	x1, x0
	mov	x0, x21
	mov	x2, #0
	bl	_xcb_randr_get_crtc_info_reply
	cbz	x0, LBB0_16
; %bb.11:
	mov	x24, x0
	add	x21, x19, #16
	ldr	w1, [x0, #60]
	mov	x0, x21
	bl	_update_if_necessary
	mov	x23, x0
	add	x22, x19, #24
	ldr	w1, [x24, #56]
	mov	x0, x22
	bl	_update_if_necessary
	mov	x25, x0
	add	x0, x19, #32
	ldr	w1, [x24, #52]
	bl	_update_if_necessary
	mov	x26, x0
	add	x0, x19, #40
	ldr	w1, [x24, #48]
	bl	_update_if_necessary
	mov	x27, x0
	mov	x0, x24
	bl	_free
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_17
; %bb.12:
	ldr	x9, [x19, #40]
	cmp	x9, #0
	cset	w10, ne
	str	w10, [x19, #4]
	cbz	x9, LBB0_18
; %bb.13:
	orr	w10, w25, w23
	orr	w10, w10, w26
	orr	w23, w10, w27
	ldr	x10, [x21]
	ldr	x11, [x22]
	stp	x10, x11, [sp, #16]
	stp	x8, x9, [sp]
Lloh12:
	adrp	x0, l_.str.4@PAGE
Lloh13:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_DLOG
	cbz	w23, LBB0_19
; %bb.14:
	cbz	x20, LBB0_19
; %bb.15:
	mov	w8, #1
	str	w8, [x19, #12]
	b	LBB0_20
LBB0_16:
	mov	x0, x19
	bl	_output_primary_name
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x0, xzr, [sp]
Lloh14:
	adrp	x0, l_.str.2@PAGE
Lloh15:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DLOG
	mov	x0, x19
	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
	b	_free
LBB0_17:
	str	wzr, [x19, #4]
LBB0_18:
Lloh16:
	adrp	x0, l_.str.3@PAGE
Lloh17:
	add	x0, x0, l_.str.3@PAGEOFF
	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
	b	_DLOG
LBB0_19:
	cbz	x20, LBB0_21
LBB0_20:
	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
LBB0_21:
	ldr	w8, [x19]
Lloh18:
	adrp	x9, _outputs@GOTPAGE
Lloh19:
	ldr	x9, [x9, _outputs@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x9]
Lloh21:
	adrp	x0, _outputs@GOTPAGE
Lloh22:
	ldr	x0, [x0, _outputs@GOTPAGEOFF]
	mov	x1, x19
	cbz	w8, LBB0_23
; %bb.22:
	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
	b	_TAILQ_INSERT_HEAD
LBB0_23:
	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
	b	_TAILQ_INSERT_TAIL
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_primary,8,3                    ; @primary
	.comm	_names,4,2                      ; @names
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%.*s"

l_.str.1:                               ; @.str.1
	.asciz	"found output with name %s\n"

	.comm	_XCB_NONE,8,3                   ; @XCB_NONE
	.comm	_outputs,4,2                    ; @outputs
l_.str.2:                               ; @.str.2
	.asciz	"Skipping output %s: could not get CRTC (%p)\n"

l_.str.3:                               ; @.str.3
	.asciz	"width/height 0/0, disabling output\n"

l_.str.4:                               ; @.str.4
	.asciz	"mode: %dx%d+%d+%d\n"

	.no_dead_strip	_handle_output
.subsections_via_symbols
