	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function test_dl_iterate_phdr
_test_dl_iterate_phdr:                  ## @test_dl_iterate_phdr
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$16, %rsp
	movq	_sleep_init@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_sleep_fini@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_RTLD_LAZY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	callq	_dlopen
	testq	%rax, %rax
	jne	LBB0_3
## %bb.1:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_2
LBB0_3:
	leaq	L_.str.2(%rip), %rsi
	movq	%rax, %rdi
	callq	_dlsym
	movq	_tls_callback_sym@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
LBB0_2:
	callq	_fprintf
	movl	$1, %edi
	callq	__exit
LBB0_5:
	movq	_test_dl_iterate_phdr_helper@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-4(%rbp), %rdi
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	callq	_pthread_create
	movq	_dl_iterate_phdr_cb@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_dl_iterate_phdr
	testq	%rax, %rax
	jne	LBB0_6
## %bb.7:
	xorl	%edi, %edi
	callq	__exit
LBB0_6:
	movl	$1, %edi
	callq	__exit
	.cfi_endproc
                                        ## -- End function
	.comm	_sleep_init,8,3                 ## @sleep_init
	.comm	_sleep_fini,8,3                 ## @sleep_fini
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"libh_helper_dso2.so"

	.comm	_RTLD_LAZY,4,2                  ## @RTLD_LAZY
	.comm	_stderr,4,2                     ## @stderr
L_.str.1:                               ## @.str.1
	.asciz	"opening helper failed\n"

L_.str.2:                               ## @.str.2
	.asciz	"tls_callback"

	.comm	_tls_callback_sym,8,3           ## @tls_callback_sym
L_.str.3:                               ## @.str.3
	.asciz	"bad helper\n"

	.comm	_test_dl_iterate_phdr_helper,4,2 ## @test_dl_iterate_phdr_helper
	.comm	_dl_iterate_phdr_cb,4,2         ## @dl_iterate_phdr_cb
	.no_dead_strip	_test_dl_iterate_phdr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function test_dl_iterate_phdr
_test_dl_iterate_phdr:                  ; @test_dl_iterate_phdr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #32
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh0:
	adrp	x8, _sleep_init@GOTPAGE
Lloh1:
	ldr	x8, [x8, _sleep_init@GOTPAGEOFF]
Lloh2:
	str	xzr, [x8]
Lloh3:
	adrp	x8, _sleep_fini@GOTPAGE
Lloh4:
	ldr	x8, [x8, _sleep_fini@GOTPAGEOFF]
Lloh5:
	str	xzr, [x8]
Lloh6:
	adrp	x8, _RTLD_LAZY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RTLD_LAZY@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dlopen
	cbnz	x0, LBB0_2
; %bb.1:
Lloh11:
	adrp	x8, _stderr@GOTPAGE
Lloh12:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_2:
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dlsym
Lloh18:
	adrp	x8, _tls_callback_sym@GOTPAGE
Lloh19:
	ldr	x8, [x8, _tls_callback_sym@GOTPAGEOFF]
Lloh20:
	str	x0, [x8]
	cbnz	x0, LBB0_5
; %bb.3:
Lloh21:
	adrp	x8, _stderr@GOTPAGE
Lloh22:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
Lloh24:
	adrp	x1, l_.str.3@PAGE
Lloh25:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_4:
	bl	_fprintf
	mov	w0, #1
	bl	__exit
LBB0_5:
Lloh26:
	adrp	x8, _test_dl_iterate_phdr_helper@GOTPAGE
Lloh27:
	ldr	x8, [x8, _test_dl_iterate_phdr_helper@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
	sub	x0, x29, #4
	mov	x1, #0
	mov	x3, #0
	bl	_pthread_create
Lloh29:
	adrp	x8, _dl_iterate_phdr_cb@GOTPAGE
Lloh30:
	ldr	x8, [x8, _dl_iterate_phdr_cb@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
	mov	x1, #0
	bl	_dl_iterate_phdr
	cbz	x0, LBB0_7
; %bb.6:
	mov	w0, #1
LBB0_7:
	bl	__exit
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotStr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotStr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_sleep_init,8,3                 ; @sleep_init
	.comm	_sleep_fini,8,3                 ; @sleep_fini
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"libh_helper_dso2.so"

	.comm	_RTLD_LAZY,4,2                  ; @RTLD_LAZY
	.comm	_stderr,4,2                     ; @stderr
l_.str.1:                               ; @.str.1
	.asciz	"opening helper failed\n"

l_.str.2:                               ; @.str.2
	.asciz	"tls_callback"

	.comm	_tls_callback_sym,8,3           ; @tls_callback_sym
l_.str.3:                               ; @.str.3
	.asciz	"bad helper\n"

	.comm	_test_dl_iterate_phdr_helper,4,2 ; @test_dl_iterate_phdr_helper
	.comm	_dl_iterate_phdr_cb,4,2         ; @dl_iterate_phdr_cb
	.no_dead_strip	_test_dl_iterate_phdr
.subsections_via_symbols
