	.file	"extr_mach_port.c_mach_port_get_context.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	mach_port_get_context
	.type	mach_port_get_context, @function
mach_port_get_context:
.LFB0:
	.cfi_startproc
	endbr64
	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
	sub	rsp, 16
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	cmp	QWORD PTR IS_NULL[rip], rdi
	mov	rax, QWORD PTR KERN_INVALID_TASK[rip]
	je	.L1
	mov	rbp, rdi
	mov	edi, esi
	mov	r12d, esi
	mov	rbx, rdx
	call	MACH_PORT_VALID@PLT
	test	eax, eax
	jne	.L4
	mov	rax, QWORD PTR KERN_INVALID_RIGHT[rip]
.L1:
	mov	rcx, QWORD PTR 8[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L10
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	pop	rbx
	.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
.L4:
	.cfi_restore_state
	mov	rdx, rsp
	mov	esi, r12d
	mov	rdi, rbp
	call	ipc_port_translate_receive@PLT
	cmp	QWORD PTR KERN_SUCCESS[rip], rax
	jne	.L1
	mov	rdi, QWORD PTR [rsp]
	xor	eax, eax
	cmp	QWORD PTR 8[rdi], 0
	jne	.L5
	mov	eax, DWORD PTR [rdi]
.L5:
	mov	DWORD PTR [rbx], eax
	call	ip_unlock@PLT
	mov	rax, QWORD PTR KERN_SUCCESS[rip]
	jmp	.L1
.L10:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	mach_port_get_context, .-mach_port_get_context
	.comm	KERN_SUCCESS,8,8
	.comm	KERN_INVALID_TASK,8,8
	.comm	KERN_INVALID_RIGHT,8,8
	.comm	IS_NULL,8,8
	.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_mach_port.c_mach_port_get_context.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	mach_port_get_context
	.syntax unified
	.arm
	.fpu softvfp
	.type	mach_port_get_context, %function
mach_port_get_context:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r3, .L12
	sub	sp, sp, #8
	ldr	r3, [r3]
	cmp	r3, r0
	ldr	r3, .L12+4
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	beq	.L10
	mov	r4, r0
	mov	r0, r1
	mov	r5, r1
	mov	r6, r2
	bl	MACH_PORT_VALID
	cmp	r0, #0
	bne	.L4
	ldr	r3, .L12+8
	ldr	r0, [r3]
.L1:
	ldr	r3, .L12+4
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L11
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L4:
	mov	r0, r4
	mov	r1, r5
	mov	r2, sp
	bl	ipc_port_translate_receive
	ldr	r4, .L12+12
	ldr	r3, [r4]
	cmp	r3, r0
	bne	.L1
	ldr	r0, [sp]
	ldr	r3, [r0, #4]
	cmp	r3, #0
	movne	r3, #0
	ldreq	r3, [r0]
	str	r3, [r6]
	bl	ip_unlock
	ldr	r0, [r4]
	b	.L1
.L10:
	ldr	r3, .L12+16
	ldr	r0, [r3]
	b	.L1
.L11:
	bl	__stack_chk_fail
.L13:
	.align	2
.L12:
	.word	IS_NULL
	.word	.LC0
	.word	KERN_INVALID_RIGHT
	.word	KERN_SUCCESS
	.word	KERN_INVALID_TASK
	.size	mach_port_get_context, .-mach_port_get_context
	.comm	KERN_SUCCESS,4,4
	.comm	KERN_INVALID_TASK,4,4
	.comm	KERN_INVALID_RIGHT,4,4
	.comm	IS_NULL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
