	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_test_cmsg_nexthdr              ## -- Begin function test_cmsg_nexthdr
	.p2align	4, 0x90
_test_cmsg_nexthdr:                     ## @test_cmsg_nexthdr
	.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
	pushq	%rax
	movl	$10280, %eax                    ## imm = 0x2828
	callq	____chkstk_darwin
	subq	%rax, %rsp
	popq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movw	$67, -10300(%rbp)
	movl	$1229406541, -10304(%rbp)       ## imm = 0x4947414D
	leaq	L_.str(%rip), %rdi
	movl	$18, %esi
	callq	_set_funcname
	leaq	-10320(%rbp), %r13
	leaq	-10296(%rbp), %r15
	leaq	-10288(%rbp), %r14
	movq	%r13, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	movl	$10240, %ecx                    ## imm = 0x2800
	callq	_init_hdrs
	movq	%r14, -10312(%rbp)
	xorl	%edi, %edi
	callq	_CMSG_SPACE
	addl	%eax, %eax
	movl	%eax, -10320(%rbp)
	xorl	%edi, %edi
	callq	_CMSG_LEN
	movl	%eax, -10296(%rbp)
	movl	%eax, -10288(%rbp)
	leaq	-10304(%rbp), %r12
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$6, %edx
	callq	_strlcpy
	xorl	%edi, %edi
	callq	_CMSG_SPACE
	cltq
	movl	-10296(%rbp), %ecx
	movl	%ecx, -10288(%rbp,%rax,4)
	movq	%r13, %rdi
	callq	_CMSG_FIRSTHDR
	movq	%r13, %rdi
	movq	%rax, %rsi
	callq	_CMSG_NXTHDR
	leaq	l_.str.1(%rip), %rcx
	movq	%r12, %rdi
	movq	%rax, %rsi
	movl	$6, %edx
	callq	_checkstr
	movq	%r13, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	movl	$10240, %ecx                    ## imm = 0x2800
	callq	_init_hdrs
	movq	%r14, -10312(%rbp)
	xorl	%edi, %edi
	callq	_CMSG_SPACE
	movl	%eax, -10320(%rbp)
	xorl	%edi, %edi
	callq	_CMSG_LEN
	movl	%eax, -10296(%rbp)
	movl	%eax, -10288(%rbp)
	movq	%r13, %rdi
	callq	_CMSG_FIRSTHDR
	movq	%r13, %rdi
	movq	%rax, %rsi
	callq	_CMSG_NXTHDR
	leaq	l_.str.2(%rip), %rdx
	xorl	%edi, %edi
	movq	%rax, %rsi
	callq	_checkptr
	movq	%r13, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	movl	$10240, %ecx                    ## imm = 0x2800
	callq	_init_hdrs
	movq	%r14, -10312(%rbp)
	movl	$10240, -10320(%rbp)            ## imm = 0x2800
	movl	$10240, -10296(%rbp)            ## imm = 0x2800
	movl	$10240, -10288(%rbp)            ## imm = 0x2800
	movq	%r13, %rdi
	callq	_CMSG_FIRSTHDR
	movq	%rax, %rbx
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_CMSG_NXTHDR
	leaq	l_.str.3(%rip), %rdx
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_checkptr
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_2
## %bb.1:
	addq	$10280, %rsp                    ## imm = 0x2828
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L___const.test_cmsg_nexthdr.magic:      ## @__const.test_cmsg_nexthdr.magic
	.asciz	"MAGIC"

L_.str:                                 ## @.str
	.asciz	"test_cmsg_nexthdr"

	.section	__TEXT,__const
l_.str.1:                               ## @.str.1
	.asciz	"more than one cmsghdr\000"

l_.str.2:                               ## @.str.2
	.asciz	"only one cmsghdr\000"

l_.str.3:                               ## @.str.3
	.asciz	"null second argument\000"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_test_cmsg_nexthdr              ; -- Begin function test_cmsg_nexthdr
	.p2align	2
_test_cmsg_nexthdr:                     ; @test_cmsg_nexthdr
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w27, -40
	.cfi_offset w28, -48
	mov	w9, #10288
Lloh0:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh1:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	sub	sp, sp, #2, lsl #12             ; =8192
	sub	sp, sp, #2096
Lloh2:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh3:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	mov	w8, #67
	strh	w8, [sp, #12]
	mov	w8, #16717
	movk	w8, #18759, lsl #16
	str	w8, [sp, #8]
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	mov	w1, #18
	bl	_set_funcname
	add	x20, sp, #40
	mov	w19, #10240
	add	x0, sp, #24
	add	x1, sp, #16
	add	x2, sp, #40
	mov	w3, #10240
	bl	_init_hdrs
	str	x20, [sp, #32]
	mov	w0, #0
	bl	_CMSG_SPACE
	lsl	w8, w0, #1
	str	w8, [sp, #24]
	mov	w0, #0
	bl	_CMSG_LEN
	str	w0, [sp, #16]
	str	w0, [sp, #40]
	add	x0, sp, #16
	add	x1, sp, #8
	mov	w2, #6
	bl	_strlcpy
	mov	w0, #0
	bl	_CMSG_SPACE
	ldr	w8, [sp, #16]
	str	w8, [x20, w0, sxtw #2]
	add	x0, sp, #24
	bl	_CMSG_FIRSTHDR
	mov	x1, x0
	add	x0, sp, #24
	bl	_CMSG_NXTHDR
	mov	x1, x0
Lloh7:
	adrp	x3, l_.str.1@PAGE
Lloh8:
	add	x3, x3, l_.str.1@PAGEOFF
	add	x0, sp, #8
	mov	w2, #6
	bl	_checkstr
	add	x0, sp, #24
	add	x1, sp, #16
	add	x2, sp, #40
	mov	w3, #10240
	bl	_init_hdrs
	str	x20, [sp, #32]
	mov	w0, #0
	bl	_CMSG_SPACE
	str	w0, [sp, #24]
	mov	w0, #0
	bl	_CMSG_LEN
	str	w0, [sp, #16]
	str	w0, [sp, #40]
	add	x0, sp, #24
	bl	_CMSG_FIRSTHDR
	mov	x1, x0
	add	x0, sp, #24
	bl	_CMSG_NXTHDR
	mov	x1, x0
Lloh9:
	adrp	x2, l_.str.2@PAGE
Lloh10:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, #0
	bl	_checkptr
	add	x0, sp, #24
	add	x1, sp, #16
	add	x2, sp, #40
	mov	w3, #10240
	bl	_init_hdrs
	str	x20, [sp, #32]
	str	w19, [sp, #24]
	str	w19, [sp, #16]
	str	w19, [sp, #40]
	add	x0, sp, #24
	bl	_CMSG_FIRSTHDR
	mov	x19, x0
	add	x0, sp, #24
	mov	x1, #0
	bl	_CMSG_NXTHDR
	mov	x1, x0
Lloh11:
	adrp	x2, l_.str.3@PAGE
Lloh12:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_checkptr
	ldur	x8, [x29, #-40]
Lloh13:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_2
; %bb.1:
	add	sp, sp, #2, lsl #12             ; =8192
	add	sp, sp, #2096
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_2:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l___const.test_cmsg_nexthdr.magic:      ; @__const.test_cmsg_nexthdr.magic
	.asciz	"MAGIC"

l_.str:                                 ; @.str
	.asciz	"test_cmsg_nexthdr"

	.section	__TEXT,__const
l_.str.1:                               ; @.str.1
	.asciz	"more than one cmsghdr\000"

l_.str.2:                               ; @.str.2
	.asciz	"only one cmsghdr\000"

l_.str.3:                               ; @.str.3
	.asciz	"null second argument\000"

.subsections_via_symbols
