	.file	"extr_bsm_audit.c_au_open.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	au_open
	.type	au_open, @function
au_open:
.LFB0:
	.cfi_startproc
	endbr64
	cmp	QWORD PTR audit_rec_count[rip], 0
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	je	.L14
.L2:
	lea	rdi, audit_free_q[rip]
	call	LIST_EMPTY@PLT
	test	eax, eax
	je	.L3
	mov	edi, 40
	call	malloc@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L15
	mov	eax, DWORD PTR MAX_AUDIT_RECORD_SIZE[rip]
	lea	edi, 0[0+rax*4]
	call	malloc@PLT
	mov	QWORD PTR 32[rbp], rax
	test	rax, rax
	je	.L12
	mov	rdx, QWORD PTR audit_rec_count[rip]
	cmp	rdx, QWORD PTR MAX_AUDIT_RECORDS[rip]
	je	.L16
	mov	rax, QWORD PTR open_desc_table[rip]
	mov	QWORD PTR 8[rbp], rdx
	mov	QWORD PTR [rax+rdx*8], rbp
	add	rdx, 1
	mov	QWORD PTR audit_rec_count[rip], rdx
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L3:
	lea	rdi, audit_free_q[rip]
	call	LIST_FIRST@PLT
	mov	esi, DWORD PTR au_rec_q[rip]
	mov	DWORD PTR [rax], 1
	mov	rdi, rax
	mov	rbp, rax
	call	LIST_REMOVE@PLT
.L6:
	mov	rdi, QWORD PTR 32[rbp]
	mov	edx, DWORD PTR MAX_AUDIT_RECORD_SIZE[rip]
	xor	esi, esi
	call	memset@PLT
	lea	rdi, 24[rbp]
	call	TAILQ_INIT@PLT
	mov	eax, DWORD PTR 8[rbp]
	mov	QWORD PTR 16[rbp], 0
	mov	DWORD PTR 0[rbp], 1
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	lea	rdi, audit_free_q[rip]
	call	LIST_INIT@PLT
	jmp	.L2
.L15:
	mov	eax, -1
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L16:
	.cfi_restore_state
	mov	rdi, rax
	call	free@PLT
.L12:
	mov	rdi, rbp
	call	free@PLT
	mov	eax, DWORD PTR ENOMEM[rip]
	pop	rbp
	.cfi_def_cfa_offset 8
	mov	DWORD PTR errno[rip], eax
	mov	eax, -1
	ret
	.cfi_endproc
.LFE0:
	.size	au_open, .-au_open
	.comm	open_desc_table,8,8
	.comm	mutex,4,4
	.comm	errno,4,4
	.comm	audit_rec_count,8,8
	.comm	audit_free_q,4,4
	.comm	au_rec_q,4,4
	.comm	MAX_AUDIT_RECORD_SIZE,4,4
	.comm	MAX_AUDIT_RECORDS,8,8
	.comm	ENOMEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.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, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_bsm_audit.c_au_open.c"
	.text
	.align	2
	.global	au_open
	.syntax unified
	.arm
	.fpu softvfp
	.type	au_open, %function
au_open:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r5, .L17
	ldr	r3, [r5]
	cmp	r3, #0
	beq	.L14
.L2:
	ldr	r0, .L17+4
	bl	LIST_EMPTY
	cmp	r0, #0
	beq	.L3
	mov	r0, #20
	bl	malloc
	subs	r4, r0, #0
	beq	.L15
	ldr	r3, .L17+8
	ldr	r6, [r3]
	lsl	r0, r6, #2
	bl	malloc
	cmp	r0, #0
	str	r0, [r4, #16]
	beq	.L12
	ldr	r2, .L17+12
	ldr	r3, [r5]
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L16
	ldr	r2, .L17+16
	str	r3, [r4, #4]
	ldr	r1, [r2]
	add	r2, r3, #1
	str	r4, [r1, r3, lsl #2]
	str	r2, [r5]
	b	.L6
.L3:
	ldr	r0, .L17+4
	bl	LIST_FIRST
	mov	r2, #1
	ldr	r3, .L17+20
	str	r2, [r0]
	ldr	r1, [r3]
	mov	r4, r0
	bl	LIST_REMOVE
	ldr	r3, .L17+8
	ldr	r6, [r3]
.L6:
	mov	r2, r6
	mov	r1, #0
	ldr	r0, [r4, #16]
	bl	memset
	add	r0, r4, #12
	bl	TAILQ_INIT
	mov	r2, #0
	mov	r3, #1
	ldr	r0, [r4, #4]
	str	r2, [r4, #8]
	str	r3, [r4]
	pop	{r4, r5, r6, pc}
.L14:
	ldr	r0, .L17+4
	bl	LIST_INIT
	b	.L2
.L15:
	mvn	r0, #0
	pop	{r4, r5, r6, pc}
.L16:
	bl	free
.L12:
	mov	r0, r4
	bl	free
	ldr	r2, .L17+24
	ldr	r3, .L17+28
	ldr	r2, [r2]
	mvn	r0, #0
	str	r2, [r3]
	pop	{r4, r5, r6, pc}
.L18:
	.align	2
.L17:
	.word	audit_rec_count
	.word	audit_free_q
	.word	MAX_AUDIT_RECORD_SIZE
	.word	MAX_AUDIT_RECORDS
	.word	open_desc_table
	.word	au_rec_q
	.word	ENOMEM
	.word	errno
	.size	au_open, .-au_open
	.comm	open_desc_table,4,4
	.comm	mutex,4,4
	.comm	errno,4,4
	.comm	audit_rec_count,4,4
	.comm	audit_free_q,4,4
	.comm	au_rec_q,4,4
	.comm	MAX_AUDIT_RECORD_SIZE,4,4
	.comm	MAX_AUDIT_RECORDS,4,4
	.comm	ENOMEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
