	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_options
_check_options:                         ## @check_options
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_firmware_info@GOTPCREL(%rip), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_1
## %bb.2:
	movq	_firmware_info@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_get_file_stat
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_23
## %bb.3:
	movq	_inspect@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	cmpq	$0, (%rax)
	jne	LBB0_23
## %bb.4:
	movq	_board_id@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	movq	_opt_hw_id@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rdi, %rcx
	orq	%rax, %rcx
	jne	LBB0_6
## %bb.5:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_21
LBB0_1:
	leaq	L_.str(%rip), %rdi
LBB0_21:
	xorl	%eax, %eax
	callq	_ERR
LBB0_22:
	movl	$-1, %ebx
LBB0_23:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	testq	%rdi, %rdi
	je	LBB0_13
## %bb.7:
	callq	_find_board
	movq	_board@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	testq	%rax, %rax
	je	LBB0_8
## %bb.10:
	movq	_layout_id@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	testq	%rdi, %rdi
	jne	LBB0_12
## %bb.11:
	movq	(%rax), %rdi
	movq	%rdi, (%rcx)
LBB0_12:
	movl	8(%rax), %eax
	movq	_hw_id@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	jmp	LBB0_15
LBB0_13:
	movq	%rax, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_strtoul
	movq	_hw_id@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	%eax, %edi
	callq	_find_board_by_hwid
	movq	_board@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movq	_layout_id@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	testq	%rdi, %rdi
	jne	LBB0_15
## %bb.14:
	movq	(%rax), %rdi
	movq	%rdi, (%rcx)
LBB0_15:
	callq	_find_layout
	movq	_layout@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	testq	%rax, %rax
	je	LBB0_16
## %bb.17:
	movslq	(%r14), %rcx
	movq	_firmware_len@GOTPCREL(%rip), %rdx
	movl	%ecx, (%rdx)
	movslq	(%rax), %rax
	addq	$-4, %rax
	cmpq	%rcx, %rax
	jae	LBB0_19
## %bb.18:
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_21
LBB0_16:
	movq	_layout_id@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_9
LBB0_19:
	movq	_ofname@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_23
## %bb.20:
	leaq	L_.str.5(%rip), %rdi
	jmp	LBB0_21
LBB0_8:
	movq	(%r15), %rsi
	leaq	L_.str.2(%rip), %rdi
LBB0_9:
	xorl	%eax, %eax
	callq	_ERR
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.comm	_firmware_info,16,3             ## @firmware_info
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no firmware image specified"

	.comm	_inspect,8,3                    ## @inspect
	.comm	_board_id,8,3                   ## @board_id
	.comm	_opt_hw_id,8,3                  ## @opt_hw_id
L_.str.1:                               ## @.str.1
	.asciz	"either board or hardware id must be specified"

	.comm	_board,8,3                      ## @board
L_.str.2:                               ## @.str.2
	.asciz	"unknown/unsupported board id \"%s\""

	.comm	_layout_id,8,3                  ## @layout_id
	.comm	_hw_id,4,2                      ## @hw_id
	.comm	_layout,8,3                     ## @layout
L_.str.3:                               ## @.str.3
	.asciz	"unknown flash layout \"%s\""

	.comm	_firmware_len,4,2               ## @firmware_len
L_.str.4:                               ## @.str.4
	.asciz	"firmware image is too big"

	.comm	_ofname,8,3                     ## @ofname
L_.str.5:                               ## @.str.5
	.asciz	"no output file specified"

	.no_dead_strip	_check_options
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_options
_check_options:                         ; @check_options
	.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
Lloh0:
	adrp	x8, _firmware_info@GOTPAGE
Lloh1:
	ldr	x8, [x8, _firmware_info@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_4
; %bb.1:
Lloh3:
	adrp	x19, _firmware_info@GOTPAGE
Lloh4:
	ldr	x19, [x19, _firmware_info@GOTPAGEOFF]
	mov	x0, x19
	bl	_get_file_stat
	cbnz	w0, LBB0_6
; %bb.2:
Lloh5:
	adrp	x8, _inspect@GOTPAGE
Lloh6:
	ldr	x8, [x8, _inspect@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cbz	x8, LBB0_7
LBB0_3:
	mov	w0, #0
	b	LBB0_6
LBB0_4:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
LBB0_5:
	bl	_ERR
	mov	w0, #-1
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_7:
Lloh10:
	adrp	x20, _board_id@GOTPAGE
Lloh11:
	ldr	x20, [x20, _board_id@GOTPAGEOFF]
	ldr	x8, [x20]
Lloh12:
	adrp	x9, _opt_hw_id@GOTPAGE
Lloh13:
	ldr	x9, [x9, _opt_hw_id@GOTPAGEOFF]
Lloh14:
	ldr	x0, [x9]
	orr	x9, x8, x0
	cbnz	x9, LBB0_9
; %bb.8:
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_5
LBB0_9:
	cbz	x8, LBB0_14
; %bb.10:
	mov	x0, x8
	bl	_find_board
Lloh17:
	adrp	x9, _board@GOTPAGE
Lloh18:
	ldr	x9, [x9, _board@GOTPAGEOFF]
Lloh19:
	str	x0, [x9]
	cbz	x0, LBB0_22
; %bb.11:
	mov	x8, x0
Lloh20:
	adrp	x9, _layout_id@GOTPAGE
Lloh21:
	ldr	x9, [x9, _layout_id@GOTPAGEOFF]
	ldr	x0, [x9]
	cbnz	x0, LBB0_13
; %bb.12:
	ldr	x0, [x8]
	str	x0, [x9]
LBB0_13:
	ldr	w8, [x8, #8]
Lloh22:
	adrp	x9, _hw_id@GOTPAGE
Lloh23:
	ldr	x9, [x9, _hw_id@GOTPAGEOFF]
Lloh24:
	str	w8, [x9]
	b	LBB0_16
LBB0_14:
	mov	x1, #0
	mov	w2, #0
	bl	_strtoul
Lloh25:
	adrp	x8, _hw_id@GOTPAGE
Lloh26:
	ldr	x8, [x8, _hw_id@GOTPAGEOFF]
Lloh27:
	str	w0, [x8]
	bl	_find_board_by_hwid
	mov	x8, x0
Lloh28:
	adrp	x9, _board@GOTPAGE
Lloh29:
	ldr	x9, [x9, _board@GOTPAGEOFF]
Lloh30:
	str	x0, [x9]
Lloh31:
	adrp	x9, _layout_id@GOTPAGE
Lloh32:
	ldr	x9, [x9, _layout_id@GOTPAGEOFF]
	ldr	x0, [x9]
	cbnz	x0, LBB0_16
; %bb.15:
	ldr	x0, [x8]
	str	x0, [x9]
LBB0_16:
	bl	_find_layout
Lloh33:
	adrp	x8, _layout@GOTPAGE
Lloh34:
	ldr	x8, [x8, _layout@GOTPAGEOFF]
Lloh35:
	str	x0, [x8]
	cbz	x0, LBB0_19
; %bb.17:
	ldrsw	x8, [x19]
Lloh36:
	adrp	x9, _firmware_len@GOTPAGE
Lloh37:
	ldr	x9, [x9, _firmware_len@GOTPAGEOFF]
Lloh38:
	str	w8, [x9]
	ldrsw	x9, [x0]
	sub	x9, x9, #4
	cmp	x9, x8
	b.hs	LBB0_20
; %bb.18:
Lloh39:
	adrp	x0, l_.str.4@PAGE
Lloh40:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_5
LBB0_19:
Lloh41:
	adrp	x8, _layout_id@GOTPAGE
Lloh42:
	ldr	x8, [x8, _layout_id@GOTPAGEOFF]
Lloh43:
	ldr	x8, [x8]
	str	x8, [sp]
Lloh44:
	adrp	x0, l_.str.3@PAGE
Lloh45:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_5
LBB0_20:
Lloh46:
	adrp	x8, _ofname@GOTPAGE
Lloh47:
	ldr	x8, [x8, _ofname@GOTPAGEOFF]
Lloh48:
	ldr	x8, [x8]
	cbnz	x8, LBB0_3
; %bb.21:
Lloh49:
	adrp	x0, l_.str.5@PAGE
Lloh50:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_5
LBB0_22:
	ldr	x8, [x20]
	str	x8, [sp]
Lloh51:
	adrp	x0, l_.str.2@PAGE
Lloh52:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotStr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotStr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotStr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotStr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotStr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotStr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpAdd	Lloh51, Lloh52
	.cfi_endproc
                                        ; -- End function
	.comm	_firmware_info,16,3             ; @firmware_info
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no firmware image specified"

	.comm	_inspect,8,3                    ; @inspect
	.comm	_board_id,8,3                   ; @board_id
	.comm	_opt_hw_id,8,3                  ; @opt_hw_id
l_.str.1:                               ; @.str.1
	.asciz	"either board or hardware id must be specified"

	.comm	_board,8,3                      ; @board
l_.str.2:                               ; @.str.2
	.asciz	"unknown/unsupported board id \"%s\""

	.comm	_layout_id,8,3                  ; @layout_id
	.comm	_hw_id,4,2                      ; @hw_id
	.comm	_layout,8,3                     ; @layout
l_.str.3:                               ; @.str.3
	.asciz	"unknown flash layout \"%s\""

	.comm	_firmware_len,4,2               ; @firmware_len
l_.str.4:                               ; @.str.4
	.asciz	"firmware image is too big"

	.comm	_ofname,8,3                     ; @ofname
l_.str.5:                               ; @.str.5
	.asciz	"no output file specified"

	.no_dead_strip	_check_options
.subsections_via_symbols
