xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0x3c() {
  Assert_real((isxdigit(60) == 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_isxdigit.c",
              305, ("isxdigit should be 0 for <"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0x3c>:
push   %rax
mov    $0x3c,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x131,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [27 x i8] c"isxdigit should be 0 for <\00"
define void @t_isxdigit_0x3c() {
%1 = call i64 @isxdigit(i32 60)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 305, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [27 x i8] c"isxdigit should be 0 for <\00"
define void @t_isxdigit_0x3c() {
%1 = tail call i64 @isxdigit(i32 60)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 305, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ flip4(unsigned int const *, unsigned int *, int);
int read(int, int *, int);
int read_int4_array(int f, int *iarray, int n) {
  int nread = read(f, iarray, 4 * n);
  if (nread <= 0)
    return 0;
  flip4((const unsigned int *)iarray, (unsigned int *)iarray, nread / 4);
  return nread / 4;
}


x86 assembly (clang, -O0):
<read_int4_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
shl    $0x2,%edx
call   1030 <read@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jg     115d <read_int4_array+0x3d>
movl   $0x0,-0x4(%rbp)
jmp    1185 <read_int4_array+0x65>
mov    -0x10(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,%edx
call   1040 <flip4@plt>
mov    -0x18(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_int4_array>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
shl    $0x2,%edx
call   1030 <read@plt>
test   %eax,%eax
jle    1146 <read_int4_array+0x26>
mov    %eax,%ebp
shr    $0x2,%ebp
mov    %rbx,%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
call   1040 <flip4@plt>
jmp    1148 <read_int4_array+0x28>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @read_int4_array(i32 %0, i32* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32* %1, i32** %6
store i32 %2, i32* %7
%9 = load i32, i32* %5
%10 = load i32*, i32** %6
%11 = load i32, i32* %7
%12 = mul nsw i32 4, %11
%13 = call i32 @read(i32 %9, i32* %10, i32 %12)
store i32 %13, i32* %8
%14 = load i32, i32* %8
%15 = icmp sle i32 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %3
store i32 0, i32* %4
br label %25
17: ; preds = %3
%18 = load i32*, i32** %6
%19 = load i32*, i32** %6
%20 = load i32, i32* %8
%21 = sdiv i32 %20, 4
%22 = call i32 @flip4(i32* %18, i32* %19, i32 %21)
%23 = load i32, i32* %8
%24 = sdiv i32 %23, 4
store i32 %24, i32* %4
br label %25
25: ; preds = %17, %16
%26 = load i32, i32* %4
ret i32 %26
}

LLVM IR (-O2):
define i32 @read_int4_array(i32 %0, i32* %1, i32 %2) {
%4 = shl nsw i32 %2, 2
%5 = tail call i32 @read(i32 %0, i32* %1, i32 %4)
%6 = icmp slt i32 %5, 1
br i1 %6, label %10, label %7
7: ; preds = %3
%8 = lshr i32 %5, 2
%9 = tail call i32 @flip4(i32* %1, i32* %1, i32 %8)
br label %10
10: ; preds = %3, %7
%11 = phi i32 [ %8, %7 ], [ 0, %3 ]
ret i32 %11
}
/* Variables and functions */
float pow(float const, double);
float inv_gamma_srgb(const float v) {
  if (v <= 0.04045) {
    return v / 12.92;
  } else {
    return pow(((v + 0.055) / (1.055)), 2.4);
  }
}


x86 assembly (clang, -O0):
<inv_gamma_srgb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xed2(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     115b <inv_gamma_srgb+0x4b>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xed7(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1192 <inv_gamma_srgb+0x82>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeac(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xe98(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movsd  0xe80(%rip),%xmm1
call   1030 <pow@plt>
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inv_gamma_srgb>:
cvtss2sd %xmm0,%xmm0
movsd  0xee4(%rip),%xmm1
ucomisd %xmm0,%xmm1
jae    1143 <inv_gamma_srgb+0x33>
addsd  0xee6(%rip),%xmm0
divsd  0xee6(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movsd  0xee2(%rip),%xmm1
jmp    1030 <pow@plt>
divsd  0xebd(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @inv_gamma_srgb(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = fpext float %4 to double
%6 = fcmp ole double %5, 4.045000e-02
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load float, float* %3
%9 = fpext float %8 to double
%10 = fdiv double %9, 1.292000e+01
%11 = fptrunc double %10 to float
store float %11, float* %2
br label %19
12: ; preds = %1
%13 = load float, float* %3
%14 = fpext float %13 to double
%15 = fadd double %14, 5.500000e-02
%16 = fdiv double %15, 1.055000e+00
%17 = fptrunc double %16 to float
%18 = call float @pow(float %17, double 2.400000e+00)
store float %18, float* %2
br label %19
19: ; preds = %12, %7
%20 = load float, float* %2
ret float %20
}

LLVM IR (-O2):
define float @inv_gamma_srgb(float %0) {
%2 = fpext float %0 to double
%3 = fcmp ugt double %2, 4.045000e-02
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = fdiv double %2, 1.292000e+01
%6 = fptrunc double %5 to float
br label %12
7: ; preds = %1
%8 = fadd double %2, 5.500000e-02
%9 = fdiv double %8, 1.055000e+00
%10 = fptrunc double %9 to float
%11 = tail call float @pow(float %10, double 2.400000e+00)
br label %12
12: ; preds = %7, %4
%13 = phi float [ %6, %4 ], [ %11, %7 ]
ret float %13
}
/* Variables and functions */
scalar_t__ fread(float *, int, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stdin;
int main() {
  float x;
  while (fread(&x, sizeof(float), 1, stdin) != 0) {
    printf("%g ", x);
  }
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%ecx
lea    -0x8(%rbp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
cmp    $0x0,%rax
je     1171 <main+0x51>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe9b(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
jmp    112f <main+0xf>
lea    0xe8c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    0x2ea8(%rip),%r15
mov    (%r15),%ecx
lea    0xc(%rsp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1040 <fread@plt>
test   %rax,%rax
je     119e <main+0x6e>
lea    0xe9d(%rip),%r14
lea    0xc(%rsp),%rbx
nopl   0x0(%rax,%rax,1)
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    (%r15),%ecx
mov    %rbx,%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1040 <fread@plt>
test   %rax,%rax
jne    1170 <main+0x40>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@stdin = global i32 0
@.str = [4 x i8] c"%g \00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
br label %3
3: ; preds = %7, %0
%4 = load i32, i32* @stdin
%5 = call i64 @fread(float* %2, i32 4, i32 1, i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %3
%8 = load float, float* %2
%9 = fpext float %8 to double
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %9)
br label %3
11: ; preds = %3
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
@.str = [4 x i8] c"%g \00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = load i32, i32* @stdin
%4 = call i64 @fread(float* %1, i32 4, i32 1, i32 %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %13, label %6
6: ; preds = %0, %6
%7 = load float, float* %1
%8 = fpext float %7 to double
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %8)
%10 = load i32, i32* @stdin
%11 = call i64 @fread(float* %1, i32 4, i32 1, i32 %10)
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %6
13: ; preds = %6, %0
%14 = call i32 @putchar(i32 10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ perror(char *);
int pipe(int *);
int create_pipe() {
  int fd[2];
  int ret;
  ret = pipe(fd);
  if (ret < 0) {
    perror("create pipe fail");
    return -1;
  }
}


x86 assembly (clang, -O0):
<create_pipe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0xc(%rbp),%rdi
call   1030 <pipe@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jge    1151 <create_pipe+0x31>
lea    0xebb(%rip),%rdi
call   1040 <perror@plt>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_pipe>:
push   %rax
mov    %rsp,%rdi
call   1030 <pipe@plt>
test   %eax,%eax
js     1134 <create_pipe+0x14>
mov    $0xffffffff,%eax
pop    %rcx
ret
lea    0xec5(%rip),%rdi
call   1040 <perror@plt>
jmp    112d <create_pipe+0xd>

LLVM IR (-O0):
@.str = [17 x i8] c"create pipe fail\00"
define i32 @create_pipe() {
%1 = alloca i32
%2 = alloca [2 x i32]
%3 = alloca i32
%4 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 0
%5 = call i32 @pipe(i32* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 @perror(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %1
br label %10
10: ; preds = %8, %0
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
@.str = [17 x i8] c"create pipe fail\00"
define i32 @create_pipe() {
%1 = alloca [2 x i32]
%2 = bitcast [2 x i32]* %1 to i8*
%3 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 0
%4 = call i32 @pipe(i32* %3)
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @perror(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %0, %6
ret i32 -1
}
/* Variables and functions */
int __builtin_rx_round(float);
int rxround(float arg) { return __builtin_rx_round(arg); }


x86 assembly (clang, -O0):
<rxround>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <__builtin_rx_round@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rxround>:
jmp    1030 <__builtin_rx_round@plt>

LLVM IR (-O0):
define i32 @rxround(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i32 @__builtin_rx_round(float %3)
ret i32 %4
}

LLVM IR (-O2):
define i32 @rxround(float %0) {
%2 = tail call i32 @__builtin_rx_round(float %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ PutLitStr(char *);
int /*<<< orphan*/ RTFRouteToken();
int /*<<< orphan*/ SkipFieldResult();
int /*<<< orphan*/ emitBookmark();
void ReadPageRefField(void) {
  PutLitStr("\\pageref{");
  emitBookmark();
  PutLitStr("}");
  RTFRouteToken();
  SkipFieldResult();
}


x86 assembly (clang, -O0):
<ReadPageRefField>:
push   %rbp
mov    %rsp,%rbp
lea    0xeb5(%rip),%rdi
call   1040 <PutLitStr@plt>
mov    $0x0,%al
call   1060 <emitBookmark@plt>
lea    0xeac(%rip),%rdi
call   1040 <PutLitStr@plt>
mov    $0x0,%al
call   1050 <RTFRouteToken@plt>
mov    $0x0,%al
call   1030 <SkipFieldResult@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReadPageRefField>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1040 <PutLitStr@plt>
xor    %eax,%eax
call   1060 <emitBookmark@plt>
lea    0xeaf(%rip),%rdi
call   1040 <PutLitStr@plt>
xor    %eax,%eax
call   1050 <RTFRouteToken@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <SkipFieldResult@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"\\pageref{\00"
@.str.1 = [2 x i8] c"}\00"
define void @ReadPageRefField() {
%1 = call i32 @PutLitStr(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @emitBookmark()
%3 = call i32 @PutLitStr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 (...) @RTFRouteToken()
%5 = call i32 (...) @SkipFieldResult()
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"\\pageref{\00"
@.str.1 = [2 x i8] c"}\00"
define void @ReadPageRefField() {
%1 = tail call i32 @PutLitStr(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @emitBookmark()
%3 = tail call i32 @PutLitStr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 (...) @RTFRouteToken()
%5 = tail call i32 (...) @SkipFieldResult()
ret void
}
/* Variables and functions */
int strlen(char *);
int /*<<< orphan*/ strncpy(char *, char *, int);
void strncpy_truncate(char *y) {
  char x[4];
  if (strlen(y) == 4)
    strncpy(x, y, 3);
}


x86 assembly (clang, -O0):
<strncpy_truncate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
cmp    $0x4,%eax
jne    1150 <strncpy_truncate+0x30>
lea    -0xc(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x3,%edx
call   1030 <strncpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncpy_truncate>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
call   1040 <strlen@plt>
cmp    $0x4,%eax
jne    1144 <strncpy_truncate+0x24>
lea    0xc(%rsp),%rdi
mov    %rbx,%rsi
mov    $0x3,%edx
call   1030 <strncpy@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @strncpy_truncate(i8* %0) {
%2 = alloca i8*
%3 = alloca [4 x i8]
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = icmp eq i32 %5, 4
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%9 = load i8*, i8** %2
%10 = call i32 @strncpy(i8* %8, i8* %9, i32 3)
br label %11
11: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
define void @strncpy_truncate(i8* %0) {
%2 = alloca [4 x i8]
%3 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%4 = tail call i32 @strlen(i8* %0)
%5 = icmp eq i32 %4, 4
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @strncpy(i8* %3, i8* %0, i32 3)
br label %8
8: ; preds = %6, %1
ret void
}
void foo_2_2_1_2_2_1_2_2_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_2_1_2_2_1_2_2_1() {
ret void
}
/* Type definitions */
struct rtattr {
  int dummy;
};
struct qdisc_util {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int csz_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt) {
  return -1;
}


x86 assembly (clang, -O0):
<csz_print_opt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.qdisc_util = type { i32 }
%struct.rtattr = type { i32 }
define i32 @csz_print_opt(%struct.qdisc_util* %0, i32* %1, %struct.rtattr* %2) {
%4 = alloca %struct.qdisc_util*
%5 = alloca i32*
%6 = alloca %struct.rtattr*
store %struct.qdisc_util* %0, %struct.qdisc_util** %4
store i32* %1, i32** %5
store %struct.rtattr* %2, %struct.rtattr** %6
ret i32 -1
}

LLVM IR (-O2):
%struct.qdisc_util = type { i32 }
%struct.rtattr = type { i32 }
define i32 @csz_print_opt(%struct.qdisc_util* nocapture readnone %0, i32* nocapture readnone %1, %struct.rtattr* nocapture readnone %2) {
ret i32 -1
}
/* Variables and functions */
double sqrt(double);
double distance(double x1, double y1, double x2, double y2) {
  double dx = x2 - x1;
  double dy = y2 - y1;
  return sqrt(dx * dx + dy * dy);
}


x86 assembly (clang, -O0):
<distance>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm1
mulsd  -0x30(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<distance>:
subsd  %xmm0,%xmm2
subsd  %xmm1,%xmm3
mulsd  %xmm3,%xmm3
mulsd  %xmm2,%xmm2
addsd  %xmm3,%xmm2
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm2
jb     1136 <distance+0x26>
xorps  %xmm0,%xmm0
sqrtsd %xmm2,%xmm0
ret
movapd %xmm2,%xmm0
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define double @distance(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%11 = load double, double* %7
%12 = load double, double* %5
%13 = fsub double %11, %12
store double %13, double* %9
%14 = load double, double* %8
%15 = load double, double* %6
%16 = fsub double %14, %15
store double %16, double* %10
%17 = load double, double* %9
%18 = load double, double* %9
%19 = load double, double* %10
%20 = load double, double* %10
%21 = fmul double %19, %20
%22 = call double @llvm.fmuladd.f64(double %17, double %18, double %21)
%23 = call double @sqrt(double %22)
ret double %23
}

LLVM IR (-O2):
define double @distance(double %0, double %1, double %2, double %3) {
%5 = fsub double %2, %0
%6 = fsub double %3, %1
%7 = fmul double %6, %6
%8 = tail call double @llvm.fmuladd.f64(double %5, double %5, double %7)
%9 = tail call double @sqrt(double %8)
ret double %9
}
/* Variables and functions */
int /*<<< orphan*/ operation_sleep();
void operation_sleep_notimer(void) { operation_sleep(); }


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

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

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

LLVM IR (-O2):
define void @operation_sleep_notimer() {
%1 = tail call i32 (...) @operation_sleep()
ret void
}
/* Variables and functions */
int detectPresence(char *);
int pactlPresent() {
  static int lPactlPresent = -1;
  if (lPactlPresent < 0) {
    lPactlPresent = detectPresence("pactl");
  }
  return lPactlPresent;
}


x86 assembly (clang, -O0):
<pactlPresent>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,0x2f0d(%rip)
jge    1133 <pactlPresent+0x23>
lea    0xed8(%rip),%rdi
call   1030 <detectPresence@plt>
mov    %eax,0x2ef5(%rip)
mov    0x2eef(%rip),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pactlPresent>:
push   %rax
mov    0x2f11(%rip),%eax
test   %eax,%eax
js     111d <pactlPresent+0xd>
pop    %rcx
ret
lea    0xedc(%rip),%rdi
call   1030 <detectPresence@plt>
mov    %eax,0x2ef9(%rip)
pop    %rcx
ret

LLVM IR (-O0):
@pactlPresent.lPactlPresent = internal global i32 -1
@.str = [6 x i8] c"pactl\00"
define i32 @pactlPresent() {
%1 = load i32, i32* @pactlPresent.lPactlPresent
%2 = icmp slt i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @detectPresence(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
store i32 %4, i32* @pactlPresent.lPactlPresent
br label %5
5: ; preds = %3, %0
%6 = load i32, i32* @pactlPresent.lPactlPresent
ret i32 %6
}

LLVM IR (-O2):
@pactlPresent.lPactlPresent = internal unnamed_addr global i32 -1
@.str = [6 x i8] c"pactl\00"
define i32 @pactlPresent() {
%1 = load i32, i32* @pactlPresent.lPactlPresent
%2 = icmp slt i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @detectPresence(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
store i32 %4, i32* @pactlPresent.lPactlPresent
br label %5
5: ; preds = %3, %0
%6 = phi i32 [ %4, %3 ], [ %1, %0 ]
ret i32 %6
}
void gdi_font_end(void) {}


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

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

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

LLVM IR (-O2):
define void @gdi_font_end() {
ret void
}
int cmpfunc(const void *a, const void *b) {
  long long fa = *(long *)a;
  long long fb = *(long *)b;
  return ((fa > fb) - (fa < fb));
}


x86 assembly (clang, -O0):
<cmpfunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
setg   %al
and    $0x1,%al
movzbl %al,%eax
mov    -0x18(%rbp),%rcx
cmp    -0x20(%rbp),%rcx
setl   %cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmpfunc>:
mov    (%rdi),%rcx
xor    %eax,%eax
xor    %edx,%edx
cmp    (%rsi),%rcx
setg   %al
setl   %dl
sub    %edx,%eax
ret

LLVM IR (-O0):
define i32 @cmpfunc(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i64*
%9 = load i64, i64* %8
store i64 %9, i64* %5
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i64*
%12 = load i64, i64* %11
store i64 %12, i64* %6
%13 = load i64, i64* %5
%14 = load i64, i64* %6
%15 = icmp sgt i64 %13, %14
%16 = zext i1 %15 to i32
%17 = load i64, i64* %5
%18 = load i64, i64* %6
%19 = icmp slt i64 %17, %18
%20 = zext i1 %19 to i32
%21 = sub nsw i32 %16, %20
ret i32 %21
}

LLVM IR (-O2):
define i32 @cmpfunc(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = icmp sgt i64 %4, %6
%8 = zext i1 %7 to i32
%9 = icmp slt i64 %4, %6
%10 = sext i1 %9 to i32
%11 = add nsw i32 %10, %8
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_strlist_parse() {
  printf("NOT IMPLEMENTED:"
         "pa_strlist_parse"
         "\n");
}


x86 assembly (clang, -O0):
<pa_strlist_parse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [34 x i8] c"NOT IMPLEMENTED:pa_strlist_parse\0A\00"
define i32 @pa_strlist_parse() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [33 x i8] c"NOT IMPLEMENTED:pa_strlist_parse\00"
define i32 @pa_strlist_parse() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
int divisors(int n) {
  int d = 0;
  for (int i = 1; i * i < n; i++) {
    if (n % i == 0)
      d++;
  }
  return 2 * d;
}


x86 assembly (clang, -O0):
<divisors>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1151 <divisors+0x51>
mov    -0x4(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    113e <divisors+0x3e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1143 <divisors+0x43>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1115 <divisors+0x15>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<divisors>:
xor    %ecx,%ecx
cmp    $0x2,%edi
jl     1129 <divisors+0x29>
xor    %ecx,%ecx
mov    $0x1,%esi
xchg   %ax,%ax
mov    %edi,%eax
cltd
idiv   %esi
cmp    $0x1,%edx
adc    $0x0,%ecx
add    $0x1,%esi
mov    %esi,%eax
imul   %esi,%eax
cmp    %edi,%eax
jl     1110 <divisors+0x10>
add    %ecx,%ecx
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @divisors(i32 %0) {
%2 = icmp sgt i32 %0, 1
br i1 %2, label %7, label %5
3: ; preds = %7
%4 = shl nuw i32 %13, 1
br label %5
5: ; preds = %3, %1
%6 = phi i32 [ 0, %1 ], [ %4, %3 ]
ret i32 %6
7: ; preds = %1, %7
%8 = phi i32 [ %14, %7 ], [ 1, %1 ]
%9 = phi i32 [ %13, %7 ], [ 0, %1 ]
%10 = srem i32 %0, %8
%11 = icmp eq i32 %10, 0
%12 = zext i1 %11 to i32
%13 = add nuw nsw i32 %9, %12
%14 = add nuw nsw i32 %8, 1
%15 = mul nsw i32 %14, %14
%16 = icmp slt i32 %15, %0
br i1 %16, label %7, label %3
}
void outb(unsigned short port, unsigned char byte) {
  __asm__("outb %0,%1" ::"a"(byte), "d"(port));
  __asm__("jmp 1f\n\t1:jmp 1f\n\t1:");
  return;
}


x86 assembly (clang, -O0):
<outb>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
mov    -0x2(%rbp),%dx
out    %al,(%dx)
jmp    111e <outb+0x1e>
jmp    1123 <outb+0x23>
pop    %rbp
ret

x86 assembly (clang, -O2):
<outb>:
mov    %esi,%eax
mov    %edi,%edx
out    %al,(%dx)
jmp    1107 <outb+0x7>
jmp    1109 <outb+0x9>
ret

LLVM IR (-O0):
define void @outb(i16 zeroext %0, i8 zeroext %1) {
%3 = alloca i16
%4 = alloca i8
store i16 %0, i16* %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = load i16, i16* %3
ret void
}

LLVM IR (-O2):
define void @outb(i16 zeroext %0, i8 zeroext %1) {
tail call void asm sideeffect "outb $0,$1", "{ax},{dx},~{dirflag},~{fpsr},~{flags}"(i8 %1, i16 %0)
tail call void asm sideeffect "jmp 1f\0A\091:jmp 1f\0A\091:", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void myhandler(int signo __attribute__((unused))) {
  printf("SIGUSR1 called. Inside handler\n");
}


x86 assembly (clang, -O0):
<myhandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [32 x i8] c"SIGUSR1 called. Inside handler\0A\00"
define void @myhandler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [31 x i8] c"SIGUSR1 called. Inside handler\00"
define void @myhandler(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ palla_getpass(char *, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stdout;
int main(void) {
  char dest[10];
  printf("password: ");
  fflush(stdout);
  palla_getpass(dest, 10);
  printf("'%s'\n", dest);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
lea    -0xe(%rbp),%rdi
mov    $0xa,%esi
call   1050 <palla_getpass@plt>
lea    -0xe(%rbp),%rsi
lea    0xe97(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
lea    0x6(%rsp),%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
call   1050 <palla_getpass@plt>
lea    0xea1(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"password: \00"
@stdout = global i32 0
@.str.1 = [6 x i8] c"'%s'\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i8]
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stdout
%5 = call i32 @fflush(i32 %4)
%6 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%7 = call i32 @palla_getpass(i8* %6, i32 10)
%8 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"password: \00"
@stdout = global i32 0
@.str.1 = [6 x i8] c"'%s'\0A\00"
define i32 @main() {
%1 = alloca [10 x i8]
%2 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stdout
%5 = tail call i32 @fflush(i32 %4)
%6 = call i32 @palla_getpass(i8* %2, i32 10)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char *, unsigned int);
void f3(int size) {
  char src[12] = "helloworld";
  char dest[12];
  if (size < 0)
    memcpy(dest, src, (unsigned)size);
}


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xedc(%rip),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1149 <f3+0x39>
lea    -0x1c(%rbp),%rdi
lea    -0x10(%rbp),%rsi
mov    -0x4(%rbp),%edx
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3>:
sub    $0x18,%rsp
movabs $0x726f776f6c6c6568,%rax
77 6f 72
mov    %rax,(%rsp)
movl   $0x646c,0x8(%rsp)
test   %edi,%edi
js     1133 <f3+0x23>
add    $0x18,%rsp
ret
mov    %edi,%edx
lea    0xc(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <memcpy@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.f3.src = [12 x i8] c"helloworld\00\00"
define void @f3(i32 %0) {
%2 = alloca i32
%3 = alloca [12 x i8]
%4 = alloca [12 x i8]
store i32 %0, i32* %2
%5 = bitcast [12 x i8]* %3 to i8*
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %1
%9 = getelementptr inbounds [12 x i8], [12 x i8]* %4, i64 0, i64 0
%10 = getelementptr inbounds [12 x i8], [12 x i8]* %3, i64 0, i64 0
%11 = load i32, i32* %2
%12 = call i32 @memcpy(i8* %9, i8* %10, i32 %11)
br label %13
13: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
@__const.f3.src = [12 x i8] c"helloworld\00\00"
define void @f3(i32 %0) {
%2 = alloca [12 x i8]
%3 = alloca [12 x i8]
%4 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 0
%5 = getelementptr inbounds [12 x i8], [12 x i8]* %3, i64 0, i64 0
%6 = icmp slt i32 %0, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @memcpy(i8* %5, i8* %4, i32 %0)
br label %9
9: ; preds = %7, %1
ret void
}
void imv_console_write(struct imv_console *console, const char *text) {
  (void)console;
  (void)text;
}


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

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

LLVM IR (-O0):
%struct.imv_console = type opaque
define void @imv_console_write(%struct.imv_console* %0, i8* %1) {
%3 = alloca %struct.imv_console*
%4 = alloca i8*
store %struct.imv_console* %0, %struct.imv_console** %3
store i8* %1, i8** %4
%5 = load %struct.imv_console*, %struct.imv_console** %3
%6 = load i8*, i8** %4
ret void
}

LLVM IR (-O2):
%struct.imv_console = type opaque
define void @imv_console_write(%struct.imv_console* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ put_byte(int, int);
__attribute__((always_)) void patch_CAS_3_0_1_1753_extra(void) {
  put_byte(0x100791A3, 0xEA);
}


x86 assembly (clang, -O0):
<patch_CAS_3_0_1_1753_extra>:
push   %rbp
mov    %rsp,%rbp
mov    $0x100791a3,%edi
mov    $0xea,%esi
call   1030 <put_byte@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<patch_CAS_3_0_1_1753_extra>:
mov    $0x100791a3,%edi
mov    $0xea,%esi
jmp    1030 <put_byte@plt>

LLVM IR (-O0):
define void @patch_CAS_3_0_1_1753_extra() {
%1 = call i32 @put_byte(i32 268931491, i32 234)
ret void
}

LLVM IR (-O2):
define void @patch_CAS_3_0_1_1753_extra() {
%1 = tail call i32 @put_byte(i32 268931491, i32 234)
ret void
}
void gtk_notebook_page_num() {}


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

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

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

LLVM IR (-O2):
define void @gtk_notebook_page_num() {
ret void
}
/* Variables and functions */
scalar_t__ geom2d_iszero(double);
void *geom2d_signtest(double diff, void *a, void *b) {
  if (geom2d_iszero(diff))
    return a > b ? a : b;
  else if (diff < 0)
    return a;
  else
    return b;
}


x86 assembly (clang, -O0):
<geom2d_signtest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <geom2d_iszero@plt>
cmp    $0x0,%rax
je     1169 <geom2d_signtest+0x59>
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
jbe    1154 <geom2d_signtest+0x44>
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    115c <geom2d_signtest+0x4c>
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    118c <geom2d_signtest+0x7c>
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1184 <geom2d_signtest+0x74>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    118c <geom2d_signtest+0x7c>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<geom2d_signtest>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
movsd  %xmm0,(%rsp)
call   1030 <geom2d_iszero@plt>
cmp    %rbx,%r14
mov    %rbx,%rcx
cmova  %r14,%rcx
xorpd  %xmm0,%xmm0
ucomisd (%rsp),%xmm0
cmova  %r14,%rbx
test   %rax,%rax
cmovne %rcx,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @geom2d_signtest(double %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca double
%6 = alloca i8*
%7 = alloca i8*
store double %0, double* %5
store i8* %1, i8** %6
store i8* %2, i8** %7
%8 = load double, double* %5
%9 = call i64 @geom2d_iszero(double %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %21
11: ; preds = %3
%12 = load i8*, i8** %6
%13 = load i8*, i8** %7
%14 = icmp ugt i8* %12, %13
br i1 %14, label %15, label %17
15: ; preds = %11
%16 = load i8*, i8** %6
br label %19
17: ; preds = %11
%18 = load i8*, i8** %7
br label %19
19: ; preds = %17, %15
%20 = phi i8* [ %16, %15 ], [ %18, %17 ]
store i8* %20, i8** %4
br label %28
21: ; preds = %3
%22 = load double, double* %5
%23 = fcmp olt double %22, 0.000000e+00
br i1 %23, label %24, label %26
24: ; preds = %21
%25 = load i8*, i8** %6
store i8* %25, i8** %4
br label %28
26: ; preds = %21
%27 = load i8*, i8** %7
store i8* %27, i8** %4
br label %28
28: ; preds = %26, %24, %19
%29 = load i8*, i8** %4
ret i8* %29
}

LLVM IR (-O2):
define i8* @geom2d_signtest(double %0, i8* readnone %1, i8* readnone %2) {
%4 = tail call i64 @geom2d_iszero(double %0)
%5 = icmp eq i64 %4, 0
%6 = icmp ugt i8* %1, %2
%7 = select i1 %6, i8* %1, i8* %2
%8 = fcmp olt double %0, 0.000000e+00
%9 = select i1 %8, i8* %1, i8* %2
%10 = select i1 %5, i8* %9, i8* %7
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0x06() {
  Assert_real((isgraph(6) == 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_isgraph.c",
              35, ("isgraph should be 0 for 0x06"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0x06>:
push   %rax
mov    $0x6,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x23,%edx
pop    %rax
jmp    1030 <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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0x06\00"
define void @t_isgraph_0x06() {
%1 = call i64 @isgraph(i32 6)
%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 35, 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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0x06\00"
define void @t_isgraph_0x06() {
%1 = tail call i64 @isgraph(i32 6)
%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 35, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void pusage(void) {
  fprintf(stderr, "ntpdate -sd [-o tz] server\n");
  exit(1);
}


x86 assembly (clang, -O0):
<pusage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<pusage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [28 x i8] c"ntpdate -sd [-o tz] server\0A\00"
define void @pusage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [28 x i8] c"ntpdate -sd [-o tz] server\0A\00"
define void @pusage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  int count = 0;
  while (count < 3) {
    printf("Hello\n");
    count = count + 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    114a <main+0x3a>
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [7 x i8] c"Hello\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %6, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 3
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* %2
%9 = add nsw i32 %8, 1
store i32 %9, i32* %2
br label %3
10: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@str = [6 x i8] c"Hello\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_default_verse() {
  printf("For God loved the world so much that he gave his only Son, so that "
         "everyone who believes in him may not die but have eternal life.\n-- "
         "John 3:16");
}


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

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

LLVM IR (-O0):
@.str = [144 x i8] c"For God loved the world so much that he gave his only Son, so that everyone who believes in him may not die but have eternal life.\0A-- John 3:16\00"
define void @print_default_verse() {
%1 = call i32 @printf(i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [144 x i8] c"For God loved the world so much that he gave his only Son, so that everyone who believes in him may not die but have eternal life.\0A-- John 3:16\00"
define void @print_default_verse() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([144 x i8], [144 x i8]* @.str, i64 0, i64 0))
ret void
}
void sortByNrTentativas() {}


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

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

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

LLVM IR (-O2):
define void @sortByNrTentativas() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void release(void *ptr) {
  if (ptr != NULL)
    free(ptr);
}


x86 assembly (clang, -O0):
<release>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <release+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<release>:
test   %rdi,%rdi
je     111a <release+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @release(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @free(i8* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @release(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
int MAP_ANON;
int MAP_PRIVATE;
int PROT_READ;
int PROT_WRITE;
void *mmap(int /*<<< orphan*/ *, int, int, int, int, int /*<<< orphan*/);
int /*<<< orphan*/ munmap(void *, int);
int test_munmap_sigsegv(void) {
  void *addr = mmap((NULL), (0x4000), PROT_READ | PROT_WRITE,
                    MAP_ANON | MAP_PRIVATE, -1, 0);
  munmap(addr, 0x4000);
  int data = *((volatile int *)(addr + 0x2000));
  (void)data;
  return 1;
}


x86 assembly (clang, -O0):
<test_munmap_sigsegv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec9(%rip),%rax
mov    (%rax),%edx
mov    0x2ea0(%rip),%rax
or     (%rax),%edx
mov    0x2e8f(%rip),%rax
mov    (%rax),%ecx
mov    0x2e7e(%rip),%rax
or     (%rax),%ecx
xor    %eax,%eax
mov    %eax,%edi
mov    $0x4000,%esi
mov    $0xffffffff,%r8d
xor    %r9d,%r9d
call   1030 <mmap@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x4000,%esi
call   1040 <munmap@plt>
mov    -0x8(%rbp),%rax
mov    0x2000(%rax),%eax
mov    %eax,-0xc(%rbp)
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_munmap_sigsegv>:
push   %rbx
mov    0x2ed0(%rip),%rax
mov    0x2ea9(%rip),%rcx
mov    (%rcx),%edx
or     (%rax),%edx
mov    0x2e96(%rip),%rax
mov    0x2e87(%rip),%rcx
mov    (%rcx),%ecx
or     (%rax),%ecx
xor    %edi,%edi
mov    $0x4000,%esi
mov    $0xffffffff,%r8d
xor    %r9d,%r9d
call   1030 <mmap@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0x4000,%esi
call   1040 <munmap@plt>
mov    0x2000(%rbx),%eax
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@PROT_READ = global i32 0
@PROT_WRITE = global i32 0
@MAP_ANON = global i32 0
@MAP_PRIVATE = global i32 0
define i32 @test_munmap_sigsegv() {
%1 = alloca i8*
%2 = alloca i32
%3 = load i32, i32* @PROT_READ
%4 = load i32, i32* @PROT_WRITE
%5 = or i32 %3, %4
%6 = load i32, i32* @MAP_ANON
%7 = load i32, i32* @MAP_PRIVATE
%8 = or i32 %6, %7
%9 = call i8* @mmap(i32* null, i32 16384, i32 %5, i32 %8, i32 -1, i32 0)
store i8* %9, i8** %1
%10 = load i8*, i8** %1
%11 = call i32 @munmap(i8* %10, i32 16384)
%12 = load i8*, i8** %1
%13 = getelementptr i8, i8* %12, i64 8192
%14 = bitcast i8* %13 to i32*
%15 = load volatile i32, i32* %14
store i32 %15, i32* %2
%16 = load i32, i32* %2
ret i32 1
}

LLVM IR (-O2):
@PROT_READ = global i32 0
@PROT_WRITE = global i32 0
@MAP_ANON = global i32 0
@MAP_PRIVATE = global i32 0
define i32 @test_munmap_sigsegv() {
%1 = load i32, i32* @PROT_READ
%2 = load i32, i32* @PROT_WRITE
%3 = or i32 %2, %1
%4 = load i32, i32* @MAP_ANON
%5 = load i32, i32* @MAP_PRIVATE
%6 = or i32 %5, %4
%7 = tail call i8* @mmap(i32* null, i32 16384, i32 %3, i32 %6, i32 -1, i32 0)
%8 = tail call i32 @munmap(i8* %7, i32 16384)
%9 = getelementptr i8, i8* %7, i64 8192
%10 = bitcast i8* %9 to i32*
%11 = load volatile i32, i32* %10
ret i32 1
}