xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
int /*<<< orphan*/ *malloc(int);
scalar_t__ pthread_mutex_init(int /*<<< orphan*/ *, void *);
void *el_mutex_init(void) {
  pthread_mutex_t *hmutex = malloc(sizeof(pthread_mutex_t));
  if (pthread_mutex_init(hmutex, (void *)0)) {
    free(hmutex);
    return (void *)0;
  }
  return (void *)hmutex;
}


x86 assembly (clang, -O0):
<el_mutex_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <pthread_mutex_init@plt>
cmp    $0x0,%rax
je     1173 <el_mutex_init+0x43>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x8(%rbp)
jmp    117b <el_mutex_init+0x4b>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<el_mutex_init>:
push   %rbx
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
call   1050 <pthread_mutex_init@plt>
test   %rax,%rax
je     1157 <el_mutex_init+0x27>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @el_mutex_init() {
%1 = alloca i8*
%2 = alloca i32*
%3 = call i32* @malloc(i32 4)
store i32* %3, i32** %2
%4 = load i32*, i32** %2
%5 = call i64 @pthread_mutex_init(i32* %4, i8* null)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = load i32*, i32** %2
%9 = call i32 @free(i32* %8)
store i8* null, i8** %1
br label %13
10: ; preds = %0
%11 = load i32*, i32** %2
%12 = bitcast i32* %11 to i8*
store i8* %12, i8** %1
br label %13
13: ; preds = %10, %7
%14 = load i8*, i8** %1
ret i8* %14
}

LLVM IR (-O2):
define i8* @el_mutex_init() {
%1 = tail call i32* @malloc(i32 4)
%2 = tail call i64 @pthread_mutex_init(i32* %1, i8* null)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = tail call i32 @free(i32* %1)
br label %8
6: ; preds = %0
%7 = bitcast i32* %1 to i8*
br label %8
8: ; preds = %6, %4
%9 = phi i8* [ null, %4 ], [ %7, %6 ]
ret i8* %9
}
void bfqg_stats_set_start_group_wait_time(struct bfq_group *bfqg,
                                          struct bfq_group *curr_bfqg) {}


x86 assembly (clang, -O0):
<bfqg_stats_set_start_group_wait_time>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<bfqg_stats_set_start_group_wait_time>:
ret

LLVM IR (-O0):
%struct.bfq_group = type opaque
define void @bfqg_stats_set_start_group_wait_time(%struct.bfq_group* %0, %struct.bfq_group* %1) {
%3 = alloca %struct.bfq_group*
%4 = alloca %struct.bfq_group*
store %struct.bfq_group* %0, %struct.bfq_group** %3
store %struct.bfq_group* %1, %struct.bfq_group** %4
ret void
}

LLVM IR (-O2):
%struct.bfq_group = type opaque
define void @bfqg_stats_set_start_group_wait_time(%struct.bfq_group* nocapture %0, %struct.bfq_group* nocapture %1) {
ret void
}
unsigned long f3(unsigned long bit_addr, int y) {
  unsigned long bitnumb = bit_addr & 63;
  return (1L << bitnumb);
}


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
and    $0x3f,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rcx
mov    $0x1,%eax
shl    %cl,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3>:
mov    %rdi,%rcx
mov    $0x1,%eax
shl    %cl,%rax
ret

LLVM IR (-O0):
define i64 @f3(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
%5 = alloca i64
store i64 %0, i64* %3
store i32 %1, i32* %4
%6 = load i64, i64* %3
%7 = and i64 %6, 63
store i64 %7, i64* %5
%8 = load i64, i64* %5
%9 = shl i64 1, %8
ret i64 %9
}

LLVM IR (-O2):
define i64 @f3(i64 %0, i32 %1) {
%3 = and i64 %0, 63
%4 = shl nuw i64 1, %3
ret i64 %4
}
/* Variables and functions */
int SIGALRM;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stderr;
void handle_sigalrm(int signal) {
  if (signal != SIGALRM) {
    fprintf(stderr, "Caught wrong signal: %d\n", signal);
  }
}


x86 assembly (clang, -O0):
<handle_sigalrm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2ec3(%rip),%rcx
cmp    (%rcx),%eax
je     1145 <handle_sigalrm+0x35>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_sigalrm>:
mov    0x2ed1(%rip),%rax
cmp    %edi,(%rax)
jne    111c <handle_sigalrm+0xc>
ret
mov    %edi,%edx
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
lea    0xed2(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@SIGALRM = global i32 0
@stderr = global i32 0
@.str = [25 x i8] c"Caught wrong signal: %d\0A\00"
define void @handle_sigalrm(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SIGALRM
%5 = icmp ne i32 %3, %4
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* @stderr
%8 = load i32, i32* %2
%9 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %8)
br label %10
10: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
@SIGALRM = global i32 0
@stderr = global i32 0
@.str = [25 x i8] c"Caught wrong signal: %d\0A\00"
define void @handle_sigalrm(i32 %0) {
%2 = load i32, i32* @SIGALRM
%3 = icmp eq i32 %2, %0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %7
7: ; preds = %4, %1
ret void
}
int check_longdouble() { return sizeof(long double); }


x86 assembly (clang, -O0):
<check_longdouble>:
push   %rbp
mov    %rsp,%rbp
mov    $0x10,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_longdouble>:
mov    $0x10,%eax
ret

LLVM IR (-O0):
define i32 @check_longdouble() {
ret i32 16
}

LLVM IR (-O2):
define i32 @check_longdouble() {
ret i32 16
}
/* Type definitions */
struct afp_volume {
  int dummy;
};

/* Variables and functions */
int EPERM;
int extra_translate(struct afp_volume *, char const *, char **);
int /*<<< orphan*/ free(char *);
int appledouble_unlink(struct afp_volume *volume, const char *path) {
  int resource;
  char *newpath;
  resource = extra_translate(volume, path, &newpath);
  free(newpath);
  if (resource == 0)
    return 0;
  return -EPERM;
}


x86 assembly (clang, -O0):
<appledouble_unlink>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    -0x28(%rbp),%rdx
call   1040 <extra_translate@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
cmpl   $0x0,-0x1c(%rbp)
jne    1163 <appledouble_unlink+0x43>
movl   $0x0,-0x4(%rbp)
jmp    1171 <appledouble_unlink+0x51>
xor    %eax,%eax
mov    0x2e6c(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<appledouble_unlink>:
push   %rbx
sub    $0x10,%rsp
lea    0x8(%rsp),%rdx
call   1040 <extra_translate@plt>
mov    %eax,%ebx
mov    0x8(%rsp),%rdi
call   1030 <free@plt>
mov    0x2e96(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
test   %ebx,%ebx
cmove  %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.afp_volume = type { i32 }
@EPERM = global i32 0
define i32 @appledouble_unlink(%struct.afp_volume* %0, i8* %1) {
%3 = alloca i32
%4 = alloca %struct.afp_volume*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
store %struct.afp_volume* %0, %struct.afp_volume** %4
store i8* %1, i8** %5
%8 = load %struct.afp_volume*, %struct.afp_volume** %4
%9 = load i8*, i8** %5
%10 = call i32 @extra_translate(%struct.afp_volume* %8, i8* %9, i8** %7)
store i32 %10, i32* %6
%11 = load i8*, i8** %7
%12 = call i32 @free(i8* %11)
%13 = load i32, i32* %6
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %2
store i32 0, i32* %3
br label %19
16: ; preds = %2
%17 = load i32, i32* @EPERM
%18 = sub nsw i32 0, %17
store i32 %18, i32* %3
br label %19
19: ; preds = %16, %15
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
%struct.afp_volume = type { i32 }
@EPERM = global i32 0
define i32 @appledouble_unlink(%struct.afp_volume* %0, i8* %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
%5 = call i32 @extra_translate(%struct.afp_volume* %0, i8* %1, i8** %3)
%6 = load i8*, i8** %3
%7 = call i32 @free(i8* %6)
%8 = icmp eq i32 %5, 0
%9 = load i32, i32* @EPERM
%10 = sub nsw i32 0, %9
%11 = select i1 %8, i32 0, i32 %10
ret i32 %11
}
/* Variables and functions */
double pow(double, int);
double sin(double);
double f_x(double x) { return pow(x, 2) * sin(x); }


x86 assembly (clang, -O0):
<f_x>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_x>:
sub    $0x18,%rsp
movsd  %xmm0,0x8(%rsp)
mov    $0x2,%edi
call   1040 <pow@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1030 <sin@plt>
mulsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @f_x(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @pow(double %3, i32 2)
%5 = load double, double* %2
%6 = call double @sin(double %5)
%7 = fmul double %4, %6
ret double %7
}

LLVM IR (-O2):
define double @f_x(double %0) {
%2 = tail call double @pow(double %0, i32 2)
%3 = tail call double @sin(double %0)
%4 = fmul double %2, %3
ret double %4
}
/* Variables and functions */
int cbm_upload(int, unsigned char, unsigned int, unsigned char *, int);
int pia_to_inputmode(int HandleDevice, unsigned char Drive,
                     unsigned int PiaAddress) {
  int ret = -1;
  unsigned char byteval = 0x00;
  ;
  if (cbm_upload(HandleDevice, Drive, PiaAddress + 2, &byteval, 1) == 1)
    ret = 0;
  else
    ret = 1;
  return ret;
}


x86 assembly (clang, -O0):
<pia_to_inputmode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0xffffffff,-0x10(%rbp)
movb   $0x0,-0x11(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x5(%rbp),%al
mov    -0xc(%rbp),%edx
add    $0x2,%edx
lea    -0x11(%rbp),%rcx
mov    $0x1,%r8d
movzbl %al,%esi
call   1030 <cbm_upload@plt>
cmp    $0x1,%eax
jne    1162 <pia_to_inputmode+0x52>
movl   $0x0,-0x10(%rbp)
jmp    1169 <pia_to_inputmode+0x59>
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pia_to_inputmode>:
push   %rax
movb   $0x0,0x7(%rsp)
add    $0x2,%edx
lea    0x7(%rsp),%rcx
mov    $0x1,%r8d
call   1030 <cbm_upload@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @pia_to_inputmode(i32 %0, i8 zeroext %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8
store i32 %0, i32* %4
store i8 %1, i8* %5
store i32 %2, i32* %6
store i32 -1, i32* %7
store i8 0, i8* %8
%9 = load i32, i32* %4
%10 = load i8, i8* %5
%11 = load i32, i32* %6
%12 = add i32 %11, 2
%13 = call i32 @cbm_upload(i32 %9, i8 zeroext %10, i32 %12, i8* %8, i32 1)
%14 = icmp eq i32 %13, 1
br i1 %14, label %15, label %16
15: ; preds = %3
store i32 0, i32* %7
br label %17
16: ; preds = %3
store i32 1, i32* %7
br label %17
17: ; preds = %16, %15
%18 = load i32, i32* %7
ret i32 %18
}

LLVM IR (-O2):
define i32 @pia_to_inputmode(i32 %0, i8 zeroext %1, i32 %2) {
%4 = alloca i8
store i8 0, i8* %4
%5 = add i32 %2, 2
%6 = call i32 @cbm_upload(i32 %0, i8 zeroext %1, i32 %5, i8* %4, i32 1)
%7 = icmp ne i32 %6, 1
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *);
int /*<<< orphan*/ write_time_prefix(int /*<<< orphan*/ *);
void log_warning(const char *message, void *stream) {
  FILE *write_stream = (FILE *)stream;
  write_time_prefix(write_stream);
  fprintf(write_stream, "warning: %s\n", message);
}


x86 assembly (clang, -O0):
<log_warning>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <write_time_prefix@plt>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xeb0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_warning>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <write_time_prefix@plt>
lea    0xec7(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"warning: %s\0A\00"
define void @log_warning(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to i32*
store i32* %7, i32** %5
%8 = load i32*, i32** %5
%9 = call i32 @write_time_prefix(i32* %8)
%10 = load i32*, i32** %5
%11 = load i8*, i8** %3
%12 = call i32 @fprintf(i32* %10, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %11)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"warning: %s\0A\00"
define void @log_warning(i8* %0, i8* %1) {
%3 = bitcast i8* %1 to i32*
%4 = tail call i32 @write_time_prefix(i32* %3)
%5 = tail call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
float f_min(float a, float b) { return (a < b) ? a : b; }


x86 assembly (clang, -O0):
<f_min>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1130 <f_min+0x30>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    113a <f_min+0x3a>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_min>:
minss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @f_min(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp olt float %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load float, float* %3
br label %12
10: ; preds = %2
%11 = load float, float* %4
br label %12
12: ; preds = %10, %8
%13 = phi float [ %9, %8 ], [ %11, %10 ]
ret float %13
}

LLVM IR (-O2):
define float @f_min(float %0, float %1) {
%3 = fcmp olt float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
void sigpipe_handler(int signo) {}


x86 assembly (clang, -O0):
<sigpipe_handler>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigpipe_handler>:
ret

LLVM IR (-O0):
define void @sigpipe_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret void
}

LLVM IR (-O2):
define void @sigpipe_handler(i32 %0) {
ret void
}
void nop(void) { return; }


x86 assembly (clang, -O0):
<nop>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nop>:
ret

LLVM IR (-O0):
define void @nop() {
ret void
}

LLVM IR (-O2):
define void @nop() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int strStr(char *, char *);
int main() { printf("%d\n", strStr("string", "ring")); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xed9(%rip),%rdi
lea    0xed4(%rip),%rsi
call   1040 <strStr@plt>
mov    %eax,%esi
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xedc(%rip),%rdi
lea    0xed7(%rip),%rsi
call   1040 <strStr@plt>
lea    0xec5(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [7 x i8] c"string\00"
@.str.2 = [5 x i8] c"ring\00"
define i32 @main() {
%1 = call i32 @strStr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [7 x i8] c"string\00"
@.str.2 = [5 x i8] c"ring\00"
define i32 @main() {
%1 = tail call i32 @strStr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int, int);
int main(int argc, char *argv[]) {
  int a = 1;
  int b = 2;
  int c = 3;
  int d = 4;
  int t = a;
  a = b;
  b = c;
  c = d;
  d = t;
  printf("%i, %i, %i, %i\n", a, b, c, d);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
movl   $0x2,-0x18(%rbp)
movl   $0x3,-0x1c(%rbp)
movl   $0x4,-0x20(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    -0x20(%rbp),%r8d
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
mov    $0x1,%r8d
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"%i, %i, %i, %i\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
store i32 1, i32* %5
store i32 2, i32* %6
store i32 3, i32* %7
store i32 4, i32* %8
%10 = load i32, i32* %5
store i32 %10, i32* %9
%11 = load i32, i32* %6
store i32 %11, i32* %5
%12 = load i32, i32* %7
store i32 %12, i32* %6
%13 = load i32, i32* %8
store i32 %13, i32* %7
%14 = load i32, i32* %9
store i32 %14, i32* %8
%15 = load i32, i32* %5
%16 = load i32, i32* %6
%17 = load i32, i32* %7
%18 = load i32, i32* %8
%19 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %15, i32 %16, i32 %17, i32 %18)
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"%i, %i, %i, %i\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 2, i32 3, i32 4, i32 1)
ret i32 0
}
extern int in_8(volatile unsigned char *addr) {
  return ({
    unsigned char __v = (*(volatile unsigned char *)(addr));
    __v;
  });
}


x86 assembly (clang, -O0):
<in_8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<in_8>:
movzbl (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @in_8(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
%4 = alloca i8
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = load volatile i8, i8* %5
store i8 %6, i8* %3
%7 = load i8, i8* %3
store i8 %7, i8* %4
%8 = load i8, i8* %4
%9 = zext i8 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @in_8(i8* %0) {
%2 = load volatile i8, i8* %0
%3 = zext i8 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef scalar_t__ int32_t;

/* Variables and functions */
scalar_t__ floor(double const);
void floor_w_d(const double *source, int32_t *dest) {
  *dest = (int32_t)floor(*source);
}


x86 assembly (clang, -O0):
<floor_w_d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
call   1030 <floor@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<floor_w_d>:
push   %rbx
mov    %rsi,%rbx
movsd  (%rdi),%xmm0
call   1030 <floor@plt>
mov    %rax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @floor_w_d(double* %0, i64* %1) {
%3 = alloca double*
%4 = alloca i64*
store double* %0, double** %3
store i64* %1, i64** %4
%5 = load double*, double** %3
%6 = load double, double* %5
%7 = call i64 @floor(double %6)
%8 = load i64*, i64** %4
store i64 %7, i64* %8
ret void
}

LLVM IR (-O2):
define void @floor_w_d(double* nocapture %0, i64* nocapture writeonly %1) {
%3 = load double, double* %0
%4 = tail call i64 @floor(double %3)
store i64 %4, i64* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("Hello World!\\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Hello World!\\n\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"Hello World!\\n\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int mul_2exp_mod(int n, int p, int m) {
  int i;
  for (i = 0; i < p; i++)
    n = (2 * n) % m;
  return n;
}


x86 assembly (clang, -O0):
<mul_2exp_mod>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    113b <mul_2exp_mod+0x3b>
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x4(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1114 <mul_2exp_mod+0x14>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mul_2exp_mod>:
mov    %edx,%ecx
mov    %edi,%edx
test   %esi,%esi
jle    115c <mul_2exp_mod+0x5c>
lea    -0x1(%rsi),%eax
mov    %esi,%edi
and    $0x3,%edi
cmp    $0x3,%eax
jb     113e <mul_2exp_mod+0x3e>
and    $0xfffffffc,%esi
nopl   0x0(%rax,%rax,1)
add    %edx,%edx
mov    %edx,%eax
cltd
idiv   %ecx
lea    (%rdx,%rdx,1),%eax
cltd
idiv   %ecx
lea    (%rdx,%rdx,1),%eax
cltd
idiv   %ecx
lea    (%rdx,%rdx,1),%eax
cltd
idiv   %ecx
add    $0xfffffffc,%esi
jne    1120 <mul_2exp_mod+0x20>
test   %edi,%edi
je     115c <mul_2exp_mod+0x5c>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    %edx,%edx
mov    %edx,%eax
cltd
idiv   %ecx
add    $0xffffffff,%edi
jne    1150 <mul_2exp_mod+0x50>
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @mul_2exp_mod(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store i32 0, i32* %7
br label %8
8: ; preds = %17, %3
%9 = load i32, i32* %7
%10 = load i32, i32* %5
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %20
12: ; preds = %8
%13 = load i32, i32* %4
%14 = mul nsw i32 2, %13
%15 = load i32, i32* %6
%16 = srem i32 %14, %15
store i32 %16, i32* %4
br label %17
17: ; preds = %12
%18 = load i32, i32* %7
%19 = add nsw i32 %18, 1
store i32 %19, i32* %7
br label %8
20: ; preds = %8
%21 = load i32, i32* %4
ret i32 %21
}

LLVM IR (-O2):
define i32 @mul_2exp_mod(i32 %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %35
5: ; preds = %3
%6 = add i32 %1, -1
%7 = and i32 %1, 3
%8 = icmp ult i32 %6, 3
br i1 %8, label %24, label %9
9: ; preds = %5
%10 = and i32 %1, -4
br label %11
11: ; preds = %11, %9
%12 = phi i32 [ %0, %9 ], [ %21, %11 ]
%13 = phi i32 [ 0, %9 ], [ %22, %11 ]
%14 = shl nsw i32 %12, 1
%15 = srem i32 %14, %2
%16 = shl nsw i32 %15, 1
%17 = srem i32 %16, %2
%18 = shl nsw i32 %17, 1
%19 = srem i32 %18, %2
%20 = shl nsw i32 %19, 1
%21 = srem i32 %20, %2
%22 = add i32 %13, 4
%23 = icmp eq i32 %22, %10
br i1 %23, label %24, label %11
24: ; preds = %11, %5
%25 = phi i32 [ undef, %5 ], [ %21, %11 ]
%26 = phi i32 [ %0, %5 ], [ %21, %11 ]
%27 = icmp eq i32 %7, 0
br i1 %27, label %35, label %28
28: ; preds = %24, %28
%29 = phi i32 [ %32, %28 ], [ %26, %24 ]
%30 = phi i32 [ %33, %28 ], [ 0, %24 ]
%31 = shl nsw i32 %29, 1
%32 = srem i32 %31, %2
%33 = add i32 %30, 1
%34 = icmp eq i32 %33, %7
br i1 %34, label %35, label %28
35: ; preds = %24, %28, %3
%36 = phi i32 [ %0, %3 ], [ %25, %24 ], [ %32, %28 ]
ret i32 %36
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0xee() {
  Assert_real((isdigit(238) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isdigit.c",
              1195, ("isdigit should be 0 for 0xee"));
}


x86 assembly (clang, -O0):
<t_isdigit_0xee>:
push   %rbp
mov    %rsp,%rbp
mov    $0xee,%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x4ab,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isdigit_0xee>:
push   %rax
mov    $0xee,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4ab,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0xee\00"
define void @t_isdigit_0xee() {
%1 = call i64 @isdigit(i32 238)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1195, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0xee\00"
define void @t_isdigit_0xee() {
%1 = tail call i64 @isdigit(i32 238)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1195, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void gp_enumerate_fonts_free(void *enum_state) {}


x86 assembly (clang, -O0):
<gp_enumerate_fonts_free>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<gp_enumerate_fonts_free>:
ret

LLVM IR (-O0):
define void @gp_enumerate_fonts_free(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret void
}

LLVM IR (-O2):
define void @gp_enumerate_fonts_free(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(char const *);
char *strchr(char const *, int);
__attribute__((visibility("default"))) char *trio_index(const char *string,
                                                        int character) {
  assert(string);
  return strchr(string, character);
}


x86 assembly (clang, -O0):
<trio_index>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <strchr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trio_index>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <assert@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <strchr@plt>

LLVM IR (-O0):
define i8* @trio_index(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = call i32 @assert(i8* %5)
%7 = load i8*, i8** %3
%8 = load i32, i32* %4
%9 = call i8* @strchr(i8* %7, i32 %8)
ret i8* %9
}

LLVM IR (-O2):
define i8* @trio_index(i8* %0, i32 %1) {
%3 = tail call i32 @assert(i8* %0)
%4 = tail call i8* @strchr(i8* dereferenceable(1) %0, i32 %1)
ret i8* %4
}
/* Type definitions */
struct timespec {
  int dummy;
};

/* Variables and functions */
long get_timer_nsec(struct timespec *);
long get_timer_diff(struct timespec *before, struct timespec *after) {
  return get_timer_nsec(after) - get_timer_nsec(before);
}


x86 assembly (clang, -O0):
<get_timer_diff>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <get_timer_nsec@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <get_timer_nsec@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
sub    %rcx,%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_timer_diff>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <get_timer_nsec@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1030 <get_timer_nsec@plt>
sub    %rax,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.timespec = type { i32 }
define i64 @get_timer_diff(%struct.timespec* %0, %struct.timespec* %1) {
%3 = alloca %struct.timespec*
%4 = alloca %struct.timespec*
store %struct.timespec* %0, %struct.timespec** %3
store %struct.timespec* %1, %struct.timespec** %4
%5 = load %struct.timespec*, %struct.timespec** %4
%6 = call i64 @get_timer_nsec(%struct.timespec* %5)
%7 = load %struct.timespec*, %struct.timespec** %3
%8 = call i64 @get_timer_nsec(%struct.timespec* %7)
%9 = sub nsw i64 %6, %8
ret i64 %9
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
define i64 @get_timer_diff(%struct.timespec* %0, %struct.timespec* %1) {
%3 = tail call i64 @get_timer_nsec(%struct.timespec* %1)
%4 = tail call i64 @get_timer_nsec(%struct.timespec* %0)
%5 = sub nsw i64 %3, %4
ret i64 %5
}
void render_infobox(char *title, char *message) {}


x86 assembly (clang, -O0):
<render_infobox>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<render_infobox>:
ret

LLVM IR (-O0):
define void @render_infobox(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
define void @render_infobox(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, unsigned char *);
int uchar_to_int(unsigned char);
int main(int argc, char *argv[]) {
  unsigned char c;
  scanf("%c", &c);
  printf("%d\n", uchar_to_int(c));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
lea    -0x11(%rbp),%rsi
call   1050 <scanf@plt>
movzbl -0x11(%rbp),%edi
call   1040 <uchar_to_int@plt>
mov    %eax,%esi
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1050 <scanf@plt>
movzbl 0x7(%rsp),%edi
call   1040 <uchar_to_int@plt>
lea    0xeb0(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i8, i8* %6
%9 = call i32 @uchar_to_int(i8 zeroext %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i8
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i8, i8* %3
%6 = call i32 @uchar_to_int(i8 zeroext %5)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ lll_vfprint(int /*<<< orphan*/, char const *,
                               int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void lll_vprint(const char *template, va_list va_ptr) {
  lll_vfprint(stdout, template, va_ptr);
}


x86 assembly (clang, -O0):
<lll_vprint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <lll_vfprint@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lll_vprint>:
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x2ec4(%rip),%rax
mov    (%rax),%edi
jmp    1030 <lll_vfprint@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @lll_vprint(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stdout
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @lll_vfprint(i32 %5, i8* %6, i32 %7)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @lll_vprint(i8* %0, i32 %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @lll_vfprint(i32 %3, i8* %0, i32 %1)
ret void
}
/* Type definitions */
struct proctal {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ proctal_implementation_deallocate(struct proctal *, void *);
void proctal_deallocate(struct proctal *p, void *address) {
  proctal_implementation_deallocate(p, address);
}


x86 assembly (clang, -O0):
<proctal_deallocate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <proctal_implementation_deallocate@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<proctal_deallocate>:
jmp    1030 <proctal_implementation_deallocate@plt>

LLVM IR (-O0):
%struct.proctal = type { i32 }
define void @proctal_deallocate(%struct.proctal* %0, i8* %1) {
%3 = alloca %struct.proctal*
%4 = alloca i8*
store %struct.proctal* %0, %struct.proctal** %3
store i8* %1, i8** %4
%5 = load %struct.proctal*, %struct.proctal** %3
%6 = load i8*, i8** %4
%7 = call i32 @proctal_implementation_deallocate(%struct.proctal* %5, i8* %6)
ret void
}

LLVM IR (-O2):
%struct.proctal = type { i32 }
define void @proctal_deallocate(%struct.proctal* %0, i8* %1) {
%3 = tail call i32 @proctal_implementation_deallocate(%struct.proctal* %0, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printHomeMenu() {
  printf("Opcoes:\n\n1 - Cadastrar mensagem\n\n2 - Ler mensagens\n\n3 - Sair "
         "da Aplicacao\n\n");
}


x86 assembly (clang, -O0):
<printHomeMenu>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<printHomeMenu>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [76 x i8] c"Opcoes:\0A\0A1 - Cadastrar mensagem\0A\0A2 - Ler mensagens\0A\0A3 - Sair da Aplicacao\0A\0A\00"
define void @printHomeMenu() {
%1 = call i32 @printf(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [75 x i8] c"Opcoes:\0A\0A1 - Cadastrar mensagem\0A\0A2 - Ler mensagens\0A\0A3 - Sair da Aplicacao\0A\00"
define void @printHomeMenu() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([75 x i8], [75 x i8]* @str, i64 0, i64 0))
ret void
}
void gpio_spdif_active(void) {}


x86 assembly (clang, -O0):
<gpio_spdif_active>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gpio_spdif_active>:
ret

LLVM IR (-O0):
define void @gpio_spdif_active() {
ret void
}

LLVM IR (-O2):
define void @gpio_spdif_active() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ HplMsp430InterruptP__Port21__default__fired();
void HplMsp430InterruptP__Port21__fired(void) {
  HplMsp430InterruptP__Port21__default__fired();
}


x86 assembly (clang, -O0):
<HplMsp430InterruptP__Port21__fired>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <HplMsp430InterruptP__Port21__default__fired@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<HplMsp430InterruptP__Port21__fired>:
xor    %eax,%eax
jmp    1030 <HplMsp430InterruptP__Port21__default__fired@plt>

LLVM IR (-O0):
define void @HplMsp430InterruptP__Port21__fired() {
%1 = call i32 (...) @HplMsp430InterruptP__Port21__default__fired()
ret void
}

LLVM IR (-O2):
define void @HplMsp430InterruptP__Port21__fired() {
%1 = tail call i32 (...) @HplMsp430InterruptP__Port21__default__fired()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ init_MakeEmpty_buffer();
int /*<<< orphan*/ init_edge_arr();
int /*<<< orphan*/ init_ring_sw_port_sp();
int /*<<< orphan*/ init_sw_port_speed();
int /*<<< orphan*/ init_vl_delay_arr();
int /*<<< orphan*/ initial_sw_net_two();
int /*<<< orphan*/ initial_sw_number_net();
int /*<<< orphan*/ initial_vl_info();
void init_noa_thr_lvl_opt() {
  initial_vl_info();
  init_vl_delay_arr();
  init_edge_arr();
  init_MakeEmpty_buffer();
  init_ring_sw_port_sp();
  initial_sw_net_two();
  init_sw_port_speed();
  initial_sw_number_net();
}


x86 assembly (clang, -O0):
<init_noa_thr_lvl_opt>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <initial_vl_info@plt>
mov    $0x0,%al
call   1080 <init_vl_delay_arr@plt>
mov    $0x0,%al
call   1090 <init_edge_arr@plt>
mov    $0x0,%al
call   1070 <init_MakeEmpty_buffer@plt>
mov    $0x0,%al
call   10a0 <init_ring_sw_port_sp@plt>
mov    $0x0,%al
call   1060 <initial_sw_net_two@plt>
mov    $0x0,%al
call   1040 <init_sw_port_speed@plt>
mov    $0x0,%al
call   1050 <initial_sw_number_net@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_noa_thr_lvl_opt>:
push   %rax
xor    %eax,%eax
call   1030 <initial_vl_info@plt>
xor    %eax,%eax
call   1080 <init_vl_delay_arr@plt>
xor    %eax,%eax
call   1090 <init_edge_arr@plt>
xor    %eax,%eax
call   1070 <init_MakeEmpty_buffer@plt>
xor    %eax,%eax
call   10a0 <init_ring_sw_port_sp@plt>
xor    %eax,%eax
call   1060 <initial_sw_net_two@plt>
xor    %eax,%eax
call   1040 <init_sw_port_speed@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <initial_sw_number_net@plt>

LLVM IR (-O0):
define void @init_noa_thr_lvl_opt() {
%1 = call i32 (...) @initial_vl_info()
%2 = call i32 (...) @init_vl_delay_arr()
%3 = call i32 (...) @init_edge_arr()
%4 = call i32 (...) @init_MakeEmpty_buffer()
%5 = call i32 (...) @init_ring_sw_port_sp()
%6 = call i32 (...) @initial_sw_net_two()
%7 = call i32 (...) @init_sw_port_speed()
%8 = call i32 (...) @initial_sw_number_net()
ret void
}

LLVM IR (-O2):
define void @init_noa_thr_lvl_opt() {
%1 = tail call i32 (...) @initial_vl_info()
%2 = tail call i32 (...) @init_vl_delay_arr()
%3 = tail call i32 (...) @init_edge_arr()
%4 = tail call i32 (...) @init_MakeEmpty_buffer()
%5 = tail call i32 (...) @init_ring_sw_port_sp()
%6 = tail call i32 (...) @initial_sw_net_two()
%7 = tail call i32 (...) @init_sw_port_speed()
%8 = tail call i32 (...) @initial_sw_number_net()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ shutdown_cleanup();
void handle_quit_signal(int num) {
  (void)num;
  shutdown_cleanup();
  exit(1);
}


x86 assembly (clang, -O0):
<handle_quit_signal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <shutdown_cleanup@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<handle_quit_signal>:
push   %rax
xor    %eax,%eax
call   1030 <shutdown_cleanup@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @handle_quit_signal(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (...) @shutdown_cleanup()
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @handle_quit_signal(i32 %0) {
%2 = tail call i32 (...) @shutdown_cleanup()
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ subgroupBarrier();
void main() { subgroupBarrier(); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <subgroupBarrier@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
xor    %eax,%eax
jmp    1030 <subgroupBarrier@plt>

LLVM IR (-O0):
define void @main() {
%1 = call i32 (...) @subgroupBarrier()
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @subgroupBarrier()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ foo(int, int);
int main(void) {
  foo(10, 100);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xa,%edi
mov    $0x64,%esi
call   1030 <foo@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xa,%edi
mov    $0x64,%esi
call   1030 <foo@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @foo(i32 10, i32 100)
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 10, i32 100)
%2 = tail call i32 @exit(i32 0)
unreachable
}
int config_shadow_base_read(void) { return 2147483648; }


x86 assembly (clang, -O0):
<config_shadow_base_read>:
push   %rbp
mov    %rsp,%rbp
mov    $0x80000000,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<config_shadow_base_read>:
mov    $0x80000000,%eax
ret

LLVM IR (-O0):
define i32 @config_shadow_base_read() {
ret i32 -2147483648
}

LLVM IR (-O2):
define i32 @config_shadow_base_read() {
ret i32 -2147483648
}
/* Variables and functions */
int /*<<< orphan*/ _dl_hwcaps_subdirs_build_bitmask(int, int);
int /*<<< orphan*/ f1(int /*<<< orphan*/);
void f2(void) {
  f1(_dl_hwcaps_subdirs_build_bitmask(1, 2));
  f1(_dl_hwcaps_subdirs_build_bitmask(33, 31));
}


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
mov    $0x2,%esi
call   1030 <_dl_hwcaps_subdirs_build_bitmask@plt>
mov    %eax,%edi
call   1040 <f1@plt>
mov    $0x21,%edi
mov    $0x1f,%esi
call   1030 <_dl_hwcaps_subdirs_build_bitmask@plt>
mov    %eax,%edi
call   1040 <f1@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
push   %rax
mov    $0x1,%edi
mov    $0x2,%esi
call   1030 <_dl_hwcaps_subdirs_build_bitmask@plt>
mov    %eax,%edi
call   1040 <f1@plt>
mov    $0x21,%edi
mov    $0x1f,%esi
call   1030 <_dl_hwcaps_subdirs_build_bitmask@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <f1@plt>

LLVM IR (-O0):
define void @f2() {
%1 = call i32 @_dl_hwcaps_subdirs_build_bitmask(i32 1, i32 2)
%2 = call i32 @f1(i32 %1)
%3 = call i32 @_dl_hwcaps_subdirs_build_bitmask(i32 33, i32 31)
%4 = call i32 @f1(i32 %3)
ret void
}

LLVM IR (-O2):
define void @f2() {
%1 = tail call i32 @_dl_hwcaps_subdirs_build_bitmask(i32 1, i32 2)
%2 = tail call i32 @f1(i32 %1)
%3 = tail call i32 @_dl_hwcaps_subdirs_build_bitmask(i32 33, i32 31)
%4 = tail call i32 @f1(i32 %3)
ret void
}
void glProgramUniform2f(void) { return; }


x86 assembly (clang, -O0):
<glProgramUniform2f>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glProgramUniform2f>:
ret

LLVM IR (-O0):
define void @glProgramUniform2f() {
ret void
}

LLVM IR (-O2):
define void @glProgramUniform2f() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void **);
void dealloca_matrice_generica(void **M, size_t row) {
  size_t i;
  if (M) {
    for (i = 0; i < row; ++i) {
      free(M[i]);
    }
    free(M);
  }
}


x86 assembly (clang, -O0):
<dealloca_matrice_generica>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     116c <dealloca_matrice_generica+0x5c>
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1163 <dealloca_matrice_generica+0x53>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1133 <dealloca_matrice_generica+0x23>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dealloca_matrice_generica>:
test   %rdi,%rdi
je     114f <dealloca_matrice_generica+0x3f>
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
test   %rsi,%rsi
je     1142 <dealloca_matrice_generica+0x32>
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
mov    (%r15,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1130 <dealloca_matrice_generica+0x20>
mov    %r15,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @dealloca_matrice_generica(i8** %0, i64 %1) {
%3 = alloca i8**
%4 = alloca i64
%5 = alloca i64
store i8** %0, i8*** %3
store i64 %1, i64* %4
%6 = load i8**, i8*** %3
%7 = icmp ne i8** %6, null
br i1 %7, label %8, label %26
8: ; preds = %2
store i64 0, i64* %5
br label %9
9: ; preds = %20, %8
%10 = load i64, i64* %5
%11 = load i64, i64* %4
%12 = icmp ult i64 %10, %11
br i1 %12, label %13, label %23
13: ; preds = %9
%14 = load i8**, i8*** %3
%15 = load i64, i64* %5
%16 = getelementptr inbounds i8*, i8** %14, i64 %15
%17 = load i8*, i8** %16
%18 = bitcast i8* %17 to i8**
%19 = call i32 @free(i8** %18)
br label %20
20: ; preds = %13
%21 = load i64, i64* %5
%22 = add i64 %21, 1
store i64 %22, i64* %5
br label %9
23: ; preds = %9
%24 = load i8**, i8*** %3
%25 = call i32 @free(i8** %24)
br label %26
26: ; preds = %23, %2
ret void
}

LLVM IR (-O2):
define void @dealloca_matrice_generica(i8** %0, i64 %1) {
%3 = icmp eq i8** %0, null
br i1 %3, label %16, label %4
4: ; preds = %2
%5 = icmp eq i64 %1, 0
br i1 %5, label %14, label %6
6: ; preds = %4, %6
%7 = phi i64 [ %12, %6 ], [ 0, %4 ]
%8 = getelementptr inbounds i8*, i8** %0, i64 %7
%9 = bitcast i8** %8 to i8***
%10 = load i8**, i8*** %9
%11 = tail call i32 @free(i8** %10)
%12 = add nuw i64 %7, 1
%13 = icmp eq i64 %12, %1
br i1 %13, label %14, label %6
14: ; preds = %6, %4
%15 = tail call i32 @free(i8** %0)
br label %16
16: ; preds = %14, %2
ret void
}