	.file	"234518016.c"
	.intel_syntax noprefix
	.text
	.globl	MTX
	.bss
	.type	MTX, @object
	.size	MTX, 1
MTX:
	.zero	1
	.globl	COND
	.section	.tbss,"awT",@nobits
	.type	COND, @object
	.size	COND, 1
COND:
	.zero	1
	.globl	buf
	.bss
	.type	buf, @object
	.size	buf, 1
buf:
	.zero	1
	.text
	.globl	__VERIFIER_atomic_acquire
	.type	__VERIFIER_atomic_acquire, @function
__VERIFIER_atomic_acquire:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	movzx	eax, BYTE PTR MTX[rip]
	xor	eax, 1
	movzx	eax, al
	mov	edi, eax
	mov	eax, 0
	call	__VERIFIER_assume@PLT
	mov	BYTE PTR MTX[rip], 1
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	__VERIFIER_atomic_acquire, .-__VERIFIER_atomic_acquire
	.globl	__VERIFIER_atomic_release
	.type	__VERIFIER_atomic_release, @function
__VERIFIER_atomic_release:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	movzx	eax, BYTE PTR MTX[rip]
	movzx	eax, al
	mov	edi, eax
	mov	eax, 0
	call	__VERIFIER_assume@PLT
	mov	BYTE PTR MTX[rip], 0
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	__VERIFIER_atomic_release, .-__VERIFIER_atomic_release
	.type	adb_kbd_receive_packet, @function
adb_kbd_receive_packet:
.LFB2:
	.cfi_startproc
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, 0
	call	__VERIFIER_atomic_acquire
	movzx	eax, BYTE PTR MTX[rip]
	xor	eax, 1
	test	al, al
	je	.L4
	nop
.L5:
	mov	eax, 0
	call	__VERIFIER_error@PLT
.L4:
	movzx	eax, BYTE PTR MTX[rip]
	movzx	eax, al
	mov	edi, eax
	mov	eax, 0
	call	__VERIFIER_atomic_release
	mov	BYTE PTR fs:COND@tpoff, 1
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	adb_kbd_receive_packet, .-adb_kbd_receive_packet
	.type	akbd_repeat, @function
akbd_repeat:
.LFB3:
	.cfi_startproc
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, 0
	call	__VERIFIER_atomic_acquire
	movzx	eax, BYTE PTR MTX[rip]
	xor	eax, 1
	test	al, al
	je	.L8
	nop
.L9:
	mov	eax, 0
	call	__VERIFIER_error@PLT
.L8:
	movzx	eax, BYTE PTR MTX[rip]
	movzx	eax, al
	mov	edi, eax
	mov	eax, 0
	call	__VERIFIER_atomic_release
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	akbd_repeat, .-akbd_repeat
	.type	akbd_read_char, @function
akbd_read_char:
.LFB4:
	.cfi_startproc
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], edi
	mov	eax, 0
	call	__VERIFIER_atomic_acquire
	movzx	eax, BYTE PTR MTX[rip]
	xor	eax, 1
	test	al, al
	je	.L11
	nop
	jmp	.L12
.L16:
	nop
.L12:
	mov	eax, 0
	call	__VERIFIER_error@PLT
.L11:
	movzx	eax, BYTE PTR buf[rip]
	xor	eax, 1
	test	al, al
	je	.L13
	cmp	DWORD PTR -4[rbp], 0
	je	.L13
	mov	BYTE PTR fs:COND@tpoff, 0
	mov	eax, 0
	call	__VERIFIER_atomic_release
	movzx	eax, BYTE PTR fs:COND@tpoff
	movzx	eax, al
	mov	edi, eax
	mov	eax, 0
	call	__VERIFIER_assume@PLT
	mov	eax, 0
	call	__VERIFIER_atomic_acquire
	movzx	eax, BYTE PTR fs:COND@tpoff
	xor	eax, 1
	test	al, al
	jne	.L16
.L13:
	movzx	eax, BYTE PTR buf[rip]
	xor	eax, 1
	test	al, al
	je	.L14
	movzx	eax, BYTE PTR MTX[rip]
	movzx	eax, al
	mov	edi, eax
	mov	eax, 0
	call	__VERIFIER_atomic_release
	jmp	.L10
.L14:
	movzx	eax, BYTE PTR MTX[rip]
	movzx	eax, al
	mov	edi, eax
	mov	eax, 0
	call	__VERIFIER_atomic_release
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	akbd_read_char, .-akbd_read_char
	.type	akbd_clear_state, @function
akbd_clear_state:
.LFB5:
	.cfi_startproc
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, 0
	call	__VERIFIER_atomic_acquire
	movzx	eax, BYTE PTR MTX[rip]
	xor	eax, 1
	test	al, al
	je	.L18
	nop
.L19:
	mov	eax, 0
	call	__VERIFIER_error@PLT
.L18:
	mov	BYTE PTR buf[rip], 0
	movzx	eax, BYTE PTR MTX[rip]
	movzx	eax, al
	mov	edi, eax
	mov	eax, 0
	call	__VERIFIER_atomic_release
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE5:
	.size	akbd_clear_state, .-akbd_clear_state
	.globl	thr1
	.type	thr1, @function
thr1:
.LFB6:
	.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
.L31:
	mov	eax, 0
	call	__VERIFIER_nondet_int@PLT
	cmp	eax, 4
	ja	.L31
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L23[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L23[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L23:
	.long	.L27-.L23
	.long	.L26-.L23
	.long	.L25-.L23
	.long	.L24-.L23
	.long	.L30-.L23
	.text
.L27:
	mov	eax, 0
	call	adb_kbd_receive_packet
	jmp	.L21
.L26:
	mov	eax, 0
	call	akbd_repeat
	jmp	.L21
.L25:
	mov	eax, 0
	call	__VERIFIER_nondet_int@PLT
	mov	edi, eax
	call	akbd_read_char
	jmp	.L21
.L24:
	mov	eax, 0
	call	akbd_clear_state
	jmp	.L21
.L30:
	mov	eax, 0
	call	__VERIFIER_atomic_acquire
	movzx	eax, BYTE PTR MTX[rip]
	xor	eax, 1
	test	al, al
	je	.L28
	nop
.L29:
	mov	eax, 0
	call	__VERIFIER_error@PLT
.L28:
	movzx	eax, BYTE PTR buf[rip]
	movzx	eax, al
	test	eax, eax
	setne	al
	xor	eax, 1
	movzx	eax, al
	and	eax, 1
	mov	BYTE PTR buf[rip], al
	movzx	eax, BYTE PTR MTX[rip]
	movzx	eax, al
	mov	edi, eax
	mov	eax, 0
	call	__VERIFIER_atomic_release
	jmp	.L30
.L21:
	jmp	.L31
	.cfi_endproc
.LFE6:
	.size	thr1, .-thr1
	.globl	main
	.type	main, @function
main:
.LFB7:
	.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
.L33:
	lea	rax, -16[rbp]
	mov	ecx, 0
	lea	rdx, thr1[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	jmp	.L33
	.cfi_endproc
.LFE7:
	.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	"234518016.c"
	.text
	.global	MTX
	.bss
	.type	MTX, %object
	.size	MTX, 1
MTX:
	.space	1
	.global	COND
	.section	.tbss,"awT",%nobits
	.type	COND, %object
	.size	COND, 1
COND:
	.space	1
	.global	buf
	.bss
	.type	buf, %object
	.size	buf, 1
buf:
	.space	1
	.text
	.align	2
	.global	__VERIFIER_atomic_acquire
	.syntax unified
	.arm
	.fpu softvfp
	.type	__VERIFIER_atomic_acquire, %function
__VERIFIER_atomic_acquire:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L2
	ldrb	r3, [r3]
	and	r3, r3, #255
	eor	r3, r3, #1
	and	r3, r3, #255
	mov	r0, r3
	bl	__VERIFIER_assume
	ldr	r3, .L2
	mov	r2, #1
	strb	r2, [r3]
	nop
	pop	{fp, pc}
.L3:
	.align	2
.L2:
	.word	MTX
	.size	__VERIFIER_atomic_acquire, .-__VERIFIER_atomic_acquire
	.align	2
	.global	__VERIFIER_atomic_release
	.syntax unified
	.arm
	.fpu softvfp
	.type	__VERIFIER_atomic_release, %function
__VERIFIER_atomic_release:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r3, .L5
	ldrb	r3, [r3]
	and	r3, r3, #255
	mov	r0, r3
	bl	__VERIFIER_assume
	ldr	r3, .L5
	mov	r2, #0
	strb	r2, [r3]
	nop
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	MTX
	.size	__VERIFIER_atomic_release, .-__VERIFIER_atomic_release
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	adb_kbd_receive_packet, %function
adb_kbd_receive_packet:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	bl	__VERIFIER_atomic_acquire
	ldr	r3, .L11
	ldrb	r3, [r3]
	and	r3, r3, #255
	eor	r3, r3, #1
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L8
	nop
.L9:
	bl	__VERIFIER_error
.L8:
	ldr	r3, .L11
	ldrb	r3, [r3]
	and	r3, r3, #255
	mov	r0, r3
	bl	__VERIFIER_atomic_release
	bl	__aeabi_read_tp	@ load_tp_soft
	mov	r3, r0
	ldr	r2, .L11+4
	mov	r1, #1
	strb	r1, [r3, r2]
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	MTX
	.word	COND(tpoff)
	.size	adb_kbd_receive_packet, .-adb_kbd_receive_packet
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	akbd_repeat, %function
akbd_repeat:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	bl	__VERIFIER_atomic_acquire
	ldr	r3, .L16
	ldrb	r3, [r3]
	and	r3, r3, #255
	eor	r3, r3, #1
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L14
	nop
.L15:
	bl	__VERIFIER_error
.L14:
	ldr	r3, .L16
	ldrb	r3, [r3]
	and	r3, r3, #255
	mov	r0, r3
	bl	__VERIFIER_atomic_release
	nop
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	MTX
	.size	akbd_repeat, .-akbd_repeat
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	akbd_read_char, %function
akbd_read_char:
	@ 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	__VERIFIER_atomic_acquire
	ldr	r3, .L25
	ldrb	r3, [r3]
	and	r3, r3, #255
	eor	r3, r3, #1
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L19
	nop
	b	.L20
.L24:
	nop
.L20:
	bl	__VERIFIER_error
.L19:
	ldr	r3, .L25+4
	ldrb	r3, [r3]	@ zero_extendqisi2
	eor	r3, r3, #1
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L21
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L21
	bl	__aeabi_read_tp	@ load_tp_soft
	mov	r3, r0
	ldr	r2, .L25+8
	mov	r1, #0
	strb	r1, [r3, r2]
	bl	__VERIFIER_atomic_release
	bl	__aeabi_read_tp	@ load_tp_soft
	mov	r3, r0
	ldr	r2, .L25+8
	ldrb	r3, [r3, r2]	@ zero_extendqisi2
	mov	r0, r3
	bl	__VERIFIER_assume
	bl	__VERIFIER_atomic_acquire
	bl	__aeabi_read_tp	@ load_tp_soft
	mov	r3, r0
	ldr	r2, .L25+8
	ldrb	r3, [r3, r2]	@ zero_extendqisi2
	eor	r3, r3, #1
	and	r3, r3, #255
	cmp	r3, #0
	bne	.L24
.L21:
	ldr	r3, .L25+4
	ldrb	r3, [r3]	@ zero_extendqisi2
	eor	r3, r3, #1
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L22
	ldr	r3, .L25
	ldrb	r3, [r3]
	and	r3, r3, #255
	mov	r0, r3
	bl	__VERIFIER_atomic_release
	b	.L18
.L22:
	ldr	r3, .L25
	ldrb	r3, [r3]
	and	r3, r3, #255
	mov	r0, r3
	bl	__VERIFIER_atomic_release
.L18:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L26:
	.align	2
.L25:
	.word	MTX
	.word	buf
	.word	COND(tpoff)
	.size	akbd_read_char, .-akbd_read_char
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	akbd_clear_state, %function
akbd_clear_state:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	bl	__VERIFIER_atomic_acquire
	ldr	r3, .L30
	ldrb	r3, [r3]
	and	r3, r3, #255
	eor	r3, r3, #1
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L28
	nop
.L29:
	bl	__VERIFIER_error
.L28:
	ldr	r3, .L30+4
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, .L30
	ldrb	r3, [r3]
	and	r3, r3, #255
	mov	r0, r3
	bl	__VERIFIER_atomic_release
	nop
	pop	{fp, pc}
.L31:
	.align	2
.L30:
	.word	MTX
	.word	buf
	.size	akbd_clear_state, .-akbd_clear_state
	.align	2
	.global	thr1
	.syntax unified
	.arm
	.fpu softvfp
	.type	thr1, %function
thr1:
	@ 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]
.L43:
	bl	__VERIFIER_nondet_int
	mov	r3, r0
	cmp	r3, #4
	ldrls	pc, [pc, r3, asl #2]
	b	.L43
.L35:
	.word	.L39
	.word	.L38
	.word	.L37
	.word	.L36
	.word	.L42
.L39:
	bl	adb_kbd_receive_packet
	b	.L33
.L38:
	bl	akbd_repeat
	b	.L33
.L37:
	bl	__VERIFIER_nondet_int
	mov	r3, r0
	mov	r0, r3
	bl	akbd_read_char
	b	.L33
.L36:
	bl	akbd_clear_state
	b	.L33
.L42:
	bl	__VERIFIER_atomic_acquire
	ldr	r3, .L44
	ldrb	r3, [r3]
	and	r3, r3, #255
	eor	r3, r3, #1
	and	r3, r3, #255
	cmp	r3, #0
	beq	.L40
	nop
.L41:
	bl	__VERIFIER_error
.L40:
	ldr	r3, .L44+4
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	movne	r3, #1
	moveq	r3, #0
	and	r3, r3, #255
	eor	r3, r3, #1
	and	r3, r3, #255
	and	r3, r3, #1
	and	r2, r3, #255
	ldr	r3, .L44+4
	strb	r2, [r3]
	ldr	r3, .L44
	ldrb	r3, [r3]
	and	r3, r3, #255
	mov	r0, r3
	bl	__VERIFIER_atomic_release
	b	.L42
.L33:
	b	.L43
.L45:
	.align	2
.L44:
	.word	MTX
	.word	buf
	.size	thr1, .-thr1
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r3, .L49
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
.L47:
	sub	r0, fp, #12
	mov	r3, #0
	ldr	r2, .L49+4
	mov	r1, #0
	bl	pthread_create
	b	.L47
.L50:
	.align	2
.L49:
	.word	.LC0
	.word	thr1
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
