	.file	"843022.c"
	.intel_syntax noprefix
	.text
	.globl	dir_exists
	.type	dir_exists, @function
dir_exists:
.LFB168:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 176
	mov	QWORD PTR -168[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdx, -160[rbp]
	mov	rax, QWORD PTR -168[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	stat@PLT
	test	eax, eax
	jne	.L2
	mov	eax, DWORD PTR -136[rbp]
	and	eax, 61440
	cmp	eax, 16384
	jne	.L2
	mov	eax, 1
	jmp	.L4
.L2:
	mov	eax, 0
.L4:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE168:
	.size	dir_exists, .-dir_exists
	.globl	connection_exists
	.type	connection_exists, @function
connection_exists:
.LFB169:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	edi, 0
	call	wl_display_connect@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	je	.L7
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	wl_display_disconnect@PLT
	mov	eax, 1
	jmp	.L8
.L7:
	mov	eax, 0
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE169:
	.size	connection_exists, .-connection_exists
	.section	.rodata
.LC0:
	.string	"fork"
.LC1:
	.string	"execv"
	.text
	.globl	start_server
	.type	start_server, @function
start_server:
.LFB170:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	call	fork@PLT
	cmp	eax, -1
	je	.L10
	test	eax, eax
	je	.L11
	jmp	.L14
.L10:
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L13
.L11:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	execv@PLT
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L14:
	mov	eax, 0
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE170:
	.size	start_server, .-start_server
	.section	.rodata
	.align 8
.LC2:
	.string	"/data/data/com.termux/files/usr/bin/Xwayland"
	.text
	.globl	start_xwayland
	.type	start_xwayland, @function
start_xwayland:
.LFB171:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	lea	rdx, .LC2[rip]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	execv@PLT
	lea	rdi, .LC1[rip]
	call	perror@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE171:
	.size	start_xwayland, .-start_xwayland
	.section	.rodata
.LC3:
	.string	"/data/data/com.termux.x11/"
.LC4:
	.string	"Termux:X11 is not installed"
	.align 8
.LC5:
	.string	"/data/data/com.termux/files/usr/bin/am"
.LC6:
	.string	"start"
.LC7:
	.string	"-n"
.LC8:
	.string	"com.termux.x11/.MainActivity"
.LC9:
	.string	"Error starting Termux:X11"
	.align 8
.LC10:
	.string	"Failed starting Termux:X11: timeout"
	.text
	.globl	main
	.type	main, @function
main:
.LFB172:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 80
	mov	DWORD PTR -68[rbp], edi
	mov	QWORD PTR -80[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC3[rip]
	call	dir_exists
	test	eax, eax
	jne	.L17
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L24
.L17:
	lea	rax, .LC5[rip]
	mov	QWORD PTR -48[rbp], rax
	lea	rax, .LC6[rip]
	mov	QWORD PTR -40[rbp], rax
	lea	rax, .LC7[rip]
	mov	QWORD PTR -32[rbp], rax
	lea	rax, .LC8[rip]
	mov	QWORD PTR -24[rbp], rax
	mov	QWORD PTR -16[rbp], 0
	call	connection_exists
	test	eax, eax
	jne	.L19
	lea	rax, -48[rbp]
	mov	rdi, rax
	call	start_server
	cmp	eax, -1
	jne	.L19
	lea	rdi, .LC9[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L24
.L19:
	mov	DWORD PTR -52[rbp], 0
	mov	DWORD PTR -56[rbp], 0
	jmp	.L20
.L23:
	call	connection_exists
	mov	DWORD PTR -52[rbp], eax
	cmp	DWORD PTR -52[rbp], 0
	je	.L21
	mov	rax, QWORD PTR -80[rbp]
	mov	rdi, rax
	call	start_xwayland
	jmp	.L22
.L21:
	mov	edi, 1
	call	sleep@PLT
.L20:
	mov	eax, DWORD PTR -56[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -56[rbp], edx
	cmp	eax, 9
	jle	.L23
.L22:
	lea	rdi, .LC10[rip]
	call	puts@PLT
	mov	eax, 1
.L24:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE172:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"843022.c"
	.section	.rodata
	.align	2
.LC0:
	.ascii	"/data/data/com.termux/files/usr/bin/am\000"
	.align	2
.LC1:
	.ascii	"start\000"
	.align	2
.LC2:
	.ascii	"-n\000"
	.align	2
.LC3:
	.ascii	"com.termux.x11/.MainActivity\000"
	.text
	.section	.rodata
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	dir_exists
	.syntax unified
	.arm
	.fpu softvfp
	.type	dir_exists, %function
dir_exists:
	@ args = 0, pretend = 0, frame = 104
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #104
	str	r0, [fp, #-104]
	ldr	r3, .L6
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #100
	mov	r1, r3
	ldr	r0, [fp, #-104]
	bl	stat
	mov	r3, r0
	cmp	r3, #0
	bne	.L2
	ldr	r3, [fp, #-84]
	and	r3, r3, #61440
	cmp	r3, #16384
	bne	.L2
	mov	r3, #1
	b	.L4
.L2:
	mov	r3, #0
.L4:
	ldr	r2, .L6
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L5
	bl	__stack_chk_fail
.L5:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	.LC5
	.size	dir_exists, .-dir_exists
	.align	2
	.global	connection_exists
	.syntax unified
	.arm
	.fpu softvfp
	.type	connection_exists, %function
connection_exists:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	mov	r0, #0
	bl	wl_display_connect
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L9
	ldr	r0, [fp, #-8]
	bl	wl_display_disconnect
	mov	r3, #1
	b	.L10
.L9:
	mov	r3, #0
.L10:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	connection_exists, .-connection_exists
	.section	.rodata
	.align	2
.LC6:
	.ascii	"fork\000"
	.align	2
.LC7:
	.ascii	"execv\000"
	.text
	.align	2
	.global	start_server
	.syntax unified
	.arm
	.fpu softvfp
	.type	start_server, %function
start_server:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	bl	fork
	mov	r3, r0
	cmn	r3, #1
	beq	.L12
	cmp	r3, #0
	beq	.L13
	b	.L16
.L12:
	ldr	r0, .L17
	bl	perror
	mvn	r3, #0
	b	.L15
.L13:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	ldr	r1, [fp, #-8]
	mov	r0, r3
	bl	execv
	ldr	r0, .L17+4
	bl	perror
	mov	r0, #1
	bl	exit
.L16:
	mov	r3, #0
.L15:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	.LC6
	.word	.LC7
	.size	start_server, .-start_server
	.section	.rodata
	.align	2
.LC8:
	.ascii	"/data/data/com.termux/files/usr/bin/Xwayland\000"
	.text
	.align	2
	.global	start_xwayland
	.syntax unified
	.arm
	.fpu softvfp
	.type	start_xwayland, %function
start_xwayland:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r2, .L20
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	ldr	r1, [fp, #-8]
	mov	r0, r3
	bl	execv
	ldr	r0, .L20+4
	bl	perror
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L21:
	.align	2
.L20:
	.word	.LC8
	.word	.LC7
	.size	start_xwayland, .-start_xwayland
	.section	.rodata
	.align	2
.LC9:
	.ascii	"/data/data/com.termux.x11/\000"
	.align	2
.LC10:
	.ascii	"Termux:X11 is not installed\000"
	.align	2
.LC12:
	.ascii	"Error starting Termux:X11\000"
	.align	2
.LC13:
	.ascii	"Failed starting Termux:X11: timeout\000"
	.align	2
.LC11:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	0
	.align	2
.LC14:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	ldr	r3, .L32
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L32+4
	bl	dir_exists
	mov	r3, r0
	cmp	r3, #0
	bne	.L23
	ldr	r0, .L32+8
	bl	puts
	mov	r3, #1
	b	.L30
.L23:
	ldr	r3, .L32+12
	sub	ip, fp, #28
	mov	lr, r3
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldr	r3, [lr]
	str	r3, [ip]
	bl	connection_exists
	mov	r3, r0
	cmp	r3, #0
	bne	.L25
	sub	r3, fp, #28
	mov	r0, r3
	bl	start_server
	mov	r3, r0
	cmn	r3, #1
	bne	.L25
	ldr	r0, .L32+16
	bl	puts
	mov	r3, #1
	b	.L30
.L25:
	mov	r3, #0
	str	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-36]
	b	.L26
.L29:
	bl	connection_exists
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	beq	.L27
	ldr	r0, [fp, #-44]
	bl	start_xwayland
	b	.L28
.L27:
	mov	r0, #1
	bl	sleep
.L26:
	ldr	r3, [fp, #-36]
	add	r2, r3, #1
	str	r2, [fp, #-36]
	cmp	r3, #9
	ble	.L29
.L28:
	ldr	r0, .L32+20
	bl	puts
	mov	r3, #1
.L30:
	ldr	r2, .L32
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L31
	bl	__stack_chk_fail
.L31:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L33:
	.align	2
.L32:
	.word	.LC14
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
