	.file	"extr_work_interval.c_work_interval_copy_port.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	work_interval_copy_port
	.type	work_interval_copy_port, @function
work_interval_copy_port:
.LFB0:
	.cfi_startproc
	endbr64
	test	rsi, rsi
	je	.L15
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rsi
	test	rdi, rdi
	je	.L13
	mov	eax, DWORD PTR [rdi]
	test	DWORD PTR WORK_INTERVAL_FLAG_JOINABLE[rip], eax
	je	.L13
	mov	ebp, DWORD PTR 4[rdi]
	mov	r12d, DWORD PTR MACH_PORT_RIGHT_SEND[rip]
	xor	eax, eax
	call	mach_task_self@PLT
	mov	ecx, 1
	mov	edi, eax
	mov	edx, r12d
	mov	esi, ebp
	call	mach_port_mod_refs@PLT
	cmp	QWORD PTR KERN_SUCCESS[rip], rax
	jne	.L13
	mov	DWORD PTR [rbx], ebp
	xor	eax, eax
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	mov	eax, DWORD PTR MACH_PORT_NULL[rip]
	mov	DWORD PTR [rbx], eax
	mov	eax, DWORD PTR EINVAL[rip]
	mov	DWORD PTR errno[rip], eax
	mov	eax, -1
	jmp	.L1
.L15:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	mov	eax, DWORD PTR EINVAL[rip]
	mov	DWORD PTR errno[rip], eax
	mov	eax, -1
	ret
	.cfi_endproc
.LFE0:
	.size	work_interval_copy_port, .-work_interval_copy_port
	.comm	errno,4,4
	.comm	WORK_INTERVAL_FLAG_JOINABLE,4,4
	.comm	MACH_PORT_RIGHT_SEND,4,4
	.comm	MACH_PORT_NULL,4,4
	.comm	KERN_SUCCESS,8,8
	.comm	EINVAL,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_work_interval.c_work_interval_copy_port.c"
	.text
	.align	2
	.global	work_interval_copy_port
	.syntax unified
	.arm
	.fpu softvfp
	.type	work_interval_copy_port, %function
work_interval_copy_port:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	subs	r4, r1, #0
	beq	.L13
	cmp	r0, #0
	beq	.L11
	ldr	r3, .L14
	ldr	r2, [r0]
	ldr	r3, [r3]
	tst	r2, r3
	beq	.L11
	ldr	r5, [r0, #4]
	bl	mach_task_self
	ldr	r3, .L14+4
	mov	r1, r5
	ldr	r2, [r3]
	mov	r3, #1
	bl	mach_port_mod_refs
	ldr	r3, .L14+8
	ldr	r3, [r3]
	cmp	r3, r0
	bne	.L11
	mov	r0, #0
	str	r5, [r4]
	pop	{r4, r5, r6, pc}
.L11:
	ldr	r3, .L14+12
	ldr	r2, .L14+16
	ldr	r1, [r3]
	ldr	r3, .L14+20
	str	r1, [r4]
	ldr	r2, [r2]
	mvn	r0, #0
	str	r2, [r3]
	pop	{r4, r5, r6, pc}
.L13:
	ldr	r2, .L14+16
	ldr	r3, .L14+20
	ldr	r2, [r2]
	mvn	r0, #0
	str	r2, [r3]
	pop	{r4, r5, r6, pc}
.L15:
	.align	2
.L14:
	.word	WORK_INTERVAL_FLAG_JOINABLE
	.word	MACH_PORT_RIGHT_SEND
	.word	KERN_SUCCESS
	.word	MACH_PORT_NULL
	.word	EINVAL
	.word	errno
	.size	work_interval_copy_port, .-work_interval_copy_port
	.comm	errno,4,4
	.comm	WORK_INTERVAL_FLAG_JOINABLE,4,4
	.comm	MACH_PORT_RIGHT_SEND,4,4
	.comm	MACH_PORT_NULL,4,4
	.comm	KERN_SUCCESS,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
