	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_receiver                       ## -- Begin function receiver
	.p2align	4, 0x90
_receiver:                              ## @receiver
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_msgkey@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_msgget
	movl	%eax, %r14d
	cmpl	$-1, %eax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_2:
	movq	_MTYPE_1@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-40(%rbp), %rsi
	movl	%r14d, %edi
	movl	$8, %edx
	xorl	%r8d, %r8d
	callq	_msgrcv
	movq	%rax, %rbx
	movq	_m1_str@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_strlen
	incq	%rax
	cmpq	%rax, %rbx
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_4:
	movq	-40(%rbp), %rsi
	leaq	L_.str.2(%rip), %rdi
	callq	_printf
	movq	-40(%rbp), %rdi
	movl	(%r15), %esi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_6:
	movq	_MTYPE_1_ACK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -32(%rbp)
	movl	(%r15), %edi
	callq	_strlen
	leaq	1(%rax), %rdx
	leaq	-40(%rbp), %rsi
	movl	%r14d, %edi
	xorl	%ecx, %ecx
	callq	_msgsnd
	cmpl	$-1, %eax
	jne	LBB0_8
## %bb.7:
	leaq	L_.str.4(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_8:
	movq	_MTYPE_2@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-40(%rbp), %rsi
	movl	%r14d, %edi
	movl	$8, %edx
	xorl	%r8d, %r8d
	callq	_msgrcv
	movq	%rax, %rbx
	movq	_m2_str@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_strlen
	incq	%rax
	cmpq	%rax, %rbx
	je	LBB0_10
## %bb.9:
	leaq	L_.str.5(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_10:
	movq	-40(%rbp), %rsi
	leaq	L_.str.2(%rip), %rdi
	callq	_printf
	movq	-40(%rbp), %rdi
	movl	(%r15), %esi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	leaq	L_.str.6(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_12:
	movq	_MTYPE_2_ACK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -32(%rbp)
	movl	(%r15), %edi
	callq	_strlen
	leaq	1(%rax), %rdx
	leaq	-40(%rbp), %rsi
	movl	%r14d, %edi
	xorl	%ecx, %ecx
	callq	_msgsnd
	cmpl	$-1, %eax
	jne	LBB0_14
## %bb.13:
	leaq	L_.str.7(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_14:
	xorl	%edi, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_msgkey,4,2                     ## @msgkey
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"receiver: msgget"

	.comm	_MTYPE_1,4,2                    ## @MTYPE_1
	.comm	_m1_str,4,2                     ## @m1_str
L_.str.1:                               ## @.str.1
	.asciz	"receiver: msgrcv 1"

L_.str.2:                               ## @.str.2
	.asciz	"%s\n"

L_.str.3:                               ## @.str.3
	.asciz	"receiver: message 1 data isn't correct"

	.comm	_MTYPE_1_ACK,4,2                ## @MTYPE_1_ACK
L_.str.4:                               ## @.str.4
	.asciz	"receiver: msgsnd ack 1"

	.comm	_MTYPE_2,4,2                    ## @MTYPE_2
	.comm	_m2_str,4,2                     ## @m2_str
L_.str.5:                               ## @.str.5
	.asciz	"receiver: msgrcv 2"

L_.str.6:                               ## @.str.6
	.asciz	"receiver: message 2 data isn't correct"

	.comm	_MTYPE_2_ACK,4,2                ## @MTYPE_2_ACK
L_.str.7:                               ## @.str.7
	.asciz	"receiver: msgsnd ack 2"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_receiver                       ; -- Begin function receiver
	.p2align	2
_receiver:                              ; @receiver
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
Lloh0:
	adrp	x8, _msgkey@GOTPAGE
Lloh1:
	ldr	x8, [x8, _msgkey@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_msgget
	mov	x19, x0
	cmn	w0, #1
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_2:
Lloh5:
	adrp	x8, _MTYPE_1@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MTYPE_1@GOTPAGEOFF]
Lloh7:
	ldr	w3, [x8]
	mov	x1, sp
	mov	x0, x19
	mov	w2, #8
	mov	w4, #0
	bl	_msgrcv
	mov	x20, x0
Lloh8:
	adrp	x21, _m1_str@GOTPAGE
Lloh9:
	ldr	x21, [x21, _m1_str@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_strlen
	add	x8, x0, #1
	cmp	x20, x8
	b.eq	LBB0_4
; %bb.3:
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_4:
	ldr	x1, [sp]
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_printf
	ldr	x0, [sp]
	ldr	w1, [x21]
	bl	_strcmp
	cbz	x0, LBB0_6
; %bb.5:
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_6:
Lloh16:
	adrp	x8, _MTYPE_1_ACK@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MTYPE_1_ACK@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	str	w8, [sp, #8]
	ldr	w0, [x21]
	bl	_strlen
	add	x2, x0, #1
	mov	x1, sp
	mov	x0, x19
	mov	w3, #0
	bl	_msgsnd
	cmn	w0, #1
	b.ne	LBB0_8
; %bb.7:
Lloh19:
	adrp	x1, l_.str.4@PAGE
Lloh20:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_8:
Lloh21:
	adrp	x8, _MTYPE_2@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MTYPE_2@GOTPAGEOFF]
Lloh23:
	ldr	w3, [x8]
	mov	x1, sp
	mov	x0, x19
	mov	w2, #8
	mov	w4, #0
	bl	_msgrcv
	mov	x20, x0
Lloh24:
	adrp	x21, _m2_str@GOTPAGE
Lloh25:
	ldr	x21, [x21, _m2_str@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_strlen
	add	x8, x0, #1
	cmp	x20, x8
	b.eq	LBB0_10
; %bb.9:
Lloh26:
	adrp	x1, l_.str.5@PAGE
Lloh27:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_10:
	ldr	x1, [sp]
Lloh28:
	adrp	x0, l_.str.2@PAGE
Lloh29:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_printf
	ldr	x0, [sp]
	ldr	w1, [x21]
	bl	_strcmp
	cbz	x0, LBB0_12
; %bb.11:
Lloh30:
	adrp	x1, l_.str.6@PAGE
Lloh31:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_12:
Lloh32:
	adrp	x8, _MTYPE_2_ACK@GOTPAGE
Lloh33:
	ldr	x8, [x8, _MTYPE_2_ACK@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	str	w8, [sp, #8]
	ldr	w0, [x21]
	bl	_strlen
	add	x2, x0, #1
	mov	x1, sp
	mov	x0, x19
	mov	w3, #0
	bl	_msgsnd
	cmn	w0, #1
	b.ne	LBB0_14
; %bb.13:
Lloh35:
	adrp	x1, l_.str.7@PAGE
Lloh36:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_14:
	mov	w0, #0
	bl	_exit
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_msgkey,4,2                     ; @msgkey
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"receiver: msgget"

	.comm	_MTYPE_1,4,2                    ; @MTYPE_1
	.comm	_m1_str,4,2                     ; @m1_str
l_.str.1:                               ; @.str.1
	.asciz	"receiver: msgrcv 1"

l_.str.2:                               ; @.str.2
	.asciz	"%s\n"

l_.str.3:                               ; @.str.3
	.asciz	"receiver: message 1 data isn't correct"

	.comm	_MTYPE_1_ACK,4,2                ; @MTYPE_1_ACK
l_.str.4:                               ; @.str.4
	.asciz	"receiver: msgsnd ack 1"

	.comm	_MTYPE_2,4,2                    ; @MTYPE_2
	.comm	_m2_str,4,2                     ; @m2_str
l_.str.5:                               ; @.str.5
	.asciz	"receiver: msgrcv 2"

l_.str.6:                               ; @.str.6
	.asciz	"receiver: message 2 data isn't correct"

	.comm	_MTYPE_2_ACK,4,2                ; @MTYPE_2_ACK
l_.str.7:                               ; @.str.7
	.asciz	"receiver: msgsnd ack 2"

.subsections_via_symbols
