xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
float stdlib_strided_sapxsumkbn2(int, float, float *, int);
int main() {
  float x[] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0};
  int64_t N = 4;
  int64_t stride = 2;
  float v = stdlib_strided_sapxsumkbn2(N, 5.0f, x, stride);
  printf("sum: %f\n", v);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xedb(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xed8(%rip),%rax
mov    %rax,-0x8(%rbp)
movl   $0x4,-0x24(%rbp)
movl   $0x2,-0x28(%rbp)
mov    -0x24(%rbp),%edi
lea    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%edx
movss  0xe8c(%rip),%xmm0
call   1040 <stdlib_strided_sapxsumkbn2@plt>
movss  %xmm0,-0x2c(%rbp)
movss  -0x2c(%rbp),%xmm0
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movaps 0xef5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,(%rsp)
movss  0xebd(%rip),%xmm0
mov    %rsp,%rsi
mov    $0x4,%edi
mov    $0x2,%edx
call   1040 <stdlib_strided_sapxsumkbn2@plt>
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.x = [8 x float] [float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00, float 8.000000e+00]
@.str = [9 x i8] c"sum: %f\0A\00"
define i32 @main() {
%1 = alloca [8 x float]
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
%5 = bitcast [8 x float]* %1 to i8*
store i32 4, i32* %2
store i32 2, i32* %3
%6 = load i32, i32* %2
%7 = getelementptr inbounds [8 x float], [8 x float]* %1, i64 0, i64 0
%8 = load i32, i32* %3
%9 = call float @stdlib_strided_sapxsumkbn2(i32 %6, float 5.000000e+00, float* %7, i32 %8)
store float %9, float* %4
%10 = load float, float* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), float %10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.x = [8 x float] [float 1.000000e+00, float 2.000000e+00, float 3.000000e+00, float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 7.000000e+00, float 8.000000e+00]
@.str = [9 x i8] c"sum: %f\0A\00"
define i32 @main() {
%1 = alloca [8 x float]
%2 = bitcast [8 x float]* %1 to i8*
%3 = getelementptr inbounds [8 x float], [8 x float]* %1, i64 0, i64 0
%4 = call float @stdlib_strided_sapxsumkbn2(i32 4, float 5.000000e+00, float* %3, i32 2)
%5 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), float %4)
ret i32 0
}
void debugpins_fsm_set() {}


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

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

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

LLVM IR (-O2):
define void @debugpins_fsm_set() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  int a = 10;
  switch (a) {
  case '1':
    printf("ONE\n");
    break;
  case '2':
    printf("TWO\n");
    break;
  default:
    printf("NONE\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x31,%eax
je     114b <main+0x3b>
jmp    113a <main+0x2a>
mov    -0xc(%rbp),%eax
sub    $0x32,%eax
je     115c <main+0x4c>
jmp    116d <main+0x5d>
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
jmp    1179 <main+0x69>
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
jmp    1179 <main+0x69>
lea    0xe91(%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 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [5 x i8] c"NONE\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret i32 0
}
float mus_char_to_bfloat(const unsigned char *inp) {
  float o;
  unsigned char *outp = (unsigned char *)&o;
  outp[0] = inp[3];
  outp[1] = inp[2];
  outp[2] = inp[1];
  outp[3] = inp[0];
  return (o);
}


x86 assembly (clang, -O0):
<mus_char_to_bfloat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
lea    -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    0x3(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    0x2(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x3(%rax)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<mus_char_to_bfloat>:
mov    (%rdi),%eax
bswap  %eax
movd   %eax,%xmm0
ret

LLVM IR (-O0):
define float @mus_char_to_bfloat(i8* %0) {
%2 = alloca i8*
%3 = alloca float
%4 = alloca i8*
store i8* %0, i8** %2
%5 = bitcast float* %3 to i8*
store i8* %5, i8** %4
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i64 3
%8 = load i8, i8* %7
%9 = load i8*, i8** %4
%10 = getelementptr inbounds i8, i8* %9, i64 0
store i8 %8, i8* %10
%11 = load i8*, i8** %2
%12 = getelementptr inbounds i8, i8* %11, i64 2
%13 = load i8, i8* %12
%14 = load i8*, i8** %4
%15 = getelementptr inbounds i8, i8* %14, i64 1
store i8 %13, i8* %15
%16 = load i8*, i8** %2
%17 = getelementptr inbounds i8, i8* %16, i64 1
%18 = load i8, i8* %17
%19 = load i8*, i8** %4
%20 = getelementptr inbounds i8, i8* %19, i64 2
store i8 %18, i8* %20
%21 = load i8*, i8** %2
%22 = getelementptr inbounds i8, i8* %21, i64 0
%23 = load i8, i8* %22
%24 = load i8*, i8** %4
%25 = getelementptr inbounds i8, i8* %24, i64 3
store i8 %23, i8* %25
%26 = load float, float* %3
ret float %26
}

LLVM IR (-O2):
define float @mus_char_to_bfloat(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 3
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = getelementptr inbounds i8, i8* %0, i64 2
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = shl nuw nsw i32 %7, 8
%9 = or i32 %8, %4
%10 = getelementptr inbounds i8, i8* %0, i64 1
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = shl nuw nsw i32 %12, 16
%14 = or i32 %9, %13
%15 = load i8, i8* %0
%16 = zext i8 %15 to i32
%17 = shl nuw i32 %16, 24
%18 = or i32 %14, %17
%19 = bitcast i32 %18 to float
ret float %19
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int i;
  for (i = 0; i < 5; i++) {
    printf("%d\n", i);
  }
}


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"%d\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 = %9, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 5
br i1 %5, label %6, label %12
6: ; preds = %3
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
br label %9
9: ; preds = %6
%10 = load i32, i32* %2
%11 = add nsw i32 %10, 1
store i32 %11, i32* %2
br label %3
12: ; preds = %3
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 2)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isalpha(int);
void t_isalpha_0x69() {
  Assert_real((isalpha(105)),
              "/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_isalpha.c",
              530, ("isalpha should be 1 for i"));
}


x86 assembly (clang, -O0):
<t_isalpha_0x69>:
push   %rbp
mov    %rsp,%rbp
mov    $0x69,%edi
call   1030 <isalpha@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x212,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isalpha_0x69>:
push   %rax
mov    $0x69,%edi
call   1030 <isalpha@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x212,%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_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 1 for i\00"
define void @t_isalpha_0x69() {
%1 = call i32 @isalpha(i32 105)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 530, i8* getelementptr inbounds ([26 x i8], [26 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_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 1 for i\00"
define void @t_isalpha_0x69() {
%1 = tail call i32 @isalpha(i32 105)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 530, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void RTGetOptArgvToString(void) {}


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

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

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

LLVM IR (-O2):
define void @RTGetOptArgvToString() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ reset_args();
int /*<<< orphan*/ reset_config();
int /*<<< orphan*/ reset_logging();
int /*<<< orphan*/ reset_strings();
void reset(void) {
  reset_strings();
  reset_config();
  reset_args();
  reset_logging();
}


x86 assembly (clang, -O0):
<reset>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <reset_strings@plt>
mov    $0x0,%al
call   1040 <reset_config@plt>
mov    $0x0,%al
call   1060 <reset_args@plt>
mov    $0x0,%al
call   1050 <reset_logging@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<reset>:
push   %rax
xor    %eax,%eax
call   1030 <reset_strings@plt>
xor    %eax,%eax
call   1040 <reset_config@plt>
xor    %eax,%eax
call   1060 <reset_args@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <reset_logging@plt>

LLVM IR (-O0):
define void @reset() {
%1 = call i32 (...) @reset_strings()
%2 = call i32 (...) @reset_config()
%3 = call i32 (...) @reset_args()
%4 = call i32 (...) @reset_logging()
ret void
}

LLVM IR (-O2):
define void @reset() {
%1 = tail call i32 (...) @reset_strings()
%2 = tail call i32 (...) @reset_config()
%3 = tail call i32 (...) @reset_args()
%4 = tail call i32 (...) @reset_logging()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ IntEnable(int);
int /*<<< orphan*/ IntRegister(int, void (*)());
void SHAMD5IntRegister(uint32_t ui32Base, void (*pfnHandler)(void)) {
  ;
  IntRegister(164, pfnHandler);
  IntEnable(164);
}


x86 assembly (clang, -O0):
<SHAMD5IntRegister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
mov    $0xa4,%edi
call   1040 <IntRegister@plt>
mov    $0xa4,%edi
call   1030 <IntEnable@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHAMD5IntRegister>:
push   %rax
mov    $0xa4,%edi
call   1040 <IntRegister@plt>
mov    $0xa4,%edi
pop    %rax
jmp    1030 <IntEnable@plt>

LLVM IR (-O0):
define void @SHAMD5IntRegister(i32 %0, void ()* %1) {
%3 = alloca i32
%4 = alloca void ()*
store i32 %0, i32* %3
store void ()* %1, void ()** %4
%5 = load void ()*, void ()** %4
%6 = bitcast void ()* %5 to void (...)*
%7 = call i32 @IntRegister(i32 164, void (...)* %6)
%8 = call i32 @IntEnable(i32 164)
ret void
}

LLVM IR (-O2):
define void @SHAMD5IntRegister(i32 %0, void ()* %1) {
%3 = bitcast void ()* %1 to void (...)*
%4 = tail call i32 @IntRegister(i32 164, void (...)* %3)
%5 = tail call i32 @IntEnable(i32 164)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int, int);
main() {
  int a = 0;
  int b = 0;
  int c, d;
  c = a++;
  d = ++b;
  printf("%d %d %d %d\n", a, b, c, d);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x4(%rbp)
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
lea    0xeac(%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
mov    $0x1,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
mov    $0x1,%r8d
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [13 x i8] c"%d %d %d %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 1, i32 1, i32 0, i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void practice2D8() {
  int x = 0b00110011;
  int m = 0b11110000;
  printf("0x%x\n", x & m);
  printf("0x%x\n", x | m);
}


x86 assembly (clang, -O0):
<practice2D8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x33,-0x4(%rbp)
movl   $0xf0,-0x8(%rbp)
mov    -0x4(%rbp),%esi
and    -0x8(%rbp),%esi
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
or     -0x8(%rbp),%esi
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<practice2D8>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x30,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xf3,%esi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"0x%x\0A\00"
define void @practice2D8() {
%1 = alloca i32
%2 = alloca i32
store i32 51, i32* %1
store i32 240, i32* %2
%3 = load i32, i32* %1
%4 = load i32, i32* %2
%5 = and i32 %3, %4
%6 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = or i32 %7, %8
%10 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"0x%x\0A\00"
define void @practice2D8() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 48)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 243)
ret void
}
int _utime(const char *path, const struct utimbuf *times) { return -1; }


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

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

LLVM IR (-O0):
%struct.utimbuf = type opaque
define i32 @_utime(i8* %0, %struct.utimbuf* %1) {
%3 = alloca i8*
%4 = alloca %struct.utimbuf*
store i8* %0, i8** %3
store %struct.utimbuf* %1, %struct.utimbuf** %4
ret i32 -1
}

LLVM IR (-O2):
%struct.utimbuf = type opaque
define i32 @_utime(i8* nocapture readnone %0, %struct.utimbuf* nocapture readnone %1) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ _get_cr2();
int /*<<< orphan*/ halt_and_catch_fire();
int /*<<< orphan*/ printk(char *, int /*<<< orphan*/);
void page_fault_handler() {
  {
    printk("Page fault occured at virtual address 0x%x!\n", _get_cr2());
    halt_and_catch_fire();
  };
}


x86 assembly (clang, -O0):
<page_fault_handler>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <_get_cr2@plt>
mov    %eax,%esi
lea    0xebc(%rip),%rdi
call   1030 <printk@plt>
mov    $0x0,%al
call   1050 <halt_and_catch_fire@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<page_fault_handler>:
push   %rax
xor    %eax,%eax
call   1040 <_get_cr2@plt>
lea    0xec1(%rip),%rdi
mov    %eax,%esi
call   1030 <printk@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <halt_and_catch_fire@plt>

LLVM IR (-O0):
@.str = [45 x i8] c"Page fault occured at virtual address 0x%x!\0A\00"
define void @page_fault_handler() {
%1 = call i32 (...) @_get_cr2()
%2 = call i32 @printk(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = call i32 (...) @halt_and_catch_fire()
ret void
}

LLVM IR (-O2):
@.str = [45 x i8] c"Page fault occured at virtual address 0x%x!\0A\00"
define void @page_fault_handler() {
%1 = tail call i32 (...) @_get_cr2()
%2 = tail call i32 @printk(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 (...) @halt_and_catch_fire()
ret void
}
int func2(void) {
  {
    {
      {
        {
          { return (1); }
        }
      }
    }
  }
}


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

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

LLVM IR (-O0):
define i32 @func2() {
ret i32 1
}

LLVM IR (-O2):
define i32 @func2() {
ret i32 1
}
/* Type definitions */
typedef int int8_t;

/* Variables and functions */
int load_s8(const char *icc, int length, int offset) {
  if (offset < 0 || offset > length)
    return 0;
  return *(int8_t *)(&icc[offset]);
}


x86 assembly (clang, -O0):
<load_s8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jl     1124 <load_s8+0x24>
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jle    1130 <load_s8+0x30>
movl   $0x0,-0x4(%rbp)
jmp    113e <load_s8+0x3e>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,1),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<load_s8>:
xor    %eax,%eax
test   %edx,%edx
js     110f <load_s8+0xf>
cmp    %esi,%edx
jg     110f <load_s8+0xf>
mov    %edx,%eax
mov    (%rdi,%rax,1),%eax
ret

LLVM IR (-O0):
define i32 @load_s8(i8* %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%8 = load i32, i32* %7
%9 = icmp slt i32 %8, 0
br i1 %9, label %14, label %10
10: ; preds = %3
%11 = load i32, i32* %7
%12 = load i32, i32* %6
%13 = icmp sgt i32 %11, %12
br i1 %13, label %14, label %15
14: ; preds = %10, %3
store i32 0, i32* %4
br label %22
15: ; preds = %10
%16 = load i8*, i8** %5
%17 = load i32, i32* %7
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8, i8* %16, i64 %18
%20 = bitcast i8* %19 to i32*
%21 = load i32, i32* %20
store i32 %21, i32* %4
br label %22
22: ; preds = %15, %14
%23 = load i32, i32* %4
ret i32 %23
}

LLVM IR (-O2):
define i32 @load_s8(i8* nocapture %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %2, 0
%5 = icmp sgt i32 %2, %1
%6 = or i1 %4, %5
br i1 %6, label %12, label %7
7: ; preds = %3
%8 = zext i32 %2 to i64
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = bitcast i8* %9 to i32*
%11 = load i32, i32* %10
br label %12
12: ; preds = %3, %7
%13 = phi i32 [ %11, %7 ], [ 0, %3 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ appInit();
int main(int argc, char *argv[]) {
  appInit();
  while (1)
    ;
  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)
mov    $0x0,%al
call   1030 <appInit@plt>
jmp    112d <main+0x1d>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <appInit@plt>
nopl   0x0(%rax,%rax,1)
jmp    1120 <main+0x10>

LLVM IR (-O0):
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 (...) @appInit()
br label %7
7: ; preds = %2, %7
br label %7
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @appInit()
br label %4
4: ; preds = %2, %4
br label %4
}
__attribute__((always_)) int test_and_change_bit(int nr,
                                                 volatile unsigned long *addr) {
  int oldbit;
  asm volatile(""
               "btc %2,%1\n\t"
               "sbb %0,%0"
               : "=r"(oldbit), "+m"(*(volatile long *)(addr))
               : "Ir"(nr)
               : "memory");
  return oldbit;
}


x86 assembly (clang, -O0):
<test_and_change_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
btc    %ecx,(%rax)
sbb    %eax,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_and_change_bit>:
btc    %edi,(%rsi)
sbb    %eax,%eax
ret

LLVM IR (-O0):
define i32 @test_and_change_bit(i32 %0, i64* %1) {
%3 = alloca i32
%4 = alloca i64*
%5 = alloca i32
store i32 %0, i32* %3
store i64* %1, i64** %4
%6 = load i64*, i64** %4
%7 = load i32, i32* %3
%8 = call i32 asm sideeffect "btc $2,$1\0A\09sbb $0,$0", "=r,=*m,Ir,*m,~{memory},~{dirflag},~{fpsr},~{flags}"(i64* elementtype(i64) %6, i32 %7, i64* elementtype(i64) %6)
store i32 %8, i32* %5
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_and_change_bit(i32 %0, i64* %1) {
%3 = tail call i32 asm sideeffect "btc $2,$1\0A\09sbb $0,$0", "=r,=*m,Ir,*m,~{memory},~{dirflag},~{fpsr},~{flags}"(i64* elementtype(i64) %1, i32 %0, i64* elementtype(i64) %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("hwstamp usage:\n"
         "    show dev IFNAME : display current setting\n"
         "    set { tx INT } { rx INT } dev IFNAME\n");
}


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

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

LLVM IR (-O0):
@.str = [103 x i8] c"hwstamp usage:\0A show dev IFNAME : display current setting\0A set { tx INT } { rx INT } dev IFNAME\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([103 x i8], [103 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [102 x i8] c"hwstamp usage:\0A show dev IFNAME : display current setting\0A set { tx INT } { rx INT } dev IFNAME\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([102 x i8], [102 x i8]* @str, i64 0, i64 0))
ret void
}
long NET_queryPlayer() { return 0; }


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

x86 assembly (clang, -O2):
<NET_queryPlayer>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i64 @NET_queryPlayer() {
ret i64 0
}

LLVM IR (-O2):
define i64 @NET_queryPlayer() {
ret i64 0
}
void DST_BT_None(struct Node *n) { return; }


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

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

LLVM IR (-O0):
%struct.Node = type opaque
define void @DST_BT_None(%struct.Node* %0) {
%2 = alloca %struct.Node*
store %struct.Node* %0, %struct.Node** %2
ret void
}

LLVM IR (-O2):
%struct.Node = type opaque
define void @DST_BT_None(%struct.Node* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dmmddat_(int *, int *, double *, double *, int *, double *,
                            double *, int *);
void wcc_dmmddat_(int *M, int *N, char *ALPHA, char *A, int *LDA, char *BETA,
                  char *B, int *LDB) {
  dmmddat_(M, N, (double *)ALPHA, (double *)A, LDA, (double *)BETA, (double *)B,
           LDB);
}


x86 assembly (clang, -O0):
<wcc_dmmddat_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
mov    0x10(%rbp),%r10
mov    0x18(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <dmmddat_@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wcc_dmmddat_>:
jmp    1030 <dmmddat_@plt>

LLVM IR (-O0):
define void @wcc_dmmddat_(i32* %0, i32* %1, i8* %2, i8* %3, i32* %4, i8* %5, i8* %6, i32* %7) {
%9 = alloca i32*
%10 = alloca i32*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i32*
%14 = alloca i8*
%15 = alloca i8*
%16 = alloca i32*
store i32* %0, i32** %9
store i32* %1, i32** %10
store i8* %2, i8** %11
store i8* %3, i8** %12
store i32* %4, i32** %13
store i8* %5, i8** %14
store i8* %6, i8** %15
store i32* %7, i32** %16
%17 = load i32*, i32** %9
%18 = load i32*, i32** %10
%19 = load i8*, i8** %11
%20 = bitcast i8* %19 to double*
%21 = load i8*, i8** %12
%22 = bitcast i8* %21 to double*
%23 = load i32*, i32** %13
%24 = load i8*, i8** %14
%25 = bitcast i8* %24 to double*
%26 = load i8*, i8** %15
%27 = bitcast i8* %26 to double*
%28 = load i32*, i32** %16
%29 = call i32 @dmmddat_(i32* %17, i32* %18, double* %20, double* %22, i32* %23, double* %25, double* %27, i32* %28)
ret void
}

LLVM IR (-O2):
define void @wcc_dmmddat_(i32* %0, i32* %1, i8* %2, i8* %3, i32* %4, i8* %5, i8* %6, i32* %7) {
%9 = bitcast i8* %2 to double*
%10 = bitcast i8* %3 to double*
%11 = bitcast i8* %5 to double*
%12 = bitcast i8* %6 to double*
%13 = tail call i32 @dmmddat_(i32* %0, i32* %1, double* %9, double* %10, i32* %4, double* %11, double* %12, i32* %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ R_OK;
int access(char *, int /*<<< orphan*/);
int fileExists(char *path) {
  if (access(path, R_OK) != -1) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<fileExists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2eb9(%rip),%rax
mov    (%rax),%esi
call   1030 <access@plt>
cmp    $0xffffffff,%eax
je     1143 <fileExists+0x33>
movl   $0x1,-0x4(%rbp)
jmp    114a <fileExists+0x3a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fileExists>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
call   1030 <access@plt>
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@R_OK = global i32 0
define i32 @fileExists(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = load i32, i32* @R_OK
%6 = call i32 @access(i8* %4, i32 %5)
%7 = icmp ne i32 %6, -1
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 1, i32* %2
br label %10
9: ; preds = %1
store i32 0, i32* %2
br label %10
10: ; preds = %9, %8
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
@R_OK = global i32 0
define i32 @fileExists(i8* nocapture %0) {
%2 = load i32, i32* @R_OK
%3 = tail call i32 @access(i8* %0, i32 %2)
%4 = icmp ne i32 %3, -1
%5 = zext i1 %4 to i32
ret i32 %5
}
void foo428() {}


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

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

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

LLVM IR (-O2):
define void @foo428() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ GLCD_WriteChar(int /*<<< orphan*/);
void GLCD_WriteString(char *stringToWrite) {
  while (*stringToWrite)
    GLCD_WriteChar(*stringToWrite++);
}


x86 assembly (clang, -O0):
<GLCD_WriteString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1145 <GLCD_WriteString+0x35>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <GLCD_WriteChar@plt>
jmp    111c <GLCD_WriteString+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GLCD_WriteString>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <GLCD_WriteString+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <GLCD_WriteChar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <GLCD_WriteString+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @GLCD_WriteString(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %7, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = icmp ne i8 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %3
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i32 1
store i8* %9, i8** %2
%10 = load i8, i8* %8
%11 = sext i8 %10 to i32
%12 = call i32 @GLCD_WriteChar(i32 %11)
br label %3
13: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @GLCD_WriteString(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = sext i8 %5 to i32
%9 = tail call i32 @GLCD_WriteChar(i32 %8)
%10 = load i8, i8* %7
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
void *genhash_iter_get(const struct iterator *genhash_iter) {
  return (void *)genhash_iter;
}


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

x86 assembly (clang, -O2):
<genhash_iter_get>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
%struct.iterator = type opaque
define i8* @genhash_iter_get(%struct.iterator* %0) {
%2 = alloca %struct.iterator*
store %struct.iterator* %0, %struct.iterator** %2
%3 = load %struct.iterator*, %struct.iterator** %2
%4 = bitcast %struct.iterator* %3 to i8*
ret i8* %4
}

LLVM IR (-O2):
%struct.iterator = type opaque
define i8* @genhash_iter_get(%struct.iterator* readnone %0) {
%2 = bitcast %struct.iterator* %0 to i8*
ret i8* %2
}
/* Variables and functions */
int fptr_capi20ext_clr_flags(unsigned int, unsigned int);
scalar_t__ loadlib();
int capi20ext_clr_flags(unsigned ApplID, unsigned flags) {
  if (loadlib() < 0)
    return -1;
  return fptr_capi20ext_clr_flags(ApplID, flags);
}


x86 assembly (clang, -O0):
<capi20ext_clr_flags>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1040 <loadlib@plt>
cmp    $0x0,%rax
jge    114b <capi20ext_clr_flags+0x2b>
movl   $0xffffffff,-0x4(%rbp)
jmp    1159 <capi20ext_clr_flags+0x39>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <fptr_capi20ext_clr_flags@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<capi20ext_clr_flags>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1040 <loadlib@plt>
test   %rax,%rax
js     1142 <capi20ext_clr_flags+0x22>
mov    %ebp,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <fptr_capi20ext_clr_flags@plt>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @capi20ext_clr_flags(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = call i64 (...) @loadlib()
%7 = icmp slt i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 -1, i32* %3
br label %13
9: ; preds = %2
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = call i32 @fptr_capi20ext_clr_flags(i32 %10, i32 %11)
store i32 %12, i32* %3
br label %13
13: ; preds = %9, %8
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @capi20ext_clr_flags(i32 %0, i32 %1) {
%3 = tail call i64 (...) @loadlib()
%4 = icmp slt i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @fptr_capi20ext_clr_flags(i32 %0, i32 %1)
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ %6, %5 ], [ -1, %2 ]
ret i32 %8
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  struct vram_set {
    unsigned int palette : 4;
    unsigned int _res : 7;
    unsigned int pixel_x : 6;
    unsigned int pixel_y : 6;
    unsigned int chunk : 9;
  };
  union vram_converter {
    uint32_t val;
    struct vram_set set;
  };
  struct vram_set set = {
      .palette = 5, ._res = 0, .pixel_x = 63, .pixel_y = 62, .chunk = 0x11};
  union vram_converter conv = {.set = set};
  printf("0x%08x\n", conv.val);
}


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

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

LLVM IR (-O0):
%struct.vram_set = type { i32 }
%union.vram_converter = type { i32 }
@__const.main.set = { i8, i8, i8, i8 } { i8 5, i8 -8, i8 -3, i8 8 }
@.str = [8 x i8] c"0x%08x\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca %struct.vram_set
%6 = alloca %union.vram_converter
store i32 %0, i32* %3
store i8** %1, i8*** %4
%7 = bitcast %struct.vram_set* %5 to i8*
%8 = bitcast %union.vram_converter* %6 to %struct.vram_set*
%9 = bitcast %struct.vram_set* %8 to i8*
%10 = bitcast %struct.vram_set* %5 to i8*
%11 = bitcast %union.vram_converter* %6 to i32*
%12 = load i32, i32* %11
%13 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"0x%08x\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 150861829)
ret i32 0
}
/* Variables and functions */
long rintf(float);
long lrintf(float x) { return rintf(x); }


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

x86 assembly (clang, -O2):
<lrintf>:
jmp    1030 <rintf@plt>

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

LLVM IR (-O2):
define i64 @lrintf(float %0) {
%2 = tail call i64 @rintf(float %0)
ret i64 %2
}
/* Type definitions */
struct sshbuf {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ sshbuf_len(struct sshbuf const *);
int /*<<< orphan*/ sshbuf_ptr(struct sshbuf const *);
int sshbuf_put(struct sshbuf *, int /*<<< orphan*/, int /*<<< orphan*/);
int sshbuf_putb(struct sshbuf *buf, const struct sshbuf *v) {
  return sshbuf_put(buf, sshbuf_ptr(v), sshbuf_len(v));
}


x86 assembly (clang, -O0):
<sshbuf_putb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <sshbuf_ptr@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <sshbuf_len@plt>
mov    -0x20(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    %eax,%edx
call   1030 <sshbuf_put@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sshbuf_putb>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1050 <sshbuf_ptr@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <sshbuf_len@plt>
mov    %r14,%rdi
mov    %ebp,%esi
mov    %eax,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <sshbuf_put@plt>

LLVM IR (-O0):
%struct.sshbuf = type { i32 }
define i32 @sshbuf_putb(%struct.sshbuf* %0, %struct.sshbuf* %1) {
%3 = alloca %struct.sshbuf*
%4 = alloca %struct.sshbuf*
store %struct.sshbuf* %0, %struct.sshbuf** %3
store %struct.sshbuf* %1, %struct.sshbuf** %4
%5 = load %struct.sshbuf*, %struct.sshbuf** %3
%6 = load %struct.sshbuf*, %struct.sshbuf** %4
%7 = call i32 @sshbuf_ptr(%struct.sshbuf* %6)
%8 = load %struct.sshbuf*, %struct.sshbuf** %4
%9 = call i32 @sshbuf_len(%struct.sshbuf* %8)
%10 = call i32 @sshbuf_put(%struct.sshbuf* %5, i32 %7, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.sshbuf = type { i32 }
define i32 @sshbuf_putb(%struct.sshbuf* %0, %struct.sshbuf* %1) {
%3 = tail call i32 @sshbuf_ptr(%struct.sshbuf* %1)
%4 = tail call i32 @sshbuf_len(%struct.sshbuf* %1)
%5 = tail call i32 @sshbuf_put(%struct.sshbuf* %0, i32 %3, i32 %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ get_line(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char **argv) {
  char s[1000];
  get_line(s, 1000);
  printf("%s", s);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x3f0,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1030 <get_line@plt>
lea    0xec1(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [1000 x i8]
%4 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%5 = call i32 @get_line(i8* %4, i32 1000)
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 0
}
/* Type definitions */
struct device_d {
  int dummy;
};

/* Variables and functions */
char const *dev_id(struct device_d const *);
const char *dev_name(const struct device_d *dev) { return dev_id(dev); }


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

x86 assembly (clang, -O2):
<dev_name>:
jmp    1030 <dev_id@plt>

LLVM IR (-O0):
%struct.device_d = type { i32 }
define i8* @dev_name(%struct.device_d* %0) {
%2 = alloca %struct.device_d*
store %struct.device_d* %0, %struct.device_d** %2
%3 = load %struct.device_d*, %struct.device_d** %2
%4 = call i8* @dev_id(%struct.device_d* %3)
ret i8* %4
}

LLVM IR (-O2):
%struct.device_d = type { i32 }
define i8* @dev_name(%struct.device_d* %0) {
%2 = tail call i8* @dev_id(%struct.device_d* %0)
ret i8* %2
}
int cairo_code_draw_casMasterLabel_get_width() { return 48; }


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

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

LLVM IR (-O0):
define i32 @cairo_code_draw_casMasterLabel_get_width() {
ret i32 48
}

LLVM IR (-O2):
define i32 @cairo_code_draw_casMasterLabel_get_width() {
ret i32 48
}
/* Variables and functions */
int /*<<< orphan*/ w5100_writeRCR(unsigned int);
void w5100_setRetransmissionCount(unsigned retry) { w5100_writeRCR(retry); }


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

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

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

LLVM IR (-O2):
define void @w5100_setRetransmissionCount(i32 %0) {
%2 = tail call i32 @w5100_writeRCR(i32 %0)
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
void clear_bit_reg32(volatile uint32_t *reg, uint8_t bit) {
  (*(volatile unsigned int *)(((((uint32_t)reg & 0xF0000000) + 0x02000000 +
                                (((uint32_t)reg & 0xFFFFF) << 5) +
                                (bit << 2))))) = 0x0;
}


x86 assembly (clang, -O0):
<clear_bit_reg32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
and    $0xf0000000,%eax
add    $0x2000000,%eax
mov    -0x8(%rbp),%rcx
and    $0xfffff,%ecx
shl    $0x5,%ecx
add    %ecx,%eax
mov    -0xc(%rbp),%ecx
shl    $0x2,%ecx
add    %ecx,%eax
mov    %eax,%eax
movl   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_bit_reg32>:
mov    %edi,%eax
and    $0xf0000000,%eax
shl    $0x5,%edi
and    $0x1ffffe0,%edi
or     %eax,%edi
lea    (%rdi,%rsi,4),%eax
add    $0x2000000,%eax
movl   $0x0,(%rax)
ret

LLVM IR (-O0):
define void @clear_bit_reg32(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = ptrtoint i32* %5 to i32
%7 = and i32 %6, -268435456
%8 = add i32 %7, 33554432
%9 = load i32*, i32** %3
%10 = ptrtoint i32* %9 to i32
%11 = and i32 %10, 1048575
%12 = shl i32 %11, 5
%13 = add i32 %8, %12
%14 = load i32, i32* %4
%15 = shl i32 %14, 2
%16 = add i32 %13, %15
%17 = zext i32 %16 to i64
%18 = inttoptr i64 %17 to i32*
store volatile i32 0, i32* %18
ret void
}

LLVM IR (-O2):
define void @clear_bit_reg32(i32* %0, i32 %1) {
%3 = ptrtoint i32* %0 to i64
%4 = trunc i64 %3 to i32
%5 = and i32 %4, -268435456
%6 = shl i32 %4, 5
%7 = and i32 %6, 33554400
%8 = or i32 %5, %7
%9 = shl i32 %1, 2
%10 = add i32 %9, 33554432
%11 = add i32 %10, %8
%12 = zext i32 %11 to i64
%13 = inttoptr i64 %12 to i32*
store volatile i32 0, i32* %13
ret void
}
int sys$gettim(unsigned long long *timadr) {
  return ({
    unsigned long resultvar;
    register long int _a1 asm("rdi") = (long)(timadr);
    asm volatile("movq %1, %%rax\n\t"
                 "int $0x81\n\t"
                 : "=a"(resultvar)
                 : "i"(14), "r"(_a1)
                 : "memory", "cc", "r11", "cx");
    (long)resultvar;
  });
}


x86 assembly (clang, -O0):
<sys$gettim>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0xe,%rax
int    $0x81
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys$gettim>:
mov    $0xe,%rax
int    $0x81
ret

LLVM IR (-O0):
define i32 @"sys$gettim"(i64* %0) {
%2 = alloca i64*
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64* %0, i64** %2
%6 = load i64*, i64** %2
%7 = ptrtoint i64* %6 to i64
store i64 %7, i64* %4
%8 = load i64, i64* %4
%9 = call i64 asm sideeffect "movq $1, %rax\0A\09int $$0x81\0A\09", "={ax},i,{rdi},~{memory},~{cc},~{r11},~{cx},~{dirflag},~{fpsr},~{flags}"(i32 14, i64 %8)
store i64 %9, i64* %3
%10 = load i64, i64* %3
store i64 %10, i64* %5
%11 = load i64, i64* %5
%12 = trunc i64 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @"sys$gettim"(i64* %0) {
%2 = ptrtoint i64* %0 to i64
%3 = tail call i64 asm sideeffect "movq $1, %rax\0A\09int $$0x81\0A\09", "={ax},i,{rdi},~{memory},~{cc},~{r11},~{cx},~{dirflag},~{fpsr},~{flags}"(i32 14, i64 %2)
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Type definitions */
struct Context {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ tc_init(struct Context *);
int /*<<< orphan*/ tc_reset_vms(struct Context *);
void tc_reset(struct Context *ctx) {
  tc_reset_vms(ctx);
  tc_init(ctx);
}


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

x86 assembly (clang, -O2):
<tc_reset>:
push   %rbx
mov    %rdi,%rbx
call   1030 <tc_reset_vms@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <tc_init@plt>

LLVM IR (-O0):
%struct.Context = type { i32 }
define void @tc_reset(%struct.Context* %0) {
%2 = alloca %struct.Context*
store %struct.Context* %0, %struct.Context** %2
%3 = load %struct.Context*, %struct.Context** %2
%4 = call i32 @tc_reset_vms(%struct.Context* %3)
%5 = load %struct.Context*, %struct.Context** %2
%6 = call i32 @tc_init(%struct.Context* %5)
ret void
}

LLVM IR (-O2):
%struct.Context = type { i32 }
define void @tc_reset(%struct.Context* %0) {
%2 = tail call i32 @tc_reset_vms(%struct.Context* %0)
%3 = tail call i32 @tc_init(%struct.Context* %0)
ret void
}
/* Type definitions */
struct mdoc_node {
  int dummy;
};
struct mdoc_meta {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ font_push(char);
int pre_li(const struct mdoc_meta *meta, const struct mdoc_node *n) {
  font_push('R');
  return (1);
}


x86 assembly (clang, -O0):
<pre_li>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x52,%edi
call   1030 <font_push@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pre_li>:
push   %rax
mov    $0x52,%edi
call   1030 <font_push@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.mdoc_meta = type { i32 }
%struct.mdoc_node = type { i32 }
define i32 @pre_li(%struct.mdoc_meta* %0, %struct.mdoc_node* %1) {
%3 = alloca %struct.mdoc_meta*
%4 = alloca %struct.mdoc_node*
store %struct.mdoc_meta* %0, %struct.mdoc_meta** %3
store %struct.mdoc_node* %1, %struct.mdoc_node** %4
%5 = call i32 @font_push(i8 signext 82)
ret i32 1
}

LLVM IR (-O2):
%struct.mdoc_meta = type { i32 }
%struct.mdoc_node = type { i32 }
define i32 @pre_li(%struct.mdoc_meta* nocapture readnone %0, %struct.mdoc_node* nocapture readnone %1) {
%3 = tail call i32 @font_push(i8 signext 82)
ret i32 1
}