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

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ test_n_byte_cp_force(unsigned int);
int /*<<< orphan*/ test_overwite();
int /*<<< orphan*/ unlink(char *);
int main(int argc, char *argv[]) {
  unsigned int b;
  test_overwite();
  for (b = 8; b < (1 << 30); b = b << 1)
    test_n_byte_cp_force(b);
  unlink("/tmp/test-cp-src");
  unlink("/tmp/test-cp-dst");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <test_overwite@plt>
movl   $0x8,-0x14(%rbp)
cmpl   $0x40000000,-0x14(%rbp)
jae    1177 <main+0x47>
mov    -0x14(%rbp),%edi
call   1040 <test_n_byte_cp_force@plt>
mov    -0x14(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1154 <main+0x24>
lea    0xe82(%rip),%rdi
call   1030 <unlink@plt>
lea    0xe87(%rip),%rdi
call   1030 <unlink@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <test_overwite@plt>
mov    $0x8,%edi
call   1040 <test_n_byte_cp_force@plt>
mov    $0x10,%edi
call   1040 <test_n_byte_cp_force@plt>
mov    $0x20,%edi
call   1040 <test_n_byte_cp_force@plt>
mov    $0x40,%edi
call   1040 <test_n_byte_cp_force@plt>
mov    $0x80,%edi
call   1040 <test_n_byte_cp_force@plt>
mov    $0x100,%edi
call   1040 <test_n_byte_cp_force@plt>
mov    $0x200,%edi
call   1040 <test_n_byte_cp_force@plt>
mov    $0x400,%edi
call   1040 <test_n_byte_cp_force@plt>
mov    $0x800,%edi
call   1040 <test_n_byte_cp_force@plt>
mov    $0x1000,%edi
call   1040 <test_n_byte_cp_force@plt>
mov    $0x2000,%edi
call   1040 <test_n_byte_cp_force@plt>
mov    $0x4000,%edi
call   1040 <test_n_byte_cp_force@plt>
mov    $0x8000,%edi
call   1040 <test_n_byte_cp_force@plt>
mov    $0x10000,%edi
call   1040 <test_n_byte_cp_force@plt>
mov    $0x20000,%edi
call   1040 <test_n_byte_cp_force@plt>
mov    $0x40000,%edi
call   1040 <test_n_byte_cp_force@plt>
mov    $0x80000,%edi
call   1040 <test_n_byte_cp_force@plt>
mov    $0x100000,%edi
call   1040 <test_n_byte_cp_force@plt>
mov    $0x200000,%edi
call   1040 <test_n_byte_cp_force@plt>
mov    $0x400000,%edi
call   1040 <test_n_byte_cp_force@plt>
mov    $0x800000,%edi
call   1040 <test_n_byte_cp_force@plt>
mov    $0x1000000,%edi
call   1040 <test_n_byte_cp_force@plt>
mov    $0x2000000,%edi
call   1040 <test_n_byte_cp_force@plt>
mov    $0x4000000,%edi
call   1040 <test_n_byte_cp_force@plt>
mov    $0x8000000,%edi
call   1040 <test_n_byte_cp_force@plt>
mov    $0x10000000,%edi
call   1040 <test_n_byte_cp_force@plt>
mov    $0x20000000,%edi
call   1040 <test_n_byte_cp_force@plt>
lea    0xdb3(%rip),%rdi
call   1030 <unlink@plt>
lea    0xdb8(%rip),%rdi
call   1030 <unlink@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"/tmp/test-cp-src\00"
@.str.1 = [17 x i8] c"/tmp/test-cp-dst\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 (...) @test_overwite()
store i32 8, i32* %6
br label %8
8: ; preds = %14, %2
%9 = load i32, i32* %6
%10 = icmp ult i32 %9, 1073741824
br i1 %10, label %11, label %17
11: ; preds = %8
%12 = load i32, i32* %6
%13 = call i32 @test_n_byte_cp_force(i32 %12)
br label %14
14: ; preds = %11
%15 = load i32, i32* %6
%16 = shl i32 %15, 1
store i32 %16, i32* %6
br label %8
17: ; preds = %8
%18 = call i32 @unlink(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%19 = call i32 @unlink(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"/tmp/test-cp-src\00"
@.str.1 = [17 x i8] c"/tmp/test-cp-dst\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test_overwite()
%4 = tail call i32 @test_n_byte_cp_force(i32 8)
%5 = tail call i32 @test_n_byte_cp_force(i32 16)
%6 = tail call i32 @test_n_byte_cp_force(i32 32)
%7 = tail call i32 @test_n_byte_cp_force(i32 64)
%8 = tail call i32 @test_n_byte_cp_force(i32 128)
%9 = tail call i32 @test_n_byte_cp_force(i32 256)
%10 = tail call i32 @test_n_byte_cp_force(i32 512)
%11 = tail call i32 @test_n_byte_cp_force(i32 1024)
%12 = tail call i32 @test_n_byte_cp_force(i32 2048)
%13 = tail call i32 @test_n_byte_cp_force(i32 4096)
%14 = tail call i32 @test_n_byte_cp_force(i32 8192)
%15 = tail call i32 @test_n_byte_cp_force(i32 16384)
%16 = tail call i32 @test_n_byte_cp_force(i32 32768)
%17 = tail call i32 @test_n_byte_cp_force(i32 65536)
%18 = tail call i32 @test_n_byte_cp_force(i32 131072)
%19 = tail call i32 @test_n_byte_cp_force(i32 262144)
%20 = tail call i32 @test_n_byte_cp_force(i32 524288)
%21 = tail call i32 @test_n_byte_cp_force(i32 1048576)
%22 = tail call i32 @test_n_byte_cp_force(i32 2097152)
%23 = tail call i32 @test_n_byte_cp_force(i32 4194304)
%24 = tail call i32 @test_n_byte_cp_force(i32 8388608)
%25 = tail call i32 @test_n_byte_cp_force(i32 16777216)
%26 = tail call i32 @test_n_byte_cp_force(i32 33554432)
%27 = tail call i32 @test_n_byte_cp_force(i32 67108864)
%28 = tail call i32 @test_n_byte_cp_force(i32 134217728)
%29 = tail call i32 @test_n_byte_cp_force(i32 268435456)
%30 = tail call i32 @test_n_byte_cp_force(i32 536870912)
%31 = tail call i32 @unlink(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%32 = tail call i32 @unlink(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}