	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function init_phdr
_init_phdr:                             ## @init_phdr
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	xorl	%edi, %edi
	cmpq	$0, 48(%rbx)
	sete	%dil
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	callq	_r_return_val_if_fail
	movq	32(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_12
## %bb.1:
	leaq	-24(%rbp), %rdi
	movl	$4, %edx
	callq	_UT32_MUL
	testl	%eax, %eax
	je	LBB0_12
## %bb.2:
	movq	-24(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_12
## %bb.3:
	movq	(%rbx), %rcx
	cmpq	%rcx, %rax
	jg	LBB0_12
## %bb.4:
	movq	16(%rbx), %rdx
	cmpq	%rcx, %rdx
	jg	LBB0_12
## %bb.5:
	addq	%rax, %rdx
	cmpq	%rcx, %rdx
	jg	LBB0_12
## %bb.6:
	movq	_Phdr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_Elf_
	movq	32(%rbx), %rsi
	movl	%eax, %edi
	callq	_R_NEWS0
	movq	%rax, 48(%rbx)
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movl	40(%rbx), %edi
	callq	_r_buf_size
	xorl	%r14d, %r14d
	movl	$0, %esi
	cmpl	$131073, %eax                   ## imm = 0x20001
	jl	LBB0_10
## %bb.9:
	movq	24(%rbx), %rax
	movq	_EM_X86_64@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	sete	%cl
	movq	_EM_386@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	sete	%al
	orb	%cl, %al
	movzbl	%al, %esi
LBB0_10:
	movq	%rbx, %rdi
	callq	_read_phdr
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	movl	8(%rbx), %edi
	movl	16(%rbx), %edx
	leaq	L_.str.1(%rip), %rsi
	xorl	%ecx, %ecx
	callq	_sdb_num_set
	movl	8(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	$4, %edx
	xorl	%ecx, %ecx
	callq	_sdb_num_set
	movl	8(%rbx), %edi
	leaq	L_.str.3(%rip), %rsi
	leaq	L_.str.4(%rip), %rdx
	xorl	%ecx, %ecx
	callq	_sdb_set
	movl	8(%rbx), %edi
	leaq	L_.str.5(%rip), %rsi
	leaq	L_.str.6(%rip), %rdx
	xorl	%ecx, %ecx
	callq	_sdb_set
	movl	8(%rbx), %edi
	leaq	L_.str.7(%rip), %rsi
	leaq	L_.str.8(%rip), %rdx
	xorl	%ecx, %ecx
	callq	_sdb_set
	movl	$1, %r14d
LBB0_12:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_7:
	leaq	L_.str(%rip), %rdi
	callq	_perror
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_Phdr,4,2                       ## @Phdr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"malloc (phdr)"

	.comm	_EM_X86_64,8,3                  ## @EM_X86_64
	.comm	_EM_386,8,3                     ## @EM_386
L_.str.1:                               ## @.str.1
	.asciz	"elf_phdr.offset"

L_.str.2:                               ## @.str.2
	.asciz	"elf_phdr.size"

L_.str.3:                               ## @.str.3
	.asciz	"elf_p_type.cparse"

L_.str.4:                               ## @.str.4
	.asciz	"enum elf_p_type {PT_NULL=0,PT_LOAD=1,PT_DYNAMIC=2,PT_INTERP=3,PT_NOTE=4,PT_SHLIB=5,PT_PHDR=6,PT_LOOS=0x60000000,PT_HIOS=0x6fffffff,PT_LOPROC=0x70000000,PT_HIPROC=0x7fffffff};"

L_.str.5:                               ## @.str.5
	.asciz	"elf_p_flags.cparse"

L_.str.6:                               ## @.str.6
	.asciz	"enum elf_p_flags {PF_None=0,PF_Exec=1,PF_Write=2,PF_Write_Exec=3,PF_Read=4,PF_Read_Exec=5,PF_Read_Write=6,PF_Read_Write_Exec=7};"

L_.str.7:                               ## @.str.7
	.asciz	"elf_phdr.format"

L_.str.8:                               ## @.str.8
	.asciz	"[4]Exxxxx[4]Ex (elf_p_type)type offset vaddr paddr filesz memsz (elf_p_flags)flags align"

	.no_dead_strip	_init_phdr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function init_phdr
_init_phdr:                             ; @init_phdr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	ldr	x8, [x0, #48]
	cmp	x8, #0
	cset	w0, eq
	mov	w1, #0
	bl	_r_return_val_if_fail
	ldr	x1, [x19, #32]
	cbz	x1, LBB0_4
; %bb.1:
	add	x0, sp, #8
	mov	w2, #4
	bl	_UT32_MUL
	cbz	w0, LBB0_5
; %bb.2:
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_4
; %bb.3:
	ldr	x9, [x19]
	cmp	x8, x9
	b.le	LBB0_6
LBB0_4:
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_6:
	mov	w0, #0
	ldr	x10, [x19, #16]
	cmp	x10, x9
	b.gt	LBB0_5
; %bb.7:
	add	x8, x10, x8
	cmp	x8, x9
	b.gt	LBB0_5
; %bb.8:
Lloh0:
	adrp	x8, _Phdr@GOTPAGE
Lloh1:
	ldr	x8, [x8, _Phdr@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_Elf_
	ldr	x1, [x19, #32]
	bl	_R_NEWS0
	str	x0, [x19, #48]
	cbz	x0, LBB0_14
; %bb.9:
	ldr	w0, [x19, #40]
	bl	_r_buf_size
	cmp	w0, #32, lsl #12                ; =131072
	b.le	LBB0_11
; %bb.10:
	ldr	x8, [x19, #24]
Lloh3:
	adrp	x9, _EM_X86_64@GOTPAGE
Lloh4:
	ldr	x9, [x9, _EM_X86_64@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
Lloh6:
	adrp	x9, _EM_386@GOTPAGE
Lloh7:
	ldr	x9, [x9, _EM_386@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	ccmp	x8, x9, #4, ne
	cset	w1, eq
	b	LBB0_12
LBB0_11:
	mov	w1, #0
LBB0_12:
	mov	x0, x19
	bl	_read_phdr
	cbz	w0, LBB0_5
; %bb.13:
	ldr	w0, [x19, #8]
	ldr	w2, [x19, #16]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w3, #0
	bl	_sdb_num_set
	ldr	w0, [x19, #8]
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w2, #4
	mov	w3, #0
	bl	_sdb_num_set
	ldr	w0, [x19, #8]
Lloh13:
	adrp	x1, l_.str.3@PAGE
Lloh14:
	add	x1, x1, l_.str.3@PAGEOFF
Lloh15:
	adrp	x2, l_.str.4@PAGE
Lloh16:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	w3, #0
	bl	_sdb_set
	ldr	w0, [x19, #8]
Lloh17:
	adrp	x1, l_.str.5@PAGE
Lloh18:
	add	x1, x1, l_.str.5@PAGEOFF
Lloh19:
	adrp	x2, l_.str.6@PAGE
Lloh20:
	add	x2, x2, l_.str.6@PAGEOFF
	mov	w3, #0
	bl	_sdb_set
	ldr	w0, [x19, #8]
Lloh21:
	adrp	x1, l_.str.7@PAGE
Lloh22:
	add	x1, x1, l_.str.7@PAGEOFF
Lloh23:
	adrp	x2, l_.str.8@PAGE
Lloh24:
	add	x2, x2, l_.str.8@PAGEOFF
	mov	w3, #0
	bl	_sdb_set
	mov	w0, #1
	b	LBB0_5
LBB0_14:
Lloh25:
	adrp	x0, l_.str@PAGE
Lloh26:
	add	x0, x0, l_.str@PAGEOFF
	bl	_perror
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_Phdr,4,2                       ; @Phdr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"malloc (phdr)"

	.comm	_EM_X86_64,8,3                  ; @EM_X86_64
	.comm	_EM_386,8,3                     ; @EM_386
l_.str.1:                               ; @.str.1
	.asciz	"elf_phdr.offset"

l_.str.2:                               ; @.str.2
	.asciz	"elf_phdr.size"

l_.str.3:                               ; @.str.3
	.asciz	"elf_p_type.cparse"

l_.str.4:                               ; @.str.4
	.asciz	"enum elf_p_type {PT_NULL=0,PT_LOAD=1,PT_DYNAMIC=2,PT_INTERP=3,PT_NOTE=4,PT_SHLIB=5,PT_PHDR=6,PT_LOOS=0x60000000,PT_HIOS=0x6fffffff,PT_LOPROC=0x70000000,PT_HIPROC=0x7fffffff};"

l_.str.5:                               ; @.str.5
	.asciz	"elf_p_flags.cparse"

l_.str.6:                               ; @.str.6
	.asciz	"enum elf_p_flags {PF_None=0,PF_Exec=1,PF_Write=2,PF_Write_Exec=3,PF_Read=4,PF_Read_Exec=5,PF_Read_Write=6,PF_Read_Write_Exec=7};"

l_.str.7:                               ; @.str.7
	.asciz	"elf_phdr.format"

l_.str.8:                               ; @.str.8
	.asciz	"[4]Exxxxx[4]Ex (elf_p_type)type offset vaddr paddr filesz memsz (elf_p_flags)flags align"

	.no_dead_strip	_init_phdr
.subsections_via_symbols
