	.file	"51430.c"
	.intel_syntax noprefix
	.text
	.type	ref_dec, @function
ref_dec:
.LFB7:
	.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	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8[rax]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 8[rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 8[rax]
	test	eax, eax
	jne	.L3
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	rdx
.L3:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	ref_dec, .-ref_dec
	.type	ref_inc_ts, @function
ref_inc_ts:
.LFB8:
	.cfi_startproc
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 8
	lock add	DWORD PTR [rax], 1
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	ref_inc_ts, .-ref_inc_ts
	.type	ref_dec_ts, @function
ref_dec_ts:
.LFB9:
	.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	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	lea	rdx, 8[rax]
	mov	eax, 1
	neg	eax
	mov	ecx, eax
	mov	eax, ecx
	lock xadd	DWORD PTR [rdx], eax
	add	eax, ecx
	test	eax, eax
	jne	.L7
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	rdx
.L7:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	ref_dec_ts, .-ref_dec_ts
	.type	node_free, @function
node_free:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	free@PLT
	cmp	QWORD PTR -8[rbp], 0
	je	.L10
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	ref_dec_ts
.L10:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	node_free, .-node_free
	.globl	node_create
	.type	node_create, @function
node_create:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 40
	.cfi_offset 3, -24
	mov	QWORD PTR -40[rbp], rdi
	mov	edi, 32
	call	malloc@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR 24[rax], 0
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, node_free[rip]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 8[rax], 1
	mov	rax, QWORD PTR -24[rbp]
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	node_create, .-node_create
	.globl	node_push
	.type	node_push, @function
node_push:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	node_create
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 24[rax], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR [rax], rdx
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	node_push, .-node_push
	.globl	node_pop
	.type	node_pop, @function
node_pop:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 24
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR 24[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L15
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	ref_inc_ts
.L15:
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	node_pop, .-node_pop
	.globl	node_print
	.type	node_print, @function
node_print:
.LFB14:
	.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
	jmp	.L18
.L19:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	puts@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	QWORD PTR -8[rbp], rax
.L18:
	cmp	QWORD PTR -8[rbp], 0
	jne	.L19
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	node_print, .-node_print
	.section	.rodata
.LC0:
	.string	"HIIII"
.LC1:
	.string	"ref_count: %d\n"
.LC2:
	.string	"foobar"
	.text
	.globl	main
	.type	main, @function
main:
.LFB15:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -32[rbp], 0
	lea	rax, .LC0[rip]
	mov	QWORD PTR -24[rbp], rax
	mov	rdx, QWORD PTR -24[rbp]
	lea	rax, -32[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	node_push
	mov	rdx, QWORD PTR -24[rbp]
	lea	rax, -32[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	node_push
	lea	rax, -32[rbp]
	mov	rdi, rax
	call	node_pop
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -32[rbp]
	test	rax, rax
	je	.L21
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	node_print
	lea	rax, -32[rbp]
	mov	rdi, rax
	call	node_pop
	mov	QWORD PTR -16[rbp], rax
	lea	rax, -32[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	call	node_push
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	node_print
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	ref_dec_ts
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	ref_dec
.L21:
	mov	rax, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR 8[rax]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L23
	call	__stack_chk_fail@PLT
.L23:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.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	"51430.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ref_dec, %function
ref_dec:
	@ 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	r3, [r3, #4]
	sub	r2, r3, #1
	ldr	r3, [fp, #-8]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	bne	.L3
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	ldr	r0, [fp, #-8]
	blx	r3
.L3:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	ref_dec, .-ref_dec
	.global	__sync_add_and_fetch_4
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ref_inc_ts, %function
ref_inc_ts:
	@ 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]
	add	r3, r3, #4
	mov	r1, #1
	mov	r0, r3
	bl	__sync_add_and_fetch_4
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	ref_inc_ts, .-ref_inc_ts
	.global	__sync_sub_and_fetch_4
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ref_dec_ts, %function
ref_dec_ts:
	@ 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]
	add	r3, r3, #4
	mov	r1, #1
	mov	r0, r3
	bl	__sync_sub_and_fetch_4
	mov	r3, r0
	cmp	r3, #0
	bne	.L7
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	ldr	r0, [fp, #-8]
	blx	r3
.L7:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	ref_dec_ts, .-ref_dec_ts
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	node_free, %function
node_free:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #12]
	str	r3, [fp, #-8]
	ldr	r0, [fp, #-12]
	bl	free
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L10
	ldr	r3, [fp, #-8]
	mov	r0, r3
	bl	ref_dec_ts
.L10:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	node_free, .-node_free
	.section	.rodata
	.align	2
.LC0:
	.word	node_free
	.word	1
	.text
	.align	2
	.global	node_create
	.syntax unified
	.arm
	.fpu softvfp
	.type	node_create, %function
node_create:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	mov	r0, #16
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-24]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-16]
	mov	r2, #0
	str	r2, [r3, #12]
	ldr	r3, [fp, #-16]
	ldr	r2, .L13
	ldm	r2, {r0, r1}
	stm	r3, {r0, r1}
	ldr	r3, [fp, #-16]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC0
	.size	node_create, .-node_create
	.align	2
	.global	node_push
	.syntax unified
	.arm
	.fpu softvfp
	.type	node_push, %function
node_push:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r0, [fp, #-20]
	bl	node_create
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-16]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-8]
	str	r2, [r3]
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	node_push, .-node_push
	.align	2
	.global	node_pop
	.syntax unified
	.arm
	.fpu softvfp
	.type	node_pop, %function
node_pop:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-16]
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L17
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	mov	r0, r3
	bl	ref_inc_ts
.L17:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	node_pop, .-node_pop
	.align	2
	.global	node_print
	.syntax unified
	.arm
	.fpu softvfp
	.type	node_print, %function
node_print:
	@ 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]
	b	.L20
.L21:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	puts
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #12]
	str	r3, [fp, #-8]
.L20:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L21
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	node_print, .-node_print
	.section	.rodata
	.align	2
.LC1:
	.ascii	"HIIII\000"
	.align	2
.LC2:
	.ascii	"ref_count: %d\012\000"
	.align	2
.LC3:
	.ascii	"foobar\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r3, .L26
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-20]
	ldr	r3, .L26+4
	str	r3, [fp, #-16]
	sub	r3, fp, #20
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	node_push
	sub	r3, fp, #20
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	node_push
	sub	r3, fp, #20
	mov	r0, r3
	bl	node_pop
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #4]
	mov	r1, r3
	ldr	r0, .L26+8
	bl	printf
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	beq	.L23
	ldr	r3, [fp, #-20]
	mov	r0, r3
	bl	node_print
	sub	r3, fp, #20
	mov	r0, r3
	bl	node_pop
	str	r0, [fp, #-12]
	sub	r3, fp, #20
	ldr	r1, .L26+12
	mov	r0, r3
	bl	node_push
	ldr	r3, [fp, #-20]
	mov	r0, r3
	bl	node_print
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #4]
	mov	r1, r3
	ldr	r0, .L26+8
	bl	printf
	ldr	r3, [fp, #-12]
	mov	r0, r3
	bl	ref_dec_ts
	ldr	r3, [fp, #-20]
	mov	r0, r3
	bl	ref_dec
.L23:
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #4]
	mov	r1, r3
	ldr	r0, .L26+8
	bl	printf
	mov	r3, #0
	ldr	r2, .L26
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L25
	bl	__stack_chk_fail
.L25:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L27:
	.align	2
.L26:
	.word	.LC4
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
