	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function http_fetch
_http_fetch:                            ## @http_fetch
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %rbx
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_BUFFER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movq	_PF_INET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_socket
	testl	%eax, %eax
	js	LBB0_1
## %bb.3:
	movl	%eax, %r15d
	movl	%eax, %edi
	movq	%r13, %rsi
	movl	$4, %edx
	callq	_connect
	testq	%rax, %rax
	js	LBB0_4
## %bb.8:
	movq	_BUFFER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%r12, %rdi
	movq	%rbx, %rcx
	callq	_snprintf
	movq	%r12, %rdi
	callq	_strlen
	testq	%rax, %rax
	je	LBB0_17
## %bb.9:
	xorl	%r13d, %r13d
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_10 Depth=1
	addq	%rbx, %r13
	movq	%r12, %rdi
	callq	_strlen
	cmpq	%rax, %r13
	jae	LBB0_17
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	%r15d, %edi
	movq	%r12, %rsi
	movq	%rax, %rdx
	xorl	%ecx, %ecx
	callq	_send
	testq	%rax, %rax
	js	LBB0_11
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%rax, %rbx
	testl	%r14d, %r14d
	jne	LBB0_16
## %bb.14:                              ##   in Loop: Header=BB0_10 Depth=1
	testq	%rbx, %rbx
	jne	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_10 Depth=1
	leaq	L_.str.4(%rip), %rdi
	callq	_warnx
	jmp	LBB0_16
LBB0_1:
	movl	$-1, %ebx
	testl	%r14d, %r14d
	jne	LBB0_23
## %bb.2:
	leaq	L_.str(%rip), %rdi
	callq	_warn
	jmp	LBB0_23
LBB0_17:
	movq	_BUFFER@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edx
	movl	%r15d, %edi
	movq	%r12, %rsi
	xorl	%ecx, %ecx
	callq	_recv
	testq	%rax, %rax
	js	LBB0_19
## %bb.21:                              ##   in Loop: Header=BB0_18 Depth=1
	jne	LBB0_18
## %bb.22:
	movl	%r15d, %edi
	callq	_close
	xorl	%ebx, %ebx
	jmp	LBB0_23
LBB0_4:
	testl	%r14d, %r14d
	jne	LBB0_7
## %bb.5:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_6
LBB0_19:
	testl	%r14d, %r14d
	jne	LBB0_7
## %bb.20:
	leaq	L_.str.5(%rip), %rdi
	jmp	LBB0_6
LBB0_11:
	testl	%r14d, %r14d
	jne	LBB0_7
## %bb.12:
	leaq	L_.str.3(%rip), %rdi
LBB0_6:
	callq	_warn
LBB0_7:
	movl	%r15d, %edi
	callq	_close
	movl	$-1, %ebx
LBB0_23:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_25
## %bb.24:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_25:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_BUFFER,4,2                     ## @BUFFER
	.comm	_PF_INET,4,2                    ## @PF_INET
	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"socket(PF_INET, SOCK_STREAM)"

L_.str.1:                               ## @.str.1
	.asciz	"connect"

L_.str.2:                               ## @.str.2
	.asciz	"GET %s HTTP/1.0\n\n"

L_.str.3:                               ## @.str.3
	.asciz	"send"

L_.str.4:                               ## @.str.4
	.asciz	"send: len == 0"

L_.str.5:                               ## @.str.5
	.asciz	"recv"

	.no_dead_strip	_http_fetch
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function http_fetch
_http_fetch:                            ; @http_fetch
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	sub	sp, sp, #16
	mov	x20, x2
	mov	x22, x1
	mov	x23, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x24, _BUFFER@GOTPAGE
Lloh4:
	ldr	x24, [x24, _BUFFER@GOTPAGEOFF]
	ldr	w8, [x24]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x21, x9, x8
	mov	sp, x21
Lloh7:
	adrp	x8, _PF_INET@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PF_INET@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x8, _SOCK_STREAM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SOCK_STREAM@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_socket
	tbnz	w0, #31, LBB0_13
; %bb.1:
	mov	x19, x0
	mov	x1, x23
	mov	w2, #4
	bl	_connect
	tbnz	x0, #63, LBB0_15
; %bb.2:
	ldr	w1, [x24]
Lloh13:
	adrp	x2, l_.str.2@PAGE
Lloh14:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x21
	mov	x3, x22
	bl	_snprintf
	mov	x0, x21
	bl	_strlen
	cbz	x0, LBB0_10
; %bb.3:
	mov	x2, x0
	mov	x25, #0
Lloh15:
	adrp	x22, l_.str.4@PAGE
Lloh16:
	add	x22, x22, l_.str.4@PAGEOFF
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x25, x23, x25
	mov	x0, x21
	bl	_strlen
	mov	x2, x0
	cmp	x25, x0
	b.hs	LBB0_10
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	mov	w3, #0
	bl	_send
	tbnz	x0, #63, LBB0_18
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x23, x0
	cbnz	w20, LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	cbnz	x23, LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x22
	bl	_warnx
	b	LBB0_4
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	cbz	x0, LBB0_17
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x24]
	mov	x0, x19
	mov	x1, x21
	mov	w3, #0
	bl	_recv
	tbz	x0, #63, LBB0_9
; %bb.11:
	cbnz	w20, LBB0_21
; %bb.12:
Lloh17:
	adrp	x0, l_.str.5@PAGE
Lloh18:
	add	x0, x0, l_.str.5@PAGEOFF
	b	LBB0_20
LBB0_13:
	cbnz	w20, LBB0_22
; %bb.14:
Lloh19:
	adrp	x0, l_.str@PAGE
Lloh20:
	add	x0, x0, l_.str@PAGEOFF
	bl	_warn
	b	LBB0_22
LBB0_15:
	cbnz	w20, LBB0_21
; %bb.16:
Lloh21:
	adrp	x0, l_.str.1@PAGE
Lloh22:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_20
LBB0_17:
	mov	x0, x19
	bl	_close
	mov	w0, #0
	b	LBB0_23
LBB0_18:
	cbnz	w20, LBB0_21
; %bb.19:
Lloh23:
	adrp	x0, l_.str.3@PAGE
Lloh24:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_20:
	bl	_warn
LBB0_21:
	mov	x0, x19
	bl	_close
LBB0_22:
	mov	w0, #-1
LBB0_23:
	ldur	x8, [x29, #-72]
Lloh25:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh26:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_25
; %bb.24:
	sub	sp, x29, #64
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_25:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_BUFFER,4,2                     ; @BUFFER
	.comm	_PF_INET,4,2                    ; @PF_INET
	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"socket(PF_INET, SOCK_STREAM)"

l_.str.1:                               ; @.str.1
	.asciz	"connect"

l_.str.2:                               ; @.str.2
	.asciz	"GET %s HTTP/1.0\n\n"

l_.str.3:                               ; @.str.3
	.asciz	"send"

l_.str.4:                               ; @.str.4
	.asciz	"send: len == 0"

l_.str.5:                               ; @.str.5
	.asciz	"recv"

	.no_dead_strip	_http_fetch
.subsections_via_symbols
