	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function http_open
_http_open:                             ## @http_open
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	leaq	L_.str(%rip), %rsi
	movl	$7, %edx
	callq	_strncmp
	xorl	%r13d, %r13d
	testl	%eax, %eax
	jne	LBB0_30
## %bb.1:
	leaq	7(%r12), %r14
	movl	$1, %edi
	movq	%r14, %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%r13), %eax
	testb	%al, %al
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpb	$47, %al
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%r13
	incl	%edi
	jmp	LBB0_2
LBB0_5:
	movq	%r13, -72(%rbp)
	leal	-1(%rdi), %r15d
                                        ## kill: def $edi killed $edi killed $rdi
	movl	$1, %esi
	callq	_calloc
	movq	%rax, %rdi
	movq	%r14, %rsi
	movq	%rax, %r14
	movl	%r15d, %edx
	callq	_strncpy
	movslq	%r15d, %rax
	movb	$0, (%r14,%rax)
	movq	%r14, %rbx
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%rbx), %eax
	testb	%al, %al
	je	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpb	$58, %al
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	incq	%rbx
	jmp	LBB0_6
LBB0_9:
	movb	$0, (%rbx)
	incq	%rbx
LBB0_10:
	leaq	L_.str.1(%rip), %rdi
	callq	_getenv
	testq	%rax, %rax
	je	LBB0_11
## %bb.12:
	movq	%rax, %r14
	leaq	L_.str(%rip), %rsi
	movl	$7, %edx
	movq	%rax, %rdi
	callq	_strncmp
	leaq	7(%r14), %rdi
	testl	%eax, %eax
	cmovneq	%r14, %rdi
	callq	_strdup
	movq	%rax, %r15
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	incq	%rax
	movzbl	-1(%rax), %ecx
	testb	%cl, %cl
	je	LBB0_16
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	cmpb	$58, %cl
	jne	LBB0_13
## %bb.15:
	movb	$0, -1(%rax)
	cmpb	$0, (%rax)
	leaq	L_.str.2(%rip), %rdi
	cmovneq	%rax, %rdi
	jmp	LBB0_17
LBB0_11:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_strdup
	cmpb	$0, (%rbx)
	movq	%rax, %r15
	leaq	L_.str.2(%rip), %rdi
	cmovneq	%rbx, %rdi
	callq	_strdup
	cmpb	$0, (%r13)
	movq	%rax, %rbx
	leaq	L_.str.3(%rip), %r12
	cmovneq	%r13, %r12
	jmp	LBB0_18
LBB0_16:
	leaq	L_.str.2(%rip), %rdi
LBB0_17:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	callq	_strdup
	movq	%rax, %rbx
LBB0_18:
	movq	%r12, %rdi
	callq	_strdup
	movq	%rax, %r12
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rsi
	callq	_socket_connect
	movl	%eax, %r13d
	movl	$65536, %edi                    ## imm = 0x10000
	movl	$1, %esi
	callq	_calloc
	movq	%rax, %r15
	leaq	L_.str.4(%rip), %rsi
	movq	%rax, %rdi
	movq	%r12, %rdx
	movq	%r14, %rcx
	xorl	%eax, %eax
	callq	_sprintf
	movslq	%eax, %rbx
	leaq	(%r15,%rbx), %rdi
	leaq	L_.str.5(%rip), %rsi
	xorl	%eax, %eax
	callq	_sprintf
	addl	%eax, %ebx
	movl	%r13d, %edi
	movq	%r15, %rsi
	movl	%ebx, %edx
	callq	_write
	movl	%r13d, %edi
	movq	%r15, %rsi
	movl	$1, %edx
	callq	_read
	testq	%rax, %rax
	je	LBB0_25
## %bb.19:
	xorl	%ebx, %ebx
	leaq	L_.str.6(%rip), %r14
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_20 Depth=1
	leaq	(%r15,%rbx), %rsi
	incq	%rsi
	incq	%rbx
	movl	%r13d, %edi
	movl	$1, %edx
	callq	_read
	testq	%rax, %rax
	je	LBB0_24
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	cmpb	$10, (%r15,%rbx)
	jne	LBB0_23
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=1
	cmpq	$3, %rbx
	jb	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_20 Depth=1
	leaq	(%r15,%rbx), %rdi
	addq	$-3, %rdi
	movq	%r14, %rsi
	movl	$4, %edx
	callq	_strncmp
	testq	%rax, %rax
	jne	LBB0_23
LBB0_24:
	leaq	(%r15,%rbx), %rax
	movb	$0, (%rax)
	cmpl	$13, %ebx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jbe	LBB0_26
	jmp	LBB0_27
LBB0_25:
	movb	$0, (%r15)
LBB0_26:
	movl	%r13d, %edi
	callq	_close
	movl	$-1, %r13d
LBB0_27:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%r15, %rdi
	addq	$8, %rdi
	leaq	-72(%rbp), %rsi
	xorl	%edx, %edx
	callq	_strtol
	cmpl	$200, %eax
	je	LBB0_29
## %bb.28:
	movl	%r13d, %edi
	callq	_close
	movl	$-1, %r13d
LBB0_29:
	movq	%r15, %rdi
	callq	_free
	movq	%r14, %rdi
	callq	_free
	movq	%rbx, %rdi
	callq	_free
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_free
	movq	%r12, %rdi
	callq	_free
LBB0_30:
	movl	%r13d, %eax
	addq	$40, %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	"http://"

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

L_.str.2:                               ## @.str.2
	.asciz	"80"

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

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

L_.str.5:                               ## @.str.5
	.asciz	"\r\n"

L_.str.6:                               ## @.str.6
	.asciz	"\r\n\r\n"

	.no_dead_strip	_http_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function http_open
_http_open:                             ; @http_open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w2, #7
	bl	_strncmp
	cbz	w0, LBB0_2
; %bb.1:
	mov	w23, #0
	b	LBB0_29
LBB0_2:
	add	x20, x22, #7
	mov	w8, #7
	ldrb	w9, [x22, x8]
	cbz	w9, LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w9, #47
	b.eq	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x8, x8, #1
	ldrb	w9, [x22, x8]
	cbnz	w9, LBB0_3
LBB0_5:
	add	x23, x22, x8
	str	x23, [sp, #24]
	sub	x21, x8, #7
	sub	w0, w8, #6
	mov	w1, #1
	bl	_calloc
	mov	x19, x0
	mov	x1, x20
	mov	x2, x21
	bl	_strncpy
	strb	wzr, [x19, w21, sxtw]
	mov	x21, x19
	ldrb	w8, [x21]
	cbz	w8, LBB0_9
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w8, #58
	b.eq	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x21, x21, #1
	ldrb	w8, [x21]
	cbnz	w8, LBB0_6
	b	LBB0_9
LBB0_8:
	strb	wzr, [x21], #1
LBB0_9:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_getenv
	cbz	x0, LBB0_14
; %bb.10:
	mov	x20, x0
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	w21, #7
	mov	w2, #7
	bl	_strncmp
	cmp	w0, #0
	csel	x8, x21, xzr, eq
	add	x0, x20, x8
	bl	_strdup
	mov	x20, x0
	add	x8, x0, #1
	ldurb	w9, [x8, #-1]
	cbz	w9, LBB0_13
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	cmp	w9, #58
	b.eq	LBB0_15
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	add	x8, x8, #1
	ldurb	w9, [x8, #-1]
	cbnz	w9, LBB0_11
LBB0_13:
Lloh6:
	adrp	x0, l_.str.2@PAGE
Lloh7:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_16
LBB0_14:
	mov	x0, x19
	bl	_strdup
	mov	x20, x0
	ldrb	w8, [x21]
Lloh8:
	adrp	x9, l_.str.2@PAGE
Lloh9:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	w8, #0
	csel	x0, x9, x21, eq
	bl	_strdup
	mov	x21, x0
	ldrb	w8, [x23]
Lloh10:
	adrp	x9, l_.str.3@PAGE
Lloh11:
	add	x9, x9, l_.str.3@PAGEOFF
	cmp	w8, #0
	csel	x22, x9, x23, eq
	b	LBB0_17
LBB0_15:
	sturb	wzr, [x8, #-1]
	ldrb	w9, [x8]
Lloh12:
	adrp	x10, l_.str.2@PAGE
Lloh13:
	add	x10, x10, l_.str.2@PAGEOFF
	cmp	w9, #0
	csel	x0, x10, x8, eq
LBB0_16:
	bl	_strdup
	mov	x21, x0
LBB0_17:
	mov	x0, x22
	bl	_strdup
	mov	x22, x0
	mov	x0, x20
	mov	x1, x21
	bl	_socket_connect
	mov	x23, x0
	mov	w0, #65536
	mov	w1, #1
	bl	_calloc
	mov	x24, x0
	stp	x22, x19, [sp]
Lloh14:
	adrp	x1, l_.str.4@PAGE
Lloh15:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_sprintf
	mov	x25, x0
	add	x0, x24, w25, sxtw
Lloh16:
	adrp	x1, l_.str.5@PAGE
Lloh17:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_sprintf
	add	w2, w0, w25
	mov	x0, x23
	mov	x1, x24
	bl	_write
	mov	x0, x23
	mov	x1, x24
	mov	w2, #1
	bl	_read
	cbz	x0, LBB0_24
; %bb.18:
	mov	x26, #0
Lloh18:
	adrp	x25, l_.str.6@PAGE
Lloh19:
	add	x25, x25, l_.str.6@PAGEOFF
	b	LBB0_20
LBB0_19:                                ;   in Loop: Header=BB0_20 Depth=1
	add	x27, x26, #1
	add	x8, x24, x26
	add	x1, x8, #1
	mov	x0, x23
	mov	w2, #1
	bl	_read
	mov	x26, x27
	cbz	x0, LBB0_23
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ldrb	w8, [x24, x26]
	cmp	w8, #10
	ccmp	x26, #3, #0, eq
	b.lo	LBB0_19
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=1
	add	x8, x24, x26
	sub	x0, x8, #3
	mov	x1, x25
	mov	w2, #4
	bl	_strncmp
	cbnz	x0, LBB0_19
; %bb.22:
	mov	x27, x26
LBB0_23:
	strb	wzr, [x24, x27]
	cmp	w27, #13
	b.ls	LBB0_25
	b	LBB0_26
LBB0_24:
	strb	wzr, [x24]
LBB0_25:
	mov	x0, x23
	bl	_close
	mov	w23, #-1
LBB0_26:
	add	x0, x24, #8
	add	x1, sp, #24
	mov	w2, #0
	bl	_strtol
	cmp	w0, #200
	b.eq	LBB0_28
; %bb.27:
	mov	x0, x23
	bl	_close
	mov	w23, #-1
LBB0_28:
	mov	x0, x24
	bl	_free
	mov	x0, x19
	bl	_free
	mov	x0, x20
	bl	_free
	mov	x0, x21
	bl	_free
	mov	x0, x22
	bl	_free
LBB0_29:
	mov	x0, x23
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"http://"

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

l_.str.2:                               ; @.str.2
	.asciz	"80"

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

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

l_.str.5:                               ; @.str.5
	.asciz	"\r\n"

l_.str.6:                               ; @.str.6
	.asciz	"\r\n\r\n"

	.no_dead_strip	_http_open
.subsections_via_symbols
