	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_display_format                 ## -- Begin function display_format
	.p2align	4, 0x90
_display_format:                        ## @display_format
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$3, %edi
	jl	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_warnx
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	jmp	LBB0_21
LBB0_3:
	movl	%ecx, %r15d
	movl	%edx, %r14d
	movq	%rsi, %r13
	movl	%edi, %ebx
	movq	_mfi_unit@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_mfi_open
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movl	%eax, %r12d
	movq	_MFI_DCMD_CFG_FOREIGN_SCAN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	$0, (%rsp)
	leaq	-48(%rbp), %rdx
	movl	%r12d, %edi
	movl	$4, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_mfi_dcmd_command
	testq	%rax, %rax
	js	LBB0_6
## %bb.7:
	movl	-48(%rbp), %eax
	testl	%eax, %eax
	je	LBB0_8
## %bb.9:
	cmpl	$2, %ebx
	je	LBB0_19
## %bb.10:
	cmpl	$1, %ebx
	jne	LBB0_20
## %bb.11:
	testl	%eax, %eax
	jle	LBB0_20
## %bb.12:
	xorl	%ebx, %ebx
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_13 Depth=1
	incl	%ebx
	cmpl	%eax, %ebx
	jge	LBB0_20
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movl	%r12d, %edi
	movl	%r15d, %esi
	movl	%ebx, %edx
	movl	%r14d, %ecx
	callq	_foreign_show_cfg
	testl	%eax, %eax
	jne	LBB0_14
## %bb.16:                              ##   in Loop: Header=BB0_13 Depth=1
	movl	-48(%rbp), %eax
	leal	-1(%rax), %ecx
	cmpl	%ecx, %ebx
	jge	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_13 Depth=1
	movl	$10, %edi
	callq	_putchar
	movl	-48(%rbp), %eax
	jmp	LBB0_18
LBB0_4:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	leaq	L_.str.1(%rip), %rdi
	callq	_warn
	jmp	LBB0_21
LBB0_6:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	leaq	L_.str.2(%rip), %rdi
	callq	_warn
	jmp	LBB0_15
LBB0_8:
	leaq	L_.str.3(%rip), %rdi
	callq	_warnx
	movl	%r12d, %edi
	callq	_close
	jmp	LBB0_2
LBB0_19:
	movq	8(%r13), %rdi
	callq	_atoi
	movl	%r12d, %edi
	movl	%r15d, %esi
	movl	%eax, %edx
	movl	%r14d, %ecx
	callq	_foreign_show_cfg
	testl	%eax, %eax
	je	LBB0_20
LBB0_14:
	movl	%eax, %r13d
LBB0_15:
	movl	%r12d, %edi
	callq	_close
	jmp	LBB0_21
LBB0_20:
	movl	%r12d, %edi
	callq	_close
	xorl	%r13d, %r13d
LBB0_21:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"foreign display: extra arguments"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_mfi_unit,4,2                   ## @mfi_unit
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.comm	_errno,4,2                      ## @errno
L_.str.1:                               ## @.str.1
	.asciz	"mfi_open"

	.comm	_MFI_DCMD_CFG_FOREIGN_SCAN,4,2  ## @MFI_DCMD_CFG_FOREIGN_SCAN
L_.str.2:                               ## @.str.2
	.asciz	"Failed to scan foreign configuration"

L_.str.3:                               ## @.str.3
	.asciz	"foreign display: no foreign configs found"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_display_format                 ; -- Begin function display_format
	.p2align	2
_display_format:                        ; @display_format
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	cmp	w0, #3
	b.lt	LBB0_3
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_warnx
LBB0_2:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w22, [x8]
	b	LBB0_21
LBB0_3:
	mov	x21, x3
	mov	x20, x2
	mov	x22, x1
	mov	x23, x0
Lloh5:
	adrp	x8, _mfi_unit@GOTPAGE
Lloh6:
	ldr	x8, [x8, _mfi_unit@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh9:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	bl	_mfi_open
	tbnz	w0, #31, LBB0_14
; %bb.4:
	mov	x19, x0
Lloh11:
	adrp	x8, _MFI_DCMD_CFG_FOREIGN_SCAN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MFI_DCMD_CFG_FOREIGN_SCAN@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	w3, #4
	mov	x4, #0
	mov	w5, #0
	mov	x6, #0
	bl	_mfi_dcmd_command
	tbnz	x0, #63, LBB0_15
; %bb.5:
	ldr	w8, [sp, #8]
	cbz	w8, LBB0_16
; %bb.6:
	cmp	w23, #2
	b.eq	LBB0_17
; %bb.7:
	cmp	w23, #1
	b.ne	LBB0_20
; %bb.8:
	cmp	w8, #1
	b.lt	LBB0_20
; %bb.9:
	mov	w23, #0
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	w23, w23, #1
	cmp	w23, w8
	b.ge	LBB0_20
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	mov	x2, x23
	mov	x3, x20
	bl	_foreign_show_cfg
	cbnz	w0, LBB0_18
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w8, [sp, #8]
	sub	w9, w8, #1
	cmp	w23, w9
	b.ge	LBB0_10
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	w0, #10
	bl	_putchar
	ldr	w8, [sp, #8]
	b	LBB0_10
LBB0_14:
Lloh14:
	adrp	x8, _errno@GOTPAGE
Lloh15:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh16:
	ldr	w22, [x8]
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_warn
	b	LBB0_21
LBB0_15:
Lloh19:
	adrp	x8, _errno@GOTPAGE
Lloh20:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh21:
	ldr	w22, [x8]
Lloh22:
	adrp	x0, l_.str.2@PAGE
Lloh23:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_warn
	b	LBB0_19
LBB0_16:
Lloh24:
	adrp	x0, l_.str.3@PAGE
Lloh25:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_warnx
	mov	x0, x19
	bl	_close
	b	LBB0_2
LBB0_17:
	ldr	x0, [x22, #8]
	bl	_atoi
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	mov	x3, x20
	bl	_foreign_show_cfg
	cbz	w0, LBB0_20
LBB0_18:
	mov	x22, x0
LBB0_19:
	mov	x0, x19
	bl	_close
	b	LBB0_21
LBB0_20:
	mov	x0, x19
	bl	_close
	mov	w22, #0
LBB0_21:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"foreign display: extra arguments"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_mfi_unit,4,2                   ; @mfi_unit
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.comm	_errno,4,2                      ; @errno
l_.str.1:                               ; @.str.1
	.asciz	"mfi_open"

	.comm	_MFI_DCMD_CFG_FOREIGN_SCAN,4,2  ; @MFI_DCMD_CFG_FOREIGN_SCAN
l_.str.2:                               ; @.str.2
	.asciz	"Failed to scan foreign configuration"

l_.str.3:                               ; @.str.3
	.asciz	"foreign display: no foreign configs found"

.subsections_via_symbols
