	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_msgkey@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_msgget
	movl	%eax, %ebx
	cmpl	$-1, %eax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_2:
	movq	_maxloop@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_17
## %bb.3:
	xorl	%r13d, %r13d
	movq	_MESSAGE_TEXT_LEN@GOTPCREL(%rip), %r12
	leaq	-56(%rbp), %r14
	leaq	L_.str.2(%rip), %r15
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_4 Depth=1
	incl	%r13d
	movq	_maxloop@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jge	LBB0_17
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdx
	movq	_MTYPE_1@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ebx, %edi
	movq	%r14, %rsi
	xorl	%r8d, %r8d
	callq	_msgrcv
	cmpq	(%r12), %rax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	$1, %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_err
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	-56(%rbp), %rsi
	movq	%r15, %rdi
	callq	_printf
	movq	-56(%rbp), %rdi
	movq	_m1_str@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	$1, %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_err
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	_MTYPE_1_ACK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movq	(%r12), %rdx
	movl	%ebx, %edi
	movq	%r14, %rsi
	xorl	%ecx, %ecx
	callq	_msgsnd
	cmpl	$-1, %eax
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	$1, %edi
	leaq	L_.str.4(%rip), %rsi
	callq	_err
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	(%r12), %rdx
	movq	_MTYPE_2@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ebx, %edi
	movq	%r14, %rsi
	xorl	%r8d, %r8d
	callq	_msgrcv
	cmpq	(%r12), %rax
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	$1, %edi
	leaq	L_.str.5(%rip), %rsi
	callq	_err
LBB0_12:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	-56(%rbp), %rsi
	movq	%r15, %rdi
	callq	_printf
	movq	-56(%rbp), %rdi
	movq	_m2_str@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	$1, %edi
	leaq	L_.str.6(%rip), %rsi
	callq	_err
LBB0_14:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	_MTYPE_2_ACK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movq	(%r12), %rdx
	movl	%ebx, %edi
	movq	%r14, %rsi
	xorl	%ecx, %ecx
	callq	_msgsnd
	cmpl	$-1, %eax
	jne	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	$1, %edi
	leaq	L_.str.7(%rip), %rsi
	callq	_err
	jmp	LBB0_16
LBB0_17:
	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	_maxloop,4,2                    ## @maxloop
	.comm	_MESSAGE_TEXT_LEN,8,3           ## @MESSAGE_TEXT_LEN
	.comm	_MTYPE_1,4,2                    ## @MTYPE_1
L_.str.1:                               ## @.str.1
	.asciz	"receiver: msgrcv 1"

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

	.comm	_m1_str,4,2                     ## @m1_str
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
L_.str.5:                               ## @.str.5
	.asciz	"receiver: msgrcv 2"

	.comm	_m2_str,4,2                     ## @m2_str
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, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
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, _maxloop@GOTPAGE
Lloh6:
	ldr	x8, [x8, _maxloop@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.3:
	mov	w28, #0
Lloh8:
	adrp	x21, _MESSAGE_TEXT_LEN@GOTPAGE
Lloh9:
	ldr	x21, [x21, _MESSAGE_TEXT_LEN@GOTPAGEOFF]
Lloh10:
	adrp	x22, _MTYPE_1@GOTPAGE
Lloh11:
	ldr	x22, [x22, _MTYPE_1@GOTPAGEOFF]
Lloh12:
	adrp	x20, l_.str.2@PAGE
Lloh13:
	add	x20, x20, l_.str.2@PAGEOFF
Lloh14:
	adrp	x24, _m1_str@GOTPAGE
Lloh15:
	ldr	x24, [x24, _m1_str@GOTPAGEOFF]
Lloh16:
	adrp	x26, _MTYPE_1_ACK@GOTPAGE
Lloh17:
	ldr	x26, [x26, _MTYPE_1_ACK@GOTPAGEOFF]
Lloh18:
	adrp	x23, _MTYPE_2@GOTPAGE
Lloh19:
	ldr	x23, [x23, _MTYPE_2@GOTPAGEOFF]
Lloh20:
	adrp	x25, _m2_str@GOTPAGE
Lloh21:
	ldr	x25, [x25, _m2_str@GOTPAGEOFF]
Lloh22:
	adrp	x27, _MTYPE_2_ACK@GOTPAGE
Lloh23:
	ldr	x27, [x27, _MTYPE_2_ACK@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w28, w28, #1
Lloh24:
	adrp	x8, _maxloop@GOTPAGE
Lloh25:
	ldr	x8, [x8, _maxloop@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	cmp	w28, w8
	b.ge	LBB0_17
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x2, [x21]
	ldr	w3, [x22]
	mov	x1, sp
	mov	x0, x19
	mov	w4, #0
	bl	_msgrcv
	ldr	x8, [x21]
	cmp	x0, x8
	b.eq	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w0, #1
Lloh27:
	adrp	x1, l_.str.1@PAGE
Lloh28:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_err
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x1, [sp]
	mov	x0, x20
	bl	_printf
	ldr	x0, [sp]
	ldr	w1, [x24]
	bl	_strcmp
	cbz	x0, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w0, #1
Lloh29:
	adrp	x1, l_.str.3@PAGE
Lloh30:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_err
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x26]
	str	w8, [sp, #8]
	ldr	x2, [x21]
	mov	x1, sp
	mov	x0, x19
	mov	w3, #0
	bl	_msgsnd
	cmn	w0, #1
	b.ne	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	w0, #1
Lloh31:
	adrp	x1, l_.str.4@PAGE
Lloh32:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_err
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x2, [x21]
	ldr	w3, [x23]
	mov	x1, sp
	mov	x0, x19
	mov	w4, #0
	bl	_msgrcv
	ldr	x8, [x21]
	cmp	x0, x8
	b.eq	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	w0, #1
Lloh33:
	adrp	x1, l_.str.5@PAGE
Lloh34:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_err
LBB0_13:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x1, [sp]
	mov	x0, x20
	bl	_printf
	ldr	x0, [sp]
	ldr	w1, [x25]
	bl	_strcmp
	cbz	x0, LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	w0, #1
Lloh35:
	adrp	x1, l_.str.6@PAGE
Lloh36:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_err
LBB0_15:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x27]
	str	w8, [sp, #8]
	ldr	x2, [x21]
	mov	x1, sp
	mov	x0, x19
	mov	w3, #0
	bl	_msgsnd
	cmn	w0, #1
	b.ne	LBB0_4
; %bb.16:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	w0, #1
Lloh37:
	adrp	x1, l_.str.7@PAGE
Lloh38:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_err
	b	LBB0_4
LBB0_17:
	mov	w0, #0
	bl	_exit
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_msgkey,4,2                     ; @msgkey
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"receiver: msgget"

	.comm	_maxloop,4,2                    ; @maxloop
	.comm	_MESSAGE_TEXT_LEN,8,3           ; @MESSAGE_TEXT_LEN
	.comm	_MTYPE_1,4,2                    ; @MTYPE_1
l_.str.1:                               ; @.str.1
	.asciz	"receiver: msgrcv 1"

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

	.comm	_m1_str,4,2                     ; @m1_str
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
l_.str.5:                               ; @.str.5
	.asciz	"receiver: msgrcv 2"

	.comm	_m2_str,4,2                     ; @m2_str
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
