#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ sprintf(char *, char *, char *, int);
void reponse_log(char *url, int len) {
  FILE *fp;
  char content[100] = {0};
  fp = fopen("/ailvgo/reponse_log", "a");
  sprintf(content, "%s----%d----- \n", url, len);
  fputs(content, fp);
  fclose(fp);
}


x86 assembly (clang, -O0):
<reponse_log>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x80(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1050 <memset@plt>
lea    0xe87(%rip),%rdi
lea    0xe94(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x18(%rbp)
lea    -0x80(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
lea    0xe7b(%rip),%rsi
call   1070 <sprintf@plt>
lea    -0x80(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <fputs@plt>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reponse_log>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x68,%rsp
mov    %esi,%r14d
mov    %rdi,%r15
xorps  %xmm0,%xmm0
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
movl   $0x0,0x60(%rsp)
lea    0xe81(%rip),%rdi
lea    0xe8e(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,%rbp
lea    0xe81(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %r15,%rdx
mov    %r14d,%ecx
call   1060 <sprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1040 <fputs@plt>
mov    %rbp,%rdi
add    $0x68,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <fclose@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"/ailvgo/reponse_log\00"
@.str.1 = [2 x i8] c"a\00"
@.str.2 = [16 x i8] c"%s----%d----- \0A\00"
define void @reponse_log(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32*
%6 = alloca [100 x i8]
store i8* %0, i8** %3
store i32 %1, i32* %4
%7 = bitcast [100 x i8]* %6 to i8*
%8 = call i32* @fopen(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %8, i32** %5
%9 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%10 = load i8*, i8** %3
%11 = load i32, i32* %4
%12 = call i32 @sprintf(i8* %9, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8* %10, i32 %11)
%13 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%14 = load i32*, i32** %5
%15 = call i32 @fputs(i8* %13, i32* %14)
%16 = load i32*, i32** %5
%17 = call i32 @fclose(i32* %16)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"/ailvgo/reponse_log\00"
@.str.1 = [2 x i8] c"a\00"
@.str.2 = [16 x i8] c"%s----%d----- \0A\00"
define void @reponse_log(i8* %0, i32 %1) {
%3 = alloca [100 x i8]
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%5 = tail call i32* @fopen(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i8* %0, i32 %1)
%7 = call i32 @fputs(i8* %4, i32* %5)
%8 = tail call i32 @fclose(i32* %5)
ret void
}