	.file	"extr_kern_resource.c_do_background_thread.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	do_background_thread, @function
do_background_thread:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	ebx, esi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	get_bsdthread_info@PLT
	mov	eax, DWORD PTR [rax]
	and	eax, DWORD PTR UT_VFORK[rip]
	je	.L2
.L14:
	mov	r12d, DWORD PTR EPERM[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rdi, rbp
	mov	r12d, eax
	call	thread_is_static_param@PLT
	test	rax, rax
	jne	.L14
	mov	rdi, rbp
	call	thread_has_qos_policy@PLT
	test	rax, rax
	jne	.L16
.L5:
	cmp	DWORD PTR PRIO_DARWIN_BG[rip], ebx
	mov	r13d, DWORD PTR TASK_POLICY_DISABLE[rip]
	je	.L17
.L7:
	xor	eax, eax
	call	current_thread@PLT
	mov	esi, DWORD PTR TASK_POLICY_INTERNAL[rip]
	mov	ecx, r13d
	mov	rdi, rbp
	cmp	rax, rbp
	mov	edx, DWORD PTR TASK_POLICY_DARWIN_BG[rip]
	cmovne	esi, DWORD PTR TASK_POLICY_EXTERNAL[rip]
	call	proc_set_thread_policy@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	mov	r13d, DWORD PTR TASK_POLICY_ENABLE[rip]
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L16:
	mov	rdi, rbp
	call	thread_remove_qos_policy@PLT
	mov	r12d, DWORD PTR EIDRM[rip]
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	do_background_thread, .-do_background_thread
	.comm	UT_VFORK,4,4
	.comm	TASK_POLICY_INTERNAL,4,4
	.comm	TASK_POLICY_EXTERNAL,4,4
	.comm	TASK_POLICY_ENABLE,4,4
	.comm	TASK_POLICY_DISABLE,4,4
	.comm	TASK_POLICY_DARWIN_BG,4,4
	.comm	PRIO_DARWIN_BG,4,4
	.comm	EPERM,4,4
	.comm	EIDRM,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_kern_resource.c_do_background_thread.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	do_background_thread, %function
do_background_thread:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r6, r1
	mov	r4, r0
	bl	get_bsdthread_info
	ldr	r3, .L17
	ldr	r2, [r0]
	ldr	r3, [r3]
	tst	r2, r3
	beq	.L2
.L14:
	ldr	r3, .L17+4
	ldr	r5, [r3]
	mov	r0, r5
	pop	{r4, r5, r6, pc}
.L2:
	mov	r0, r4
	bl	thread_is_static_param
	cmp	r0, #0
	bne	.L14
	mov	r0, r4
	bl	thread_has_qos_policy
	subs	r5, r0, #0
	bne	.L16
.L5:
	ldr	r3, .L17+8
	ldr	r3, [r3]
	cmp	r3, r6
	ldreq	r3, .L17+12
	ldrne	r3, .L17+16
	ldr	r6, [r3]
	bl	current_thread
	cmp	r0, r4
	ldreq	r3, .L17+20
	ldrne	r3, .L17+24
	ldr	r2, .L17+28
	ldr	r1, [r3]
	mov	r0, r4
	mov	r3, r6
	ldr	r2, [r2]
	bl	proc_set_thread_policy
	mov	r0, r5
	pop	{r4, r5, r6, pc}
.L16:
	mov	r0, r4
	bl	thread_remove_qos_policy
	ldr	r3, .L17+32
	ldr	r5, [r3]
	b	.L5
.L18:
	.align	2
.L17:
	.word	UT_VFORK
	.word	EPERM
	.word	PRIO_DARWIN_BG
	.word	TASK_POLICY_ENABLE
	.word	TASK_POLICY_DISABLE
	.word	TASK_POLICY_INTERNAL
	.word	TASK_POLICY_EXTERNAL
	.word	TASK_POLICY_DARWIN_BG
	.word	EIDRM
	.size	do_background_thread, .-do_background_thread
	.comm	UT_VFORK,4,4
	.comm	TASK_POLICY_INTERNAL,4,4
	.comm	TASK_POLICY_EXTERNAL,4,4
	.comm	TASK_POLICY_ENABLE,4,4
	.comm	TASK_POLICY_DISABLE,4,4
	.comm	TASK_POLICY_DARWIN_BG,4,4
	.comm	PRIO_DARWIN_BG,4,4
	.comm	EPERM,4,4
	.comm	EIDRM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
