	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function r_bin_te_init_hdr
_r_bin_te_init_hdr:                     ## @r_bin_te_init_hdr
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	xorl	%ebx, %ebx
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.1:
	movq	%rdi, %r14
	movl	$4, %edi
	callq	_malloc
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movl	12(%r14), %edi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	movq	%rax, %rdx
	movl	$4, %ecx
	callq	_r_buf_read_at
	cmpl	$-1, %eax
	je	LBB0_4
## %bb.5:
	movl	8(%r14), %edi
	testl	%edi, %edi
	je	LBB0_6
## %bb.7:
	leaq	L_.str.3(%rip), %rsi
	leaq	L_.str.4(%rip), %rdx
	xorl	%ecx, %ecx
	callq	_sdb_set
	movl	8(%r14), %edi
	leaq	L_.str.5(%rip), %rsi
	leaq	L_.str.6(%rip), %rdx
	xorl	%ecx, %ecx
	callq	_sdb_set
	movl	8(%r14), %edi
	leaq	L_.str.7(%rip), %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_sdb_num_set
	movl	8(%r14), %edi
	leaq	L_.str.8(%rip), %rsi
	leaq	L_.str.9(%rip), %rdx
	xorl	%ecx, %ecx
	callq	_sdb_set
	movl	8(%r14), %edi
	leaq	L_.str.10(%rip), %rsi
	movl	$24, %edx
	xorl	%ecx, %ecx
	callq	_sdb_num_set
	movl	8(%r14), %edi
	leaq	L_.str.11(%rip), %rsi
	leaq	L_.str.12(%rip), %rbx
	movq	%rbx, %rdx
	xorl	%ecx, %ecx
	callq	_sdb_set
	movl	8(%r14), %edi
	leaq	L_.str.13(%rip), %rsi
	movl	$32, %edx
	xorl	%ecx, %ecx
	callq	_sdb_num_set
	movl	8(%r14), %edi
	leaq	L_.str.14(%rip), %rsi
	movq	%rbx, %rdx
	xorl	%ecx, %ecx
	callq	_sdb_set
	movq	(%r14), %rdi
	leaq	L_.str.15(%rip), %rsi
	movl	$2, %edx
	callq	_strncmp
	xorl	%ebx, %ebx
	testq	%rax, %rax
	sete	%bl
	jmp	LBB0_8
LBB0_2:
	leaq	L_.str(%rip), %rdi
	callq	_r_sys_perror
	jmp	LBB0_8
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
	callq	_eprintf
	jmp	LBB0_8
LBB0_6:
	leaq	L_.str.2(%rip), %rdi
	callq	_eprintf
	xorl	%ebx, %ebx
LBB0_8:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"malloc (header)"

L_.str.1:                               ## @.str.1
	.asciz	"Error: read (header)\n"

L_.str.2:                               ## @.str.2
	.asciz	"Error: sdb instance is empty\n"

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

L_.str.4:                               ## @.str.4
	.asciz	"enum te_machine { TE_IMAGE_FILE_MACHINE_UNKNOWN=0x0, TE_IMAGE_FILE_MACHINE_ALPHA=0x184, TE_IMAGE_FILE_MACHINE_ALPHA64=0x284, TE_IMAGE_FILE_MACHINE_AM33=0x1d3, TE_IMAGE_FILE_MACHINE_AMD64=0x8664, TE_IMAGE_FILE_MACHINE_ARM=0x1c0, TE_IMAGE_FILE_MACHINE_AXP64=0x184, TE_IMAGE_FILE_MACHINE_CEE=0xc0ee, TE_IMAGE_FILE_MACHINE_CEF=0x0cef, TE_IMAGE_FILE_MACHINE_EBC=0x0ebc, TE_IMAGE_FILE_MACHINE_I386=0x014c, TE_IMAGE_FILE_MACHINE_IA64=0x0200, TE_IMAGE_FILE_MACHINE_M32R=0x9041, TE_IMAGE_FILE_MACHINE_M68K=0x0268, TE_IMAGE_FILE_MACHINE_MIPS16=0x0266, TE_IMAGE_FILE_MACHINE_MIPSFPU=0x0366, TE_IMAGE_FILE_MACHINE_MIPSFPU16=0x0466, TE_IMAGE_FILE_MACHINE_POWERPC=0x01f0, TE_IMAGE_FILE_MACHINE_POWERPCFP=0x01f1, TE_IMAGE_FILE_MACHINE_R10000=0x0168, TE_IMAGE_FILE_MACHINE_R3000=0x0162, TE_IMAGE_FILE_MACHINE_R4000=0x0166, TE_IMAGE_FILE_MACHINE_SH3=0x01a2, TE_IMAGE_FILE_MACHINE_SH3DSP=0x01a3, TE_IMAGE_FILE_MACHINE_SH3E=0x01a4, TE_IMAGE_FILE_MACHINE_SH4=0x01a6, TE_IMAGE_FILE_MACHINE_SH5=0x01a8, TE_IMAGE_FILE_MACHINE_THUMB=0x01c2, TE_IMAGE_FILE_MACHINE_TRICORE=0x0520, TE_IMAGE_FILE_MACHINE_WCEMIPSV2=0x0169};"

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

L_.str.6:                               ## @.str.6
	.asciz	"enum te_subsystem { TE_IMAGE_SUBSYSTEM_UNKNOWN=0, TE_IMAGE_SUBSYSTEM_NATIVE=1, TE_IMAGE_SUBSYSTEM_WINDOWS_GUI=2, TE_IMAGE_SUBSYSTEM_WINDOWS_CUI=3, TE_IMAGE_SUBSYSTEM_POSIX_CUI=7, TE_IMAGE_SUBSYSTEM_WINDOWS_CE_GU=9, TE_IMAGE_SUBSYSTEM_EFI_APPLICATION=10, TE_IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER=11, TE_IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER=12, TE_IMAGE_SUBSYSTEM_EFI_ROM=13, TE_IMAGE_SUBSYSTEM_XBOX=14};"

L_.str.7:                               ## @.str.7
	.asciz	"te_header.offset"

L_.str.8:                               ## @.str.8
	.asciz	"te_header.format"

L_.str.9:                               ## @.str.9
	.asciz	"[2]z[2]Eb[1]Ewxxq Signature (te_machine)Machine NumberOfSections (te_subsystem)Subsystem StrippedSize AddressOfEntryPoint BaseOfCode ImageBase"

L_.str.10:                              ## @.str.10
	.asciz	"te_directory1_header.offset"

L_.str.11:                              ## @.str.11
	.asciz	"te_directory1_header.format"

L_.str.12:                              ## @.str.12
	.asciz	"xx VirtualAddress Size"

L_.str.13:                              ## @.str.13
	.asciz	"te_directory2_header.offset"

L_.str.14:                              ## @.str.14
	.asciz	"te_directory2_header.format"

L_.str.15:                              ## @.str.15
	.asciz	"VZ"

	.no_dead_strip	_r_bin_te_init_hdr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function r_bin_te_init_hdr
_r_bin_te_init_hdr:                     ; @r_bin_te_init_hdr
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cbz	x0, LBB0_10
; %bb.1:
	mov	x19, x0
	mov	w0, #4
	bl	_malloc
	str	x0, [x19]
	cbz	x0, LBB0_5
; %bb.2:
	mov	x2, x0
	ldr	w0, [x19, #12]
	mov	w1, #0
	mov	w3, #4
	bl	_r_buf_read_at
	cmn	w0, #1
	b.eq	LBB0_6
; %bb.3:
	ldr	w0, [x19, #8]
	cbz	w0, LBB0_7
; %bb.4:
Lloh0:
	adrp	x1, l_.str.3@PAGE
Lloh1:
	add	x1, x1, l_.str.3@PAGEOFF
Lloh2:
	adrp	x2, l_.str.4@PAGE
Lloh3:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	w3, #0
	bl	_sdb_set
	ldr	w0, [x19, #8]
Lloh4:
	adrp	x1, l_.str.5@PAGE
Lloh5:
	add	x1, x1, l_.str.5@PAGEOFF
Lloh6:
	adrp	x2, l_.str.6@PAGE
Lloh7:
	add	x2, x2, l_.str.6@PAGEOFF
	mov	w3, #0
	bl	_sdb_set
	ldr	w0, [x19, #8]
Lloh8:
	adrp	x1, l_.str.7@PAGE
Lloh9:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	w2, #0
	mov	w3, #0
	bl	_sdb_num_set
	ldr	w0, [x19, #8]
Lloh10:
	adrp	x1, l_.str.8@PAGE
Lloh11:
	add	x1, x1, l_.str.8@PAGEOFF
Lloh12:
	adrp	x2, l_.str.9@PAGE
Lloh13:
	add	x2, x2, l_.str.9@PAGEOFF
	mov	w3, #0
	bl	_sdb_set
	ldr	w0, [x19, #8]
Lloh14:
	adrp	x1, l_.str.10@PAGE
Lloh15:
	add	x1, x1, l_.str.10@PAGEOFF
	mov	w2, #24
	mov	w3, #0
	bl	_sdb_num_set
	ldr	w0, [x19, #8]
Lloh16:
	adrp	x1, l_.str.11@PAGE
Lloh17:
	add	x1, x1, l_.str.11@PAGEOFF
Lloh18:
	adrp	x20, l_.str.12@PAGE
Lloh19:
	add	x20, x20, l_.str.12@PAGEOFF
	mov	x2, x20
	mov	w3, #0
	bl	_sdb_set
	ldr	w0, [x19, #8]
Lloh20:
	adrp	x1, l_.str.13@PAGE
Lloh21:
	add	x1, x1, l_.str.13@PAGEOFF
	mov	w2, #32
	mov	w3, #0
	bl	_sdb_num_set
	ldr	w0, [x19, #8]
Lloh22:
	adrp	x1, l_.str.14@PAGE
Lloh23:
	add	x1, x1, l_.str.14@PAGEOFF
	mov	x2, x20
	mov	w3, #0
	bl	_sdb_set
	ldr	x0, [x19]
Lloh24:
	adrp	x1, l_.str.15@PAGE
Lloh25:
	add	x1, x1, l_.str.15@PAGEOFF
	mov	w2, #2
	bl	_strncmp
	cmp	x0, #0
	cset	w0, eq
	b	LBB0_10
LBB0_5:
Lloh26:
	adrp	x0, l_.str@PAGE
Lloh27:
	add	x0, x0, l_.str@PAGEOFF
	bl	_r_sys_perror
	b	LBB0_9
LBB0_6:
Lloh28:
	adrp	x0, l_.str.1@PAGE
Lloh29:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_8
LBB0_7:
Lloh30:
	adrp	x0, l_.str.2@PAGE
Lloh31:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_8:
	bl	_eprintf
LBB0_9:
	mov	w0, #0
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"malloc (header)"

l_.str.1:                               ; @.str.1
	.asciz	"Error: read (header)\n"

l_.str.2:                               ; @.str.2
	.asciz	"Error: sdb instance is empty\n"

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

l_.str.4:                               ; @.str.4
	.asciz	"enum te_machine { TE_IMAGE_FILE_MACHINE_UNKNOWN=0x0, TE_IMAGE_FILE_MACHINE_ALPHA=0x184, TE_IMAGE_FILE_MACHINE_ALPHA64=0x284, TE_IMAGE_FILE_MACHINE_AM33=0x1d3, TE_IMAGE_FILE_MACHINE_AMD64=0x8664, TE_IMAGE_FILE_MACHINE_ARM=0x1c0, TE_IMAGE_FILE_MACHINE_AXP64=0x184, TE_IMAGE_FILE_MACHINE_CEE=0xc0ee, TE_IMAGE_FILE_MACHINE_CEF=0x0cef, TE_IMAGE_FILE_MACHINE_EBC=0x0ebc, TE_IMAGE_FILE_MACHINE_I386=0x014c, TE_IMAGE_FILE_MACHINE_IA64=0x0200, TE_IMAGE_FILE_MACHINE_M32R=0x9041, TE_IMAGE_FILE_MACHINE_M68K=0x0268, TE_IMAGE_FILE_MACHINE_MIPS16=0x0266, TE_IMAGE_FILE_MACHINE_MIPSFPU=0x0366, TE_IMAGE_FILE_MACHINE_MIPSFPU16=0x0466, TE_IMAGE_FILE_MACHINE_POWERPC=0x01f0, TE_IMAGE_FILE_MACHINE_POWERPCFP=0x01f1, TE_IMAGE_FILE_MACHINE_R10000=0x0168, TE_IMAGE_FILE_MACHINE_R3000=0x0162, TE_IMAGE_FILE_MACHINE_R4000=0x0166, TE_IMAGE_FILE_MACHINE_SH3=0x01a2, TE_IMAGE_FILE_MACHINE_SH3DSP=0x01a3, TE_IMAGE_FILE_MACHINE_SH3E=0x01a4, TE_IMAGE_FILE_MACHINE_SH4=0x01a6, TE_IMAGE_FILE_MACHINE_SH5=0x01a8, TE_IMAGE_FILE_MACHINE_THUMB=0x01c2, TE_IMAGE_FILE_MACHINE_TRICORE=0x0520, TE_IMAGE_FILE_MACHINE_WCEMIPSV2=0x0169};"

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

l_.str.6:                               ; @.str.6
	.asciz	"enum te_subsystem { TE_IMAGE_SUBSYSTEM_UNKNOWN=0, TE_IMAGE_SUBSYSTEM_NATIVE=1, TE_IMAGE_SUBSYSTEM_WINDOWS_GUI=2, TE_IMAGE_SUBSYSTEM_WINDOWS_CUI=3, TE_IMAGE_SUBSYSTEM_POSIX_CUI=7, TE_IMAGE_SUBSYSTEM_WINDOWS_CE_GU=9, TE_IMAGE_SUBSYSTEM_EFI_APPLICATION=10, TE_IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER=11, TE_IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER=12, TE_IMAGE_SUBSYSTEM_EFI_ROM=13, TE_IMAGE_SUBSYSTEM_XBOX=14};"

l_.str.7:                               ; @.str.7
	.asciz	"te_header.offset"

l_.str.8:                               ; @.str.8
	.asciz	"te_header.format"

l_.str.9:                               ; @.str.9
	.asciz	"[2]z[2]Eb[1]Ewxxq Signature (te_machine)Machine NumberOfSections (te_subsystem)Subsystem StrippedSize AddressOfEntryPoint BaseOfCode ImageBase"

l_.str.10:                              ; @.str.10
	.asciz	"te_directory1_header.offset"

l_.str.11:                              ; @.str.11
	.asciz	"te_directory1_header.format"

l_.str.12:                              ; @.str.12
	.asciz	"xx VirtualAddress Size"

l_.str.13:                              ; @.str.13
	.asciz	"te_directory2_header.offset"

l_.str.14:                              ; @.str.14
	.asciz	"te_directory2_header.format"

l_.str.15:                              ; @.str.15
	.asciz	"VZ"

	.no_dead_strip	_r_bin_te_init_hdr
.subsections_via_symbols
