#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*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int sure;
  printf("Sureyi giriniz(saniye) = ");
  scanf("%d", &sure);
  printf("\n--------------------------");
  int saniye = sure % 60;
  int dakika = (sure / 60) % 60;
  int saat = (sure / 3600) % 60;
  printf("-----------------------------------\n");
  printf("Toplam sure = %d saat %d dakika %d saniyedir.", saat, dakika, saniye);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed6(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x3c,%ecx
cltd
idiv   %ecx
mov    $0x3c,%ecx
cltd
idiv   %ecx
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xe10,%ecx
cltd
idiv   %ecx
mov    $0x3c,%ecx
cltd
idiv   %ecx
mov    %edx,-0x14(%rbp)
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xeab(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xecd(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
lea    0xebf(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movslq 0xc(%rsp),%rax
imul   $0xffffffff88888889,%rax,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
sar    $0x5,%ecx
add    %edx,%ecx
imul   $0x3c,%ecx,%edx
imul   $0xffffffff91a2b3c5,%rax,%rsi
shr    $0x20,%rsi
add    %eax,%esi
mov    %eax,%r14d
sub    %edx,%r14d
movslq %ecx,%rbx
imul   $0xffffffff88888889,%rbx,%rax
shr    $0x20,%rax
add    %ebx,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
sar    $0x5,%eax
add    %ecx,%eax
imul   $0x3c,%eax,%eax
sub    %eax,%ebx
mov    %esi,%eax
shr    $0x1f,%eax
sar    $0xb,%esi
add    %eax,%esi
movslq %esi,%rbp
imul   $0xffffffff88888889,%rbp,%rax
shr    $0x20,%rax
add    %ebp,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
sar    $0x5,%eax
add    %ecx,%eax
imul   $0x3c,%eax,%eax
sub    %eax,%ebp
lea    0xe81(%rip),%rdi
call   1030 <puts@plt>
lea    0xe47(%rip),%rdi
mov    %ebp,%esi
mov    %ebx,%edx
mov    %r14d,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Sureyi giriniz(saniye) = \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [28 x i8] c"\0A--------------------------\00"
@.str.3 = [37 x i8] c"-----------------------------------\0A\00"
@.str.4 = [46 x i8] c"Toplam sure = %d saat %d dakika %d saniyedir.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
%9 = load i32, i32* %2
%10 = srem i32 %9, 60
store i32 %10, i32* %3
%11 = load i32, i32* %2
%12 = sdiv i32 %11, 60
%13 = srem i32 %12, 60
store i32 %13, i32* %4
%14 = load i32, i32* %2
%15 = sdiv i32 %14, 3600
%16 = srem i32 %15, 60
store i32 %16, i32* %5
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0))
%18 = load i32, i32* %5
%19 = load i32, i32* %4
%20 = load i32, i32* %3
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.4, i64 0, i64 0), i32 %18, i32 %19, i32 %20)
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"Sureyi giriniz(saniye) = \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [28 x i8] c"\0A--------------------------\00"
@.str.4 = [46 x i8] c"Toplam sure = %d saat %d dakika %d saniyedir.\00"
@str = [36 x i8] c"-----------------------------------\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
%6 = load i32, i32* %1
%7 = srem i32 %6, 60
%8 = sdiv i32 %6, 60
%9 = srem i32 %8, 60
%10 = sdiv i32 %6, 3600
%11 = srem i32 %10, 60
%12 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @.str.4, i64 0, i64 0), i32 %11, i32 %9, i32 %7)
ret i32 0
}